Code

gitview: Add some useful keybindings.
authorAneesh Kumar K.V <aneesh.kumar@gmail.com>
Sun, 4 Jun 2006 18:07:48 +0000 (23:37 +0530)
committerJunio C Hamano <junkio@cox.net>
Sun, 4 Jun 2006 20:29:36 +0000 (13:29 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
contrib/gitview/gitview
contrib/gitview/gitview.txt

index b836047cf34715909470049a24febdd8f966eaab..3b6bdceeeb20daf3242cf98d12f8f4d94cffc6e8 100755 (executable)
@@ -450,6 +450,9 @@ class GitView:
                self.accel_group = gtk.AccelGroup()
                self.window.add_accel_group(self.accel_group)
                self.accel_group.connect_group(0xffc2, 0, gtk.ACCEL_LOCKED, self.refresh);
+               self.accel_group.connect_group(0xffc1, 0, gtk.ACCEL_LOCKED, self.maximize);
+               self.accel_group.connect_group(0xffc8, 0, gtk.ACCEL_LOCKED, self.fullscreen);
+               self.accel_group.connect_group(0xffc9, 0, gtk.ACCEL_LOCKED, self.unfullscreen);
 
                self.window.add(self.construct())
 
@@ -461,6 +464,18 @@ class GitView:
                self.window.show()
                return True
 
+       def maximize(self, widget, event=None, *arguments, **keywords):
+               self.window.maximize()
+               return True
+
+       def fullscreen(self, widget, event=None, *arguments, **keywords):
+               self.window.fullscreen()
+               return True
+
+       def unfullscreen(self, widget, event=None, *arguments, **keywords):
+               self.window.unfullscreen()
+               return True
+
        def get_bt_sha1(self):
                """ Update the bt_sha1 dictionary with the
                respective sha1 details """
index e3bc4f46c2675ff94496eee1308a87920792647a..6924df286e0a85bd49ef69e29781658ba8a17339 100644 (file)
@@ -26,8 +26,14 @@ OPTIONS
        <args>
                All the valid option for git-rev-list(1)
        Key Bindings:
+       F4:
+               To maximize the window
        F5:
                To reread references.
+       F11:
+               Full screen
+       F12:
+               Leave full screen
 
 EXAMPLES
 ------