Skip to content

Commit 4e2e564

Browse files
kvaneeshJunio C Hamano
authored andcommitted
gitview: Add some useful keybindings.
Signed-off-by: Junio C Hamano <[email protected]>
1 parent 16a4c6e commit 4e2e564

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

contrib/gitview/gitview

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,9 @@ class GitView:
450450
self.accel_group = gtk.AccelGroup()
451451
self.window.add_accel_group(self.accel_group)
452452
self.accel_group.connect_group(0xffc2, 0, gtk.ACCEL_LOCKED, self.refresh);
453+
self.accel_group.connect_group(0xffc1, 0, gtk.ACCEL_LOCKED, self.maximize);
454+
self.accel_group.connect_group(0xffc8, 0, gtk.ACCEL_LOCKED, self.fullscreen);
455+
self.accel_group.connect_group(0xffc9, 0, gtk.ACCEL_LOCKED, self.unfullscreen);
453456

454457
self.window.add(self.construct())
455458

@@ -461,6 +464,18 @@ class GitView:
461464
self.window.show()
462465
return True
463466

467+
def maximize(self, widget, event=None, *arguments, **keywords):
468+
self.window.maximize()
469+
return True
470+
471+
def fullscreen(self, widget, event=None, *arguments, **keywords):
472+
self.window.fullscreen()
473+
return True
474+
475+
def unfullscreen(self, widget, event=None, *arguments, **keywords):
476+
self.window.unfullscreen()
477+
return True
478+
464479
def get_bt_sha1(self):
465480
""" Update the bt_sha1 dictionary with the
466481
respective sha1 details """

contrib/gitview/gitview.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@ OPTIONS
2626
<args>
2727
All the valid option for git-rev-list(1)
2828
Key Bindings:
29+
F4:
30+
To maximize the window
2931
F5:
3032
To reread references.
33+
F11:
34+
Full screen
35+
F12:
36+
Leave full screen
3137

3238
EXAMPLES
3339
------

0 commit comments

Comments
 (0)