aboutsummaryrefslogtreecommitdiff
path: root/src/player-controller.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2010-11-04 17:03:08 -0400
committerKen VanDine <ken.vandine@canonical.com>2010-11-04 17:03:08 -0400
commita8f18b2780b52eb09233c4279288f6ba0887552b (patch)
treede5299782b238edc4c80fc18f7a529330f77e407 /src/player-controller.c
parent7620afcd008217151fc02d6440df9741ed3d7e48 (diff)
parentf6c1abd8b39794057044f2ad9a567624ae4e9cf3 (diff)
downloadayatana-indicator-sound-a8f18b2780b52eb09233c4279288f6ba0887552b.tar.gz
ayatana-indicator-sound-a8f18b2780b52eb09233c4279288f6ba0887552b.tar.bz2
ayatana-indicator-sound-a8f18b2780b52eb09233c4279288f6ba0887552b.zip
Import upstream version 0.5.0
Diffstat (limited to 'src/player-controller.c')
-rw-r--r--src/player-controller.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/player-controller.c b/src/player-controller.c
index 3eee29a..896d826 100644
--- a/src/player-controller.c
+++ b/src/player-controller.c
@@ -101,8 +101,6 @@ typedef struct _MetadataMenuitemClass MetadataMenuitemClass;
typedef struct _TransportMenuitem TransportMenuitem;
typedef struct _TransportMenuitemClass TransportMenuitemClass;
-#define TRANSPORT_MENUITEM_TYPE_STATE (transport_menuitem_state_get_type ())
-
struct _PlayerController {
GObject parent_instance;
PlayerControllerPrivate * priv;
@@ -138,11 +136,6 @@ typedef enum {
PLAYER_CONTROLLER_STATE_DISCONNECTED
} PlayerControllerstate;
-typedef enum {
- TRANSPORT_MENUITEM_STATE_PLAYING,
- TRANSPORT_MENUITEM_STATE_PAUSED
-} TransportMenuitemstate;
-
static gpointer player_controller_parent_class = NULL;
@@ -197,8 +190,7 @@ TransportMenuitem* transport_menuitem_construct (GType object_type, PlayerContro
GType transport_menuitem_get_type (void) G_GNUC_CONST;
gint player_controller_get_menu_offset (PlayerController* self);
gboolean mpris2_controller_connected (Mpris2Controller* self);
-GType transport_menuitem_state_get_type (void) G_GNUC_CONST;
-void transport_menuitem_change_play_state (TransportMenuitem* self, TransportMenuitemstate update);
+void mpris2_controller_initial_update (Mpris2Controller* self);
const char* player_controller_get_mpris_name (PlayerController* self);
void player_controller_set_app_info (PlayerController* self, GAppInfo* value);
static void player_controller_finalize (GObject* obj);
@@ -501,14 +493,10 @@ void player_controller_determine_state (PlayerController* self) {
if (mpris2_controller_connected (self->mpris_bridge) == TRUE) {
PlayerItem* _tmp0_;
TitleMenuitem* title;
- PlayerItem* _tmp1_;
- TransportMenuitem* transport;
player_controller_update_state (self, PLAYER_CONTROLLER_STATE_CONNECTED);
title = (_tmp0_ = (PlayerItem*) gee_abstract_list_get ((GeeAbstractList*) self->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TITLE), IS_TITLE_MENUITEM (_tmp0_) ? ((TitleMenuitem*) _tmp0_) : NULL);
title_menuitem_toggle_active_triangle (title, TRUE);
- transport = (_tmp1_ = (PlayerItem*) gee_abstract_list_get ((GeeAbstractList*) self->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TRANSPORT), IS_TRANSPORT_MENUITEM (_tmp1_) ? ((TransportMenuitem*) _tmp1_) : NULL);
- transport_menuitem_change_play_state (transport, TRANSPORT_MENUITEM_STATE_PAUSED);
- _g_object_unref0 (transport);
+ mpris2_controller_initial_update (self->mpris_bridge);
_g_object_unref0 (title);
} else {
player_controller_update_state (self, PLAYER_CONTROLLER_STATE_DISCONNECTED);