* src/ToolTips.py: fix spacing
* src/ViewManager.py: remember toolbar/sidebar status. svn: r5692
This commit is contained in:
parent
ce9dec4026
commit
613125aa70
@ -1,4 +1,6 @@
|
||||
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
|
||||
columns that are spanned.
|
||||
* src/GrampsLogger/_ErrorView.py: make dialog more HIG compliant
|
||||
|
@ -186,9 +186,9 @@ class PersonTip:
|
||||
if date_str != "":
|
||||
birth_str = escape(date_str)
|
||||
|
||||
s = "<big><b>%s</b></big>\n\n"\
|
||||
"\t<b>%s:</b>\t%s\n"\
|
||||
"\t<b>%s:</b>\t%s\n" % (
|
||||
s = "<span size=\"larger\" weight=\"bold\">%s</span>\n"\
|
||||
" <span weight=\"bold\">%s:</span> %s\n"\
|
||||
" <span weight=\"bold\">%s:</span> %s\n" % (
|
||||
_("Person"),
|
||||
_("Name"),escape(self._obj.get_primary_name().get_name()),
|
||||
_("Birth"),birth_str)
|
||||
@ -198,8 +198,8 @@ class PersonTip:
|
||||
psrc_id = psrc_ref.get_base_handle()
|
||||
psrc = self._db.get_source_from_handle(psrc_id)
|
||||
|
||||
s += "\n<big><b>%s</b></big>\n\n"\
|
||||
"\t<b>%s:</b>\t%s\n" % (
|
||||
s += "\n<span size=\"larger\" weight=\"bold\">%s</span>\n"\
|
||||
" <span weight=\"bold\">%s:</span> %s\n" % (
|
||||
_("Primary source"),
|
||||
_("Name"),
|
||||
escape(short(psrc.get_title())))
|
||||
|
@ -62,6 +62,7 @@ import NameDisplay
|
||||
import Tool
|
||||
import Report
|
||||
import GrampsMime
|
||||
import GrampsKeys
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -102,6 +103,7 @@ uidefault = '''<ui>
|
||||
<menu action="ViewMenu">
|
||||
<menuitem action="Sidebar"/>
|
||||
<menuitem action="Toolbar"/>
|
||||
<separator/>
|
||||
</menu>
|
||||
<menu action="GoMenu">
|
||||
<placeholder name="CommonGo"/>
|
||||
@ -184,6 +186,13 @@ class ViewManager:
|
||||
hbox.pack_start(self.ebox,False)
|
||||
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.set_show_tabs(False)
|
||||
self.notebook.show()
|
||||
@ -223,8 +232,21 @@ class ViewManager:
|
||||
self.recent_manager = DisplayState.RecentDocsMenu(self.uistate,self.state,
|
||||
self.read_file)
|
||||
self.recent_manager.build()
|
||||
|
||||
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):
|
||||
self.create_pages()
|
||||
self.change_page(None,None)
|
||||
@ -319,8 +341,12 @@ class ViewManager:
|
||||
])
|
||||
|
||||
self.fileactions.add_toggle_actions([
|
||||
('Sidebar', None, '_Sidebar', None, None, self.sidebar_toggle),
|
||||
('Toolbar', None, '_Toolbar', None, None, self.toolbar_toggle),
|
||||
('Sidebar', None, '_Sidebar', None, None, self.sidebar_toggle,
|
||||
self.show_sidebar
|
||||
),
|
||||
('Toolbar', None, '_Toolbar', None, None, self.toolbar_toggle,
|
||||
self.show_toolbar
|
||||
),
|
||||
])
|
||||
|
||||
merge_id = self.uimanager.add_ui_from_string(uidefault)
|
||||
@ -384,15 +410,21 @@ class ViewManager:
|
||||
if obj.get_active():
|
||||
self.ebox.show()
|
||||
self.notebook.set_show_tabs(False)
|
||||
GrampsKeys.save_view(True)
|
||||
else:
|
||||
self.ebox.hide()
|
||||
self.notebook.set_show_tabs(True)
|
||||
GrampsKeys.save_view(False)
|
||||
GrampsKeys.sync()
|
||||
|
||||
def toolbar_toggle(self,obj):
|
||||
if obj.get_active():
|
||||
self.toolbar.show()
|
||||
GrampsKeys.save_toolbar(True)
|
||||
else:
|
||||
self.toolbar.hide()
|
||||
GrampsKeys.save_toolbar(False)
|
||||
GrampsKeys.sync()
|
||||
|
||||
def register_view(self, view):
|
||||
self.views.append(view)
|
||||
|
Loading…
Reference in New Issue
Block a user