Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: c_weed on October 01, 2013, 07:22:30 am

Title: Is there a way to get copy/cut/paste in the right click context menu?
Post by: c_weed on October 01, 2013, 07:22:30 am
Is there a way to get copy/cut/paste in the right click context menu so you can move around text with the mouse? I'm using codeblocks 12.11 on Windows 7.
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: MortenMacFly on October 01, 2013, 07:46:19 am
It is there, under the submenu "Edit"...
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: marosknapcok on July 10, 2014, 08:24:58 pm
1.Would it be possible to give "copy/cut/paste" direct to context menu like it is in all the others editors (pspad, notepad++, sharpdevelop, eclipse, ...) and not keep it in "Edit" menu?

2.also displaying the whole path(up) by all opened files is not nice

3.and last one:after go to "find implementation/definition"
 to go back you must go to menu "View->Jump->Jump back" what is also not very nice

Is it possible to do something with it?
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: BlueHazzard on July 10, 2014, 09:16:22 pm
1.Would it be possible to give "copy/cut/paste" direct to context menu like it is in all the others editors (pspad, notepad++, sharpdevelop, eclipse, ...) and not keep it in "Edit" menu?

ctrl+c and ctrl+v is easier.... i don't know anybody who use the mouse to copy things....

2.also displaying the whole path(up) by all opened files is not nic
i think there is somewhere a setting for this in Settings->Enviroment or Settings->Editor...

3.and last one:after go to "find implementation/definition"
 to go back you must go to menu "View->Jump->Jump back" what is also not very nice
have you tried "alt+left arrow key" ?

greetings
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: marosknapcok on July 12, 2014, 12:45:37 am
I really do not understand why you are making such an effort to creating menus at all if everything can be don by keyboard?
I assume you are probably some linux guys don't you?
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: oBFusCATed on July 12, 2014, 01:40:48 am
I really do not understand why you are making such an effort to creating menus at all if everything can be don by keyboard?
You've nailed it. The only purpose for the menus is to find what is the shortcut and never use them again  :P ;D
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: marosknapcok on July 13, 2014, 01:38:31 pm
I decide to make my own compilation on Windows 7  but after I gave source code "codeblocks-13.12\src" to "C:\Devel\CodeBlocks" folder and opened project file "C:\Devel\CodeBlocks\CodeBlocks.cbp" in "C:\Program Files\CodeBlocks\codeblocks.exe" application (codeblocks-13.12mingw-setup.exe) and pushed "Build" I get following message:

||=== Build: tinyXML in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
 (invalid)||No such file or directory|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

Seems to be path problem but where?

Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: Jenna on July 13, 2014, 02:56:07 pm
Check the gloabal variable named "cb" and make sure it points to the root-folder of the C::B sources you want to use.
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: stahta01 on July 13, 2014, 03:45:11 pm
I really do not understand why you are making such an effort to creating menus at all if everything can be don by keyboard?
You've nailed it. The only purpose for the menus is to find what is the shortcut and never use them again  :P ;D

I feel differently today; I sprained by left hand yesterday and using the mouse is much easier to do, today.

Tim S.
 
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: marosknapcok on July 13, 2014, 09:01:38 pm
"Check the gloabal variable named "cb" and make sure it points to the root-folder of the C::B sources you want to use."

I did it (in "Settings->Global variables...").
In "Global Variable Editor"
Current Set: default
Current Variable: cd
"base" C:\Devel\CodeBlocks
Other fields are empty
...and still the same error message.
Is there any other C:B version where it was already tested?
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: stahta01 on July 13, 2014, 09:07:07 pm
"Check the gloabal variable named "cb" and make sure it points to the root-folder of the C::B sources you want to use."

I did it (in "Settings->Global variables...").
In "Global Variable Editor"
Current Set: default
Current Variable: cd
"base" C:\Devel\CodeBlocks
Other fields are empty
...and still the same error message.
Is there any other C:B version where it was already tested?

The above sounds wrong to me; does the folder "C:\Devel\CodeBlocks" have a sub folder of include and sdk?
Because if it does NOT; then it will not work as the cb base folder.

Tim S.

Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: Jenna on July 13, 2014, 09:55:50 pm
Check also the "cb_release_type"-variable, it should either contain a valid compiler-flag, like "-g" for debug-build or at least a space (" "), it can not be empty, in this case it will automatically be set to "(invalid)" !
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: marosknapcok on July 14, 2014, 12:12:48 am
Space helped, it started to compile but then it crushed on:
-----------------
||=== Build: tinyXML in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: AutoRevision in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: ConsoleRunner in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Squirrel in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Squirrel std lib in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: SqPlus in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: scintilla in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
C:\Devel\CodeBlocks\sdk\wxscintilla\src\PlatWX.cpp|8|fatal error: wx/wxprec.h: No such file or directory|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 20 second(s)) ===|
-----------------
What should be the settings of "wx"?
I read somwhere that wxWidgets should be compilet separately or something.
I will look at it later.



Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: oBFusCATed on July 14, 2014, 12:55:31 am
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: marosknapcok on July 14, 2014, 09:47:33 pm
By compiling of wxWidget (wxMSW-2.8.12, on Windows 7, 32-bit) I get following:
-------------------------------------
ladvapi32 -lwsock32 -lodbc32
collect2.exe: error: ld returned 5 exit status
mingw32-make: *** [..\..\lib\gcc_dll\wxmsw28u_gcc_custom.dll] Error 1
Pokračujte stisknutím libovolné klávesy...
-------------------------------------
I will look at it later. I will make some break till I collect some psychic powers to continue.
My goat my goat this is amazing how nothing works in here.
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: marosknapcok on July 18, 2014, 11:56:57 pm
If you want to have "cut, copy, paste and delete" direct in your C::B context menu do the following:
in file "cbeditor.cpp" in function "void cbEditor::AddToContextMenu(.." push between end of condition "if (!pluginsdone)" and (start of) condition "if (insert)" following lines:
//------------------------
popup->Append(idCut, _("Cut"));
popup->Enable(idCut, true);
popup->Append(idCopy, _("Copy"));
popup->Enable(idCopy, true);
popup->Append(idPaste, _("Paste"));
popup->Enable(idPaste, true);
popup->Append(idDelete, _("Delete"));
popup->Enable(idDelete, true);
popup->AppendSeparator();
//------------------------
and compile/build it.

Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: harrykar on July 19, 2014, 09:18:14 am
I really do not understand why you are making such an effort to creating menus at all if everything can be don by keyboard?
You've nailed it. The only purpose for the menus is to find what is the shortcut and never use them again  :P ;D

I notice it too that cumbersomeness. I am aware user experience is a difficult task to do well and in that field regard left click menus C:B lack
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: harrykar on July 19, 2014, 09:23:39 am
I really do not understand why you are making such an effort to creating menus at all if everything can be don by keyboard?
I assume you are probably some linux guys don't you?
Apart *nix or not i encounter only few coders that are not typists :)
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: cacb on July 19, 2014, 09:41:50 am
If you want to have "cut, copy, paste and delete" direct in your C::B context menu do the following:
in file "cbeditor.cpp" in function "void cbEditor::AddToContextMenu(.." push between end of condition "if (!pluginsdone)" and (start of) condition "if (insert)" following lines:
//------------------------
popup->Append(idCut, _("Cut"));
popup->Enable(idCut, true);
popup->Append(idCopy, _("Copy"));
popup->Enable(idCopy, true);
popup->Append(idPaste, _("Paste"));
popup->Enable(idPaste, true);
popup->Append(idDelete, _("Delete"));
popup->Enable(idDelete, true);
popup->AppendSeparator();
//------------------------
and compile/build it.

Please allow me to vote for this as a standard feature in C::B. Cut, Paste and Delete are among the most used features in an editor. Ok, I also use the keyboard, but not only the keyboard for these operations. Then look at how other applications (editors) do it and the message is clear:  Cut, Paste and Delete should be directly available in the popup context menu, i.e. prioritised higher than now. That obviously means demoting or removing other, less important options.

Thanks for bringing it up.
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: marosknapcok on July 19, 2014, 03:10:11 pm
Is there anyone else who would like to beg the C::B masters for making some special mouse lovers christmas version? Till now there are 2 of us:
-marosknapcok
-cacb

PS:Please please please, we beg you on our knees :-)
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: marosknapcok on July 20, 2014, 04:36:56 pm
To add "Jump Back", "Jump Frwd", "Jump Clear" to contextmenu do the following:
-------------------------------
1.  go to module "JumpTracker.cpp"...
-------------------------------
... to function "JumpTracker::BuildModuleMenu" and replace it by following code:
Code
// ----------------------------------------------------------------------------
  void JumpTracker::BuildModuleMenu(const ModuleType type, wxMenu* pMenu, const FileTreeData* /*data*/)
// ----------------------------------------------------------------------------
{
    wxMenuItem* pMenuItem = NULL;
    if (!pMenu || !IsAttached())
        return;

    //pMenu->AppendSeparator();
    pMenuItem = pMenu->Append(idMenuJumpBack, _("Jump Back"));
    pMenuItem->Enable(true);
    pMenuItem = pMenu->Append(idMenuJumpNext, _("Jump Frwd"));
    pMenuItem->Enable(true);
    pMenuItem = pMenu->Append(idMenuJumpClear, _("Jump Clear"));
    pMenuItem->Enable(true);
}

-------------------------------
2.  go to module "BrowseTracker.cpp"...
-------------------------------
... to function/method "void BrowseTracker::BuildModuleMenu" and add between
end of cycle "for (int i=0; i<knt; ++i)" and "popup->AppendSeparator();" following code:
Code
    popup->AppendSeparator();
    m_pJumpTracker->BuildModuleMenu(type, popup);


-------------------------------
3.  open "CodeBlocks.workspace"...
-------------------------------
with original C::B, select only "BrowseTracker" plugin and build it.


-------------------------------
4.  hit "update.bat"...
-------------------------------
... , "..\src\output" will be generated with
 4.1."..\src\output\share\CodeBlocks\BrowseTracker.zip" file  and ...
 4.2."..\src\output\share\CodeBlocks\plugins\BrowseTracker.dll" file
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: oBFusCATed on July 28, 2014, 09:28:06 pm
Is there anyone else who would like to beg the C::B masters for making some special mouse lovers christmas version?
The context menu is too cluttered to do what you want. I've tried to start a discussion and mark things that should be removed from it, but there are different people using different subsets of the items. Until there is a menu-configuration system I think we should not move anything anywhere....

p.s. Are you really telling me that you're using the Delete menu item, instead of the delete keyboard button?
Title: Re: Is there a way to get copy/cut/paste in the right click context menu?
Post by: marosknapcok on July 29, 2014, 09:10:34 pm
Yes.