WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can't copy to clipboard from 'System Stats'  (Read 2805 times)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Can't copy to clipboard from 'System Stats'
« on: October 03, 2010, 03:34:37 PM »
I now recalled something what I wanted to asked a few times before but always forgot to create a post:

To those who have experience with FLTK: Is there a way to allow for the output from the tabs of the 'stats' command (AKA: 'System Stats') to be highlighted by mouse cursor, with the aim to paste the highlighted selection to some other application. I suppose the same "trick" would work for the 'appbrowser' windows, where copying information from the .info file would be equally useful.

I might be a bit paranoid and don't trust my own typing to be always 100% correct (e.g. when it comes to case-sensitive subtleties) and therefore use copy & paste often when I need to get it right. I also often ask other users in my troubleshooting contributions to copy & paste output of certain commands that replicate output also available via 'stats'. Therefore I'd consider the ability to copy from FLTK applications to be highly desirable.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Can't copy to clipboard from 'System Stats'
« Reply #1 on: October 03, 2010, 03:50:28 PM »
I suppose the same "trick" would work for the 'appbrowser' windows, where copying information from the .info file would be equally useful.

I'd access the same .info file through 'ab' for that particular case.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Can't copy to clipboard from 'System Stats'
« Reply #2 on: October 03, 2010, 06:27:36 PM »
tinypoodle: Well, I personally use something along the lines of tce-fetch.sh EXT.tcz.info && grep 'WhatEverIwant' EXT.tcz.info But I was more thinking about the users that are "shy" of the CLI.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10166
Re: Can't copy to clipboard from 'System Stats'
« Reply #3 on: October 04, 2010, 05:48:55 AM »
I thought the complete tool output is in ~/stats.txt?
The only barriers that can stop you are the ones you create yourself.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Can't copy to clipboard from 'System Stats'
« Reply #4 on: October 04, 2010, 08:31:42 PM »
I thought the complete tool output is in ~/stats.txt?

Whilst I've also "seen" that file it looks to be the concatenated result of all individual tabs (without separators). Might be a bit tricky to guide someone to copy the right output.

I'm afraid that I've asked the question in the wrong way: I'm not so much after a direct method of getting information out of 'stats' (or .info files) but rather out of FLTK windows in general.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Can't copy to clipboard from 'System Stats'
« Reply #5 on: October 05, 2010, 09:55:46 AM »
When I first created Tiny Core, It was a conscience decision not to include such. Part of my tiny and nimble philosophy.  

I am sure that you are aware that there is two levels of copy and paste. There is the selection (copy) and then middle click on a target (paste). Then there is the clipboard where after a selection, either a menu or control key is used, to copy to clipboard. Then the target typically does similar with menu or control key to paste.

Adding all this to many GUIs would certainly bulk up the system. Especially adding menus and control keys. And for the middle click method my thought was "How likely would a new user to Linux know about the mouse click method?" Offering the mouse click method would likely lead to requests for the full menu and control keys. I resisted the notion.  Perhaps the mouse click method would be a compromise, if it is even supported in FLTK 1.1.10. I see FLTK 1.3 improves on handling of such with more fully implemented methods.
« Last Edit: October 05, 2010, 08:02:51 PM by roberts »
10+ Years Contributing to Linux Open Source Projects.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Can't copy to clipboard from 'System Stats'
« Reply #6 on: October 05, 2010, 07:46:36 PM »
Thank you Robert for this explanation.

As I've never written a GUI apps in my live I obviously did not consider the consequences. I certainly would not suggest for a moment to create menus and (application specific) control keys. I was merely thinking about mouse selection that would allow to paste the selected text back into an 'aterm'.

As stated above this is most certainly not an area I know much about, but I'd appreciate if you could keep an open mind to a possible enhancement. OTOH, I'm the last person that would like to see TC apps getting "bloated". So there is from my POV no need for a drastic change of the UI (or should that be UX?).

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Can't copy to clipboard from 'System Stats'
« Reply #7 on: October 06, 2010, 11:25:25 PM »
I will implement the mouse method in selected GUIs.
System Stats will be first followed by AppBrowser's info screen.
Hopefully by only implemeting in selected areas I can keep the size down.
10+ Years Contributing to Linux Open Source Projects.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Can't copy to clipboard from 'System Stats'
« Reply #8 on: October 07, 2010, 02:11:02 AM »
That very good news, thank you Robert for taking this step.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Can't copy to clipboard from 'System Stats'
« Reply #9 on: October 08, 2010, 10:55:20 AM »
Done. Both System Stats, all tabs, and AppBrowser's info screen will now allow for mouse copy selection for paste into other applications. I will post an 3.2rc3 for testing soon.
« Last Edit: October 08, 2010, 10:58:55 AM by roberts »
10+ Years Contributing to Linux Open Source Projects.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Can't copy to clipboard from 'System Stats'
« Reply #10 on: October 09, 2010, 10:53:59 PM »
I gave the new "select for copy" feature a quick test with TC 3.2rc3 and like to say that it worked exactly as I hoped for. Even in 'aterm' (which I pretty much use exclusively) the pasting worked as expected (though someone might doubt that ....). So thanks again for that enhancement.

Now, and I don't want to sound ungrateful here, I was wondering whether bringing this feature to the other 'appbrowser' tabs (including the 'Select Extensions' list) would be too much to ask. Obviously I have no clue how involved such a change would be, but I'm pleased to see that the size of 'appbrowser' did not "explode". An increase of the size of the executable by ca. 2.5% seems rather modest in my book. So maybe as a means to have the "select to copy" ability uniformly accross the application could be considered. Or would that be seen as already a step too far in the direction towards "bloatware"?

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Can't copy to clipboard from 'System Stats'
« Reply #11 on: October 10, 2010, 10:57:06 AM »
The other tabs are pick lists and not textual displays.
A mouse selection on a pick list already has a defined action.
10+ Years Contributing to Linux Open Source Projects.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Can't copy to clipboard from 'System Stats'
« Reply #12 on: October 10, 2010, 03:58:09 PM »
Now, that was rather stupid of me to suggest to include the 'Select Extensions' list. On reflection I'm not quite sure how I came up with that idea, but clearly that does not make sense.

Nevertheless, does your reponse mean that the 'Files', 'Depends' and 'Size' tabs are pick lists? I'd be surprised if that would be the case. So would they possibly qualify for the "select for copy" feature?

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Can't copy to clipboard from 'System Stats'
« Reply #13 on: October 10, 2010, 04:11:52 PM »
The other tabs are indeed not pick lists, so yes to 'select for copy'.
10+ Years Contributing to Linux Open Source Projects.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Can't copy to clipboard from 'System Stats'
« Reply #14 on: October 10, 2010, 10:31:14 PM »
Completed.
10+ Years Contributing to Linux Open Source Projects.