diff options
author | Marius Gripsgard <marius@ubports.com> | 2021-01-11 19:38:17 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-05-25 15:50:19 +0200 |
commit | dc7faa221b5ffb8224b4dc1a3bc36610156745ba (patch) | |
tree | 13f4bcd8db100d9c92c58531bc7fd5ee50da0c17 /src/service.c | |
parent | 7803227f081df11869c218a732e24773052ca70f (diff) | |
download | ayatana-indicator-session-dc7faa221b5ffb8224b4dc1a3bc36610156745ba.tar.gz ayatana-indicator-session-dc7faa221b5ffb8224b4dc1a3bc36610156745ba.tar.bz2 ayatana-indicator-session-dc7faa221b5ffb8224b4dc1a3bc36610156745ba.zip |
Move common parts over to libayatana-common and clean up
This moves some common functions over to libayatana-common, this also
removes the direct need for any ayatana indicators to depend on
url-dispatcher as this will be handeled by libayatana-common.
This also cleans up a pretty messy code and removes many duplicates.
Diffstat (limited to 'src/service.c')
-rw-r--r-- | src/service.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/service.c b/src/service.c index c970c62..1d3115f 100644 --- a/src/service.c +++ b/src/service.c @@ -19,11 +19,11 @@ #include <glib/gi18n.h> #include <gio/gio.h> +#include <ayatana/common/utils.h> #include "backend.h" #include "recoverable-problem.h" #include "service.h" - #include "utils.h" #define BUS_NAME "org.ayatana.indicator.session" @@ -1175,16 +1175,18 @@ indicator_session_service_init (IndicatorSessionService * self) /* init our priv pointer */ p = indicator_session_service_get_instance_private (self); p->indicator_settings = g_settings_new ("org.ayatana.indicator.session"); - if (is_mate()) - p->keybinding_settings = g_settings_new ("org.mate.SettingsDaemon.plugins.media-keys"); - - else if (is_budgie()) + if (ayatana_common_utils_is_mate()) { - p->keybinding_settings = g_settings_new("org.gnome.settings-daemon.plugins.media-keys"); + p->keybinding_settings = g_settings_new ("org.mate.SettingsDaemon.plugins.media-keys"); + } + else if (ayatana_common_utils_is_budgie()) + { + p->keybinding_settings = g_settings_new ("org.gnome.settings-daemon.plugins.media-keys"); + } + else if (ayatana_common_utils_is_gnome() || ayatana_common_utils_is_unity()) + { + p->keybinding_settings = g_settings_new ("org.gnome.settings-daemon.plugins.media-keys"); } - - else if (is_gnome() || is_unity()) - p->keybinding_settings = g_settings_new ("org.gnome.settings-daemon.plugins.media-keys"); self->priv = p; |