* src/ToolTips.py: fix spacing

* src/ViewManager.py: remember toolbar/sidebar status.


svn: r5692
This commit is contained in:
Don Allingham 2006-01-08 03:06:58 +00:00
parent ce9dec4026
commit 613125aa70
3 changed files with 41 additions and 7 deletions

View File

@ -1,4 +1,6 @@
2006-01-07 Don Allingham <don@gramps-project.org> 2006-01-07 Don Allingham <don@gramps-project.org>
* src/ToolTips.py: fix spacing
* src/ViewManager.py: remember toolbar/sidebar status.
* src/FamilyView.py: fix gtk.Table's bizzare way of handling empty * src/FamilyView.py: fix gtk.Table's bizzare way of handling empty
columns that are spanned. columns that are spanned.
* src/GrampsLogger/_ErrorView.py: make dialog more HIG compliant * src/GrampsLogger/_ErrorView.py: make dialog more HIG compliant

View File

@ -186,9 +186,9 @@ class PersonTip:
if date_str != "": if date_str != "":
birth_str = escape(date_str) birth_str = escape(date_str)
s = "<big><b>%s</b></big>\n\n"\ s = "<span size=\"larger\" weight=\"bold\">%s</span>\n"\
"\t<b>%s:</b>\t%s\n"\ " <span weight=\"bold\">%s:</span> %s\n"\
"\t<b>%s:</b>\t%s\n" % ( " <span weight=\"bold\">%s:</span> %s\n" % (
_("Person"), _("Person"),
_("Name"),escape(self._obj.get_primary_name().get_name()), _("Name"),escape(self._obj.get_primary_name().get_name()),
_("Birth"),birth_str) _("Birth"),birth_str)
@ -198,8 +198,8 @@ class PersonTip:
psrc_id = psrc_ref.get_base_handle() psrc_id = psrc_ref.get_base_handle()
psrc = self._db.get_source_from_handle(psrc_id) psrc = self._db.get_source_from_handle(psrc_id)
s += "\n<big><b>%s</b></big>\n\n"\ s += "\n<span size=\"larger\" weight=\"bold\">%s</span>\n"\
"\t<b>%s:</b>\t%s\n" % ( " <span weight=\"bold\">%s:</span> %s\n" % (
_("Primary source"), _("Primary source"),
_("Name"), _("Name"),
escape(short(psrc.get_title()))) escape(short(psrc.get_title())))

View File

@ -62,6 +62,7 @@ import NameDisplay
import Tool import Tool
import Report import Report
import GrampsMime import GrampsMime
import GrampsKeys
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -102,6 +103,7 @@ uidefault = '''<ui>
<menu action="ViewMenu"> <menu action="ViewMenu">
<menuitem action="Sidebar"/> <menuitem action="Sidebar"/>
<menuitem action="Toolbar"/> <menuitem action="Toolbar"/>
<separator/>
</menu> </menu>
<menu action="GoMenu"> <menu action="GoMenu">
<placeholder name="CommonGo"/> <placeholder name="CommonGo"/>
@ -184,6 +186,13 @@ class ViewManager:
hbox.pack_start(self.ebox,False) hbox.pack_start(self.ebox,False)
hbox.show_all() hbox.show_all()
self.show_sidebar = GrampsKeys.get_view()
if self.show_sidebar == None:
self.show_sidebar = True
self.show_toolbar = GrampsKeys.get_toolbar()
if self.show_toolbar == None:
self.show_toolbar = True
self.notebook = gtk.Notebook() self.notebook = gtk.Notebook()
self.notebook.set_show_tabs(False) self.notebook.set_show_tabs(False)
self.notebook.show() self.notebook.show()
@ -223,8 +232,21 @@ class ViewManager:
self.recent_manager = DisplayState.RecentDocsMenu(self.uistate,self.state, self.recent_manager = DisplayState.RecentDocsMenu(self.uistate,self.state,
self.read_file) self.read_file)
self.recent_manager.build() self.recent_manager.build()
self.window.show() self.window.show()
if self.show_sidebar:
self.ebox.show()
self.notebook.set_show_tabs(False)
else:
self.ebox.hide()
self.notebook.set_show_tabs(True)
if self.show_toolbar:
self.toolbar.show()
else:
self.toolbar.hide()
def init_interface(self): def init_interface(self):
self.create_pages() self.create_pages()
self.change_page(None,None) self.change_page(None,None)
@ -319,8 +341,12 @@ class ViewManager:
]) ])
self.fileactions.add_toggle_actions([ self.fileactions.add_toggle_actions([
('Sidebar', None, '_Sidebar', None, None, self.sidebar_toggle), ('Sidebar', None, '_Sidebar', None, None, self.sidebar_toggle,
('Toolbar', None, '_Toolbar', None, None, self.toolbar_toggle), self.show_sidebar
),
('Toolbar', None, '_Toolbar', None, None, self.toolbar_toggle,
self.show_toolbar
),
]) ])
merge_id = self.uimanager.add_ui_from_string(uidefault) merge_id = self.uimanager.add_ui_from_string(uidefault)
@ -384,15 +410,21 @@ class ViewManager:
if obj.get_active(): if obj.get_active():
self.ebox.show() self.ebox.show()
self.notebook.set_show_tabs(False) self.notebook.set_show_tabs(False)
GrampsKeys.save_view(True)
else: else:
self.ebox.hide() self.ebox.hide()
self.notebook.set_show_tabs(True) self.notebook.set_show_tabs(True)
GrampsKeys.save_view(False)
GrampsKeys.sync()
def toolbar_toggle(self,obj): def toolbar_toggle(self,obj):
if obj.get_active(): if obj.get_active():
self.toolbar.show() self.toolbar.show()
GrampsKeys.save_toolbar(True)
else: else:
self.toolbar.hide() self.toolbar.hide()
GrampsKeys.save_toolbar(False)
GrampsKeys.sync()
def register_view(self, view): def register_view(self, view):
self.views.append(view) self.views.append(view)