[rhythmbox] media-player: update action status when the source is selected
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] media-player: update action status when the source is selected
- Date: Tue, 15 Mar 2016 07:12:42 +0000 (UTC)
commit f7ccb806cf9aa7d3c9ab15f089f338d8a3dec93b
Author: Jonathan Matthew <jonathan d14n org>
Date: Tue Mar 15 17:12:23 2016 +1000
media-player: update action status when the source is selected
sources/rb-media-player-source.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/sources/rb-media-player-source.c b/sources/rb-media-player-source.c
index c34ce49..f086d10 100644
--- a/sources/rb-media-player-source.c
+++ b/sources/rb-media-player-source.c
@@ -403,6 +403,12 @@ load_status_changed_cb (GObject *object, GParamSpec *pspec, gpointer whatever)
}
static void
+selected_changed_cb (GObject *object, GParamSpec *pspec, gpointer whatever)
+{
+ update_actions (RB_MEDIA_PLAYER_SOURCE (object));
+}
+
+static void
rb_media_player_source_constructed (GObject *object)
{
RBMediaPlayerSourcePrivate *priv = MEDIA_PLAYER_SOURCE_GET_PRIVATE (object);
@@ -423,6 +429,7 @@ rb_media_player_source_constructed (GObject *object)
priv->sync_action = g_action_map_lookup_action (G_ACTION_MAP (app), "media-player-sync");
priv->properties_action = g_action_map_lookup_action (G_ACTION_MAP (app), "media-player-properties");
g_signal_connect (object, "notify::load-status", G_CALLBACK (load_status_changed_cb), NULL);
+ g_signal_connect (object, "notify::selected", G_CALLBACK (selected_changed_cb), NULL);
update_actions (RB_MEDIA_PLAYER_SOURCE (object));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]