[gedit-plugins] git: wrap the idle call into its own method



commit 4145b9aeb7d2d7b9676740953b961cde2458b0c4
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Tue Dec 24 13:32:23 2013 +0100

    git: wrap the idle call into its own method

 plugins/git/git/windowactivatable.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/git/git/windowactivatable.py b/plugins/git/git/windowactivatable.py
index 3038e10..289de2b 100644
--- a/plugins/git/git/windowactivatable.py
+++ b/plugins/git/git/windowactivatable.py
@@ -125,12 +125,16 @@ class GitWindowActivatable(GObject.Object, Gedit.WindowActivatable):
 
         self.update_location(location)
 
+    def update_location_idle(self, location):
+        self.update_location(location)
+        return False
+
     def focus_in_event(self, window, event):
         for view_activatable in self.view_activatables:
             view_activatable.update()
 
         for uri in self.files:
-            GLib.idle_add(self.update_location, Gio.File.new_for_uri(uri))
+            GLib.idle_add(self.update_location_idle, Gio.File.new_for_uri(uri))
 
     def root_changed(self, bus, msg, data=None):
         self.clear_monitors()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]