! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Clipboard manager in the settings daemon
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-settings
Component:
General

Comments

Description Nick Schermer editbugs 2008-08-29 11:23:09 CEST
Now we have a settings daemon, if would be nice to add a clipboard manager in it so clipboard content is stored when an application closes.

There are implementations in gnome and moblin we can use:
http://moblin.org/repos/?p=projects/moblin-applets.git;a=tree
http://svn.gnome.org/viewvc/gnome-settings-daemon/trunk/plugins/clipboard/

No dialog or so, maybe a channel with 1 setting to enable/disable to backend.
Comment 1 Brian J. Tarricone (not reading bugmail) 2008-08-29 19:33:29 CEST
Cool, sounds like a good idea.  Perhaps we should wait for beta1 or beta2, though.  There are enough things that need fixing for alpha; I don't want too much more new untested code for alpha if we can help it.
Comment 2 Nick Schermer editbugs 2008-08-30 06:44:06 CEST
Yeah i'll look into it and wait for the commit after pinky is released.
Comment 3 Mike Massonnet editbugs 2009-09-10 13:47:08 CEST
For the record, I copied that daemon into clipman. Currently it does the job correctly except for one bug (bug 5738), the clipboard selection is lost when copying text from firefox/thunderbird also google chrome.

When this goes into xfce-settings there should not be any enable/disable setting. The daemon should start by checking if the atom CLIPBOARD_MANAGER is free. Also the daemon will stop when someone else makes a request to take over the atom.
Comment 4 Jérôme Guelfucci editbugs 2009-11-16 22:43:22 CET
Created attachment 2675 
Patch to add a clipboard daemon

Here is a patch which adds a clipboard manager daemon based on xfce4-clipman-plugin code. I simply copied Mike's code for the gobject and started the daemon when launching xfce4settings-helper. If there is already a clipboard manager running, the daemon will not start.
Comment 5 Nick Schermer editbugs 2009-11-17 18:50:23 CET
So this was in master for a couple of minutes, but people had code issues. So the following changes as discussed no irc:

- XfceClipboardManager object name.
- Use indent style we use in xfce4-settings (same as thunar fyi).
- Start all function with xfce_clipboard_manager, easier for debugging.
- Don't use a singleton, no use here.
- Drop the {g,s}et_property functions.
- Don't see any use for the idle to start the daemon.
Comment 6 Mike Massonnet editbugs 2009-11-18 11:10:15 CET
(In reply to comment #5)
> So this was in master for a couple of minutes, but people had code issues. So
> the following changes as discussed no irc:
> 
> - XfceClipboardManager object name.
> - Use indent style we use in xfce4-settings (same as thunar fyi).
> - Start all function with xfce_clipboard_manager, easier for debugging.
> - Don't use a singleton, no use here.
> - Drop the {g,s}et_property functions.
> - Don't see any use for the idle to start the daemon.

I wouldn't bother, it will just make it a bit annoying to sync it with GNOME (even if there isn't any real reason it should change much). But who knows.
Comment 7 Nick Schermer editbugs 2009-11-18 12:05:19 CET
The code in Gnome is still using X directly right? So what is there so sync.
Comment 8 Jérôme Guelfucci editbugs 2009-11-26 23:52:47 CET
Ok, I believe my branch is ready to be reviewed. I addressed all the points listed above.

I just have one doubt, I wonder if the clipboard manager should be unrefed in xfce4-settings-helper code.
Comment 9 Nick Schermer editbugs 2009-11-27 10:43:30 CET
I was wrong about the thunar code style, sorry for that. Also fixed some other issues and pushed it to your branch. Please test of the manager selection still works with the clipboard plugin.
Comment 10 Jérôme Guelfucci editbugs 2010-01-08 20:30:06 CET
Branched merged to master and released in 4.7.0.

Bug #4333

Reported by:
Nick Schermer
Reported on: 2008-08-29
Last modified on: 2010-01-08

People

Assignee:
Nick Schermer
CC List:
6 users

Version

Attachments

Patch to add a clipboard daemon (21.75 KB, patch)
2009-11-16 22:43 CET , Jérôme Guelfucci
no flags

Additional information