/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 commands.py

  • Committer: Curtis Hovey
  • Date: 2011-07-31 15:52:43 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110731155243-ln8istmxbryhb4pz
Mechanical changes made by pygi.convert.sh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
from bzrlib.option import Option
33
33
 
34
34
from bzrlib.plugins.gtk import (
 
35
    import_pygtk,
35
36
    set_ui_factory,
36
37
    )
37
38
from bzrlib.plugins.gtk.i18n import _i18n
45
46
 
46
47
 
47
48
def open_display():
 
49
    pygtk = import_pygtk()
48
50
    try:
49
51
        from gi.repository import Gtk
50
52
    except RuntimeError, e:
51
53
        if str(e) == "could not open display":
52
54
            raise NoDisplayError
53
55
    set_ui_factory()
54
 
    return Gtk
 
56
    return gtk
55
57
 
56
58
 
57
59
 
234
236
    aliases = ["gblame", "gpraise"]
235
237
    
236
238
    def run(self, filename, all=False, plain=False, line='1', revision=None):
237
 
        Gtk = open_display()
 
239
        gtk = open_display()
238
240
 
239
241
        try:
240
242
            line = int(line)
329
331
    takes_options = ['revision']
330
332
 
331
333
    def run(self, path='.', revision=None):
332
 
        Gtk = open_display()
 
334
        gtk = open_display()
333
335
        from bzrlib.plugins.gtk.status import StatusWindow
334
336
        (wt, wt_path) = workingtree.WorkingTree.open_containing(path)
335
337
 
355
357
    """
356
358
    def run(self):
357
359
        (br, path) = branch.Branch.open_containing(".")
358
 
        Gtk = open_display()
 
360
        gtk = open_display()
359
361
        from bzrlib.plugins.gtk.mergedirective import SendMergeDirectiveDialog
360
362
        from StringIO import StringIO
361
363
        dialog = SendMergeDirectiveDialog(br)
422
424
    """
423
425
    takes_args = ["other_branch?"]
424
426
    def run(self, other_branch=None):
 
427
        pygtk = import_pygtk()
425
428
        try:
426
429
            from gi.repository import Gtk
427
430
        except RuntimeError, e:
473
476
    def run(self):
474
477
        br = branch.Branch.open_containing('.')[0]
475
478
        
476
 
        Gtk = open_display()
 
479
        gtk = open_display()
477
480
        from tags import TagsWindow
478
481
        window = TagsWindow(br)
479
482
        window.show()