From cd8f83a89ae5f80a60fe344a56ef82206dc45725 Mon Sep 17 00:00:00 2001 From: Huang Peng Date: Wed, 11 Mar 2009 14:14:27 +0800 Subject: Update setup ui, follow gnome UI guidelines. --- setup/main.py | 9 +- setup/setup.glade | 386 ++++++++++++++++++++++++++---------------------------- 2 files changed, 191 insertions(+), 204 deletions(-) (limited to 'setup') diff --git a/setup/main.py b/setup/main.py index afd7e0b..c67cbd9 100644 --- a/setup/main.py +++ b/setup/main.py @@ -78,7 +78,11 @@ class Setup(object): def __init_ui(self): # add icon search path - self.__dialog = self.__xml.get_widget("dialog_setup") + self.__window = self.__xml.get_widget("window_preferences") + self.__window.connect("delete-event", gtk.main_quit) + + self.__button_close = self.__xml.get_widget("button_close") + self.__button_close.connect("clicked", gtk.main_quit) # auto start ibus self.__checkbutton_auto_start = self.__xml.get_widget("checkbutton_auto_start") @@ -353,7 +357,8 @@ class Setup(object): pass def run(self): - return self.__dialog.run() + self.__window.show_all() + gtk.main() if __name__ == "__main__": Setup().run() diff --git a/setup/setup.glade b/setup/setup.glade index d6b31ee..694240b 100644 --- a/setup/setup.glade +++ b/setup/setup.glade @@ -1,18 +1,17 @@ - + - - 5 + + 12 IBus Preferences - GTK_WIN_POS_CENTER_ON_PARENT + False + GTK_WIN_POS_CENTER gtk-preferences - GDK_WINDOW_TYPE_HINT_DIALOG - False - - + + True - 2 + 12 True @@ -20,11 +19,14 @@ True - 6 - 6 + 12 + 12 + 12 + 12 True + 18 True @@ -33,158 +35,147 @@ True + 6 12 True 3 - 3 + 2 + 12 + 6 - - True - 0 - Trigger: - GTK_JUSTIFY_RIGHT - - - GTK_FILL - GTK_FILL - 4 - 4 - - - - - True - 0 - Next engine: - GTK_JUSTIFY_RIGHT - - - 1 - 2 - GTK_FILL - GTK_FILL - 4 - 4 - - - - - True - 0 - Previous engine: - GTK_JUSTIFY_RIGHT - - - 2 - 3 - GTK_FILL - GTK_FILL - 4 - 4 - - - - + True - True - False + 6 + + + True + False + True + False + + + + + True + False + True + ... + True + 0 + + + False + 1 + + 1 2 - GTK_FILL - 4 - 4 + 2 + 3 - + True - True - False + 6 + + + True + True + False + + + + + True + True + ... + True + 0 + + + False + 1 + + 1 2 1 2 - GTK_FILL - 4 - 4 - + True - True - False + 6 + + + True + True + False + + + + + True + True + ... + True + 0 + + + False + 1 + + 1 2 - 2 - 3 - GTK_FILL - 4 - 4 - + True - True - True - ... - 0 + False + 0 + previous input method: - 2 - 3 + 2 + 3 GTK_FILL GTK_FILL - 4 - 4 - + True - True - True - ... - 0 + 0 + Next input method: - 2 - 3 1 2 GTK_FILL GTK_FILL - 4 - 4 - + True - False - True - True - ... - 0 + 0 + Enable or disable: - 2 - 3 - 2 - 3 GTK_FILL GTK_FILL - 4 - 4 @@ -214,10 +205,12 @@ True + 6 12 True + 6 True @@ -225,13 +218,12 @@ True - 1 - Lookup table orientation: + 0 + Candidates orientation: GTK_JUSTIFY_RIGHT False - 4 @@ -253,21 +245,20 @@ Vertical True - 1 + 0 Show language panel: GTK_JUSTIFY_RIGHT False - 4 True - Always Hide -On Daemon -Always Show + Never +Dynamically +Always 1 @@ -283,6 +274,7 @@ Always Show True True Use custom font + True 0 True @@ -291,11 +283,25 @@ Always Show - + True - True - True - 0 + + + True + 0 + Custom font: + + + + + True + True + 0 + + + 1 + + 3 @@ -321,46 +327,6 @@ Always Show 1 - - - 0 - GTK_SHADOW_NONE - - - True - 12 - - - True - True - Start ibus on login - 0 - True - - - - - - - True - <b>Startup</b> - True - - - label_item - - - - - False - False - 4 - 2 - - - - - @@ -378,19 +344,18 @@ Always Show True - 2 - 2 - 2 - 2 + 12 + 12 + 12 + 12 True True - 4 - + True 6 @@ -400,11 +365,14 @@ Always Show + + False + 240 - 350 + 300 True True GTK_POLICY_AUTOMATIC @@ -425,10 +393,7 @@ Always Show True - 8 - 8 - 8 - 8 + 12 True @@ -438,28 +403,20 @@ Always Show True True - True - gtk-add + gtk-add True 0 - - False - False - True True - True - gtk-remove + gtk-remove True 0 - False - False 1 @@ -467,14 +424,11 @@ Always Show True True - True - gtk-go-up + gtk-go-up True 0 - False - False 2 @@ -482,14 +436,11 @@ Always Show True True - True - gtk-go-down + gtk-go-down True 0 - False - False 3 @@ -497,6 +448,7 @@ Always Show + False 1 @@ -520,6 +472,7 @@ Always Show + True @@ -541,7 +494,43 @@ Homepage: http://code.google.com/p/ibus - + + True + 0 + GTK_SHADOW_NONE + + + True + 6 + 12 + + + True + True + Start ibus on login + True + 0 + True + + + + + + + True + <b>Startup</b> + True + + + label_item + + + + + False + False + 2 + @@ -560,32 +549,25 @@ Homepage: http://code.google.com/p/ibus - - 1 - - - + + True + 12 GTK_BUTTONBOX_END True True - True - gtk-close + gtk-close True 0 - - False - False - False - GTK_PACK_END + 1 -- cgit From a8f1c7d06886f282ceeb2637a843935287eaa46e Mon Sep 17 00:00:00 2001 From: Huang Peng Date: Wed, 11 Mar 2009 14:18:11 +0800 Subject: Change sensitive of custom font label. --- setup/main.py | 5 +++ setup/setup.glade | 94 +++++++++++++++++++++++++++---------------------------- 2 files changed, 52 insertions(+), 47 deletions(-) (limited to 'setup') diff --git a/setup/main.py b/setup/main.py index c67cbd9..42c3233 100644 --- a/setup/main.py +++ b/setup/main.py @@ -141,10 +141,13 @@ class Setup(object): self.__config.get_value("panel", "use_custom_font", False)) self.__checkbutton_custom_font.connect("toggled", self.__checkbutton_custom_font_toggled_cb) + self.__label_custom_font = self.__xml.get_widget("label_custom_font") self.__fontbutton_custom_font = self.__xml.get_widget("fontbutton_custom_font") if self.__config.get_value("panel", "use_custom_font", False): + self.__label_custom_font.set_sensitive(True) self.__fontbutton_custom_font.set_sensitive(True) else: + self.__label_custom_font.set_sensitive(False) self.__fontbutton_custom_font.set_sensitive(False) font_name = gtk.settings_get_default().get_property("gtk-font-name") font_name = unicode(font_name, "utf-8") @@ -339,9 +342,11 @@ class Setup(object): def __checkbutton_custom_font_toggled_cb(self, button): if self.__checkbutton_custom_font.get_active(): + self.__label_custom_font.set_sensitive(True) self.__fontbutton_custom_font.set_sensitive(True) self.__config.set_value("panel", "use_custom_font", True) else: + self.__label_custom_font.set_sensitive(False) self.__fontbutton_custom_font.set_sensitive(False) self.__config.set_value("panel", "use_custom_font", False) diff --git a/setup/setup.glade b/setup/setup.glade index 694240b..a50efd1 100644 --- a/setup/setup.glade +++ b/setup/setup.glade @@ -45,21 +45,57 @@ 12 6 - + + True + 0 + Enable or disable: + + + GTK_FILL + GTK_FILL + + + + + True + 0 + Next input method: + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + False + 0 + previous input method: + + + 2 + 3 + GTK_FILL + GTK_FILL + + + + True 6 - + True - False True False - + True - False True ... True @@ -74,8 +110,6 @@ 1 2 - 2 - 3 @@ -111,19 +145,21 @@ - + True 6 - + True + False True False - + True + False True ... True @@ -138,44 +174,8 @@ 1 2 - - - - - True - False - 0 - previous input method: - - 2 3 - GTK_FILL - GTK_FILL - - - - - True - 0 - Next input method: - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 0 - Enable or disable: - - - GTK_FILL - GTK_FILL @@ -286,7 +286,7 @@ Always True - + True 0 Custom font: -- cgit From bf9ed69bfa4ee7c82397ba28b18869e1c80cc1a7 Mon Sep 17 00:00:00 2001 From: Huang Peng Date: Fri, 20 Mar 2009 09:52:51 +0800 Subject: Change "Dynamically" to "When active" in setup window. --- setup/setup.glade | 94 +++++++++++++++++++++++++++---------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) (limited to 'setup') diff --git a/setup/setup.glade b/setup/setup.glade index a50efd1..ab7b061 100644 --- a/setup/setup.glade +++ b/setup/setup.glade @@ -45,57 +45,21 @@ 12 6 - - True - 0 - Enable or disable: - - - GTK_FILL - GTK_FILL - - - - - True - 0 - Next input method: - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - False - 0 - previous input method: - - - 2 - 3 - GTK_FILL - GTK_FILL - - - - + True 6 - + True + False True False - + True + False True ... True @@ -110,6 +74,8 @@ 1 2 + 2 + 3 @@ -145,21 +111,19 @@ - + True 6 - + True - False True False - + True - False True ... True @@ -174,8 +138,44 @@ 1 2 + + + + + True + False + 0 + previous input method: + + 2 3 + GTK_FILL + GTK_FILL + + + + + True + 0 + Next input method: + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 0 + Enable or disable: + + + GTK_FILL + GTK_FILL @@ -257,7 +257,7 @@ Vertical True Never -Dynamically +When active Always -- cgit