diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/Makefile.in | 2 | ||||
-rw-r--r-- | src/sound-state-manager.c | 11 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index e79f64e..49cf99a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -28,7 +28,7 @@ libsoundmenu_la_SOURCES = \ gen-sound-service.xml.c \ dbus-shared-names.h -libsoundmenu_la_CFLAGS = $(APPLET_CFLAGS) -Wall -Werror -DG_LOG_DOMAIN=\"Indicator-Sound\" +libsoundmenu_la_CFLAGS = $(APPLET_CFLAGS) -Wall -DG_LOG_DOMAIN=\"Indicator-Sound\" libsoundmenu_la_LIBADD = $(APPLET_LIBS) -lm libsoundmenu_la_LDFLAGS = -module -avoid-version diff --git a/src/Makefile.in b/src/Makefile.in index e38be4e..915f3ea 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -357,7 +357,7 @@ libsoundmenu_la_SOURCES = \ gen-sound-service.xml.c \ dbus-shared-names.h -libsoundmenu_la_CFLAGS = $(APPLET_CFLAGS) -Wall -Werror -DG_LOG_DOMAIN=\"Indicator-Sound\" +libsoundmenu_la_CFLAGS = $(APPLET_CFLAGS) -Wall -DG_LOG_DOMAIN=\"Indicator-Sound\" libsoundmenu_la_LIBADD = $(APPLET_LIBS) -lm libsoundmenu_la_LDFLAGS = -module -avoid-version diff --git a/src/sound-state-manager.c b/src/sound-state-manager.c index c851407..ac03add 100644 --- a/src/sound-state-manager.c +++ b/src/sound-state-manager.c @@ -80,8 +80,6 @@ sound_state_manager_init (SoundStateManager* self) priv->settings_manager = g_settings_new("com.canonical.indicators.sound"); - sound_state_manager_notification_init (self); - sound_state_manager_prepare_state_image_names (self); sound_state_manager_prepare_blocked_animation (self); @@ -134,6 +132,13 @@ sound_state_manager_class_init (SoundStateManagerClass *klass) static void sound_state_manager_notification_init (SoundStateManager* self) { + static gboolean initialized = FALSE; + + /* one-time lazy initialization */ + if (initialized) + return; + initialized = TRUE; + SoundStateManagerPrivate* priv = SOUND_STATE_MANAGER_GET_PRIVATE(self); if (!notify_init(PACKAGE_NAME)) @@ -164,6 +169,8 @@ sound_state_manager_show_notification (SoundStateManager *self, { SoundStateManagerPrivate* priv = SOUND_STATE_MANAGER_GET_PRIVATE(self); + sound_state_manager_notification_init (self); + if (priv->notification == NULL || g_settings_get_boolean (priv->settings_manager, "show-notify-osd-on-scroll") == FALSE){ return; |