3631: Cannot start Gramps without any view loaded (OK, it is stupid...)
svn: r14518
This commit is contained in:
parent
528ba93613
commit
fd867e93ba
@ -961,11 +961,20 @@ class ViewManager(CLIManager):
|
||||
#set view cat to last used in this category
|
||||
self.notebook_cat[-1].set_current_page(default_cat_views[indexcat])
|
||||
|
||||
if self.views:
|
||||
self.active_page = self.pages[current_cat][current_cat_view]
|
||||
self.buttons[current_cat].set_active(True)
|
||||
self.active_page.set_active()
|
||||
self.notebook.set_current_page(current_cat)
|
||||
self.notebook_cat[current_cat].set_current_page(current_cat_view)
|
||||
else:
|
||||
#not one single view loaded
|
||||
WarningDialog(
|
||||
_("No views loaded"),
|
||||
_("No view plugins plugins are loaded. Go to Help->Plugin "
|
||||
"Manager, and make sure some plugins of type 'View' are "
|
||||
"enabled. Then restart Gramps"))
|
||||
|
||||
|
||||
def __views_to_show(self, use_last = True):
|
||||
"""
|
||||
@ -1159,6 +1168,7 @@ class ViewManager(CLIManager):
|
||||
:Type view_page: integer >=0 to switch to a specific page, or -1 to
|
||||
switch to the active view in the category
|
||||
"""
|
||||
if self.notebook_cat:
|
||||
if view_page == -1:
|
||||
#just show active one
|
||||
view_page = self.notebook_cat[category_page].get_current_page()
|
||||
@ -1189,6 +1199,9 @@ class ViewManager(CLIManager):
|
||||
self.uistate.disconnect(self._key)
|
||||
self._key = self.uistate.connect(
|
||||
'nameformat-changed', self.active_page.build_tree)
|
||||
else:
|
||||
#no views loaded
|
||||
pass
|
||||
|
||||
def import_data(self, obj):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user