From: Julien M. <do...@us...> - 2003-09-14 00:15:19
|
CVS Root: /cvsroot/gstreamer Module: gst-player Changes by: dolphy Date: Sat Sep 13 2003 17:15:17 PDT Log message: Toggling visualisation updates gconf in real time. Modified files: . : ChangeLog libs/gst/player : gstmediaplay.c gstmediaplay.h Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-player/ChangeLog.diff?r1=1.37&r2=1.38 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-player/libs/gst/player/gstmediaplay.c.diff?r1=1.132&r2=1.133 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-player/libs/gst/player/gstmediaplay.h.diff?r1=1.45&r2=1.46 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvsroot/gstreamer/gst-player/ChangeLog,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- ChangeLog 13 Sep 2003 08:59:22 -0000 1.37 +++ ChangeLog 14 Sep 2003 00:15:03 -0000 1.38 @@ -1,3 +1,12 @@ +2003-09-14 Julien MOUTTE <ju...@mo...> + + * libs/gst/player/gstmediaplay.c: + (gst_media_play_toggle_visualisation), + (gst_media_play_ignore_playlist_changes), + (gst_media_gconf_set_boolean): Visualisation toggling updates gconf + key in real time.. + * libs/gst/player/gstmediaplay.h: + 2003-09-13 Julien MOUTTE <ju...@mo...> * libs/gst/player/gstmediaplay.c: (gst_media_play_show_about): Index: gstmediaplay.c =================================================================== RCS file: /cvsroot/gstreamer/gst-player/libs/gst/player/gstmediaplay.c,v retrieving revision 1.132 retrieving revision 1.133 diff -u -d -r1.132 -r1.133 --- gstmediaplay.c 13 Sep 2003 08:59:22 -0000 1.132 +++ gstmediaplay.c 14 Sep 2003 00:15:04 -0000 1.133 @@ -1248,6 +1248,9 @@ mplay->_priv->with_visualisation = FALSE; else mplay->_priv->with_visualisation = TRUE; + + gst_media_gconf_set_boolean ("visualisation", + mplay->_priv->with_visualisation); if (!mplay->_priv->with_visualisation) { @@ -1678,6 +1681,29 @@ "changed", G_CALLBACK (gst_media_play_playlist_changed), (gpointer) mplay); +} + +gboolean +gst_media_gconf_set_boolean (const gchar *key, gboolean value) +{ + gchar *full_key; + GError *error = NULL; + + static GConfClient *_gst_media_gconf_client = NULL; + + if (!_gst_media_gconf_client) + _gst_media_gconf_client = gconf_client_get_default (); + + full_key = g_strdup_printf ("%s/%s", GCONF_PREFIX, key); + gconf_client_set_bool (_gst_media_gconf_client, full_key, value, &error); + g_free (full_key); + if (error) + { + g_warning ("GConf: %s\n", error->message); + g_error_free (error); + return FALSE; + } + return TRUE; } gboolean Index: gstmediaplay.h =================================================================== RCS file: /cvsroot/gstreamer/gst-player/libs/gst/player/gstmediaplay.h,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- gstmediaplay.h 11 Jul 2003 21:29:40 -0000 1.45 +++ gstmediaplay.h 14 Sep 2003 00:15:04 -0000 1.46 @@ -124,7 +124,8 @@ void gst_media_play_ignore_playlist_changes (GstMediaPlay * mplay, gboolean ignore); -gboolean gst_media_gconf_get_boolean (const gchar * key, gboolean * value); +gboolean gst_media_gconf_set_boolean (const gchar *key, gboolean value); +gboolean gst_media_gconf_get_boolean (const gchar *key, gboolean *value); void gst_media_play_show_media_info (GtkWidget * widget, GstMediaPlay * mplay); #endif /* __GST_MEDIA_PLAY_H__ */ |