@matheusbsbs / matheus-bagliano / commits / 034016391c
Fork 0

gitview: Add key binding for F5.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Aneesh Kumar K.V committed May 27, 2006 at 15:54 UTC 034016391c475e98c38a9b715cd670b8b2d0c619
2 files changed +17 -6
contrib/gitview/gitview
+13 -4
@@ -425,7 +425,7 @@ class DiffWindow:
425 class GitView:
426 """ This is the main class
427 """
428 - version = "0.7"
428 + version = "0.8"
429
430 def __init__(self, with_diff=0):
431 self.with_diff = with_diff
@@ -449,8 +449,17 @@ class GitView:
449
450 self.accel_group = gtk.AccelGroup()
451 self.window.add_accel_group(self.accel_group)
452 + self.accel_group.connect_group(0xffc2, 0, gtk.ACCEL_LOCKED, self.refresh);
453
453 - self.construct()
454 + self.window.add(self.construct())
455 +
456 + def refresh(self, widget, event=None, *arguments, **keywords):
457 + self.get_encoding()
458 + self.get_bt_sha1()
459 + Commit.children_sha1 = {}
460 + self.set_branch(sys.argv[without_diff:])
461 + self.window.show()
462 + return True
463
464 def get_bt_sha1(self):
465 """ Update the bt_sha1 dictionary with the
@@ -500,9 +509,9 @@ class GitView:
509 menu_bar.show()
510 vbox.pack_start(menu_bar, expand=False, fill=True)
511 vbox.pack_start(paned, expand=True, fill=True)
503 - self.window.add(vbox)
512 paned.show()
513 vbox.show()
514 + return vbox
515
516
517 def construct_top(self):
@@ -987,8 +996,8 @@ class GitView:
996 window.set_diff(commit_sha1, parent_sha1, encoding)
997 self.treeview.grab_focus()
998
999 +without_diff = 0
1000 if __name__ == "__main__":
991 - without_diff = 0
1001
1002 if (len(sys.argv) > 1 ):
1003 if (sys.argv[1] == "--without-diff"):
contrib/gitview/gitview.txt
+4 -2
@@ -25,6 +25,9 @@ OPTIONS
25
26 <args>
27 All the valid option for git-rev-list(1)
28 + Key Bindings:
29 + F5:
30 + To reread references.
31
32 EXAMPLES
33 ------
@@ -33,6 +36,5 @@ EXAMPLES
36 or drivers/scsi subdirectories
37
38 gitview --since=2.weeks.ago
36 - Show the changes during the last two weeks
39 + Show the changes during the last two weeks
40
38 -