Switch GTK+ control implementations from calling g_strdup() directly to strdupText() for orthogonality.
This commit is contained in:
parent
63f1f7576e
commit
40d24ae626
|
@ -32,7 +32,7 @@ static char *buttonText(uiButton *bb)
|
|||
{
|
||||
struct button *b = (struct button *) bb;
|
||||
|
||||
return g_strdup(gtk_button_get_label(b->button));
|
||||
return strdupText(gtk_button_get_label(b->button));
|
||||
}
|
||||
|
||||
static void buttonSetText(uiButton *bb, const char *text)
|
||||
|
|
|
@ -35,7 +35,7 @@ static char *checkboxText(uiCheckbox *cc)
|
|||
{
|
||||
struct checkbox *c = (struct checkbox *) cc;
|
||||
|
||||
return g_strdup(gtk_button_get_label(c->button));
|
||||
return strdupText(gtk_button_get_label(c->button));
|
||||
}
|
||||
|
||||
static void checkboxSetText(uiCheckbox *cc, const char *text)
|
||||
|
|
|
@ -18,7 +18,7 @@ static char *entryText(uiEntry *ee)
|
|||
{
|
||||
struct entry *e = (struct entry *) ee;
|
||||
|
||||
return g_strdup(gtk_entry_get_text(e->entry));
|
||||
return strdupText(gtk_entry_get_text(e->entry));
|
||||
}
|
||||
|
||||
static void entrySetText(uiEntry *ee, const char *text)
|
||||
|
|
|
@ -18,8 +18,7 @@ static char *labelText(uiLabel *ll)
|
|||
{
|
||||
struct label *l = (struct label *) ll;
|
||||
|
||||
// TODO change g_strdup() to a wrapper function for export in ui_unix.h
|
||||
return g_strdup(gtk_label_get_text(l->label));
|
||||
return strdupText(gtk_label_get_text(l->label));
|
||||
}
|
||||
|
||||
static void labelSetText(uiLabel *ll, const char *text)
|
||||
|
|
Loading…
Reference in New Issue