Merge lp:~cjcurran/indicator-sound/playlist-fixes into lp:indicator-sound/fourth

Proposed by Conor Curran
Status: Merged
Merged at revision: 269
Proposed branch: lp:~cjcurran/indicator-sound/playlist-fixes
Merge into: lp:indicator-sound/fourth
Diff against target: 104 lines (+12/-8)
5 files modified
src/mpris2-controller.vala (+3/-2)
src/music-player-bridge.vala (+1/-1)
src/player-controller.vala (+3/-3)
src/playlists-menu-item.vala (+1/-0)
src/specific-items-manager.vala (+4/-2)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/playlist-fixes
Reviewer Review Type Date Requested Status
Conor Curran Pending
Review via email: mp+74845@code.launchpad.net
To post a comment you must log in.

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-07-06 11:50:58 +0000
3+++ src/mpris2-controller.vala 2011-09-09 17:55:59 +0000
4@@ -21,11 +21,12 @@
5
6 public class Mpris2Controller : GLib.Object
7 {
8+ public const int MAX_PLAYLIST_COUNT = 20;
9+
10 public MprisRoot mpris2_root {get; construct;}
11 public MprisPlayer player {get; construct;}
12 public MprisPlaylists playlists {get; construct;}
13 public FreeDesktopProperties properties_interface {get; construct;}
14-
15 public PlayerController owner {get; construct;}
16
17 public Mpris2Controller(PlayerController ctrl)
18@@ -226,7 +227,7 @@
19
20 try{
21 current_playlists = yield this.playlists.GetPlaylists (0,
22- 10,
23+ MAX_PLAYLIST_COUNT,
24 "Alphabetical",
25 false);
26 }
27
28=== modified file 'src/music-player-bridge.vala'
29--- src/music-player-bridge.vala 2011-08-10 15:18:51 +0000
30+++ src/music-player-bridge.vala 2011-09-09 17:55:59 +0000
31@@ -131,7 +131,7 @@
32 this.registered_clients[mpris_key].use_playlists = use_playlists;
33 this.registered_clients[mpris_key].update_state ( PlayerController.state.READY );
34 this.registered_clients[mpris_key].activate ( dbus_name );
35- debug("Application has already registered - awaken the hibernation: %s \n", dbus_name );
36+ debug("Application has already registered - awaken the hibernation: %s with playlists %s \n", dbus_name, use_playlists.to_string() );
37 }
38 }
39
40
41=== modified file 'src/player-controller.vala'
42--- src/player-controller.vala 2011-09-08 18:27:52 +0000
43+++ src/player-controller.vala 2011-09-09 17:55:59 +0000
44@@ -30,6 +30,8 @@
45 TRANSPORT,
46 PLAYLISTS
47 }
48+
49+
50
51 public enum state{
52 OFFLINE,
53@@ -169,11 +171,9 @@
54
55 public void update_layout()
56 {
57- debug ("a call to update layout");
58 PlaylistsMenuitem playlists_menuitem = this.custom_items[widget_order.PLAYLISTS] as PlaylistsMenuitem;
59 MetadataMenuitem metadata_menuitem = this.custom_items[widget_order.METADATA] as MetadataMenuitem;
60 if(this.current_state != state.CONNECTED){
61- // TODO
62 metadata_menuitem.should_collapse (true);
63 playlists_menuitem.root_item.property_set_bool (MENUITEM_PROP_VISIBLE,
64 false );
65@@ -212,7 +212,7 @@
66 this.custom_items.add(playlist_menuitem);
67
68 foreach(PlayerItem item in this.custom_items){
69- if (this.custom_items.index_of(item) == 4) {
70+ if (this.custom_items.index_of(item) == WIDGET_QUANTITY-1) {
71 PlaylistsMenuitem playlists_menuitem = item as PlaylistsMenuitem;
72 root_menu.child_add_position(playlists_menuitem.root_item, this.menu_offset + this.custom_items.index_of(item));
73 }
74
75=== modified file 'src/playlists-menu-item.vala'
76--- src/playlists-menu-item.vala 2011-06-21 09:04:29 +0000
77+++ src/playlists-menu-item.vala 2011-09-09 17:55:59 +0000
78@@ -62,6 +62,7 @@
79 );
80 this.current_playlists.set( menuitem.id, menuitem );
81 this.root_item.child_append( menuitem );
82+ debug ("populating valid playlists %s", detail.name);
83 }
84 // Finally remove any that might have been deleted
85 foreach (Dbusmenu.Menuitem item in this.current_playlists.values) {
86
87=== modified file 'src/specific-items-manager.vala'
88--- src/specific-items-manager.vala 2011-09-08 18:27:52 +0000
89+++ src/specific-items-manager.vala 2011-09-09 17:55:59 +0000
90@@ -51,10 +51,12 @@
91 {
92 int result = 0 ;
93 if (this.of_type == category.TRACK){
94- result = this.owner.menu_offset + 4 + this.proxy_items.size;
95+ result = this.owner.menu_offset + this.owner.WIDGET_QUANTITY + this.proxy_items.size;
96 }
97 else if (this.of_type == category.PLAYER){
98- int pos = this.owner.menu_offset + 4 + this.owner.track_specific_count();
99+ int pos = this.owner.menu_offset + this.owner.WIDGET_QUANTITY + this.owner.track_specific_count();
100+ //Surely the playlists item is there whether its visible or not ?
101+ //TODO test playlists and player specific item positioning.
102 pos += this.owner.use_playlists == true ? 1 : 0;
103 result = pos;
104 }

Subscribers

People subscribed via source and target branches