[mail-notification] Fixed a compatibility issue with libnotify 0.7

epienbro epienbro at fedoraproject.org
Sun Dec 11 12:03:35 UTC 2011


commit bf59f4eab091c71c4ee82ef881a0ba5d8e505262
Author: Erik van Pienbroek <erik at vanpienbroek.nl>
Date:   Sun Dec 11 13:02:52 2011 +0100

    Fixed a compatibility issue with libnotify 0.7
    
    This fixes warnings like these:
      GLib-GObject-WARNING **: g_object_set_valist: object class `MNPopup'
      has no property named `attach-widget'

 mail-notification-5.4-popup-attach.patch |   14 +++++++++-----
 mail-notification.spec                   |    4 +---
 2 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/mail-notification-5.4-popup-attach.patch b/mail-notification-5.4-popup-attach.patch
index b8d5f6a..8267994 100644
--- a/mail-notification-5.4-popup-attach.patch
+++ b/mail-notification-5.4-popup-attach.patch
@@ -1,10 +1,12 @@
 diff -Nrbu mail-notification-5.4/build/src/mn-popup.c mail-notification-5.4-OK/build/src/mn-popup.c
 --- mail-notification-5.4/build/src/mn-popup.c	2008-05-22 19:47:49.000000000 +0400
 +++ mail-notification-5.4-OK/build/src/mn-popup.c	2010-10-11 17:42:32.000000000 +0400
-@@ -177,6 +177,29 @@
+@@ -176,6 +176,31 @@
+ }
  #undef __GOB_FUNCTION__
  
- static void 
++#if !NOTIFY_CHECK_VERSION(0,7,0)
++static void 
 +mn_popup_wait_for_icon_to_become_ready (void)
 +{
 +    int x, y;
@@ -25,21 +27,23 @@ diff -Nrbu mail-notification-5.4/build/src/mn-popup.c mail-notification-5.4-OK/b
 +        count++;
 +    } while (count < 20);
 +}
++#endif
 +
 +
-+static void 
+ static void 
  mn_popup_init (MNPopup * o G_GNUC_UNUSED)
  {
- #define __GOB_FUNCTION__ "MN:Popup::init"
-@@ -299,8 +322,10 @@
+@@ -299,8 +324,12 @@
  		 "icon-name", "stock_mail",
  		 NULL);
  
 -    if (mn_conf_get_enum_value(MN_TYPE_POPUP_POSITION, MN_CONF_POPUPS_POSITION) == MN_POPUP_POSITION_ATTACHED)
++#if !NOTIFY_CHECK_VERSION(0,7,0)
 +    if (mn_conf_get_enum_value(MN_TYPE_POPUP_POSITION, MN_CONF_POPUPS_POSITION) == MN_POPUP_POSITION_ATTACHED) {
 +      mn_popup_wait_for_icon_to_become_ready();
        g_object_set(self, "attach-widget", mn_shell->icon, NULL);
 +    }
++#endif
  
      g_string_free(body, TRUE);
  
diff --git a/mail-notification.spec b/mail-notification.spec
index a3600c6..cbacbe4 100644
--- a/mail-notification.spec
+++ b/mail-notification.spec
@@ -47,9 +47,6 @@ BuildRequires:  gtk2-devel
 # needed for the GConf RPM macros
 BuildRequires:	GConf2
 
-# temporary to work-around some dependency issues in other packages...
-#BuildRequires:  libICE-devel, libSM-devel
-
 Requires:         hicolor-icon-theme
 
 Requires(pre):    GConf2
@@ -241,6 +238,7 @@ touch --no-create %{_datadir}/icons/hicolor || :
 - Fixed a memory corruption issue in the tooltips code
 - RHBZ #682584: Use the GConf macros as mentioned at 
   https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#GConf
+- Fixed a compatibility issue with libnotify 0.7 (attach-widget warnings)
 - Dropped ancient obsoletes tags and triggers
 - Dropped unneeded RPM tags
 


More information about the scm-commits mailing list