Author Topic: Is there a way to get copy/cut/paste in the right click context menu?  (Read 9813 times)

Offline c_weed

  • Single posting newcomer
  • *
  • Posts: 9
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #1 on: October 01, 2013, 07:46:19 am »
It is there, under the submenu "Edit"...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline marosknapcok

  • Multiple posting newcomer
  • *
  • Posts: 10
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?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2493
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

Offline marosknapcok

  • Multiple posting newcomer
  • *
  • Posts: 10
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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12006
    • Travis build status
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
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline marosknapcok

  • Multiple posting newcomer
  • *
  • Posts: 10
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?

« Last Edit: July 13, 2014, 01:42:48 pm by marosknapcok »

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Check the gloabal variable named "cb" and make sure it points to the root-folder of the C::B sources you want to use.

Online stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
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.
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline marosknapcok

  • Multiple posting newcomer
  • *
  • Posts: 10
"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?

Online stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #10 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.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #11 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)" !

Offline marosknapcok

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #12 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.




Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12006
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline marosknapcok

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #14 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.
« Last Edit: July 14, 2014, 09:56:39 pm by marosknapcok »

Offline marosknapcok

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #15 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.


Offline harrykar

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #16 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
« Last Edit: July 19, 2014, 09:24:59 am by harrykar »
--"Arguing with an engineer is like wrestling with a pig in the mud; after a while you  realize you are muddy and the pig is enjoying it." <br />-- Don't Learn to HACK - Hack to LEARN <br />-- cyberwarfare is now an active part of information warfare

Offline harrykar

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #17 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 :)
--"Arguing with an engineer is like wrestling with a pig in the mud; after a while you  realize you are muddy and the pig is enjoying it." <br />-- Don't Learn to HACK - Hack to LEARN <br />-- cyberwarfare is now an active part of information warfare

Offline cacb

  • Regular
  • ***
  • Posts: 395
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #18 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.

Offline marosknapcok

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #19 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 :-)

Offline marosknapcok

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #20 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: [Select]
// ----------------------------------------------------------------------------
  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: [Select]
    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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12006
    • Travis build status
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #21 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline marosknapcok

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Is there a way to get copy/cut/paste in the right click context menu?
« Reply #22 on: July 29, 2014, 09:10:34 pm »
Yes.