aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/indicator-sound.c4
-rw-r--r--src/metadata-widget.h4
-rw-r--r--src/mute-widget.h4
-rw-r--r--src/sound-service-dbus.c2
-rw-r--r--src/sound-state-manager.c11
-rw-r--r--src/transport-widget.h4
-rw-r--r--src/voip-input-widget.h4
-rw-r--r--src/volume-widget.h4
8 files changed, 10 insertions, 27 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c
index b953449..9c8cff7 100644
--- a/src/indicator-sound.c
+++ b/src/indicator-sound.c
@@ -23,11 +23,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <libdbusmenu-gtk3/menu.h>
-#else
#include <libdbusmenu-gtk/menu.h>
-#endif
#include <libido/idoscalemenuitem.h>
#include <gio/gio.h>
diff --git a/src/metadata-widget.h b/src/metadata-widget.h
index b0123a3..fc6944e 100644
--- a/src/metadata-widget.h
+++ b/src/metadata-widget.h
@@ -20,11 +20,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#define __METADATA_WIDGET_H__
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <libdbusmenu-gtk3/menuitem.h>
-#else
#include <libdbusmenu-gtk/menuitem.h>
-#endif
G_BEGIN_DECLS
diff --git a/src/mute-widget.h b/src/mute-widget.h
index 95130a1..88ddd41 100644
--- a/src/mute-widget.h
+++ b/src/mute-widget.h
@@ -22,11 +22,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <libdbusmenu-gtk3/menuitem.h>
-#else
#include <libdbusmenu-gtk/menuitem.h>
-#endif
#include <libindicator/indicator-object.h>
G_BEGIN_DECLS
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c
index b69f081..899fee8 100644
--- a/src/sound-service-dbus.c
+++ b/src/sound-service-dbus.c
@@ -228,7 +228,7 @@ show_sound_settings_dialog (DbusmenuMenuitem *mi,
{
GError * error = NULL;
if (!g_spawn_command_line_async("gnome-volume-control --page=applications", &error) &&
- !g_spawn_command_line_async("gnome-control-center sound", &error) &&
+ !g_spawn_command_line_async("gnome-control-center sound-nua", &error) &&
!g_spawn_command_line_async("xfce4-mixer", &error))
{
g_warning("Unable to show dialog: %s", error->message);
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;
diff --git a/src/transport-widget.h b/src/transport-widget.h
index 8c2ce48..b68845f 100644
--- a/src/transport-widget.h
+++ b/src/transport-widget.h
@@ -20,11 +20,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#define __TRANSPORT_WIDGET_H__
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <libdbusmenu-gtk3/menuitem.h>
-#else
#include <libdbusmenu-gtk/menuitem.h>
-#endif
#include "common-defs.h"
diff --git a/src/voip-input-widget.h b/src/voip-input-widget.h
index 0e90665..72da80c 100644
--- a/src/voip-input-widget.h
+++ b/src/voip-input-widget.h
@@ -22,11 +22,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <libdbusmenu-gtk3/menuitem.h>
-#else
#include <libdbusmenu-gtk/menuitem.h>
-#endif
G_BEGIN_DECLS
diff --git a/src/volume-widget.h b/src/volume-widget.h
index 3deb99c..665f39b 100644
--- a/src/volume-widget.h
+++ b/src/volume-widget.h
@@ -22,11 +22,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <libdbusmenu-gtk3/menuitem.h>
-#else
#include <libdbusmenu-gtk/menuitem.h>
-#endif
#include <libindicator/indicator-object.h>
G_BEGIN_DECLS