[totem/gnome-3-8] pythonconsole: Fix warnings when enabling plugin
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-3-8] pythonconsole: Fix warnings when enabling plugin
- Date: Thu, 9 May 2013 14:13:26 +0000 (UTC)
commit 27da9b169e9d0c6041f743963557ab531554336b
Author: Bastien Nocera <hadess hadess net>
Date: Thu May 9 16:11:24 2013 +0200
pythonconsole: Fix warnings when enabling plugin
File "/home/hadess/Projects/gnome-install/lib64/totem/plugins/pythonconsole/pythonconsole.py",
line 114, in do_activate
self.totem.set_data ('PythonConsolePluginInfo', data)
File "/usr/lib64/python2.7/site-packages/gi/overrides/GObject.py",
line 555, in _unsupported_data_method
raise RuntimeError('Data access methods are unsupported. ' RuntimeError: Data access methods are
unsupported. Use normal Python attributes instead
https://bugzilla.gnome.org/show_bug.cgi?id=699215
src/plugins/pythonconsole/pythonconsole.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/pythonconsole/pythonconsole.py b/src/plugins/pythonconsole/pythonconsole.py
index 40d6a78..35cd209 100644
--- a/src/plugins/pythonconsole/pythonconsole.py
+++ b/src/plugins/pythonconsole/pythonconsole.py
@@ -111,7 +111,7 @@ class PythonConsolePlugin (GObject.Object, Peas.Activatable):
data['ui_id'] = manager.add_ui_from_string (UI_STR)
manager.ensure_update ()
- self.totem.set_data ('PythonConsolePluginInfo', data)
+ self.totem.PythonConsolePluginInfo = data
def _show_console (self, _action):
if not self.window:
@@ -158,14 +158,14 @@ class PythonConsolePlugin (GObject.Object, Peas.Activatable):
self.window = None
def do_deactivate (self):
- data = self.totem.get_data ('PythonConsolePluginInfo')
+ data = self.totem.PythonConsolePluginInfo
manager = self.totem.get_ui_manager ()
manager.remove_ui (data['ui_id'])
manager.remove_action_group (data['action_group'])
manager.ensure_update ()
- self.totem.set_data ('PythonConsolePluginInfo', None)
+ self.totem.PythonConsolePluginInfo = None
if self.window is not None:
self.window.destroy ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]