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

Offline alexchen

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

Online oBFusCATed

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

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12897
    • 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: 77
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           : [email protected]
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.

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12897
    • Travis build status
Re: Copy and Paste does not work
« Reply #5 on: November 01, 2020, 09:21:34 pm »
Code: [Select]
Name             : Code::Blocks
Version          : svn-r12073
SDK Version      : 2.2.0
Scintilla Version: 3.7.5
Author           : The Code::Blocks Team
E-mail           : [email protected]
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: 77
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 »

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12897
    • 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: 77
Re: Copy and Paste does not work
« Reply #8 on: November 02, 2020, 06:47:28 pm »
Thanks for looking into this.

Online oBFusCATed

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

Online oBFusCATed

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

Online oBFusCATed

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



Online oBFusCATed

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

Offline alexchen

  • Multiple posting newcomer
  • *
  • Posts: 77
Re: Copy and Paste does not work
« Reply #15 on: November 04, 2020, 12:08:30 am »
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.

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12897
    • Travis build status
Re: Copy and Paste does not work
« Reply #16 on: November 04, 2020, 11:19:37 pm »
See the spec files I'm using attached.

(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 Cartwright

  • Single posting newcomer
  • *
  • Posts: 1
Re: Copy and Paste does not work
« Reply #17 on: November 16, 2020, 08:11:52 pm »
If, for some reason, the copy-and-paste function isn't working in Windows mykfcexperience, one of the possible causes is due to some corrupted program components. Other possible causes include antivirus software, problematic plugins or features, certain glitches with the Windows system, or a problem with the “rdpclicp.exe” process.
« Last Edit: November 20, 2020, 05:15:29 pm by Cartwright »

Offline alexchen

  • Multiple posting newcomer
  • *
  • Posts: 77
Re: Copy and Paste does not work
« Reply #18 on: November 16, 2020, 08:13:25 pm »
This happens in CentOS Linux.

Offline sodev

  • Regular
  • ***
  • Posts: 405
Re: Copy and Paste does not work
« Reply #19 on: November 16, 2020, 08:29:03 pm »
Hmm, how are the chances that the second last post soon gets edited and spam links get inserted 8)?