GNOME Bugzilla – Bug 393579
Need tree view API for querying whether rubberbanding is done ATM
Last modified: 2011-02-04 16:11:01 UTC
We need an API for querying the value of tree_view->priv->rubber_band_status i.e. if tree_view->priv->rubber_band_status == RUBBER_BAND_ACTIVE) Maybe gtk_tree_view_get_rubber_banding_in_progress() would be appropriate. We need it in Nautilus because we want single-click rubberbanding (bug 138931).
"single-click rubberbanding" means that we have a custom "button-press-event" handler that will activate specific rows if we're using single-click activation, but only if neither a drag nor a rubberbanding was started.
Created attachment 79537 [details] [review] Proposed patch Proposed patch attached. I decided to use gtk_tree_view_get_rubber_banding_active() instead since it is more consistent the GTK+ naming conventions. connection I'm not sure whether a signal or an additional property is also appropriate, I think connecting to "motion-notify-event" and checking for gtk_tree_view_get_rubber_banding_active() should be enough.
Ping. Any chance that we get this into GTK+ HEAD?
It looks like this does make sense to add. However, I think we should have a little broader look at GtkTreeView and find other pieces where a status indication would be useful (for example knowing whether or not there is a row DnD operation pending). Once we have this list we can decide what to add and how; we could either add separate functions for each thing, or return something like a bitmask.
Added as gtk_tree_view_is_rubber_banding_active() with some changes. We'll see if there are other state things that are useful to be able to get. Once we add such getters in the future they should preferably of the form: gtk_tree_view_is_blah_blah_active()