[arch-commits] Commit in pidgin-libnotify/trunk (2 files)
Date: Sunday, June 7, 2020 @ 12:27:41 Author: bgyorgy Revision: 639969 upgpkg: pidgin-libnotify 0.14-12: Add support for notify-osd Added: pidgin-libnotify/trunk/pidgin-libnotify-notify-osd.patch Modified: pidgin-libnotify/trunk/PKGBUILD ---+ PKGBUILD | 21 ++- pidgin-libnotify-notify-osd.patch | 49 2 files changed, 63 insertions(+), 7 deletions(-) Modified: PKGBUILD === --- PKGBUILD2020-06-07 12:19:23 UTC (rev 639968) +++ PKGBUILD2020-06-07 12:27:41 UTC (rev 639969) @@ -5,7 +5,7 @@ pkgname=pidgin-libnotify pkgver=0.14 -pkgrel=11 +pkgrel=12 arch=('x86_64') pkgdesc="Pidgin plugin that enables popups when someone logs in or messages you" url="http://gaim-libnotify.sourceforge.net/"; @@ -16,12 +16,14 @@ language_fixes.patch pidgin-libnotify-0.14-libnotify-0.7.patch pidgin-libnotify-showbutton.patch -pidgin-libnotify-getfocus.patch) -md5sums=('bfb5368b69c02d429b2b17c00a6673c0' - 'c89e3cdc5db3525e37be4687f1e17d0a' - '05538625f14d9f2c12adae5fa6a1fa26' - 'efe1e86aa1e0bc9f7d20efe7f34ad4a7' - 'e624998744d1c2fb8e2c6be94b04c38a') +pidgin-libnotify-getfocus.patch +pidgin-libnotify-notify-osd.patch) +sha256sums=('74f4a9f20e0a483df39974178f1f2380786176189512bcd438e4ada280ec3abe' +'11f24523acd0dd740e17f98b360fc2f4679536a8dd79d19e247bc0e90a65045d' +'e9c8d71b74985e11ef2939033fc2feeac037eb6553272a11ddc8417a79baafda' +'897a1f99255476110dd3d5e888134f255e60e9539f65e8c3c516640a0790838b' +'1712c96e0cea68c21a909981246e06ea2d60ad41f77da1e399503443867e2186' +'bb101a9d24c0dc94df56bf4b38026a6ec89a83b97d473909727166de751588cf') prepare() { cd $pkgname-$pkgver @@ -29,11 +31,16 @@ patch -Np0 -i ../pidgin-libnotify-0.14-libnotify-0.7.patch patch -Np0 -i ../pidgin-libnotify-showbutton.patch patch -Np0 -i ../pidgin-libnotify-getfocus.patch + patch -Np1 -i ../pidgin-libnotify-notify-osd.patch } build() { cd $pkgname-$pkgver ./configure --prefix=/usr --disable-deprecated + + # https://bugzilla.gnome.org/show_bug.cgi?id=656231 + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + make } Added: pidgin-libnotify-notify-osd.patch === --- pidgin-libnotify-notify-osd.patch (rev 0) +++ pidgin-libnotify-notify-osd.patch 2020-06-07 12:27:41 UTC (rev 639969) @@ -0,0 +1,49 @@ +diff -aur pidgin-libnotify-0.14/src/pidgin-libnotify.c pidgin-libnotify-0.14.new/src/pidgin-libnotify.c +--- pidgin-libnotify-0.14/src/pidgin-libnotify.c pidgin-libnotify-0.14.new/src/pidgin-libnotify.c +@@ -287,6 +287,32 @@ + 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, +@@ -389,7 +415,11 @@ + + notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL); + +- notify_notification_add_action (notification, "show", _("Show"), action_cb, NULL, NULL); ++ /* Check if notification server can use actions */ ++ if (notify_supports_actions ()) ++ { ++ notify_notification_add_action (notification, "show", _("Show"), action_cb, NULL, NULL); ++ } + + notify_notification_set_timeout(notification, purple_prefs_get_int("/plugins/gtk/libnotify/timeout")); + if (!notify_notification_show (notification, NULL)) {
[arch-commits] Commit in pidgin-libnotify/trunk (2 files)
Date: Thursday, May 16, 2013 @ 12:52:08 Author: bgyorgy Revision: 90955 upgpkg: pidgin-libnotify 0.14-8 Fix FS#35135 Added: pidgin-libnotify/trunk/pidgin-libnotify-getfocus.patch Modified: pidgin-libnotify/trunk/PKGBUILD -+ PKGBUILD| 15 pidgin-libnotify-getfocus.patch | 69 ++ 2 files changed, 78 insertions(+), 6 deletions(-) Modified: PKGBUILD === --- PKGBUILD2013-05-16 10:33:01 UTC (rev 90954) +++ PKGBUILD2013-05-16 10:52:08 UTC (rev 90955) @@ -4,7 +4,7 @@ pkgname=pidgin-libnotify pkgver=0.14 -pkgrel=7 +pkgrel=8 arch=('i686' 'x86_64') pkgdesc="pidgin plugin that enables popups when someone logs in or messages you." url="http://gaim-libnotify.sourceforge.net/"; @@ -14,22 +14,25 @@ optdepends=('notification-daemon') options=(!libtool) source=(http://downloads.sourceforge.net/sourceforge/gaim-libnotify/$pkgname-$pkgver.tar.gz language_fixes.patch -pidgin-libnotify-0.14-libnotify-0.7.patch pidgin-libnotify-showbutton.patch) +pidgin-libnotify-0.14-libnotify-0.7.patch pidgin-libnotify-showbutton.patch pidgin-libnotify-getfocus.patch) +md5sums=('bfb5368b69c02d429b2b17c00a6673c0' + 'e9bdbb3c7faa61f062fc64277457b6c0' + '05538625f14d9f2c12adae5fa6a1fa26' + 'efe1e86aa1e0bc9f7d20efe7f34ad4a7' + 'e624998744d1c2fb8e2c6be94b04c38a') build() { cd "$srcdir/$pkgname-$pkgver" patch -Np1 -i "$srcdir/language_fixes.patch" patch -Np0 -i "$srcdir/pidgin-libnotify-0.14-libnotify-0.7.patch" patch -Np0 -i "$srcdir/pidgin-libnotify-showbutton.patch" + patch -Np0 -i "$srcdir/pidgin-libnotify-getfocus.patch" ./configure --prefix=/usr --disable-deprecated --disable-static make } + package() { cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" install } -md5sums=('bfb5368b69c02d429b2b17c00a6673c0' - 'e9bdbb3c7faa61f062fc64277457b6c0' - '05538625f14d9f2c12adae5fa6a1fa26' - 'efe1e86aa1e0bc9f7d20efe7f34ad4a7') Added: pidgin-libnotify-getfocus.patch === --- pidgin-libnotify-getfocus.patch (rev 0) +++ pidgin-libnotify-getfocus.patch 2013-05-16 10:52:08 UTC (rev 90955) @@ -0,0 +1,69 @@ +--- src/pidgin-libnotify.c 2013-05-07 17:38:31.397261982 +0200 src2/pidgin-libnotify.c2013-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); + }