enable actiongroups on autoload

svn: r6225
This commit is contained in:
Don Allingham 2006-03-29 19:26:43 +00:00
parent d49a5aa8ef
commit 9d13b0783d
3 changed files with 8 additions and 3 deletions

View File

@ -1,4 +1,6 @@
2006-03-29 Don Allingham <don@gramps-project.org> 2006-03-29 Don Allingham <don@gramps-project.org>
* src/ViewManager.py: enable actiongroups if file loaded before
the interface is initialized (command line or autoload)
* src/SelectObject.py: Provide images in preview * src/SelectObject.py: Provide images in preview
* src/DisplayTabs.py: Add support of SelectObject * src/DisplayTabs.py: Add support of SelectObject
* src/GenericFilter.py: check for xml file before trying to parse * src/GenericFilter.py: check for xml file before trying to parse

View File

@ -229,7 +229,6 @@ class ArgHandler:
if filetype in (const.app_gramps, if filetype in (const.app_gramps,
const.app_gramps_xml, const.app_gramps_xml,
const.app_gedcom): const.app_gedcom):
print "Here"
return self.vm.open_native(filename,filetype) return self.vm.open_native(filename,filetype)
else: else:
return 0 return 0

View File

@ -172,6 +172,7 @@ class ViewManager:
self.window = gtk.Window() self.window = gtk.Window()
self.window.set_icon_from_file(const.icon) self.window.set_icon_from_file(const.icon)
self.window.connect('destroy', self.quit) self.window.connect('destroy', self.quit)
self.file_loaded = False
try: try:
width = Config.get_width() width = Config.get_width()
@ -262,6 +263,7 @@ class ViewManager:
def init_interface(self): def init_interface(self):
self.create_pages() self.create_pages()
self.change_page(None,None) self.change_page(None,None)
if not self.file_loaded:
self.actiongroup.set_visible(False) self.actiongroup.set_visible(False)
self.fileactions.set_sensitive(False) self.fileactions.set_sensitive(False)
self.do_load_plugins() self.do_load_plugins()
@ -711,6 +713,7 @@ class ViewManager:
RecentFiles.recent_files(filename,filetype) RecentFiles.recent_files(filename,filetype)
self.recent_manager.build() self.recent_manager.build()
self.actiongroup.set_visible(True)
self.uistate.clear_history() self.uistate.clear_history()
return success return success
@ -783,6 +786,7 @@ class ViewManager:
#self.undo_callback(None) #self.undo_callback(None)
#self.redo_callback(None) #self.redo_callback(None)
#self.goto_active_person() #self.goto_active_person()
self.file_loaded = True
self.actiongroup.set_visible(True) self.actiongroup.set_visible(True)
return True return True