/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: Szilveszter Farkas (Phanatic)
  • Date: 2007-02-01 16:42:48 UTC
  • mfrom: (126.1.22 bzr-gtk)
  • Revision ID: szilveszter.farkas@gmail.com-20070201164248-u11v85zglb00rohf
Merge from integration branch (refactoring, some new features)

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
 
97
97
        set_ui_factory()
98
98
        dialog = BranchDialog(os.path.abspath('.'))
99
 
        dialog.window.connect("destroy", lambda w: gtk.main_quit())
100
 
        dialog.display()
101
 
        
102
 
        gtk.main()
 
99
        dialog.run()
103
100
 
104
101
register_command(cmd_gbranch)
105
102
 
 
103
class cmd_gcheckout(Command):
 
104
    """ GTK+ checkout.
 
105
    
 
106
    """
 
107
    
 
108
    def run(self):
 
109
        pygtk = import_pygtk()
 
110
        try:
 
111
            import gtk
 
112
        except RuntimeError, e:
 
113
            if str(e) == "could not open display":
 
114
                raise NoDisplayError
 
115
 
 
116
        from bzrlib.plugins.gtk.olive.checkout import CheckoutDialog
 
117
 
 
118
        set_ui_factory()
 
119
        dialog = CheckoutDialog(os.path.abspath('.'))
 
120
        dialog.run()
 
121
 
 
122
register_command(cmd_gcheckout)
 
123
 
 
124
class cmd_gpush(Command):
 
125
    """ GTK+ push.
 
126
    
 
127
    """
 
128
    takes_args = [ "location?" ]
 
129
    
 
130
    def run(self, location="."):
 
131
        (branch, path) = Branch.open_containing(location)
 
132
        
 
133
        pygtk = import_pygtk()
 
134
        try:
 
135
            import gtk
 
136
        except RuntimeError, e:
 
137
            if str(e) == "could not open display":
 
138
                raise NoDisplayError
 
139
 
 
140
        from bzrlib.plugins.gtk.olive.push import PushDialog
 
141
 
 
142
        set_ui_factory()
 
143
        dialog = PushDialog(branch)
 
144
        dialog.run()
 
145
 
 
146
register_command(cmd_gpush)
 
147
 
106
148
class cmd_gdiff(Command):
107
149
    """Show differences in working tree in a GTK+ Window.
108
150