git/list[1] front-page[2] threads[3] people[4] search[5] about
 

gitview: Move the console error messages to message dialog

From
Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Date
May 27, 2006, 10:25 UTC
Message-ID
<4478291C.7000507@gmail.com>
gitview: Move the console error messages to message dialog

This changes display the error/warning info using message dialog rather than printing them using print

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
---
 contrib/gitview/gitview |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/contrib/gitview/gitview b/contrib/gitview/gitview
index c708534..b836047 100755
--- a/contrib/gitview/gitview
+++ b/contrib/gitview/gitview
@@ -983,10 +983,15 @@ class GitView:
 		try:
 			self.treeview.set_cursor(self.index[revid])
 		except KeyError:
-			print "Revision %s not present in the list" % revid
+			dialog = gtk.MessageDialog(parent=None, flags=0,
+					type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_CLOSE,
+					message_format=None)
+			dialog.set_markup("Revision <b>%s</b> not present in the list" % revid)
 			# revid == 0 is the parent of the first commit
 			if (revid != 0 ):
-				print "Try running gitview without any options"
+				dialog.format_secondary_text("Try running gitview without any options")
+			dialog.run()
+			dialog.destroy()
 
 		self.treeview.grab_focus()
 
-- 
1.3.3.g4d548-dirty
Message 1 of 1 in “gitview: Move the console error messages to message dialog”
  1. Aneesh Kumar K.VMay 27, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.