[hafqa] [hafqa] [Bug 1113] GtkTreeSelection selection changed signal called after clearing the list

From: bugzilla-daemon at maemo.org bugzilla-daemon at maemo.org
Date: Mon Mar 5 09:22:16 EET 2007
https://maemo.org/bugzilla/show_bug.cgi?id=1113





------- Additional Comments From xan.lopez at nokia.com  2007-03-05 09:22 -------
Several comments here :)
By calling gtk_tree_selection_unselect_all you are explicitely making the
"changed" signal to be called. Just don't do that.
Once that is gone, the "changed" signal is emitted because you are removing the
currently selected row (the first one) in the gtk_list_store_clear call. Without
knowing what are you exactly trying to accomplish, the quickest workaround would
be to block the handler before the store clear and unblock it afterwards:

        g_signal_handler_block (data->selection, data->id);
        gtk_list_store_clear(data->list);
        g_signal_handler_unblock (data->selection, data->id);

where data->id is the id of the changed signal handler. Btw, you are re-creating
the treeview every time you reset the model, that's totally unnecessary.

This "bugs" happens with GTK+ upstream too, when such a thing happens it's
better to report it to the upstream bugzilla: bugzilla.gnome.org.

A good resource about treeview and related components is:
http://scentric.net/tutorial/.

-- 
Configure bugmail: https://maemo.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the hafqa mailing list