diff options
author | Martin Sivak <msivak@redhat.com> | 2010-08-30 14:50:14 +0200 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2010-08-30 14:50:14 +0200 |
commit | 48548017da638c8191c68af68a9f682f0786f517 (patch) | |
tree | 7602cfdbc0bd90fafec32a891c055cafe530e4e3 | |
parent | 356290dea5be39ce0921a75871eef9c7e772f7ff (diff) | |
download | firstaidkit-48548017da638c8191c68af68a9f682f0786f517.tar.gz firstaidkit-48548017da638c8191c68af68a9f682f0786f517.tar.xz firstaidkit-48548017da638c8191c68af68a9f682f0786f517.zip |
Add the possibility to disable Back and Abort buttons and use it in openscap
-rw-r--r-- | frontend/frontend_gtk.py | 8 | ||||
-rw-r--r-- | frontend/gtk-list.xml | 11 | ||||
-rw-r--r-- | plugins/openscap_plugin.py | 2 |
3 files changed, 13 insertions, 8 deletions
diff --git a/frontend/frontend_gtk.py b/frontend/frontend_gtk.py index 665f830..e3cba63 100644 --- a/frontend/frontend_gtk.py +++ b/frontend/frontend_gtk.py @@ -415,12 +415,18 @@ class ListDialog(object): gtkb.connect_signals(self) + self._dialog.show_all() + if not options.get("back", True): + gtkb.get_object("back-button").hide() + + if not options.get("abort", True): + gtkb.get_object("abort-button").hide() + def items(self): F = lambda row: (row[0], row[2]) return map(F, self._store) def run(self): - self._dialog.show_all() return self._dialog.run() def edited_cb(self, cell, path, new_data, store): diff --git a/frontend/gtk-list.xml b/frontend/gtk-list.xml index 22b5674..a73753e 100644 --- a/frontend/gtk-list.xml +++ b/frontend/gtk-list.xml @@ -65,7 +65,7 @@ <property name="visible">True</property> <property name="layout_style">end</property> <child> - <object class="GtkButton" id="button1"> + <object class="GtkButton" id="back-button"> <property name="label">gtk-go-back</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -79,12 +79,11 @@ </packing> </child> <child> - <object class="GtkButton" id="button2"> - <property name="label">gtk-stop</property> + <object class="GtkButton" id="abort-button"> + <property name="label">Abort</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_stock">True</property> </object> <packing> <property name="expand">False</property> @@ -143,8 +142,8 @@ </object> </child> <action-widgets> - <action-widget response="2">button1</action-widget> - <action-widget response="1">button2</action-widget> + <action-widget response="2">back-button</action-widget> + <action-widget response="1">abort-button</action-widget> <action-widget response="0">cancel_button</action-widget> <action-widget response="0">ok_button</action-widget> </action-widgets> diff --git a/plugins/openscap_plugin.py b/plugins/openscap_plugin.py index 3f76527..6ea4d51 100644 --- a/plugins/openscap_plugin.py +++ b/plugins/openscap_plugin.py @@ -75,7 +75,7 @@ class OpenSCAPPlugin(Plugin): s = self._reporting.config_question_wait("Choose OpenScap profile", "Select desired profile and press OK", all_policies, - options = {"mode": 3}, + options = {"mode": 3, "back": False}, origin = self, level = PLUGIN) if s in (ReturnBack, ReturnAbort): |