gitview: Add some useful keybindings.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Aneesh Kumar K.V 2006-06-04 23:37:48 +05:30 committed by Junio C Hamano
parent 16a4c6ee0d
commit 4e2e5647f2
2 changed files with 21 additions and 0 deletions

View file

@ -450,6 +450,9 @@ class GitView:
self.accel_group = gtk.AccelGroup() self.accel_group = gtk.AccelGroup()
self.window.add_accel_group(self.accel_group) 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(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()) self.window.add(self.construct())
@ -461,6 +464,18 @@ class GitView:
self.window.show() self.window.show()
return True 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): def get_bt_sha1(self):
""" Update the bt_sha1 dictionary with the """ Update the bt_sha1 dictionary with the
respective sha1 details """ respective sha1 details """

View file

@ -26,8 +26,14 @@ OPTIONS
<args> <args>
All the valid option for git-rev-list(1) All the valid option for git-rev-list(1)
Key Bindings: Key Bindings:
F4:
To maximize the window
F5: F5:
To reread references. To reread references.
F11:
Full screen
F12:
Leave full screen
EXAMPLES EXAMPLES
------ ------