[gedit] Update for stack api change



commit f405af2582f4fe7c9554043a7a1082c10b1e5073
Author: Paolo Borelli <pborelli gnome org>
Date:   Thu Mar 13 18:30:59 2014 +0100

    Update for stack api change

 plugins/externaltools/tools/outputpanel.py |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/plugins/externaltools/tools/outputpanel.py b/plugins/externaltools/tools/outputpanel.py
index 03ad21d..38fba6e 100644
--- a/plugins/externaltools/tools/outputpanel.py
+++ b/plugins/externaltools/tools/outputpanel.py
@@ -27,6 +27,7 @@ from . import linkparsing
 from . import filelookup
 from gi.repository import GLib, Gio, Gdk, Gtk, Pango, Gedit
 
+
 class UniqueById:
     __shared_state = WeakKeyDictionary()
 
@@ -41,13 +42,14 @@ class UniqueById:
     def states(self):
         return self.__class__.__shared_state
 
+
 class OutputPanel(UniqueById):
     def __init__(self, datadir, window):
         if UniqueById.__init__(self, window):
             return
 
         callbacks = {
-            'on_stop_clicked' : self.on_stop_clicked,
+            'on_stop_clicked': self.on_stop_clicked,
             'on_view_visibility_notify_event': self.on_view_visibility_notify_event,
             'on_view_motion_notify_event': self.on_view_motion_notify_event
         }
@@ -134,7 +136,7 @@ class OutputPanel(UniqueById):
         panel = self.window.get_bottom_panel()
         return panel.props.visible and panel.props.visible_child == self.panel
 
-    def write(self, text, tag = None):
+    def write(self, text, tag=None):
         buffer = self['view'].get_buffer()
 
         end_iter = buffer.get_end_iter()
@@ -148,11 +150,10 @@ class OutputPanel(UniqueById):
         # find all links and apply the appropriate tag for them
         links = self.link_parser.parse(text)
         for lnk in links:
-            
             insert_iter = buffer.get_iter_at_mark(insert)
             lnk.start = insert_iter.get_offset() + lnk.start
             lnk.end = insert_iter.get_offset() + lnk.end
-            
+
             start_iter = buffer.get_iter_at_offset(lnk.start)
             end_iter = buffer.get_iter_at_offset(lnk.end)
 
@@ -172,10 +173,10 @@ class OutputPanel(UniqueById):
 
     def show(self):
         panel = self.window.get_bottom_panel()
+        panel.visible_child = self.panel
         panel.show()
-        panel.activate_item(self.panel)
 
-    def update_cursor_style(self, view, x, y):  
+    def update_cursor_style(self, view, x, y):
         if self.get_link_at_location(view, x, y) is not None:
             cursor = self.link_cursor
         else:
@@ -207,8 +208,7 @@ class OutputPanel(UniqueById):
         """
 
         # get the offset within the buffer from the x,y coordinates
-        buff_x, buff_y = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT, 
-                                                      x, y)
+        buff_x, buff_y = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT, x, y)
         iter_at_xy = view.get_iter_at_location(buff_x, buff_y)
         offset = iter_at_xy.get_offset()
 


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