aboutsummaryrefslogtreecommitdiff
path: root/src/mpris2-controller.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mpris2-controller.c')
-rw-r--r--src/mpris2-controller.c224
1 files changed, 113 insertions, 111 deletions
diff --git a/src/mpris2-controller.c b/src/mpris2-controller.c
index 4a9b1ff..89ef02d 100644
--- a/src/mpris2-controller.c
+++ b/src/mpris2-controller.c
@@ -1,4 +1,4 @@
-/* mpris2-controller.c generated by valac 0.11.6, the Vala compiler
+/* mpris2-controller.c generated by valac 0.11.7, the Vala compiler
* generated from mpris2-controller.vala, do not modify */
/*
@@ -269,14 +269,12 @@ struct _Mpris2ControllerFetchPlaylistsData {
PlaylistDetails* _tmp2_;
gint _tmp2__length1;
gint __tmp2__size_;
- PlaylistDetails* _tmp3_;
GError * e;
- gpointer _tmp4_;
- PlayerItem* _tmp5_;
+ gpointer _tmp3_;
+ PlayerItem* _tmp4_;
PlaylistsMenuitem* playlists_item;
- gboolean _tmp6_;
- gboolean* _tmp7_;
- gboolean* _tmp8_;
+ gboolean _tmp5_;
+ gboolean* _tmp6_;
GError * _inner_error_;
};
@@ -496,7 +494,8 @@ void mpris2_controller_property_changed_cb (Mpris2Controller* self, const gchar*
_tmp5_ = mpris2_controller_determine_play_state (self, state);
p = (TransportState) _tmp5_;
_tmp6_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TRANSPORT);
- _tmp8_ = (_tmp7_ = (PlayerItem*) _tmp6_, IS_TRANSPORT_MENUITEM (_tmp7_) ? ((TransportMenuitem*) _tmp7_) : NULL);
+ _tmp7_ = (PlayerItem*) _tmp6_;
+ _tmp8_ = IS_TRANSPORT_MENUITEM (_tmp7_) ? ((TransportMenuitem*) _tmp7_) : NULL;
transport_menuitem_change_play_state (_tmp8_, p);
_g_object_unref0 (_tmp8_);
_g_free0 (state);
@@ -541,7 +540,8 @@ void mpris2_controller_property_changed_cb (Mpris2Controller* self, const gchar*
playlist_v = _tmp21_;
if (playlist_v != NULL) {
gboolean _tmp23_;
- _tmp22_ = _bool_equal (self->priv->_owner->use_playlists, (_tmp23_ = TRUE, &_tmp23_)) == TRUE;
+ _tmp23_ = TRUE;
+ _tmp22_ = _bool_equal (self->priv->_owner->use_playlists, &_tmp23_) == TRUE;
} else {
_tmp22_ = FALSE;
}
@@ -553,7 +553,8 @@ void mpris2_controller_property_changed_cb (Mpris2Controller* self, const gchar*
playlist_count_v = _tmp25_;
if (playlist_count_v != NULL) {
gboolean _tmp27_;
- _tmp26_ = _bool_equal (self->priv->_owner->use_playlists, (_tmp27_ = TRUE, &_tmp27_)) == TRUE;
+ _tmp27_ = TRUE;
+ _tmp26_ = _bool_equal (self->priv->_owner->use_playlists, &_tmp27_) == TRUE;
} else {
_tmp26_ = FALSE;
}
@@ -566,7 +567,8 @@ void mpris2_controller_property_changed_cb (Mpris2Controller* self, const gchar*
playlist_orderings_v = _tmp29_;
if (playlist_orderings_v != NULL) {
gboolean _tmp31_;
- _tmp30_ = _bool_equal (self->priv->_owner->use_playlists, (_tmp31_ = TRUE, &_tmp31_)) == TRUE;
+ _tmp31_ = TRUE;
+ _tmp30_ = _bool_equal (self->priv->_owner->use_playlists, &_tmp31_) == TRUE;
} else {
_tmp30_ = FALSE;
}
@@ -584,7 +586,8 @@ void mpris2_controller_property_changed_cb (Mpris2Controller* self, const gchar*
gchar* _tmp36_ = NULL;
gchar* _tmp37_;
_tmp34_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TITLE);
- title = (_tmp35_ = (PlayerItem*) _tmp34_, IS_TITLE_MENUITEM (_tmp35_) ? ((TitleMenuitem*) _tmp35_) : NULL);
+ _tmp35_ = (PlayerItem*) _tmp34_;
+ title = IS_TITLE_MENUITEM (_tmp35_) ? ((TitleMenuitem*) _tmp35_) : NULL;
_tmp36_ = mpris_root_get_Identity (self->priv->_mpris2_root);
_tmp37_ = _tmp36_;
title_menuitem_alter_label (title, _tmp37_);
@@ -614,9 +617,12 @@ static gboolean mpris2_controller_ensure_correct_playback_status (Mpris2Controll
_tmp0_ = mpris_player_get_PlaybackStatus (self->priv->_player);
_tmp1_ = _tmp0_;
_tmp2_ = mpris2_controller_determine_play_state (self, _tmp1_);
- p = (_tmp3_ = (TransportState) _tmp2_, _g_free0 (_tmp1_), _tmp3_);
+ _tmp3_ = (TransportState) _tmp2_;
+ _g_free0 (_tmp1_);
+ p = _tmp3_;
_tmp4_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TRANSPORT);
- _tmp6_ = (_tmp5_ = (PlayerItem*) _tmp4_, IS_TRANSPORT_MENUITEM (_tmp5_) ? ((TransportMenuitem*) _tmp5_) : NULL);
+ _tmp5_ = (PlayerItem*) _tmp4_;
+ _tmp6_ = IS_TRANSPORT_MENUITEM (_tmp5_) ? ((TransportMenuitem*) _tmp5_) : NULL;
transport_menuitem_change_play_state (_tmp6_, p);
_g_object_unref0 (_tmp6_);
result = FALSE;
@@ -651,7 +657,9 @@ static GHashTable* mpris2_controller_clean_metadata (Mpris2Controller* self) {
_tmp2_ = _tmp1_;
_tmp3_ = g_hash_table_lookup (_tmp2_, "xesam:artist");
_tmp4_ = _g_variant_ref0 ((GVariant*) _tmp3_);
- artist_v = (_tmp5_ = _tmp4_, _g_hash_table_unref0 (_tmp2_), _tmp5_);
+ _tmp5_ = _tmp4_;
+ _g_hash_table_unref0 (_tmp2_);
+ artist_v = _tmp5_;
if (artist_v != NULL) {
GHashTable* _tmp6_ = NULL;
GHashTable* _tmp7_;
@@ -662,48 +670,46 @@ static GHashTable* mpris2_controller_clean_metadata (Mpris2Controller* self) {
const gchar* _tmp11_ = NULL;
gchar* display_artists = NULL;
const gchar* _tmp12_ = NULL;
- gchar* _tmp20_;
- gconstpointer _tmp21_ = NULL;
+ gchar* _tmp18_;
+ gconstpointer _tmp19_ = NULL;
_tmp6_ = mpris_player_get_Metadata (self->priv->_player);
_tmp7_ = _tmp6_;
_tmp8_ = g_hash_table_lookup (_tmp7_, "xesam:artist");
_tmp9_ = _g_variant_ref0 ((GVariant*) _tmp8_);
- v_artists = (_tmp10_ = _tmp9_, _g_hash_table_unref0 (_tmp7_), _tmp10_);
+ _tmp10_ = _tmp9_;
+ _g_hash_table_unref0 (_tmp7_);
+ v_artists = _tmp10_;
_tmp11_ = g_variant_get_type_string (v_artists);
g_debug ("mpris2-controller.vala:130: artists is of type %s", _tmp11_);
_tmp12_ = g_variant_get_type_string (v_artists);
if (g_strcmp0 (_tmp12_, "s") == 0) {
const gchar* _tmp13_ = NULL;
gchar* _tmp14_;
- gchar* _tmp15_;
g_debug ("mpris2-controller.vala:133: SPOTIFY is that you ?");
_tmp13_ = g_variant_get_string (v_artists, NULL);
_tmp14_ = g_strdup (_tmp13_);
- _tmp15_ = _tmp14_;
_g_free0 (display_artists);
- display_artists = _tmp15_;
+ display_artists = _tmp14_;
} else {
- size_t _tmp16_;
- gchar** _tmp17_ = NULL;
+ size_t _tmp15_;
+ gchar** _tmp16_ = NULL;
gchar** artists;
gint artists_length1;
gint _artists_size_;
- gchar* _tmp18_ = NULL;
- gchar* _tmp19_;
- _tmp17_ = g_variant_dup_strv (v_artists, &_tmp16_);
- artists = _tmp17_;
- artists_length1 = _tmp16_;
- _artists_size_ = _tmp16_;
- _tmp18_ = g_strjoinv (", ", artists);
- _tmp19_ = _tmp18_;
+ gchar* _tmp17_ = NULL;
+ _tmp16_ = g_variant_dup_strv (v_artists, &_tmp15_);
+ artists = _tmp16_;
+ artists_length1 = _tmp15_;
+ _artists_size_ = _tmp15_;
+ _tmp17_ = g_strjoinv (", ", artists);
_g_free0 (display_artists);
- display_artists = _tmp19_;
+ display_artists = _tmp17_;
artists = (_vala_array_free (artists, artists_length1, (GDestroyNotify) g_free), NULL);
}
- _tmp20_ = g_strdup ("xesam:artist");
- g_hash_table_replace (changed_updates, _tmp20_, _variant_new1 (display_artists));
- _tmp21_ = g_hash_table_lookup (changed_updates, "xesam:artist");
- g_debug ("mpris2-controller.vala:141: artist : %s", _variant_get2 ((GVariant*) _tmp21_));
+ _tmp18_ = g_strdup ("xesam:artist");
+ g_hash_table_replace (changed_updates, _tmp18_, _variant_new1 (display_artists));
+ _tmp19_ = g_hash_table_lookup (changed_updates, "xesam:artist");
+ g_debug ("mpris2-controller.vala:141: artist : %s", _variant_get2 ((GVariant*) _tmp19_));
_g_free0 (display_artists);
_g_variant_unref0 (v_artists);
}
@@ -752,7 +758,9 @@ void mpris2_controller_initial_update (Mpris2Controller* self) {
g_return_if_fail (self != NULL);
_tmp0_ = mpris_player_get_PlaybackStatus (self->priv->_player);
_tmp1_ = _tmp0_;
- if ((_tmp2_ = _tmp1_ == NULL, _g_free0 (_tmp1_), _tmp2_)) {
+ _tmp2_ = _tmp1_ == NULL;
+ _g_free0 (_tmp1_);
+ if (_tmp2_) {
update = TRANSPORT_STATE_PAUSED;
} else {
gchar* _tmp3_ = NULL;
@@ -766,14 +774,17 @@ void mpris2_controller_initial_update (Mpris2Controller* self) {
}
_tmp6_ = mpris_root_get_Identity (self->priv->_mpris2_root);
_tmp7_ = _tmp6_;
- if ((_tmp8_ = _tmp7_ != NULL, _g_free0 (_tmp7_), _tmp8_)) {
+ _tmp8_ = _tmp7_ != NULL;
+ _g_free0 (_tmp7_);
+ if (_tmp8_) {
gpointer _tmp9_ = NULL;
PlayerItem* _tmp10_;
TitleMenuitem* title;
gchar* _tmp11_ = NULL;
gchar* _tmp12_;
_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TITLE);
- title = (_tmp10_ = (PlayerItem*) _tmp9_, IS_TITLE_MENUITEM (_tmp10_) ? ((TitleMenuitem*) _tmp10_) : NULL);
+ _tmp10_ = (PlayerItem*) _tmp9_;
+ title = IS_TITLE_MENUITEM (_tmp10_) ? ((TitleMenuitem*) _tmp10_) : NULL;
_tmp11_ = mpris_root_get_Identity (self->priv->_mpris2_root);
_tmp12_ = _tmp11_;
title_menuitem_alter_label (title, _tmp12_);
@@ -781,7 +792,8 @@ void mpris2_controller_initial_update (Mpris2Controller* self) {
_g_object_unref0 (title);
}
_tmp13_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TRANSPORT);
- _tmp15_ = (_tmp14_ = (PlayerItem*) _tmp13_, IS_TRANSPORT_MENUITEM (_tmp14_) ? ((TransportMenuitem*) _tmp14_) : NULL);
+ _tmp14_ = (PlayerItem*) _tmp13_;
+ _tmp15_ = IS_TRANSPORT_MENUITEM (_tmp14_) ? ((TransportMenuitem*) _tmp14_) : NULL;
transport_menuitem_change_play_state (_tmp15_, update);
_g_object_unref0 (_tmp15_);
_tmp16_ = mpris2_controller_clean_metadata (self);
@@ -793,7 +805,8 @@ void mpris2_controller_initial_update (Mpris2Controller* self) {
player_item_update (_tmp18_, cleaned_metadata, _tmp20_);
_g_object_unref0 (_tmp20_);
_g_object_unref0 (_tmp18_);
- if (_bool_equal (self->priv->_owner->use_playlists, (_tmp21_ = TRUE, &_tmp21_)) == TRUE) {
+ _tmp21_ = TRUE;
+ if (_bool_equal (self->priv->_owner->use_playlists, &_tmp21_) == TRUE) {
mpris2_controller_fetch_playlists (self, NULL, NULL);
mpris2_controller_fetch_active_playlist (self);
}
@@ -855,7 +868,8 @@ static void mpris2_controller_on_playlistdetails_changed (Mpris2Controller* self
PlaylistsMenuitem* playlists_item;
g_return_if_fail (self != NULL);
_tmp0_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_PLAYLISTS);
- playlists_item = (_tmp1_ = (PlayerItem*) _tmp0_, IS_PLAYLISTS_MENUITEM (_tmp1_) ? ((PlaylistsMenuitem*) _tmp1_) : NULL);
+ _tmp1_ = (PlayerItem*) _tmp0_;
+ playlists_item = IS_PLAYLISTS_MENUITEM (_tmp1_) ? ((PlaylistsMenuitem*) _tmp1_) : NULL;
playlists_menuitem_update_individual_playlist (playlists_item, details);
_g_object_unref0 (playlists_item);
}
@@ -954,11 +968,10 @@ static gboolean mpris2_controller_fetch_playlists_co (Mpris2ControllerFetchPlayl
g_clear_error (&data->_inner_error_);
return FALSE;
}
- data->_tmp3_ = data->_tmp2_;
data->current_playlists = (_vala_PlaylistDetails_array_free (data->current_playlists, data->current_playlists_length1), NULL);
+ data->current_playlists = data->_tmp2_;
data->current_playlists_length1 = data->_tmp2__length1;
- data->_current_playlists_size_ = data->current_playlists_length1;
- data->current_playlists = data->_tmp3_;
+ data->_current_playlists_size_ = data->__tmp2__size_;
goto __finally11;
__catch11_g_io_error:
{
@@ -984,18 +997,19 @@ static gboolean mpris2_controller_fetch_playlists_co (Mpris2ControllerFetchPlayl
}
if (data->current_playlists != NULL) {
g_debug ("mpris2-controller.vala:234: Size of the playlist array = %i", data->current_playlists_length1);
- data->_tmp4_ = NULL;
- data->_tmp4_ = gee_abstract_list_get ((GeeAbstractList*) data->self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_PLAYLISTS);
- data->playlists_item = (data->_tmp5_ = (PlayerItem*) data->_tmp4_, IS_PLAYLISTS_MENUITEM (data->_tmp5_) ? ((PlaylistsMenuitem*) data->_tmp5_) : NULL);
+ data->_tmp3_ = NULL;
+ data->_tmp3_ = gee_abstract_list_get ((GeeAbstractList*) data->self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_PLAYLISTS);
+ data->_tmp4_ = (PlayerItem*) data->_tmp3_;
+ data->playlists_item = IS_PLAYLISTS_MENUITEM (data->_tmp4_) ? ((PlaylistsMenuitem*) data->_tmp4_) : NULL;
playlists_menuitem_update (data->playlists_item, data->current_playlists, data->current_playlists_length1);
_g_object_unref0 (data->playlists_item);
} else {
g_warning ("mpris2-controller.vala:239: Playlists are on but its returning no cur" \
"rent_playlists");
- data->_tmp7_ = __bool_dup0 ((data->_tmp6_ = FALSE, &data->_tmp6_));
- data->_tmp8_ = data->_tmp7_;
+ data->_tmp5_ = FALSE;
+ data->_tmp6_ = __bool_dup0 (&data->_tmp5_);
_g_free0 (data->self->priv->_owner->use_playlists);
- data->self->priv->_owner->use_playlists = data->_tmp8_;
+ data->self->priv->_owner->use_playlists = data->_tmp6_;
}
data->current_playlists = (_vala_PlaylistDetails_array_free (data->current_playlists, data->current_playlists_length1), NULL);
if (data->_state_ == 0) {
@@ -1021,11 +1035,14 @@ static gboolean mpris2_controller_fetch_active_playlist (Mpris2Controller* self)
g_return_val_if_fail (self != NULL, FALSE);
mpris_playlists_get_ActivePlaylist (self->priv->_playlists, &_tmp0_);
_tmp1_ = _tmp0_;
- if ((_tmp2_ = _tmp1_.valid == FALSE, active_playlist_container_destroy (&_tmp1_), _tmp2_)) {
+ _tmp2_ = _tmp1_.valid == FALSE;
+ active_playlist_container_destroy (&_tmp1_);
+ if (_tmp2_) {
g_debug ("mpris2-controller.vala:247: We don't have an active playlist");
}
_tmp3_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_PLAYLISTS);
- playlists_item = (_tmp4_ = (PlayerItem*) _tmp3_, IS_PLAYLISTS_MENUITEM (_tmp4_) ? ((PlaylistsMenuitem*) _tmp4_) : NULL);
+ _tmp4_ = (PlayerItem*) _tmp3_;
+ playlists_item = IS_PLAYLISTS_MENUITEM (_tmp4_) ? ((PlaylistsMenuitem*) _tmp4_) : NULL;
mpris_playlists_get_ActivePlaylist (self->priv->_playlists, &_tmp5_);
_tmp6_ = _tmp5_;
playlists_menuitem_active_playlist_update (playlists_item, &_tmp6_.details);
@@ -1069,12 +1086,10 @@ MprisRoot* mpris2_controller_get_mpris2_root (Mpris2Controller* self) {
static void mpris2_controller_set_mpris2_root (Mpris2Controller* self, MprisRoot* value) {
MprisRoot* _tmp0_;
- MprisRoot* _tmp1_;
g_return_if_fail (self != NULL);
_tmp0_ = _g_object_ref0 (value);
- _tmp1_ = _tmp0_;
_g_object_unref0 (self->priv->_mpris2_root);
- self->priv->_mpris2_root = _tmp1_;
+ self->priv->_mpris2_root = _tmp0_;
g_object_notify ((GObject *) self, "mpris2-root");
}
@@ -1089,12 +1104,10 @@ MprisPlayer* mpris2_controller_get_player (Mpris2Controller* self) {
static void mpris2_controller_set_player (Mpris2Controller* self, MprisPlayer* value) {
MprisPlayer* _tmp0_;
- MprisPlayer* _tmp1_;
g_return_if_fail (self != NULL);
_tmp0_ = _g_object_ref0 (value);
- _tmp1_ = _tmp0_;
_g_object_unref0 (self->priv->_player);
- self->priv->_player = _tmp1_;
+ self->priv->_player = _tmp0_;
g_object_notify ((GObject *) self, "player");
}
@@ -1109,12 +1122,10 @@ MprisPlaylists* mpris2_controller_get_playlists (Mpris2Controller* self) {
static void mpris2_controller_set_playlists (Mpris2Controller* self, MprisPlaylists* value) {
MprisPlaylists* _tmp0_;
- MprisPlaylists* _tmp1_;
g_return_if_fail (self != NULL);
_tmp0_ = _g_object_ref0 (value);
- _tmp1_ = _tmp0_;
_g_object_unref0 (self->priv->_playlists);
- self->priv->_playlists = _tmp1_;
+ self->priv->_playlists = _tmp0_;
g_object_notify ((GObject *) self, "playlists");
}
@@ -1129,12 +1140,10 @@ FreeDesktopProperties* mpris2_controller_get_properties_interface (Mpris2Control
static void mpris2_controller_set_properties_interface (Mpris2Controller* self, FreeDesktopProperties* value) {
FreeDesktopProperties* _tmp0_;
- FreeDesktopProperties* _tmp1_;
g_return_if_fail (self != NULL);
_tmp0_ = _g_object_ref0 (value);
- _tmp1_ = _tmp0_;
_g_object_unref0 (self->priv->_properties_interface);
- self->priv->_properties_interface = _tmp1_;
+ self->priv->_properties_interface = _tmp0_;
g_object_notify ((GObject *) self, "properties-interface");
}
@@ -1149,12 +1158,10 @@ PlayerController* mpris2_controller_get_owner (Mpris2Controller* self) {
static void mpris2_controller_set_owner (Mpris2Controller* self, PlayerController* value) {
PlayerController* _tmp0_;
- PlayerController* _tmp1_;
g_return_if_fail (self != NULL);
_tmp0_ = _g_object_ref0 (value);
- _tmp1_ = _tmp0_;
_g_object_unref0 (self->priv->_owner);
- self->priv->_owner = _tmp1_;
+ self->priv->_owner = _tmp0_;
g_object_notify ((GObject *) self, "owner");
}
@@ -1174,27 +1181,24 @@ static GObject * mpris2_controller_constructor (GType type, guint n_construct_pr
GObjectClass * parent_class;
Mpris2Controller * self;
const gchar* _tmp0_ = NULL;
- const gchar* _tmp1_ = NULL;
- MprisRoot* _tmp2_ = NULL;
+ MprisRoot* _tmp1_ = NULL;
+ MprisRoot* _tmp2_;
MprisRoot* _tmp3_;
- MprisRoot* _tmp4_;
- const gchar* _tmp5_ = NULL;
- const gchar* _tmp6_ = NULL;
- MprisPlayer* _tmp7_ = NULL;
- MprisPlayer* _tmp8_;
- MprisPlayer* _tmp9_;
- gboolean _tmp10_;
- FreeDesktopProperties* _tmp16_ = NULL;
- FreeDesktopProperties* _tmp17_;
- FreeDesktopProperties* _tmp18_;
+ const gchar* _tmp4_ = NULL;
+ MprisPlayer* _tmp5_ = NULL;
+ MprisPlayer* _tmp6_;
+ MprisPlayer* _tmp7_;
+ gboolean _tmp8_;
+ FreeDesktopProperties* _tmp13_ = NULL;
+ FreeDesktopProperties* _tmp14_;
+ FreeDesktopProperties* _tmp15_;
GError * _inner_error_ = NULL;
parent_class = G_OBJECT_CLASS (mpris2_controller_parent_class);
obj = parent_class->constructor (type, n_construct_properties, construct_properties);
self = MPRIS2_CONTROLLER (obj);
_tmp0_ = player_controller_get_dbus_name (self->priv->_owner);
- _tmp1_ = player_controller_get_dbus_name (self->priv->_owner);
- _tmp2_ = g_initable_new (TYPE_MPRIS_ROOT_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _tmp1_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/mpris/MediaPlayer2", "g-interface-name", "org.mpris.MediaPlayer2", NULL);
- _tmp3_ = (MprisRoot*) _tmp2_;
+ _tmp1_ = g_initable_new (TYPE_MPRIS_ROOT_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _tmp0_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/mpris/MediaPlayer2", "g-interface-name", "org.mpris.MediaPlayer2", NULL);
+ _tmp2_ = (MprisRoot*) _tmp1_;
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_IO_ERROR) {
goto __catch13_g_io_error;
@@ -1202,13 +1206,12 @@ static GObject * mpris2_controller_constructor (GType type, guint n_construct_pr
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
}
- _tmp4_ = _tmp3_;
- mpris2_controller_set_mpris2_root (self, _tmp4_);
- _g_object_unref0 (_tmp4_);
- _tmp5_ = player_controller_get_dbus_name (self->priv->_owner);
- _tmp6_ = player_controller_get_dbus_name (self->priv->_owner);
- _tmp7_ = g_initable_new (TYPE_MPRIS_PLAYER_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _tmp6_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/mpris/MediaPlayer2", "g-interface-name", "org.mpris.MediaPlayer2.Player", NULL);
- _tmp8_ = (MprisPlayer*) _tmp7_;
+ _tmp3_ = _tmp2_;
+ mpris2_controller_set_mpris2_root (self, _tmp3_);
+ _g_object_unref0 (_tmp3_);
+ _tmp4_ = player_controller_get_dbus_name (self->priv->_owner);
+ _tmp5_ = g_initable_new (TYPE_MPRIS_PLAYER_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _tmp4_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/mpris/MediaPlayer2", "g-interface-name", "org.mpris.MediaPlayer2.Player", NULL);
+ _tmp6_ = (MprisPlayer*) _tmp5_;
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_IO_ERROR) {
goto __catch13_g_io_error;
@@ -1216,19 +1219,18 @@ static GObject * mpris2_controller_constructor (GType type, guint n_construct_pr
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
}
- _tmp9_ = _tmp8_;
- mpris2_controller_set_player (self, _tmp9_);
- _g_object_unref0 (_tmp9_);
- if (_bool_equal (self->priv->_owner->use_playlists, (_tmp10_ = TRUE, &_tmp10_)) == TRUE) {
- const gchar* _tmp11_ = NULL;
- const gchar* _tmp12_ = NULL;
- MprisPlaylists* _tmp13_ = NULL;
- MprisPlaylists* _tmp14_;
- MprisPlaylists* _tmp15_;
- _tmp11_ = player_controller_get_dbus_name (self->priv->_owner);
- _tmp12_ = player_controller_get_dbus_name (self->priv->_owner);
- _tmp13_ = g_initable_new (TYPE_MPRIS_PLAYLISTS_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _tmp12_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/mpris/MediaPlayer2", "g-interface-name", "org.mpris.MediaPlayer2.Playlists", NULL);
- _tmp14_ = (MprisPlaylists*) _tmp13_;
+ _tmp7_ = _tmp6_;
+ mpris2_controller_set_player (self, _tmp7_);
+ _g_object_unref0 (_tmp7_);
+ _tmp8_ = TRUE;
+ if (_bool_equal (self->priv->_owner->use_playlists, &_tmp8_) == TRUE) {
+ const gchar* _tmp9_ = NULL;
+ MprisPlaylists* _tmp10_ = NULL;
+ MprisPlaylists* _tmp11_;
+ MprisPlaylists* _tmp12_;
+ _tmp9_ = player_controller_get_dbus_name (self->priv->_owner);
+ _tmp10_ = g_initable_new (TYPE_MPRIS_PLAYLISTS_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _tmp9_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/mpris/MediaPlayer2", "g-interface-name", "org.mpris.MediaPlayer2.Playlists", NULL);
+ _tmp11_ = (MprisPlaylists*) _tmp10_;
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_IO_ERROR) {
goto __catch13_g_io_error;
@@ -1236,13 +1238,13 @@ static GObject * mpris2_controller_constructor (GType type, guint n_construct_pr
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
}
- _tmp15_ = _tmp14_;
- mpris2_controller_set_playlists (self, _tmp15_);
- _g_object_unref0 (_tmp15_);
+ _tmp12_ = _tmp11_;
+ mpris2_controller_set_playlists (self, _tmp12_);
+ _g_object_unref0 (_tmp12_);
g_signal_connect_object (self->priv->_playlists, "playlist-changed", (GCallback) _mpris2_controller_on_playlistdetails_changed_mpris_playlists_playlist_changed, self, 0);
}
- _tmp16_ = g_initable_new (TYPE_FREE_DESKTOP_PROPERTIES_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", "org.freedesktop.Properties.PropertiesChanged", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/mpris/MediaPlayer2", "g-interface-name", "org.freedesktop.DBus.Properties", NULL);
- _tmp17_ = (FreeDesktopProperties*) _tmp16_;
+ _tmp13_ = g_initable_new (TYPE_FREE_DESKTOP_PROPERTIES_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", "org.freedesktop.Properties.PropertiesChanged", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/mpris/MediaPlayer2", "g-interface-name", "org.freedesktop.DBus.Properties", NULL);
+ _tmp14_ = (FreeDesktopProperties*) _tmp13_;
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_IO_ERROR) {
goto __catch13_g_io_error;
@@ -1250,9 +1252,9 @@ static GObject * mpris2_controller_constructor (GType type, guint n_construct_pr
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
}
- _tmp18_ = _tmp17_;
- mpris2_controller_set_properties_interface (self, _tmp18_);
- _g_object_unref0 (_tmp18_);
+ _tmp15_ = _tmp14_;
+ mpris2_controller_set_properties_interface (self, _tmp15_);
+ _g_object_unref0 (_tmp15_);
g_signal_connect_object (self->priv->_properties_interface, "properties-changed", (GCallback) _mpris2_controller_property_changed_cb_free_desktop_properties_properties_changed, self, 0);
goto __finally13;
__catch13_g_io_error: