GNOME Bugzilla – Bug 515755
show_grip and hide_grip doesn't work
Last modified: 2013-04-13 11:59:52 UTC
Please describe the problem: Only GDL_DOCK_ITEM_BEH_NO_GRIP has an effect, and only if it is set from the constructor. That is, if a DockItem has been initialized without GDL_DOCK_ITEM_BEH_NO_GRIP there is no way to show it. dockitem.hide_grip() gives Gdl-WARNING **: Grips always show unless > GDL_DOCK_ITEM_BEH_NO_GRIP is set dockitem.set_property("behavior", DOCK_ITEM_BEH_NO_GRIP) gives nothing. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Indeed, when looking at the code gdl_dock_item_hide_grip and gdl_dock_item_show_grip have no effect. I think it is better to just remove these two functions. Is there someone using them?
I'd like to use those functions in Valama (https://github.com/Valama/valama). Currently the workaround is to set behavior to NO_GRIP and hide all internal DockItem children.
Created attachment 241375 [details] [review] Show and hide grip manually Attached patch will work for all my testcases. Notes: * gdl_dock_item_grip_hide_handle always tries to hide grip (does not check for grip->priv->handle_shown) to make it work with layout loading. * I removed part to (un)set cursor for grip while showing/hiding. Grip widget is hidden/shown anyway. * I removed the gdl_dock_item_showhide_grip call from gdl_dock_item_set_focus_child body. When the child gets the focus the grip visibility state keeps the same. Or am I missing something? * If the item behaviour is locked or no_grip both functions (...show/hide_grip) doesn't have any effect.
Review of attachment 241375 [details] [review]: Thank you for this patch. The code replaced looks better and I don't see any issue in Anjuta. The call of gdl_dock_item_showhide_grip in the set focus function has been added with the function in this commit 2ac4a8f96d3c6061b3c7c74d250f6b731949f966. It doesn't look useful so I think it's better to remove it and see if it creates an issue. I will take a look a Valama but I think it would have been better to improve Vala support in Anjuta instead :).