News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Can we move these menu items position?

Started by nanyu, August 28, 2009, 07:58:50 AM

Previous topic - Next topic

nanyu

move them to "view" (from "Edit")?

current                                  | move to..
----------------------------------------------------------
Edit -> Special commands       | View -> Zoom
   -> Zoom                            |
----------------------------------------------------------
Edit -> Highlight mode            | View -> Highlight mode
----------------------------------------------------------


nanyu


blueshake

i am confuse by the context menu,
every time when i want to copy and paste
i have to right click and choose edit ,then
do what i want to .
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

ollydbg

#3
Quote from: blueshake on August 31, 2009, 02:44:07 PM
i am confuse by the context menu,
every time when i want to copy and paste
i have to right click and choose edit ,then
do what i want to .

This is quite annoying for me, so, I just search the C::B source, but I can't find where does these menu items added... :(

Edit:

I find it, in the cbeditor.cpp


// Creates a submenu for a Context Menu based on the submenu's specific Id
wxMenu* cbEditor::CreateContextSubMenu(long id)
{
    cbStyledTextCtrl* control = GetControl();
    wxMenu* menu = 0;
    if(id == idInsert)
    {
        menu = new wxMenu;
        menu->Append(idEmptyMenu, _("Empty"));
        menu->Enable(idEmptyMenu, false);
    }
    else if(id == idEdit)
    {
        menu = new wxMenu;
        menu->Append(idUndo, _("Undo"));
        menu->Append(idRedo, _("Redo"));
        menu->Append(idClearHistory, _("Clear changes history"));
        menu->AppendSeparator();
        menu->Append(idCut, _("Cut"));
        menu->Append(idCopy, _("Copy"));
        menu->Append(idPaste, _("Paste"));
        menu->Append(idDelete, _("Delete"));
        menu->AppendSeparator();
        menu->Append(idUpperCase, _("UPPERCASE"));
        menu->Append(idLowerCase, _("lowercase"));
        menu->AppendSeparator();
        menu->Append(idSelectAll, _("Select All"));


So, you can change it. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.