[Pkg-bazaar-commits] ./bzr-gtk/unstable r509: Merge addition of refresh button to olive.

Jelmer Vernooij jelmer at samba.org
Fri Apr 10 07:44:41 UTC 2009


------------------------------------------------------------
revno: 509
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2008-06-28 17:44:20 +0200
message:
  Merge addition of refresh button to olive.
modified:
  NEWS
  viz/branchwin.py
    ------------------------------------------------------------
    revno: 499.1.1
    committer: Russ Brown <pickscrape at gmail.com>
    branch nick: bzr-gtk
    timestamp: Fri 2008-06-06 12:46:26 -0500
    message:
      Added Refresh menu option with keyboard shortcut to viz
    modified:
      viz/branchwin.py
    ------------------------------------------------------------
    revno: 499.1.2
    committer: Russ Brown <pickscrape at gmail.com>
    branch nick: bzr-gtk
    timestamp: Fri 2008-06-06 13:04:45 -0500
    message:
      Added NEWS item for Refresh menu option and shortcut.
    modified:
      NEWS
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2008-05-23 13:14:58 +0000
+++ b/NEWS	2008-06-06 18:04:45 +0000
@@ -1,5 +1,9 @@
 0.95.0	UNRELEASED
 
+ UI
+
+  * Added Refresh menu option with F5 keyboard shortcut (Russ Brown)
+
  BUG FIXES
 
   * Replace _() calls by _i18n() calls. (Vincent Ladeuil, #187283)

=== modified file 'viz/branchwin.py'
--- a/viz/branchwin.py	2008-04-25 20:27:21 +0000
+++ b/viz/branchwin.py	2008-06-06 17:46:26 +0000
@@ -66,6 +66,7 @@
 
         gtk.accel_map_add_entry("<viz>/Go/Next Revision", gtk.keysyms.Up, gtk.gdk.MOD1_MASK)
         gtk.accel_map_add_entry("<viz>/Go/Previous Revision", gtk.keysyms.Down, gtk.gdk.MOD1_MASK)
+        gtk.accel_map_add_entry("<viz>/View/Refresh", gtk.keysyms.F5, 0)
 
         self.accel_group = gtk.AccelGroup()
         self.add_accel_group(self.accel_group)
@@ -84,6 +85,12 @@
         self.next_rev_action.connect("activate", self._fwd_clicked_cb)
         self.next_rev_action.connect_accelerator()
 
+        self.refresh_action = gtk.Action("refresh", "_Refresh", "Refresh view", gtk.STOCK_REFRESH)
+        self.refresh_action.set_accel_path("<viz>/View/Refresh")
+        self.refresh_action.set_accel_group(self.accel_group)
+        self.refresh_action.connect("activate", self._refresh_clicked)
+        self.refresh_action.connect_accelerator()
+
         self.construct()
 
     def set_revision(self, revid):
@@ -144,6 +151,12 @@
         view_menuitem = gtk.MenuItem("_View")
         view_menuitem.set_submenu(view_menu)
 
+        view_menu_refresh = self.refresh_action.create_menu_item()
+        view_menu_refresh.connect('activate', self._refresh_clicked)
+
+        view_menu.add(view_menu_refresh)
+        view_menu.add(gtk.SeparatorMenuItem())
+
         view_menu_toolbar = gtk.CheckMenuItem("Show Toolbar")
         view_menu_toolbar.set_active(True)
         view_menu_toolbar.connect('toggled', self._toolbar_visibility_changed)



More information about the Pkg-bazaar-commits mailing list