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



Author: tpm
Date: Mon Mar 17 21:15:13 2008
New Revision: 3798
URL: http://svn.gnome.org/viewvc/gnome-media?rev=3798&view=rev

Log:
	* gst-mixer/src/track.c: (gnome_volume_control_track_add_option):
	  Use gst_mixer_options_list_values() instead of accessing the
	  mixer options structure directly; this gives implementations
	  a change to return an updated list on request (and know when
	  it's safe to update the structure value). This is required
	  for mixer implementations where the list of available options
	  may change, such as OSSv4.
	  (Closes: #519544)



Modified:
   trunk/ChangeLog
   trunk/gst-mixer/src/track.c

Modified: trunk/gst-mixer/src/track.c
==============================================================================
--- trunk/gst-mixer/src/track.c	(original)
+++ trunk/gst-mixer/src/track.c	Mon Mar 17 21:15:13 2008
@@ -455,7 +455,7 @@
 {
   GnomeVolumeControlTrack *ctrl;
   GstMixerOptions *options = GST_MIXER_OPTIONS (track);
-  const GList *opt;
+  const GList *opt, *opts;
   AtkObject *accessible;
   gchar *accessible_name;
   gint i = 0;
@@ -468,7 +468,8 @@
   /* optionmenu */
   active_opt = gst_mixer_get_option (mixer, GST_MIXER_OPTIONS (track));
   ctrl->options = gtk_combo_box_new_text ();
-  for (opt = options->values; opt != NULL; opt = opt->next, i++) {
+  opts = gst_mixer_options_get_values (options);
+  for (opt = opts; opt != NULL; opt = opt->next, i++) {
     gtk_combo_box_append_text (GTK_COMBO_BOX (ctrl->options), opt->data);
     if (!strcmp (active_opt, opt->data)) {
       gtk_combo_box_set_active (GTK_COMBO_BOX (ctrl->options), i);



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