GNOME Bugzilla – Bug 530145
Missing method gtk.TreeView.get_tooltip_context
Last modified: 2008-06-22 18:29:12 UTC
GtkTreeView has a method gtk_tree_view_get_tooltip_context() it seem to be missing in PyGTK.
Created attachment 110323 [details] [review] tooltip context patch This is a tricky one to wrap, if I understood correctly the enclosed patch should be (hopefully) ok.
The patch seem to almost work, except for the typo on this line: + kwlist, &x, &x, &py_keyboard_tip)) (two x:es). And the iterator returned doesn't seem to be correct. With the patch and with the typo fixed, the following tc still fails: def test_get_tooltip_context_on_populated_model_kbd_tip(): store = gtk.ListStore(int) for x in range(10): store.append([1]) view = gtk.TreeView(store) column = gtk.TreeViewColumn("c1", gtk.CellRendererText(), text = 0) view.append_column(column) win = gtk.Window() win.add(view) win.show_all() model, path, iter = view.get_tooltip_context(0, 0, True) assert model == store assert path == (0,) assert model.get_value(iter, 0) == 1 The traceback is strange: assert model.get_value(iter, 0) == 1
+ Trace 200977
warn_explicit(message, category, filename, lineno, module, registry)
if ((msg is None or msg.match(text)) and
Created attachment 113207 [details] [review] tooltip context patch rev. 1 Updated, I've also modified the tooltip demo using the method. Björn your testcase passes with the updated patch, can you try it out?
Sending ChangeLog Sending examples/pygtk-demo/demos/tooltip.py Sending gtk/gtktreeview.override Transmitting file data ... Committed revision 2996.