4443: Enable Preferences menu entry when no database is open

svn: r17088
This commit is contained in:
Nick Hall 2011-04-09 21:56:18 +00:00
parent a716936afa
commit ff042e1bbe

View File

@ -798,7 +798,6 @@ class ViewManager(CLIManager):
self.import_data), self.import_data),
('Tools', 'gramps-tools', _('_Tools'), None, ('Tools', 'gramps-tools', _('_Tools'), None,
_("Open the tools dialog"), self.tools_clicked), _("Open the tools dialog"), self.tools_clicked),
('EditMenu', None, _('_Edit')),
('BookMenu', None, _('_Bookmarks')), ('BookMenu', None, _('_Bookmarks')),
('ToolsMenu', None, _('_Tools')), ('ToolsMenu', None, _('_Tools')),
('ConfigView', 'gramps-config', _('_Configure View...'), ('ConfigView', 'gramps-config', _('_Configure View...'),
@ -884,6 +883,9 @@ class ViewManager(CLIManager):
if not self.file_loaded: if not self.file_loaded:
self.actiongroup.set_visible(False) self.actiongroup.set_visible(False)
self.readonlygroup.set_visible(False) self.readonlygroup.set_visible(False)
self.undoactions.set_visible(False)
self.redoactions.set_visible(False)
self.undohistoryactions.set_visible(False)
self.fileactions.set_sensitive(False) self.fileactions.set_sensitive(False)
self.__build_tools_menu(self._pmgr.get_reg_tools()) self.__build_tools_menu(self._pmgr.get_reg_tools())
self.__build_report_menu(self._pmgr.get_reg_reports()) self.__build_report_menu(self._pmgr.get_reg_reports())
@ -1337,6 +1339,9 @@ class ViewManager(CLIManager):
self.__change_page(self.notebook.get_current_page()) self.__change_page(self.notebook.get_current_page())
self.actiongroup.set_visible(True) self.actiongroup.set_visible(True)
self.readonlygroup.set_visible(True) self.readonlygroup.set_visible(True)
self.undoactions.set_visible(True)
self.redoactions.set_visible(True)
self.undohistoryactions.set_visible(True)
self.recent_manager.build() self.recent_manager.build()