Merge lp:~cjcurran/indicator-sound/mpris-interface-fail-error into lp:~indicator-applet-developers/indicator-sound/trunk_3

Proposed by Conor Curran on 2011-03-29
Status: Merged
Merged at revision: 235
Proposed branch: lp:~cjcurran/indicator-sound/mpris-interface-fail-error
Merge into: lp:~indicator-applet-developers/indicator-sound/trunk_3
Diff against target: 47 lines (+9/-8)
1 file modified
src/mpris2-controller.vala (+9/-8)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/mpris-interface-fail-error
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) 2011-03-29 Approve on 2011-03-30
Review via email: mp+55311@code.launchpad.net

Description of the change

fixes bug attached

To post a comment you must log in.

Looks good. Definitely removes a SIGABRT :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/mpris2-controller.vala'
2--- src/mpris2-controller.vala 2011-03-21 13:04:13 +0000
3+++ src/mpris2-controller.vala 2011-03-29 10:52:52 +0000
4@@ -45,19 +45,19 @@
5 this.player = Bus.get_proxy_sync ( BusType.SESSION,
6 this.owner.dbus_name,
7 "/org/mpris/MediaPlayer2" );
8- if ( this.owner.use_playlists == true ){
9- this.playlists = Bus.get_proxy_sync ( BusType.SESSION,
10- this.owner.dbus_name,
11- "/org/mpris/MediaPlayer2" );
12- this.playlists.PlaylistChanged.connect (on_playlistdetails_changed);
13- }
14 this.properties_interface = Bus.get_proxy_sync ( BusType.SESSION,
15 "org.freedesktop.Properties.PropertiesChanged",
16 "/org/mpris/MediaPlayer2" );
17 this.properties_interface.PropertiesChanged.connect ( property_changed_cb );
18+ if ( this.owner.use_playlists == true ){
19+ this.playlists = Bus.get_proxy_sync ( BusType.SESSION,
20+ this.owner.dbus_name,
21+ "/org/mpris/MediaPlayer2" );
22+ this.playlists.PlaylistChanged.connect (on_playlistdetails_changed);
23+ }
24 }
25 catch (IOError e) {
26- error("Problems connecting to the session bus - %s", e.message);
27+ critical("Problems connecting to the session bus - %s", e.message);
28 }
29 }
30
31@@ -68,7 +68,7 @@
32 //debug("properties-changed for interface %s and owner %s", interface_source, this.owner.dbus_name);
33 if ( changed_properties == null ||
34 interface_source.has_prefix ( MPRIS_PREFIX ) == false ){
35- warning("Property-changed hash is null or this is an interface that doesn't concerns us");
36+ warning("Property-changed hash is null or this is an interface that doesn't concern us");
37 return;
38 }
39 Variant? play_v = changed_properties.lookup("PlaybackStatus");
40@@ -124,6 +124,7 @@
41 private GLib.HashTable<string, Variant?>? clean_metadata()
42 {
43 GLib.HashTable<string, Variant?> changed_updates = this.player.Metadata;
44+
45 Variant? artist_v = this.player.Metadata.lookup("xesam:artist");
46 if(artist_v != null){
47 Variant? v_artists = this.player.Metadata.lookup("xesam:artist");

Subscribers

People subscribed via source and target branches