* src/gramps.glade: Correct tooltips.

* src/GrampsCfg.py:	Enable using four toolbar styles as well as
the gnome default style.
* src/preferences.glade: Add a title for the tree. HIGify toolbar styles.
* src/gramps_main.py (pref_callback): Set toolbar style from prefs.


svn: r2259
This commit is contained in:
Alex Roitman 2003-10-16 04:42:21 +00:00
parent 7fc8c32729
commit 3a5ccf8e7f
5 changed files with 179 additions and 209 deletions

View File

@ -1,3 +1,10 @@
2003-10-15 Alex Roitman <shura@alex.neuro.umn.edu>
* src/gramps.glade: Correct tooltips.
* src/GrampsCfg.py: Enable using four toolbar styles as well as
the gnome default style.
* src/preferences.glade: Add a title for the tree. HIGify toolbar styles.
* src/gramps_main.py (pref_callback): Set toolbar style from prefs.
2003-10-15 Tim Waugh <twaugh@redhat.com>
* src/Makefile.am: Add uninstall rule for grampslib.so (now 'make
distcheck' passes again).

View File

@ -25,6 +25,7 @@
#
#-------------------------------------------------------------------------
import os
import string
import PaperMenu
import Plugins
@ -134,7 +135,8 @@ nameof = Utils.normal_name
display_name = Utils.normal_name
display_surname = lambda x : x.getSurname()
status_bar = 1
toolbar = 2
toolbar = gtk.TOOLBAR_BOTH
save_toolbar = gtk.TOOLBAR_BOTH
calendar = 0
paper_preference = ""
output_preference = ""
@ -215,6 +217,7 @@ def loadConfig(call):
global db_dir
global status_bar
global toolbar
global save_toolbar
global mediaref
global globalprop
global localprop
@ -237,7 +240,13 @@ def loadConfig(call):
# capitalize = get_bool("/apps/gramps/capitalize")
index_visible = get_bool("/apps/gramps/index-visible")
status_bar = get_int("/apps/gramps/statusbar")
toolbar = get_int("/apps/gramps/toolbar",2)
gnome_toolbar_str = get_string("/desktop/gnome/interface/toolbar_style")
gnome_toolbar = eval("gtk.TOOLBAR_%s" % string.upper(gnome_toolbar_str))
save_toolbar = get_int("/apps/gramps/toolbar",gtk.TOOLBAR_BOTH)
if save_toolbar == 5:
toolbar = gnome_toolbar
else:
toolbar = save_toolbar
defaultview = get_int("/apps/gramps/defaultview")
familyview = get_int("/apps/gramps/familyview")
@ -605,12 +614,7 @@ class GrampsPreferences:
else:
self.top.get_widget("stat3").set_active(1)
if toolbar == 0:
self.top.get_widget("tool1").set_active(1)
elif toolbar == 1:
self.top.get_widget("tool2").set_active(1)
else:
self.top.get_widget("tool3").set_active(1)
self.top.get_widget("tooloptmenu").set_history(save_toolbar)
if defaultview == 0:
self.top.get_widget('pvbutton').set_active(1)
@ -826,6 +830,7 @@ class GrampsPreferences:
global index_visible
global status_bar
global toolbar
global save_toolbar
global defaultview
global familyview
global paper_preference
@ -862,12 +867,13 @@ class GrampsPreferences:
else:
status_bar = 2
if self.top.get_widget("tool1").get_active():
toolbar = 0
elif self.top.get_widget("tool2").get_active():
toolbar = 1
save_toolbar = self.top.get_widget("tooloptmenu").get_history()
gnome_toolbar_str = get_string("/desktop/gnome/interface/toolbar_style")
gnome_toolbar = eval("gtk.TOOLBAR_%s" % string.upper(gnome_toolbar_str))
if save_toolbar == 5:
toolbar = gnome_toolbar
else:
toolbar = 2
toolbar = save_toolbar
if self.top.get_widget("pvbutton").get_active():
defaultview = 0
@ -924,7 +930,7 @@ class GrampsPreferences:
# set_bool("/apps/gramps/capitalize",capitalize)
set_bool("/apps/gramps/index-visible",index_visible)
set_int("/apps/gramps/statusbar",status_bar)
set_int("/apps/gramps/toolbar",toolbar)
set_int("/apps/gramps/toolbar",save_toolbar)
set_int("/apps/gramps/defaultview",defaultview)
set_int("/apps/gramps/familyview",familyview)
set_string("/apps/gramps/paper-preference",paper_preference)

View File

@ -703,7 +703,7 @@
<child>
<widget class="button" id="button2">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Open file</property>
<property name="tooltip" translatable="yes">Open database</property>
<property name="label" translatable="yes">Open</property>
<property name="use_underline">True</property>
<property name="stock_pixmap">gtk-open</property>
@ -714,7 +714,7 @@
<child>
<widget class="button" id="button3">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Save file</property>
<property name="tooltip" translatable="yes">Save database</property>
<property name="label" translatable="yes">Save</property>
<property name="use_underline">True</property>
<property name="stock_pixmap">gtk-save</property>
@ -725,6 +725,7 @@
<child>
<widget class="button" id="back_btn">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Go back in history</property>
<property name="label" translatable="yes">Back</property>
<property name="use_underline">True</property>
<property name="stock_pixmap">gtk-go-back</property>
@ -740,6 +741,7 @@
<child>
<widget class="button" id="fwd_btn">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Go forward in history</property>
<property name="label" translatable="yes">Forward</property>
<property name="use_underline">True</property>
<property name="stock_pixmap">gtk-go-forward</property>
@ -777,7 +779,7 @@
<child>
<widget class="button" id="tools">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Run a tool</property>
<property name="tooltip" translatable="yes">Run tools</property>
<property name="label" translatable="yes">Tools</property>
<property name="use_underline">True</property>
<property name="icon">tools.png</property>
@ -1302,6 +1304,7 @@
<child>
<widget class="GtkButton" id="apply_filter">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Apply filter using the selected controls</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_apply_filter_clicked" object="filter"/>

View File

@ -171,6 +171,8 @@ class Gramps:
def pref_callback(self,val):
self.family_view.init_interface()
self.update_display(val)
self.toolbar.set_style(GrampsCfg.toolbar)
def init_interface(self):
"""Initializes the GLADE interface, and gets references to the

View File

@ -76,22 +76,42 @@
<child>
<widget class="GtkVBox" id="vbox42">
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkLabel" id="label140">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Categories:&lt;/b&gt;</property>
<property name="use_underline">True</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">6</property>
<property name="expand">True</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHPaned" id="hpaned1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position">0</property>
<child>
<widget class="GtkFrame" id="frame19">
<widget class="GtkVBox" id="vbox44">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow1">
@ -114,6 +134,11 @@
</widget>
</child>
</widget>
<packing>
<property name="padding">6</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
@ -245,9 +270,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">autosave_interval</property>
<accessibility>
<atkrelation target="autosave_interval" type="controller-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -294,9 +316,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">entry1</property>
<accessibility>
<atkrelation target="dbdir" type="controller-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -714,7 +733,7 @@
<widget class="GtkTable" id="table15">
<property name="border_width">12</property>
<property name="visible">True</property>
<property name="n_rows">8</property>
<property name="n_rows">6</property>
<property name="n_columns">3</property>
<property name="homogeneous">False</property>
<property name="row_spacing">6</property>
@ -744,6 +763,119 @@
</packing>
</child>
<child>
<widget class="GtkOptionMenu" id="tooloptmenu">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="history">0</property>
<signal name="changed" handler="on_object_toggled" object="propertybox" last_modification_time="Thu, 16 Oct 2003 03:13:45 GMT"/>
<child>
<widget class="GtkMenu" id="menu3">
<child>
<widget class="GtkMenuItem" id="menuitem9">
<property name="visible">True</property>
<property name="label" translatable="yes">Icons Only</property>
<property name="use_underline">True</property>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="menuitem10">
<property name="visible">True</property>
<property name="label" translatable="yes">Text Only</property>
<property name="use_underline">True</property>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="menuitem7">
<property name="visible">True</property>
<property name="label" translatable="yes">Text Below Icons</property>
<property name="use_underline">True</property>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="menuitem8">
<property name="visible">True</property>
<property name="label" translatable="yes">Text Beside Icons</property>
<property name="use_underline">True</property>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="menuitem11">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="menuitem12">
<property name="visible">True</property>
<property name="label" translatable="yes">GNOME Settings</property>
<property name="use_underline">True</property>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="stat3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Active person's _relationship to Home Person</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_object_toggled" object="propertybox"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="stat2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Active person's name and _GRAMPS ID</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<property name="group">stat3</property>
<signal name="toggled" handler="on_object_toggled" object="propertybox"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label125">
<property name="visible">True</property>
@ -761,125 +893,12 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">3</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="tool1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Display only _icons</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_object_toggled" object="propertybox"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="tool2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Display only _text</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<property name="group">tool1</property>
<signal name="toggled" handler="on_object_toggled" object="propertybox"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="tool3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Display icons and text</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<property name="group">tool1</property>
<signal name="toggled" handler="on_object_toggled" object="propertybox"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="stat2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Active person's name and _GRAMPS ID</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_object_toggled" object="propertybox"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="stat3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Active person's _relationship to Home Person (English only)</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<property name="group">stat2</property>
<signal name="toggled" handler="on_object_toggled" object="propertybox"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
@ -1199,9 +1218,6 @@
<property name="xpad">5</property>
<property name="ypad">5</property>
<property name="mnemonic_widget">date_format</property>
<accessibility>
<atkrelation target="date_format" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -1227,10 +1243,6 @@
<property name="xpad">5</property>
<property name="ypad">5</property>
<property name="mnemonic_widget">name_format</property>
<accessibility>
<atkproperty name="AtkObject::accessible_name" translatable="yes">Name format:</atkproperty>
<atkrelation target="name_format" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -1278,9 +1290,6 @@
<property name="xpad">5</property>
<property name="ypad">5</property>
<property name="mnemonic_widget">date_entry_format</property>
<accessibility>
<atkrelation target="date_entry_format" type="controller-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -1491,9 +1500,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">resname</property>
<accessibility>
<atkrelation target="resname" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -1519,9 +1525,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">resaddr</property>
<accessibility>
<atkrelation target="resaddr" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -1547,9 +1550,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">rescity</property>
<accessibility>
<atkrelation target="rescity" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -1575,9 +1575,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">resstate</property>
<accessibility>
<atkrelation target="resstate" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -1603,9 +1600,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">rescountry</property>
<accessibility>
<atkrelation target="rescountry" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -1631,9 +1625,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">respostal</property>
<accessibility>
<atkrelation target="respostal" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -1659,9 +1650,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">resphone</property>
<accessibility>
<atkrelation target="resphone" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -1687,9 +1675,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">resemail</property>
<accessibility>
<atkrelation target="resemail" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -1963,9 +1948,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">output_format</property>
<accessibility>
<atkrelation target="output_format" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -2013,9 +1995,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">graphical_format</property>
<accessibility>
<atkrelation target="graphical_format" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -2063,9 +2042,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">paper_size</property>
<accessibility>
<atkrelation target="paper_size" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -2129,9 +2105,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">entry11</property>
<accessibility>
<atkrelation target="repdir" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -2191,9 +2164,6 @@
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">entry12</property>
<accessibility>
<atkrelation target="htmldir" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -2501,9 +2471,6 @@
<property name="xpad">2</property>
<property name="ypad">2</property>
<property name="mnemonic_widget">iprefix</property>
<accessibility>
<atkrelation target="iprefix" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -2529,9 +2496,6 @@
<property name="xpad">2</property>
<property name="ypad">2</property>
<property name="mnemonic_widget">fprefix</property>
<accessibility>
<atkrelation target="fprefix" type="controller-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -2557,9 +2521,6 @@
<property name="xpad">2</property>
<property name="ypad">2</property>
<property name="mnemonic_widget">pprefix</property>
<accessibility>
<atkrelation target="pprefix" type="controller-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -2585,9 +2546,6 @@
<property name="xpad">2</property>
<property name="ypad">2</property>
<property name="mnemonic_widget">sprefix</property>
<accessibility>
<atkrelation target="sprefix" type="controller-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -2613,9 +2571,6 @@
<property name="xpad">2</property>
<property name="ypad">2</property>
<property name="mnemonic_widget">oprefix</property>
<accessibility>
<atkrelation target="oprefix" type="controller-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>
@ -2870,9 +2825,6 @@
<property name="xpad">3</property>
<property name="ypad">3</property>
<property name="mnemonic_widget">lastnamegen</property>
<accessibility>
<atkrelation target="lastnamegen" type="label-for"/>
</accessibility>
</widget>
<packing>
<property name="left_attach">1</property>