aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkristoffer.lunden <kristoffer.lunden@dd23f896-6e2b-0410-bc3e-d184d5eb269a>2011-05-02 09:27:18 (GMT)
committerkristoffer.lunden <kristoffer.lunden@dd23f896-6e2b-0410-bc3e-d184d5eb269a>2011-05-02 09:27:18 (GMT)
commit76b6bf80cbdc028bb48220f22ea486b099a317cb (patch)
tree4ded56cb003492cfeaafdef6288bf5f2d1c06ebc
parent2911cc9f04b21f90c99ed91bdcc4be7f5f55ebca (diff)
downloadgedit-autotab-76b6bf80cbdc028bb48220f22ea486b099a317cb.zip
gedit-autotab-76b6bf80cbdc028bb48220f22ea486b099a317cb.tar.gz
gedit-autotab-76b6bf80cbdc028bb48220f22ea486b099a317cb.tar.bz2
Make plugin work on Mac OS X, by falling back to statusbar.remove()HEADmaster
git-svn-id: http://gedit-autotab.googlecode.com/svn/trunk@33 dd23f896-6e2b-0410-bc3e-d184d5eb269a
-rw-r--r--CHANGELOG1
-rw-r--r--autotab.py12
2 files changed, 11 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index e0b440a..97a2912 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,6 @@
Auto Tab (0.8) TBD
* Handle files with mixed tabs and spaces better, patch by Pierre Ossman
+ * Make plugin work on Mac OS X, by falling back to statusbar.remove()
Auto Tab (0.7) 2010-07-05
* Fix deprecated method calls (issue #8)
diff --git a/autotab.py b/autotab.py
index dcb88a6..f96cfa9 100644
--- a/autotab.py
+++ b/autotab.py
@@ -103,7 +103,11 @@ class AutoTab(gedit.Plugin):
self.disconnect_handlers(view)
if self.message_id:
- self.statusbar.remove_message(self.context_id, self.message_id)
+ if hasattr(self.statusbar, 'remove_message'):
+ self.statusbar.remove_message(self.context_id, self.message_id)
+ else:
+ self.statusbar.remove(self.context_id, self.message_id)
+
def connect_handlers(self, view):
doc = view.get_buffer()
@@ -239,7 +243,11 @@ class AutoTab(gedit.Plugin):
else:
message = "Tabs"
if self.message_id:
- self.statusbar.remove_message(self.context_id, self.message_id)
+ if hasattr(self.statusbar, 'remove_message'):
+ self.statusbar.remove_message(self.context_id, self.message_id)
+ else:
+ self.statusbar.remove(self.context_id, self.message_id)
+
self.message_id = self.statusbar.push(self.context_id, "Indentation: %s" % message)
# Make sure correct tabs are displayed