[meld] Add fullscreen option as recommended by HIG (closes bgo#157982)
- From: Kai Willadsen <kaiw src gnome org>
- To: svn-commits-list gnome org
- Subject: [meld] Add fullscreen option as recommended by HIG (closes bgo#157982)
- Date: Tue, 12 May 2009 21:38:38 -0400 (EDT)
commit 729d214916f2ec8cf0ef65905a305518ef6228ed
Author: Kai Willadsen <kai willadsen gmail com>
Date: Wed May 13 10:03:15 2009 +1000
Add fullscreen option as recommended by HIG (closes bgo#157982)
The GNOME HIG recommends that applications should provide a "Full Screen"
option, and since Meld uses side-by-side comparison, allowing users to
utilise their whole screen seems sensible. This fixes the final part of
bgo#157982, which asks for HIG-recommended menu items.
---
glade2/meldapp-ui.xml | 2 ++
meldapp.py | 8 ++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/glade2/meldapp-ui.xml b/glade2/meldapp-ui.xml
index b49a2d5..1f55780 100644
--- a/glade2/meldapp-ui.xml
+++ b/glade2/meldapp-ui.xml
@@ -28,6 +28,8 @@
<menu action="ViewMenu">
<menuitem action="ToolbarVisible" />
<menuitem action="StatusbarVisible" />
+ <menuitem action="Fullscreen" />
+ <separator/>
<placeholder name="ViewPlaceholder" />
<menu action="FileStatus" />
<menu action="VcStatus" />
diff --git a/meldapp.py b/meldapp.py
index aff2536..776c926 100644
--- a/meldapp.py
+++ b/meldapp.py
@@ -542,6 +542,7 @@ class MeldApp(gnomeglade.Component):
("Magic", gtk.STOCK_YES, None, None, None, self.on_menu_magic_activate),
)
toggleactions = (
+ ("Fullscreen", None, _("Full Screen"), "F11", _("View the comparison in full screen"), self.on_action_fullscreen_toggled, False),
("ToolbarVisible", None, _("_Toolbar"), None, _("Show or hide the toolbar"), self.on_menu_toolbar_toggled, True),
("StatusbarVisible", None, _("_Statusbar"), None, _("Show or hide the statusbar"), self.on_menu_statusbar_toggled, True)
)
@@ -788,6 +789,13 @@ class MeldApp(gnomeglade.Component):
def on_menu_preferences_activate(self, item):
PreferencesDialog(self)
+ def on_action_fullscreen_toggled(self, widget):
+ is_full = self.widget.window.get_state() & gtk.gdk.WINDOW_STATE_FULLSCREEN
+ if widget.get_active() and not is_full:
+ self.widget.fullscreen()
+ elif is_full:
+ self.widget.unfullscreen()
+
def on_menu_toolbar_toggled(self, widget):
self.prefs.toolbar_visible = widget.get_active()
self.toolbar.props.visible = widget.get_active()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]