← Back to team overview

ayatana-commits team mailing list archive

lp:~cjcurran/indicator-sound/mpris-interface-name-translation-fix into lp:indicator-sound

 

Conor Curran has proposed merging lp:~cjcurran/indicator-sound/mpris-interface-name-translation-fix into lp:indicator-sound.

Requested reviews:
  Indicator Applet Developers (indicator-applet-developers)


Fixes the regression causes by the initial fix for this bug ->
https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/654140


"Omer: Yes, I did and also reboot. Please note that if you didn't have the translated text problem, this new problem also probably doesn't affect you. It's now certainly something that used to use the application name "Rhythmbox" to send the signals, but now that the translated name is used the control signals no more go through (since they should probably still be sent with the original application name instead of the translated name)."
-- 
https://code.launchpad.net/~cjcurran/indicator-sound/mpris-interface-name-translation-fix/+merge/38409
Your team ayatana-commits is subscribed to branch lp:indicator-sound.
=== modified file 'src/mpris2-controller.vala'
--- src/mpris2-controller.vala	2010-10-07 13:22:09 +0000
+++ src/mpris2-controller.vala	2010-10-14 11:58:40 +0000
@@ -75,10 +75,10 @@
 	construct{
     try {
       var connection = DBus.Bus.get (DBus.BusType.SESSION);
-			this.mpris2_root = (MprisRoot) connection.get_object (root_interface.concat(".").concat(this.owner.name.down()),
+			this.mpris2_root = (MprisRoot) connection.get_object (root_interface.concat(".").concat(this.owner.mpris_name),
 				                                             "/org/mpris/MediaPlayer2",
 				                                             root_interface);						
-			this.player = (MprisPlayer) connection.get_object (root_interface.concat(".").concat(this.owner.name.down()),
+			this.player = (MprisPlayer) connection.get_object (root_interface.concat(".").concat(this.owner.mpris_name),
 				                                               "/org/mpris/MediaPlayer2",
 				                                               root_interface.concat(".Player"));						
 			this.properties_interface = (FreeDesktopProperties) connection.get_object("org.freedesktop.Properties.PropertiesChanged",
@@ -92,7 +92,7 @@
 
 	public void property_changed_cb(string interface_source, HashTable<string, Value?> changed_properties, string[] invalid )
 	{	
-		debug("properties-changed for interface %s and owner %s", interface_source, this.owner.name.down());
+		debug("properties-changed for interface %s and owner %s", interface_source, this.owner.mpris_name);
     
 		if(changed_properties == null || interface_source.has_prefix(this.root_interface) == false ){
 			warning("Property-changed hash is null or this is an interface that doesn't concerns us");

=== modified file 'src/music-player-bridge.vala'
--- src/music-player-bridge.vala	2010-10-07 11:08:22 +0000
+++ src/music-player-bridge.vala	2010-10-14 11:58:40 +0000
@@ -58,6 +58,7 @@
 			GLib.AppInfo app_info = info as GLib.AppInfo;
 			PlayerController ctrl = new PlayerController(this.root_menu, 
 					                                         truncate_player_name(app_info.get_name()),
+                                                   determine_key(app),
 					                                         calculate_menu_position(),
 					                                         PlayerController.state.OFFLINE);
 			ctrl.app_info = app_info;
@@ -99,6 +100,7 @@
 			bridge.playersDB.insert(path);
 			PlayerController ctrl = new PlayerController(bridge.root_menu,
 			                                             name,
+                                                   determine_key(path),
 			                                             bridge.calculate_menu_position(),
 			                                             PlayerController.state.READY);
 			ctrl.set("app_info", app_info);

=== modified file 'src/player-controller.vala'
--- src/player-controller.vala	2010-10-07 10:59:41 +0000
+++ src/player-controller.vala	2010-10-14 11:58:40 +0000
@@ -44,6 +44,7 @@
 		
 	private Dbusmenu.Menuitem root_menu;
 	public string name { get; set;}	
+	public string mpris_name { get; set;}	  
 	public ArrayList<PlayerItem> custom_items;	
 	public Mpris2Controller mpris_bridge;
 	public AppInfo? app_info { get; set;}
@@ -51,11 +52,13 @@
 		
 	public PlayerController(Dbusmenu.Menuitem root,
 	                        string client_name,
+                          string mpris_name,
 	                        int offset,
 	                        state initial_state)
 	{
 		this.root_menu = root;
 		this.name = format_client_name(client_name.strip());
+    this.mpris_name = mpris_name;
 		this.custom_items = new ArrayList<PlayerItem>();
 		this.current_state = initial_state;
 		this.menu_offset = offset;


Follow ups