Merge lp:~cjcurran/indicator-sound/use-name-in-desktop-and-do-not-shorten into lp:~indicator-applet-developers/indicator-sound/trunk_3

Proposed by Conor Curran
Status: Merged
Merged at revision: 106
Proposed branch: lp:~cjcurran/indicator-sound/use-name-in-desktop-and-do-not-shorten
Merge into: lp:~indicator-applet-developers/indicator-sound/trunk_3
Diff against target: 94 lines (+10/-9)
4 files modified
src/music-player-bridge.vala (+0/-1)
src/player-controller.vala (+8/-5)
src/title-menu-item.vala (+1/-2)
src/transport-menu-item.vala (+1/-1)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/use-name-in-desktop-and-do-not-shorten
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) Approve
Review via email: mp+45144@code.launchpad.net

Description of the change

fixes problem described in bug attached. Upstream Banshee seem to be fine with the alteration to happen from their end and MPT agrees

To post a comment you must log in.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

 review approve

I think you might as well remove the lines you commented out. But no
biggie - definitely approved :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/music-player-bridge.vala'
--- src/music-player-bridge.vala 2010-12-23 16:37:20 +0000
+++ src/music-player-bridge.vala 2011-01-04 17:43:42 +0000
@@ -27,7 +27,6 @@
27 private Dbusmenu.Menuitem root_menu;27 private Dbusmenu.Menuitem root_menu;
28 private HashMap<string, PlayerController> registered_clients; 28 private HashMap<string, PlayerController> registered_clients;
29 private Mpris2Watcher watcher;29 private Mpris2Watcher watcher;
30 private Settings settings;
31 30
32 public MusicPlayerBridge()31 public MusicPlayerBridge()
33 {32 {
3433
=== modified file 'src/player-controller.vala'
--- src/player-controller.vala 2010-12-20 18:02:50 +0000
+++ src/player-controller.vala 2011-01-04 17:43:42 +0000
@@ -44,7 +44,7 @@
44 public int current_state = state.OFFLINE;44 public int current_state = state.OFFLINE;
45 45
46 private Dbusmenu.Menuitem root_menu;46 private Dbusmenu.Menuitem root_menu;
47 public string name { get; set;} 47 //public string name { get; set;}
48 public string dbus_name { get; set;}48 public string dbus_name { get; set;}
49 public ArrayList<PlayerItem> custom_items; 49 public ArrayList<PlayerItem> custom_items;
50 public Mpris2Controller mpris_bridge;50 public Mpris2Controller mpris_bridge;
@@ -62,7 +62,7 @@
62 this.root_menu = root;62 this.root_menu = root;
63 this.app_info = app;63 this.app_info = app;
64 this.dbus_name = dbus_name;64 this.dbus_name = dbus_name;
65 this.name = format_player_name(this.app_info.get_name());65 //this.name = this.app_info.get_name();
66 this.icon_name = icon_name;66 this.icon_name = icon_name;
67 this.custom_items = new ArrayList<PlayerItem>();67 this.custom_items = new ArrayList<PlayerItem>();
68 this.current_state = initial_state;68 this.current_state = initial_state;
@@ -74,7 +74,8 @@
7474
75 public void update_state(state new_state)75 public void update_state(state new_state)
76 {76 {
77 debug("update_state - player controller %s : new state %i", this.name, new_state);77 debug("update_state - player controller %s : new state %i", this.app_info.get_name(),
78 new_state);
78 this.current_state = new_state;79 this.current_state = new_state;
79 this.update_layout();80 this.update_layout();
80 }81 }
@@ -93,13 +94,14 @@
93 */94 */
94 public void instantiate()95 public void instantiate()
95 {96 {
96 debug("instantiate in player controller for %s", this.name);97 debug("instantiate in player controller for %s", this.app_info.get_name() );
97 try{98 try{
98 this.app_info.launch(null, null);99 this.app_info.launch(null, null);
99 this.update_state(state.INSTANTIATING);100 this.update_state(state.INSTANTIATING);
100 }101 }
101 catch(GLib.Error error){102 catch(GLib.Error error){
102 warning("Failed to launch app %s with error message: %s", this.name, error.message);103 warning("Failed to launch app %s with error message: %s", this.app_info.get_name(),
104 error.message );
103 }105 }
104 }106 }
105 107
@@ -181,6 +183,7 @@
181 }183 }
182 }184 }
183 } 185 }
186
184 187
185 private static string format_player_name(owned string app_info_name)188 private static string format_player_name(owned string app_info_name)
186 {189 {
187190
=== modified file 'src/title-menu-item.vala'
--- src/title-menu-item.vala 2010-12-07 14:18:28 +0000
+++ src/title-menu-item.vala 2011-01-04 17:43:42 +0000
@@ -26,8 +26,7 @@
26 public TitleMenuitem(PlayerController parent)26 public TitleMenuitem(PlayerController parent)
27 {27 {
28 Object(item_type: MENUITEM_TYPE, owner: parent);28 Object(item_type: MENUITEM_TYPE, owner: parent);
29 this.property_set(MENUITEM_NAME, parent.name); 29 this.property_set(MENUITEM_NAME, parent.app_info.get_name());
30 debug("title init - icon name = %s", parent.icon_name);
31 this.property_set(MENUITEM_ICON, parent.icon_name); 30 this.property_set(MENUITEM_ICON, parent.icon_name);
32 this.property_set_bool(MENUITEM_RUNNING, false); 31 this.property_set_bool(MENUITEM_RUNNING, false);
33 }32 }
3433
=== modified file 'src/transport-menu-item.vala'
--- src/transport-menu-item.vala 2010-12-07 14:18:28 +0000
+++ src/transport-menu-item.vala 2011-01-04 17:43:42 +0000
@@ -51,7 +51,7 @@
51 {51 {
52 int input = input_value.get_int();52 int input = input_value.get_int();
53 debug("handle_event with value %s", input.to_string());53 debug("handle_event with value %s", input.to_string());
54 debug("transport owner name = %s", this.owner.name);54 debug("transport owner name = %s", this.owner.app_info.get_name());
55 this.owner.mpris_bridge.transport_update((action)input);55 this.owner.mpris_bridge.transport_update((action)input);
56 } 56 }
5757

Subscribers

People subscribed via source and target branches