Author Topic: Copy and Paste does not work  (Read 9709 times)

Offline alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Copy and Paste does not work
« on: October 31, 2020, 10:34:13 pm »
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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Copy and Paste does not work
« Reply #1 on: November 01, 2020, 12:57:26 pm »
Do you use some non-english keyboard layouts?
(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 alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Copy and Paste does not work
« Reply #2 on: November 01, 2020, 05:03:59 pm »
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.)


« Last Edit: November 01, 2020, 05:18:46 pm by alexchen »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Copy and Paste does not work
« Reply #3 on: November 01, 2020, 08:34:08 pm »
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?
(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 alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Copy and Paste does not work
« Reply #4 on: November 01, 2020, 09:00:58 pm »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Copy and Paste does not work
« Reply #5 on: November 01, 2020, 09:21:34 pm »
Code
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...
(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 alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Copy and Paste does not work
« Reply #6 on: November 01, 2020, 10:15:51 pm »
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.
« Last Edit: November 02, 2020, 06:48:15 pm by alexchen »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Copy and Paste does not work
« Reply #7 on: November 02, 2020, 06:45:42 pm »
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.
(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 alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Copy and Paste does not work
« Reply #8 on: November 02, 2020, 06:47:28 pm »
Thanks for looking into this.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Copy and Paste does not work
« Reply #9 on: November 02, 2020, 08:42:57 pm »
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.
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Copy and Paste does not work
« Reply #10 on: November 02, 2020, 08:50:02 pm »
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.
(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 alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Copy and Paste does not work
« Reply #11 on: November 02, 2020, 09:17:09 pm »
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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Copy and Paste does not work
« Reply #12 on: November 02, 2020, 10:02:25 pm »
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)
(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 alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Copy and Paste does not work
« Reply #13 on: November 02, 2020, 10:31:31 pm »
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.



Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Copy and Paste does not work
« Reply #14 on: November 03, 2020, 02:11:16 pm »
If you know how to build rpms I can share my spec files probably.
(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!]