Commit 8851723c authored by Alberts Muktupāvels's avatar Alberts Muktupāvels
Browse files

system-indicators: initial version

parent 068d73c7
......@@ -5,6 +5,7 @@ SUBDIRS = \
dbus \
backends \
gnome-flashback \
system-indicators \
po \
$(NULL)
......
......@@ -309,6 +309,34 @@ AS_IF([test "x$enable_systemd_session" = "xyes"], [
AM_CONDITIONAL([ENABLE_SYSTEMD_SESSION], [test "x$enable_systemd_session" = "xyes"])
AC_SUBST([HIDDEN_UNDER_SYSTEMD])
dnl **************************************************************************
dnl System indicators
dnl **************************************************************************
AC_ARG_WITH([system-indicators],
[AS_HELP_STRING([--with-system-indicators], [build with System indicators])],
[with_system_indicators="$withval"], [with_system_indicators="auto"])
AS_IF([test "x$with_system_indicators" != "xno"], [
PKG_CHECK_EXISTS([libgnome-panel],
[found_libgnome_panel="yes"], [found_libgnome_panel="no"])
AS_IF([test "x$found_libgnome_panel" = "xyes"], [
GNOME_PANEL_MODULES_DIR=`$PKG_CONFIG --variable=modulesdir libgnome-panel`
AC_SUBST([GNOME_PANEL_MODULES_DIR], [$GNOME_PANEL_MODULES_DIR])
PKG_CHECK_MODULES([SYSTEM_INDICATORS], [
libgnome-panel
])
], [
AS_IF([test "x$with_system_indicators" = "xyes"], [
AC_MSG_ERROR([System indicators requested but libgnome-panel not found])
])
])
], [found_libgnome_panel=no])
AM_CONDITIONAL(WITH_SYSTEM_INDICATORS, [test "x$found_libgnome_panel" = "xyes"])
dnl **************************************************************************
dnl Compiz session
dnl **************************************************************************
......@@ -395,6 +423,8 @@ AC_CONFIG_FILES([
gnome-flashback/libsound-applet/gvc/Makefile
gnome-flashback/libstatus-notifier-watcher/Makefile
system-indicators/Makefile
po/Makefile.in
])
......@@ -419,5 +449,6 @@ echo " libdir ......................: ${libdir}"
echo " sysconfdir ..................: ${sysconfdir}"
echo " libexecdir ..................: ${libexecdir}"
echo ""
echo " System indicators ...........: ${found_libgnome_panel}"
echo " Compiz session ..............: ${found_compiz}"
echo ""
......@@ -44,3 +44,4 @@ gnome-flashback/libsound-applet/gf-sound-applet.c
gnome-flashback/libsound-applet/gvc-channel-bar.c
gnome-flashback/libsound-applet/gvc/gvc-mixer-control.c
gnome-flashback/libsound-applet/gvc-stream-status-icon.c
system-indicators/si-module.c
NULL =
if WITH_SYSTEM_INDICATORS
system_indicators_libdir = $(GNOME_PANEL_MODULES_DIR)
system_indicators_lib_LTLIBRARIES = system_indicators.la
system_indicators_la_CPPFLAGS = \
-DG_LOG_DOMAIN=\"system-indicators\" \
-DG_LOG_USE_STRUCTURED=1 \
-DLOCALE_DIR=\"$(localedir)\" \
$(AM_CPPFLAGS) \
$(NULL)
system_indicators_la_CFLAGS = \
$(SYSTEM_INDICATORS_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
system_indicators_la_SOURCES = \
si-applet.c \
si-applet.h \
si-module.c \
$(NULL)
system_indicators_la_LIBADD = \
$(SYSTEM_INDICATORS_LIBS) \
$(NULL)
system_indicators_la_LDFLAGS = \
-module -avoid-version \
$(WARN_LDFLAGS) \
$(AM_LDFLAGS) \
$(NULL)
endif
-include $(top_srcdir)/git.mk
/*
* Copyright (C) 2019 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 3 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 "si-applet.h"
struct _SiApplet
{
GpApplet parent;
};
G_DEFINE_TYPE (SiApplet, si_applet, GP_TYPE_APPLET)
static void
setup_applet (SiApplet *self)
{
}
static void
si_applet_constructed (GObject *object)
{
G_OBJECT_CLASS (si_applet_parent_class)->constructed (object);
setup_applet (SI_APPLET (object));
}
static void
si_applet_class_init (SiAppletClass *self_class)
{
GObjectClass *object_class;
object_class = G_OBJECT_CLASS (self_class);
object_class->constructed = si_applet_constructed;
}
static void
si_applet_init (SiApplet *self)
{
GpAppletFlags flags;
flags = GP_APPLET_FLAGS_EXPAND_MINOR;
gp_applet_set_flags (GP_APPLET (self), flags);
}
/*
* Copyright (C) 2019 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 3 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 SI_APPLET_H
#define SI_APPLET_H
#include <libgnome-panel/gp-applet.h>
G_BEGIN_DECLS
#define SI_TYPE_APPLET (si_applet_get_type ())
G_DECLARE_FINAL_TYPE (SiApplet, si_applet, SI, APPLET, GpApplet)
G_END_DECLS
#endif
/*
* Copyright (C) 2019 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 3 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 <glib/gi18n-lib.h>
#include <libgnome-panel/gp-module.h>
#include "si-applet.h"
static GpAppletInfo *
si_get_applet_info (const char *id)
{
const char *name;
const char *description;
const char *icon;
GpAppletInfo *info;
name = _("System Indicators");
description = _("This applet contains system indicators");
icon = "applications-system";
info = gp_applet_info_new (si_applet_get_type, name, description, icon);
return info;
}
void
gp_module_load (GpModule *module)
{
bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
gp_module_set_gettext_domain (module, GETTEXT_PACKAGE);
gp_module_set_abi_version (module, GP_MODULE_ABI_VERSION);
gp_module_set_id (module, "org.gnome.gnome-flashback.system-indicators");
gp_module_set_version (module, PACKAGE_VERSION);
gp_module_set_applet_ids (module, "system-indicators", NULL);
gp_module_set_get_applet_info (module, si_get_applet_info);
}
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