GNOME Bugzilla – Bug 126087
Cut/Copy should be insensitive in RMB context menu
Last modified: 2004-12-22 21:47:04 UTC
Following on from bug #125342, Cut and Copy are insensitive when unavailable in the Edit menu and in the toolbar, but the RMB context-menu has them always sensitive. I have created a patch for this bug, I'm waiting for Anon CVS to catch up before submitting it.
Created attachment 21168 [details] [review] Desensitizes Cut and Copy in RMB context menu under same conditions as Edit Menu and Toolbar
Applied to CVS - thanks! (Keep those patches coming!) The patch covers the main context menu for the editor widget; there's a second context menu which is used when right-clicking on a structural header, or in the tree view. This works slightly differently to the other menu, and doesn't yet have cut/copy "autosensitivity". So I'm not closing this bug yet.
Created attachment 21189 [details] [review] "Autosensitizes" Cut and Copy in context menu when right button is clicked on a structural tag
The above patch moves cong_node_can_be_cut from cong-range.c to cong-node.c where it belongs, creates cong_node_can_be_copied, and uses these functions to desensitize the Cut and Copy button in the right-click context menu when clicked on a structural header. I *think* it covers the tree view case as well, but this needs testing (I'm not sure exactly what you meant by tree view) With CVS mucking me around, I don't seem to be able to provide a Changelog diff. Please add (if possible) to my current 4th Nov entry: * cong-node.h, cong-node.c, cong-range.c, popup.c Moves cong_node_can_be_cut to the correct file, uses this to desensitize Cut and Copy in the right-click context menu when clicked on a structural header It's probably worth noting that as it stands, this context-menu is something of a truism. The menu is only built if the right-button is clicked on a CONG_NODE_TYPE_ELEMENT, and this will almost certainly pass the cong_node_can_be_cut test! Still, in the future (i.e. post 0.8.0, maybe post 1.0) this will change If this is the last place that Cut can be called, then the checks in xmledit.c should be upgraded to asserts or removed completely, please advise on the way forward.
Already committed to CVS, with a ChangeLog entry. Thanks! Have replied to rest of the above on the mailing list. Closing this bug.