[pygobject] [gtk-demo] show "activated" demo's in italic font in the TreeView
- From: Dieter Verfaillie <dieterv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] [gtk-demo] show "activated" demo's in italic font in the TreeView
- Date: Wed, 24 Aug 2011 17:05:39 +0000 (UTC)
commit 1f9e4486c5b84209ce0038887738fc16a4ef7da3
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Tue Aug 23 08:05:43 2011 +0200
[gtk-demo] show "activated" demo's in italic font in the TreeView
demos/gtk-demo/gtk-demo.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/demos/gtk-demo/gtk-demo.py b/demos/gtk-demo/gtk-demo.py
index 48e9699..387b2fd 100755
--- a/demos/gtk-demo/gtk-demo.py
+++ b/demos/gtk-demo/gtk-demo.py
@@ -249,10 +249,13 @@ class GtkDemoWindow(Gtk.Window):
self.fontify()
def row_activated_cb(self, view, path, col, store):
- treeiter = store.get_iter(path)
- demo = store.get_value(treeiter, 1)
+ iter = store.get_iter(path)
+ demo = store.get_value(iter, 1)
+
if demo is not None:
+ store.set_value(iter, 2, Pango.Style.ITALIC)
demo.module.main(self)
+ store.set_value(iter, 2, Pango.Style.NORMAL)
def create_tree(self):
tree_store = DemoTreeStore()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]