Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=notifyosd.git;a=commitdiff;h=983f5a2aafe4aa0fa7e3809da8879e87cbda6ed8

commit 983f5a2aafe4aa0fa7e3809da8879e87cbda6ed8
Author: Cedynamix <cedyna...@gmail.com>
Date:   Tue May 26 00:32:34 2009 +0200

pidgin-libnotify-notify-osd-0.14-1-i686

* new package

diff --git a/source/gnome-extra/pidgin-libnotify-notify-osd/FrugalBuild 
b/source/gnome-extra/pidgin-libnotify-notify-osd/FrugalBuild
new file mode 100644
index 0000000..a4c9886
--- /dev/null
+++ b/source/gnome-extra/pidgin-libnotify-notify-osd/FrugalBuild
@@ -0,0 +1,32 @@
+# Compiling time: 0.07 SBU
+# Maintainer: Cedrick Hannier alias Cedynamix <cedyna...@gmail.com>
+
+pkgname=pidgin-libnotify-notify-osd
+pkgver=0.14
+pkgrel=1
+archs=('i686')
+pkgdesc="Patched pidgin-libnotify version for notify-osd"
+_F_sourceforge_dirname="gaim-libnotify"
+_F_sourceforge_name="pidgin-libnotify"
+_F_cd_path="$_F_sourceforge_name-$pkgver"
+Finclude sourceforge
+url="http://gaim-libnotify.sourceforge.net/";
+depends=('pidgin>=2.5.3' 'libnotify' 'libxau' 'libxdmcp' 'zlib' 'libxext' 
'libxdamage')
+groups=('gnome-extra')
+makedepends=('intltool')
+conflicts=('pidgin-libnotify')
+provides=('pidgin-libnotify')
+options=('scriptlet')
+source=(${sour...@]} pidgin-notify-osd.patch)
+Fconfopts="${fconfop...@]} --disable-deprecated"
+sha1sums=('005e9663c7a36f68b9572341654818720a1e571a' \
+          'cf121ec588d61c013db03ee9b82ebee36a94f3cd')
+
+build() {
+Fpatch pidgin-notify-osd.patch
+Fconf
+Fmake
+Fmakeinstall
+}
+
+# optimization OK
diff --git 
a/source/gnome-extra/pidgin-libnotify-notify-osd/pidgin-notify-osd.patch 
b/source/gnome-extra/pidgin-libnotify-notify-osd/pidgin-notify-osd.patch
new file mode 100644
index 0000000..577aeec
--- /dev/null
+++ b/source/gnome-extra/pidgin-libnotify-notify-osd/pidgin-notify-osd.patch
@@ -0,0 +1,141 @@
+*** pidgin-libnotify-0.14/src/pidgin-libnotify.c       2008-12-14 
10:45:51.000000000 -0700
+--- pidgin-libnotify-0.14/src/pidgin-libnotify.c       2009-02-24 
13:01:47.000000000 -0700
+***************
+*** 254,259 ****
+--- 254,285 ----
+       return purple_status_is_online (status) && purple_status_is_available 
(status);
+  }
+
++ static gboolean
++ notify_supports_actions ()
++ {
++      GList *caps;
++      gint i = 0;
++
++      caps = notify_get_server_caps ();
++
++      do
++      {
++              if (g_strcmp0 (caps->data, "actions") == 0)
++              {
++                      g_list_free (caps);
++                      return TRUE;
++              }
++
++              if (caps->next != NULL)
++                      caps = g_list_next (caps);
++
++      } while (caps->next != NULL);
++
++      g_list_free (caps);
++
++      return FALSE;
++ }
++
+  static void
+  notify (const gchar *title,
+               const gchar *body,
+***************
+*** 316,323 ****
+       g_signal_connect (notification, "closed", G_CALLBACK(closed_cb), NULL);
+
+       notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
+!
+!      notify_notification_add_action (notification, "show", _("Show"), 
action_cb, NULL, NULL);
+
+       if (!notify_notification_show (notification, NULL)) {
+               purple_debug_error (PLUGIN_ID, "notify(), failed to send 
notification\n");
+--- 342,353 ----
+       g_signal_connect (notification, "closed", G_CALLBACK(closed_cb), NULL);
+
+       notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
+!
+!      /* Check if notification server can use actions */
+!      if (notify_supports_actions ())
+!      {
+!              notify_notification_add_action (notification, "show", 
_("Show"), action_cb, NULL, NULL);
+!      }
+
+       if (!notify_notification_show (notification, NULL)) {
+               purple_debug_error (PLUGIN_ID, "notify(), failed to send 
notification\n");
+***************
+*** 329,335 ****
+  notify_buddy_signon_cb (PurpleBuddy *buddy,
+                                               gpointer data)
+  {
+!      gchar *tr_name, *title;
+       gboolean blocked;
+
+       g_return_if_fail (buddy);
+--- 359,365 ----
+  notify_buddy_signon_cb (PurpleBuddy *buddy,
+                                               gpointer data)
+  {
+!      gchar *tr_name;
+       gboolean blocked;
+
+       g_return_if_fail (buddy);
+***************
+*** 349,367 ****
+
+       tr_name = truncate_escape_string (best_name (buddy), 25);
+
+!      title = g_strdup_printf (_("%s signed on"), tr_name);
+!
+!      notify (title, NULL, buddy);
+
+       g_free (tr_name);
+-      g_free (title);
+  }
+
+  static void
+  notify_buddy_signoff_cb (PurpleBuddy *buddy,
+                                                gpointer data)
+  {
+!      gchar *tr_name, *title;
+       gboolean blocked;
+
+       g_return_if_fail (buddy);
+--- 379,394 ----
+
+       tr_name = truncate_escape_string (best_name (buddy), 25);
+
+!      notify (tr_name, "Signed on", buddy);
+
+       g_free (tr_name);
+  }
+
+  static void
+  notify_buddy_signoff_cb (PurpleBuddy *buddy,
+                                                gpointer data)
+  {
+!      gchar *tr_name;
+       gboolean blocked;
+
+       g_return_if_fail (buddy);
+***************
+*** 381,392 ****
+
+       tr_name = truncate_escape_string (best_name (buddy), 25);
+
+!      title = g_strdup_printf (_("%s signed off"), tr_name);
+!
+!      notify (title, NULL, buddy);
+
+       g_free (tr_name);
+-      g_free (title);
+  }
+
+  static void
+--- 408,416 ----
+
+       tr_name = truncate_escape_string (best_name (buddy), 25);
+
+!      notify (tr_name, "Signed off", buddy);
+
+       g_free (tr_name);
+  }
+
+  static void
+
+
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to