diff options
author | Pixel <pixel@nobis-crew.org> | 2010-06-15 00:59:57 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2010-06-15 00:59:57 -0700 |
commit | eed0eb6a476d54ce19aeff137984aa981d9e3976 (patch) | |
tree | 807891636efd2f87dcbd261e971216269973ae07 /iup/src/gtk/iupgtk_button.c | |
parent | ccc8261e4d48de89da4ddfe7b55e378ae0cd6f47 (diff) |
Upgrading to iup 3.1
Diffstat (limited to 'iup/src/gtk/iupgtk_button.c')
-rwxr-xr-x | iup/src/gtk/iupgtk_button.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/iup/src/gtk/iupgtk_button.c b/iup/src/gtk/iupgtk_button.c index 18be87c..f8474ae 100755 --- a/iup/src/gtk/iupgtk_button.c +++ b/iup/src/gtk/iupgtk_button.c @@ -150,8 +150,10 @@ static int gtkButtonSetPaddingAttrib(Ihandle* ih, const char* value) gtk_alignment_set_padding(alignment, ih->data->vert_padding, ih->data->vert_padding, ih->data->horiz_padding, ih->data->horiz_padding); } + return 0; } - return 0; + else + return 1; /* store until not mapped, when mapped will be set again */ } #ifdef WIN32 @@ -366,12 +368,12 @@ static int gtkButtonMapMethod(Ihandle* ih) ih->data->type = IUP_BUTTON_IMAGE; value = iupAttribGet(ih, "TITLE"); - if (value) + if (value && *value!=0) { GtkSettings* settings = gtk_widget_get_settings(ih->handle); g_object_set(settings, "gtk-button-images", (int)TRUE, NULL); - gtk_button_set_label((GtkButton*)ih->handle, value); + gtk_button_set_label((GtkButton*)ih->handle, iupgtkStrConvertToUTF8(value)); ih->data->type |= IUP_BUTTON_TEXT; #if GTK_CHECK_VERSION(2, 10, 0) @@ -397,7 +399,7 @@ static int gtkButtonMapMethod(Ihandle* ih) #endif } else - gtk_button_set_label((GtkButton*)ih->handle, title); + gtk_button_set_label((GtkButton*)ih->handle, iupgtkStrConvertToUTF8(title)); ih->data->type = IUP_BUTTON_TEXT; } |