Index: configure.ac
===================================================================
--- configure.ac	(révision 4929)
+++ configure.ac	(copie de travail)
@@ -967,6 +967,7 @@
 plugins/rb/Makefile
 plugins/power-manager/Makefile
 plugins/visualizer/Makefile
+plugins/spectrum/Makefile
 plugins/mmkeys/Makefile
 bindings/Makefile
 bindings/python/Makefile
Index: plugins/Makefile.am
===================================================================
--- plugins/Makefile.am	(révision 4929)
+++ plugins/Makefile.am	(copie de travail)
@@ -36,7 +36,8 @@
 endif
 
 if USE_GSTREAMER_0_10
-SUBDIRS += visualizer
+SUBDIRS += visualizer					\
+	   spectrum
 endif
 
 if WITH_DBUS
Index: plugins/spectrum/rb-spectrum.c
===================================================================
--- plugins/spectrum/rb-spectrum.c	(révision 0)
+++ plugins/spectrum/rb-spectrum.c	(révision 0)
@@ -0,0 +1,1207 @@
+/*
+ * RBSpectrum - Spectrum Analyzer widget.
+ *
+ * Copyright (C) 2006-2007 - Christophe Dehais <christophe.dehais@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
+ */
+
+
+#include "rb-spectrum.h"
+
+#include <gtk/gtk.h>
+#include <glib.h>
+#include <glade/glade.h>
+
+#include <math.h>
+
+#include "rb-plugin.h"
+#include "rb-debug.h"
+
+
+#define RB_SPECTRUM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RB_TYPE_SPECTRUM, RBSpectrumPrivate))
+
+#define EDITOR_DEFAULT_GLADE_FILE   "./rb-spectrum.glade"
+
+#define RGB(c)    (gdouble)((c))->red/65535, (gdouble)((c)->green)/65535, (gdouble)((c))->blue/65535
+#define RED(c)   ((gdouble)((c))->red/65535)
+#define GREEN(c) ((gdouble)((c))->green/65535)
+#define BLUE(c)  ((gdouble)((c))->blue/65535)
+
+#define DECAY_SPEED   1.0
+#define BORDER  15.0
+#define PADDING  5.0
+#define BAR_SPACE 2.0
+#define LED_SPACE 2.0
+
+typedef enum {
+    RB_SPECTRUM_SLOW,
+    RB_SPECTRUM_NORMAL,
+    RB_SPECTRUM_FAST,
+} RBSpectrumSpeedId;
+
+/* Color theme data structure */
+typedef struct _RBSpectrumColorTheme {
+    /* background */
+    GdkColor *bg_color;
+    GdkColor *hl_color;
+    gdouble hl_position;
+    gdouble hl_size;
+    /* enclosing frame */
+    GdkColor *frame_color;
+    /* bars */
+    GdkColor *hi_color;
+    GdkColor *lo_color;
+    gboolean show_caps;
+    GdkColor *cap_color;
+    RBSpectrumSpeedId decay_speed;
+} RBSpectrumColorTheme;
+
+
+static gint g_speed_val[3] = { 100, 50, 20};
+
+static void rb_spectrum_init (RBSpectrum *spectrum);
+static void rb_spectrum_class_init (RBSpectrumClass *g_class);
+
+static gboolean rb_spectrum_class_expose (GtkWidget *spectrum, GdkEventExpose *event);
+static gboolean rb_spectrum_class_configure (GtkWidget *widget, GdkEventConfigure *event);
+
+static void compute_led_size (RBSpectrum *spectrum, gint widht, gint height);
+static void update_decay_timeout (RBSpectrum *spectrum, RBSpectrumSpeedId speed);
+
+static RBSpectrumColorTheme * spectrum_ct_new ();
+static RBSpectrumColorTheme * spectrum_ct_copy (RBSpectrumColorTheme *ct);
+
+
+/* private data */
+struct _RBSpectrumPrivate {
+    guint nb_bands;
+    gdouble *band_values;
+    gdouble *band_caps;
+    gdouble max_gain;
+
+    gint nb_leds;
+    gdouble led_width;
+    gdouble led_height;
+
+    gchar *gladefile;
+    GladeXML *editor_xml;
+    GladeXML *new_theme_xml;
+    GtkWidget *editor_widget;
+    GtkWidget *themes_combo;
+    GtkWidget *new_theme_dialog;
+    GtkWidget *new_theme_button;
+    GtkWidget *delete_theme_button;
+    GtkWidget *theme_name_entry;
+    GtkWidget *error_message;
+    GtkWidget *see_changes_check;
+    gboolean see_changes;
+
+    GtkWidget *bg_color_button;
+    GtkWidget *hl_color_button;
+    GtkWidget *hl_position_scale;
+    GtkWidget *hl_size_scale;
+    GtkWidget *frame_color_button;
+    GtkWidget *hi_color_button;
+    GtkWidget *lo_color_button;
+    GtkWidget *show_caps_check;
+    GtkWidget *cap_color_button;
+    GtkWidget *decay_speed_combo;
+
+    GtkWidget *current_theme_combo;
+
+    gchar *themes_file;
+    GKeyFile *themes_kfile;
+    GtkListStore *themes;
+    RBSpectrumColorTheme *saved_current_theme;
+    RBSpectrumColorTheme *current_theme;
+    RBSpectrumColorTheme *edited_theme;
+    gchar *edited_theme_name;
+    GtkTreeIter edited_theme_iter;
+
+    guint decay_caps_to;
+
+    gint rendered_frames;
+    GTimer *timer;
+};
+
+
+GType rb_spectrum_get_type (void)
+{
+    static GType spectrum_type = 0;
+  
+    if (!spectrum_type) {
+        static const GTypeInfo spectrum_info = {
+            sizeof (RBSpectrumClass),
+            NULL,               /* base_init */
+            NULL,               /* base_finalize */
+            (GClassInitFunc) rb_spectrum_class_init,
+            NULL,               /* class_finalize */
+            NULL,               /* class_data */
+            sizeof (RBSpectrum),
+            0,                  /* n_preallocs */
+            (GInstanceInitFunc) rb_spectrum_init
+        };
+
+        spectrum_type = g_type_register_static (GTK_TYPE_DRAWING_AREA,
+                                                "RBSpectrum",
+                                                &spectrum_info,
+                                                0);
+    }
+
+    return spectrum_type;
+}
+
+
+static void
+rb_spectrum_class_init (RBSpectrumClass *g_class)
+{
+        GtkWidgetClass *widget_class;
+
+        widget_class = GTK_WIDGET_CLASS (g_class);
+
+        widget_class->expose_event = rb_spectrum_class_expose;
+        widget_class->configure_event = rb_spectrum_class_configure;
+        
+        g_type_class_add_private (g_class, sizeof (RBSpectrumPrivate));
+}
+
+
+static void
+rb_spectrum_init (RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        spectrum->priv = priv;
+}
+
+
+static gboolean  decay_caps (RBSpectrum *spectrum);
+
+GtkWidget *
+rb_spectrum_new (int nb_bands)
+{
+        RBSpectrum * spectrum = RB_SPECTRUM (g_object_new (rb_spectrum_get_type (), NULL));
+ 
+        spectrum->priv->gladefile = EDITOR_DEFAULT_GLADE_FILE;
+
+        spectrum->priv->nb_bands = nb_bands;
+        spectrum->priv->band_values = g_new0 (gdouble, nb_bands);
+        spectrum->priv->band_caps = g_new0 (gdouble, nb_bands);
+    
+        spectrum->priv->max_gain = 10.0;
+
+        spectrum->priv->nb_leds = 40;
+        spectrum->priv->nb_bands = nb_bands;
+
+        spectrum->priv->rendered_frames = 0;
+        spectrum->priv->timer = g_timer_new ();
+
+        gtk_widget_set_size_request (GTK_WIDGET (spectrum), 400, 250);
+
+
+        return GTK_WIDGET (spectrum);
+}
+
+
+void
+rb_spectrum_set_bands (RBSpectrum *spectrum, double *bands)
+{
+        gint i;
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        gdouble new_max = priv->max_gain;
+
+        for (i=0; i<priv->nb_bands; i++) {
+            priv->band_values[i] = bands[i];
+            priv->band_caps[i] = MAX (priv->band_caps[i], bands[i]);
+            /* autofit to max gain seen. Hopefully it stabilizes quickly. */
+            //priv->max_gain = MAX (priv->max_gain, priv->band_caps[i]); 
+            new_max = MAX (new_max, priv->band_caps[i]); 
+        }
+
+        if (new_max > priv->max_gain) {
+            g_print ("new_max = %f\n", new_max);
+            priv->max_gain = new_max;
+        }
+
+        gtk_widget_queue_draw (GTK_WIDGET (spectrum));
+}
+
+
+void
+rb_spectrum_set_ith_band (RBSpectrum *spectrum, guint i, gdouble value)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        gdouble new_max = priv->max_gain;
+
+        g_return_if_fail (i < priv->nb_bands);
+
+        priv->band_values[i] = value;
+        priv->band_caps[i] = MAX (priv->band_caps[i], value);
+
+        new_max = MAX (new_max, priv->band_caps[i]);
+        if (new_max > priv->max_gain) {
+            priv->max_gain = new_max;
+            g_print ("new_max = %f\n", new_max);
+        }
+
+        if (i == (priv->nb_bands-1)) {
+            gtk_widget_queue_draw (GTK_WIDGET (spectrum));
+        }
+}
+
+
+void
+rb_spectrum_set_nb_bands (RBSpectrum *spectrum, guint nb_bands)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        if (nb_bands != priv->nb_bands) {
+            g_free (priv->band_values);
+            g_free (priv->band_caps);
+            priv->band_values = g_new0 (gdouble, nb_bands);
+            priv->band_caps = g_new0 (gdouble, nb_bands);
+            priv->nb_bands = nb_bands;
+            compute_led_size (spectrum, GTK_WIDGET (spectrum)->allocation.width, GTK_WIDGET (spectrum)->allocation.height);
+        }
+}
+
+
+
+/*********************************
+ *
+ * Drawing bits
+ *
+ ********************************/
+
+
+static gboolean
+decay_caps (RBSpectrum *spectrum) 
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        gint i;
+
+        for (i = 0; i < priv->nb_bands; i++) {
+            priv->band_caps[i] = MAX (priv->band_values[i],  priv->band_caps[i] - DECAY_SPEED);
+        }
+
+        return TRUE;
+}
+
+/*
+static void
+draw_spectrum (RBSpectrum *spectrum, RBSpectrumColorTheme *ct, cairo_t *cr)
+{
+
+}
+*/
+
+
+
+static void
+draw_spectrum (RBSpectrum *spectrum, cairo_t *cr, gint width, gint height)
+{       
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        RBSpectrumColorTheme *theme;
+        cairo_pattern_t *bar_gradient;
+        gdouble dashes[2];
+        gint i;
+        gdouble x, y;
+        gdouble baseline;
+
+        theme = priv->current_theme;
+        if (theme == NULL) return;
+
+
+        /* draw the background */
+        if (theme->hl_size > 0.0) {
+            cairo_pattern_t *bg_gradient;
+            gdouble stop1, stop2, stop3;
+            bg_gradient = cairo_pattern_create_linear (0, 0, 0, height);
+            
+            stop1 = MAX (0.0, theme->hl_position - theme->hl_size);
+            stop2 = theme->hl_position;
+            stop3 = MIN (1.0, theme->hl_position + theme->hl_size);
+
+            cairo_pattern_add_color_stop_rgb (bg_gradient, 0.0,   RGB (theme->bg_color));
+            cairo_pattern_add_color_stop_rgb (bg_gradient, stop1, RGB (theme->bg_color));
+            cairo_pattern_add_color_stop_rgb (bg_gradient, stop2, RGB (theme->hl_color));
+            cairo_pattern_add_color_stop_rgb (bg_gradient, stop3, RGB (theme->bg_color));
+            cairo_pattern_add_color_stop_rgb (bg_gradient, 1.0,   RGB (theme->bg_color));
+
+            cairo_set_source (cr, bg_gradient);
+        } else {
+            cairo_set_source_rgb (cr, RGB (theme->bg_color));
+        }
+        cairo_rectangle (cr, 0, 0, width, height);
+        cairo_fill (cr);
+
+        /* draw the frame */
+        cairo_set_source_rgb (cr, RGB (theme->frame_color));
+        cairo_rectangle (cr, BORDER, BORDER, width-2*BORDER, height-2*BORDER);
+        cairo_stroke (cr);
+      
+        /* draw the bars */
+        bar_gradient = cairo_pattern_create_linear (0, BORDER, 0, height-BORDER);
+        cairo_pattern_add_color_stop_rgb (bar_gradient, 0.0, RGB (theme->hi_color));
+        cairo_pattern_add_color_stop_rgb (bar_gradient, 1.0, RGB (theme->lo_color));
+        cairo_set_source (cr, bar_gradient);
+
+        dashes[0] = priv->led_height-LED_SPACE;
+        dashes[1] = LED_SPACE;
+        cairo_set_dash (cr, dashes, 2, 0.0);
+
+        cairo_set_line_width (cr, priv->led_width - BAR_SPACE);
+
+        baseline = height - (BORDER + PADDING + LED_SPACE/2.0);
+
+        x = BORDER + PADDING + priv->led_width/2.0;
+        /* leds */
+        for (i = 0; i < priv->nb_bands; i++) {
+            gint leds_on = floor ((priv->band_values[i] / priv->max_gain) * priv->nb_leds);
+            cairo_move_to (cr, x, baseline);
+            cairo_line_to (cr, x, baseline - leds_on*priv->led_height);
+            x +=  priv->led_width;
+        }
+        cairo_stroke (cr);
+        /* caps */
+        if (theme->show_caps) {
+            cairo_set_source_rgb (cr, RGB (theme->cap_color));
+            cairo_set_line_width (cr, 2.0);
+            cairo_set_dash (cr, NULL, 0, 0.0);
+            x = BORDER + PADDING;
+            for (i = 0; i < priv->nb_bands; i++) {
+                y = baseline - priv->band_caps[i]/priv->max_gain*priv->led_height * priv->nb_leds;
+                cairo_move_to (cr, x                  , y);
+                cairo_line_to (cr, x + priv->led_width, y);
+                x += priv->led_width;
+            }
+            cairo_stroke (cr);
+        }
+
+
+
+        /* fps-o-meter */
+        priv->rendered_frames++;
+#define FRAMES_TO_MEAN  100
+        if (priv->rendered_frames >= FRAMES_TO_MEAN) {
+            gdouble secs;
+            g_timer_stop (priv->timer);
+            secs = g_timer_elapsed (priv->timer, NULL);
+            g_print ("fps: %.1f\n", FRAMES_TO_MEAN / secs);
+            g_timer_start (priv->timer);
+            priv->rendered_frames = 1;
+        }
+}
+
+
+static gboolean
+rb_spectrum_class_expose (GtkWidget *spectrum,
+                          GdkEventExpose *event)
+{
+        cairo_t *cr;
+
+        /* get a cairo_t */
+        cr = gdk_cairo_create (spectrum->window);
+
+        /* set a clip region for the expose event */
+        cairo_rectangle (cr,
+                         event->area.x, event->area.y,
+                         event->area.width, event->area.height);
+        cairo_clip (cr);
+
+        draw_spectrum (RB_SPECTRUM (spectrum), cr, spectrum->allocation.width, spectrum->allocation.height);
+
+        cairo_destroy (cr);
+
+        return FALSE;
+}
+
+
+static void
+compute_led_size (RBSpectrum *spectrum, gint width, gint height)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+ 
+        priv->led_width = (width - 2*(BORDER+PADDING)) / priv->nb_bands;
+        priv->led_height =  (height -2*(BORDER+PADDING)) / priv->nb_leds;
+}
+
+
+static gboolean
+rb_spectrum_class_configure (GtkWidget *spectrum,
+                             GdkEventConfigure *event)
+{
+        compute_led_size (RB_SPECTRUM (spectrum), event->width, event->height);
+
+        return FALSE;
+}
+
+
+/***********************************
+ *
+ * Theme handling
+ *
+ ***********************************/
+
+enum {
+    NAME_COLUMN,    /* identifier name (string) */
+    THEME_COLUMN,   /* theme info (pointer to a RBSpectrumColorTheme structure) */
+    N_COLUMNS
+};
+
+
+static RBSpectrumColorTheme *
+spectrum_ct_new ()
+{
+        RBSpectrumColorTheme *new_ct = g_new (RBSpectrumColorTheme, 1);
+        
+        new_ct->bg_color = g_new0 (GdkColor, 1);
+        new_ct->hl_color = g_new0 (GdkColor, 1);
+        new_ct->hl_position = 0.5;
+        new_ct->hl_size = 0.0;
+        new_ct->frame_color = g_new0 (GdkColor, 1);
+        new_ct->hi_color = g_new0 (GdkColor, 1);
+        new_ct->lo_color = g_new0 (GdkColor, 1);
+        new_ct->show_caps = TRUE;
+        new_ct->cap_color = g_new0 (GdkColor, 1);
+        new_ct->decay_speed = RB_SPECTRUM_NORMAL;
+
+        return new_ct;
+     
+}
+
+
+/* color theme deep copy */
+static RBSpectrumColorTheme *
+spectrum_ct_copy (RBSpectrumColorTheme *ct)
+{
+        RBSpectrumColorTheme *new_ct = g_new (RBSpectrumColorTheme, 1);
+
+        new_ct->bg_color = gdk_color_copy (ct->bg_color);
+        new_ct->hl_color = gdk_color_copy (ct->hl_color);
+        new_ct->hl_position = ct->hl_position;
+        new_ct->hl_size = ct->hl_size;
+        new_ct->frame_color = gdk_color_copy (ct->frame_color);
+        new_ct->hi_color = gdk_color_copy (ct->hi_color);
+        new_ct->lo_color = gdk_color_copy (ct->lo_color);
+        new_ct->show_caps = ct->show_caps;
+        new_ct->cap_color = gdk_color_copy (ct->cap_color);
+        new_ct->decay_speed = ct->decay_speed;
+
+        return new_ct;
+}
+
+
+#if 0
+static void
+spectrum_ct_destroy (RBSpectrumColorTheme *ct)
+{
+        gdk_color_free (ct->bg_color);
+        gdk_color_free (ct->hl_color);
+        gdk_color_free (ct->frame_color);
+        gdk_color_free (ct->hi_color);
+        gdk_color_free (ct->lo_color);
+        gdk_color_free (ct->cap_color);
+        g_free (ct);
+}
+#endif
+
+
+struct search_theme_closure {
+    const gchar *name;
+    GtkTreeIter *iter;
+};
+
+
+static gboolean compare_themes (GtkTreeModel *model,
+                                GtkTreePath *path, GtkTreeIter *iter,
+                                struct search_theme_closure *closure)
+{
+        char *theme_name;
+        gboolean found;
+        
+        gtk_tree_model_get (model, iter, NAME_COLUMN, &theme_name, -1);
+        
+        if (g_str_equal (closure->name, theme_name)) {
+            closure->iter = gtk_tree_iter_copy(iter);
+            found = TRUE;
+        }
+
+        g_free (theme_name);
+        return found;
+}
+
+
+/* returned iter must be freed after use */
+static GtkTreeIter *
+search_theme (RBSpectrum *spectrum, const gchar *name)
+{
+        struct search_theme_closure closure;
+
+        closure.name = name;
+        closure.iter = NULL;
+        
+        gtk_tree_model_foreach (GTK_TREE_MODEL (spectrum->priv->themes),
+                               (GtkTreeModelForeachFunc) compare_themes, &closure);
+
+        return closure.iter;
+}
+
+void
+rb_spectrum_set_theme (RBSpectrum *spectrum,
+                       const gchar *theme)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        GtkTreeIter *iter;
+
+        iter = search_theme (spectrum, theme);
+        if (iter != NULL) {
+            gtk_tree_model_get (GTK_TREE_MODEL (priv->themes), iter,
+                                THEME_COLUMN, &priv->current_theme, -1);
+            priv->saved_current_theme = priv->current_theme;
+            g_free (iter);
+            update_decay_timeout (spectrum, priv->current_theme->decay_speed);
+        }
+}
+
+
+static GdkColor *
+_g_key_file_get_color (GKeyFile *kfile,
+                       const gchar *group,
+                       const gchar *key)
+{
+        GdkColor *color;
+        gdouble *components;
+
+        components = g_key_file_get_double_list (kfile, group, key, NULL, NULL);
+
+        color = g_new (GdkColor, 1);
+        color->red   = (guint16) (components[0] * ((1<<16)-1));
+        color->green = (guint16) (components[1] * ((1<<16)-1));
+        color->blue  = (guint16) (components[2] * ((1<<16)-1));
+        g_free (components);
+
+        return color;
+}
+
+
+static void
+_g_key_file_set_color (GKeyFile *kfile,
+                       const gchar *group,
+                       const gchar *key,
+                       GdkColor *color)
+{
+        gdouble components[3];
+
+        components[0] = RED (color);
+        components[1] = GREEN (color);
+        components[2] = BLUE (color);
+        g_key_file_set_double_list (kfile, group, key, components, 3);
+}
+
+
+void
+rb_spectrum_load_themes (RBSpectrum *spectrum,
+                         const gchar *themes_file)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        GKeyFile *kfile;
+        gboolean load_ok;
+
+        priv->themes = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER);
+
+        kfile = g_key_file_new ();
+        g_key_file_set_list_separator (kfile, ';');
+
+        load_ok = g_key_file_load_from_file (kfile, themes_file, G_KEY_FILE_NONE, NULL);
+
+        if (load_ok) {
+            RBSpectrumColorTheme *theme = NULL;
+            GtkTreeIter iter;
+            gchar **groups, **group;
+            guint nb_themes;
+            groups = g_key_file_get_groups (kfile, &nb_themes);
+            rb_debug ("found %d presets", nb_themes);
+         
+            priv->themes_kfile = kfile;
+            priv->themes_file = (gchar *)themes_file;
+
+            //group = groups;
+            for (group=groups; *group!=NULL; group++) {
+                g_print ("theme %s\n", *group);
+                theme = g_new (RBSpectrumColorTheme, 1);
+
+                theme->bg_color = _g_key_file_get_color (kfile, *group, "bg_color");
+                theme->hl_color = _g_key_file_get_color (kfile, *group, "hl_color");
+                theme->hl_position = g_key_file_get_double (kfile, *group, "hl_position", NULL);
+                theme->hl_size = g_key_file_get_double (kfile, *group, "hl_size", NULL);
+                theme->frame_color = _g_key_file_get_color (kfile, *group, "frame_color");
+                theme->hi_color = _g_key_file_get_color (kfile, *group, "hi_color");
+                theme->lo_color = _g_key_file_get_color (kfile, *group, "lo_color");
+                theme->show_caps = g_key_file_get_boolean (kfile, *group, "show_caps", NULL);
+                theme->cap_color = _g_key_file_get_color (kfile, *group, "cap_color");
+                theme->decay_speed = g_key_file_get_integer (kfile, *group, "decay_speed", NULL);
+                
+                gtk_list_store_append (priv->themes, &iter);
+                gtk_list_store_set (priv->themes, &iter,
+                                    NAME_COLUMN, *group,
+                                    THEME_COLUMN, theme, -1);
+            }
+            
+
+            if (priv->themes_combo != NULL) {
+                gtk_combo_box_set_model (GTK_COMBO_BOX (priv->themes_combo), GTK_TREE_MODEL (priv->themes));
+                gtk_combo_box_set_active_iter (GTK_COMBO_BOX (priv->themes_combo), &iter);
+                priv->current_theme = theme;
+            }
+
+        } else {
+            g_warning ("could not load spectrum color themes file %s\n", themes_file);
+        }
+}
+
+
+void
+rb_spectrum_save_themes (RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        FILE *file;
+
+        if (!(file = fopen (priv->themes_file, "w"))) {
+            g_warning ("Could not open file: %s", priv->themes_file);
+        } else {
+            gchar *data;
+
+            g_key_file_set_list_separator (priv->themes_kfile, ';');
+            data = g_key_file_to_data (priv->themes_kfile, NULL, NULL);
+            fputs (data, file);
+            fclose (file);
+            g_free (data);
+        }
+}
+
+
+void
+rb_spectrum_set_theme_editor_glade_file (RBSpectrum *spectrum,
+                                         const gchar *file)
+{
+        spectrum->priv->gladefile = (gchar *)file;
+}
+
+
+static void
+update_editor_ui (RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        RBSpectrumColorTheme *theme = priv->edited_theme;
+
+        if (theme == NULL) return;
+
+        gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->bg_color_button), theme->bg_color);
+        gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->hl_color_button), theme->hl_color);
+        gtk_range_set_value (GTK_RANGE (priv->hl_position_scale), theme->hl_position);
+        gtk_range_set_value (GTK_RANGE (priv->hl_size_scale), theme->hl_size);
+        gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->frame_color_button), theme->frame_color);
+        gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->hi_color_button), theme->hi_color);
+        gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->lo_color_button), theme->lo_color);
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->show_caps_check), theme->show_caps);
+        gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cap_color_button), theme->cap_color);
+        gtk_combo_box_set_active (GTK_COMBO_BOX (priv->decay_speed_combo), theme->decay_speed);
+
+}
+
+
+static void update_spectrum (RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        
+        if (priv->see_changes) {
+            priv->current_theme = priv->edited_theme;
+        }
+}
+
+
+static void 
+on_themes_combo_changed (GtkComboBox *combo,
+                         RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        gtk_combo_box_get_active_iter (combo, &priv->edited_theme_iter);
+        g_free (priv->edited_theme_name);
+        gtk_tree_model_get (GTK_TREE_MODEL (priv->themes), &priv->edited_theme_iter,
+                            NAME_COLUMN, &priv->edited_theme_name,
+                            THEME_COLUMN, &priv->edited_theme, -1);
+        
+        update_editor_ui (spectrum);
+        update_spectrum (spectrum);
+        rb_spectrum_save_themes (spectrum);
+}
+
+
+
+/*
+ *  Callbacks for the various theme property widgets
+ */
+
+static void
+on_show_caps_check_toggled (GtkToggleButton *toggle,
+                           RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        gboolean active = gtk_toggle_button_get_active (toggle);
+
+        gtk_widget_set_sensitive (priv->cap_color_button, active);
+        gtk_widget_set_sensitive (priv->decay_speed_combo, active);
+    
+        if (priv->edited_theme != NULL) {
+            priv->edited_theme->show_caps = active;
+            g_key_file_set_boolean (priv->themes_kfile, priv->edited_theme_name, "show_caps", active);
+            update_spectrum (spectrum);
+        }
+}
+
+
+
+static void
+on_bg_color_button_changed (GtkColorButton *button, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        if (priv->edited_theme != NULL) {
+            gtk_color_button_get_color (button, priv->edited_theme->bg_color);
+            _g_key_file_set_color (priv->themes_kfile, priv->edited_theme_name,
+                                   "bg_color", priv->edited_theme->bg_color);
+            update_spectrum (spectrum);
+        }
+}
+
+
+static void
+on_hl_color_button_changed (GtkColorButton *button, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        if (priv->edited_theme != NULL) {
+            gtk_color_button_get_color (button, priv->edited_theme->hl_color);
+            _g_key_file_set_color (priv->themes_kfile, priv->edited_theme_name,
+                                   "hl_color", priv->edited_theme->hl_color);
+            update_spectrum (spectrum);
+        }
+}
+
+
+static void
+on_hl_position_scale_changed (GtkRange *scale, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        if (priv->edited_theme != NULL) {
+            gdouble value =  gtk_range_get_value (scale);
+            priv->edited_theme->hl_position = gtk_range_get_value (scale);
+            g_key_file_set_double (priv->themes_kfile, priv->edited_theme_name, "hl_position", value);
+            update_spectrum (spectrum);
+        }
+}
+
+
+static void
+on_hl_size_scale_changed (GtkRange *scale, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        if (priv->edited_theme != NULL) {
+            gdouble value =  gtk_range_get_value (scale);
+            priv->edited_theme->hl_size = gtk_range_get_value (scale);
+            g_key_file_set_double (priv->themes_kfile, priv->edited_theme_name, "hl_size", value);
+            update_spectrum (spectrum);
+        }
+}
+
+
+static void
+on_frame_color_button_changed (GtkColorButton *button, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        if (priv->edited_theme != NULL) {
+            gtk_color_button_get_color (button, spectrum->priv->edited_theme->frame_color);
+            _g_key_file_set_color (priv->themes_kfile, priv->edited_theme_name,
+                                   "frame_color", priv->edited_theme->frame_color);            
+            update_spectrum (spectrum);
+        }
+}
+
+
+static void
+on_hi_color_button_changed (GtkColorButton *button, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        if (priv->edited_theme != NULL) {
+            gtk_color_button_get_color (button, priv->edited_theme->hi_color);
+            _g_key_file_set_color (priv->themes_kfile, priv->edited_theme_name,
+                                   "hi_color", priv->edited_theme->hi_color);
+            update_spectrum (spectrum);
+        }
+}
+
+
+static void
+on_lo_color_button_changed (GtkColorButton *button, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        if (priv->edited_theme != NULL) {
+            gtk_color_button_get_color (button, priv->edited_theme->lo_color);
+            _g_key_file_set_color (priv->themes_kfile, priv->edited_theme_name,
+                                   "lo_color", priv->edited_theme->lo_color);
+            update_spectrum (spectrum);
+        }
+}
+
+
+static void
+on_cap_color_button_changed (GtkColorButton *button, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        if (priv->edited_theme != NULL) {
+            gtk_color_button_get_color (button, priv->edited_theme->cap_color);
+            _g_key_file_set_color (priv->themes_kfile, priv->edited_theme_name,
+                                   "cap_color", priv->edited_theme->cap_color);
+            update_spectrum (spectrum);
+        }
+}
+
+
+static void
+update_decay_timeout (RBSpectrum *spectrum, RBSpectrumSpeedId speed)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        if (priv->decay_caps_to > 0) {
+            g_source_remove (priv->decay_caps_to);
+        }
+        priv->decay_caps_to = g_timeout_add (g_speed_val[speed], (GSourceFunc) decay_caps, spectrum);
+
+}
+
+static void
+on_decay_speed_combo_changed (GtkComboBox *combo, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        if (priv->edited_theme != NULL) {
+            gchar *speed = gtk_combo_box_get_active_text (combo);
+
+            if (g_str_equal (speed, "Slow")) {
+                priv->edited_theme->decay_speed = RB_SPECTRUM_SLOW;                    
+                g_key_file_set_integer (priv->themes_kfile, priv->edited_theme_name, "decay_speed",  RB_SPECTRUM_SLOW);
+            } else if (g_str_equal (speed, "Normal")) {
+                priv->edited_theme->decay_speed = RB_SPECTRUM_NORMAL;
+                g_key_file_set_integer (priv->themes_kfile, priv->edited_theme_name, "decay_speed",  RB_SPECTRUM_NORMAL);
+            } else if (g_str_equal (speed, "Fast")) {
+                priv->edited_theme->decay_speed = RB_SPECTRUM_FAST;
+                g_key_file_set_integer (priv->themes_kfile, priv->edited_theme_name, "decay_speed",  RB_SPECTRUM_FAST);
+            };
+            update_decay_timeout (spectrum, priv->edited_theme->decay_speed);
+            update_spectrum (spectrum);
+        }
+}
+
+/*
+ * Deleting / Creating themes
+ */
+
+static void
+on_delete_theme_button_clicked (GtkButton *button,
+                                RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        gboolean has_next;
+
+        if (priv->edited_theme == NULL) return;
+
+        has_next = gtk_list_store_remove (priv->themes, &priv->edited_theme_iter);
+        if (!has_next) {
+            has_next = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (priv->themes), &priv->edited_theme_iter);
+        }
+        if (has_next) {
+            gtk_combo_box_set_active_iter (GTK_COMBO_BOX (priv->themes_combo), &priv->edited_theme_iter);
+            gtk_tree_model_get (GTK_TREE_MODEL (priv->themes), &priv->edited_theme_iter,
+                                THEME_COLUMN, &priv->edited_theme, -1);
+        } else {
+            priv->edited_theme = NULL;
+        }
+
+        update_editor_ui (spectrum);
+}
+
+
+static void
+on_theme_name_entry_changed (GtkEditable *entry, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        gboolean can_validate;
+        gchar *name;
+        GtkTreeIter *iter;
+
+        name = gtk_editable_get_chars (entry, 0, -1);
+        g_strstrip (name);
+        iter = search_theme (spectrum, name);
+        if (iter != NULL) {
+            gtk_widget_show_all (priv->error_message);
+            can_validate = FALSE;
+            g_free (iter);
+        } else {
+            gtk_widget_hide_all (priv->error_message);
+            can_validate = TRUE;
+        }
+        g_free (name);
+
+        gtk_dialog_set_response_sensitive (GTK_DIALOG (priv->new_theme_dialog),
+                                           GTK_RESPONSE_ACCEPT, can_validate);
+}
+
+
+static void
+on_new_theme_dialog_response (GtkDialog *dialog, gint response_id, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        GtkListStore *themes = priv->themes;
+        RBSpectrumColorTheme *theme = NULL;
+        GtkTreeIter iter;
+
+        
+        switch (response_id) {
+            case GTK_RESPONSE_ACCEPT: {
+                const gchar *new_name = gtk_entry_get_text (GTK_ENTRY (priv->theme_name_entry));
+
+                /* copy currently edited theme to new */
+                if (priv->edited_theme != NULL) {
+                    theme = spectrum_ct_copy (priv->edited_theme);
+                } else {
+                    theme = spectrum_ct_new ();
+                }
+                
+                gtk_list_store_append (themes, &iter);
+                gtk_list_store_set (themes, &iter,
+                                    NAME_COLUMN, g_strstrip (g_strdup (new_name)),
+                                    THEME_COLUMN, theme, -1);
+                gtk_combo_box_set_active_iter (GTK_COMBO_BOX (priv->themes_combo), &iter);
+
+                /* add an entry in the keyfile */
+                _g_key_file_set_color (priv->themes_kfile, new_name, "bg_color", theme->bg_color);
+                _g_key_file_set_color (priv->themes_kfile, new_name, "hl_color", theme->hl_color);
+                g_key_file_set_double (priv->themes_kfile, new_name, "hl_position", theme->hl_position);
+                g_key_file_set_double (priv->themes_kfile, new_name, "hl_size", theme->hl_size);
+                _g_key_file_set_color (priv->themes_kfile, new_name, "frame_color", theme->frame_color);
+                _g_key_file_set_color (priv->themes_kfile, new_name, "hi_color", theme->hi_color);
+                _g_key_file_set_color (priv->themes_kfile, new_name, "lo_color", theme->lo_color);
+                g_key_file_set_boolean (priv->themes_kfile, new_name, "show_caps", theme->show_caps);
+                _g_key_file_set_color (priv->themes_kfile, new_name, "cap_color", theme->cap_color);
+                g_key_file_set_integer (priv->themes_kfile, new_name, "decay_speed", theme->decay_speed);
+
+                gtk_widget_hide (GTK_WIDGET (dialog));
+                break;
+            }
+            case GTK_RESPONSE_DELETE_EVENT:
+            case GTK_RESPONSE_REJECT:
+                gtk_widget_hide (GTK_WIDGET (dialog));
+                break;
+            default: break;
+        }
+
+        gtk_widget_set_sensitive (priv->editor_widget, TRUE);
+}
+
+
+static void
+on_new_theme_button_clicked (GtkButton *button, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        
+        if (priv->new_theme_dialog == NULL) {
+            GtkWidget *dialog;
+            GtkWidget *inner_dialog;
+            GtkWidget *parent_win;
+            GladeXML *new_theme_xml;
+
+            parent_win = gtk_widget_get_toplevel (priv->editor_widget);
+            dialog = gtk_dialog_new_with_buttons ("New Theme", GTK_WINDOW (parent_win),
+                                                  GTK_DIALOG_DESTROY_WITH_PARENT,
+                                                  GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+                                                  GTK_STOCK_NEW, GTK_RESPONSE_ACCEPT,
+                                                  NULL);
+            gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+
+            new_theme_xml = glade_xml_new (priv->gladefile, "new_theme_inner_dialog", NULL);
+            priv->new_theme_xml = new_theme_xml;
+            inner_dialog = glade_xml_get_widget (new_theme_xml, "new_theme_inner_dialog");
+            gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->vbox), inner_dialog, TRUE, FALSE, 0);
+            g_signal_connect (G_OBJECT (dialog), "response",
+                              G_CALLBACK (on_new_theme_dialog_response), spectrum);
+
+            /* prevent dialog from being destructed when hidden */
+            g_signal_connect (dialog, "delete-event",
+	        	      G_CALLBACK(gtk_true), NULL);
+
+            priv->theme_name_entry = glade_xml_get_widget (new_theme_xml, "theme_name_entry");
+            g_signal_connect (G_OBJECT (priv->theme_name_entry), "changed",
+                              G_CALLBACK (on_theme_name_entry_changed), spectrum);
+            priv->error_message =  glade_xml_get_widget (new_theme_xml, "error_message");
+            priv->new_theme_dialog = dialog;
+        }
+        
+        gtk_widget_set_sensitive (priv->editor_widget, FALSE);
+        gtk_entry_set_text (GTK_ENTRY (priv->theme_name_entry), "");
+        g_signal_emit_by_name (GTK_ENTRY (priv->theme_name_entry), "changed", NULL);
+        gtk_widget_show (priv->new_theme_dialog);
+}
+
+static void
+on_see_changes_check_toggled (GtkToggleButton *button, RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+
+        priv->see_changes = gtk_toggle_button_get_active (button);
+
+        if (priv->see_changes) {
+            /* make current theme match edited theme */
+            priv->saved_current_theme = priv->current_theme;
+            priv->current_theme = priv->edited_theme;
+        } else { 
+            priv->current_theme =  priv->saved_current_theme;
+        }
+}
+
+
+GtkWidget *
+rb_spectrum_get_theme_editor_UI (RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        GladeXML *editor_xml;
+
+        if (priv->editor_widget == NULL) {
+            GtkCellRenderer *renderer;
+            
+            editor_xml = glade_xml_new (priv->gladefile, "editor_vbox", NULL);
+
+            priv->editor_xml = editor_xml;
+
+            priv->editor_widget = glade_xml_get_widget (editor_xml, "editor_vbox");
+            
+            priv->themes_combo = glade_xml_get_widget (editor_xml, "themes_combo");
+
+            renderer = gtk_cell_renderer_text_new ();
+            gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (priv->themes_combo), renderer, FALSE);
+            gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (priv->themes_combo), renderer,    
+                                            "text", NAME_COLUMN, NULL);
+            g_signal_connect (GTK_COMBO_BOX (priv->themes_combo), "changed",
+                              G_CALLBACK (on_themes_combo_changed), spectrum);
+
+            priv->see_changes_check = glade_xml_get_widget (editor_xml, "see_changes_check");
+            g_signal_connect (G_CALLBACK (priv->see_changes_check), "toggled",
+                              G_CALLBACK (on_see_changes_check_toggled), spectrum);
+
+            priv->bg_color_button = glade_xml_get_widget (editor_xml, "bg_color_button");
+            g_signal_connect (G_OBJECT (priv->bg_color_button), "color-set",
+                              G_CALLBACK (on_bg_color_button_changed), spectrum);
+            priv->hl_color_button = glade_xml_get_widget (editor_xml, "hl_color_button");
+            g_signal_connect (G_OBJECT (priv->hl_color_button), "color-set",
+                              G_CALLBACK (on_hl_color_button_changed), spectrum);
+            priv->hl_position_scale = glade_xml_get_widget (editor_xml, "hl_position_scale");
+            g_signal_connect (G_OBJECT (priv->hl_position_scale), "value-changed",
+                              G_CALLBACK (on_hl_position_scale_changed), spectrum);
+            priv->hl_size_scale = glade_xml_get_widget (editor_xml, "hl_size_scale");
+            g_signal_connect (G_OBJECT (priv->hl_size_scale), "value-changed",
+                              G_CALLBACK (on_hl_size_scale_changed), spectrum);
+            priv->frame_color_button = glade_xml_get_widget (editor_xml, "frame_color_button");
+            g_signal_connect (G_OBJECT (priv->frame_color_button), "color-set",
+                              G_CALLBACK (on_frame_color_button_changed), spectrum);
+            priv->hi_color_button = glade_xml_get_widget (editor_xml, "hi_color_button");
+            g_signal_connect (G_OBJECT (priv->hi_color_button), "color-set",
+                              G_CALLBACK (on_hi_color_button_changed), spectrum);
+            priv->lo_color_button = glade_xml_get_widget (editor_xml, "lo_color_button");
+            g_signal_connect (G_OBJECT (priv->lo_color_button), "color-set",
+                              G_CALLBACK (on_lo_color_button_changed), spectrum);
+            priv->show_caps_check = glade_xml_get_widget (editor_xml, "show_caps_check");
+            g_signal_connect (G_OBJECT (priv->show_caps_check), "toggled",
+                              G_CALLBACK (on_show_caps_check_toggled), spectrum);
+            priv->cap_color_button = glade_xml_get_widget (editor_xml, "cap_color_button");
+            g_signal_connect (G_OBJECT (priv->cap_color_button), "color-set",
+                              G_CALLBACK (on_cap_color_button_changed), spectrum);
+            priv->decay_speed_combo = glade_xml_get_widget (editor_xml, "decay_speed_combo");
+            g_signal_connect (G_OBJECT (priv->decay_speed_combo), "changed",
+                              G_CALLBACK (on_decay_speed_combo_changed), spectrum);
+
+            priv->delete_theme_button = glade_xml_get_widget (editor_xml, "delete_theme_button");
+            g_signal_connect (G_OBJECT (priv->delete_theme_button), "clicked",
+                              G_CALLBACK (on_delete_theme_button_clicked), spectrum);
+            priv->new_theme_button = glade_xml_get_widget (editor_xml, "new_theme_button");
+            g_signal_connect (G_OBJECT (priv->new_theme_button), "clicked",
+                              G_CALLBACK (on_new_theme_button_clicked), spectrum);
+
+            if (priv->themes != NULL) {
+                 gtk_combo_box_set_model (GTK_COMBO_BOX (priv->themes_combo), GTK_TREE_MODEL (priv->themes));
+            }
+            if (priv->current_theme_combo != NULL) {
+                 gtk_combo_box_set_model (GTK_COMBO_BOX (priv->current_theme_combo), GTK_TREE_MODEL (priv->themes));
+            }
+        }
+        
+        return priv->editor_widget;
+}
+
+
+static void
+on_current_theme_combo_changed (GtkComboBox *combo, RBSpectrum *spectrum)
+{    
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+        GtkTreeIter iter;
+
+        gtk_combo_box_get_active_iter (combo, &iter);
+
+        gtk_tree_model_get (GTK_TREE_MODEL (priv->themes), &iter,              
+                            THEME_COLUMN, &priv->current_theme, -1);
+        priv->saved_current_theme = priv->current_theme;
+
+        update_decay_timeout (spectrum, priv->current_theme->decay_speed);
+}
+
+
+GtkWidget *
+rb_spectrum_get_current_theme_combo (RBSpectrum *spectrum)
+{
+        RBSpectrumPrivate *priv = RB_SPECTRUM_GET_PRIVATE (spectrum);
+    
+        if (priv->current_theme_combo == NULL) {
+            GtkCellRenderer *renderer;
+
+            priv->current_theme_combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (priv->themes));
+            renderer = gtk_cell_renderer_text_new ();
+            gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (priv->current_theme_combo), renderer, FALSE);
+            gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (priv->current_theme_combo), renderer,    
+                                            "text", NAME_COLUMN, NULL);
+
+            g_signal_connect (G_OBJECT (priv->current_theme_combo), "changed",
+                              G_CALLBACK (on_current_theme_combo_changed), spectrum);
+        }
+
+        return priv->current_theme_combo;
+}
+
Index: plugins/spectrum/rb-spectrum.h
===================================================================
--- plugins/spectrum/rb-spectrum.h	(révision 0)
+++ plugins/spectrum/rb-spectrum.h	(révision 0)
@@ -0,0 +1,86 @@
+/*
+ * RBSpectrum - Spectrum Analyzer widget.
+ *
+ * Copyright (C) 2006-2007 - Christophe Dehais <christophe.dehais@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
+ */
+
+
+
+#ifndef __RB_SPECTRUM_H__
+#define __RB_SPECTRUM_H__
+
+#include <gtk/gtkdrawingarea.h>
+
+G_BEGIN_DECLS
+
+#define RB_TYPE_SPECTRUM                  (rb_spectrum_get_type ())
+#define RB_SPECTRUM(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), RB_TYPE_SPECTRUM, RBSpectrum))
+#define RB_SPECTRUM_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), RB_TYPE_SPECTRUM, RBSpectrumClass))
+#define RB_IS_SPECTRUM(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RB_TYPE_SPECTRUM))
+#define RB_IS_SPECTRUM_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), RB_TYPE_SPECTRUM))
+#define RB_SPECTRUM_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), RB_TYPE_SPECTRUM, RBSpectrumClass))
+
+
+typedef struct _RBSpectrum        RBSpectrum;
+typedef struct _RBSpectrumClass   RBSpectrumClass;
+typedef struct _RBSpectrumPrivate RBSpectrumPrivate;
+
+
+struct _RBSpectrum
+{
+    GtkDrawingArea parent;
+    
+    /*< private >*/
+    RBSpectrumPrivate* priv;
+};
+
+struct _RBSpectrumClass
+{
+    GtkDrawingAreaClass parent_class;
+
+    /* signals */
+};
+
+
+GType rb_spectrum_get_type (void);
+
+GtkWidget * rb_spectrum_new (int nb_bands);
+
+
+void rb_spectrum_set_nb_bands (RBSpectrum *spectrum, guint nb_bands);
+
+void rb_spectrum_set_bands (RBSpectrum *spectrum, gdouble *bands);
+
+void rb_spectrum_set_ith_band (RBSpectrum *spectrum, guint i, gdouble value);
+
+
+void rb_spectrum_load_themes (RBSpectrum *spectrum, const gchar *theme_file);
+
+void rb_spectrum_save_themes (RBSpectrum *spectrum);
+
+void rb_spectrum_set_theme_editor_glade_file (RBSpectrum *spectrum, const gchar *file);
+
+GtkWidget * rb_spectrum_get_theme_editor_UI (RBSpectrum *spectrum);
+
+void rb_spectrum_set_theme (RBSpectrum *spectrum, const gchar *theme);
+
+/* get a GtkComboBox for setting the current theme */
+GtkWidget * rb_spectrum_get_current_theme_combo (RBSpectrum *spectrum);
+
+G_END_DECLS
+
+#endif
Index: plugins/spectrum/rb-spectrum-plugin.c
===================================================================
--- plugins/spectrum/rb-spectrum-plugin.c	(révision 0)
+++ plugins/spectrum/rb-spectrum-plugin.c	(révision 0)
@@ -0,0 +1,455 @@
+/*
+ * rb-spectrum-plugin.c
+ *
+ * Copyright (C) 2006-2007 - Christophe Dehais <christophe.dehais@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h> /* For strlen */
+#include <glib/gi18n-lib.h>
+#include <gmodule.h>
+#include <gtk/gtk.h>
+#include <glib.h>
+#include <glib/gprintf.h>
+#include <glib-object.h>
+#include <glade/glade.h>
+#include <gst/gst.h>
+#include <math.h>
+
+#include "rb-plugin.h"
+#include "rb-debug.h"
+#include "rb-shell.h"
+#include "rb-dialog.h"
+#include "rb-file-helpers.h"
+#include "rb-shell-player.h"
+#include "rb-player.h"
+#include "rb-player-gst-filter.h"
+
+#include "rb-spectrum.h"
+
+static gchar *themes_file = "spectrum-themes.ini";
+static guint g_sampling_rates[4] = { 100, 75, 50, 25 };
+
+#define RB_TYPE_SPECTRUM_PLUGIN        (rb_spectrum_plugin_get_type ())
+#define RB_SPECTRUM_PLUGIN(o)            (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_SPECTRUM_PLUGIN, RBSpectrumPlugin))
+#define RB_SPECTRUM_PLUGIN_CLASS(k)        (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_SPECTRUM_PLUGIN, RBSpectrumPluginClass))
+#define RB_IS_SPECTRUM_PLUGIN(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_SPECTRUM_PLUGIN))
+#define RB_IS_SPECTRUM_PLUGIN_CLASS(k)        (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_SPECTRUM_PLUGIN))
+#define RB_SPECTRUM_PLUGIN_GET_CLASS(o)    (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_SPECTRUM_PLUGIN, RBSpectrumPluginClass))
+
+typedef struct _EqFilterInfo EqFilterInfo;
+
+typedef struct
+{
+    RBPlugin parent;
+
+    GladeXML *config_xml;
+    GtkWidget *preferences;
+    GtkWidget *nb_bands_spin;
+    GtkWidget *sampling_rate_combo;
+
+    gint nb_bands;
+
+    GtkWidget *spectrum_win;
+    GtkWidget *spectrum;
+
+    GtkWindow *main_window;
+    GtkActionGroup *action_group;
+    guint ui_merge_id;
+
+    RBPlayer *player;
+    GstElement *filter; /* spectrum_left , spectrum_right */
+} RBSpectrumPlugin;
+
+
+typedef struct
+{
+    RBPluginClass parent_class;
+} RBSpectrumPluginClass;
+
+
+G_MODULE_EXPORT GType register_rb_plugin (GTypeModule *module);
+GType    rb_spectrum_plugin_get_type        (void) G_GNUC_CONST;
+
+
+
+static void rb_spectrum_plugin_init (RBSpectrumPlugin *plugin);
+static void rb_spectrum_plugin_finalize (GObject *object);
+static void impl_activate (RBPlugin *plugin, RBShell *shell);
+static void impl_deactivate (RBPlugin *plugin, RBShell *shell);
+static GtkWidget * impl_create_configure_dialog (RBPlugin *plugin);
+
+static void cmd_show_spectrum (GtkAction *action, RBSpectrumPlugin *plugin);
+
+RB_PLUGIN_REGISTER(RBSpectrumPlugin, rb_spectrum_plugin)
+
+static GtkToggleActionEntry rb_spectrum_plugin_actions [] = {
+	{ "SpectrumDisplayWidget", GTK_STOCK_PREFERENCES, "Show Spectrum Analyser", NULL,
+	  N_("Show the spectrum analyzer"),
+	  G_CALLBACK (cmd_show_spectrum), FALSE
+	}
+};
+
+
+static const gchar *toolbar_ui_path = "/ToolBar/ToolBarPluginPlaceholder";
+
+
+static void
+rb_spectrum_plugin_class_init (RBSpectrumPluginClass *klass)
+{
+    GObjectClass *object_class = G_OBJECT_CLASS (klass);
+    RBPluginClass *plugin_class = RB_PLUGIN_CLASS (klass);
+
+    object_class->finalize = rb_spectrum_plugin_finalize;
+
+    plugin_class->activate = impl_activate;
+    plugin_class->deactivate = impl_deactivate;
+    plugin_class->create_configure_dialog = impl_create_configure_dialog;
+}
+
+
+static void
+rb_spectrum_plugin_init (RBSpectrumPlugin *plugin)
+{
+    rb_debug ("RBSpectrumPlugin initialising");
+}
+
+
+static void
+rb_spectrum_plugin_finalize (GObject *object)
+{
+    rb_debug ("RBSpectrumPlugin finalising");
+
+    G_OBJECT_CLASS (rb_spectrum_plugin_parent_class)->finalize (object);
+}
+
+
+/* receive spectral data from element message */
+static gboolean
+spectrum_message_handler (GstBus * bus, GstMessage * message, RBSpectrumPlugin *plugin)
+{
+        if (message->type == GST_MESSAGE_ELEMENT) {
+            const GstStructure *s = gst_message_get_structure (message);
+            const gchar *name = gst_structure_get_name (s);
+            
+            gst_message_ref (message);
+
+            if (strcmp (name, "spectrum") == 0) {
+                const GValue *list;
+                const GValue *value;
+                guint i;
+                list = gst_structure_get_value (s, "spectrum");
+                if (gst_value_list_get_size (list) == plugin->nb_bands) {
+                    for (i = 0; i < plugin->nb_bands; ++i) {
+                        value = gst_value_list_get_value (list, i);
+                        rb_spectrum_set_ith_band (RB_SPECTRUM (plugin->spectrum), i, (gdouble) g_value_get_uchar (value));
+                    }
+                } else {
+                    g_print ("discard message\n");
+                }
+            }
+        }
+
+        return TRUE;
+}
+
+
+/*************************************
+ *
+ * Plugin activation
+ *
+ *************************************/
+
+static gboolean
+on_spectrum_win_delete (GtkWidget *win, GdkEvent *event, RBSpectrumPlugin *plugin)
+{
+    GtkAction *action;
+
+    action = gtk_action_group_get_action (plugin->action_group, "SpectrumDisplayWidget");
+    gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), FALSE);
+
+    /* TODO remove spectrum filter from pipeline */
+    
+    return TRUE;
+}
+
+
+static void
+cmd_show_spectrum (GtkAction          *action,
+		    RBSpectrumPlugin  *plugin)
+{
+    if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) {
+	if (plugin->spectrum_win == NULL) {
+	    GtkWidget *win;
+
+	    win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+	    gtk_window_set_title (GTK_WINDOW (win), "Spectrum Analyzer");
+	    gtk_container_set_border_width (GTK_CONTAINER (win), 2);
+
+	    g_signal_connect (G_OBJECT (win), "delete-event",
+      	                      G_CALLBACK (on_spectrum_win_delete), plugin);
+
+	    gtk_container_add (GTK_CONTAINER (win), GTK_WIDGET (plugin->spectrum));
+
+	    gtk_window_set_transient_for (GTK_WINDOW (win), plugin->main_window);
+	    gtk_widget_show_all (win);
+
+	    plugin->spectrum_win = win;
+	    rb_debug ("creating widget");
+	} else {
+	    gtk_window_present (GTK_WINDOW (plugin->spectrum_win));
+	}
+    } else if (plugin->spectrum_win != NULL) {
+	gtk_widget_hide (plugin->spectrum_win);
+    }
+}
+
+
+static void
+on_playbin_notify (GObject    *player,
+                   GParamSpec *pspec,
+                   RBSpectrumPlugin *plugin) 
+{
+        GstElement *playbin;
+        GstBus *bus;
+
+        if (g_str_equal (pspec->name, "playbin")) {
+        
+            g_object_get (plugin->player, "playbin", &playbin, NULL);
+            bus = gst_element_get_bus (playbin);
+            //gst_bus_add_watch (bus, (GstBusFunc) spectrum_message_handler, plugin);
+            gst_bus_add_watch_full (bus, G_PRIORITY_HIGH, (GstBusFunc) spectrum_message_handler, plugin, NULL);
+            gst_object_unref (bus);
+
+            g_print ("playbin : %p - bus: %s\n", playbin, GST_OBJECT_NAME (bus));
+        }
+}
+
+
+
+static void
+impl_activate (RBPlugin *rbplugin,
+               RBShell *shell)
+{
+    RBSpectrumPlugin *plugin = RB_SPECTRUM_PLUGIN (rbplugin);
+    GtkUIManager *uimanager;
+    RBPlayer *player;
+
+
+    /* check the player backend supports the filter interface */
+    g_object_get (G_OBJECT (rb_shell_get_player (shell)), "player", &player, NULL);
+    if (RB_IS_PLAYER_GST_FILTER (player) == FALSE) {
+	    g_warning ("player backend doesn't support the filter interface");
+	    return;
+    }
+
+    plugin->nb_bands = 64;
+
+    /* create spectrum analyzer filter element */
+    plugin->filter = gst_element_factory_make ("spectrum", "spectrum");
+    g_object_set (G_OBJECT (plugin->filter),
+                   "bands", plugin->nb_bands,
+                   "threshold", -75,
+                   "interval", g_sampling_rates[1]*GST_MSECOND,
+                   "message", TRUE, NULL);
+
+    if (plugin->filter == NULL) {
+        rb_error_dialog (NULL, _("Spectrum Plugin"), "The spectrum analyzer needs the gstreamer element 'spectrum'");
+        return;
+    }
+
+    /* create spectrum widget */
+    plugin->spectrum = rb_spectrum_new (plugin->nb_bands);
+    rb_spectrum_load_themes (RB_SPECTRUM (plugin->spectrum),
+                             rb_plugin_find_file (rbplugin, themes_file));
+    /* XXX: will be removed */
+    rb_spectrum_set_theme (RB_SPECTRUM (plugin->spectrum), "Fire");
+
+
+    /* insert into pipeline */
+    g_object_get (G_OBJECT (rb_shell_get_player (shell)), "player", &plugin->player, NULL);
+    rb_player_gst_filter_add_filter (RB_PLAYER_GST_FILTER (player), plugin->filter);
+   
+    /*
+    g_signal_connect (G_OBJECT (rb_shell_get_player (shell)), "playing-changed",
+                      G_CALLBACK (on_player_playing_changed), plugin);
+*/
+    g_signal_connect (G_OBJECT (plugin->player), "notify",
+                      G_CALLBACK (on_playbin_notify), plugin);
+                      
+
+    /* add a toolbar item for showing the spectrum */
+    uimanager = GTK_UI_MANAGER (rb_shell_get_ui_manager (shell));
+
+    plugin->action_group = gtk_action_group_new ("SpectrumActions");
+    gtk_action_group_add_toggle_actions (plugin->action_group,
+	    				 rb_spectrum_plugin_actions,
+					 G_N_ELEMENTS (rb_spectrum_plugin_actions),
+					 plugin);
+
+    gtk_ui_manager_insert_action_group (uimanager, plugin->action_group, 0);
+
+    plugin->ui_merge_id =  gtk_ui_manager_new_merge_id (uimanager);
+
+    gtk_ui_manager_add_ui (uimanager,
+                           plugin->ui_merge_id,
+                           toolbar_ui_path,
+                           "SpectrumDisplayWidgetItem",
+                           "SpectrumDisplayWidget",
+                           GTK_UI_MANAGER_AUTO,
+                           FALSE);
+
+    g_object_get (shell, "window", &plugin->main_window, NULL);
+}
+
+
+static void
+impl_deactivate    (RBPlugin *plugin,
+                    RBShell *shell)
+{
+}
+
+
+/*************************
+ *
+ * Preferences dialog
+ *
+ *************************/
+
+static void
+preferences_response_cb (GtkWidget *dialog, gint response, RBSpectrumPlugin *plugin)
+{
+        rb_spectrum_save_themes (RB_SPECTRUM (plugin->spectrum));
+        gtk_widget_hide (dialog);
+}
+
+
+static void
+on_nb_bands_spin_value_changed (GtkSpinButton *spin, RBSpectrumPlugin *plugin)
+{
+        gint nb_bands = gtk_spin_button_get_value_as_int (spin);
+    
+        g_print ("nb_bands = %d\n", nb_bands);
+
+        g_object_set (G_OBJECT (plugin->filter),
+                      "bands", (guint)nb_bands,
+                      "message", FALSE, NULL);
+        rb_spectrum_set_nb_bands (RB_SPECTRUM (plugin->spectrum), nb_bands);
+        plugin->nb_bands = nb_bands;
+        g_object_set (G_OBJECT (plugin->filter),
+                      "message", TRUE, NULL);
+}
+
+
+static void
+on_sampling_rate_combo_changed (GtkComboBox *combo, RBSpectrumPlugin *plugin)
+{
+        gint sampling;
+        gint interval;
+
+        sampling = gtk_combo_box_get_active (combo);
+        interval = g_sampling_rates[sampling] * GST_MSECOND;
+     
+        g_object_set (G_OBJECT (plugin->filter),
+                      "interval", interval, NULL);
+}
+
+
+static GtkWidget *
+make_config_widget (RBSpectrumPlugin *plugin)
+{
+        gchar *prefs_gladefile;
+        gchar *editor_gladefile;
+        GtkWidget *prefs_notebook;
+        GtkWidget *editor;
+        GtkWidget *theme_combo_placeholder;
+
+        prefs_gladefile = rb_plugin_find_file (RB_PLUGIN (plugin), "spectrum-prefs.glade");
+        if (prefs_gladefile == NULL) {
+            prefs_gladefile = g_strdup (rb_file ("spectrum-prefs.glade"));
+            if (prefs_gladefile == NULL) {
+                return NULL;
+            }
+        }
+
+        editor_gladefile = rb_plugin_find_file (RB_PLUGIN (plugin), "rb-spectrum.glade");
+        if (editor_gladefile == NULL) {
+            editor_gladefile = g_strdup (rb_file ("rb-spectrum.glade"));
+            if (editor_gladefile == NULL) {
+                return NULL;
+            }
+        }
+        rb_spectrum_set_theme_editor_glade_file (RB_SPECTRUM (plugin->spectrum), editor_gladefile);
+
+        plugin->config_xml = glade_xml_new (prefs_gladefile, "spectrum_prefs_notebook", NULL);
+        g_free (prefs_gladefile);
+
+        prefs_notebook = glade_xml_get_widget (plugin->config_xml, "spectrum_prefs_notebook");
+        editor = rb_spectrum_get_theme_editor_UI (RB_SPECTRUM (plugin->spectrum));
+        gtk_notebook_append_page (GTK_NOTEBOOK (prefs_notebook),
+                                  editor,
+                                  gtk_label_new ("Color theme editor"));
+                                  
+        plugin->nb_bands_spin = glade_xml_get_widget (plugin->config_xml, "nb_bands_spin");
+        g_signal_connect (G_OBJECT (plugin->nb_bands_spin), "value-changed",
+                          G_CALLBACK (on_nb_bands_spin_value_changed), plugin);
+
+        theme_combo_placeholder = glade_xml_get_widget (plugin->config_xml,"theme_combo_placeholder");
+        gtk_container_add (GTK_CONTAINER (theme_combo_placeholder),
+                           rb_spectrum_get_current_theme_combo (RB_SPECTRUM (plugin->spectrum)));
+        
+        plugin->sampling_rate_combo = glade_xml_get_widget (plugin->config_xml, "sampling_rate_combo");
+        g_signal_connect (G_OBJECT (plugin->sampling_rate_combo), "changed",
+                          G_CALLBACK (on_sampling_rate_combo_changed), plugin);
+
+        return prefs_notebook;
+}
+
+
+static GtkWidget *
+impl_create_configure_dialog (RBPlugin *rbplugin)
+{
+        RBSpectrumPlugin *plugin = RB_SPECTRUM_PLUGIN (rbplugin);
+
+        if (plugin->preferences == NULL) {
+            GtkWidget *widget;
+
+            widget = make_config_widget (plugin);
+
+            plugin->preferences = gtk_dialog_new_with_buttons ("Spectrum Preferences",
+                                                               NULL,
+                                                               GTK_DIALOG_DESTROY_WITH_PARENT,
+                                                               GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+                                                               NULL);
+            g_signal_connect (G_OBJECT (plugin->preferences), "response",
+                              G_CALLBACK (preferences_response_cb), plugin);
+            g_signal_connect_swapped (G_OBJECT (plugin->preferences), "delete-event",
+                                      G_CALLBACK (gtk_widget_hide), plugin->preferences);
+
+            gtk_widget_hide_on_delete (plugin->preferences);
+
+            gtk_container_add (GTK_CONTAINER (GTK_DIALOG (plugin->preferences)->vbox), widget);
+        } else {
+               /* update_config_widget (plugin); */
+        }
+
+        gtk_widget_show_all (plugin->preferences);
+        return plugin->preferences;
+}
Index: plugins/spectrum/spectrum-themes.ini
===================================================================
--- plugins/spectrum/spectrum-themes.ini	(révision 0)
+++ plugins/spectrum/spectrum-themes.ini	(révision 0)
@@ -0,0 +1,48 @@
+
+[Fire]
+bg_color=0;0;0;
+hl_color=0.41129167620355533;0.41129167620355533;0.41129167620355533;
+hl_position=0.23999999999999999
+hl_size=1
+frame_color=0.38709086747539484;0.38709086747539484;0.38709086747539484;
+hi_color=1.0; 1.0; 0.0
+lo_color=1.0; 0.0; 0.0
+show_caps=true
+cap_color=0.27209887846189057;0.27209887846189057;0.59259937438010224;
+decay_speed=2
+
+[lowToon]
+bg_color=0.99607843137254903;1;0.90980392156862744;
+hl_color=0.83921568627450982;0.85882352941176465;0.74901960784313726;
+hl_position=1
+hl_size=0.80000000000000004
+frame_color=0.45098039215686275;0.45490196078431372;0.40392156862745099;
+hi_color=0.67450980392156867;0.69019607843137254;0.59607843137254901;
+lo_color=0.45098039215686275;0.45490196078431372;0.40392156862745099;
+show_caps=false
+cap_color=0.67450980392156867;0.69019607843137254;0.59607843137254901;
+decay_speed=0
+
+[Studio]
+bg_color=0.68548104066529336;0.68548104066529336;0.68548104066529336;
+hl_color=0.86289768825818269;0.86289768825818269;0.86289768825818269;
+hl_position=0.5
+hl_size=0.29999999999999999
+frame_color=0.50000762951094835;0.50000762951094835;0.50000762951094835;
+hi_color=0;1;0.064637216754406049;
+lo_color=1;0;0;
+show_caps=true
+cap_color=0.0034943160143434807;0.4959945067521172;0;
+decay_speed=2
+
+[Studio-sans-cap]
+bg_color=0;0;0;
+hl_color=0;0.15605401693751431;0.0021820401312275884;
+hl_position=0.29999999999999999
+hl_size=0.59999999999999998
+frame_color=0.49999237048905165;0.49999237048905165;0.49999237048905165;
+hi_color=0;1;0.064637216754406049;
+lo_color=1;0;0;
+show_caps=false
+cap_color=0.0034943160143434807;0.4959945067521172;0;
+decay_speed=1
Index: plugins/spectrum/rb-spectrum.glade
===================================================================
--- plugins/spectrum/rb-spectrum.glade	(révision 0)
+++ plugins/spectrum/rb-spectrum.glade	(révision 0)
@@ -0,0 +1,1014 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="window1">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">window1</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="editor_vbox">
+      <property name="border_width">10</property>
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkAlignment" id="alignment40">
+	  <property name="visible">True</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xscale">0</property>
+	  <property name="yscale">1</property>
+	  <property name="top_padding">5</property>
+	  <property name="bottom_padding">5</property>
+	  <property name="left_padding">0</property>
+	  <property name="right_padding">0</property>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox2">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">15</property>
+
+	      <child>
+		<widget class="GtkComboBox" id="themes_combo">
+		  <property name="visible">True</property>
+		  <property name="add_tearoffs">False</property>
+		  <property name="focus_on_click">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="delete_theme_button">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label">gtk-delete</property>
+		  <property name="use_stock">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="new_theme_button">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label">gtk-new</property>
+		  <property name="use_stock">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkCheckButton" id="see_changes_check">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">See changes in spectrum window</property>
+	  <property name="use_underline">True</property>
+	  <property name="relief">GTK_RELIEF_NORMAL</property>
+	  <property name="focus_on_click">True</property>
+	  <property name="active">False</property>
+	  <property name="inconsistent">False</property>
+	  <property name="draw_indicator">True</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkAlignment" id="alignment98">
+	  <property name="visible">True</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xscale">1</property>
+	  <property name="yscale">1</property>
+	  <property name="top_padding">10</property>
+	  <property name="bottom_padding">5</property>
+	  <property name="left_padding">0</property>
+	  <property name="right_padding">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label73">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Background&lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkAlignment" id="alignment99">
+	  <property name="visible">True</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xscale">1</property>
+	  <property name="yscale">1</property>
+	  <property name="top_padding">0</property>
+	  <property name="bottom_padding">0</property>
+	  <property name="left_padding">20</property>
+	  <property name="right_padding">0</property>
+
+	  <child>
+	    <widget class="GtkTable" id="table16">
+	      <property name="visible">True</property>
+	      <property name="n_rows">4</property>
+	      <property name="n_columns">2</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">3</property>
+	      <property name="column_spacing">15</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label74">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Color :</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment103">
+		  <property name="visible">True</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkColorButton" id="hl_color_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="use_alpha">False</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment104">
+		  <property name="visible">True</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkColorButton" id="bg_color_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="use_alpha">False</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label1">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Highlight Color :</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label76">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Highlight Position :</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label77">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Highlight Size :</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHScale" id="hl_position_scale">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="draw_value">True</property>
+		  <property name="value_pos">GTK_POS_LEFT</property>
+		  <property name="digits">2</property>
+		  <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+		  <property name="inverted">False</property>
+		  <property name="adjustment">0.5 0 1 0.00999999977648 0.10000000149 0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="y_padding">3</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHScale" id="hl_size_scale">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="draw_value">True</property>
+		  <property name="value_pos">GTK_POS_LEFT</property>
+		  <property name="digits">2</property>
+		  <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+		  <property name="inverted">False</property>
+		  <property name="adjustment">0 0 1 0.00999999977648 0.10000000149 0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkAlignment" id="alignment105">
+	  <property name="visible">True</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xscale">1</property>
+	  <property name="yscale">1</property>
+	  <property name="top_padding">10</property>
+	  <property name="bottom_padding">5</property>
+	  <property name="left_padding">0</property>
+	  <property name="right_padding">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label78">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Frame&lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkAlignment" id="alignment106">
+	  <property name="visible">True</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xscale">1</property>
+	  <property name="yscale">1</property>
+	  <property name="top_padding">0</property>
+	  <property name="bottom_padding">0</property>
+	  <property name="left_padding">20</property>
+	  <property name="right_padding">0</property>
+
+	  <child>
+	    <widget class="GtkTable" id="table17">
+	      <property name="visible">True</property>
+	      <property name="n_rows">1</property>
+	      <property name="n_columns">2</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">2</property>
+	      <property name="column_spacing">15</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label79">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Color :</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment107">
+		  <property name="visible">True</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkColorButton" id="frame_color_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="use_alpha">False</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkAlignment" id="alignment108">
+	  <property name="visible">True</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xscale">1</property>
+	  <property name="yscale">1</property>
+	  <property name="top_padding">10</property>
+	  <property name="bottom_padding">5</property>
+	  <property name="left_padding">0</property>
+	  <property name="right_padding">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label80">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Bars&lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkAlignment" id="alignment109">
+	  <property name="visible">True</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xscale">1</property>
+	  <property name="yscale">1</property>
+	  <property name="top_padding">0</property>
+	  <property name="bottom_padding">0</property>
+	  <property name="left_padding">20</property>
+	  <property name="right_padding">0</property>
+
+	  <child>
+	    <widget class="GtkTable" id="table18">
+	      <property name="visible">True</property>
+	      <property name="n_rows">5</property>
+	      <property name="n_columns">2</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">3</property>
+	      <property name="column_spacing">20</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label81">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">High color :</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment110">
+		  <property name="visible">True</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkColorButton" id="hi_color_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="use_alpha">False</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment111">
+		  <property name="visible">True</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkColorButton" id="lo_color_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="use_alpha">False</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label82">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Low color :</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="show_caps_check">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Show bar caps</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">True</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment112">
+		  <property name="visible">True</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkColorButton" id="cap_color_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="use_alpha">False</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment113">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">1</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">25</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label83">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Color :</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment114">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">1</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">25</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label84">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Decay speed :</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkComboBox" id="decay_speed_combo">
+		  <property name="visible">True</property>
+		  <property name="items" translatable="yes">Slow
+Normal
+Fast</property>
+		  <property name="add_tearoffs">False</property>
+		  <property name="focus_on_click">True</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="window2">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">window2</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="new_theme_inner_dialog">
+      <property name="border_width">5</property>
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkHBox" id="hbox4">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label86">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Name :</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="theme_name_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">5</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">5</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="error_message">
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkImage" id="image1">
+	      <property name="stock">gtk-dialog-error</property>
+	      <property name="icon_size">4</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">3</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label85">
+	      <property name="label" translatable="yes">An existing theme already has this name.
+Enter a different name or delete the existing theme.</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
Index: plugins/spectrum/spectrum-prefs.glade
===================================================================
--- plugins/spectrum/spectrum-prefs.glade	(révision 0)
+++ plugins/spectrum/spectrum-prefs.glade	(révision 0)
@@ -0,0 +1,381 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="window1">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">window1</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkNotebook" id="spectrum_prefs_notebook">
+      <property name="visible">True</property>
+      <property name="can_focus">True</property>
+      <property name="show_tabs">True</property>
+      <property name="show_border">True</property>
+      <property name="tab_pos">GTK_POS_TOP</property>
+      <property name="scrollable">False</property>
+      <property name="enable_popup">False</property>
+
+      <child>
+	<widget class="GtkVBox" id="general_page_vbox">
+	  <property name="border_width">10</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment15">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">10</property>
+	      <property name="bottom_padding">5</property>
+	      <property name="left_padding">0</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label19">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;b&gt;Signal Analysis&lt;/b&gt;</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">10</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment12">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">30</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table7">
+		  <property name="visible">True</property>
+		  <property name="n_rows">4</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">2</property>
+		  <property name="column_spacing">15</property>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment25">
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">25</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label40">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Arrangement :</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkComboBox" id="combobox12">
+		      <property name="items" translatable="yes">Horizontal
+Hoziontal mirror
+Vertical
+Vertical mirror</property>
+		      <property name="add_tearoffs">False</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="checkbutton8">
+		      <property name="visible">True</property>
+		      <property name="sensitive">False</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Split channels</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label39">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Sampling rate :</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkComboBox" id="sampling_rate_combo">
+		      <property name="visible">True</property>
+		      <property name="items" translatable="yes">Slow
+Normal
+Fast
+Very Fast</property>
+		      <property name="add_tearoffs">False</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label32">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Number of bars:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="nb_bands_spin">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">50 1 128 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment18">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">10</property>
+	      <property name="bottom_padding">5</property>
+	      <property name="left_padding">0</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label23">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;b&gt;Color Theme&lt;/b&gt;</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">10</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkAlignment" id="theme_combo_placeholder">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">0</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">0</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<placeholder/>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="tab_expand">False</property>
+	  <property name="tab_fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label21">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">General</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	</widget>
+	<packing>
+	  <property name="type">tab</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
Index: plugins/spectrum/Makefile.am
===================================================================
--- plugins/spectrum/Makefile.am	(révision 0)
+++ plugins/spectrum/Makefile.am	(révision 0)
@@ -0,0 +1,51 @@
+NULL =
+
+plugindir = $(PLUGINDIR)/spectrum
+plugin_LTLIBRARIES = libspectrum.la
+
+libspectrum_la_SOURCES = \
+	rb-spectrum-plugin.c \
+	rb-spectrum.c
+
+libspectrum_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
+
+INCLUDES = 						\
+        -DGNOMELOCALEDIR=\""$(datadir)/locale"\"        \
+	-DG_LOG_DOMAIN=\"Rhythmbox\"		 	\
+	-I$(top_srcdir) 				\
+	-I$(top_srcdir)/lib                        	\
+	-I$(top_srcdir)/metadata                       	\
+	-I$(top_srcdir)/backends			\
+	-I$(top_srcdir)/rhythmdb                       	\
+	-I$(top_srcdir)/widgets                    	\
+	-I$(top_srcdir)/sources                    	\
+	-I$(top_srcdir)/iradio                    	\
+	-I$(top_srcdir)/podcast                    	\
+	-I$(top_srcdir)/plugins				\
+	-I$(top_srcdir)/shell				\
+	-DPIXMAP_DIR=\""$(datadir)/pixmaps"\"		\
+	-DSHARE_DIR=\"$(pkgdatadir)\"                   \
+	-DDATADIR=\""$(datadir)"\"			\
+	$(RHYTHMBOX_CFLAGS)				\
+	$(WARN_CFLAGS)					\
+	-D_XOPEN_SOURCE -D_BSD_SOURCE
+
+gladedir = $(plugindir)
+glade_DATA =
+
+plugin_in_files = spectrum.rb-plugin.desktop.in
+
+%.rb-plugin: %.rb-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+BUILT_SOURCES =							\
+	$(plugin_in_files:.rb-plugin.desktop.in=.rb-plugin) 	\
+	$(NULL)
+
+plugin_DATA = 			\
+	$(BUILT_SOURCES)	\
+	$(NULL)
+
+EXTRA_DIST = $(glade_DATA) $(plugin_in_files)
+
+CLEANFILES = $(plugin_DATA)
+DISTCLEANFILES = $(plugin_DATA)
Index: plugins/spectrum/spectrum.rb-plugin
===================================================================
--- plugins/spectrum/spectrum.rb-plugin	(révision 0)
+++ plugins/spectrum/spectrum.rb-plugin	(révision 0)
@@ -0,0 +1,9 @@
+[RB Plugin]
+Module=spectrum
+IAge=1
+Name=Spectrum Analyzer
+Description=Adds a spectrum analyzer
+Icon=
+Authors=Christophe Dehais <christophe.dehais@gmail.com>
+Copyright=Copyright © 2007 Christophe Dehais
+Website=http://www.rhythmbox.org/
Index: plugins/spectrum/spectrum.rb-plugin.desktop.in
===================================================================
--- plugins/spectrum/spectrum.rb-plugin.desktop.in	(révision 0)
+++ plugins/spectrum/spectrum.rb-plugin.desktop.in	(révision 0)
@@ -0,0 +1,9 @@
+[RB Plugin]
+Module=spectrum
+IAge=1
+_Name=Spectrum Analyzer
+_Description=Adds a spectrum analyzer
+Icon=
+Authors=Christophe Dehais <christophe.dehais@gmail.com>
+Copyright=Copyright © 2007 Christophe Dehais
+Website=http://www.rhythmbox.org/
