gnome-media r3869 - in trunk: . gst-mixer/src



Author: malureau
Date: Sun Jun  1 18:38:40 2008
New Revision: 3869
URL: http://svn.gnome.org/viewvc/gnome-media?rev=3869&view=rev

Log:
2008-06-01  Marc-Andrï Lureau  <marcandre lureau gmail com>

* gst-mixer/src/window.c (cb_change),
gst-mixer/src/preferences.c (set_gconf_track_active):

Remove GConf values and use higher level functions instead.


Modified:
   trunk/ChangeLog
   trunk/gst-mixer/src/preferences.c
   trunk/gst-mixer/src/window.c

Modified: trunk/gst-mixer/src/preferences.c
==============================================================================
--- trunk/gst-mixer/src/preferences.c	(original)
+++ trunk/gst-mixer/src/preferences.c	Sun Jun  1 18:38:40 2008
@@ -342,13 +342,9 @@
 		       GstMixerTrack *track, gboolean active)
 {
   gchar *key;
-  GConfValue *value;
 
   key = get_gconf_key (mixer, track);
-  value = gconf_value_new (GCONF_VALUE_BOOL);
-  gconf_value_set_bool (value, active);
-  gconf_client_set (client, key, value, NULL);
-  gconf_value_free (value);
+  gconf_client_set_bool (client, key, active, NULL);
   g_free (key);
 }
 

Modified: trunk/gst-mixer/src/window.c
==============================================================================
--- trunk/gst-mixer/src/window.c	(original)
+++ trunk/gst-mixer/src/window.c	Sun Jun  1 18:38:40 2008
@@ -59,17 +59,14 @@
 cb_change (GtkComboBox *widget,
 	   GnomeVolumeControlWindow *win)
 {
-  GConfValue *value;
   gchar *device_name;
 
   device_name = gtk_combo_box_get_active_text (widget);
-  if (device_name == NULL)
-    return;
+  g_return_if_fail (device_name != NULL);
+
+  gconf_client_set_string (win->client, GNOME_VOLUME_CONTROL_KEY_ACTIVE_ELEMENT, device_name, NULL);
 
-  value = gconf_value_new (GCONF_VALUE_STRING);
-  gconf_value_set_string (value, device_name);
-  gconf_client_set (win->client, GNOME_VOLUME_CONTROL_KEY_ACTIVE_ELEMENT, value, NULL);
-  gconf_value_free (value);
+  g_free (device_name);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]