gitview: Move the console error messages to message dialog
Signed-off-by: Junio C Hamano <junkio@cox.net>
Aneesh Kumar K.V committed
May 27, 2006 at 15:55 UTC
756944350d675bd3c08130df337b776f189ed752
1 file changed
+7
-2
contrib/gitview/gitview
+7
-2
@@ -983,10 +983,15 @@ class GitView:
983
try:
984
self.treeview.set_cursor(self.index[revid])
985
except KeyError:
986
- print "Revision %s not present in the list" % revid
986
+ dialog = gtk.MessageDialog(parent=None, flags=0,
987
+ type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_CLOSE,
988
+ message_format=None)
989
+ dialog.set_markup("Revision <b>%s</b> not present in the list" % revid)
990
# revid == 0 is the parent of the first commit
991
if (revid != 0 ):
989
- print "Try running gitview without any options"
992
+ dialog.format_secondary_text("Try running gitview without any options")
993
+ dialog.run()
994
+ dialog.destroy()
995
996
self.treeview.grab_focus()
997