aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-03-23 15:18:40 +0000
committerConor Curran <conor.curran@canonical.com>2011-03-23 15:18:40 +0000
commit32ce2336b99e5b482a2d20758e03ce2a52368a5f (patch)
tree8e1bbd9236a78bfef15122b5282b06a9858b6d88
parent6d49a88f63282e4171d82b96177ecd9ca5441f1c (diff)
parent16ad03db951eb08a80041b7a0ed29f38db1a96f3 (diff)
downloadayatana-indicator-sound-32ce2336b99e5b482a2d20758e03ce2a52368a5f.tar.gz
ayatana-indicator-sound-32ce2336b99e5b482a2d20758e03ce2a52368a5f.tar.bz2
ayatana-indicator-sound-32ce2336b99e5b482a2d20758e03ce2a52368a5f.zip
fixed duplicate playlists, icons for playlists, name change on banshee id
-rw-r--r--data/com.canonical.indicators.sound.gschema.xml2
-rw-r--r--src/playlists-menu-item.vala17
-rw-r--r--src/sound-service-dbus.c5
-rw-r--r--src/voip-input-widget.c2
4 files changed, 14 insertions, 12 deletions
diff --git a/data/com.canonical.indicators.sound.gschema.xml b/data/com.canonical.indicators.sound.gschema.xml
index 1e08269..dc63bcb 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-1' ]</default>
+ <default>[ 'banshee' ]</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/playlists-menu-item.vala b/src/playlists-menu-item.vala
index 782b5a2..704f61c 100644
--- a/src/playlists-menu-item.vala
+++ b/src/playlists-menu-item.vala
@@ -46,15 +46,13 @@ public class PlaylistsMenuitem : PlayerItem
public new void update (PlaylistDetails[] playlists)
{
foreach ( PlaylistDetails detail in playlists ){
-
- if (this.already_observed(detail)) continue;
+ // We don't want to list playlists which are for videos)'
+ if (this.already_observed(detail) || this.is_video_related(detail))
+ continue;
Dbusmenu.Menuitem menuitem = new Menuitem();
menuitem.property_set (MENUITEM_PROP_LABEL, detail.name);
- var result = this.parse_icon_path (detail.icon_path);
- if (result != null) {
- menuitem.property_set (MENUITEM_PROP_ICON_NAME, (string)result);
- }
+ menuitem.property_set (MENUITEM_PROP_ICON_NAME, "playlist-symbolic");
menuitem.property_set (MENUITEM_PATH, (string)detail.path);
menuitem.property_set_bool (MENUITEM_PROP_VISIBLE, true);
@@ -119,6 +117,13 @@ public class PlaylistsMenuitem : PlayerItem
return false;
}
+ private bool is_video_related (PlaylistDetails new_detail)
+ {
+ var location = (string)new_detail.path;
+ if (location.contains ("/VideoLibrarySource/")) return true;
+ return false;
+ }
+
public void active_playlist_update (PlaylistDetails detail)
{
var update = detail.name;
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c
index 7c817af..1b9d29e 100644
--- a/src/sound-service-dbus.c
+++ b/src/sound-service-dbus.c
@@ -148,11 +148,8 @@ sound_service_dbus_create_root_item (SoundServiceDbus* self)
{
SoundServiceDbusPrivate * priv = SOUND_SERVICE_DBUS_GET_PRIVATE(self);
priv->root_menuitem = dbusmenu_menuitem_new();
- g_debug("Root ID: %d", dbusmenu_menuitem_get_id(priv->root_menuitem));
+ //g_debug("Root ID: %d", dbusmenu_menuitem_get_id(priv->root_menuitem));
DbusmenuServer *server = dbusmenu_server_new (INDICATOR_SOUND_MENU_DBUS_OBJECT_PATH);
- const gchar* paths[] = {"/usr/share/banshee-1/icons", NULL};
- dbusmenu_server_set_icon_paths (server,
- paths);
dbusmenu_server_set_root (server, priv->root_menuitem);
g_object_unref (priv->root_menuitem);
priv->device = device_new (self);
diff --git a/src/voip-input-widget.c b/src/voip-input-widget.c
index 1b36496..5f67fab 100644
--- a/src/voip-input-widget.c
+++ b/src/voip-input-widget.c
@@ -97,7 +97,7 @@ voip_input_widget_init (VoipInputWidget *self)
g_signal_connect(priv->ido_voip_input_slider, "slider-released", G_CALLBACK(voip_input_widget_slider_released), self);
GtkWidget* primary_image = ido_scale_menu_item_get_primary_image((IdoScaleMenuItem*)priv->ido_voip_input_slider);
- GIcon * primary_gicon = g_themed_icon_new_with_default_fallbacks("audio-input-microphone-zero-panel");
+ GIcon * primary_gicon = g_themed_icon_new_with_default_fallbacks("audio-input-microphone-low-zero-panel");
gtk_image_set_from_gicon(GTK_IMAGE(primary_image), primary_gicon, GTK_ICON_SIZE_MENU);
g_object_unref(primary_gicon);