/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: Curtis Hovey
  • Date: 2011-08-12 20:25:28 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110812202528-4xf4a2t23urx50d2
Updated gst to gtk3.

Show diffs side-by-side

added added

removed removed

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