Commits

wodny committed 210f9d9

Initial commit.

Comments (0)

Files changed (8)

+Enabling a11y:
+/desktop/gnome/interface/accessibility = true
+export GTK_MODULES=gail:atk-bridge
+
+
+Hang column indicates if the GTK application has hung.
+Listed column indicates if the application is visible in the AT-SPI
+listing.
+
+                                  |   hang   | listed |
+----------------------------------+----------+--------+
+primarythread_gobject.py          |   no     |  yes   |
+primarythread_gtkgdk.py           |   no     |  yes   |
+secondarythread_gobject_import.py |   no [1] |  yes   |
+secondarythread_gobject.py        |   yes    |  hang  |
+secondarythread_gtkgdk_import.py  |   no [1] |  yes   |
+secondarythread_gtkgdk.py         |   yes    |  hang  |
+
+[1] ** (secondarythread_gobject_import.py:5828): CRITICAL **:
+giop_thread_request_push: assertion `tdata != NULL' failed
+  -- at the application termination

primarythread_gobject.py

+#!/usr/bin/env python
+
+import gobject
+gobject.threads_init()
+
+import pygtk
+pygtk.require('2.0')
+
+import gtk
+
+class GUI:
+    def __init__(self):
+        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
+        self.window.connect("destroy", self.destroy)
+        self.button = gtk.Button("Hello World")
+        self.window.add(self.button)
+        self.button.show()
+        self.window.show()
+
+    def destroy(self, widget, data=None):
+        gtk.main_quit()
+
+gui = GUI()
+gtk.main()

primarythread_gtkgdk.py

+#!/usr/bin/env python
+
+import gobject
+gobject.threads_init()
+
+import pygtk
+pygtk.require('2.0')
+
+import gtk
+gtk.gdk.threads_init()
+
+class GUI:
+    def __init__(self):
+        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
+        self.window.connect("destroy", self.destroy)
+        self.button = gtk.Button("Hello World")
+        self.window.add(self.button)
+        self.button.show()
+        self.window.show()
+
+    def destroy(self, widget, data=None):
+        gtk.main_quit()
+
+gui = GUI()
+gtk.gdk.threads_enter()
+gtk.main()
+gtk.gdk.threads_leave()

secondarythread_gobject.py

+#!/usr/bin/env python
+
+import gobject
+gobject.threads_init()
+
+import pygtk
+pygtk.require('2.0')
+
+import gtk
+
+from threading import Thread
+
+class GUI(Thread):
+
+    def __init__(self):
+        Thread.__init__(self)
+
+        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
+        self.window.connect("destroy", self.destroy)
+        self.button = gtk.Button("Hello World")
+        self.window.add(self.button)
+        self.button.show()
+        self.window.show()
+
+    def destroy(self, widget, data=None):
+        gtk.main_quit()
+
+    def run(self):
+        gtk.main()
+
+gui = GUI()
+gui.start()
+gui.join()

secondarythread_gobject_import.py

+#!/usr/bin/env python
+
+import gobject
+gobject.threads_init()
+import pygtk
+pygtk.require('2.0')
+
+from threading import Thread
+
+class GUI(Thread):
+
+    def __init__(self):
+        Thread.__init__(self)
+
+
+    def destroy(self, widget, data=None):
+        self.gtk.main_quit()
+
+    def run(self):
+        import gtk
+        self.gtk = gtk
+
+        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
+        self.window.connect("destroy", self.destroy)
+        self.button = gtk.Button("Hello World")
+        self.window.add(self.button)
+        self.button.show()
+        self.window.show()
+        
+        gtk.main()
+
+gui = GUI()
+gui.start()
+gui.join()

secondarythread_gtkgdk.py

+#!/usr/bin/env python
+
+import gobject
+gobject.threads_init()
+
+import pygtk
+pygtk.require('2.0')
+
+import gtk
+gtk.gdk.threads_init()
+
+from threading import Thread
+
+class GUI(Thread):
+
+    def __init__(self):
+        Thread.__init__(self)
+
+        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
+        self.window.connect("destroy", self.destroy)
+        self.button = gtk.Button("Hello World")
+        self.window.add(self.button)
+        self.button.show()
+        self.window.show()
+
+    def destroy(self, widget, data=None):
+        gtk.main_quit()
+
+    def run(self):
+        gtk.gdk.threads_enter()
+        gtk.main()
+        gtk.gdk.threads_leave()
+
+gui = GUI()
+gui.start()
+gui.join()

secondarythread_gtkgdk_import.py

+#!/usr/bin/env python
+
+import gobject
+gobject.threads_init()
+import pygtk
+pygtk.require('2.0')
+
+from threading import Thread
+
+class GUI(Thread):
+
+    def __init__(self):
+        Thread.__init__(self)
+
+
+    def destroy(self, widget, data=None):
+        self.gtk.main_quit()
+
+    def run(self):
+        import gtk
+        gtk.gdk.threads_init()
+        self.gtk = gtk
+
+        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
+        self.window.connect("destroy", self.destroy)
+        self.button = gtk.Button("Hello World")
+        self.window.add(self.button)
+        self.button.show()
+        self.window.show()
+        
+        gtk.gdk.threads_enter()
+        gtk.main()
+        gtk.gdk.threads_leave()
+
+gui = GUI()
+gui.start()
+gui.join()
+#!/usr/bin/python
+
+import pyatspi
+r = pyatspi.Registry
+print("Desktop count: {0}".format(r.getDesktopCount()))
+d = r.getDesktop(0)
+
+MAXLEVEL=1
+
+def showChildren(a, level = 1):
+    if level > MAXLEVEL:
+        return
+    for i in range(a.childCount):
+        showProps(a.getChildAtIndex(i), level)
+        showChildren(a.getChildAtIndex(i), level + 1)
+
+def showProps(a, level=0):
+    print("{0}{2:12}({3:2}) {1}".format("    "*level, a.name, a.getRoleName(), a.childCount))
+    if a.getRoleName() == "link":
+        print("+++++++++++++++ {0}".format(a.queryHyperlink().getURI(0)))
+
+for a in d:
+    showProps(a)
+    print("    {0}, {1}, {2}".format(a.toolkitName, a.version, a.id))
+    showChildren(a)