Cthulhu is no longer a fork. Now it is a screen reader written in Golang.
This commit is contained in:
1 parent
a998fe67de
commit
069fc674dc
708 files changed
+112482
-532
No files matched your search
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Small GTK tree-selection fixture for the isolated native X11 test."""
|
||||
|
||||
import gi
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import GLib, Gtk
|
||||
|
||||
|
||||
window = Gtk.Window(title="Cthulhu Selection Probe")
|
||||
window.connect("destroy", Gtk.main_quit)
|
||||
|
||||
store = Gtk.ListStore(str)
|
||||
store.append(("Alpha result",))
|
||||
store.append(("Beta result",))
|
||||
|
||||
view = Gtk.TreeView(model=store)
|
||||
view.set_headers_visible(False)
|
||||
view.append_column(Gtk.TreeViewColumn("Result", Gtk.CellRendererText(), text=0))
|
||||
view.get_selection().set_mode(Gtk.SelectionMode.SINGLE)
|
||||
window.add(view)
|
||||
|
||||
|
||||
def select_result(path):
|
||||
view.get_selection().select_path(path)
|
||||
view.set_cursor(path)
|
||||
return False
|
||||
|
||||
|
||||
window.show_all()
|
||||
view.grab_focus()
|
||||
GLib.timeout_add(500, select_result, 0)
|
||||
GLib.timeout_add(800, select_result, 1)
|
||||
GLib.timeout_add(2000, Gtk.main_quit)
|
||||
Gtk.main()
|
||||
Reference in new issue
Block a user