Switch GTK+ control implementations from calling g_strdup() directly to strdupText() for orthogonality.

This commit is contained in:
Pietro Gagliardi 2015-04-30 10:12:33 -04:00
parent 63f1f7576e
commit 40d24ae626
4 changed files with 4 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)