sidebar-text option
svn: r6534
This commit is contained in:
parent
db2d3ec2c4
commit
b7e6d2f149
@ -1,4 +1,10 @@
|
|||||||
2006-05-03 Don Allingham <don@gramps-project.org>
|
2006-05-03 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/ViewManager.py: Optionally exclude text from buttons
|
||||||
|
* src/GrampsCfg.py: add SIDEBAR_TEXT option
|
||||||
|
* src/GrampsConfigKeys.py: add SIDEBAR_TEXT option
|
||||||
|
* data/gramps.schemas.in: add SIDEBAR_TEXT option
|
||||||
|
* src/GrampsGconfKeys.py: handle None returned by routines properly
|
||||||
|
* src/Filters/Rules/Person/Makefile.am: remove unused files
|
||||||
* src/DataViews/_FamilyView.py: update on db change
|
* src/DataViews/_FamilyView.py: update on db change
|
||||||
* src/DataViews/_FamilyList.py: Move ColumnEdit local
|
* src/DataViews/_FamilyList.py: Move ColumnEdit local
|
||||||
* src/ViewManager.py: remove ColumnEdit, make local
|
* src/ViewManager.py: remove ColumnEdit, make local
|
||||||
|
@ -570,6 +570,18 @@
|
|||||||
</locale>
|
</locale>
|
||||||
</schema>
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/gramps/interface/sidebar-text</key>
|
||||||
|
<applyto>/apps/gramps/interface/sidebar-text</applyto>
|
||||||
|
<owner>gramps</owner>
|
||||||
|
<type>bool</type>
|
||||||
|
<default>1</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Include text on sidebar buttons</short>
|
||||||
|
<long>If set to True, the Sidebar buttons will contain a text description of the view, otherwise it will only display the button.</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
<schema>
|
<schema>
|
||||||
<key>/schemas/apps/gramps/paths/website-directory</key>
|
<key>/schemas/apps/gramps/paths/website-directory</key>
|
||||||
<applyto>/apps/gramps/paths/website-directory</applyto>
|
<applyto>/apps/gramps/paths/website-directory</applyto>
|
||||||
|
@ -43,6 +43,7 @@ USE_LDS = ('behavior','use-lds', 0)
|
|||||||
USE_TIPS = ('behavior','use-tips', 0)
|
USE_TIPS = ('behavior','use-tips', 0)
|
||||||
POP_PLUGIN_STATUS = ('behavior','pop-plugin-status', 0)
|
POP_PLUGIN_STATUS = ('behavior','pop-plugin-status', 0)
|
||||||
VIEW = ('interface','view', 0)
|
VIEW = ('interface','view', 0)
|
||||||
|
SIDEBAR_TEXT = ('interface','sidebar-text', 0)
|
||||||
WEBSITE_DIRECTORY = ('paths','website-directory', 2)
|
WEBSITE_DIRECTORY = ('paths','website-directory', 2)
|
||||||
|
|
||||||
|
|
||||||
@ -92,5 +93,6 @@ default_value = {
|
|||||||
USE_TIPS : False,
|
USE_TIPS : False,
|
||||||
POP_PLUGIN_STATUS : False,
|
POP_PLUGIN_STATUS : False,
|
||||||
VIEW : True,
|
VIEW : True,
|
||||||
|
SIDEBAR_TEXT : True,
|
||||||
WEBSITE_DIRECTORY : './',
|
WEBSITE_DIRECTORY : './',
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ def get(key):
|
|||||||
val = get_int(token)
|
val = get_int(token)
|
||||||
else:
|
else:
|
||||||
val = get_string(token)
|
val = get_string(token)
|
||||||
if not val:
|
if val == None:
|
||||||
val = default_value[key]
|
val = default_value[key]
|
||||||
return val
|
return val
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ if __name__ == "__main__":
|
|||||||
parser = SchemaHandler()
|
parser = SchemaHandler()
|
||||||
parser.parse(sys.argv[1])
|
parser.parse(sys.argv[1])
|
||||||
|
|
||||||
f = open("_GrampsConfigKeys","w")
|
f = open("_GrampsConfigKeys.py","w")
|
||||||
|
|
||||||
for (key, key_type, default, long, short, include) in parser.list:
|
for (key, key_type, default, long, short, include) in parser.list:
|
||||||
data = key.split('/')
|
data = key.split('/')
|
||||||
|
@ -56,8 +56,6 @@ pkgdata_PYTHON = \
|
|||||||
_PersonWithIncompleteEvent.py \
|
_PersonWithIncompleteEvent.py \
|
||||||
_ProbablyAlive.py \
|
_ProbablyAlive.py \
|
||||||
_RelationshipPathBetween.py \
|
_RelationshipPathBetween.py \
|
||||||
_Rule.py \
|
|
||||||
_RuleUtils.py \
|
|
||||||
_SearchName.py \
|
_SearchName.py \
|
||||||
__init__.py
|
__init__.py
|
||||||
|
|
||||||
|
@ -205,6 +205,7 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
|
|||||||
for item in formats:
|
for item in formats:
|
||||||
obox.append_text(item)
|
obox.append_text(item)
|
||||||
active = Config.get(Config.STATUSBAR)
|
active = Config.get(Config.STATUSBAR)
|
||||||
|
|
||||||
if active < 2:
|
if active < 2:
|
||||||
obox.set_active(0)
|
obox.set_active(0)
|
||||||
else:
|
else:
|
||||||
@ -215,6 +216,9 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
|
|||||||
lwidget = BasicLabel("%s: " % _('Status bar'))
|
lwidget = BasicLabel("%s: " % _('Status bar'))
|
||||||
table.attach(lwidget, 0, 1, 2, 3, yoptions=0)
|
table.attach(lwidget, 0, 1, 2, 3, yoptions=0)
|
||||||
table.attach(obox, 1, 3, 2, 3, yoptions=0)
|
table.attach(obox, 1, 3, 2, 3, yoptions=0)
|
||||||
|
|
||||||
|
self.add_checkbox(table, _("Show text in sidebar buttons (takes effect on restart)"),
|
||||||
|
4, Config.SIDEBAR_TEXT)
|
||||||
|
|
||||||
return table
|
return table
|
||||||
|
|
||||||
|
@ -528,6 +528,8 @@ class ViewManager:
|
|||||||
def create_pages(self):
|
def create_pages(self):
|
||||||
self.pages = []
|
self.pages = []
|
||||||
self.prev_nav = PageView.NAVIGATION_NONE
|
self.prev_nav = PageView.NAVIGATION_NONE
|
||||||
|
|
||||||
|
use_text = Config.get(Config.SIDEBAR_TEXT)
|
||||||
|
|
||||||
index = 0
|
index = 0
|
||||||
for page_def in self.views:
|
for page_def in self.views:
|
||||||
@ -552,11 +554,17 @@ class ViewManager:
|
|||||||
|
|
||||||
# create the button and add it to the sidebar
|
# create the button and add it to the sidebar
|
||||||
button = gtk.ToggleButton()
|
button = gtk.ToggleButton()
|
||||||
if page_stock:
|
if use_text:
|
||||||
button.set_use_stock(True)
|
if page_stock:
|
||||||
button.set_label(page_stock)
|
button.set_use_stock(True)
|
||||||
|
button.set_label(page_stock)
|
||||||
|
else:
|
||||||
|
button.set_label(page_title)
|
||||||
else:
|
else:
|
||||||
button.set_label(page_title)
|
image = gtk.Image()
|
||||||
|
image.set_from_stock(page_stock, gtk.ICON_SIZE_LARGE_TOOLBAR)
|
||||||
|
image.show()
|
||||||
|
button.add(image)
|
||||||
button.set_border_width(4)
|
button.set_border_width(4)
|
||||||
button.set_relief(gtk.RELIEF_NONE)
|
button.set_relief(gtk.RELIEF_NONE)
|
||||||
button.set_alignment(0, 0.5)
|
button.set_alignment(0, 0.5)
|
||||||
@ -602,7 +610,6 @@ class ViewManager:
|
|||||||
self.active_page.set_active()
|
self.active_page.set_active()
|
||||||
Config.set(Config.LAST_VIEW,num)
|
Config.set(Config.LAST_VIEW,num)
|
||||||
Config.sync()
|
Config.sync()
|
||||||
print "Saved as",Config.get(Config.LAST_VIEW)
|
|
||||||
|
|
||||||
old_nav = self._navigation_type[self.prev_nav]
|
old_nav = self._navigation_type[self.prev_nav]
|
||||||
if old_nav[0] != None:
|
if old_nav[0] != None:
|
||||||
|
Loading…
Reference in New Issue
Block a user