aboutsummaryrefslogtreecommitdiff
path: root/src/player-controller.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-03-17 14:08:16 -0400
committerKen VanDine <ken.vandine@canonical.com>2011-03-17 14:08:16 -0400
commit7619eab48daaa739fb3418237c693b7b463182f0 (patch)
tree0f87b54f1425f9228c950d906eba75173fa19f6a /src/player-controller.c
parenta65cff5ec2d7625408d58fe6b23ddb40d7f63ee2 (diff)
parent6de8affd0a17ab7729ac7647d8e84e58a158601a (diff)
downloadayatana-indicator-sound-7619eab48daaa739fb3418237c693b7b463182f0.tar.gz
ayatana-indicator-sound-7619eab48daaa739fb3418237c693b7b463182f0.tar.bz2
ayatana-indicator-sound-7619eab48daaa739fb3418237c693b7b463182f0.zip
Import upstream version 0.6.4
Diffstat (limited to 'src/player-controller.c')
-rw-r--r--src/player-controller.c60
1 files changed, 25 insertions, 35 deletions
diff --git a/src/player-controller.c b/src/player-controller.c
index f0d5d60..2eb7992 100644
--- a/src/player-controller.c
+++ b/src/player-controller.c
@@ -1,4 +1,4 @@
-/* player-controller.c generated by valac 0.11.6, the Vala compiler
+/* player-controller.c generated by valac 0.11.7, the Vala compiler
* generated from player-controller.vala, do not modify */
/*
@@ -283,30 +283,24 @@ static gpointer _g_object_ref0 (gpointer self) {
PlayerController* player_controller_construct (GType object_type, DbusmenuMenuitem* root, GAppInfo* app, const gchar* dbus_name, const gchar* icon_name, gint offset, gboolean* use_playlists, PlayerControllerstate initial_state) {
PlayerController * self = NULL;
gboolean* _tmp0_;
- gboolean* _tmp1_;
- DbusmenuMenuitem* _tmp2_;
- DbusmenuMenuitem* _tmp3_;
- GeeArrayList* _tmp4_ = NULL;
- GeeArrayList* _tmp5_;
+ DbusmenuMenuitem* _tmp1_;
+ GeeArrayList* _tmp2_ = NULL;
g_return_val_if_fail (root != NULL, NULL);
g_return_val_if_fail (app != NULL, NULL);
g_return_val_if_fail (icon_name != NULL, NULL);
self = (PlayerController*) g_object_new (object_type, NULL);
_tmp0_ = __bool_dup0 (use_playlists);
- _tmp1_ = _tmp0_;
_g_free0 (self->use_playlists);
- self->use_playlists = _tmp1_;
- _tmp2_ = _g_object_ref0 (root);
- _tmp3_ = _tmp2_;
+ self->use_playlists = _tmp0_;
+ _tmp1_ = _g_object_ref0 (root);
_g_object_unref0 (self->priv->root_menu);
- self->priv->root_menu = _tmp3_;
+ self->priv->root_menu = _tmp1_;
player_controller_set_app_info (self, app);
player_controller_set_dbus_name (self, dbus_name);
player_controller_set_icon_name (self, icon_name);
- _tmp4_ = gee_array_list_new (TYPE_PLAYER_ITEM, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
- _tmp5_ = _tmp4_;
+ _tmp2_ = gee_array_list_new (TYPE_PLAYER_ITEM, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
_g_object_unref0 (self->custom_items);
- self->custom_items = _tmp5_;
+ self->custom_items = _tmp2_;
self->current_state = (gint) initial_state;
player_controller_set_menu_offset (self, offset);
player_controller_construct_widgets (self);
@@ -393,7 +387,6 @@ static void player_controller_establish_mpris_connection (PlayerController* self
gchar* _tmp1_ = NULL;
gchar* _tmp2_;
Mpris2Controller* _tmp3_ = NULL;
- Mpris2Controller* _tmp4_;
g_return_if_fail (self != NULL);
if (self->current_state != PLAYER_CONTROLLER_STATE_READY) {
_tmp0_ = TRUE;
@@ -411,9 +404,8 @@ static void player_controller_establish_mpris_connection (PlayerController* self
"s value = %s ", _tmp2_);
_g_free0 (_tmp2_);
_tmp3_ = mpris2_controller_new (self);
- _tmp4_ = _tmp3_;
_g_object_unref0 (self->mpris_bridge);
- self->mpris_bridge = _tmp4_;
+ self->mpris_bridge = _tmp3_;
player_controller_determine_state (self);
}
@@ -460,12 +452,14 @@ void player_controller_remove_from_menu (PlayerController* self) {
}
_g_object_unref0 (_item_list);
}
- if (_bool_equal (self->use_playlists, (_tmp3_ = TRUE, &_tmp3_)) == TRUE) {
+ _tmp3_ = TRUE;
+ if (_bool_equal (self->use_playlists, &_tmp3_) == TRUE) {
gpointer _tmp4_ = NULL;
PlayerItem* _tmp5_;
PlaylistsMenuitem* playlists_menuitem;
_tmp4_ = gee_abstract_list_get ((GeeAbstractList*) self->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_PLAYLISTS);
- playlists_menuitem = (_tmp5_ = (PlayerItem*) _tmp4_, IS_PLAYLISTS_MENUITEM (_tmp5_) ? ((PlaylistsMenuitem*) _tmp5_) : NULL);
+ _tmp5_ = (PlayerItem*) _tmp4_;
+ playlists_menuitem = IS_PLAYLISTS_MENUITEM (_tmp5_) ? ((PlaylistsMenuitem*) _tmp5_) : NULL;
dbusmenu_menuitem_child_delete (self->priv->root_menu, playlists_menuitem->root_item);
_g_object_unref0 (playlists_menuitem);
}
@@ -484,7 +478,6 @@ void player_controller_hibernate (PlayerController* self) {
gpointer _tmp8_ = NULL;
PlayerItem* _tmp9_;
TitleMenuitem* title;
- Mpris2Controller* _tmp10_;
g_return_if_fail (self != NULL);
player_controller_update_state (self, PLAYER_CONTROLLER_STATE_OFFLINE);
_tmp0_ = gee_abstract_list_get ((GeeAbstractList*) self->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TRANSPORT);
@@ -502,11 +495,11 @@ void player_controller_hibernate (PlayerController* self) {
_g_object_unref0 (_tmp7_);
_g_object_unref0 (_tmp5_);
_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) self->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TITLE);
- title = (_tmp9_ = (PlayerItem*) _tmp8_, IS_TITLE_MENUITEM (_tmp9_) ? ((TitleMenuitem*) _tmp9_) : NULL);
+ _tmp9_ = (PlayerItem*) _tmp8_;
+ title = IS_TITLE_MENUITEM (_tmp9_) ? ((TitleMenuitem*) _tmp9_) : NULL;
title_menuitem_toggle_active_triangle (title, FALSE);
- _tmp10_ = NULL;
_g_object_unref0 (self->mpris_bridge);
- self->mpris_bridge = _tmp10_;
+ self->mpris_bridge = NULL;
_g_object_unref0 (title);
}
@@ -526,7 +519,8 @@ void player_controller_update_layout (PlayerController* self) {
PlayerItem* _tmp14_;
g_return_if_fail (self != NULL);
_tmp0_ = gee_abstract_list_get ((GeeAbstractList*) self->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_PLAYLISTS);
- playlists_menuitem = (_tmp1_ = (PlayerItem*) _tmp0_, IS_PLAYLISTS_MENUITEM (_tmp1_) ? ((PlaylistsMenuitem*) _tmp1_) : NULL);
+ _tmp1_ = (PlayerItem*) _tmp0_;
+ playlists_menuitem = IS_PLAYLISTS_MENUITEM (_tmp1_) ? ((PlaylistsMenuitem*) _tmp1_) : NULL;
if (self->current_state != PLAYER_CONTROLLER_STATE_CONNECTED) {
gpointer _tmp2_ = NULL;
PlayerItem* _tmp3_;
@@ -623,7 +617,8 @@ static void player_controller_construct_widgets (PlayerController* self) {
PlaylistsMenuitem* _tmp12_;
PlaylistsMenuitem* playlists_menuitem;
gint _tmp13_;
- _tmp12_ = _g_object_ref0 ((_tmp11_ = item, IS_PLAYLISTS_MENUITEM (_tmp11_) ? ((PlaylistsMenuitem*) _tmp11_) : NULL));
+ _tmp11_ = item;
+ _tmp12_ = _g_object_ref0 (IS_PLAYLISTS_MENUITEM (_tmp11_) ? ((PlaylistsMenuitem*) _tmp11_) : NULL);
playlists_menuitem = _tmp12_;
_tmp13_ = gee_abstract_list_index_of ((GeeAbstractList*) self->custom_items, item);
dbusmenu_menuitem_child_add_position (self->priv->root_menu, playlists_menuitem->root_item, (guint) (self->priv->_menu_offset + _tmp13_));
@@ -650,7 +645,8 @@ static void player_controller_determine_state (PlayerController* self) {
TitleMenuitem* title;
player_controller_update_state (self, PLAYER_CONTROLLER_STATE_CONNECTED);
_tmp1_ = gee_abstract_list_get ((GeeAbstractList*) self->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TITLE);
- title = (_tmp2_ = (PlayerItem*) _tmp1_, IS_TITLE_MENUITEM (_tmp2_) ? ((TitleMenuitem*) _tmp2_) : NULL);
+ _tmp2_ = (PlayerItem*) _tmp1_;
+ title = IS_TITLE_MENUITEM (_tmp2_) ? ((TitleMenuitem*) _tmp2_) : NULL;
title_menuitem_toggle_active_triangle (title, TRUE);
mpris2_controller_initial_update (self->mpris_bridge);
_g_object_unref0 (title);
@@ -670,12 +666,10 @@ const gchar* player_controller_get_dbus_name (PlayerController* self) {
void player_controller_set_dbus_name (PlayerController* self, const gchar* value) {
gchar* _tmp0_;
- gchar* _tmp1_;
g_return_if_fail (self != NULL);
_tmp0_ = g_strdup (value);
- _tmp1_ = _tmp0_;
_g_free0 (self->priv->_dbus_name);
- self->priv->_dbus_name = _tmp1_;
+ self->priv->_dbus_name = _tmp0_;
g_object_notify ((GObject *) self, "dbus-name");
}
@@ -690,12 +684,10 @@ GAppInfo* player_controller_get_app_info (PlayerController* self) {
void player_controller_set_app_info (PlayerController* self, GAppInfo* value) {
GAppInfo* _tmp0_;
- GAppInfo* _tmp1_;
g_return_if_fail (self != NULL);
_tmp0_ = _g_object_ref0 (value);
- _tmp1_ = _tmp0_;
_g_object_unref0 (self->priv->_app_info);
- self->priv->_app_info = _tmp1_;
+ self->priv->_app_info = _tmp0_;
g_object_notify ((GObject *) self, "app-info");
}
@@ -725,12 +717,10 @@ const gchar* player_controller_get_icon_name (PlayerController* self) {
void player_controller_set_icon_name (PlayerController* self, const gchar* value) {
gchar* _tmp0_;
- gchar* _tmp1_;
g_return_if_fail (self != NULL);
_tmp0_ = g_strdup (value);
- _tmp1_ = _tmp0_;
_g_free0 (self->priv->_icon_name);
- self->priv->_icon_name = _tmp1_;
+ self->priv->_icon_name = _tmp0_;
g_object_notify ((GObject *) self, "icon-name");
}