* src/gramps.glade: New tool icon
* src/gramps_main.py: handle back/fwd buttons, disabling when not appropriate * src/people48.png: new image * src/family48.png: new image * src/tools.png svn: r2012
This commit is contained in:
parent
e6c17a301b
commit
dd731ec0e7
Binary file not shown.
@ -804,7 +804,7 @@
|
|||||||
<property name="tooltip" translatable="yes">Run a tool</property>
|
<property name="tooltip" translatable="yes">Run a tool</property>
|
||||||
<property name="label" translatable="yes">Tools</property>
|
<property name="label" translatable="yes">Tools</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="stock_pixmap">gtk-execute</property>
|
<property name="icon">tools.png</property>
|
||||||
<signal name="clicked" handler="on_tools_clicked"/>
|
<signal name="clicked" handler="on_tools_clicked"/>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
@ -374,6 +374,8 @@ class Gramps:
|
|||||||
self.addbtn = self.gtop.get_widget('addbtn')
|
self.addbtn = self.gtop.get_widget('addbtn')
|
||||||
self.removebtn = self.gtop.get_widget('removebtn')
|
self.removebtn = self.gtop.get_widget('removebtn')
|
||||||
self.editbtn = self.gtop.get_widget('editbtn')
|
self.editbtn = self.gtop.get_widget('editbtn')
|
||||||
|
self.backbtn = self.gtop.get_widget('back_btn')
|
||||||
|
self.fwdbtn = self.gtop.get_widget('fwd_btn')
|
||||||
|
|
||||||
self.gtop.signal_autoconnect({
|
self.gtop.signal_autoconnect({
|
||||||
"on_back_clicked" : self.back_clicked,
|
"on_back_clicked" : self.back_clicked,
|
||||||
@ -464,9 +466,18 @@ class Gramps:
|
|||||||
self.hindex -= 1
|
self.hindex -= 1
|
||||||
self.active_person = self.db.getPerson(self.history[self.hindex])
|
self.active_person = self.db.getPerson(self.history[self.hindex])
|
||||||
self.modify_statusbar()
|
self.modify_statusbar()
|
||||||
self.goto_active_person()
|
self.update_display(0)
|
||||||
|
self.set_buttons(1)
|
||||||
|
if self.hindex == 0:
|
||||||
|
self.backbtn.set_sensitive(0)
|
||||||
|
else:
|
||||||
|
self.backbtn.set_sensitive(1)
|
||||||
|
self.fwdbtn.set_sensitive(1)
|
||||||
except:
|
except:
|
||||||
self.set_buttons(0)
|
self.set_buttons(0)
|
||||||
|
else:
|
||||||
|
self.backbtn.set_sensitive(0)
|
||||||
|
self.fwdbtn.set_sensitive(1)
|
||||||
|
|
||||||
def fwd_clicked(self,obj):
|
def fwd_clicked(self,obj):
|
||||||
if self.hindex+1 < len(self.history):
|
if self.hindex+1 < len(self.history):
|
||||||
@ -474,10 +485,19 @@ class Gramps:
|
|||||||
self.hindex += 1
|
self.hindex += 1
|
||||||
self.active_person = self.db.getPerson(self.history[self.hindex])
|
self.active_person = self.db.getPerson(self.history[self.hindex])
|
||||||
self.modify_statusbar()
|
self.modify_statusbar()
|
||||||
self.goto_active_person()
|
self.update_display(0)
|
||||||
self.set_buttons(1)
|
self.set_buttons(1)
|
||||||
|
if self.hindex == len(self.history)-1:
|
||||||
|
self.fwdbtn.set_sensitive(0)
|
||||||
|
else:
|
||||||
|
self.fwdbtn.set_sensitive(1)
|
||||||
|
self.backbtn.set_sensitive(1)
|
||||||
except:
|
except:
|
||||||
|
self.backbtn.set_sensitive(1)
|
||||||
self.set_buttons(0)
|
self.set_buttons(0)
|
||||||
|
else:
|
||||||
|
self.fwdbtn.set_sensitive(0)
|
||||||
|
self.backbtn.set_sensitive(1)
|
||||||
|
|
||||||
def change_alpha_page(self,obj,junk,page):
|
def change_alpha_page(self,obj,junk,page):
|
||||||
"""Change the page. Be careful not to take action while the pages
|
"""Change the page. Be careful not to take action while the pages
|
||||||
@ -877,7 +897,6 @@ class Gramps:
|
|||||||
def update_display(self,changed):
|
def update_display(self,changed):
|
||||||
"""Incremental display update, update only the displayed page"""
|
"""Incremental display update, update only the displayed page"""
|
||||||
page = self.views.get_current_page()
|
page = self.views.get_current_page()
|
||||||
|
|
||||||
if page == 0:
|
if page == 0:
|
||||||
if changed:
|
if changed:
|
||||||
self.apply_filter()
|
self.apply_filter()
|
||||||
@ -1467,8 +1486,12 @@ class Gramps:
|
|||||||
if person:
|
if person:
|
||||||
if self.hindex+1 < len(self.history):
|
if self.hindex+1 < len(self.history):
|
||||||
self.history = self.history[0:self.hindex+1]
|
self.history = self.history[0:self.hindex+1]
|
||||||
|
self.fwdbtn.set_sensitive(1)
|
||||||
|
else:
|
||||||
|
self.fwdbtn.set_sensitive(0)
|
||||||
self.history.append(person.getId())
|
self.history.append(person.getId())
|
||||||
self.hindex += 1
|
self.hindex += 1
|
||||||
|
self.backbtn.set_sensitive(1)
|
||||||
|
|
||||||
if person:
|
if person:
|
||||||
self.set_buttons(1)
|
self.set_buttons(1)
|
||||||
|
Binary file not shown.
BIN
gramps2/src/tools.png
Normal file
BIN
gramps2/src/tools.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue
Block a user