From 48548017da638c8191c68af68a9f682f0786f517 Mon Sep 17 00:00:00 2001 From: Martin Sivak Date: Mon, 30 Aug 2010 14:50:14 +0200 Subject: Add the possibility to disable Back and Abort buttons and use it in openscap --- frontend/frontend_gtk.py | 8 +++++++- frontend/gtk-list.xml | 11 +++++------ 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 @@ True end - + gtk-go-back True True @@ -79,12 +79,11 @@ - - gtk-stop + + Abort True True True - True False @@ -143,8 +142,8 @@ - button1 - button2 + back-button + abort-button cancel_button ok_button 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): -- cgit