[kupfer] doc: Simplify example in PluginAPI
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] doc: Simplify example in PluginAPI
- Date: Sun, 20 Mar 2011 19:15:55 +0000 (UTC)
commit 8cddd77c1c6d006c7e7a80c3bbb7f5aa1a2de30c
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Sun Mar 20 20:15:19 2011 +0100
doc: Simplify example in PluginAPI
Documentation/PluginAPI.rst | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/Documentation/PluginAPI.rst b/Documentation/PluginAPI.rst
index 0e24fa5..efaa0cd 100644
--- a/Documentation/PluginAPI.rst
+++ b/Documentation/PluginAPI.rst
@@ -134,8 +134,7 @@ The complete plugin python code::
return fileobj.object.endswith(".jpg")
def activate(self, fileobj):
- image_widget = gtk.Image()
- image_widget.set_from_file(fileobj.object)
+ image_widget = gtk.image_new_from_file(fileobj.object)
image_widget.show()
window = gtk.Window()
window.add(image_widget)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]