From cd589b5ee06b9fb54359570422ec49099b8e6020 Mon Sep 17 00:00:00 2001 From: Martin Sivak Date: Fri, 18 Jun 2010 14:49:57 +0200 Subject: Simplify the GUI --- frontend/firstaidkit.glade | 2867 ++++++++++++++++++++++++++------------------ frontend/frontend_gtk.py | 63 +- 2 files changed, 1692 insertions(+), 1238 deletions(-) (limited to 'frontend') diff --git a/frontend/firstaidkit.glade b/frontend/firstaidkit.glade index 0ae5f72..4aafacf 100644 --- a/frontend/firstaidkit.glade +++ b/frontend/firstaidkit.glade @@ -1,1187 +1,1686 @@ - + + + - - - - True - First Aid Kit - - - True - - - True - - - True - _File - True - - - - - gtk-open - True - True - True - - - - - - gtk-save - True - True - True - - - - - - True - - - - - gtk-quit - True - True - True - - - - - - - - - - True - _Help - True - - - - - True - _About - True - - - - - - - - - - False - False - 0 - - - - - True - True - - - True - - - Fix diagnosed issues - True - True - False - True - True - - - False - False - 0 - - - - - Run interactive mode - True - True - False - True - True - - - False - False - 1 - - - - - Be verbose in output - True - True - False - True - True - - - False - False - 2 - - - - - Use experimental features - True - True - False - True - True - - - False - False - 3 - - - - - True - 1 - 0 - - - Start - True - True - False - True - - - - - - 4 - - - - - - - True - Simple - - - False - tab - - - - - True - - - True - 0 - 5 - Run specified flow: - - - False - False - 0 - - - - - True - - - False - 1 - - - - - Run interactive mode - True - True - False - True - True - - - False - False - 2 - - - - - Be verbose in output - True - True - False - True - True - - - False - False - 3 - - - - - Use experimental features - True - True - False - True - True - - - False - False - 4 - - - - - Use dependency mechanisms - True - True - False - True - True - True - - - False - False - 5 - - - - - True - 1 - 0 - - - Start - True - True - False - True - - - - - - 6 - - - - - 1 - - - - - True - Advanced - - - 1 - False - tab - - - - - True - - - True - True - automatic - automatic - - - True - True - - - - - 0 - - - - - Run interactive mode - True - True - False - True - True - - - False - False - 1 - - - - - Be verbose in output - True - True - False - True - True - - - False - False - 2 - - - - - Use dependency mechanisms - True - True - False - True - True - True - - - False - False - 3 - - - - - True - - - Flags - True - True - False - True - - - - 0 - - - - - Info - True - True - False - True - - - - 1 - - - - - Start - True - True - False - True - - - - 2 - - - - - False - 4 - - - - - 2 - - - - - True - Expert - - - 2 - False - tab - - - - - True - - - True - - - True - True - automatic - automatic - - - True - True - - - - - 0 - - - - - True - 1 - 0 - 0 - - - True - - - Reset - True - True - False - True - - - - False - False - 0 - - - - - Stop - True - False - True - False - True - - - - False - False - 1 - - - - - - - False - 1 - - - - - - - 3 - - - - - True - Results - - - 3 - False - tab - - - - - 1 - - - - - 0.10000000149 - - - False - False - 2 - - - - - True - - - False - False - 3 - - - - - - - True - Flag list - - - True - - - True - Flags to set before any operation takes place: - - - False - False - 5 - 0 - - - - - True - - - False - 1 - - - - - True - True - 3 - never - automatic - - - True - none - - - True - - - - - - - - - - - - - - - - 1 - 2 - - - - - True - - - False - 3 - - - - - True - 1 - 1 - 0 - 0 - - - True - - - Cancel - True - True - False - True - - - - False - False - 0 - - - - - OK - True - True - False - True - - - - False - False - 1 - - - - - - - False - 4 - - - - - - - True - Plugin info - - dialog - - - True - - - True - True - never - automatic - - - True - - - True - 6 - 2 - - - True - 0 - Plugin name: - - - GTK_FILL - - - - - - True - 0 - Plugin version: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Plugin author: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Plugin description: - - - 3 - 4 - GTK_FILL - - - - - - True - 0 - Plugin flows: - - - 4 - 5 - GTK_FILL - - - - - - True - 0 - - - 5 - 6 - GTK_FILL - - - - - - True - 0 - - - 1 - 2 - 5 - 6 - GTK_FILL - - - - - - True - 0 - label12 - - - 1 - 2 - - - - - - True - 0 - label13 - - - 1 - 2 - 1 - 2 - - - - - - True - 0 - label14 - - - 1 - 2 - 2 - 3 - - - - - - True - 0 - label15 - - - 1 - 2 - 3 - 4 - - - - - - True - 0 - - - 1 - 2 - 4 - 5 - - - - - - - - - - 2 - - - - - True - end - - - gtk-close - -7 - True - True - True - False - True - - - False - False - 0 - - - - - False - end - 0 - - - - - - - True - 5 - True - normal - (c) Red Hat 2008 - http://fedorahosted.org/firstaidkit - Martin Sivak <msivak@redhat.com> + + + True + First Aid Kit + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + + True + False + 0 + + + + True + GTK_PACK_DIRECTION_LTR + GTK_PACK_DIRECTION_LTR + + + + True + _File + True + + + + + + + True + gtk-open + True + + + + + + + True + gtk-save + True + + + + + + + True + + + + + + True + gtk-quit + True + + + + + + + + + + + True + _Help + True + + + + + + + True + _About + True + + + + + + + + + + 0 + False + False + + + + + + True + True + True + True + GTK_POS_TOP + False + False + + + + True + False + 0 + + + + True + Select the task you want to perform: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 5 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + False + True + + + 0 + False + True + + + + + + True + True + Run interactive mode + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Be verbose in output + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Use experimental features + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Do not use dependency mechanisms + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + + + + True + True + Start + True + GTK_RELIEF_NORMAL + True + + + + + + 0 + True + True + + + + + False + True + + + + + + True + Select task + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 0 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + 0 + True + True + + + + + + True + True + Run interactive mode + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Be verbose in output + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Do not use dependency mechanisms + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + False + 0 + + + + True + True + Flags + True + GTK_RELIEF_NORMAL + True + + + + 0 + True + True + + + + + + True + True + Info + True + GTK_RELIEF_NORMAL + True + + + + 0 + True + True + + + + + + True + True + Start + True + GTK_RELIEF_NORMAL + True + + + + 0 + True + True + + + + + 0 + False + True + + + + + False + True + + + + + + True + Expert setup + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + 0 + True + True + + + + + + True + 1 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + Reset + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + + True + False + True + Stop + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + + False + True + + + + + + True + Results + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + True + True + + + + + + GTK_PROGRESS_LEFT_TO_RIGHT + 0 + 0.10000000149 + PANGO_ELLIPSIZE_NONE + + + 0 + False + False + + + + + + True + True + + + 0 + False + False + + + + + + + + True + Flag list + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + + True + False + 0 + + + + True + Flags to set before any operation takes place: + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 5 + False + False + + + + + + True + + + 0 + False + True + + + + + + 3 + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + GTK_SHADOW_IN + + + + True + False + 0 + + + + + + + + + + + + + + + + + + + 1 + True + True + + + + + + True + + + 0 + False + True + + + + + + True + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 0 + + + + True + True + Cancel + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + + True + True + OK + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + + + True + Plugin info - + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + gtk-close + True + GTK_RELIEF_NORMAL + True + -7 + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + GTK_SHADOW_IN + + + + True + 6 + 2 + False + 0 + 0 + + + + True + Plugin name: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + + + + + + + + True + Plugin version: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + + + + + + + + True + Plugin author: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + + + + + + + + True + Plugin description: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + + + + + + + + True + Plugin flows: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 4 + 5 + + + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 5 + 6 + + + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 5 + 6 + + + + + + + + True + label12 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 0 + 1 + + + + + + + True + label13 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 1 + 2 + + + + + + + True + label14 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 2 + 3 + + + + + + + True + label15 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 3 + 4 + + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 4 + 5 + + + + + + + + + + 0 + True + True + + + + + + + + 5 + True + True + FirstAidKit + (c) Red Hat 2008 + False + http://fedorahosted.org/firstaidkit + Martin Sivak <msivak@redhat.com> Joel Andres Granados <jgranado@redhat.com> - translator-credits - - - - - - False - end - 0 - - - - - - - 5 - Question - True - center-on-parent - dialog - False - - - True - vertical - 2 - - - True - 6 - - - True - label - - - 0 - - - - - True - True - - True - - - 1 - - - - - 1 - - - - - True - end - - - gtk-cancel - -6 - True - True - True - True - - - False - False - 0 - - - - - gtk-ok - -5 - True - True - True - True - True - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - - 5 - New Password - True - center-on-parent - dialog - False - - - True - vertical - 2 - - - True - 2 - 2 - 6 - 6 - - - True - label - - - - - True - label - - - 1 - 2 - - - - - True - True - False - - - - 1 - 2 - - - - - True - True - False - - - - 1 - 2 - 1 - 2 - - - - - 1 - - - - - True - end - - - gtk-cancel - -6 - True - True - True - True - - - False - False - 0 - - - - - gtk-ok - -5 - True - True - True - True - True - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - - 5 - Question - True - center-on-parent - dialog - False - - - True - vertical - 2 - - - True - vertical - 6 - - - True - 0 - label - - - 0 - - - - - 1 - - - - - True - end - - - gtk-cancel - -6 - True - True - True - True - - - False - False - 0 - - - - - gtk-ok - -5 - True - True - True - True - True - True - - - False - False - 1 - - - - - False - end - 0 - - - - - + translator-credits + + + + False + 0 + + + + GTK_BUTTONBOX_DEFAULT_STYLE + + + 0 + False + True + GTK_PACK_END + + + + + + + + 5 + Question + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + False + + + + True + False + 2 + + + + True + GTK_BUTTONBOX_END + + + + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + + True + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + False + 6 + + + + True + label + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + True + True + + + + + + True + True + True + True + 0 + + True + + True + + + 0 + True + True + + + + + 0 + True + True + + + + + + + + 5 + New Password + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + False + + + + True + False + 2 + + + + True + GTK_BUTTONBOX_END + + + + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + + True + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + 2 + 2 + False + 6 + 6 + + + + True + label + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + + + + + + True + label + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + + + + + + True + True + True + False + 0 + + True + + False + + + 1 + 2 + 0 + 1 + + + + + + True + True + True + False + 0 + + True + + False + + + 1 + 2 + 1 + 2 + + + + + 0 + True + True + + + + + + + + 5 + Question + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + False + + + + True + False + 2 + + + + True + GTK_BUTTONBOX_END + + + + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + + True + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + False + 6 + + + + True + label + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + True + True + + + + + 0 + True + True + + + + + + diff --git a/frontend/frontend_gtk.py b/frontend/frontend_gtk.py index c1f1436..739a1a4 100644 --- a/frontend/frontend_gtk.py +++ b/frontend/frontend_gtk.py @@ -123,51 +123,6 @@ class CallbacksMainWindow(object): dir = os.path.dirname(self._glade.relative_file("."))) return True - #simple mode callbacks - def on_b_StartSimple_activate(self, widget, *args): - print("on_b_StartSimple_activate") - - flags = set(self._cfg.operation._list("flags")) - - #check fix - if self._glade.get_widget("check_Simple_Fix").get_active(): - self._cfg.operation.mode = "auto-flow" - self._cfg.operation.flow = "fix" - else: - self._cfg.operation.mode = "auto-flow" - self._cfg.operation.flow = "diagnose" - - #check interactive - if self._glade.get_widget("check_Simple_Interactive").get_active(): - self._cfg.operation.interactive = "True" - else: - self._cfg.operation.interactive = "False" - - #check verbose - if self._glade.get_widget("check_Simple_Verbose").get_active(): - self._cfg.operation.verbose = "True" - else: - self._cfg.operation.verbose = "False" - - #check experimental - if self._glade.get_widget("check_Simple_Experimental").get_active(): - flags.add("experimental") - else: - try: - flags.remove("experimental") - except KeyError, e: - pass - - #reset params - if self._cfg.has_section("plugin-args"): - self._cfg.remove_section("plugin-args") - self._cfg.add_section("plugin-args") - - self._cfg.operation.flags = " ".join( - map(lambda x: x.encode("string-escape"), flags)) - self.execute() - return True - #advanced mode callbacks def on_b_StartAdvanced_activate(self, widget, *args): print("on_b_StartAdvanced_activate") @@ -204,10 +159,10 @@ class CallbacksMainWindow(object): self._cfg.operation.interactive = "False" #check dependency - if self._glade.get_widget("check_Advanced_Dependency").get_active(): - self._cfg.operation.dependencies = "True" - else: + if self._glade.get_widget("check_Advanced_NoDependency").get_active(): self._cfg.operation.dependencies = "False" + else: + self._cfg.operation.dependencies = "True" self._cfg.operation.flags = " ".join( map(lambda x: x.encode("string-escape"), flags)) @@ -259,10 +214,10 @@ class CallbacksMainWindow(object): self._cfg.operation.interactive = "False" #check dependency - if self._glade.get_widget("check_Expert_Dependency").get_active(): - self._cfg.operation.dependencies = "True" - else: + if self._glade.get_widget("check_Expert_NoDependency").get_active(): self._cfg.operation.dependencies = "False" + else: + self._cfg.operation.dependencies = "True" #get the plugin & flow list plugins = [] @@ -469,16 +424,16 @@ class MainWindow(object): self.flow_list_data.add(n) self.flow_list_rend_text = gtk.CellRendererText() - self.flow_list_store = gtk.ListStore(gobject.TYPE_STRING) + self.flow_list_store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING) self.flow_list_store_diagnose = -1 for idx,n in enumerate(sorted(self.flow_list_data)): - self.flow_list_store.append([n]) + self.flow_list_store.append([n, n]) if n=="diagnose": self.flow_list_store_diagnose = idx self.flow_list = self._glade.get_widget("combo_Advanced_Flows") self.flow_list.set_model(self.flow_list_store) self.flow_list.pack_start(self.flow_list_rend_text, True) - self.flow_list.add_attribute(self.flow_list_rend_text, 'text', 0) + self.flow_list.add_attribute(self.flow_list_rend_text, 'text', 1) self.flow_list.set_active(self.flow_list_store_diagnose) # results -- cgit