Merge lp:~cjcurran/indicator-sound/duplicate-playlists into lp:~indicator-applet-developers/indicator-sound/trunk_3

Proposed by Conor Curran
Status: Merged
Approved by: Ted Gould
Approved revision: 231
Merged at revision: 229
Proposed branch: lp:~cjcurran/indicator-sound/duplicate-playlists
Merge into: lp:~indicator-applet-developers/indicator-sound/trunk_3
Diff against target: 79 lines (+14/-12)
4 files modified
data/com.canonical.indicators.sound.gschema.xml (+1/-1)
src/playlists-menu-item.vala (+11/-6)
src/sound-service-dbus.c (+1/-4)
src/voip-input-widget.c (+1/-1)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/duplicate-playlists
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+54534@code.launchpad.net

This proposal supersedes a proposal from 2011-03-23.

Description of the change

Fixes bugs attached plus strips out custom icon loading for particular players and uses by default standard ubuntu playlist icon. It now looks much better (thanks Dan !)

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/com.canonical.indicators.sound.gschema.xml'
--- data/com.canonical.indicators.sound.gschema.xml 2011-01-27 17:25:15 +0000
+++ data/com.canonical.indicators.sound.gschema.xml 2011-03-23 14:44:47 +0000
@@ -11,7 +11,7 @@
11 </key>11 </key>
12 <key name="interested-media-players" type="as">12 <key name="interested-media-players" type="as">
13 <summary>A list of applications which at some point have registered with the sound menu</summary>13 <summary>A list of applications which at some point have registered with the sound menu</summary>
14 <default>[ 'banshee-1' ]</default>14 <default>[ 'banshee' ]</default>
15 <description>15 <description>
16 Each media player which abides by the MPRIS2 spec will automatically appear in the menu.16 Each media player which abides by the MPRIS2 spec will automatically appear in the menu.
17 This array should contain the desktop file names (minus .desktop suffix) of applications which17 This array should contain the desktop file names (minus .desktop suffix) of applications which
1818
=== modified file 'src/playlists-menu-item.vala'
--- src/playlists-menu-item.vala 2011-03-23 10:15:18 +0000
+++ src/playlists-menu-item.vala 2011-03-23 14:44:47 +0000
@@ -46,15 +46,13 @@
46 public new void update (PlaylistDetails[] playlists)46 public new void update (PlaylistDetails[] playlists)
47 {47 {
48 foreach ( PlaylistDetails detail in playlists ){48 foreach ( PlaylistDetails detail in playlists ){
49 49 // We don't want to list playlists which are for videos)'
50 if (this.already_observed(detail)) continue;50 if (this.already_observed(detail) || this.is_video_related(detail))
51 continue;
51 52
52 Dbusmenu.Menuitem menuitem = new Menuitem();53 Dbusmenu.Menuitem menuitem = new Menuitem();
53 menuitem.property_set (MENUITEM_PROP_LABEL, detail.name);54 menuitem.property_set (MENUITEM_PROP_LABEL, detail.name);
54 var result = this.parse_icon_path (detail.icon_path);55 menuitem.property_set (MENUITEM_PROP_ICON_NAME, "playlist-symbolic");
55 if (result != null) {
56 menuitem.property_set (MENUITEM_PROP_ICON_NAME, (string)result);
57 }
5856
59 menuitem.property_set (MENUITEM_PATH, (string)detail.path);57 menuitem.property_set (MENUITEM_PATH, (string)detail.path);
60 menuitem.property_set_bool (MENUITEM_PROP_VISIBLE, true);58 menuitem.property_set_bool (MENUITEM_PROP_VISIBLE, true);
@@ -119,6 +117,13 @@
119 return false;117 return false;
120 }118 }
121119
120 private bool is_video_related (PlaylistDetails new_detail)
121 {
122 var location = (string)new_detail.path;
123 if (location.contains ("/VideoLibrarySource/")) return true;
124 return false;
125 }
126
122 public void active_playlist_update (PlaylistDetails detail)127 public void active_playlist_update (PlaylistDetails detail)
123 {128 {
124 var update = detail.name; 129 var update = detail.name;
125130
=== modified file 'src/sound-service-dbus.c'
--- src/sound-service-dbus.c 2011-03-14 19:47:59 +0000
+++ src/sound-service-dbus.c 2011-03-23 14:44:47 +0000
@@ -148,11 +148,8 @@
148{148{
149 SoundServiceDbusPrivate * priv = SOUND_SERVICE_DBUS_GET_PRIVATE(self);149 SoundServiceDbusPrivate * priv = SOUND_SERVICE_DBUS_GET_PRIVATE(self);
150 priv->root_menuitem = dbusmenu_menuitem_new();150 priv->root_menuitem = dbusmenu_menuitem_new();
151 g_debug("Root ID: %d", dbusmenu_menuitem_get_id(priv->root_menuitem));151 //g_debug("Root ID: %d", dbusmenu_menuitem_get_id(priv->root_menuitem));
152 DbusmenuServer *server = dbusmenu_server_new (INDICATOR_SOUND_MENU_DBUS_OBJECT_PATH);152 DbusmenuServer *server = dbusmenu_server_new (INDICATOR_SOUND_MENU_DBUS_OBJECT_PATH);
153 const gchar* paths[] = {"/usr/share/banshee-1/icons", NULL};
154 dbusmenu_server_set_icon_paths (server,
155 paths);
156 dbusmenu_server_set_root (server, priv->root_menuitem);153 dbusmenu_server_set_root (server, priv->root_menuitem);
157 g_object_unref (priv->root_menuitem);154 g_object_unref (priv->root_menuitem);
158 priv->device = device_new (self);155 priv->device = device_new (self);
159156
=== modified file 'src/voip-input-widget.c'
--- src/voip-input-widget.c 2011-03-22 19:53:19 +0000
+++ src/voip-input-widget.c 2011-03-23 14:44:47 +0000
@@ -97,7 +97,7 @@
97 g_signal_connect(priv->ido_voip_input_slider, "slider-released", G_CALLBACK(voip_input_widget_slider_released), self);97 g_signal_connect(priv->ido_voip_input_slider, "slider-released", G_CALLBACK(voip_input_widget_slider_released), self);
9898
99 GtkWidget* primary_image = ido_scale_menu_item_get_primary_image((IdoScaleMenuItem*)priv->ido_voip_input_slider);99 GtkWidget* primary_image = ido_scale_menu_item_get_primary_image((IdoScaleMenuItem*)priv->ido_voip_input_slider);
100 GIcon * primary_gicon = g_themed_icon_new_with_default_fallbacks("audio-input-microphone-zero-panel");100 GIcon * primary_gicon = g_themed_icon_new_with_default_fallbacks("audio-input-microphone-low-zero-panel");
101 gtk_image_set_from_gicon(GTK_IMAGE(primary_image), primary_gicon, GTK_ICON_SIZE_MENU);101 gtk_image_set_from_gicon(GTK_IMAGE(primary_image), primary_gicon, GTK_ICON_SIZE_MENU);
102 g_object_unref(primary_gicon);102 g_object_unref(primary_gicon);
103103

Subscribers

People subscribed via source and target branches