[Pkg-bazaar-commits] ./bzr-gtk/unstable r157: Add gstatus command.

Jelmer Vernooij jelmer at samba.org
Fri Apr 10 07:45:39 UTC 2009


------------------------------------------------------------
revno: 157
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2007-02-03 17:04:46 +0100
message:
  Add gstatus command.
modified:
  __init__.py
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py	2007-02-03 14:19:20 +0000
+++ b/__init__.py	2007-02-03 16:04:46 +0000
@@ -360,6 +360,36 @@
 
 register_command(cmd_gcommit)
 
+class cmd_gstatus(Command):
+    """GTK+ status dialog
+
+    Graphical user interface for showing status 
+    information."""
+    
+    aliases = [ "gst" ]
+    takes_args = ['PATH?']
+    takes_options = []
+
+    def run(self, path='.'):
+        import os
+        pygtk = import_pygtk()
+
+        try:
+            import gtk
+        except RuntimeError, e:
+            if str(e) == "could not open display":
+                raise NoDisplayError
+
+        set_ui_factory()
+        from status import StatusDialog
+        (wt, wt_path) = WorkingTree.open_containing(path)
+        status = StatusDialog(wt, wt_path)
+        status.connect("destroy", gtk.main_quit)
+        status.run()
+
+register_command(cmd_gstatus)
+
+
 import gettext
 gettext.install('olive-gtk')
 



More information about the Pkg-bazaar-commits mailing list