Author Topic: small feature request  (Read 6456 times)

Offline yckx

  • Multiple posting newcomer
  • *
  • Posts: 10
    • http://
small feature request
« on: November 12, 2005, 05:27:24 am »
This isn't really applicable to the Troubleshooting forum, but I find it even less applicable to the others.  I'd like to have cut/copy/paste functionality added to the RMB popup menu.  It seems a small thing, but it would be really nice to highlight, right-click, select copy, click where I want it, right click, select paste, all without having to move back and forth from mouse to keyboard and back.

I've said this before, but I really like this IDE ;) Don't let my issues be mistaken for dislike.

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: small feature request
« Reply #1 on: November 12, 2005, 05:46:36 am »
It is already there, in the RMB->Edit->Copy/Paste/etc.

However, this RMB menu (context-menu) is becoming too cluttered...

Offline yckx

  • Multiple posting newcomer
  • *
  • Posts: 10
    • http://
Re: small feature request
« Reply #2 on: November 12, 2005, 10:01:00 am »
Ah, I missed it; I was looking for it in the top-level popup.  Silly me :P

However, if I have text selected, it deselects when I right-click, so I can't copy anything with it  :?

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: small feature request
« Reply #3 on: November 12, 2005, 10:36:39 am »
If I remember well that bug is fixed in CVS.

Back to the context-menu...

    The context-menu is heavy cluttered, and it isn't user configurable.
    The most common actions (Copy, Paste, Select All, ...) are located in the submenu Edit... which
    indicates the heavy grade of clutter of the menu, and in this case it's not so intuitive. :P

    The "Locate in..." of the Help Plugin doesn't seems to be a good thing because with every
    helpfile added it "helps" to clutter even more this menu, but too bad I can't think of any
    place better for it (maybe putting it in a submenu...?).

Currently the menu is:

Code: [Select]
    Toggle breakpoint
    Run to cursor
    ------
    Find declaration of: 'text'
    ------
    Close
    Close all
    Close all others
    ------
    Save
    Save all
    ------
    Switch to...
    Insert...
    ------
    Swap header/source
    ------
    Edit...
    Bookmarks...
    Folding...
    ------
    Locate in Help1
    Locate in Help2
    ------
    Add To-Do item...
    ------
    Configure editor
    ------
    Properties

A possible solution:
    Altrough this is a subject to change always over the time...
    To remove some clutter of it I would change the context-menu to something like:

Code: [Select]
    Toggle Breakpoint
    Run to Cursor
    ------
    Cut
    Copy
    Paste
    ------
    Select All
    ------
    Find Declaration of: text
    Swap Header/Source
    ------
    Insert Code Template...
    ------
    Locate in Help1
    Locate in Help2
    ------
    Add To-Do Item...
    ------
    Properties
    ------
    Close


What do you think?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: small feature request
« Reply #4 on: November 12, 2005, 12:59:51 pm »
The deselection bug has been fixed in CVS a week or two ago.

Generally, to work efficiently with Code::Blocks, it is advisable to follow the same basic guideline that is valid for almost every program: No matter what happens, always leave your left hand on the keyboard.

This way, you can for example type Strg-C / Strg-V while selecting and moving the cursor with the mouse, this is a lot faster and more convenient than anything else, and it allows you to type on without any further interruption, too.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: small feature request
« Reply #5 on: November 12, 2005, 01:33:03 pm »
And my suggestion about the context-menu...? :(

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: small feature request
« Reply #6 on: November 12, 2005, 02:02:48 pm »
Generally an ok suggestion, but not as easy as it may look, since the menu is constructed in many steps involving several separate builtin modules and several plugins (which are called in their order of loading, i.e. dependent on their filename!). To make things yet more complicated, some components append their menu entries to the menu, while others insert their items after another known item ("find declaration").

So yes, it is possible to rearrange the menu, but it is not a trivial task that is done in 5 minutes - rather painful.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: small feature request
« Reply #7 on: November 12, 2005, 02:25:32 pm »
Yep I know all of that, that's why I said Altrough this is a subject to change always over the time... because other plugins and newer functionality will change it, with the time.

Not having the Cut/Copy/Paste triad in the context menu directly because the menu is cluttered, originates these types of posts, it happened to me that I was looking for them also.

I'll try to take a look...

Offline yckx

  • Multiple posting newcomer
  • *
  • Posts: 10
    • http://
Re: small feature request
« Reply #8 on: November 12, 2005, 05:30:51 pm »
It's good to know the selection bug has been fixed.  And I appreciate the explanation of the context menu construction.  While I'd really like to see an improvement similar to Takeshi's suggestion, knowing why the menu is so oddly ordered (and why we shouldn't expect a reorganization any time soon) is helpful in itself.

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: small feature request
« Reply #9 on: November 16, 2005, 05:11:35 pm »
I've modified (as a proof-of-concept) the context menu to remove some clutter, but I would prefer this


Before:




After:



Here's the feature request with the patch.
« Last Edit: November 16, 2005, 05:13:07 pm by Takeshi Miya »

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: small feature request
« Reply #10 on: November 16, 2005, 05:22:07 pm »
The problem with the context menus are that we need a distinction between the EDITOR context menu and the Files List context menu. Currently they use the same routine to popup, so there are more items than necessary.

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: small feature request
« Reply #11 on: November 16, 2005, 06:12:20 pm »
True, and that's included in revamping of Code::Blocks menus here.

Separating Actions from Bindings, and assigning Properties to those Actions, like Action.BelongsToEditor or Action.BelongsToFileList.

EDIT: KDevelop seems to got it right (more or less)
« Last Edit: November 17, 2005, 12:32:32 am by Takeshi Miya »