* src/PeopleView.py: Correct references to history in gramps_main.
* src/gramps_main.py: Switch away from separate history submenu. * src/gramps.glade: Likewise. svn: r2197
This commit is contained in:
		| @@ -1,3 +1,8 @@ | |||||||
|  | 2003-10-05  Alex Roitman  <shura@alex.neuro.umn.edu> | ||||||
|  | 	* src/PeopleView.py: Correct references to history in gramps_main. | ||||||
|  | 	* src/gramps_main.py: Switch away from separate history submenu. | ||||||
|  | 	* src/gramps.glade: Likewise. | ||||||
|  |  | ||||||
| 2003-10-04  Don Allingham  <dallingham@users.sourceforge.net> | 2003-10-04  Don Allingham  <dallingham@users.sourceforge.net> | ||||||
| 	* src/PeopleView.py: broken out of gramps_main.py, fixed  | 	* src/PeopleView.py: broken out of gramps_main.py, fixed  | ||||||
| 	add/delete | 	add/delete | ||||||
|   | |||||||
| @@ -344,22 +344,22 @@ class PeopleView: | |||||||
|         """Builds the menu with navigation and  |         """Builds the menu with navigation and  | ||||||
|         editing operations on the people's list""" |         editing operations on the people's list""" | ||||||
|          |          | ||||||
|         back_sensitivity = self.hindex > 0  |         back_sensitivity = self.parent.hindex > 0  | ||||||
|         fwd_sensitivity = self.hindex + 1 < len(self.history) |         fwd_sensitivity = self.parent.hindex + 1 < len(self.parent.history) | ||||||
|         mlist = self.person_tree.get_selected_objects() |         mlist = self.person_tree.get_selected_objects() | ||||||
|         if mlist: |         if mlist: | ||||||
|             sel_sensitivity = 1 |             sel_sensitivity = 1 | ||||||
|         else: |         else: | ||||||
|             sel_sensitivity = 0 |             sel_sensitivity = 0 | ||||||
|         entries = [ |         entries = [ | ||||||
|             (gtk.STOCK_GO_BACK,self.back_clicked,back_sensitivity), |             (gtk.STOCK_GO_BACK,self.parent.back_clicked,back_sensitivity), | ||||||
|             (gtk.STOCK_GO_FORWARD,self.fwd_clicked,fwd_sensitivity), |             (gtk.STOCK_GO_FORWARD,self.parent.fwd_clicked,fwd_sensitivity), | ||||||
|             (gtk.STOCK_HOME,self.on_home_clicked,1), |             (gtk.STOCK_HOME,self.parent.on_home_clicked,1), | ||||||
|             (_("Add Bookmark"),self.on_add_bookmark_activate,sel_sensitivity), |             (_("Add Bookmark"),self.parent.on_add_bookmark_activate,sel_sensitivity), | ||||||
|             (None,None,0), |             (None,None,0), | ||||||
|             (gtk.STOCK_ADD, self.add_button_clicked,1), |             (gtk.STOCK_ADD, self.parent.add_button_clicked,1), | ||||||
|             (gtk.STOCK_REMOVE, self.remove_button_clicked,sel_sensitivity), |             (gtk.STOCK_REMOVE, self.parent.remove_button_clicked,sel_sensitivity), | ||||||
|             (_("Edit"), self.edit_button_clicked,sel_sensitivity), |             (_("Edit"), self.parent.edit_button_clicked,sel_sensitivity), | ||||||
|         ] |         ] | ||||||
|  |  | ||||||
|         menu = gtk.Menu() |         menu = gtk.Menu() | ||||||
| @@ -375,5 +375,3 @@ class PeopleView: | |||||||
|          |          | ||||||
|     def redisplay_person_list(self,person): |     def redisplay_person_list(self,person): | ||||||
|         self.add_to_person_list(person,1) |         self.add_to_person_list(person,1) | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										129
									
								
								src/gramps.glade
									
									
									
									
									
								
							
							
						
						
									
										129
									
								
								src/gramps.glade
									
									
									
									
									
								
							| @@ -51,7 +51,7 @@ | |||||||
| 			  <accelerator key="N" modifiers="GDK_CONTROL_MASK" signal="activate"/> | 			  <accelerator key="N" modifiers="GDK_CONTROL_MASK" signal="activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1192"> | 			    <widget class="GtkImage" id="image1230"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-new</property> | 			      <property name="stock">gtk-new</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -73,7 +73,7 @@ | |||||||
| 			  <accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/> | 			  <accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1193"> | 			    <widget class="GtkImage" id="image1231"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-open</property> | 			      <property name="stock">gtk-open</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -95,7 +95,7 @@ | |||||||
| 			  <accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/> | 			  <accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1194"> | 			    <widget class="GtkImage" id="image1232"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-save</property> | 			      <property name="stock">gtk-save</property> | ||||||
| 			      <property name="icon_size">1</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"/> | 			  <signal name="activate" handler="on_save_as_activate" last_modification_time="Tue, 01 Apr 2003 03:50:28 GMT"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1195"> | 			    <widget class="GtkImage" id="image1233"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-save-as</property> | 			      <property name="stock">gtk-save-as</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -150,7 +150,7 @@ | |||||||
| 			  <property name="use_underline">True</property> | 			  <property name="use_underline">True</property> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1196"> | 			    <widget class="GtkImage" id="image1234"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-convert</property> | 			      <property name="stock">gtk-convert</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -171,7 +171,7 @@ | |||||||
| 			  <signal name="activate" handler="on_revert_activate"/> | 			  <signal name="activate" handler="on_revert_activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1197"> | 			    <widget class="GtkImage" id="image1235"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-revert-to-saved</property> | 			      <property name="stock">gtk-revert-to-saved</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -192,7 +192,7 @@ | |||||||
| 			  <signal name="activate" handler="on_reload_plugins_activate"/> | 			  <signal name="activate" handler="on_reload_plugins_activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1198"> | 			    <widget class="GtkImage" id="image1236"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-refresh</property> | 			      <property name="stock">gtk-refresh</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -220,7 +220,7 @@ | |||||||
| 			  <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/> | 			  <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1199"> | 			    <widget class="GtkImage" id="image1237"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-quit</property> | 			      <property name="stock">gtk-quit</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -255,7 +255,7 @@ | |||||||
| 			  <accelerator key="F" modifiers="GDK_CONTROL_MASK" signal="activate"/> | 			  <accelerator key="F" modifiers="GDK_CONTROL_MASK" signal="activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1200"> | 			    <widget class="GtkImage" id="image1238"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-find</property> | 			      <property name="stock">gtk-find</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -276,7 +276,7 @@ | |||||||
| 			  <signal name="activate" handler="on_merge_activate"/> | 			  <signal name="activate" handler="on_merge_activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1201"> | 			    <widget class="GtkImage" id="image1239"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-convert</property> | 			      <property name="stock">gtk-convert</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -331,99 +331,6 @@ | |||||||
| 		  <property name="visible">True</property> | 		  <property name="visible">True</property> | ||||||
| 		  <property name="label" translatable="yes">_Go</property> | 		  <property name="label" translatable="yes">_Go</property> | ||||||
| 		  <property name="use_underline">True</property> | 		  <property name="use_underline">True</property> | ||||||
|  |  | ||||||
| 		  <child> |  | ||||||
| 		    <widget class="GtkMenu" id="go1_menu"> |  | ||||||
|  |  | ||||||
| 		      <child> |  | ||||||
| 			<widget class="GtkImageMenuItem" id="back"> |  | ||||||
| 			  <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> |  | ||||||
| 			  <signal name="activate" handler="on_back_clicked" last_modification_time="Sat, 16 Aug 2003 02:00:59 GMT"/> |  | ||||||
| 			  <accelerator key="Left" modifiers="GDK_MOD1_MASK" signal="activate"/> |  | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> |  | ||||||
| 			    <widget class="GtkImage" id="image1202"> |  | ||||||
| 			      <property name="visible">True</property> |  | ||||||
| 			      <property name="stock">gtk-go-back</property> |  | ||||||
| 			      <property name="icon_size">1</property> |  | ||||||
| 			      <property name="xalign">0.5</property> |  | ||||||
| 			      <property name="yalign">0.5</property> |  | ||||||
| 			      <property name="xpad">0</property> |  | ||||||
| 			      <property name="ypad">0</property> |  | ||||||
| 			    </widget> |  | ||||||
| 			  </child> |  | ||||||
| 			</widget> |  | ||||||
| 		      </child> |  | ||||||
|  |  | ||||||
| 		      <child> |  | ||||||
| 			<widget class="GtkImageMenuItem" id="forward"> |  | ||||||
| 			  <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> |  | ||||||
| 			  <signal name="activate" handler="on_fwd_clicked" last_modification_time="Sat, 16 Aug 2003 02:06:04 GMT"/> |  | ||||||
| 			  <accelerator key="Right" modifiers="GDK_MOD1_MASK" signal="activate"/> |  | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> |  | ||||||
| 			    <widget class="GtkImage" id="image1203"> |  | ||||||
| 			      <property name="visible">True</property> |  | ||||||
| 			      <property name="stock">gtk-go-forward</property> |  | ||||||
| 			      <property name="icon_size">1</property> |  | ||||||
| 			      <property name="xalign">0.5</property> |  | ||||||
| 			      <property name="yalign">0.5</property> |  | ||||||
| 			      <property name="xpad">0</property> |  | ||||||
| 			      <property name="ypad">0</property> |  | ||||||
| 			    </widget> |  | ||||||
| 			  </child> |  | ||||||
| 			</widget> |  | ||||||
| 		      </child> |  | ||||||
|  |  | ||||||
| 		      <child> |  | ||||||
| 			<widget class="GtkMenuItem" id="separator12"> |  | ||||||
| 			  <property name="visible">True</property> |  | ||||||
| 			</widget> |  | ||||||
| 		      </child> |  | ||||||
|  |  | ||||||
| 		      <child> |  | ||||||
| 			<widget class="GtkImageMenuItem" id="home1"> |  | ||||||
| 			  <property name="visible">True</property> |  | ||||||
| 			  <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_MOD1_MASK" signal="activate"/> |  | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> |  | ||||||
| 			    <widget class="GtkImage" id="image1204"> |  | ||||||
| 			      <property name="visible">True</property> |  | ||||||
| 			      <property name="stock">gtk-home</property> |  | ||||||
| 			      <property name="icon_size">1</property> |  | ||||||
| 			      <property name="xalign">0.5</property> |  | ||||||
| 			      <property name="yalign">0.5</property> |  | ||||||
| 			      <property name="xpad">0</property> |  | ||||||
| 			      <property name="ypad">0</property> |  | ||||||
| 			    </widget> |  | ||||||
| 			  </child> |  | ||||||
| 			</widget> |  | ||||||
| 		      </child> |  | ||||||
|  |  | ||||||
| 		      <child> |  | ||||||
| 			<widget class="GtkMenuItem" id="separator11"> |  | ||||||
| 			  <property name="visible">True</property> |  | ||||||
| 			</widget> |  | ||||||
| 		      </child> |  | ||||||
|  |  | ||||||
| 		      <child> |  | ||||||
| 			<widget class="GtkMenuItem" id="history1"> |  | ||||||
| 			  <property name="visible">True</property> |  | ||||||
| 			  <property name="label" translatable="yes">_History</property> |  | ||||||
| 			  <property name="use_underline">True</property> |  | ||||||
| 			</widget> |  | ||||||
| 		      </child> |  | ||||||
| 		    </widget> |  | ||||||
| 		  </child> |  | ||||||
| 		</widget> | 		</widget> | ||||||
| 	      </child> | 	      </child> | ||||||
|  |  | ||||||
| @@ -445,7 +352,7 @@ | |||||||
| 			  <accelerator key="D" modifiers="GDK_CONTROL_MASK" signal="activate"/> | 			  <accelerator key="D" modifiers="GDK_CONTROL_MASK" signal="activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1205"> | 			    <widget class="GtkImage" id="image1240"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-index</property> | 			      <property name="stock">gtk-index</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -467,7 +374,7 @@ | |||||||
| 			  <accelerator key="B" modifiers="GDK_CONTROL_MASK" signal="activate"/> | 			  <accelerator key="B" modifiers="GDK_CONTROL_MASK" signal="activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1206"> | 			    <widget class="GtkImage" id="image1241"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gnome-stock-book-open</property> | 			      <property name="stock">gnome-stock-book-open</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -531,7 +438,7 @@ | |||||||
| 			  <signal name="activate" handler="on_preferences1_activate"/> | 			  <signal name="activate" handler="on_preferences1_activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1207"> | 			    <widget class="GtkImage" id="image1242"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-preferences</property> | 			      <property name="stock">gtk-preferences</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -552,7 +459,7 @@ | |||||||
| 			  <signal name="activate" handler="on_default_person_activate" last_modification_time="Sat, 16 Aug 2003 01:58:26 GMT"/> | 			  <signal name="activate" handler="on_default_person_activate" last_modification_time="Sat, 16 Aug 2003 01:58:26 GMT"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1208"> | 			    <widget class="GtkImage" id="image1243"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-home</property> | 			      <property name="stock">gtk-home</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -587,7 +494,7 @@ | |||||||
| 			  <accelerator key="F1" modifiers="0" signal="activate"/> | 			  <accelerator key="F1" modifiers="0" signal="activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1209"> | 			    <widget class="GtkImage" id="image1244"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-help</property> | 			      <property name="stock">gtk-help</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -614,7 +521,7 @@ | |||||||
| 			  <signal name="activate" handler="on_gramps_home_page_activate"/> | 			  <signal name="activate" handler="on_gramps_home_page_activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1210"> | 			    <widget class="GtkImage" id="image1245"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gtk-jump-to</property> | 			      <property name="stock">gtk-jump-to</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -635,7 +542,7 @@ | |||||||
| 			  <signal name="activate" handler="on_gramps_mailing_lists_activate"/> | 			  <signal name="activate" handler="on_gramps_mailing_lists_activate"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1211"> | 			    <widget class="GtkImage" id="image1246"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gnome-stock-mail</property> | 			      <property name="stock">gnome-stock-mail</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
| @@ -689,7 +596,7 @@ | |||||||
| 			  <signal name="activate" handler="on_about_activate" last_modification_time="Tue, 01 Apr 2003 03:44:24 GMT"/> | 			  <signal name="activate" handler="on_about_activate" last_modification_time="Tue, 01 Apr 2003 03:44:24 GMT"/> | ||||||
|  |  | ||||||
| 			  <child internal-child="image"> | 			  <child internal-child="image"> | ||||||
| 			    <widget class="GtkImage" id="image1212"> | 			    <widget class="GtkImage" id="image1247"> | ||||||
| 			      <property name="visible">True</property> | 			      <property name="visible">True</property> | ||||||
| 			      <property name="stock">gnome-stock-about</property> | 			      <property name="stock">gnome-stock-about</property> | ||||||
| 			      <property name="icon_size">1</property> | 			      <property name="icon_size">1</property> | ||||||
|   | |||||||
| @@ -43,6 +43,7 @@ import gtk | |||||||
| import gnome | import gnome | ||||||
| import gnome.ui | import gnome.ui | ||||||
| import gtk.glade | import gtk.glade | ||||||
|  | import gtk.gdk | ||||||
|  |  | ||||||
| #------------------------------------------------------------------------- | #------------------------------------------------------------------------- | ||||||
| # | # | ||||||
| @@ -251,10 +252,7 @@ class Gramps: | |||||||
|         self.add_button = self.gtop.get_widget('addbtn') |         self.add_button = self.gtop.get_widget('addbtn') | ||||||
|         self.backbtn = self.gtop.get_widget('back_btn') |         self.backbtn = self.gtop.get_widget('back_btn') | ||||||
|         self.fwdbtn = self.gtop.get_widget('fwd_btn') |         self.fwdbtn = self.gtop.get_widget('fwd_btn') | ||||||
|         self.back = self.gtop.get_widget('back') |         self.gomenuitem = self.gtop.get_widget("go1") | ||||||
|         self.forward = self.gtop.get_widget('forward') |  | ||||||
|         self.hist_gomenuitem = self.gtop.get_widget("history1") |  | ||||||
|         self.histmenu = None |  | ||||||
|  |  | ||||||
|         self.gtop.signal_autoconnect({ |         self.gtop.signal_autoconnect({ | ||||||
|             "on_back_clicked" : self.back_clicked, |             "on_back_clicked" : self.back_clicked, | ||||||
| @@ -341,9 +339,36 @@ class Gramps: | |||||||
|  |  | ||||||
|     def redraw_histmenu(self): |     def redraw_histmenu(self): | ||||||
|         """Create the history submenu of the Go menu""" |         """Create the history submenu of the Go menu""" | ||||||
|         self.hist_gomenuitem.remove_submenu() |  | ||||||
|  |         # Start a brand new menu and create static items:  | ||||||
|  |         # back, forward, separator, home. | ||||||
|  |         gomenu = gtk.Menu() | ||||||
|  |  | ||||||
|  |         self.back = gtk.ImageMenuItem(gtk.STOCK_GO_BACK) | ||||||
|  |         self.back.connect("activate",self.back_clicked) | ||||||
|  |         self.back.show() | ||||||
|  |         gomenu.append(self.back) | ||||||
|  |  | ||||||
|  |         self.forward = gtk.ImageMenuItem(gtk.STOCK_GO_FORWARD) | ||||||
|  |         self.forward.connect("activate",self.fwd_clicked) | ||||||
|  |         self.forward.show() | ||||||
|  |         gomenu.append(self.forward) | ||||||
|  |  | ||||||
|  |         item = gtk.MenuItem() | ||||||
|  |         item.show() | ||||||
|  |         gomenu.append(item) | ||||||
|  |  | ||||||
|  |         item = gtk.ImageMenuItem(gtk.STOCK_HOME) | ||||||
|  |         item.connect("activate",self.on_home_clicked) | ||||||
|  |         item.show() | ||||||
|  |         gomenu.append(item) | ||||||
|  |  | ||||||
|         if len(self.history) > 0: |         if len(self.history) > 0: | ||||||
|             self.histmenu = gtk.Menu() |             # Draw separator | ||||||
|  |             item = gtk.MenuItem() | ||||||
|  |             item.show() | ||||||
|  |             gomenu.append(item) | ||||||
|  |  | ||||||
|             pids = self.mhistory[:] |             pids = self.mhistory[:] | ||||||
|             pids.reverse() |             pids.reverse() | ||||||
|             num = 0 |             num = 0 | ||||||
| @@ -358,12 +383,14 @@ class Gramps: | |||||||
|                         (num,person.getPrimaryName().getName(),pid)) |                         (num,person.getPrimaryName().getName(),pid)) | ||||||
|                     item.connect("activate",self.bookmark_callback,person) |                     item.connect("activate",self.bookmark_callback,person) | ||||||
|                     item.show() |                     item.show() | ||||||
|                     self.histmenu.append(item) |                     gomenu.append(item) | ||||||
|                     self.hist_gomenuitem.set_submenu(self.histmenu) |  | ||||||
|                     self.hist_gomenuitem.set_sensitive(1) |  | ||||||
|                     num = num + 1 |                     num = num + 1 | ||||||
|         else: |         else: | ||||||
|             self.hist_gomenuitem.set_sensitive(0) |             self.back.set_sensitive(0) | ||||||
|  |             self.forward.set_sensitive(0) | ||||||
|  |  | ||||||
|  |         self.gomenuitem.remove_submenu() | ||||||
|  |         self.gomenuitem.set_submenu(gomenu) | ||||||
|  |  | ||||||
|     def build_backhistmenu(self): |     def build_backhistmenu(self): | ||||||
|         """Builds and displays the menu with the back portion of the history""" |         """Builds and displays the menu with the back portion of the history""" | ||||||
| @@ -778,6 +805,7 @@ class Gramps: | |||||||
|         self.history = [] |         self.history = [] | ||||||
|         self.mhistory = [] |         self.mhistory = [] | ||||||
|         self.hindex = -1 |         self.hindex = -1 | ||||||
|  |         self.redraw_histmenu() | ||||||
|  |  | ||||||
|         self.people_view.clear_person_tabs() |         self.people_view.clear_person_tabs() | ||||||
|          |          | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user