I am using Code::Blocks 20.03 in a CentOS VM (under VMware). I notice that 'copy' and 'paste' does not work in my C++ source windows.
In order to 'copy and paste' from one place to somewhere else, I have to 'cut' it then paste it back to the original location and to the new place.
Has anyone noticed this problem or is it only me?
Thanks
Alex
Do you use some non-english keyboard layouts?
I use VMware Fusion (version 11.56) on an MacPro (the cylinder) running macOS Catalina and use English Apple keyboard. CentOS is 7.8.
I use the standard '
dragging the mouse while holding left-button' for text selection, and '
clicking the right-button' to trigger 'cut'/'copy'/'paste' pop-up selection in Code::Block's text window. I am not using keyboard shortcut of physical keyboard, therefore keyboard type should not be the issue. I have another CentOS VM in a different MacPro that runs Windows 10 from macOS BootCamp partition and it shows the same problem, therefore host OS type is not an issue, either.
'Cut and paste' operation works, but not 'Copy and Paste'. I get nothing in the destination from the clipboard buffer
Here is my result in 20.03 version.
- Open a C++ project and a couple of source file windows, i.e. CPP file header file.
- Select some statements or comment lines with left-button click and dragging in one window then 'copy' them with right-button pop-up selection.
- Move to another window or stay in the same window but go to a different location and select 'paste' with right-button click.
- Nothing gets pasted in the destination.
- Repeat the process with 'cut' selection in step 2 above and the selection is pasted in the destination.
I try 'copy/paste' operation between 'grim' (graphical VIM) window in CentOS vim-X11 RPM package and Code::Blocks windows and amazingly it work fine.
(Copy with gvim's 'Copy to Clipboard' icon at the top menu' and 'paste' with Code::Block's mouse selection.)
Works in a native gentoo linux machine. And inside ubuntu 20.04. Tomorrow I'll try my native centos7 build, but I doubt there would be problems.
Can you post the text in Help -> About -> Information?
This is the information:
Name : Code::Blocks
Version : 20.03-r11997
SDK Version : 2.0.0
Scintilla Version: 3.75.0
Author : The Code::Blocks Team
E-mail : info@codeblocks.org
Website : http://www.codeblocks.org
(Strangely, I can copy the information from Code::Block's Help pop-up windows in CentOS VM and paste it to this window in macOS Safari. windows.)
I also try the same operation in an Ubuntu 18.04 VM running on the same MacPro machine and it works as expected.
Name : Code::Blocks
Version : svn-r12073
SDK Version : 2.2.0
Scintilla Version: 3.7.5
Author : The Code::Blocks Team
E-mail : info@codeblocks.org
Website : http://www.codeblocks.org
wxWidgets Library (wxGTK port)
Version 3.0.5 (Unicode: wchar_t, debug level: 1),
compiled at May 1 2020 16:02:30
Runtime version of toolkit used is 2.24.
Compile-time GTK+ version is 2.24.31.
This release works fine on CentOS 7.
Where are you getting your release?
It seems you're missing the crucial wxWidgets info...
I am using CentOS 7.8. I had installed a few version of Code::Blocks before, from the earliest 16 to 17 (I also did a build from source myself) to the lates 20.03. I get 20.03 from the official download side of Code::Blocks, http://www.codeblocks.org/downloads/binaries.
This is the version of wxGTK in the machine:
$ yum info wxgtk
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.shastacoe.net
* centos-sclo-rh: mirror.sfo12.us.leaseweb.net
* centos-sclo-sclo: repos.lax.quadranet.com
* epel: mirror.prgmr.com
* extras: mirrors.ocf.berkeley.edu
* updates: centos3.zswap.net
Installed Packages
Name : wxGTK
Arch : x86_64
Version : 2.8.12
Release : 20.el7
Size : 12 M
Repo : installed
From repo : /wxGTK-2.8.12-20.el7.x86_64
Summary : GTK2 port of the wxWidgets GUI library
URL : http://www.wxwidgets.org/
License : wxWidgets
Description : wxWidgets/GTK2 is the GTK2 port of the C++ cross-platform
: wxWidgets GUI library, offering classes for all common GUI
: controls as well as a comprehensive set of helper classes for most
: common application tasks, ranging from networking to HTML display
: and image manipulation.
Does this mean I have to get wxGTK 3.0.5 to get it working? CentOS does not seem to have this in its repository.
Does CodeBlock's RPM specification file has the minimum requirement of wxGTK checking? Because it does not complain about missing pre-requisites when I install the RPM.
Hm, I guess 20.03 is built against wx2.8. I've stopped doing this locally to test wx3.x builds. I'll test with an official release soon.
Thanks for looking into this.
I'm not sure I'll be able to fix the problem actually.
I can confirm it. But newer builds require wx3.x, so I don't know if this is something we've fixed or it is wxgtk2.x problem.
I was using the wxgtk2 builds for a long time on centos7, but I don't use these menus ever, so I don't know if they worked.
I've looked at the log and I don't see anything interesting. So my guess is that wx3.x is fixing this. I'm using wx3.0.5+gtk2. You can make rpms if you like.
You mean build the RPM from source? I will need to download developer's tool for wxBase, wxGKT, correct? What version do you use in Ubuntu?
Would it be too much trouble to release a new official build for CentOS?
Yes, it will. It will require releasing wxgtk3.x or switching to wx+gtk3.
And there is no easy service where I can build and release packages for centos/fedora, at least I don't know about one.
For ubuntu I do make night build packages in https://launchpad.net/~fuscated/+archive/ubuntu/codeblocks-nightly (but I don't use those, so I don't know how well they work)
It looks like I need to roll my own if I want to do copy/paste with mouse button then.
Thanks for confirming the problem.
If you know how to build rpms I can share my spec files probably.
This is a note I wrote long time ago when I was having constant crash in Code::Blocks 16 command line and decided to build 17 myself. Most of the information came either from Code::Blocks download web site or answers I got from this forum:
To build CodeBlocks for CentOS 7 from source
1. Follow the instructions in the link:
http://codeblocks.org/downloads/7 to down the latest version:
Anonymous SVN access via HTTP protocol:
Repository URL: http://svn.code.sf.net/p/codeblocks/code/trunk
Command: svn checkout http://svn.code.sf.net/p/codeblocks/code/trunk
2. Install the pre-requisite package
CentOS: wxGTK-devel <------- This is 2.8
Command: sudo yum -y install wxGTK-devel
Ubuntu: libwxgtk3.0-gtk3-dev
Command: sudo apt install libwxgtk3.0-gtk3-dev
3. Follow the instructions in the link:
http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_RPM_based_distributions#Build_the_RPM_package to build RPM:
Go into trunk, if you haven't already done it.
Commands:
cd trunk
./bootstrap
./configure --disable-fortran
make dist
rpmbuild -ta codeblocks*.tar.*
4. The resulting RPMs are created under $HOME/rpmbuild/RPMS/x86_64
The RPM file is already in the source repository.
The problem is in the availability of wxGTK 3.0 in CentOS repository.
See the spec files I'm using attached.
This happens in CentOS Linux.