gnome-media r4236 - in trunk: . gst-mixer/src
- From: bcameron svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-media r4236 - in trunk: . gst-mixer/src
- Date: Wed, 4 Mar 2009 21:23:22 +0000 (UTC)
Author: bcameron
Date: Wed Mar 4 21:23:22 2009
New Revision: 4236
URL: http://svn.gnome.org/viewvc/gnome-media?rev=4236&view=rev
Log:
2009-03-04 Brian Cameron <brian cameron sun com>
* gst-mixer/src/element.[ch], gst-mixer/src/preferences.c: Move the
whitelist_init_list from the element.h to element.c file. This
makes for more efficient code since the structure only needs to
be defined once, not twice (once in element.c and once in
preferences.c).
Modified:
trunk/ChangeLog
trunk/gst-mixer/src/element.c
trunk/gst-mixer/src/element.h
trunk/gst-mixer/src/preferences.c
Modified: trunk/gst-mixer/src/element.c
==============================================================================
--- trunk/gst-mixer/src/element.c (original)
+++ trunk/gst-mixer/src/element.c Wed Mar 4 21:23:22 2009
@@ -106,12 +106,34 @@
*/
gboolean
-gnome_volume_control_element_whitelist (GstMixerTrack *track,
- gvc_whitelist *list)
+gnome_volume_control_element_whitelist (GstMixerTrack *track)
{
gint i, pos;
gboolean found = FALSE;
+ /* Yes this is a hack. */
+ static struct {
+ gchar *label;
+ gboolean done;
+ } list[] = {
+
+/* Translator comment: the names below are a whitelist for which volume
+ * controls to show by default. Make sure that those match the translations
+ * of GStreamer-plugins' ALSA/OSS plugins. */
+ { "cd", FALSE },
+ { "line", FALSE },
+ { "mic", FALSE },
+ { "pcm", FALSE },
+ { "headphone", FALSE },
+ { "speaker", FALSE },
+ { "volume", FALSE },
+ { "master", FALSE },
+ { "digital output", FALSE },
+ { "recording", FALSE },
+ { "front", FALSE },
+ { NULL, FALSE }
+ };
+
for (i = 0; !found && list[i].label != NULL; i++) {
gchar *label_l = NULL;
@@ -225,7 +247,6 @@
{ _("Options"), NULL, NULL, NULL, FALSE, 0, 1, 3,
gnome_volume_control_track_add_option }
};
- gvc_whitelist list[] = whitelist_init_list;
gint i;
const GList *item;
GstMixer *mixer;
@@ -299,7 +320,7 @@
}
/* visible? */
- active = gnome_volume_control_element_whitelist (track, list);
+ active = gnome_volume_control_element_whitelist (track);
key = get_gconf_key (el->mixer, track);
if ((value = gconf_client_get (el->client, key, NULL)) != NULL &&
value->type == GCONF_VALUE_BOOL) {
Modified: trunk/gst-mixer/src/element.h
==============================================================================
--- trunk/gst-mixer/src/element.h (original)
+++ trunk/gst-mixer/src/element.h Wed Mar 4 21:23:22 2009
@@ -60,36 +60,7 @@
GtkWidget * gnome_volume_control_element_new (GConfClient *client);
void gnome_volume_control_element_change (GnomeVolumeControlElement *el,
GstElement *element);
-
-/*
- * Yes this is a hack.
- */
-
-typedef struct {
- gchar *label;
- gboolean done;
-} gvc_whitelist;
-
-/* Translator comment: the names below are a whitelist for which volume
- * controls to show by default. Make sure that those match the translations
- * of GStreamer-plugins' ALSA/OSS plugins. */
-#define whitelist_init_list { \
- { "cd", FALSE }, \
- { "line", FALSE }, \
- { "mic", FALSE }, \
- { "pcm", FALSE }, \
- { "headphone", FALSE }, \
- { "speaker", FALSE }, \
- { "volume", FALSE }, \
- { "master", FALSE }, \
- { "digital output", FALSE }, \
- { "recording", FALSE }, \
- { "front", FALSE }, \
- { NULL, FALSE } \
- }
-
-gboolean gnome_volume_control_element_whitelist (GstMixerTrack *track,
- gvc_whitelist *list);
+gboolean gnome_volume_control_element_whitelist (GstMixerTrack *track);
G_END_DECLS
Modified: trunk/gst-mixer/src/preferences.c
==============================================================================
--- trunk/gst-mixer/src/preferences.c (original)
+++ trunk/gst-mixer/src/preferences.c Wed Mar 4 21:23:22 2009
@@ -291,7 +291,6 @@
GtkTreeIter iter;
GtkListStore *store;
const GList *item;
- gvc_whitelist list[] = whitelist_init_list;
g_return_if_fail (GST_IS_MIXER (element));
mixer = GST_MIXER (element);
@@ -312,7 +311,7 @@
GstMixerTrack *track = item->data;
gchar *key = get_gconf_key (mixer, track);
GConfValue *value;
- gboolean active = gnome_volume_control_element_whitelist (track, list);
+ gboolean active = gnome_volume_control_element_whitelist (track);
if ((value = gconf_client_get (prefs->client, key, NULL)) != NULL &&
value->type == GCONF_VALUE_BOOL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]