/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Vincent Ladeuil
  • Date: 2008-10-23 08:14:59 UTC
  • mto: This revision was merged to the branch mainline in revision 618.
  • Revision ID: v.ladeuil+lp@free.fr-20081023081459-3rgjsohomf8rbe44
Fix bug #131589 by using a gtk.Window instead of a gtk.Dialog.

* status.py:
(StatusWindow): Renamed from StatusDialog, we're a window now.
(StatusWindow.__init__, StatusWindow._create): Adjusted to Window
inheritance.

* __init__.py:
(cmd_gstatus.run): Use a Window instead of a dialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
402
402
 
403
403
    Graphical user interface for showing status 
404
404
    information."""
405
 
    
 
405
 
406
406
    aliases = [ "gst" ]
407
407
    takes_args = ['PATH?']
408
408
    takes_options = ['revision']
410
410
    def run(self, path='.', revision=None):
411
411
        import os
412
412
        gtk = open_display()
413
 
        from status import StatusDialog
 
413
        from bzrlib.plugins.gtk.status import StatusWindow
414
414
        (wt, wt_path) = workingtree.WorkingTree.open_containing(path)
415
 
        
 
415
 
416
416
        if revision is not None:
417
417
            try:
418
418
                revision_id = revision[0].as_revision_id(wt.branch)
419
419
            except:
420
420
                from bzrlib.errors import BzrError
421
 
                raise BzrError('Revision %r doesn\'t exist' % revision[0].user_spec )
 
421
                raise BzrError('Revision %r doesn\'t exist'
 
422
                               % revision[0].user_spec )
422
423
        else:
423
424
            revision_id = None
424
425
 
425
 
        status = StatusDialog(wt, wt_path, revision_id)
 
426
        status = StatusWindow(wt, wt_path, revision_id)
426
427
        status.connect("destroy", gtk.main_quit)
427
 
        status.run()
 
428
        status.show()
 
429
        gtk.main()
428
430
 
429
431
 
430
432
class cmd_gsend(GTKCommand):