[seahorse-plugins/f14/master] Update the clipboard patch
Tomas Bzatek
tbzatek at fedoraproject.org
Mon Jan 17 11:02:43 UTC 2011
commit 6807ca4fa2f6c1145cddd40f10aeea4a4c34d2f9
Author: Tomas Bzatek <tbzatek at redhat.com>
Date: Mon Jan 17 12:02:26 2011 +0100
Update the clipboard patch
clipboard-disconnect.patch | 32 ++++++++++++++++++++++++--------
1 files changed, 24 insertions(+), 8 deletions(-)
---
diff --git a/clipboard-disconnect.patch b/clipboard-disconnect.patch
index 2d6b9a0..4fef4a3 100644
--- a/clipboard-disconnect.patch
+++ b/clipboard-disconnect.patch
@@ -1,6 +1,6 @@
diff -up seahorse-plugins-2.30.1/plugins/applet/seahorse-applet.c.clipboard seahorse-plugins-2.30.1/plugins/applet/seahorse-applet.c
---- seahorse-plugins-2.30.1/plugins/applet/seahorse-applet.c.clipboard 2010-09-03 14:12:07.671035002 -0400
-+++ seahorse-plugins-2.30.1/plugins/applet/seahorse-applet.c 2010-09-03 14:19:06.757035002 -0400
+--- seahorse-plugins-2.30.1/plugins/applet/seahorse-applet.c.clipboard 2010-04-16 21:00:34.000000000 -0400
++++ seahorse-plugins-2.30.1/plugins/applet/seahorse-applet.c 2010-11-03 21:10:16.471241996 -0400
@@ -151,6 +151,9 @@ typedef struct _SeahorseAppletPrivate {
GtkClipboard *board;
GtkWidget *menu;
@@ -11,9 +11,21 @@ diff -up seahorse-plugins-2.30.1/plugins/applet/seahorse-applet.c.clipboard seah
} SeahorseAppletPrivate;
#define SEAHORSE_APPLET_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), SEAHORSE_TYPE_APPLET, SeahorseAppletPrivate))
-@@ -898,14 +901,15 @@ seahorse_applet_init (SeahorseApplet *ap
+@@ -873,6 +876,7 @@ seahorse_applet_init (SeahorseApplet *ap
+ {
+ SeahorseAppletPrivate *priv;
+ GdkAtom atom;
++ GdkDisplay *display;
+ GtkClipboard *board;
+
+ priv = SEAHORSE_APPLET_GET_PRIVATE (applet);
+@@ -896,16 +900,18 @@ seahorse_applet_init (SeahorseApplet *ap
+
+ /* Setup Clipboard Handling */
atom = gdk_atom_intern ("CLIPBOARD", FALSE);
- board = gtk_clipboard_get (atom);
+- board = gtk_clipboard_get (atom);
++ display = gtk_widget_get_display (GTK_WIDGET (applet));
++ board = gtk_clipboard_get_for_display (display, atom);
handle_clipboard_owner_change (board, NULL, applet);
- g_signal_connect (board, "owner-change",
- G_CALLBACK (handle_clipboard_owner_change), applet);
@@ -22,29 +34,33 @@ diff -up seahorse-plugins-2.30.1/plugins/applet/seahorse-applet.c.clipboard seah
+ G_CALLBACK (handle_clipboard_owner_change), applet);
atom = gdk_atom_intern ("PRIMARY", FALSE);
- board = gtk_clipboard_get (atom);
+- board = gtk_clipboard_get (atom);
- g_signal_connect (board, "owner-change",
- G_CALLBACK (handle_clipboard_owner_change), applet);
-
++ board = gtk_clipboard_get_for_display (display, atom);
+ priv->primary_owner_change_id =
+ g_signal_connect (board, "owner-change",
+ G_CALLBACK (handle_clipboard_owner_change), applet);
}
static void
-@@ -944,6 +948,17 @@ static void
+@@ -944,6 +950,20 @@ static void
seahorse_applet_finalize (GObject *object)
{
SeahorseAppletPrivate *priv = SEAHORSE_APPLET_GET_PRIVATE (object);
+ GtkClipboard *board;
++ GdkDisplay *display;
++
++ display = gtk_widget_get_display (GTK_WIDGET (object));
+
+ if (priv->clipboard_owner_change_id) {
-+ g_signal_handler_disconnect (gdk_clipboard_get (GDK_SELECTION_CLIPBOARD),
++ g_signal_handler_disconnect (gtk_clipboard_get_for_display (display, GDK_SELECTION_CLIPBOARD),
+ priv->clipboard_owner_change_id);
+ }
+
+ if (priv->primary_owner_change_id) {
-+ g_signal_handler_disconnect (gdk_clipboard_get (GDK_SELECTION_PRIMARY),
++ g_signal_handler_disconnect (gtk_clipboard_get_for_display (display, GDK_SELECTION_PRIMARY),
+ priv->primary_owner_change_id);
+ }
More information about the scm-commits
mailing list