Commit f10ecc71 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

status-notifier: initial version

parent a0447c5e
SUBDIRS = \
clock \
fish \
notification_area \
wncklet
NULL =
SUBDIRS = \
clock \
fish \
notification_area \
wncklet \
$(NULL)
if WITH_LIBSTATUS_NOTIFIER
SUBDIRS += status-notifier
endif
-include $(top_srcdir)/git.mk
NULL =
libsn_applet_la_CPPFLAGS = \
-DGNOMELOCALEDIR=\""$(localedir)"\" \
-I$(srcdir) \
-I$(srcdir)/../../libpanel-applet \
-I$(top_builddir)/libpanel-applet \
$(NULL)
libsn_applet_la_CFLAGS = \
$(LIBPANEL_APPLET_CFLAGS) \
$(STATUS_NOTIFIER_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
libsn_applet_la_SOURCES = \
sn-applet.c \
sn-applet.h \
$(NULL)
libsn_applet_la_LIBADD = \
../../libpanel-applet/libpanel-applet.la \
$(LIBPANEL_APPLET_LIBS) \
$(STATUS_NOTIFIER_LIBS) \
$(NULL)
libsn_applet_la_LDFLAGS = \
-module \
-avoid-version \
$(WARN_LDFLAGS) \
$(AM_LDFLAGS) \
$(NULL)
APPLET_LOCATION = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libsn-applet.so
sn_applet_libdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
sn_applet_lib_LTLIBRARIES = libsn-applet.la
appletdir = $(appletsdir)
applet_in_files = org.gnome.panel.SnApplet.panel-applet.in
applet_DATA = $(applet_in_files:.panel-applet.in=.panel-applet)
$(applet_in_files): $(applet_in_files).in Makefile
$(AM_V_GEN)sed \
-e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
-e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
$< > $@
@PANEL_INTLTOOL_PANEL_APPLET_RULE@
EXTRA_DIST = \
org.gnome.panel.SnApplet.panel-applet.in.in \
$(NULL)
CLEANFILES = \
$(applet_DATA) \
$(applet_DATA).in \
$(NULL)
-include $(top_srcdir)/git.mk
[Applet Factory]
Id=SnAppletFactory
InProcess=true
Location=@LOCATION@
_Name=Status Notifier Host Applet Factory
_Description=Factory for status notifier host applet
[SnApplet]
_Name=Status Notifier Host
_Description=Display all Status Notifier Items
Icon=
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-panel
X-GNOME-Bugzilla-Component=sn-applet
X-GNOME-Bugzilla-Version=@VERSION@
X-GNOME-Bugzilla-OtherBinaries=sn-applet
/*
* Copyright (C) 2015 Alberts Muktupāvels
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <libstatus-notifier/sn.h>
#include "sn-applet.h"
struct _SnApplet
{
PanelApplet parent;
};
G_DEFINE_TYPE (SnApplet, sn_applet, PANEL_TYPE_APPLET)
static gboolean
sn_applet_fill (SnApplet *applet)
{
GtkWidget *label;
label = gtk_label_new ("Status Notifier Host");
gtk_container_add (GTK_CONTAINER (applet), label);
gtk_widget_show (label);
gtk_widget_show (GTK_WIDGET (applet));
return TRUE;
}
static gboolean
sn_applet_factory (PanelApplet *applet,
const gchar *iid,
gpointer user_data)
{
if (g_strcmp0 (iid, "SnApplet") == 0)
return sn_applet_fill (SN_APPLET (applet));
return FALSE;
}
static void
sn_applet_class_init (SnAppletClass *applet_class)
{
}
static void
sn_applet_init (SnApplet *applet)
{
PanelApplet *panel_applet;
panel_applet = PANEL_APPLET (applet);
panel_applet_set_flags (panel_applet, PANEL_APPLET_HAS_HANDLE |
PANEL_APPLET_EXPAND_MINOR);
}
PANEL_APPLET_IN_PROCESS_FACTORY ("SnAppletFactory", SN_TYPE_APPLET,
sn_applet_factory, NULL);
/*
* Copyright (C) 2015 Alberts Muktupāvels
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SN_APPLET_H
#define SN_APPLET_H
#include <panel-applet.h>
G_BEGIN_DECLS
#define SN_TYPE_APPLET (sn_applet_get_type())
#define SN_APPLET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SN_TYPE_APPLET, SnApplet))
#define SN_APPLET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SN_TYPE_APPLET, SnAppletClass))
#define SN_IS_APPLET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SN_TYPE_APPLET))
#define SN_IS_APPLET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SN_TYPE_APPLET))
#define SN_APPLET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SN_TYPE_APPLET, SnAppletClass))
typedef struct _SnApplet SnApplet;
typedef struct _SnAppletClass SnAppletClass;
struct _SnAppletClass
{
PanelAppletClass parent_class;
};
GType sn_applet_get_type (void);
G_END_DECLS
#endif
......@@ -183,6 +183,23 @@ fi
AM_CONDITIONAL(ENABLE_EDS, test "$enable_eds" = "yes")
AC_SUBST(CLOCK_EDS_ICONDIR)
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])
AS_IF([test "x$with_libstatus_notifier" = "xyes"], [
PKG_CHECK_MODULES([STATUS_NOTIFIER], [libstatus-notifier-3.0])
])
AM_CONDITIONAL([WITH_LIBSTATUS_NOTIFIER],
[test "x$with_libstatus_notifier" = "xyes"])
dnl **************************************************************************
dnl Check if struct dirent contains a d_type member, for run dialog
dnl **************************************************************************
......@@ -282,6 +299,7 @@ AC_CONFIG_FILES([
applets/clock/pixmaps/Makefile
applets/fish/Makefile
applets/notification_area/Makefile
applets/status-notifier/Makefile
applets/wncklet/Makefile
doc/Makefile
......@@ -327,3 +345,5 @@ echo " XRandr support ..................: ${have_randr}"
echo " Build introspection support .....: ${found_introspection}"
echo " Build gtk-doc documentation .....: ${enable_gtk_doc}"
echo ""
echo " Build with libstatus-notifier ...: ${with_libstatus_notifier}"
echo ""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment