/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-27 18:35:08 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110827183508-ugqbp58na4mtt1no
Updated the pixbuf calls 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
 
13
from bzrlib.errors import (
 
14
    NotBranchError,
 
15
    NoWorkingTree,
 
16
    UnsupportedProtocol,
 
17
    )
15
18
from bzrlib.workingtree import WorkingTree
16
19
from bzrlib.config import GlobalConfig
17
20
 
18
21
from bzrlib.plugin import load_plugins
19
22
load_plugins()
20
23
 
21
 
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
    )
22
28
 
23
29
print "Bazaar nautilus module initialized"
24
30
 
25
31
 
26
32
class BzrExtension(nautilus.MenuProvider, nautilus.ColumnProvider, nautilus.InfoProvider):
 
33
 
27
34
    def __init__(self):
28
35
        pass
29
36
 
136
143
        
137
144
        dialog = BranchDialog(vfs_file.get_name())
138
145
        response = dialog.run()
139
 
        if response != gtk.RESPONSE_NONE:
 
146
        if response != Gtk.ResponseType.NONE:
140
147
            dialog.hide()
141
148
            dialog.destroy()
142
149
 
164
171
        from bzrlib.plugins.gtk.commit import CommitDialog
165
172
        dialog = CommitDialog(tree, path)
166
173
        response = dialog.run()
167
 
        if response != gtk.RESPONSE_NONE:
 
174
        if response != Gtk.ResponseType.NONE:
168
175
            dialog.hide()
169
176
            dialog.destroy()
170
177
 
183
190
 
184
191
        pp = start_viz_window(branch, [branch.last_revision()])
185
192
        pp.show()
186
 
        gtk.main()
 
193
        Gtk.main()
187
194
 
188
195
    def pull_cb(self, menu, vfs_file):
189
196
        # We can only cope with local files
201
208
        from bzrlib.plugins.gtk.pull import PullDialog
202
209
        dialog = PullDialog(tree, path)
203
210
        dialog.display()
204
 
        gtk.main()
 
211
        Gtk.main()
205
212
 
206
213
    def merge_cb(self, menu, vfs_file):
207
214
        # We can only cope with local files