[Goodies-commits] r7728 - in xfmpc/trunk: . src
Vincent Legout
vincent at xfce.org
Thu Jul 16 10:49:35 CEST 2009
Author: vincent
Date: 2009-07-16 08:49:35 +0000 (Thu, 16 Jul 2009)
New Revision: 7728
Modified:
xfmpc/trunk/ChangeLog
xfmpc/trunk/src/interface.c
xfmpc/trunk/src/interface.vala
Log:
Update the title of the interface when the playlist has changed
Modified: xfmpc/trunk/ChangeLog
===================================================================
--- xfmpc/trunk/ChangeLog 2009-07-16 08:39:05 UTC (rev 7727)
+++ xfmpc/trunk/ChangeLog 2009-07-16 08:49:35 UTC (rev 7728)
@@ -1,5 +1,9 @@
2009-07-16 Vincent Legout <vincent at legout.info>
+Update the title of the interface when the playlist has changed
+
+2009-07-16 Vincent Legout <vincent at legout.info>
+
Fix compilation with vala 0.7.4
2009-07-09 Mike Massonnet <mmassonnet at xfce.org>
Modified: xfmpc/trunk/src/interface.c
===================================================================
--- xfmpc/trunk/src/interface.c 2009-07-16 08:39:05 UTC (rev 7727)
+++ xfmpc/trunk/src/interface.c 2009-07-16 08:49:35 UTC (rev 7728)
@@ -97,6 +97,7 @@
static void xfmpc_interface_cb_pp_changed (XfmpcInterface* self, gboolean is_playing);
static void xfmpc_interface_cb_time_changed (XfmpcInterface* self, gint time, gint total_time);
static void xfmpc_interface_cb_volume_changed (XfmpcInterface* self, gint volume);
+static void xfmpc_interface_cb_playlist_changed (XfmpcInterface* self);
static void xfmpc_interface_cb_stopped (XfmpcInterface* self);
static void xfmpc_interface_cb_mpdclient_previous (XfmpcInterface* self);
static void xfmpc_interface_cb_mpdclient_next (XfmpcInterface* self);
@@ -113,6 +114,7 @@
static void _xfmpc_interface_cb_pp_changed_xfmpc_mpdclient_pp_changed (XfmpcMpdclient* _sender, gboolean is_playing, gpointer self);
static void _xfmpc_interface_cb_time_changed_xfmpc_mpdclient_time_changed (XfmpcMpdclient* _sender, gint time, gint total_time, gpointer self);
static void _xfmpc_interface_cb_volume_changed_xfmpc_mpdclient_volume_changed (XfmpcMpdclient* _sender, gint volume, gpointer self);
+static void _xfmpc_interface_cb_playlist_changed_xfmpc_mpdclient_playlist_changed (XfmpcMpdclient* _sender, gpointer self);
static void _xfmpc_interface_cb_stopped_xfmpc_mpdclient_stopped (XfmpcMpdclient* _sender, gpointer self);
static GObject * xfmpc_interface_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void xfmpc_interface_finalize (GObject* obj);
@@ -289,6 +291,12 @@
}
+static void xfmpc_interface_cb_playlist_changed (XfmpcInterface* self) {
+ g_return_if_fail (self != NULL);
+ xfmpc_interface_update_title (self);
+}
+
+
static void xfmpc_interface_cb_stopped (XfmpcInterface* self) {
g_return_if_fail (self != NULL);
xfmpc_interface_clean (self);
@@ -364,6 +372,11 @@
}
+static void _xfmpc_interface_cb_playlist_changed_xfmpc_mpdclient_playlist_changed (XfmpcMpdclient* _sender, gpointer self) {
+ xfmpc_interface_cb_playlist_changed (self);
+}
+
+
static void _xfmpc_interface_cb_stopped_xfmpc_mpdclient_stopped (XfmpcMpdclient* _sender, gpointer self) {
xfmpc_interface_cb_stopped (self);
}
@@ -482,6 +495,7 @@
g_signal_connect_object (self->priv->mpdclient, "pp-changed", (GCallback) _xfmpc_interface_cb_pp_changed_xfmpc_mpdclient_pp_changed, self, 0);
g_signal_connect_object (self->priv->mpdclient, "time-changed", (GCallback) _xfmpc_interface_cb_time_changed_xfmpc_mpdclient_time_changed, self, 0);
g_signal_connect_object (self->priv->mpdclient, "volume-changed", (GCallback) _xfmpc_interface_cb_volume_changed_xfmpc_mpdclient_volume_changed, self, 0);
+ g_signal_connect_object (self->priv->mpdclient, "playlist-changed", (GCallback) _xfmpc_interface_cb_playlist_changed_xfmpc_mpdclient_playlist_changed, self, 0);
g_signal_connect_object (self->priv->mpdclient, "stopped", (GCallback) _xfmpc_interface_cb_stopped_xfmpc_mpdclient_stopped, self, 0);
(image == NULL) ? NULL : (image = (g_object_unref (image), NULL));
(adjustment == NULL) ? NULL : (adjustment = (g_object_unref (adjustment), NULL));
Modified: xfmpc/trunk/src/interface.vala
===================================================================
--- xfmpc/trunk/src/interface.vala 2009-07-16 08:39:05 UTC (rev 7727)
+++ xfmpc/trunk/src/interface.vala 2009-07-16 08:49:35 UTC (rev 7728)
@@ -124,6 +124,7 @@
this.mpdclient.pp_changed.connect (cb_pp_changed);
this.mpdclient.time_changed.connect (cb_time_changed);
this.mpdclient.volume_changed.connect (cb_volume_changed);
+ this.mpdclient.playlist_changed.connect (cb_playlist_changed);
this.mpdclient.stopped.connect (cb_stopped);
}
@@ -240,6 +241,10 @@
set_volume (volume);
}
+ private void cb_playlist_changed () {
+ update_title ();
+ }
+
private void cb_stopped () {
clean ();
}
More information about the Goodies-commits
mailing list