replace
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@368 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
1b98baa677
commit
d496403c6a
4 changed files with 7 additions and 15 deletions
|
|
@ -248,8 +248,7 @@ void MwListBoxInsert(MwWidget handle, int index, const char* text, MwLLPixmap pi
|
|||
MwListBox lb = handle->internal;
|
||||
MwListBoxEntry entry;
|
||||
|
||||
entry.name = malloc(strlen(text) + 1);
|
||||
strcpy(entry.name, text);
|
||||
entry.name = MwStringDupliacte(text);
|
||||
|
||||
entry.pixmap = pixmap;
|
||||
|
||||
|
|
@ -272,8 +271,7 @@ void MwListBoxInsertMultiple(MwWidget handle, int index, char** text, MwLLPixmap
|
|||
for(i = 0; i < count; i++) {
|
||||
MwListBoxEntry entry;
|
||||
|
||||
entry.name = malloc(strlen(text[i]) + 1);
|
||||
strcpy(entry.name, text[i]);
|
||||
entry.name = MwStringDupliacte(text[i]);
|
||||
|
||||
entry.pixmap = NULL;
|
||||
if(pixmap != NULL) entry.pixmap = pixmap[i];
|
||||
|
|
|
|||
|
|
@ -193,13 +193,11 @@ MwClass MwMenuClass = &MwMenuClassRec;
|
|||
MwMenu MwMenuAdd(MwWidget handle, MwMenu menu, const char* name) {
|
||||
MwMenu m = menu == NULL ? handle->internal : menu;
|
||||
MwMenu new = malloc(sizeof(*new));
|
||||
new->name = malloc(strlen(name) + 1);
|
||||
new->name = MwStringDupliacte(name);
|
||||
new->sub = NULL;
|
||||
new->wsub = NULL;
|
||||
new->keep = 0;
|
||||
|
||||
strcpy(new->name, name);
|
||||
|
||||
arrput(m->sub, new);
|
||||
|
||||
set_xywh(handle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue