[sabayon: 17/19] Added help contents to help menus of editorwindow, and sessionwindow
- From: Scott Balneaves <sbalneav src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [sabayon: 17/19] Added help contents to help menus of editorwindow, and sessionwindow
- Date: Fri, 4 Dec 2009 20:58:22 +0000 (UTC)
commit 0338e456408f3f5ea1bebfe9f409db51aa4ee710
Author: Scott Balneaves <sbalneav ltsp org>
Date: Tue Dec 1 23:36:19 2009 -0600
Added help contents to help menus of editorwindow, and sessionwindow
admin-tool/editorwindow.py | 9 +++++++++
admin-tool/profilesdialog.py | 12 +-----------
admin-tool/sessionwindow.py | 9 +++++++++
3 files changed, 19 insertions(+), 11 deletions(-)
---
diff --git a/admin-tool/editorwindow.py b/admin-tool/editorwindow.py
index 0368979..8cd1b69 100755
--- a/admin-tool/editorwindow.py
+++ b/admin-tool/editorwindow.py
@@ -45,6 +45,7 @@ _ui_string = '''
<menuitem action="Delete"/>
</menu>
<menu action="HelpMenu">
+ <menuitem action="Contents"/>
<menuitem action="About"/>
</menu>
</menubar>
@@ -184,6 +185,13 @@ class ProfileEditorWindow:
self.__delete_currently_selected ()
@errors.checked_callback (debuglog.DEBUG_LOG_DOMAIN_USER)
+ def __handle_help (self, action):
+ try:
+ gtk.show_uri (None, "ghelp:sabayon", gtk.get_current_event_time())
+ except gobject.GError, e:
+ pass
+
+ @errors.checked_callback (debuglog.DEBUG_LOG_DOMAIN_USER)
def __handle_about (self, action):
aboutdialog.show_about_dialog (self.window)
@@ -198,6 +206,7 @@ class ProfileEditorWindow:
("EditMenu", None, _("_Edit")),
("Delete", gtk.STOCK_DELETE, _("_Delete"), "<control>D", _("Delete item"), self.__handle_delete),
("HelpMenu", None, _("_Help")),
+ ("Contents", gtk.STOCK_HELP, _("_Contents"), None, _("Help Contents"), self.__handle_help),
("About", gtk.STOCK_ABOUT, _("_About"), None, _("About Sabayon"), self.__handle_about),
]
action_group = gtk.ActionGroup ("WindowActions")
diff --git a/admin-tool/profilesdialog.py b/admin-tool/profilesdialog.py
index 9bc81f1..8a4fc79 100755
--- a/admin-tool/profilesdialog.py
+++ b/admin-tool/profilesdialog.py
@@ -360,7 +360,7 @@ class ProfilesDialog:
self.groups_button.connect ("clicked", self.__groups_button_clicked)
self.help_button = self.xml.get_widget ("help_button")
- self.help_button.connect ("clicked", self.__help_button_clicked)
+ self.help_button.hide()
self.dialog.connect ("response", self.__dialog_response)
@@ -399,16 +399,6 @@ class ProfilesDialog:
dialog.destroy ()
@errors.checked_callback (debuglog.DEBUG_LOG_DOMAIN_USER)
- def __help_button_clicked (self, button):
- uri = "ghelp:sabayon"
-
- try:
- gtk.show_uri (None, uri, gtk.get_current_event_time())
- except gobject.GError, e:
- pass
- return
-
- @errors.checked_callback (debuglog.DEBUG_LOG_DOMAIN_USER)
def __add_button_clicked (self, button):
(profile_name, base_profile) = AddProfileDialog (self.profiles_model).run (self.dialog)
if profile_name:
diff --git a/admin-tool/sessionwindow.py b/admin-tool/sessionwindow.py
index 32e7ff6..89f529f 100755
--- a/admin-tool/sessionwindow.py
+++ b/admin-tool/sessionwindow.py
@@ -48,6 +48,7 @@ _ui_string = '''
<menuitem action="EnforceMandatory"/>
</menu>
<menu action="HelpMenu">
+ <menuitem action="Contents"/>
<menuitem action="About"/>
</menu>
</menubar>
@@ -180,6 +181,7 @@ class SessionWindow:
("Changes", gtk.STOCK_EDIT, _("_Changes"), "<control>H", _("Edit changes"), self.__handle_edit),
("Lockdown", None, _("_Lockdown"),"<control>L", _("Edit Lockdown settings"), self.__handle_lockdown),
("HelpMenu", None, _("_Help")),
+ ("Contents", gtk.STOCK_ABOUT, _("_Contents"),None, _("Help Contents"), self.__handle_help),
("About", gtk.STOCK_ABOUT, _("_About"), None, _("About Sabayon"), self.__handle_about),
]
toggle_actions = [
@@ -275,6 +277,13 @@ class SessionWindow:
return not self.__do_saveconfirm ()
@errors.checked_callback (debuglog.DEBUG_LOG_DOMAIN_USER)
+ def __handle_help (self, action):
+ try:
+ gtk.show_uri (None, "ghelp:sabayon", gtk.get_current_event_time())
+ except gobject.GError, e:
+ pass
+
+ @errors.checked_callback (debuglog.DEBUG_LOG_DOMAIN_USER)
def __handle_about (self, action):
aboutdialog.show_about_dialog (self.window)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]