[gnome-flashback] add noinst libstatus-notifier library
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] add noinst libstatus-notifier library
- Date: Fri, 4 Nov 2016 22:37:32 +0000 (UTC)
commit 968b7f870ed57d6f351ee7a07a2b34b366f3bc8b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Nov 5 00:31:52 2016 +0200
add noinst libstatus-notifier library
Makefile.am | 1 +
configure.ac | 34 +++------
gnome-flashback/libsound-applet/Makefile.am | 12 +--
gnome-flashback/libsound-applet/gf-sound-item.c | 2 +
libstatus-notifier/Makefile.am | 64 ++++++++++++++++
libstatus-notifier/com.canonical.dbusmenu.xml | 74 ++++++++++++++++++
libstatus-notifier/org.kde.StatusNotifierItem.xml | 80 ++++++++++++++++++++
.../org.kde.StatusNotifierWatcher.xml | 42 ++++++++++
8 files changed, 279 insertions(+), 30 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 8c9cfe7..9577b51 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,7 @@ NULL =
SUBDIRS = \
data \
+ libstatus-notifier \
gnome-flashback \
po \
$(NULL)
diff --git a/configure.ac b/configure.ac
index af20f38..1188e4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,6 +63,7 @@ dnl **************************************************************************
AC_PROG_CC
AC_PATH_PROG([GDBUS_CODEGEN], [gdbus-codegen])
AC_PATH_PROG([GLIB_COMPILE_RESOURCES], [glib-compile-resources])
+AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
dnl **************************************************************************
dnl Internationalization
@@ -83,29 +84,10 @@ dnl **************************************************************************
GLIB_GSETTINGS
dnl **************************************************************************
-dnl Build with libstatus-notifier (experimental)
-dnl **************************************************************************
-
-AC_ARG_WITH([libstatus-notifier],
- [AS_HELP_STRING([--with-libstatus-notifier],
- [Build with libstatus-notifier (experimental)])],
- [with_libstatus_notifier="$withval"],
- [with_libstatus_notifier=no])
-
-LIBSTATUS_NOTIFIER_PKG=""
-AS_IF([test "x$with_libstatus_notifier" = "xyes"], [
- LIBSTATUS_NOTIFIER_PKG="libstatus-notifier-3.0"
- AC_DEFINE([WITH_LIBSTATUS_NOTIFIER], [1],
- [Define to 1 if libstatus-notifier is available])
-])
-
-AM_CONDITIONAL([WITH_LIBSTATUS_NOTIFIER],
- [test "x$with_libstatus_notifier" = "xyes"])
-
-dnl **************************************************************************
dnl Check for required packages
dnl **************************************************************************
+GDK_PIXBUF_REQUIRED=2.32.2
GTK_REQUIRED=3.19.5
LIBGNOME_DESKTOP_REQUIRED=3.12.0
CANBERRA_REQUIRED=0.13
@@ -116,6 +98,14 @@ POLKIT_GOBJECT_REQUIRED=0.97
IBUS_REQUIRED=1.5.2
UPOWER_GLIB_REQUIRED=0.99.0
+PKG_CHECK_MODULES([LIBSTATUS_NOTIFIER], [
+ gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED
+ gio-2.0 >= $GLIB_REQUIRED
+ gio-unix-2.0 >= $GLIB_REQUIRED
+ glib-2.0 >= $GLIB_REQUIRED
+ gtk+-3.0 >= $GTK_REQUIRED
+])
+
PKG_CHECK_MODULES([GNOME_FLASHBACK], [
gtk+-3.0 >= $GTK_REQUIRED
])
@@ -312,6 +302,8 @@ AC_CONFIG_FILES([
gnome-flashback/libstatus-notifier-watcher/Makefile
gnome-flashback/libworkarounds/Makefile
+ libstatus-notifier/Makefile
+
po/Makefile.in
])
@@ -336,5 +328,3 @@ echo " libdir ......................: ${libdir}"
echo " sysconfdir ..................: ${sysconfdir}"
echo " libexecdir ..................: ${libexecdir}"
echo ""
-echo " with libstatus-notifier .....: ${with_libstatus_notifier}"
-echo ""
diff --git a/gnome-flashback/libsound-applet/Makefile.am b/gnome-flashback/libsound-applet/Makefile.am
index 00e2223..c5ef663 100644
--- a/gnome-flashback/libsound-applet/Makefile.am
+++ b/gnome-flashback/libsound-applet/Makefile.am
@@ -19,26 +19,22 @@ libsound_applet_la_CFLAGS = \
libsound_applet_la_SOURCES = \
gf-sound-applet.c \
gf-sound-applet.h \
+ gf-sound-item.c \
+ gf-sound-item.h \
gvc-channel-bar.c \
gvc-channel-bar.h \
gvc-stream-status-icon.c \
gvc-stream-status-icon.h \
$(NULL)
-if WITH_LIBSTATUS_NOTIFIER
-libsound_applet_la_SOURCES += \
- gf-sound-item.c \
- gf-sound-item.h \
- $(NULL)
-endif
-
libsound_applet_la_LDFLAGS = \
$(WARN_LDFLAGS) \
$(AM_LDFLAGS) \
$(NULL)
libsound_applet_la_LIBADD = \
- gvc/libgvc.la \
+ $(top_builddir)/libstatus-notifier/libstatus-notifier.la \
+ $(top_builddir)/gnome-flashback/libsound-applet/gvc/libgvc.la \
$(SOUND_APPLET_LIBS) \
$(LIBM) \
$(NULL)
diff --git a/gnome-flashback/libsound-applet/gf-sound-item.c b/gnome-flashback/libsound-applet/gf-sound-item.c
index dd9cd5d..df23d41 100644
--- a/gnome-flashback/libsound-applet/gf-sound-item.c
+++ b/gnome-flashback/libsound-applet/gf-sound-item.c
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#if 0
#include "config.h"
#include <glib/gi18n.h>
@@ -686,3 +687,4 @@ gf_sound_item_set_mixer_stream (GfSoundItem *item,
update_icon (item);
}
+#endif
diff --git a/libstatus-notifier/Makefile.am b/libstatus-notifier/Makefile.am
new file mode 100644
index 0000000..ee071cb
--- /dev/null
+++ b/libstatus-notifier/Makefile.am
@@ -0,0 +1,64 @@
+NULL =
+
+noinst_LTLIBRARIES = libstatus-notifier.la
+
+libstatus_notifier_la_SOURCES = \
+ $(BUILT_SOURCES) \
+ $(NULL)
+
+libstatus_notifier_la_CPPFLAGS = \
+ -DG_LOG_DOMAIN=\"libstatus-notifier\" \
+ -DG_LOG_USE_STRUCTURED=1 \
+ -I$(top_srcdir) \
+ $(AM_CPPFLAGS) \
+ $(NULL)
+
+libstatus_notifier_la_CFLAGS = \
+ $(LIBSTATUS_NOTIFIER_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(AM_CFLAGS) \
+ $(NULL)
+
+libstatus_notifier_la_LDFLAGS = \
+ $(WARN_LDFLAGS) \
+ $(AM_LDFLAGS) \
+ $(NULL)
+
+libstatus_notifier_la_LIBADD = \
+ $(LIBSTATUS_NOTIFIER_LIBS) \
+ $(NULL)
+
+sn-dbus-menu-gen.h:
+sn-dbus-menu-gen.c: com.canonical.dbusmenu.xml
+ $(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace Sn \
+ --generate-c-code sn-dbus-menu-gen \
+ $(srcdir)/com.canonical.dbusmenu.xml
+
+sn-item-v0-gen.h:
+sn-item-v0-gen.c: org.kde.StatusNotifierItem.xml
+ $(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace Sn \
+ --generate-c-code sn-item-v0-gen \
+ $(srcdir)/org.kde.StatusNotifierItem.xml
+
+sn-watcher-v0-gen.h:
+sn-watcher-v0-gen.c: org.kde.StatusNotifierWatcher.xml
+ $(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace Sn \
+ --generate-c-code sn-watcher-v0-gen \
+ $(srcdir)/org.kde.StatusNotifierWatcher.xml
+
+BUILT_SOURCES = \
+ sn-dbus-menu-gen.c \
+ sn-dbus-menu-gen.h \
+ sn-item-v0-gen.c \
+ sn-item-v0-gen.h \
+ sn-watcher-v0-gen.c \
+ sn-watcher-v0-gen.h \
+ $(NULL)
+
+EXTRA_DIST = \
+ com.canonical.dbusmenu.xml \
+ org.kde.StatusNotifierItem.xml \
+ org.kde.StatusNotifierWatcher.xml \
+ $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/libstatus-notifier/com.canonical.dbusmenu.xml b/libstatus-notifier/com.canonical.dbusmenu.xml
new file mode 100644
index 0000000..f8f72d1
--- /dev/null
+++ b/libstatus-notifier/com.canonical.dbusmenu.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+ <interface name="com.canonical.dbusmenu">
+ <annotation name="org.gtk.GDBus.C.Name" value="DBusMenuGen" />
+
+ <method name="GetLayout">
+ <arg type="i" name="parentId" direction="in" />
+ <arg type="i" name="recursionDepth" direction="in" />
+ <arg type="as" name="propertyNames" direction="in" />
+ <arg type="u" name="revision" direction="out" />
+ <arg type="(ia{sv}av)" name="layout" direction="out" />
+ </method>
+
+ <method name="GetGroupProperties">
+ <arg type="ai" name="ids" direction="in" />
+ <arg type="as" name="propertyNames" direction="in" />
+ <arg type="a(ia{sv})" name="properties" direction="out" />
+ </method>
+
+ <method name="GetProperty">
+ <arg type="i" name="id" direction="in" />
+ <arg type="s" name="name" direction="in" />
+ <arg type="v" name="value" direction="out" />
+ </method>
+
+ <method name="Event">
+ <arg type="i" name="id" direction="in" />
+ <arg type="s" name="eventId" direction="in" />
+ <arg type="v" name="data" direction="in" />
+ <arg type="u" name="timestamp" direction="in" />
+ </method>
+
+ <method name="EventGroup">
+ <arg type="a(isvu)" name="events" direction="in" />
+ <arg type="ai" name="idErrors" direction="out" />
+ </method>
+
+ <method name="AboutToShow">
+ <arg type="i" name="id" direction="in" />
+ <arg type="b" name="needUpdate" direction="out" />
+ </method>
+
+ <method name="AboutToShowGroup">
+ <arg type="ai" name="ids" direction="in" />
+ <arg type="ai" name="updatesNeeded" direction="out" />
+ <arg type="ai" name="idErrors" direction="out" />
+ </method>
+
+ <property name="Version" type="u" access="read" />
+
+ <property name="TextDirection" type="s" access="read" />
+
+ <property name="Status" type="s" access="read" />
+
+ <property name="IconThemePath" type="as" access="read" />
+
+ <signal name="ItemsPropertiesUpdated">
+ <arg type="a(ia{sv})" name="updatedProps" direction="out" />
+ <arg type="a(ias)" name="removedProps" direction="out" />
+ </signal>
+
+ <signal name="LayoutUpdated">
+ <arg type="u" name="revision" direction="out" />
+ <arg type="i" name="parent" direction="out" />
+ </signal>
+
+ <signal name="ItemActivationRequested">
+ <arg type="i" name="id" direction="out" />
+ <arg type="u" name="timestamp" direction="out" />
+ </signal>
+ </interface>
+</node>
diff --git a/libstatus-notifier/org.kde.StatusNotifierItem.xml
b/libstatus-notifier/org.kde.StatusNotifierItem.xml
new file mode 100644
index 0000000..609d305
--- /dev/null
+++ b/libstatus-notifier/org.kde.StatusNotifierItem.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+ <interface name="org.kde.StatusNotifierItem">
+ <annotation name="org.gtk.GDBus.C.Name" value="ItemV0Gen" />
+
+ <method name="ContextMenu">
+ <arg name="x" type="i" direction="in" />
+ <arg name="y" type="i" direction="in" />
+ </method>
+
+ <method name="Activate">
+ <arg name="x" type="i" direction="in" />
+ <arg name="y" type="i" direction="in" />
+ </method>
+
+ <method name="SecondaryActivate">
+ <arg name="x" type="i" direction="in" />
+ <arg name="y" type="i" direction="in" />
+ </method>
+
+ <method name="Scroll">
+ <arg name="delta" type="i" direction="in" />
+ <arg name="orientation" type="s" direction="in" />
+ </method>
+
+ <property name="Category" type="s" access="read" />
+
+ <property name="Id" type="s" access="read" />
+
+ <property name="Title" type="s" access="read" />
+
+ <property name="Status" type="s" access="read" />
+
+ <property name="WindowId" type="i" access="read" />
+
+ <property name="IconName" type="s" access="read"/>
+
+ <property name="IconPixmap" type="a(iiay)" access="read" />
+
+ <property name="OverlayIconName" type="s" access="read"/>
+
+ <property name="OverlayIconPixmap" type="a(iiay)" access="read" />
+
+ <property name="AttentionIconName" type="s" access="read"/>
+
+ <property name="AttentionIconPixmap" type="a(iiay)" access="read" />
+
+ <property name="AttentionMovieName" type="s" access="read" />
+
+ <property name="ToolTip" type="(sa(iiay)ss)" access="read" />
+
+ <signal name="NewTitle" />
+
+ <signal name="NewIcon" />
+
+ <signal name="NewAttentionIcon" />
+
+ <signal name="NewOverlayIcon" />
+
+ <signal name="NewToolTip" />
+
+ <signal name="NewStatus">
+ <arg name="status" type="s" />
+ </signal>
+
+ <!-- Properties and signals that is not part of specification -->
+
+ <property name="IconThemePath" type="s" access="read" />
+
+ <property name="Menu" type="o" access="read" />
+
+ <property name="ItemIsMenu" type="b" access="read" />
+
+ <signal name="NewIconThemePath">
+ <arg name="icon_theme_path" type="s" />
+ </signal>
+ </interface>
+</node>
diff --git a/libstatus-notifier/org.kde.StatusNotifierWatcher.xml
b/libstatus-notifier/org.kde.StatusNotifierWatcher.xml
new file mode 100644
index 0000000..3b0f135
--- /dev/null
+++ b/libstatus-notifier/org.kde.StatusNotifierWatcher.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+ <interface name="org.kde.StatusNotifierWatcher">
+ <annotation name="org.gtk.GDBus.C.Name" value="WatcherV0Gen" />
+
+ <method name="RegisterStatusNotifierItem">
+ <annotation name="org.gtk.GDBus.C.Name" value="RegisterItem" />
+ <arg type="s" direction="in" name="service" />
+ </method>
+
+ <method name="RegisterStatusNotifierHost">
+ <annotation name="org.gtk.GDBus.C.Name" value="RegisterHost" />
+ <arg type="s" direction="in" name="service" />
+ </method>
+
+ <property name="RegisteredStatusNotifierItems" type="as" access="read">
+ <annotation name="org.gtk.GDBus.C.Name" value="RegisteredItems" />
+ </property>
+
+ <property name="IsStatusNotifierHostRegistered" type="b" access="read">
+ <annotation name="org.gtk.GDBus.C.Name" value="IsHostRegistered" />
+ </property>
+
+ <property name="ProtocolVersion" type="i" access="read" />
+
+ <signal name="StatusNotifierItemRegistered">
+ <annotation name="org.gtk.GDBus.C.Name" value="ItemRegistered" />
+ <arg type="s" direction="out" name="service" />
+ </signal>
+
+ <signal name="StatusNotifierItemUnregistered">
+ <annotation name="org.gtk.GDBus.C.Name" value="ItemUnregistered" />
+ <arg type="s" direction="out" name="service" />
+ </signal>
+
+ <signal name="StatusNotifierHostRegistered">
+ <annotation name="org.gtk.GDBus.C.Name" value="HostRegistered" />
+ </signal>
+ </interface>
+</node>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]