* src/gramps_main.py (change_active_person): Small fix for disabling
back button. * src/gramps_main.py: Add enabling/disabling for the new back/fwd menu items. svn: r2015
This commit is contained in:
parent
05ca4d93eb
commit
8178a7f82e
@ -10,6 +10,10 @@
|
||||
2003-08-15 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* src/gramps.glade: Add Go menu with navigation items. Still have to
|
||||
work out the history menu being built at runtime. Add few shortcuts.
|
||||
* src/gramps_main.py (change_active_person): Small fix for disabling
|
||||
back button.
|
||||
* src/gramps_main.py: Add enabling/disabling for the new back/fwd menu
|
||||
items.
|
||||
|
||||
2003-08-14 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* src/FrenchRepublic.py: Insert encoding line because non-ascii
|
||||
|
@ -51,7 +51,7 @@
|
||||
<accelerator key="N" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1152">
|
||||
<widget class="GtkImage" id="image1192">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-new</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -73,7 +73,7 @@
|
||||
<accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1153">
|
||||
<widget class="GtkImage" id="image1193">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-open</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -95,7 +95,7 @@
|
||||
<accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1154">
|
||||
<widget class="GtkImage" id="image1194">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-save</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -116,7 +116,7 @@
|
||||
<signal name="activate" handler="on_save_as_activate" last_modification_time="Tue, 01 Apr 2003 03:50:28 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1155">
|
||||
<widget class="GtkImage" id="image1195">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-save-as</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -150,7 +150,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1156">
|
||||
<widget class="GtkImage" id="image1196">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-convert</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -171,7 +171,7 @@
|
||||
<signal name="activate" handler="on_revert_activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1157">
|
||||
<widget class="GtkImage" id="image1197">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-revert-to-saved</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -192,7 +192,7 @@
|
||||
<signal name="activate" handler="on_reload_plugins_activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1158">
|
||||
<widget class="GtkImage" id="image1198">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-refresh</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -220,7 +220,7 @@
|
||||
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1159">
|
||||
<widget class="GtkImage" id="image1199">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-quit</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -255,7 +255,7 @@
|
||||
<accelerator key="F" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1160">
|
||||
<widget class="GtkImage" id="image1200">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-find</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -276,7 +276,7 @@
|
||||
<signal name="activate" handler="on_merge_activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1161">
|
||||
<widget class="GtkImage" id="image1201">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-convert</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -342,10 +342,10 @@
|
||||
<property name="label" translatable="yes">_Back</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_back_clicked" last_modification_time="Sat, 16 Aug 2003 02:00:59 GMT"/>
|
||||
<accelerator key="Left" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
<accelerator key="Left" modifiers="GDK_MOD1_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1162">
|
||||
<widget class="GtkImage" id="image1202">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-go-back</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -365,10 +365,10 @@
|
||||
<property name="label" translatable="yes">_Forward</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_fwd_clicked" last_modification_time="Sat, 16 Aug 2003 02:06:04 GMT"/>
|
||||
<accelerator key="Right" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
<accelerator key="Right" modifiers="GDK_MOD1_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1163">
|
||||
<widget class="GtkImage" id="image1203">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-go-forward</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -393,10 +393,10 @@
|
||||
<property name="label" translatable="yes">_Home</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_home_clicked" last_modification_time="Sat, 16 Aug 2003 01:58:55 GMT"/>
|
||||
<accelerator key="Home" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
<accelerator key="Home" modifiers="GDK_MOD1_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1164">
|
||||
<widget class="GtkImage" id="image1204">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-home</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -445,7 +445,7 @@
|
||||
<accelerator key="D" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1165">
|
||||
<widget class="GtkImage" id="image1205">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-index</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -467,7 +467,7 @@
|
||||
<accelerator key="B" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1166">
|
||||
<widget class="GtkImage" id="image1206">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gnome-stock-book-open</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -531,7 +531,7 @@
|
||||
<signal name="activate" handler="on_preferences1_activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1167">
|
||||
<widget class="GtkImage" id="image1207">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-preferences</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -552,7 +552,7 @@
|
||||
<signal name="activate" handler="on_default_person_activate" last_modification_time="Sat, 16 Aug 2003 01:58:26 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1168">
|
||||
<widget class="GtkImage" id="image1208">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-home</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -587,7 +587,7 @@
|
||||
<accelerator key="F1" modifiers="0" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1169">
|
||||
<widget class="GtkImage" id="image1209">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-help</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -614,7 +614,7 @@
|
||||
<signal name="activate" handler="on_gramps_home_page_activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1170">
|
||||
<widget class="GtkImage" id="image1210">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-jump-to</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -635,7 +635,7 @@
|
||||
<signal name="activate" handler="on_gramps_mailing_lists_activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1171">
|
||||
<widget class="GtkImage" id="image1211">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gnome-stock-mail</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -689,7 +689,7 @@
|
||||
<signal name="activate" handler="on_about_activate" last_modification_time="Tue, 01 Apr 2003 03:44:24 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1172">
|
||||
<widget class="GtkImage" id="image1212">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gnome-stock-about</property>
|
||||
<property name="icon_size">1</property>
|
||||
|
@ -376,6 +376,8 @@ class Gramps:
|
||||
self.editbtn = self.gtop.get_widget('editbtn')
|
||||
self.backbtn = self.gtop.get_widget('back_btn')
|
||||
self.fwdbtn = self.gtop.get_widget('fwd_btn')
|
||||
self.back = self.gtop.get_widget('back')
|
||||
self.forward = self.gtop.get_widget('forward')
|
||||
|
||||
self.gtop.signal_autoconnect({
|
||||
"on_back_clicked" : self.back_clicked,
|
||||
@ -470,14 +472,19 @@ class Gramps:
|
||||
self.set_buttons(1)
|
||||
if self.hindex == 0:
|
||||
self.backbtn.set_sensitive(0)
|
||||
self.back.set_sensitive(0)
|
||||
else:
|
||||
self.backbtn.set_sensitive(1)
|
||||
self.back.set_sensitive(1)
|
||||
self.fwdbtn.set_sensitive(1)
|
||||
self.forward.set_sensitive(1)
|
||||
except:
|
||||
self.set_buttons(0)
|
||||
else:
|
||||
self.backbtn.set_sensitive(0)
|
||||
self.back.set_sensitive(0)
|
||||
self.fwdbtn.set_sensitive(1)
|
||||
self.forward.set_sensitive(1)
|
||||
|
||||
def fwd_clicked(self,obj):
|
||||
if self.hindex+1 < len(self.history):
|
||||
@ -489,15 +496,21 @@ class Gramps:
|
||||
self.set_buttons(1)
|
||||
if self.hindex == len(self.history)-1:
|
||||
self.fwdbtn.set_sensitive(0)
|
||||
self.forward.set_sensitive(0)
|
||||
else:
|
||||
self.fwdbtn.set_sensitive(1)
|
||||
self.forward.set_sensitive(1)
|
||||
self.backbtn.set_sensitive(1)
|
||||
self.back.set_sensitive(1)
|
||||
except:
|
||||
self.backbtn.set_sensitive(1)
|
||||
self.back.set_sensitive(1)
|
||||
self.set_buttons(0)
|
||||
else:
|
||||
self.fwdbtn.set_sensitive(0)
|
||||
self.forward.set_sensitive(0)
|
||||
self.backbtn.set_sensitive(1)
|
||||
self.back.set_sensitive(1)
|
||||
|
||||
def change_alpha_page(self,obj,junk,page):
|
||||
"""Change the page. Be careful not to take action while the pages
|
||||
@ -1487,11 +1500,18 @@ class Gramps:
|
||||
if self.hindex+1 < len(self.history):
|
||||
self.history = self.history[0:self.hindex+1]
|
||||
self.fwdbtn.set_sensitive(1)
|
||||
self.forward.set_sensitive(1)
|
||||
else:
|
||||
self.fwdbtn.set_sensitive(0)
|
||||
self.forward.set_sensitive(0)
|
||||
self.history.append(person.getId())
|
||||
self.hindex += 1
|
||||
if self.hindex > 0:
|
||||
self.backbtn.set_sensitive(1)
|
||||
self.back.set_sensitive(1)
|
||||
else:
|
||||
self.backbtn.set_sensitive(0)
|
||||
self.back.set_sensitive(0)
|
||||
|
||||
if person:
|
||||
self.set_buttons(1)
|
||||
|
Loading…
Reference in New Issue
Block a user