[pygobject/pygobject-2-28] [gi-demos] dont try and run demos that represent directories



commit 1f69c520d95fec30094fac47cb0efa31c79da81c
Author: John Stowers <john stowers gmail com>
Date:   Sun Mar 6 17:48:04 2011 +1300

    [gi-demos] dont try and run demos that represent directories

 demos/gtk-demo/gtk-demo.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/demos/gtk-demo/gtk-demo.py b/demos/gtk-demo/gtk-demo.py
index fe24939..f0f27bb 100755
--- a/demos/gtk-demo/gtk-demo.py
+++ b/demos/gtk-demo/gtk-demo.py
@@ -215,7 +215,8 @@ class GtkDemoApp(object):
     def row_activated_cb(self, view, path, col, store):
         treeiter = store.get_iter(path)
         demo = store.get_value(treeiter, 1)
-        demo.module.main(self)
+        if not demo.isdir:
+            demo.module.main(self)
 
     def create_tree(self):
         tree_store = Gtk.TreeStore(str, Demo, Pango.Style)



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