[libpeas] peas-demo: Add a configure dialog to the python plugin.



commit d4c5e7a9d9b6fb795c5a16cf6a7d12f5ec32b160
Author: Steve Frécinaux <code istique net>
Date:   Fri Jul 16 00:56:07 2010 +0200

    peas-demo: Add a configure dialog to the python plugin.

 peas-demo/plugins/pythonhello/pythonhello.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/peas-demo/plugins/pythonhello/pythonhello.py b/peas-demo/plugins/pythonhello/pythonhello.py
index 0379e38..4c02494 100644
--- a/peas-demo/plugins/pythonhello/pythonhello.py
+++ b/peas-demo/plugins/pythonhello/pythonhello.py
@@ -3,6 +3,7 @@
 
 import gobject
 from gi.repository import Peas
+from gi.repository import PeasUI
 from gi.repository import Gtk
 
 LABEL_STRING="Python Says Hello!"
@@ -24,3 +25,9 @@ class PythonHelloPlugin(gobject.GObject, Peas.Activatable):
 
     def do_update_state(self, window):
         print "PythonHelloPlugin.do_update_state", repr(window)
+
+class PythonHelloConfigurable(gobject.GObject, PeasUI.Configurable):
+    __gtype_name__ = 'PythonHelloConfigurable'
+
+    def do_create_configure_widget(self):
+        return Gtk.Label.new("Python Hello configure widget")



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