After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 126087 - Cut/Copy should be insensitive in RMB context menu
Cut/Copy should be insensitive in RMB context menu
Status: RESOLVED FIXED
Product: conglomerate
Classification: Other
Component: Code
CVS
Other Linux
: Normal minor
: ---
Assigned To: conglomerate list
conglomerate list
Depends on:
Blocks:
 
 
Reported: 2003-11-03 10:12 UTC by Paul Smith
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Desensitizes Cut and Copy in RMB context menu under same conditions as Edit Menu and Toolbar (2.41 KB, patch)
2003-11-03 20:12 UTC, Paul Smith
none Details | Review
"Autosensitizes" Cut and Copy in context menu when right button is clicked on a structural tag (3.06 KB, patch)
2003-11-04 18:37 UTC, Paul Smith
none Details | Review

Description Paul Smith 2003-11-03 10:12:15 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.
Comment 1 Paul Smith 2003-11-03 20:12:35 UTC
Created attachment 21168 [details] [review]
Desensitizes Cut and Copy in RMB context menu under same conditions as Edit Menu and Toolbar
Comment 2 David Malcolm 2003-11-04 13:16:49 UTC
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.
Comment 3 Paul Smith 2003-11-04 18:37:43 UTC
Created attachment 21189 [details] [review]
"Autosensitizes" Cut and Copy in context menu when right button is clicked on a structural tag
Comment 4 Paul Smith 2003-11-04 19:03:45 UTC
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.
Comment 5 David Malcolm 2003-11-04 19:40:36 UTC
Already committed to CVS, with a ChangeLog entry.  Thanks!  Have
replied to rest of the above on the mailing list.

Closing this bug.