aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/com.canonical.indicators.sound.gschema.xml2
-rw-r--r--src/player-controller.vala4
-rw-r--r--src/sound-state-manager.c11
3 files changed, 12 insertions, 5 deletions
diff --git a/data/com.canonical.indicators.sound.gschema.xml b/data/com.canonical.indicators.sound.gschema.xml
index dc63bcb..f853367 100644
--- a/data/com.canonical.indicators.sound.gschema.xml
+++ b/data/com.canonical.indicators.sound.gschema.xml
@@ -11,7 +11,7 @@
</key>
<key name="interested-media-players" type="as">
<summary>A list of applications which at some point have registered with the sound menu</summary>
- <default>[ 'banshee' ]</default>
+ <default>[ 'rhythmbox' ]</default>
<description>
Each media player which abides by the MPRIS2 spec will automatically appear in the menu.
This array should contain the desktop file names (minus .desktop suffix) of applications which
diff --git a/src/player-controller.vala b/src/player-controller.vala
index 04d0bf9..05996c6 100644
--- a/src/player-controller.vala
+++ b/src/player-controller.vala
@@ -178,11 +178,11 @@ public class PlayerController : GLib.Object
playlists_menuitem.root_item.property_set_bool (MENUITEM_PROP_VISIBLE,
false );
this.custom_items[widget_order.TRANSPORT].property_set_bool (MENUITEM_PROP_VISIBLE,
- this.app_info.get_id() == "banshee.desktop");
+ this.app_info.get_id() == "rhythmbox.desktop");
return;
}
metadata_menuitem.should_collapse (!this.custom_items[widget_order.METADATA].populated (MetadataMenuitem.relevant_attributes_for_ui()) );
- if (this.app_info.get_id() == "banshee.desktop"){
+ if (this.app_info.get_id() == "rhythmbox.desktop"){
TransportMenuitem transport = this.custom_items[widget_order.TRANSPORT] as TransportMenuitem;
transport.handle_cached_action();
}
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;