Allow Gramps to work full screen. Useful for small screen devices like Asus eee PC
svn: r10826
This commit is contained in:
parent
2d73aa8f93
commit
e1d0e29eac
@ -174,6 +174,7 @@ PRIVATE_GIVEN_TEXT = ('preferences', 'private-given-text', 2)
|
||||
PRIVATE_RECORD_TEXT = ('preferences', 'private-record-text', 2)
|
||||
RELATION_DISPLAY_THEME= ('preferences', 'relation-display-theme', 2)
|
||||
INVALID_DATE_FORMAT = ('preferences', 'invalid-date-format', 2)
|
||||
FULLSCREEN = ('interface', 'fullscreen', 0)
|
||||
|
||||
default_value = {
|
||||
DEFAULT_SOURCE : False,
|
||||
@ -301,4 +302,5 @@ default_value = {
|
||||
PRIVATE_RECORD_TEXT : "[%s]" % _("Private Record"),
|
||||
RELATION_DISPLAY_THEME: "CLASSIC",
|
||||
INVALID_DATE_FORMAT : "<b>%s</b>",
|
||||
FULLSCREEN : False,
|
||||
}
|
||||
|
@ -114,6 +114,7 @@ UIDEFAULT = '''<ui>
|
||||
<menuitem action="Sidebar"/>
|
||||
<menuitem action="Toolbar"/>
|
||||
<menuitem action="Filter"/>
|
||||
<menuitem action="Fullscreen"/>
|
||||
<separator/>
|
||||
</menu>
|
||||
<menu action="GoMenu">
|
||||
@ -223,6 +224,7 @@ class ViewManager:
|
||||
self.show_sidebar = Config.get(Config.VIEW)
|
||||
self.show_toolbar = Config.get(Config.TOOLBAR_ON)
|
||||
self.show_filter = Config.get(Config.FILTER)
|
||||
self.fullscreen = Config.get(Config.FULLSCREEN)
|
||||
|
||||
self.__pmgr = PluginManager.get_instance()
|
||||
|
||||
@ -302,6 +304,9 @@ class ViewManager:
|
||||
else:
|
||||
self.toolbar.hide()
|
||||
|
||||
if self.fullscreen:
|
||||
self.window.fullscreen()
|
||||
|
||||
# Showing the main window is deferred so that
|
||||
# ArgHandler can work without it always shown
|
||||
# But we need to realize it here to have gtk.gdk.window handy
|
||||
@ -460,6 +465,8 @@ class ViewManager:
|
||||
self.show_toolbar ),
|
||||
('Filter', None, _('_Filter Sidebar'), None, None,
|
||||
filter_toggle, self.show_filter),
|
||||
('Fullscreen', None, _('F_ull Screen'), "F11", None,
|
||||
self.fullscreen_toggle, self.fullscreen),
|
||||
]
|
||||
|
||||
self._undo_action_list = [
|
||||
@ -765,6 +772,19 @@ class ViewManager:
|
||||
Config.set(Config.TOOLBAR_ON, False)
|
||||
Config.sync()
|
||||
|
||||
def fullscreen_toggle(self, obj):
|
||||
"""
|
||||
Set the main Granps window fullscreen based on the value of the
|
||||
toggle button. Save the setting in the config file.
|
||||
"""
|
||||
if obj.get_active():
|
||||
self.window.fullscreen()
|
||||
Config.set(Config.FULLSCREEN, True)
|
||||
else:
|
||||
self.window.unfullscreen()
|
||||
Config.set(Config.FULLSCREEN, False)
|
||||
Config.sync()
|
||||
|
||||
def register_view(self, view):
|
||||
"""
|
||||
Allow other objects to register a view with the View Manager
|
||||
|
Loading…
x
Reference in New Issue
Block a user