/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 nautilus-bzr.py

  • Committer: David Planella
  • Date: 2011-03-06 08:24:07 UTC
  • mfrom: (718 trunk)
  • mto: This revision was merged to the branch mainline in revision 719.
  • Revision ID: david.planella@ubuntu.com-20110306082407-y9zwkjje5oue9egw
Added preliminary internationalization support. Merged from trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
#
7
7
# Published under the GNU GPL
8
8
 
9
 
from gi.repository import Gtk
 
9
import gtk
10
10
import nautilus
 
11
import bzrlib
11
12
from bzrlib.branch import Branch
12
13
from bzrlib.bzrdir import BzrDir
13
 
from bzrlib.errors import (
14
 
    NotBranchError,
15
 
    NoWorkingTree,
16
 
    UnsupportedProtocol,
17
 
    )
 
14
from bzrlib.errors import NotBranchError, NoWorkingTree, UnsupportedProtocol
18
15
from bzrlib.workingtree import WorkingTree
19
16
from bzrlib.config import GlobalConfig
20
17
 
21
18
from bzrlib.plugin import load_plugins
22
19
load_plugins()
23
20
 
24
 
from bzrlib.plugins.gtk.commands import (
25
 
    cmd_gannotate,
26
 
    start_viz_window,
27
 
    )
 
21
from bzrlib.plugins.gtk.commands import cmd_gannotate, start_viz_window
28
22
 
29
23
print "Bazaar nautilus module initialized"
30
24
 
31
25
 
32
26
class BzrExtension(nautilus.MenuProvider, nautilus.ColumnProvider, nautilus.InfoProvider):
33
 
 
34
27
    def __init__(self):
35
28
        pass
36
29
 
143
136
        
144
137
        dialog = BranchDialog(vfs_file.get_name())
145
138
        response = dialog.run()
146
 
        if response != Gtk.ResponseType.NONE:
 
139
        if response != gtk.RESPONSE_NONE:
147
140
            dialog.hide()
148
141
            dialog.destroy()
149
142
 
171
164
        from bzrlib.plugins.gtk.commit import CommitDialog
172
165
        dialog = CommitDialog(tree, path)
173
166
        response = dialog.run()
174
 
        if response != Gtk.ResponseType.NONE:
 
167
        if response != gtk.RESPONSE_NONE:
175
168
            dialog.hide()
176
169
            dialog.destroy()
177
170
 
190
183
 
191
184
        pp = start_viz_window(branch, [branch.last_revision()])
192
185
        pp.show()
193
 
        Gtk.main()
 
186
        gtk.main()
194
187
 
195
188
    def pull_cb(self, menu, vfs_file):
196
189
        # We can only cope with local files
208
201
        from bzrlib.plugins.gtk.pull import PullDialog
209
202
        dialog = PullDialog(tree, path)
210
203
        dialog.display()
211
 
        Gtk.main()
 
204
        gtk.main()
212
205
 
213
206
    def merge_cb(self, menu, vfs_file):
214
207
        # We can only cope with local files