[Gambas-user] Persistent clipboard?

Bruce Steers bsteers4 at gmail.com
Sat Jan 30 21:46:25 CET 2021


On Sat, 30 Jan 2021, 17:10 Benoît Minisini, <g4mba5 at gmail.com> wrote:

> Le 30/01/2021 à 17:54, Bruce Steers a écrit :
> >
> > Can anything be done about the way the clipboard clears on app exit?
> >
>
> The clipboard is entirely managed by the underlying toolkit (GTK+ or Qt)
> (even if it requires its bunch of cryptic code
>   in both toolkits).
>
> > I have just implemented into a few of my apps detecting clipit.
> > clipit seems to work well
> > upon a call to Clipboard.Copy() i use a simple...
> > *
> > *
> > *If $bHasClipit Then Shell "echo -n " & Quote(sText) & "|clipit"*
> > *
> > *
>
> Voilà. A persistent clipboard needs a persistent external program.
>
> Obviously, Gambas cannot do anything reliable, as it cannot ensure that
> clipit, or any other clipboard manager is running, or can be run reliably.
>
> Besides a hack like you did, I don't think it exists a standard solution
> that could be implemented inside Gambas (something like xdg-tools that
> can triggers actions according to the current desktop).
>

Dang, it's a shame, for sure a linux desktop flaw.

A hack it is then 😆
I will look into it a bit more, see if theres a better hack may work (I'm
thinking shell)

Thank you for the reply.
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210130/2056ae5a/attachment.htm>


More information about the User mailing list