mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 08:00:50 +00:00
dummy filechooser
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@375 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -169,7 +169,7 @@ static void frame_draw(MwWidget handle) {
|
||||
p.x = 0;
|
||||
for(j = 0; j < arrlen(lb->list[i].name); j++) {
|
||||
p.x += MwDefaultBorderWidth;
|
||||
if(strlen(lb->list[i].name[j]) > 0) MwDrawText(handle, &p, lb->list[i].name[j], 0, MwALIGNMENT_BEGINNING, selected ? base : text);
|
||||
MwDrawText(handle, &p, lb->list[i].name[j], 0, MwALIGNMENT_BEGINNING, selected ? base : text);
|
||||
p.x += get_col_width(lb, j) - MwDefaultBorderWidth;
|
||||
}
|
||||
p.y += MwTextHeight(handle, "M") / 2;
|
||||
@@ -249,10 +249,7 @@ static int create(MwWidget handle) {
|
||||
|
||||
static void destroy(MwWidget handle) {
|
||||
MwListBox lb = handle->internal;
|
||||
int i;
|
||||
for(i = 0; i < arrlen(lb->list); i++) {
|
||||
free(lb->list[i].name);
|
||||
}
|
||||
MwListBoxReset(handle);
|
||||
arrfree(lb->list);
|
||||
arrfree(lb->width);
|
||||
free(handle->internal);
|
||||
@@ -413,6 +410,24 @@ void MwListBoxDelete(MwWidget handle, int index) {
|
||||
}
|
||||
}
|
||||
|
||||
void MwListBoxReset(MwWidget handle) {
|
||||
MwListBox lb = handle->internal;
|
||||
int i;
|
||||
|
||||
while(arrlen(lb->list) > 0) {
|
||||
for(i = 0; i < arrlen(lb->list[0].name); i++) {
|
||||
if(lb->list[0].name[i] != NULL) free(lb->list[0].name[i]);
|
||||
}
|
||||
arrfree(lb->list[0].name);
|
||||
arrdel(lb->list, 0);
|
||||
}
|
||||
|
||||
lb->selected = -1;
|
||||
|
||||
resize(handle);
|
||||
MwForceRender(lb->frame);
|
||||
}
|
||||
|
||||
void MwListBoxInsertMultiple(MwWidget handle, int index, int count, MwLLPixmap* pixmap, ...) {
|
||||
va_list va;
|
||||
va_start(va, pixmap);
|
||||
|
||||
Reference in New Issue
Block a user