summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro2015-06-08 13:22:03 +0200
committerAlejandro2015-06-08 13:22:03 +0200
commit74c712df70e7b5621b1b32a86cb22d1bdb540b45 (patch)
tree7cad2321e51b95f46aba41e8d085774afa29a558
downloadaur-74c712df70e7b5621b1b32a86cb22d1bdb540b45.tar.gz
Migrated from AUR
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD40
-rw-r--r--keybinder.patch112
-rw-r--r--xfce4-notifyd.install14
4 files changed, 191 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1fde4f20ea40
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = xfce4-notifyd-keyaction
+ pkgdesc = Notification daemon for the Xfce desktop. Super+N executes the first action
+ pkgver = 0.2.4
+ pkgrel = 1
+ url = http://goodies.xfce.org/projects/applications/xfce4-notifyd
+ install = xfce4-notifyd.install
+ arch = i686
+ arch = x86_64
+ groups = xfce4-goodies
+ license = GPL2
+ makedepends = intltool
+ depends = libxfce4ui
+ depends = libnotify
+ depends = hicolor-icon-theme
+ depends = libkeybinder3
+ provides = notification-daemon
+ conflicts = xfce4-notifyd
+ replaces = xfce4-notifiyd
+ source = http://archive.xfce.org/src/apps/xfce4-notifyd/0.2/xfce4-notifyd-0.2.4.tar.bz2
+ source = keybinder.patch
+ sha256sums = 8c7ed62f9496816d1391281f77d1b32216f9bf6fd22fbe4f6f3f4e07a6bbced0
+ sha256sums = c6c040602ff207ebf3ed73edc50ae67d905485867bf79f11361c18ffc224cca1
+
+pkgname = xfce4-notifyd-keyaction
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7b2f28eae278
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+pkgname=xfce4-notifyd-keyaction
+srcname=xfce4-notifyd
+pkgver=0.2.4
+pkgrel=1
+pkgdesc="Notification daemon for the Xfce desktop. Super+N executes the first action"
+arch=('i686' 'x86_64')
+url="http://goodies.xfce.org/projects/applications/xfce4-notifyd"
+license=('GPL2')
+groups=('xfce4-goodies')
+depends=('libxfce4ui' 'libnotify' 'hicolor-icon-theme' 'libkeybinder3')
+makedepends=('intltool')
+replaces=('xfce4-notifiyd')
+conflicts=('xfce4-notifyd')
+provides=('notification-daemon')
+install=$srcname.install
+source=(http://archive.xfce.org/src/apps/$srcname/0.2/$srcname-$pkgver.tar.bz2
+ keybinder.patch)
+sha256sums=('8c7ed62f9496816d1391281f77d1b32216f9bf6fd22fbe4f6f3f4e07a6bbced0'
+ 'c6c040602ff207ebf3ed73edc50ae67d905485867bf79f11361c18ffc224cca1')
+
+build() {
+ cd "$srcdir/$srcname-$pkgver"
+
+ patch -i ../../keybinder.patch -p1
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --disable-static \
+ --disable-debug
+ make
+}
+
+package() {
+ cd "$srcdir/$srcname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
+
diff --git a/keybinder.patch b/keybinder.patch
new file mode 100644
index 000000000000..d9d80d017162
--- /dev/null
+++ b/keybinder.patch
@@ -0,0 +1,112 @@
+diff --git a/./Makefile.in b/tmp/xfce4-notifyd.KEY/src/xfce4-notifyd-0.2.4/Makefile.in
+index 40aa4a7..5dbc91d 100644
+--- a/./Makefile.in
++++ b/tmp/xfce4-notifyd.KEY/src/xfce4-notifyd-0.2.4/Makefile.in
+@@ -522,7 +522,8 @@ common_ldadd = \
+ $(LIBXFCE4UTIL_LIBS) \
+ $(LIBXFCE4UI_LIBS) \
+ $(DBUS_GLIB_LIBS) \
+- $(XFCONF_LIBS)
++ $(XFCONF_LIBS) \
++ -lkeybinder
+
+ xfce4_notifyd_xfce4_notifyd_LDADD = \
+ $(common_ldadd) \
+diff --git a/./xfce4-notifyd/main.c b/tmp/xfce4-notifyd.KEY/src/xfce4-notifyd-0.2.4/xfce4-notifyd/main.c
+index 8fab30a..2750c5f 100644
+--- a/./xfce4-notifyd/main.c
++++ b/tmp/xfce4-notifyd.KEY/src/xfce4-notifyd-0.2.4/xfce4-notifyd/main.c
+@@ -32,6 +32,7 @@
+ #include <xfconf/xfconf.h>
+ #include <libxfce4util/libxfce4util.h>
+ #include <libxfce4ui/libxfce4ui.h>
++#include <keybinder.h>
+
+ #include "xfce-notify-daemon.h"
+
+@@ -67,6 +68,8 @@ main(int argc,
+
+ gtk_init(&argc, &argv);
+
++ keybinder_init();
++
+ xfce_textdomain(GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
+
+ if(argc > 1) {
+diff --git a/./xfce4-notifyd/xfce-notify-daemon.c b/tmp/xfce4-notifyd.KEY/src/xfce4-notifyd-0.2.4/xfce4-notifyd/xfce-notify-daemon.c
+index ec2972a..c27057b 100644
+--- a/./xfce4-notifyd/xfce-notify-daemon.c
++++ b/tmp/xfce4-notifyd.KEY/src/xfce4-notifyd-0.2.4/xfce4-notifyd/xfce-notify-daemon.c
+@@ -86,6 +86,33 @@ enum
+ URGENCY_CRITICAL,
+ };
+
++#define EXAMPLE_KEY "<Super>N"
++
++
++static gboolean get_last_id(gpointer key,
++ gpointer value,
++ gpointer data){
++
++ int *last_notification = data;
++ *last_notification = key;
++ return FALSE;
++}
++void handler (const char *keystring, void *user_data) {
++ int last_notification = -1;
++ XfceNotifyDaemon *xndaemon = XFCE_NOTIFY_DAEMON(user_data);
++
++ g_tree_foreach(xndaemon->active_notifications,
++ (GTraverseFunc)get_last_id,
++ &last_notification);
++
++ if (last_notification != -1){
++ XfceNotifyWindow *window = g_tree_lookup(xndaemon->active_notifications,
++ GUINT_TO_POINTER(last_notification));
++ activate_first_button(window);
++ }
++}
++
++
+ static void xfce_notify_daemon_screen_changed(GdkScreen *screen,
+ gpointer user_data);
+ static void xfce_notify_daemon_update_reserved_rectangles(gpointer key,
+@@ -367,6 +394,9 @@ xfce_notify_daemon_finalize(GObject *obj)
+ dbus_g_connection_unref(xndaemon->dbus_conn);
+
+ G_OBJECT_CLASS(xfce_notify_daemon_parent_class)->finalize(obj);
++
++ keybinder_unbind(EXAMPLE_KEY, handler);
++
+ }
+
+
+@@ -1239,6 +1269,8 @@ xfce_notify_daemon_start(XfceNotifyDaemon *xndaemon,
+ "/org/freedesktop/Notifications",
+ G_OBJECT(xndaemon));
+
++ keybinder_bind(EXAMPLE_KEY, handler, xndaemon);
++
+ return TRUE;
+ }
+
+diff --git a/./xfce4-notifyd/xfce-notify-window.c b/tmp/xfce4-notifyd.KEY/src/xfce4-notifyd-0.2.4/xfce4-notifyd/xfce-notify-window.c
+index 285a70e..773fa9e 100644
+--- a/./xfce4-notifyd/xfce-notify-window.c
++++ b/tmp/xfce4-notifyd.KEY/src/xfce4-notifyd-0.2.4/xfce4-notifyd/xfce-notify-window.c
+@@ -118,6 +118,14 @@ static guint signals[N_SIGS] = { 0, };
+
+ G_DEFINE_TYPE(XfceNotifyWindow, xfce_notify_window, GTK_TYPE_WINDOW)
+
++void activate_first_button (XfceNotifyWindow* window) {
++ GList *children;
++ children = gtk_container_get_children(GTK_CONTAINER(window->button_box));
++ if (children != NULL)
++ xfce_notify_window_button_clicked(children->data, window);
++ else
++ xfce_notify_window_button_release(window, window);
++}
+
+ static void
+ xfce_notify_window_class_init(XfceNotifyWindowClass *klass)
+
diff --git a/xfce4-notifyd.install b/xfce4-notifyd.install
new file mode 100644
index 000000000000..abf924aa24fc
--- /dev/null
+++ b/xfce4-notifyd.install
@@ -0,0 +1,14 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
+
+
+# vim:set ts=2 sw=2 et: