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

Proposed by Conor Curran on 2011-03-23
Status: Merged
Approved by: Ted Gould on 2011-03-23
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) 2011-03-23 Approve on 2011-03-23
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.
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/com.canonical.indicators.sound.gschema.xml'
2--- data/com.canonical.indicators.sound.gschema.xml 2011-01-27 17:25:15 +0000
3+++ data/com.canonical.indicators.sound.gschema.xml 2011-03-23 14:44:47 +0000
4@@ -11,7 +11,7 @@
5 </key>
6 <key name="interested-media-players" type="as">
7 <summary>A list of applications which at some point have registered with the sound menu</summary>
8- <default>[ 'banshee-1' ]</default>
9+ <default>[ 'banshee' ]</default>
10 <description>
11 Each media player which abides by the MPRIS2 spec will automatically appear in the menu.
12 This array should contain the desktop file names (minus .desktop suffix) of applications which
13
14=== modified file 'src/playlists-menu-item.vala'
15--- src/playlists-menu-item.vala 2011-03-23 10:15:18 +0000
16+++ src/playlists-menu-item.vala 2011-03-23 14:44:47 +0000
17@@ -46,15 +46,13 @@
18 public new void update (PlaylistDetails[] playlists)
19 {
20 foreach ( PlaylistDetails detail in playlists ){
21-
22- if (this.already_observed(detail)) continue;
23+ // We don't want to list playlists which are for videos)'
24+ if (this.already_observed(detail) || this.is_video_related(detail))
25+ continue;
26
27 Dbusmenu.Menuitem menuitem = new Menuitem();
28 menuitem.property_set (MENUITEM_PROP_LABEL, detail.name);
29- var result = this.parse_icon_path (detail.icon_path);
30- if (result != null) {
31- menuitem.property_set (MENUITEM_PROP_ICON_NAME, (string)result);
32- }
33+ menuitem.property_set (MENUITEM_PROP_ICON_NAME, "playlist-symbolic");
34
35 menuitem.property_set (MENUITEM_PATH, (string)detail.path);
36 menuitem.property_set_bool (MENUITEM_PROP_VISIBLE, true);
37@@ -119,6 +117,13 @@
38 return false;
39 }
40
41+ private bool is_video_related (PlaylistDetails new_detail)
42+ {
43+ var location = (string)new_detail.path;
44+ if (location.contains ("/VideoLibrarySource/")) return true;
45+ return false;
46+ }
47+
48 public void active_playlist_update (PlaylistDetails detail)
49 {
50 var update = detail.name;
51
52=== modified file 'src/sound-service-dbus.c'
53--- src/sound-service-dbus.c 2011-03-14 19:47:59 +0000
54+++ src/sound-service-dbus.c 2011-03-23 14:44:47 +0000
55@@ -148,11 +148,8 @@
56 {
57 SoundServiceDbusPrivate * priv = SOUND_SERVICE_DBUS_GET_PRIVATE(self);
58 priv->root_menuitem = dbusmenu_menuitem_new();
59- g_debug("Root ID: %d", dbusmenu_menuitem_get_id(priv->root_menuitem));
60+ //g_debug("Root ID: %d", dbusmenu_menuitem_get_id(priv->root_menuitem));
61 DbusmenuServer *server = dbusmenu_server_new (INDICATOR_SOUND_MENU_DBUS_OBJECT_PATH);
62- const gchar* paths[] = {"/usr/share/banshee-1/icons", NULL};
63- dbusmenu_server_set_icon_paths (server,
64- paths);
65 dbusmenu_server_set_root (server, priv->root_menuitem);
66 g_object_unref (priv->root_menuitem);
67 priv->device = device_new (self);
68
69=== modified file 'src/voip-input-widget.c'
70--- src/voip-input-widget.c 2011-03-22 19:53:19 +0000
71+++ src/voip-input-widget.c 2011-03-23 14:44:47 +0000
72@@ -97,7 +97,7 @@
73 g_signal_connect(priv->ido_voip_input_slider, "slider-released", G_CALLBACK(voip_input_widget_slider_released), self);
74
75 GtkWidget* primary_image = ido_scale_menu_item_get_primary_image((IdoScaleMenuItem*)priv->ido_voip_input_slider);
76- GIcon * primary_gicon = g_themed_icon_new_with_default_fallbacks("audio-input-microphone-zero-panel");
77+ GIcon * primary_gicon = g_themed_icon_new_with_default_fallbacks("audio-input-microphone-low-zero-panel");
78 gtk_image_set_from_gicon(GTK_IMAGE(primary_image), primary_gicon, GTK_ICON_SIZE_MENU);
79 g_object_unref(primary_gicon);
80

Subscribers

People subscribed via source and target branches