[Pkg-bazaar-commits] ./bzr-gtk/unstable r455: Add enable/disable options to contexts menu
Martin Albisetti
argentina at gmail.com
Fri Apr 10 07:50:26 UTC 2009
------------------------------------------------------------
revno: 455
committer: Martin Albisetti <argentina at gmail.com>
branch nick: gtk.nautilus
timestamp: Fri 2008-03-28 00:38:15 -0300
message:
Add enable/disable options to contexts menu
modified:
nautilus-bzr.py
-------------- next part --------------
=== modified file 'nautilus-bzr.py'
--- a/nautilus-bzr.py 2008-03-28 03:15:25 +0000
+++ b/nautilus-bzr.py 2008-03-28 03:38:15 +0000
@@ -224,10 +224,21 @@
def get_background_items(self, window, vfs_file):
if disabled_flag == 'False':
- return
+ item = nautilus.MenuItem('BzrNautilus::enable',
+ 'Enable Bazaar Plugin',
+ 'Enable Bazaar plugin for nautilus')
+ item.connect('activate', self.enable_integration, vfs_file)
+ return item,
items = []
file = vfs_file.get_uri()
+
+ item = nautilus.MenuItem('BzrNautilus::disable',
+ 'Disable Bazaar Plugin',
+ 'Disable Bazaar plugin for nautilus')
+ item.connect('activate', self.disable_integration, vfs_file)
+ items.append(item)
+
try:
tree, path = WorkingTree.open_containing(file)
except UnsupportedProtocol:
@@ -276,11 +287,11 @@
return items
def get_file_items(self, window, files):
+
if disabled_flag == 'False':
return
items = []
-
wtfiles = {}
for vfs_file in files:
# We can only cope with local files
@@ -411,8 +422,8 @@
file.add_emblem(emblem)
file.add_string_attribute('bzr_status', status)
- def enable_integration(self):
+ def enable_integration(self, menu, vfs_file=None):
config.set_user_option('nautilus_integration','True')
- def disable_integration(self):
+ def disable_integration(self, menu, vfs_file=None):
config.set_user_option('nautilus_integration','False')
More information about the Pkg-bazaar-commits
mailing list