[Goodies-commits] r6369 - in xfce4-clipman-plugin/trunk: . panel-plugin
Mike Massonnet
mmassonnet at xfce.org
Sat Dec 27 13:18:35 CET 2008
Author: mmassonnet
Date: 2008-12-27 12:18:35 +0000 (Sat, 27 Dec 2008)
New Revision: 6369
Modified:
xfce4-clipman-plugin/trunk/ChangeLog
xfce4-clipman-plugin/trunk/panel-plugin/clipman.c
Log:
* panel-plugin/clipman.c (clipman_check): Don't restore the clipboard
if it actually contains an image (patch from David Collins)
Modified: xfce4-clipman-plugin/trunk/ChangeLog
===================================================================
--- xfce4-clipman-plugin/trunk/ChangeLog 2008-12-26 22:49:13 UTC (rev 6368)
+++ xfce4-clipman-plugin/trunk/ChangeLog 2008-12-27 12:18:35 UTC (rev 6369)
@@ -1,4 +1,10 @@
+2008-12-27 Mike Massonnet <mmassonnet at xfce.org>
+
+ * panel-plugin/clipman.c (clipman_check): Don't restore the clipboard
+ if it actually contains an image (patch from David Collins)
+
2008-09-21 Mike Massonnet <mmassonnet at xfce.org>
+
* Fix build for libtool 2.2 (or at least for ArchLinux)
2008-03-04 Mike Massonnet <mmassonnet at xfce.org>
Modified: xfce4-clipman-plugin/trunk/panel-plugin/clipman.c
===================================================================
--- xfce4-clipman-plugin/trunk/panel-plugin/clipman.c 2008-12-26 22:49:13 UTC (rev 6368)
+++ xfce4-clipman-plugin/trunk/panel-plugin/clipman.c 2008-12-27 12:18:35 UTC (rev 6369)
@@ -710,6 +710,7 @@
static gboolean
clipman_check (ClipmanPlugin *clipman)
{
+ gboolean clipboard_has_image;
gchar *ptext = NULL, *dtext;
GdkModifierType state;
@@ -719,9 +720,11 @@
/* Get mouse button information */
gdk_window_get_pointer(NULL, NULL, NULL, &state);
+ clipboard_has_image = gtk_clipboard_wait_is_image_available (primaryClip);
+
ptext = gtk_clipboard_wait_for_text (primaryClip);
- if (clipman->PreventEmpty && ptext == NULL)
+ if (clipman->PreventEmpty && ptext == NULL && clipboard_has_image == FALSE)
{
clipman_restore_empty (clipman, PRIMARY);
}
@@ -739,8 +742,10 @@
dtext = gtk_clipboard_wait_for_text (defaultClip);
+ clipboard_has_image = gtk_clipboard_wait_is_image_available (defaultClip);
+
/* Check default clipboard */
- if (clipman->PreventEmpty && dtext == NULL)
+ if (clipman->PreventEmpty && dtext == NULL && clipboard_has_image == FALSE)
{
clipman_restore_empty (clipman, DEFAULT);
}
More information about the Goodies-commits
mailing list