aboutsummaryrefslogtreecommitdiff
path: root/src/player-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-11-05 17:30:19 +0000
committerConor Curran <conor.curran@canonical.com>2010-11-05 17:30:19 +0000
commit1196f5060e633fac46b724844e1b6817c889145a (patch)
treea05786721729c1148566a896c6f642f176675f3a /src/player-controller.vala
parenta01af1b6d6f42775e9e436d802913c061b51278e (diff)
parent2f409b95c5c1c0c7107f4503c01687b3a913780f (diff)
downloadayatana-indicator-sound-1196f5060e633fac46b724844e1b6817c889145a.tar.gz
ayatana-indicator-sound-1196f5060e633fac46b724844e1b6817c889145a.tar.bz2
ayatana-indicator-sound-1196f5060e633fac46b724844e1b6817c889145a.zip
Initial UI tweaks for natty
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r--src/player-controller.vala17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala
index cc2e4e1..537eccc 100644
--- a/src/player-controller.vala
+++ b/src/player-controller.vala
@@ -19,6 +19,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Dbusmenu;
+using DbusmenuGtk;
using Gee;
public class PlayerController : GLib.Object
@@ -49,10 +50,12 @@ public class PlayerController : GLib.Object
public Mpris2Controller mpris_bridge;
public AppInfo? app_info { get; set;}
public int menu_offset { get; set;}
+ public string icon_name { get; set; }
public PlayerController(Dbusmenu.Menuitem root,
GLib.AppInfo app,
string mpris_name,
+ string icon_name,
int offset,
state initial_state)
{
@@ -60,12 +63,13 @@ public class PlayerController : GLib.Object
this.app_info = app;
this.name = format_player_name(this.app_info.get_name());
this.mpris_name = mpris_name;
+ this.icon_name = icon_name;
this.custom_items = new ArrayList<PlayerItem>();
this.current_state = initial_state;
this.menu_offset = offset;
construct_widgets();
establish_mpris_connection();
- this.update_layout();
+ this.update_layout();
}
public void update_state(state new_state)
@@ -161,16 +165,6 @@ public class PlayerController : GLib.Object
}
}
- private static string format_client_name(string client_name)
- {
- string formatted = client_name;
- if(formatted.length > 1){
- formatted = client_name.up(1).concat(client_name.slice(1, client_name.length));
- debug("PlayerController->format_client_name - : %s", formatted);
- }
- return formatted;
- }
-
private static string format_player_name(owned string app_info_name)
{
string result = app_info_name.down().strip();
@@ -200,4 +194,5 @@ public class PlayerController : GLib.Object
this.update_state(state.DISCONNECTED);
}
}
+
} \ No newline at end of file