/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 14:41:43 UTC
  • mto: (157.1.2 trunk) (170.1.3 trunk)
  • mto: This revision was merged to the branch mainline in revision 141.
  • Revision ID: szilveszter.farkas@gmail.com-20070201144143-guso1rfcy76ma7a4
Refactored the Push dialog. Add 'gpush' command.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
 
122
122
register_command(cmd_gcheckout)
123
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
 
124
148
class cmd_gdiff(Command):
125
149
    """Show differences in working tree in a GTK+ Window.
126
150