diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2011-10-28 09:57:12 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2011-10-28 09:57:12 -0400 |
commit | cb26f50fcf64566cf5a3983ecd15a4d8e3db5a14 (patch) | |
tree | c16075c4195d7fa1fccefedbbe4617af8fb329a9 /src/transport-menu-item.c | |
parent | 18ac680202da53507136693452dc34ca2113630f (diff) | |
parent | 6c40e13a44770e9bda393e5b0b1ebefa6b8077d5 (diff) | |
download | ayatana-indicator-sound-cb26f50fcf64566cf5a3983ecd15a4d8e3db5a14.tar.gz ayatana-indicator-sound-cb26f50fcf64566cf5a3983ecd15a4d8e3db5a14.tar.bz2 ayatana-indicator-sound-cb26f50fcf64566cf5a3983ecd15a4d8e3db5a14.zip |
releasing version 0.7.9.1-0ubuntu1
Diffstat (limited to 'src/transport-menu-item.c')
-rw-r--r-- | src/transport-menu-item.c | 98 |
1 files changed, 30 insertions, 68 deletions
diff --git a/src/transport-menu-item.c b/src/transport-menu-item.c index e9ffed9..746efa7 100644 --- a/src/transport-menu-item.c +++ b/src/transport-menu-item.c @@ -1,4 +1,4 @@ -/* transport-menu-item.c generated by valac 0.14.0, the Vala compiler +/* transport-menu-item.c generated by valac 0.12.1, the Vala compiler * generated from transport-menu-item.vala, do not modify */ /* @@ -157,10 +157,8 @@ static void _vala_transport_menuitem_get_property (GObject * object, guint prope TransportMenuitem* transport_menuitem_construct (GType object_type, PlayerController* parent) { TransportMenuitem * self = NULL; - PlayerController* _tmp0_; g_return_val_if_fail (parent != NULL, NULL); - _tmp0_ = parent; - self = (TransportMenuitem*) g_object_new (object_type, "item-type", DBUSMENU_TRANSPORT_MENUITEM_TYPE, "owner", _tmp0_, NULL); + self = (TransportMenuitem*) g_object_new (object_type, "item-type", DBUSMENU_TRANSPORT_MENUITEM_TYPE, "owner", parent, NULL); return self; } @@ -182,10 +180,8 @@ static gboolean _transport_menuitem_send_cached_action_gsource_func (gpointer se void transport_menuitem_handle_cached_action (TransportMenuitem* self) { - TransportAction _tmp0_; g_return_if_fail (self != NULL); - _tmp0_ = self->priv->cached_action; - if (_tmp0_ != TRANSPORT_ACTION_NO_ACTION) { + if (self->priv->cached_action != TRANSPORT_ACTION_NO_ACTION) { g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, _transport_menuitem_send_cached_action_gsource_func, g_object_ref (self), g_object_unref); } } @@ -193,16 +189,10 @@ void transport_menuitem_handle_cached_action (TransportMenuitem* self) { static gboolean transport_menuitem_send_cached_action (TransportMenuitem* self) { gboolean result = FALSE; - PlayerController* _tmp0_; - PlayerController* _tmp1_; - Mpris2Controller* _tmp2_; - TransportAction _tmp3_; + PlayerController* _tmp0_ = NULL; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = player_item_get_owner ((PlayerItem*) self); - _tmp1_ = _tmp0_; - _tmp2_ = _tmp1_->mpris_bridge; - _tmp3_ = self->priv->cached_action; - mpris2_controller_transport_update (_tmp2_, _tmp3_); + mpris2_controller_transport_update (_tmp0_->mpris_bridge, self->priv->cached_action); self->priv->cached_action = TRANSPORT_ACTION_NO_ACTION; result = FALSE; return result; @@ -210,11 +200,9 @@ static gboolean transport_menuitem_send_cached_action (TransportMenuitem* self) void transport_menuitem_change_play_state (TransportMenuitem* self, TransportState update) { - TransportState _tmp0_; gint temp; g_return_if_fail (self != NULL); - _tmp0_ = update; - temp = (gint) _tmp0_; + temp = (gint) update; dbusmenu_menuitem_property_set_int ((DbusmenuMenuitem*) self, DBUSMENU_TRANSPORT_MENUITEM_PLAY_STATE, temp); } @@ -227,57 +215,35 @@ static gpointer _g_variant_ref0 (gpointer self) { static void transport_menuitem_real_handle_event (DbusmenuMenuitem* base, const gchar* name, GVariant* input_value, guint timestamp) { TransportMenuitem * self; GVariant* _tmp0_; - GVariant* _tmp1_; GVariant* v; - GVariant* _tmp2_; - const GVariantType* _tmp3_; - gboolean _tmp4_ = FALSE; - GVariant* _tmp7_; - gint32 _tmp8_ = 0; + gboolean _tmp1_; + gint32 _tmp3_; gint32 input; - gboolean _tmp9_; - gboolean _tmp10_; + gboolean _tmp4_; self = (TransportMenuitem*) base; g_return_if_fail (name != NULL); g_return_if_fail (input_value != NULL); - _tmp0_ = input_value; - _tmp1_ = _g_variant_ref0 (_tmp0_); - v = _tmp1_; - _tmp2_ = input_value; - _tmp3_ = G_VARIANT_TYPE_VARIANT; - _tmp4_ = g_variant_is_of_type (_tmp2_, _tmp3_); - if (_tmp4_) { - GVariant* _tmp5_; - GVariant* _tmp6_ = NULL; - _tmp5_ = input_value; - _tmp6_ = g_variant_get_variant (_tmp5_); + _tmp0_ = _g_variant_ref0 (input_value); + v = _tmp0_; + _tmp1_ = g_variant_is_of_type (input_value, G_VARIANT_TYPE_VARIANT); + if (_tmp1_) { + GVariant* _tmp2_ = NULL; + _tmp2_ = g_variant_get_variant (input_value); _g_variant_unref0 (v); - v = _tmp6_; + v = _tmp2_; } - _tmp7_ = v; - _tmp8_ = g_variant_get_int32 (_tmp7_); - input = _tmp8_; - _tmp9_ = transport_menuitem_get_running (self); - _tmp10_ = _tmp9_; - if (_tmp10_ == TRUE) { - PlayerController* _tmp11_; - PlayerController* _tmp12_; - Mpris2Controller* _tmp13_; - gint32 _tmp14_; - _tmp11_ = player_item_get_owner ((PlayerItem*) self); - _tmp12_ = _tmp11_; - _tmp13_ = _tmp12_->mpris_bridge; - _tmp14_ = input; - mpris2_controller_transport_update (_tmp13_, (TransportAction) _tmp14_); + _tmp3_ = g_variant_get_int32 (v); + input = _tmp3_; + _tmp4_ = transport_menuitem_get_running (self); + if (_tmp4_ == TRUE) { + PlayerController* _tmp5_ = NULL; + _tmp5_ = player_item_get_owner ((PlayerItem*) self); + mpris2_controller_transport_update (_tmp5_->mpris_bridge, (TransportAction) input); } else { - gint32 _tmp15_; - PlayerController* _tmp16_; - PlayerController* _tmp17_; - _tmp15_ = input; - self->priv->cached_action = (TransportAction) _tmp15_; - _tmp16_ = player_item_get_owner ((PlayerItem*) self); - _tmp17_ = _tmp16_; - player_controller_instantiate (_tmp17_); + PlayerController* _tmp6_ = NULL; + self->priv->cached_action = (TransportAction) input; + _tmp6_ = player_item_get_owner ((PlayerItem*) self); + player_controller_instantiate (_tmp6_); dbusmenu_menuitem_property_set_int ((DbusmenuMenuitem*) self, DBUSMENU_TRANSPORT_MENUITEM_PLAY_STATE, (gint) TRANSPORT_STATE_LAUNCHING); } _g_variant_unref0 (v); @@ -286,7 +252,7 @@ static void transport_menuitem_real_handle_event (DbusmenuMenuitem* base, const GeeHashSet* transport_menuitem_attributes_format (void) { GeeHashSet* result = NULL; - GeeHashSet* _tmp0_; + GeeHashSet* _tmp0_ = NULL; GeeHashSet* attrs; _tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL); attrs = _tmp0_; @@ -298,14 +264,10 @@ GeeHashSet* transport_menuitem_attributes_format (void) { static gboolean transport_menuitem_get_running (TransportMenuitem* self) { gboolean result; - PlayerController* _tmp0_; - PlayerController* _tmp1_; - gint _tmp2_; + PlayerController* _tmp0_ = NULL; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = player_item_get_owner ((PlayerItem*) self); - _tmp1_ = _tmp0_; - _tmp2_ = _tmp1_->current_state; - result = _tmp2_ == ((gint) PLAYER_CONTROLLER_STATE_CONNECTED); + result = _tmp0_->current_state == PLAYER_CONTROLLER_STATE_CONNECTED; return result; } |