[seahorse-plugins] build against newer libnotify

Matthias Clasen mclasen at fedoraproject.org
Thu Nov 4 01:18:16 UTC 2010


commit fd8ba58b9be0406514ef19f41db3986b2d85140c
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Wed Nov 3 21:15:05 2010 -0400

    build against newer libnotify

 clipboard-disconnect.patch |   32 ++++++++++++++++++++++++--------
 notify.patch               |   12 ++++++++++++
 seahorse-plugins.spec      |   14 ++++++++------
 3 files changed, 44 insertions(+), 14 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);
 +    }
  
diff --git a/notify.patch b/notify.patch
new file mode 100644
index 0000000..58efcd2
--- /dev/null
+++ b/notify.patch
@@ -0,0 +1,12 @@
+diff -up seahorse-plugins-2.30.1/libseahorse/seahorse-notification.c.notify seahorse-plugins-2.30.1/libseahorse/seahorse-notification.c
+--- seahorse-plugins-2.30.1/libseahorse/seahorse-notification.c.notify	2010-11-03 20:51:49.177241997 -0400
++++ seahorse-plugins-2.30.1/libseahorse/seahorse-notification.c	2010-11-03 20:52:28.906241997 -0400
+@@ -213,7 +213,7 @@ setup_libnotify_notification (SeahorseNo
+     heading = format_key_text (snotif->heading);
+     message = format_key_text (snotif->message);
+     
+-    notif = notify_notification_new (heading, message, snotif->icon, attachto);
++    notif = notify_notification_new (heading, message, snotif->icon);
+     
+     g_free (heading);
+     g_free (message);
diff --git a/seahorse-plugins.spec b/seahorse-plugins.spec
index fbed2e0..847c424 100644
--- a/seahorse-plugins.spec
+++ b/seahorse-plugins.spec
@@ -1,6 +1,6 @@
 Name:		seahorse-plugins
 Version:	2.30.1
-Release:	4%{?dist}
+Release:	5%{?dist}
 Summary:	Plugins and utilities for encryption in GNOME
 Group:		User Interface/Desktops
 License:	GPLv2+ and GFDL
@@ -14,6 +14,8 @@ Patch0:		seahorse-agent-uninit.patch
 # https://bugzilla.gnome.org/show_bug.cgi?id=628720
 Patch1:         clipboard-disconnect.patch
 
+Patch2:         notify.patch
+
 BuildRequires:  intltool
 BuildRequires:  gettext-devel
 BuildRequires:  gnome-doc-utils
@@ -63,6 +65,8 @@ from applications like nautilus or gedit.
 %prep
 %setup -q
 %patch0 -p1 -b .uninit
+%patch1 -p1 -b .clipboard
+%patch2 -p1 -b .notify
 
 autoreconf -i -f
 
@@ -74,8 +78,6 @@ GNUPG=/usr/bin/gpg2 ; export GNUPG ; %configure --disable-update-mime-database -
 make %{?_smp_mflags}
 
 %install
-rm -rf $RPM_BUILD_ROOT
-
 export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
 make install DESTDIR=$RPM_BUILD_ROOT
 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
@@ -98,9 +100,6 @@ find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
 # don't use any screenshots atm
 rm -rf $RPM_BUILD_ROOT/%{_datadir}/gnome/help/seahorse-plugins/*/figures
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %post
 update-mime-database %{_datadir}/mime >& /dev/null
 update-desktop-database -q
@@ -185,6 +184,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
 #%{_libdir}/epiphany/2.27/extensions/seahorse.ephy-extension
 
 %changelog
+* Wed Nov  3 2010 Matthias Clasen <mclasen at redhat.com> 2.30.1-5
+- Rebuild against libnotify 0.7.0
+
 * Fri Sep  3 2010 Matthias Clasen <mclasen at redhat.com> 2.30.1-4
 - Try to fix a crash-at-shutdown (#601215)
 - Bring back the gedit plugin


More information about the scm-commits mailing list