diff --git a/srcpkgs/pidgin-libnotify/patches/pidgin-libnotify-0.14-libnotify-0.7.patch b/srcpkgs/pidgin-libnotify/patches/pidgin-libnotify-0.14-libnotify-0.7.patch new file mode 100644 index 00000000000..40e6c02b815 --- /dev/null +++ b/srcpkgs/pidgin-libnotify/patches/pidgin-libnotify-0.14-libnotify-0.7.patch @@ -0,0 +1,18 @@ +--- src/pidgin-libnotify.c ++++ src/pidgin-libnotify.c +@@ -286,7 +286,15 @@ + g_free (tr_body); + return; + } ++#ifdef NOTIFY_CHECK_VERSION ++#if NOTIFY_CHECK_VERSION (0, 7, 0) ++ notification = notify_notification_new (title, tr_body, NULL); ++#else + notification = notify_notification_new (title, tr_body, NULL, NULL); ++#endif ++#else ++ notification = notify_notification_new (title, tr_body, NULL, NULL); ++#endif + purple_debug_info (PLUGIN_ID, "notify(), new: " + "title: '%s', body: '%s', buddy: '%s'\n", + title, tr_body, best_name (buddy)); diff --git a/srcpkgs/pidgin-libnotify/patches/pidgin-libnotify-getfocus.patch b/srcpkgs/pidgin-libnotify/patches/pidgin-libnotify-getfocus.patch new file mode 100644 index 00000000000..db45829d9d7 --- /dev/null +++ b/srcpkgs/pidgin-libnotify/patches/pidgin-libnotify-getfocus.patch @@ -0,0 +1,69 @@ +--- src/pidgin-libnotify.c 2013-05-07 17:38:31.397261982 +0200 ++++ src2/pidgin-libnotify.c 2013-05-07 17:43:43.787904584 +0200 +@@ -169,6 +169,49 @@ pixbuf_from_buddy_icon (PurpleBuddyIcon + return icon; + } + ++/* Taken from pidgin-hotkeys to get focus on conversation window */ ++static void ++hacky_active_window(GtkWidget *window) ++{ ++ GdkScreen *screen; ++ GdkWindow *root; ++ GdkDisplay *display; ++ Display *xdisplay; ++ Window xroot; ++ XEvent xev; ++ static Atom _net_active_window = None; ++ ++ screen = gtk_widget_get_screen(window); ++ root = gdk_screen_get_root_window(screen); ++ display = gdk_screen_get_display(screen); ++ ++ xdisplay = GDK_DISPLAY_XDISPLAY(display); ++ xroot = GDK_WINDOW_XWINDOW(root); ++ ++ if (_net_active_window == None) ++ _net_active_window = XInternAtom(xdisplay, ++ "_NET_ACTIVE_WINDOW", ++ False); ++ ++ xev.xclient.type = ClientMessage; ++ xev.xclient.serial = 0; ++ xev.xclient.send_event = True; ++ xev.xclient.window = GDK_WINDOW_XWINDOW(window->window); ++ xev.xclient.message_type = _net_active_window; ++ xev.xclient.format = 32; ++ xev.xclient.data.l[0] = 1; /* requestor type; we're an app, I guess */ ++ xev.xclient.data.l[1] = CurrentTime; ++ xev.xclient.data.l[2] = None; /* "currently active window", supposedly */ ++ xev.xclient.data.l[3] = 0; ++ xev.xclient.data.l[4] = 0; ++ ++ XSendEvent(xdisplay, ++ xroot, False, ++ SubstructureRedirectMask | SubstructureNotifyMask, ++ &xev); ++} ++ ++ + static void + action_cb (NotifyNotification *notification, + gchar *action, gpointer user_data) +@@ -194,6 +237,16 @@ action_cb (NotifyNotification *notificat + buddy->name); + } + conv->ui_ops->present (conv); ++ ++ /* get the focus on the new conversation window */ ++ { ++ GtkWindow *gtkwindow; ++ ++ gtkwindow = GTK_WINDOW(pidgin_conv_get_window(PIDGIN_CONVERSATION(conv))->window); ++ /*gtk_window_present(gtkwindow);*/ ++ hacky_active_window(GTK_WIDGET(gtkwindow)); ++ } ++ + + notify_notification_close (notification, NULL); + } diff --git a/srcpkgs/pidgin-libnotify/patches/pidgin-libnotify-showbutton.patch b/srcpkgs/pidgin-libnotify/patches/pidgin-libnotify-showbutton.patch new file mode 100644 index 00000000000..1f84e602555 --- /dev/null +++ b/srcpkgs/pidgin-libnotify/patches/pidgin-libnotify-showbutton.patch @@ -0,0 +1,10 @@ +--- src/pidgin-libnotify.c.orig 2007-10-01 20:52:38.000000000 +1000 ++++ src/pidgin-libnotify.c 2007-10-01 20:53:20.000000000 +1000 +@@ -307,6 +307,7 @@ + g_hash_table_insert (buddy_hash, contact, notification); + + g_object_set_data (G_OBJECT(notification), "contact", contact); ++ g_object_set_data (G_OBJECT(notification), "buddy", buddy); + + g_signal_connect (notification, "closed", G_CALLBACK(closed_cb), NULL); + diff --git a/srcpkgs/pidgin-libnotify/template b/srcpkgs/pidgin-libnotify/template new file mode 100644 index 00000000000..a9676ecc602 --- /dev/null +++ b/srcpkgs/pidgin-libnotify/template @@ -0,0 +1,15 @@ +# Template file for 'pidgin-libnotify' +pkgname=pidgin-libnotify +version=0.14 +revision=1 +lib32disabled=yes +build_style=gnu-configure +configure_args="--disable-deprecated --disable-static" +hostmakedepends="intltool pkg-config" +makedepends="pidgin-devel libnotify-devel" +short_desc="Pidgin plugin that enables popups when someone logs in or messages you" +maintainer="Kharlamov Alexey " +license="GPL-3" +homepage="http://gaim-libnotify.sourceforge.net/" +distfiles="${SOURCEFORGE_SITE}/gaim-libnotify/${pkgname}-${version}.tar.gz" +checksum=74f4a9f20e0a483df39974178f1f2380786176189512bcd438e4ada280ec3abe