diff options
Diffstat (limited to 'src/music-player-bridge.c')
-rw-r--r-- | src/music-player-bridge.c | 107 |
1 files changed, 53 insertions, 54 deletions
diff --git a/src/music-player-bridge.c b/src/music-player-bridge.c index dc04230..7c652a1 100644 --- a/src/music-player-bridge.c +++ b/src/music-player-bridge.c @@ -1,4 +1,4 @@ -/* music-player-bridge.c generated by valac 0.11.6, the Vala compiler +/* music-player-bridge.c generated by valac 0.11.7, the Vala compiler * generated from music-player-bridge.vala, do not modify */ /* @@ -173,9 +173,9 @@ void music_player_bridge_client_has_become_available (MusicPlayerBridge* self, c gchar** settings_manager_fetch_blacklist (SettingsManager* self, int* result_length1); static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle); void settings_manager_add_interested (SettingsManager* self, const gchar* app_desktop_name); +static gboolean* _bool_dup (gboolean* self); GType player_item_get_type (void) G_GNUC_CONST; GType mpris2_controller_get_type (void) G_GNUC_CONST; -static gboolean* _bool_dup (gboolean* self); void player_controller_update_state (PlayerController* self, PlayerControllerstate new_state); void player_controller_activate (PlayerController* self, const gchar* dbus_name); void music_player_bridge_client_has_vanished (MusicPlayerBridge* self, const gchar* mpris_root_interface); @@ -290,7 +290,9 @@ static void music_player_bridge_try_to_add_inactive_familiar_clients (MusicPlaye _tmp3_ = g_strconcat (desktop, ".desktop", NULL); _tmp4_ = _tmp3_; _tmp5_ = music_player_bridge_create_app_info (_tmp4_); - app_info = (_tmp6_ = _tmp5_, _g_free0 (_tmp4_), _tmp6_); + _tmp6_ = _tmp5_; + _g_free0 (_tmp4_); + app_info = _tmp6_; if (app_info == NULL) { g_warning ("music-player-bridge.vala:65: Could not create app_info for path %s \n" \ " Getting out of here ", desktop); @@ -305,7 +307,9 @@ static void music_player_bridge_try_to_add_inactive_familiar_clients (MusicPlaye _tmp10_ = _tmp9_; _tmp11_ = music_player_bridge_calculate_menu_position (self); _tmp12_ = player_controller_new (self->priv->root_menu, app_info, NULL, _tmp10_, _tmp11_, NULL, PLAYER_CONTROLLER_STATE_OFFLINE); - ctrl = (_tmp13_ = _tmp12_, _g_free0 (_tmp10_), _tmp13_); + _tmp13_ = _tmp12_; + _g_free0 (_tmp10_); + ctrl = _tmp13_; gee_abstract_map_set ((GeeAbstractMap*) self->priv->registered_clients, mpris_key, ctrl); _g_object_unref0 (ctrl); _g_free0 (mpris_key); @@ -390,7 +394,9 @@ void music_player_bridge_client_has_become_available (MusicPlayerBridge* self, c _tmp2_ = settings_manager_fetch_blacklist (self->priv->settings_manager, &_tmp1_); _tmp3_ = _tmp2_; _tmp3__length1 = _tmp1_; - if ((_tmp4_ = _vala_string_array_contains (_tmp3_, _tmp1_, desktop), _tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL), _tmp4_)) { + _tmp4_ = _vala_string_array_contains (_tmp3_, _tmp1_, desktop); + _tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL); + if (_tmp4_) { g_debug ("music-player-bridge.vala:101: Client %s attempting to register but I'm" \ " afraid it is blacklisted", desktop); return; @@ -399,7 +405,9 @@ void music_player_bridge_client_has_become_available (MusicPlayerBridge* self, c _tmp5_ = g_strconcat (desktop, ".desktop", NULL); _tmp6_ = _tmp5_; _tmp7_ = music_player_bridge_create_app_info (_tmp6_); - app_info = (_tmp8_ = _tmp7_, _g_free0 (_tmp6_), _tmp8_); + _tmp8_ = _tmp7_; + _g_free0 (_tmp6_); + app_info = _tmp8_; if (app_info == NULL) { g_warning ("music-player-bridge.vala:109: Could not create app_info for path %s \n" \ " Getting out of here ", desktop); @@ -423,7 +431,9 @@ void music_player_bridge_client_has_become_available (MusicPlayerBridge* self, c _tmp13_ = _tmp12_; _tmp14_ = music_player_bridge_calculate_menu_position (self); _tmp15_ = player_controller_new (self->priv->root_menu, app_info, dbus_name, _tmp13_, _tmp14_, &use_playlists, PLAYER_CONTROLLER_STATE_READY); - ctrl = (_tmp16_ = _tmp15_, _g_free0 (_tmp13_), _tmp16_); + _tmp16_ = _tmp15_; + _g_free0 (_tmp13_); + ctrl = _tmp16_; gee_abstract_map_set ((GeeAbstractMap*) self->priv->registered_clients, mpris_key, ctrl); g_debug ("music-player-bridge.vala:126: Have not seen this %s before, new contro" \ "ller created.", desktop); @@ -434,26 +444,24 @@ void music_player_bridge_client_has_become_available (MusicPlayerBridge* self, c gpointer _tmp17_ = NULL; PlayerController* _tmp18_; gboolean* _tmp19_; - gboolean* _tmp20_; - gpointer _tmp21_ = NULL; - PlayerController* _tmp22_; - gpointer _tmp23_ = NULL; - PlayerController* _tmp24_; + gpointer _tmp20_ = NULL; + PlayerController* _tmp21_; + gpointer _tmp22_ = NULL; + PlayerController* _tmp23_; _tmp17_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->registered_clients, mpris_key); _tmp18_ = (PlayerController*) _tmp17_; _tmp19_ = __bool_dup0 (&use_playlists); - _tmp20_ = _tmp19_; _g_free0 (_tmp18_->use_playlists); - _tmp18_->use_playlists = _tmp20_; + _tmp18_->use_playlists = _tmp19_; _g_object_unref0 (_tmp18_); - _tmp21_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->registered_clients, mpris_key); - _tmp22_ = (PlayerController*) _tmp21_; - player_controller_update_state (_tmp22_, PLAYER_CONTROLLER_STATE_READY); - _g_object_unref0 (_tmp22_); - _tmp23_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->registered_clients, mpris_key); - _tmp24_ = (PlayerController*) _tmp23_; - player_controller_activate (_tmp24_, dbus_name); - _g_object_unref0 (_tmp24_); + _tmp20_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->registered_clients, mpris_key); + _tmp21_ = (PlayerController*) _tmp20_; + player_controller_update_state (_tmp21_, PLAYER_CONTROLLER_STATE_READY); + _g_object_unref0 (_tmp21_); + _tmp22_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->registered_clients, mpris_key); + _tmp23_ = (PlayerController*) _tmp22_; + player_controller_activate (_tmp23_, dbus_name); + _g_object_unref0 (_tmp23_); g_debug ("music-player-bridge.vala:134: Application has already registered - awa" \ "ken the hibernation: %s \n", dbus_name); } @@ -514,20 +522,16 @@ static void _music_player_bridge_client_has_vanished_mpris2_watcher_client_disap void music_player_bridge_set_root_menu_item (MusicPlayerBridge* self, DbusmenuMenuitem* menu) { DbusmenuMenuitem* _tmp0_; - DbusmenuMenuitem* _tmp1_; - Mpris2Watcher* _tmp2_ = NULL; - Mpris2Watcher* _tmp3_; + Mpris2Watcher* _tmp1_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (menu != NULL); _tmp0_ = _g_object_ref0 (menu); - _tmp1_ = _tmp0_; _g_object_unref0 (self->priv->root_menu); - self->priv->root_menu = _tmp1_; + self->priv->root_menu = _tmp0_; music_player_bridge_try_to_add_inactive_familiar_clients (self); - _tmp2_ = mpris2_watcher_new (); - _tmp3_ = _tmp2_; + _tmp1_ = mpris2_watcher_new (); _g_object_unref0 (self->priv->watcher); - self->priv->watcher = _tmp3_; + self->priv->watcher = _tmp1_; g_signal_connect_object (self->priv->watcher, "client-appeared", (GCallback) _music_player_bridge_client_has_become_available_mpris2_watcher_client_appeared, self, 0); g_signal_connect_object (self->priv->watcher, "client-disappeared", (GCallback) _music_player_bridge_client_has_vanished_mpris2_watcher_client_disappeared, self, 0); } @@ -556,7 +560,8 @@ static GAppInfo* music_player_bridge_create_app_info (const gchar* desktop) { _g_object_unref0 (info); return result; } - _tmp3_ = _g_object_ref0 ((_tmp2_ = info, G_IS_APP_INFO (_tmp2_) ? ((GAppInfo*) _tmp2_) : NULL)); + _tmp2_ = info; + _tmp3_ = _g_object_ref0 (G_IS_APP_INFO (_tmp2_) ? ((GAppInfo*) _tmp2_) : NULL); app_info = _tmp3_; result = app_info; _g_object_unref0 (info); @@ -581,7 +586,9 @@ static gchar* music_player_bridge_fetch_icon_name (const gchar* desktop) { _tmp0_ = g_strconcat (desktop, ".desktop", NULL); _tmp1_ = _tmp0_; _tmp2_ = g_desktop_app_info_new (_tmp1_); - info = (_tmp3_ = _tmp2_, _g_free0 (_tmp1_), _tmp3_); + _tmp3_ = _tmp2_; + _g_free0 (_tmp1_); + info = _tmp3_; _tmp4_ = g_key_file_new (); desktop_keyfile = _tmp4_; _tmp5_ = g_desktop_app_info_get_filename (info); @@ -681,8 +688,8 @@ static gchar* music_player_bridge_determine_key (gchar* desktop_or_interface) { gchar** tokens; gint tokens_length1; gint _tokens_size_; - gchar** _tmp5_; - gchar** _tmp6_ = NULL; + gchar** _tmp4_; + gchar** _tmp5_ = NULL; gchar** temp; gint temp_length1; gint _temp_size_; @@ -695,23 +702,19 @@ static gchar* music_player_bridge_determine_key (gchar* desktop_or_interface) { _tokens_size_ = _vala_array_length (_tmp1_); if (tokens_length1 > 1) { gchar* _tmp3_; - gchar* _tmp4_; _tmp3_ = g_strdup (tokens[tokens_length1 - 1]); - _tmp4_ = _tmp3_; _g_free0 (_result_); - _result_ = _tmp4_; + _result_ = _tmp3_; } - _tmp6_ = _tmp5_ = g_strsplit (_result_, "-", 0); - temp = _tmp6_; - temp_length1 = _vala_array_length (_tmp5_); - _temp_size_ = _vala_array_length (_tmp5_); + _tmp5_ = _tmp4_ = g_strsplit (_result_, "-", 0); + temp = _tmp5_; + temp_length1 = _vala_array_length (_tmp4_); + _temp_size_ = _vala_array_length (_tmp4_); if (temp_length1 > 1) { - gchar* _tmp7_; - gchar* _tmp8_; - _tmp7_ = g_strdup (temp[0]); - _tmp8_ = _tmp7_; + gchar* _tmp6_; + _tmp6_ = g_strdup (temp[0]); _g_free0 (_result_); - _result_ = _tmp8_; + _result_ = _tmp6_; } g_debug ("music-player-bridge.vala:218: determine key result = %s", _result_); result = _result_; @@ -731,20 +734,16 @@ static GObject * music_player_bridge_constructor (GType type, guint n_construct_ GObjectClass * parent_class; MusicPlayerBridge * self; GeeHashMap* _tmp0_ = NULL; - GeeHashMap* _tmp1_; - SettingsManager* _tmp2_ = NULL; - SettingsManager* _tmp3_; + SettingsManager* _tmp1_ = NULL; parent_class = G_OBJECT_CLASS (music_player_bridge_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = MUSIC_PLAYER_BRIDGE (obj); _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, TYPE_PLAYER_CONTROLLER, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); - _tmp1_ = _tmp0_; _g_object_unref0 (self->priv->registered_clients); - self->priv->registered_clients = _tmp1_; - _tmp2_ = settings_manager_new (); - _tmp3_ = _tmp2_; + self->priv->registered_clients = _tmp0_; + _tmp1_ = settings_manager_new (); _g_object_unref0 (self->priv->settings_manager); - self->priv->settings_manager = _tmp3_; + self->priv->settings_manager = _tmp1_; g_signal_connect_object (self->priv->settings_manager, "blacklist-updates", (GCallback) _music_player_bridge_on_blacklist_update_settings_manager_blacklist_updates, self, 0); return obj; } |