diff --git a/ChangeLog b/ChangeLog index 542d3ff5d..3f9f74299 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2003-10-08 Alex Roitman * src/po/sv.po: Typo in keyword. Fixes 820054. + * src/gramps_main.py (init_interface, redraw_histmenu): Add + accelerators to the navigation menus. 2003-10-07 Don Allingham * src/plugins/Verify.py: handle different calendars properly diff --git a/src/gramps_main.py b/src/gramps_main.py index 1fe9b106d..7a5998bf0 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -335,6 +335,11 @@ class Gramps: else: self.views.set_current_page(FAMILY_VIEW2) + self.accel_group = gtk.AccelGroup() + self.topWindow.add_accel_group(self.accel_group) + self.back = gtk.ImageMenuItem(gtk.STOCK_GO_BACK) + self.forward = gtk.ImageMenuItem(gtk.STOCK_GO_BACK) + self.topWindow.show() def redraw_histmenu(self): @@ -344,13 +349,22 @@ class Gramps: # back, forward, separator, home. gomenu = gtk.Menu() + self.back.destroy() + self.forward.destroy() + self.back = gtk.ImageMenuItem(gtk.STOCK_GO_BACK) self.back.connect("activate",self.back_clicked) + self.back.add_accelerator("activate", self.accel_group, + gtk.gdk.keyval_from_name("Left"), + gtk.gdk.MOD1_MASK, gtk.ACCEL_VISIBLE) self.back.show() gomenu.append(self.back) self.forward = gtk.ImageMenuItem(gtk.STOCK_GO_FORWARD) self.forward.connect("activate",self.fwd_clicked) + self.forward.add_accelerator("activate", self.accel_group, + gtk.gdk.keyval_from_name("Right"), + gtk.gdk.MOD1_MASK, gtk.ACCEL_VISIBLE) self.forward.show() gomenu.append(self.forward) @@ -360,6 +374,9 @@ class Gramps: item = gtk.ImageMenuItem(gtk.STOCK_HOME) item.connect("activate",self.on_home_clicked) + item.add_accelerator("activate", self.accel_group, + gtk.gdk.keyval_from_name("Home"), + gtk.gdk.MOD1_MASK, gtk.ACCEL_VISIBLE) item.show() gomenu.append(item)