aboutsummaryrefslogtreecommitdiff
path: root/src/player-item.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-01-27 15:57:39 -0500
committerKen VanDine <ken.vandine@canonical.com>2011-01-27 15:57:39 -0500
commit759793a2dda77abd227921e119bb329271c36a55 (patch)
tree248c4ba64e9464f58a64c22c69f24a294ff16a84 /src/player-item.c
parent500000a82b6785e2bf7732ee87f36c6a44d2767c (diff)
parent6b2132fb4e700fe84a26adeac5126e8afbc507b3 (diff)
downloadayatana-indicator-sound-759793a2dda77abd227921e119bb329271c36a55.tar.gz
ayatana-indicator-sound-759793a2dda77abd227921e119bb329271c36a55.tar.bz2
ayatana-indicator-sound-759793a2dda77abd227921e119bb329271c36a55.zip
Import upstream version 0.5.7
Diffstat (limited to 'src/player-item.c')
-rw-r--r--src/player-item.c122
1 files changed, 60 insertions, 62 deletions
diff --git a/src/player-item.c b/src/player-item.c
index 8dcb226..fad8f9f 100644
--- a/src/player-item.c
+++ b/src/player-item.c
@@ -1,4 +1,4 @@
-/* player-item.c generated by valac 0.11.3, the Vala compiler
+/* player-item.c generated by valac 0.11.5, the Vala compiler
* generated from player-item.vala, do not modify */
/*
@@ -177,10 +177,10 @@ static gchar* string_strip (const gchar* self) {
static gboolean string_contains (const gchar* self, const gchar* needle) {
gboolean result = FALSE;
- const gchar* _tmp0_ = NULL;
+ gchar* _tmp0_ = NULL;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (needle != NULL, FALSE);
- _tmp0_ = strstr (self, needle);
+ _tmp0_ = strstr ((gchar*) self, (gchar*) needle);
result = _tmp0_ != NULL;
return result;
}
@@ -208,7 +208,7 @@ static gchar* bool_to_string (gboolean self) {
void player_item_update (PlayerItem* self, GHashTable* data, GeeHashSet* attributes) {
- gboolean _tmp26_;
+ gboolean _tmp25_;
g_return_if_fail (self != NULL);
g_return_if_fail (data != NULL);
g_return_if_fail (attributes != NULL);
@@ -229,16 +229,15 @@ void player_item_update (PlayerItem* self, GHashTable* data, GeeHashSet* attribu
gchar* property;
gchar** _tmp3_;
gchar** _tmp4_ = NULL;
+ gchar** input_keys;
gint input_keys_length1;
gint _input_keys_size_;
- gchar** _tmp5_;
- gchar** input_keys;
- gchar* _tmp6_;
+ gchar* _tmp5_;
gchar* search_key;
- gconstpointer _tmp7_ = NULL;
- GVariant* _tmp8_;
+ gconstpointer _tmp6_ = NULL;
+ GVariant* _tmp7_;
GVariant* v;
- gboolean _tmp9_;
+ gboolean _tmp8_;
_tmp1_ = gee_iterator_next (_property_it);
if (!_tmp1_) {
break;
@@ -246,33 +245,32 @@ void player_item_update (PlayerItem* self, GHashTable* data, GeeHashSet* attribu
_tmp2_ = gee_iterator_get (_property_it);
property = (gchar*) _tmp2_;
_tmp4_ = _tmp3_ = g_strsplit (property, "-", 0);
- _tmp5_ = _tmp4_;
+ input_keys = _tmp4_;
input_keys_length1 = _vala_array_length (_tmp3_);
- _input_keys_size_ = input_keys_length1;
- input_keys = _tmp5_;
- _tmp6_ = g_strdup ((input_keys + (input_keys_length1 - 1))[0]);
- search_key = _tmp6_;
+ _input_keys_size_ = _vala_array_length (_tmp3_);
+ _tmp5_ = g_strdup ((input_keys + (input_keys_length1 - 1))[0]);
+ search_key = _tmp5_;
g_debug ("player-item.vala:62: search key = %s", search_key);
- _tmp7_ = g_hash_table_lookup (data, search_key);
- _tmp8_ = _g_variant_ref0 ((GVariant*) _tmp7_);
- v = _tmp8_;
- _tmp9_ = g_variant_is_of_type (v, G_VARIANT_TYPE_STRING);
- if (_tmp9_) {
- const gchar* _tmp10_ = NULL;
- gchar* _tmp11_ = NULL;
+ _tmp6_ = g_hash_table_lookup (data, search_key);
+ _tmp7_ = _g_variant_ref0 ((GVariant*) _tmp6_);
+ v = _tmp7_;
+ _tmp8_ = g_variant_is_of_type (v, G_VARIANT_TYPE_STRING);
+ if (_tmp8_) {
+ const gchar* _tmp9_ = NULL;
+ gchar* _tmp10_ = NULL;
gchar* update;
- gboolean _tmp12_;
- _tmp10_ = g_variant_get_string (v, NULL);
- _tmp11_ = string_strip (_tmp10_);
- update = _tmp11_;
+ gboolean _tmp11_;
+ _tmp9_ = g_variant_get_string (v, NULL);
+ _tmp10_ = string_strip (_tmp9_);
+ update = _tmp10_;
g_debug ("player-item.vala:67: with value : %s", update);
- _tmp12_ = string_contains (property, "mpris:artUrl");
- if (_tmp12_) {
- PlayerItem* _tmp13_;
- MetadataMenuitem* _tmp14_;
+ _tmp11_ = string_contains (property, "mpris:artUrl");
+ if (_tmp11_) {
+ PlayerItem* _tmp12_;
+ MetadataMenuitem* _tmp13_;
MetadataMenuitem* metadata;
- _tmp14_ = _g_object_ref0 ((_tmp13_ = self, IS_METADATA_MENUITEM (_tmp13_) ? ((MetadataMenuitem*) _tmp13_) : NULL));
- metadata = _tmp14_;
+ _tmp13_ = _g_object_ref0 ((_tmp12_ = self, IS_METADATA_MENUITEM (_tmp12_) ? ((MetadataMenuitem*) _tmp12_) : NULL));
+ metadata = _tmp13_;
metadata_menuitem_fetch_art (metadata, update, property);
_g_object_unref0 (metadata);
_g_free0 (update);
@@ -285,40 +283,40 @@ void player_item_update (PlayerItem* self, GHashTable* data, GeeHashSet* attribu
dbusmenu_menuitem_property_set ((DbusmenuMenuitem*) self, property, update);
_g_free0 (update);
} else {
- gboolean _tmp15_;
- _tmp15_ = g_variant_is_of_type (v, G_VARIANT_TYPE_INT32);
- if (_tmp15_) {
+ gboolean _tmp14_;
+ _tmp14_ = g_variant_is_of_type (v, G_VARIANT_TYPE_INT32);
+ if (_tmp14_) {
+ gint32 _tmp15_;
gint32 _tmp16_;
- gint32 _tmp17_;
+ _tmp15_ = g_variant_get_int32 (v);
+ g_debug ("player-item.vala:78: with value : %i", (gint) _tmp15_);
_tmp16_ = g_variant_get_int32 (v);
- g_debug ("player-item.vala:78: with value : %i", (gint) _tmp16_);
- _tmp17_ = g_variant_get_int32 (v);
- dbusmenu_menuitem_property_set_int ((DbusmenuMenuitem*) self, property, (gint) _tmp17_);
+ dbusmenu_menuitem_property_set_int ((DbusmenuMenuitem*) self, property, (gint) _tmp16_);
} else {
- gboolean _tmp18_;
- _tmp18_ = g_variant_is_of_type (v, G_VARIANT_TYPE_INT64);
- if (_tmp18_) {
+ gboolean _tmp17_;
+ _tmp17_ = g_variant_is_of_type (v, G_VARIANT_TYPE_INT64);
+ if (_tmp17_) {
+ gint64 _tmp18_;
gint64 _tmp19_;
- gint64 _tmp20_;
+ _tmp18_ = g_variant_get_int64 (v);
+ g_debug ("player-item.vala:82: with value : %i", (gint) _tmp18_);
_tmp19_ = g_variant_get_int64 (v);
- g_debug ("player-item.vala:82: with value : %i", (gint) _tmp19_);
- _tmp20_ = g_variant_get_int64 (v);
- dbusmenu_menuitem_property_set_int ((DbusmenuMenuitem*) self, property, (gint) _tmp20_);
+ dbusmenu_menuitem_property_set_int ((DbusmenuMenuitem*) self, property, (gint) _tmp19_);
} else {
- gboolean _tmp21_;
- _tmp21_ = g_variant_is_of_type (v, G_VARIANT_TYPE_BOOLEAN);
- if (_tmp21_) {
- gboolean _tmp22_;
- gchar* _tmp23_ = NULL;
- gchar* _tmp24_;
- gboolean _tmp25_;
- _tmp22_ = g_variant_get_boolean (v);
- _tmp23_ = bool_to_string (_tmp22_);
- _tmp24_ = _tmp23_;
- g_debug ("player-item.vala:86: with value : %s", _tmp24_);
- _g_free0 (_tmp24_);
- _tmp25_ = g_variant_get_boolean (v);
- dbusmenu_menuitem_property_set_bool ((DbusmenuMenuitem*) self, property, _tmp25_);
+ gboolean _tmp20_;
+ _tmp20_ = g_variant_is_of_type (v, G_VARIANT_TYPE_BOOLEAN);
+ if (_tmp20_) {
+ gboolean _tmp21_;
+ gchar* _tmp22_ = NULL;
+ gchar* _tmp23_;
+ gboolean _tmp24_;
+ _tmp21_ = g_variant_get_boolean (v);
+ _tmp22_ = bool_to_string (_tmp21_);
+ _tmp23_ = _tmp22_;
+ g_debug ("player-item.vala:86: with value : %s", _tmp23_);
+ _g_free0 (_tmp23_);
+ _tmp24_ = g_variant_get_boolean (v);
+ dbusmenu_menuitem_property_set_bool ((DbusmenuMenuitem*) self, property, _tmp24_);
}
}
}
@@ -330,8 +328,8 @@ void player_item_update (PlayerItem* self, GHashTable* data, GeeHashSet* attribu
}
_g_object_unref0 (_property_it);
}
- _tmp26_ = player_item_populated (self, attributes);
- dbusmenu_menuitem_property_set_bool ((DbusmenuMenuitem*) self, DBUSMENU_MENUITEM_PROP_VISIBLE, _tmp26_);
+ _tmp25_ = player_item_populated (self, attributes);
+ dbusmenu_menuitem_property_set_bool ((DbusmenuMenuitem*) self, DBUSMENU_MENUITEM_PROP_VISIBLE, _tmp25_);
}