[uim-commit] r2960 - trunk/helper
ekato at freedesktop.org
ekato at freedesktop.org
Fri Jan 20 20:21:10 PST 2006
Author: ekato
Date: 2006-01-20 20:21:05 -0800 (Fri, 20 Jan 2006)
New Revision: 2960
Modified:
trunk/helper/pref-gtk-custom-widgets.c
Log:
* helper/pref-gtk-custom-widgets.c (add_custom_type_pathname) :
Set button label appropriately.
Modified: trunk/helper/pref-gtk-custom-widgets.c
===================================================================
--- trunk/helper/pref-gtk-custom-widgets.c 2006-01-21 04:04:34 UTC (rev 2959)
+++ trunk/helper/pref-gtk-custom-widgets.c 2006-01-21 04:21:05 UTC (rev 2960)
@@ -466,6 +466,7 @@
GtkWidget *label;
GtkWidget *entry;
GtkWidget *button;
+ const char *button_label;
hbox = gtk_hbox_new(FALSE, 8);
@@ -478,7 +479,16 @@
UIMPREF_FILE_ENTRY(entry)->type = custom->value->as_pathname->type;
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
- button = gtk_button_new_with_label(_("File..."));
+ switch (custom->value->as_pathname->type) {
+ case UCustomPathnameType_Directory:
+ button_label = "Directory...";
+ break;
+ case UCustomPathnameType_RegularFile:
+ default:
+ button_label = "File...";
+ break;
+ }
+ button = gtk_button_new_with_label(_(button_label));
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
More information about the uim-commit
mailing list