aboutsummaryrefslogtreecommitdiff
path: root/src/title-menu-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/title-menu-item.c')
-rw-r--r--src/title-menu-item.c46
1 files changed, 30 insertions, 16 deletions
diff --git a/src/title-menu-item.c b/src/title-menu-item.c
index 4dcd986..5e4ee1c 100644
--- a/src/title-menu-item.c
+++ b/src/title-menu-item.c
@@ -1,4 +1,4 @@
-/* title-menu-item.c generated by valac 0.10.0, the Vala compiler
+/* title-menu-item.c generated by valac 0.11.2, the Vala compiler
* generated from title-menu-item.vala, do not modify */
/*
@@ -127,9 +127,9 @@ enum {
GType player_controller_get_type (void) G_GNUC_CONST;
TitleMenuitem* title_menuitem_new (PlayerController* parent);
TitleMenuitem* title_menuitem_construct (GType object_type, PlayerController* parent);
-const char* player_controller_get_name (PlayerController* self);
-const char* player_controller_get_icon_name (PlayerController* self);
-static void title_menuitem_real_handle_event (DbusmenuMenuitem* base, const char* name, GValue* input_value, guint timestamp);
+const gchar* player_controller_get_name (PlayerController* self);
+const gchar* player_controller_get_icon_name (PlayerController* self);
+static void title_menuitem_real_handle_event (DbusmenuMenuitem* base, const gchar* name, GValue* input_value, guint timestamp);
PlayerController* player_item_get_owner (PlayerItem* self);
GType mpris2_controller_get_type (void) G_GNUC_CONST;
GType player_controller_state_get_type (void) G_GNUC_CONST;
@@ -139,14 +139,19 @@ void title_menuitem_toggle_active_triangle (TitleMenuitem* self, gboolean update
GeeHashSet* title_menuitem_attributes_format (void);
-
TitleMenuitem* title_menuitem_construct (GType object_type, PlayerController* parent) {
- TitleMenuitem * self;
+ TitleMenuitem * self = NULL;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
g_return_val_if_fail (parent != NULL, NULL);
self = (TitleMenuitem*) g_object_new (object_type, "item-type", DBUSMENU_TITLE_MENUITEM_TYPE, "owner", parent, NULL);
- dbusmenu_menuitem_property_set ((DbusmenuMenuitem*) self, DBUSMENU_TITLE_MENUITEM_NAME, player_controller_get_name (parent));
- g_debug ("title-menu-item.vala:30: title init - icon name = %s", player_controller_get_icon_name (parent));
- dbusmenu_menuitem_property_set ((DbusmenuMenuitem*) self, DBUSMENU_TITLE_MENUITEM_ICON, player_controller_get_icon_name (parent));
+ _tmp0_ = player_controller_get_name (parent);
+ dbusmenu_menuitem_property_set ((DbusmenuMenuitem*) self, DBUSMENU_TITLE_MENUITEM_NAME, _tmp0_);
+ _tmp1_ = player_controller_get_icon_name (parent);
+ g_debug ("title-menu-item.vala:30: title init - icon name = %s", _tmp1_);
+ _tmp2_ = player_controller_get_icon_name (parent);
+ dbusmenu_menuitem_property_set ((DbusmenuMenuitem*) self, DBUSMENU_TITLE_MENUITEM_ICON, _tmp2_);
dbusmenu_menuitem_property_set_bool ((DbusmenuMenuitem*) self, DBUSMENU_TITLE_MENUITEM_RUNNING, FALSE);
return self;
}
@@ -157,15 +162,23 @@ TitleMenuitem* title_menuitem_new (PlayerController* parent) {
}
-static void title_menuitem_real_handle_event (DbusmenuMenuitem* base, const char* name, GValue* input_value, guint timestamp) {
+static void title_menuitem_real_handle_event (DbusmenuMenuitem* base, const gchar* name, GValue* input_value, guint timestamp) {
TitleMenuitem * self;
+ PlayerController* _tmp0_ = NULL;
self = (TitleMenuitem*) base;
g_return_if_fail (name != NULL);
- if (player_item_get_owner ((PlayerItem*) self)->current_state == PLAYER_CONTROLLER_STATE_OFFLINE) {
- player_controller_instantiate (player_item_get_owner ((PlayerItem*) self));
+ _tmp0_ = player_item_get_owner ((PlayerItem*) self);
+ if (_tmp0_->current_state == PLAYER_CONTROLLER_STATE_OFFLINE) {
+ PlayerController* _tmp1_ = NULL;
+ _tmp1_ = player_item_get_owner ((PlayerItem*) self);
+ player_controller_instantiate (_tmp1_);
} else {
- if (player_item_get_owner ((PlayerItem*) self)->current_state == PLAYER_CONTROLLER_STATE_CONNECTED) {
- mpris2_controller_expose (player_item_get_owner ((PlayerItem*) self)->mpris_bridge);
+ PlayerController* _tmp2_ = NULL;
+ _tmp2_ = player_item_get_owner ((PlayerItem*) self);
+ if (_tmp2_->current_state == PLAYER_CONTROLLER_STATE_CONNECTED) {
+ PlayerController* _tmp3_ = NULL;
+ _tmp3_ = player_item_get_owner ((PlayerItem*) self);
+ mpris2_controller_expose (_tmp3_->mpris_bridge);
}
}
}
@@ -179,8 +192,10 @@ void title_menuitem_toggle_active_triangle (TitleMenuitem* self, gboolean update
GeeHashSet* title_menuitem_attributes_format (void) {
GeeHashSet* result = NULL;
+ GeeHashSet* _tmp0_ = NULL;
GeeHashSet* attrs;
- attrs = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
+ _tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
+ attrs = _tmp0_;
gee_abstract_collection_add ((GeeAbstractCollection*) attrs, DBUSMENU_TITLE_MENUITEM_NAME);
gee_abstract_collection_add ((GeeAbstractCollection*) attrs, DBUSMENU_TITLE_MENUITEM_RUNNING);
gee_abstract_collection_add ((GeeAbstractCollection*) attrs, DBUSMENU_TITLE_MENUITEM_ICON);
@@ -212,4 +227,3 @@ GType title_menuitem_get_type (void) {
-