[eog-plugins] [pythonconsole] Fix PyGobject deprecation warnings



commit ad10de7c749959107e80aa4357a2212fbc993fa5
Author: Felix Riemann <friemann gnome org>
Date:   Sat Mar 8 15:50:58 2014 +0100

    [pythonconsole] Fix PyGobject deprecation warnings

 plugins/pythonconsole/__init__.py |    2 +-
 plugins/pythonconsole/console.py  |   16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/plugins/pythonconsole/__init__.py b/plugins/pythonconsole/__init__.py
index 16855c4..cef90fa 100644
--- a/plugins/pythonconsole/__init__.py
+++ b/plugins/pythonconsole/__init__.py
@@ -59,7 +59,7 @@ class PythonConsolePlugin(GObject.Object, Eog.WindowActivatable, PeasGtk.Configu
 
     def do_activate(self):
         ui_manager = self.window.get_ui_manager()
-        self.action_group = Gtk.ActionGroup('PythonConsole')
+        self.action_group = Gtk.ActionGroup(name='PythonConsole')
         self.action_group.add_actions([('PythonConsole', None, \
             _('P_ython Console'), None, None, self.console_cb)], self.window)
         ui_manager.insert_action_group(self.action_group, 0)
diff --git a/plugins/pythonconsole/console.py b/plugins/pythonconsole/console.py
index 325b93f..c71fe63 100644
--- a/plugins/pythonconsole/console.py
+++ b/plugins/pythonconsole/console.py
@@ -29,7 +29,7 @@ import sys
 import re
 import traceback
 
-from gi.repository import GObject, Gio, Gtk, Gdk, Pango
+from gi.repository import GLib, Gio, Gtk, Gdk, Pango
 
 __all__ = ('PythonConsole', 'OutFile')
 
@@ -177,7 +177,7 @@ class PythonConsole(Gtk.ScrolledWindow):
                 cur = buf.get_end_iter()
 
             buf.place_cursor(cur)
-            GObject.idle_add(self.scroll_to_end)
+            GLib.idle_add(self.scroll_to_end)
             return True
 
         elif event.keyval == Gdk.KEY_Return:
@@ -221,21 +221,21 @@ class PythonConsole(Gtk.ScrolledWindow):
             cur = buf.get_end_iter()
             buf.move_mark(inp_mark, cur)
             buf.place_cursor(cur)
-            GObject.idle_add(self.scroll_to_end)
+            GLib.idle_add(self.scroll_to_end)
             return True
 
         elif event.keyval == Gdk.KEY_KP_Down or event.keyval == Gdk.KEY_Down:
             # Next entry from history
-            view.emit_stop_by_name("key_press_event")
+            view.stop_emission_by_name("key_press_event")
             self.history_down()
-            GObject.idle_add(self.scroll_to_end)
+            GLib.idle_add(self.scroll_to_end)
             return True
 
         elif event.keyval == Gdk.KEY_KP_Up or event.keyval == Gdk.KEY_Up:
             # Previous entry from history
-            view.emit_stop_by_name("key_press_event")
+            view.stop_emission_by_name("key_press_event")
             self.history_up()
-            GObject.idle_add(self.scroll_to_end)
+            GLib.idle_add(self.scroll_to_end)
             return True
 
         elif event.keyval == Gdk.KEY_KP_Left or event.keyval == Gdk.KEY_Left or \
@@ -344,7 +344,7 @@ class PythonConsole(Gtk.ScrolledWindow):
         else:
             buf.insert_with_tags(buf.get_end_iter(), text, tag)
 
-        GObject.idle_add(self.scroll_to_end)
+        GLib.idle_add(self.scroll_to_end)
 
     def eval(self, command, display_command = False):
         buf = self.view.get_buffer()


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