Closed UnitedMarsupials-zz closed 12 years ago
Err, never mind. Turns out, my install of libnotify was out of date. The first two hunks above are only needed for libnotify-0.5.2
The last hunk, which adds constification, is still required for a clean compile, however:
--- src/purple-libnotify+-utils.c 2011-10-29 17:03:41.000000000 -0400 +++ src/purple-libnotify+-utils.c 2012-02-29 13:59:30.000000000 -0500 @@ -199,6 +196,6 @@ GdkPixbuf *protocol_icon = NULL; PurplePluginProtocolInfo *info; - gchar *protoname = NULL; - gchar *filename = NULL; + const gchar *protoname = NULL; + const gchar *filename = NULL; buddy_icon = purple_buddy_get_icon(buddy);
Thanks for the report.
I have done some work on this part of the code recently, I think the const-ification part is now ok. I released the 1.4.90 with these changes. Regarding the libnotify compat code, could you test the following patch? With yours, I lose the libnotify >= 0.7 compatibility and I would love to avoid that.
diff --git a/src/libnotify-compat.h b/src/libnotify-compat.h
index b5bcd1e..a3eb945 100644
--- a/src/libnotify-compat.h
+++ b/src/libnotify-compat.h
@@ -23,6 +23,12 @@
#ifndef __EVENTD_PLUGINS_NOTIFY_COMPAT_H__
#define __EVENTD_PLUGINS_NOTIFY_COMPAT_H__
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(a,b,c) (0)
+#endif
+
+#if ! NOTIFY_CHECK_VERSION(0,7,0)
#define notify_notification_new(summary, body, icon) notify_notification_new(summary, body, icon, NULL)
+#endif
#endif /* __EVENTD_PLUGINS_NOTIFY_COMPAT_H__ */
diff --git a/src/purple-libnotify+-utils.c b/src/purple-libnotify+-utils.c
index dfcc234..3db0169 100644
--- a/src/purple-libnotify+-utils.c
+++ b/src/purple-libnotify+-utils.c
@@ -21,9 +21,7 @@
#include "purple-libnotify+-common.h"
#include <libnotify/notify.h>
-#if ! NOTIFY_CHECK_VERSION(0,7,0)
#include "libnotify-compat.h"
-#endif
#include "purple-libnotify+-utils.h"
There is no src/libnotify-compat.h in the 1.2.91 -- the most recent release available :-)
Oh, nice catch. That should be fixed in 1.4.91.
Did you test the 1.4.90 release (and the 1.4.91 now) regarding the other problem?
Any news?
On 11.03.2012 08:35, Quentin Glidic wrote:
Any news? No, sorry -- other priorities :(
I looked into libnotify-plus, because I could not figure out, how to be notified of new messages in a chat-room. New IMs sent to me directly cause notifications, but new traffic in a chat-room only causes the chatroom's title to become red. Which means, I don't see it, unless pidgin's window is visible already.
I was hoping, libnotify-plus would have an option for that, but it does not either, it seems...
-mi
It has this feature, but I think I limited it to people you have in your buddy list. You can file a bug/feature request to improve this, I’ll look at it later.
I close this issue as it should be fixed now.
On 11.03.2012 10:09, Quentin Glidic wrote:
It has this feature, but I think I limited it to people you have in your buddy list. You can file a bug/feature request to improve this, I’ll look at it later. I think, I enabled all available notifications in the libnotify-plus settings, but still was not getting notices of new messages in a chat-room. Both of the other two participants were my "buddies".
-mi
While creating a FreeBSD port of your extension, I had to patch it to build against the version of libnotify installed by FreeBSD's devel/libnotify port (the first two hunks), and to add const-ification (the last hunk). Please, consider this for your next release. Thank you!