aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorcharles kerr <charlesk@canonical.com>2015-12-28 13:48:26 -0600
committercharles kerr <charlesk@canonical.com>2015-12-28 13:48:26 -0600
commit39781ce9582031d0e48a71b03079ba0625c1710f (patch)
tree6d61c34c5bac7e0a24b11cb180312cd5d645e1f6 /src/main.c
parentb6aa1e4df3ee75981444e16c418a2aa5828ccb97 (diff)
downloadayatana-indicator-sound-39781ce9582031d0e48a71b03079ba0625c1710f.tar.gz
ayatana-indicator-sound-39781ce9582031d0e48a71b03079ba0625c1710f.tar.bz2
ayatana-indicator-sound-39781ce9582031d0e48a71b03079ba0625c1710f.zip
in volume-warning, use pulse directly rather than through dbus
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 11eaa06..3aef936 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,6 +22,7 @@
#include "config.h"
static IndicatorSoundService * service = NULL;
+static pa_glib_mainloop * pgloop = NULL;
static gboolean
sigterm_handler (gpointer data)
@@ -59,9 +60,10 @@ on_bus_acquired(GDBusConnection *connection,
accounts = accounts_service_user_new();
}
+ pgloop = pa_glib_mainloop_new(NULL);
options = indicator_sound_options_gsettings_new();
- volume = volume_control_pulse_new(options);
- warning = volume_warning_new(options);
+ volume = volume_control_pulse_new(options, pgloop);
+ warning = volume_warning_new(options, pgloop);
service = indicator_sound_service_new (playerlist, volume, accounts, options, warning);
@@ -76,7 +78,6 @@ int
main (int argc, char ** argv)
{
GMainLoop * loop = NULL;
-
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
@@ -101,6 +102,7 @@ main (int argc, char ** argv)
g_main_loop_run(loop);
g_clear_object(&service);
+ g_clear_pointer(&pgloop, pa_glib_mainloop_free);
notify_uninit();