Index: configure.ac
===================================================================
--- configure.ac	(revision 5878)
+++ configure.ac	(working copy)
@@ -242,6 +242,9 @@
 	gstreamer-base-0.10 >= $GST_0_10_REQS
 	gstreamer-plugins-base-0.10 >= $GST_0_10_REQS)
 
+AC_SUBST(GSTREAMER_0_10_CFLAGS)
+AC_SUBST(GSTREAMER_0_10_LIBS)
+
 RHYTHMBOX_CFLAGS="$RHYTHMBOX_CFLAGS $GSTREAMER_0_10_CFLAGS"
 RHYTHMBOX_LIBS="$RHYTHMBOX_LIBS $GSTREAMER_0_10_LIBS"
 
@@ -939,6 +942,7 @@
 plugins/rb/Makefile
 plugins/power-manager/Makefile
 plugins/visualizer/Makefile
+plugins/equalizer/Makefile
 plugins/mmkeys/Makefile
 bindings/Makefile
 bindings/python/Makefile
Index: data/rhythmbox.schemas
===================================================================
--- data/rhythmbox.schemas	(revision 5878)
+++ data/rhythmbox.schemas	(working copy)
@@ -1467,5 +1467,139 @@
 	<long>True if the FM radio plugin is hidden.</long>
 	</locale>
       </schema>
+      
+      <!--Equalizer Plugin-->
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/equalizer/active</key>
+        <applyto>/apps/rhythmbox/plugins/equalizer/active</applyto>
+        <owner>rhythmbox</owner>
+        <type>bool</type>
+        <default>FALSE</default>
+        <locale name="C">
+          <short>True if the Equalizer plugin is enabled</short>
+          <long>True if the Equalizer plugin is enabled.</long>
+        </locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/equalizer/band0</key>
+        <applyto>/apps/rhythmbox/plugins/equalizer/band0</applyto>
+        <owner>rhythmbox</owner>
+        <type>float</type>
+        <default>0.0</default>
+        <locale name="C">
+          <short>Value for the band0.</short>
+          <long>Value for the band0.</long>
+        </locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/equalizer/band1</key>
+        <applyto>/apps/rhythmbox/plugins/equalizer/band1</applyto>
+        <owner>rhythmbox</owner>
+        <type>float</type>
+        <default>0.0</default>
+        <locale name="C">
+          <short>Value for the band1.</short>
+          <long>Value for the band1.</long>
+        </locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/equalizer/band2</key>
+        <applyto>/apps/rhythmbox/plugins/equalizer/band2</applyto>
+        <owner>rhythmbox</owner>
+        <type>float</type>
+        <default>0.0</default>
+        <locale name="C">
+          <short>Value for the band2.</short>
+          <long>Value for the band2.</long>
+        </locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/equalizer/band3</key>
+        <applyto>/apps/rhythmbox/plugins/equalizer/band3</applyto>
+        <owner>rhythmbox</owner>
+        <type>float</type>
+        <default>0.0</default>
+        <locale name="C">
+          <short>Value for the band3.</short>
+          <long>Value for the band3.</long>
+        </locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/equalizer/band4</key>
+        <applyto>/apps/rhythmbox/plugins/equalizer/band4</applyto>
+        <owner>rhythmbox</owner>
+        <type>float</type>
+        <default>0.0</default>
+        <locale name="C">
+          <short>Value for the band4.</short>
+          <long>Value for the band4.</long>
+        </locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/equalizer/band5</key>
+        <applyto>/apps/rhythmbox/plugins/equalizer/band5</applyto>
+        <owner>rhythmbox</owner>
+        <type>float</type>
+        <default>0.0</default>
+        <locale name="C">
+          <short>Value for the band5.</short>
+          <long>Value for the band5.</long>
+        </locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/equalizer/band6</key>
+        <applyto>/apps/rhythmbox/plugins/equalizer/band6</applyto>
+        <owner>rhythmbox</owner>
+        <type>float</type>
+        <default>0.0</default>
+        <locale name="C">
+          <short>Value for the band6.</short>
+          <long>Value for the band6.</long>
+        </locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/equalizer/band7</key>
+        <applyto>/apps/rhythmbox/plugins/equalizer/band7</applyto>
+        <owner>rhythmbox</owner>
+        <type>float</type>
+        <default>0.0</default>
+        <locale name="C">
+          <short>Value for the band7.</short>
+          <long>Value for the band7.</long>
+        </locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/equalizer/band8</key>
+        <applyto>/apps/rhythmbox/plugins/equalizer/band8</applyto>
+        <owner>rhythmbox</owner>
+        <type>float</type>
+        <default>0.0</default>
+        <locale name="C">
+          <short>Value for the band8.</short>
+          <long>Value for the band8.</long>
+        </locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/equalizer/band9</key>
+        <applyto>/apps/rhythmbox/plugins/equalizer/band9</applyto>
+        <owner>rhythmbox</owner>
+        <type>float</type>
+        <default>0.0</default>
+        <locale name="C">
+          <short>Value for the band9.</short>
+          <long>Value for the band9.</long>
+        </locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/plugins/equalizer/preset</key>
+        <applyto>/apps/rhythmbox/plugins/equalizer/preset</applyto>
+        <owner>rhythmbox</owner>
+        <type>string</type>
+        <default>default</default>
+        <locale name="C">
+          <short>Name of preset used</short>
+          <long>Name of preset used.</long>
+        </locale>
+      </schema>
     </schemalist>
 </gconfschemafile>
Index: po/POTFILES.in
===================================================================
--- po/POTFILES.in	(revision 5878)
+++ po/POTFILES.in	(working copy)
@@ -119,6 +119,9 @@
 plugins/visualizer/rb-visualizer-plugin.c
 plugins/visualizer/visualizer-controls.glade
 [type: gettext/ini]plugins/visualizer/visualizer.rb-plugin.in
+[type: gettext/ini]plugins/equalizer/equalizer.rb-plugin.in
+[type: gettext/ini]plugins/equalizer/presets.ini.in
+plugins/equalizer/rhythmbox_equalizer.c
 podcast/rb-feed-podcast-properties-dialog.c
 podcast/rb-podcast-manager.c
 podcast/rb-podcast-parse.c
Index: plugins/equalizer/preset_item.c
===================================================================
--- plugins/equalizer/preset_item.c	(revision 0)
+++ plugins/equalizer/preset_item.c	(revision 0)
@@ -0,0 +1,196 @@
+/**
+ * Copyright (C) 2008 Wilson Pinto Júnior
+ *
+ * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include "preset_item.h"
+
+enum
+{
+  ARG_BAND0 = 1,
+  ARG_BAND1,
+  ARG_BAND2,
+  ARG_BAND3,
+  ARG_BAND4,
+  ARG_BAND5,
+  ARG_BAND6,
+  ARG_BAND7,
+  ARG_BAND8,
+  ARG_BAND9,
+};
+
+G_DEFINE_TYPE (PresetItem, preset_item, G_TYPE_OBJECT);
+
+static void
+preset_item_set_property (GObject * object, guint prop_id,
+                          const GValue * value, GParamSpec * pspec);
+
+static void
+preset_item_get_property (GObject * object, guint prop_id,
+                          GValue * value, GParamSpec * pspec);
+
+static void
+preset_item_class_init (PresetItemClass *klass)
+{
+  GObjectClass *gobject_class;
+  gobject_class = (GObjectClass *) klass;
+
+  gobject_class->set_property = preset_item_set_property;
+  gobject_class->get_property = preset_item_get_property;
+
+  g_object_class_install_property (gobject_class, ARG_BAND0,
+      g_param_spec_double ("band0", "20 Hz",
+          "gain for the frequency band 20 Hz, ranging from -24.0 to +12.0",
+          -24.0, 12.0, 0.0, G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class, ARG_BAND1,
+      g_param_spec_double ("band1", "43 Hz",
+          "gain for the frequency band 43 Hz, ranging from -24.0 to +12.0",
+          -24.0, 12.0, 0.0, G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class, ARG_BAND2,
+      g_param_spec_double ("band2", "93 Hz",
+          "gain for the frequency band 93 Hz, ranging from -24.0 to +12.0",
+          -24.0, 12.0, 0.0, G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class, ARG_BAND3,
+      g_param_spec_double ("band3", "200 Hz",
+          "gain for the frequency band 200 Hz, ranging from -24.0 to +12.0",
+          -24.0, 12.0, 0.0, G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class, ARG_BAND4,
+      g_param_spec_double ("band4", "430 Hz",
+          "gain for the frequency band 430 Hz, ranging from -24.0 to +12.0",
+          -24.0, 12.0, 0.0, G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class, ARG_BAND5,
+      g_param_spec_double ("band5", "928 Hz",
+          "gain for the frequency band 928 Hz, ranging from -24.0 to +12.0",
+          -24.0, 12.0, 0.0, G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class, ARG_BAND6,
+      g_param_spec_double ("band6", "2000 Hz",
+          "gain for the frequency band 2000 Hz, ranging from -24.0 to +12.0",
+          -24.0, 12.0, 0.0, G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class, ARG_BAND7,
+      g_param_spec_double ("band7", "4308 Hz",
+          "gain for the frequency band 4308 Hz, ranging from -24.0 to +12.0",
+          -24.0, 12.0, 0.0, G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class, ARG_BAND8,
+      g_param_spec_double ("band8", "9283 Hz",
+          "gain for the frequency band 9283 Hz, ranging from -24.0 to +12.0",
+          -24.0, 12.0, 0.0, G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class, ARG_BAND9,
+      g_param_spec_double ("band9", "20 kHz",
+          "gain for the frequency band 20 kHz, ranging from -24.0 to +12.0",
+          -24.0, 12.0, 0.0, G_PARAM_READWRITE));
+}
+
+static void
+preset_item_init (PresetItem *self)
+{
+  self = PRESET_ITEM (self);
+}
+
+PresetItem *
+preset_item_new (void)
+{
+  PresetItem *obj;
+  obj = g_object_new (PRESET_ITEM_TYPE, NULL);
+  return obj;
+}
+
+static void
+preset_item_set_property (GObject * object, guint prop_id,
+                          const GValue * value, GParamSpec * pspec)
+{
+  PresetItem *self;
+  self = PRESET_ITEM (object);
+  
+  switch (prop_id) 
+    {
+    case ARG_BAND0: 
+      self->band0 = g_value_get_double (value);
+      break;
+    case ARG_BAND1: 
+      self->band1 = g_value_get_double (value);
+      break;
+    case ARG_BAND2: 
+      self->band2 = g_value_get_double (value);
+      break;
+    case ARG_BAND3: 
+      self->band3 = g_value_get_double (value);
+      break;
+    case ARG_BAND4: 
+      self->band4 = g_value_get_double (value);
+      break;
+    case ARG_BAND5: 
+      self->band5 = g_value_get_double (value);
+      break;
+    case ARG_BAND6: 
+      self->band6 = g_value_get_double (value);
+      break;
+    case ARG_BAND7: 
+      self->band7 = g_value_get_double (value);
+      break;
+    case ARG_BAND8: 
+      self->band8 = g_value_get_double (value);
+      break;
+    case ARG_BAND9: 
+      self->band9 = g_value_get_double (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+  
+static void
+preset_item_get_property (GObject * object, guint prop_id,
+                     GValue * value, GParamSpec * pspec)
+{
+  PresetItem *self;
+  self = PRESET_ITEM (object);
+  switch (prop_id)
+    {
+    case ARG_BAND0:
+      g_value_set_double (value, self->band0);
+      break;
+    case ARG_BAND1:
+      g_value_set_double (value, self->band1);
+      break;
+    case ARG_BAND2:
+      g_value_set_double (value, self->band2);
+      break;
+    case ARG_BAND3:
+      g_value_set_double (value, self->band3);
+      break;
+    case ARG_BAND4:
+      g_value_set_double (value, self->band4);
+      break;
+    case ARG_BAND5:
+      g_value_set_double (value, self->band5);
+      break;
+    case ARG_BAND6:
+      g_value_set_double (value, self->band6);
+      break;
+    case ARG_BAND7:
+      g_value_set_double (value, self->band7);
+      break;
+    case ARG_BAND8:
+      g_value_set_double (value, self->band8);
+      break;
+    case ARG_BAND9:
+      g_value_set_double (value, self->band9);
+      break;
+    default:
+      g_print ("o que fazer heim!\n");
+    }
+}
Index: plugins/equalizer/equalizer.rb-plugin.in
===================================================================
--- plugins/equalizer/equalizer.rb-plugin.in	(revision 0)
+++ plugins/equalizer/equalizer.rb-plugin.in	(revision 0)
@@ -0,0 +1,8 @@
+[RB Plugin]
+Module=equalizer
+IAge=1
+Name=Equalizer
+Description=Support for Equalization
+Authors=Wilson Pinto Júnior <n3rd3x@guake-terminal.org>
+Copyright=Copyright © 2008 Wilson Pinto Júnior
+Website=http://www.rhythmbox.org/
Index: plugins/equalizer/equalizer.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: plugins/equalizer/equalizer.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: plugins/equalizer/TODO
===================================================================
Index: plugins/equalizer/rhythmbox_equalizer.c
===================================================================
--- plugins/equalizer/rhythmbox_equalizer.c	(revision 0)
+++ plugins/equalizer/rhythmbox_equalizer.c	(revision 0)
@@ -0,0 +1,1179 @@
+/**
+ * Copyright (C) 2008 Wilson Pinto Júnior <n3rd3x@guake-terminal.org>
+ *
+ * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <gst/gst.h>
+#include "rhythmbox_equalizer.h"
+#include "preset_item.h"
+
+RB_PLUGIN_REGISTER (RhythmboxEqualizer, rhythmbox_equalizer);
+
+static void
+rhythmbox_equalizer_connect_signal (GtkBuilder *builder,
+                                    GObject *object,
+                                    const gchar    *signal_name,
+                                    const gchar    *handler_name,
+                                    GObject        *connect_object,
+                                    GConnectFlags   flags,
+                                    RhythmboxEqualizer *self);
+
+static void on_band0_value_changed (GtkRange *range, RhythmboxEqualizer *self);
+static void on_band1_value_changed (GtkRange *range, RhythmboxEqualizer *self);
+static void on_band2_value_changed (GtkRange *range, RhythmboxEqualizer *self);
+static void on_band3_value_changed (GtkRange *range, RhythmboxEqualizer *self);
+static void on_band4_value_changed (GtkRange *range, RhythmboxEqualizer *self);
+static void on_band5_value_changed (GtkRange *range, RhythmboxEqualizer *self);
+static void on_band6_value_changed (GtkRange *range, RhythmboxEqualizer *self);
+static void on_band7_value_changed (GtkRange *range, RhythmboxEqualizer *self);
+static void on_band8_value_changed (GtkRange *range, RhythmboxEqualizer *self);
+static void on_band9_value_changed (GtkRange *range, RhythmboxEqualizer *self);
+static void on_close_clicked       (GtkButton *button, RhythmboxEqualizer *self);
+static void on_delete_button_clicked (GtkButton *button, RhythmboxEqualizer *self);
+static void on_save_button_clicked (GtkButton *button, RhythmboxEqualizer *self);
+static void on_name_entry_changed (GtkEntry *entry, RhythmboxEqualizer *self);
+static void on_cancel_button_save_dialog_clicked (GtkButton *button, RhythmboxEqualizer *self);
+static void on_ok_button_save_dialog_clicked (GtkButton *button, RhythmboxEqualizer *self);
+static void rhythmbox_equalizer_save_configs (RhythmboxEqualizer *self);
+
+gboolean on_dialog_delete_event (GtkWidget          *widget,
+                                 GdkEvent           *event,
+                                 RhythmboxEqualizer *self);
+
+gboolean
+on_save_dialog_delete_event (GtkWidget          *widget,
+                             GdkEvent           *event,
+                             RhythmboxEqualizer *self);
+
+static void on_presets_combo_changed (GtkComboBox *combo, RhythmboxEqualizer *self);
+
+static gboolean combobox_separator_func (GtkTreeModel *model,
+                                         GtkTreeIter  *iter,
+                                         RhythmboxEqualizer *self);
+
+static void impl_activate (RBPlugin *plugin, RBShell *shell);
+static void impl_deactivate (RBPlugin *plugin, RBShell *shell);
+
+static void
+rb_equalizer_plugin_cmd_toggle (GtkAction *action, RhythmboxEqualizer *self);
+
+static void
+rhythmbox_equalizer_load_configs (RhythmboxEqualizer *self);
+
+static GtkToggleActionEntry rb_equalizer_plugin_toggle_actions [] =
+{
+  { "ToggleEqualizer", EQUALIZER_ICON_NAME, N_("_Equalizer"), NULL,
+    N_("Show or hide equalizer"),
+    G_CALLBACK (rb_equalizer_plugin_cmd_toggle) 
+  },
+};
+
+static void
+rhythmbox_equalizer_class_init (RhythmboxEqualizerClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  RBPluginClass *plugin_class = RB_PLUGIN_CLASS (klass);
+  
+  gobject_class->finalize = rhythmbox_equalizer_finalize;
+  plugin_class->activate = impl_activate;
+  plugin_class->deactivate = impl_deactivate;
+}
+
+static void
+rhythmbox_equalizer_init (RhythmboxEqualizer *self)
+{
+  self = RHYTHMBOX_EQUALIZER (self);
+  GError *error = NULL;
+  
+  self->gconfclient = gconf_client_get_default ();
+  self->builder = gtk_builder_new ();
+  gtk_builder_add_from_file (self->builder,
+                             PLUGINDIR "/equalizer.ui",
+                             &error);
+  
+  if (error!=NULL)
+    {
+      g_warning (error->message);
+      g_error_free (error);
+    }
+  
+  g_object_set_data_full ((GObject *) self,
+                          "builder",
+                          (gpointer) self->builder,
+                          (GDestroyNotify) g_object_unref);
+  
+  self->dialog = (GtkWidget *) gtk_builder_get_object (self->builder,
+                                                       "dialog");
+  
+  self->presets_combo = (GtkWidget *) gtk_builder_get_object (self->builder,
+                                                              "presets_combo");
+  
+  self->delete_button = (GtkWidget *) gtk_builder_get_object (self->builder,
+                                                              "delete_button");
+  
+  self->save_button = (GtkWidget *) gtk_builder_get_object (self->builder,
+                                                              "save_button");
+  
+  self->save_dialog = (GtkWidget *) gtk_builder_get_object (self->builder,
+                                                            "save_dialog");
+  
+  self->ok_button_save_dialog = (GtkWidget *) gtk_builder_get_object (self->builder,
+                                                            "ok_button_save_dialog");
+  
+  self->cancel_button_save_dialog = (GtkWidget *) gtk_builder_get_object (self->builder,
+                                                            "cancel_button_save_dialog");
+  
+  self->name_entry_save_dialog = (GtkWidget *) gtk_builder_get_object (self->builder,
+                                                            "name_entry_save_dialog");
+  
+  gtk_window_set_transient_for ((GtkWindow *) self->save_dialog,
+                                (GtkWindow *) self->dialog);
+  
+  gtk_combo_box_set_row_separator_func ((GtkComboBox *) self->presets_combo,
+                                        (GtkTreeViewRowSeparatorFunc) combobox_separator_func,
+                                        (gpointer) self,
+                                        NULL);
+  
+  self->presets_model = gtk_list_store_new (3,
+                                            G_TYPE_INT,
+                                            G_TYPE_STRING,
+                                            PRESET_ITEM_TYPE);
+  /*<Default Column>*/
+  GtkCellRenderer *rend;
+  rend = gtk_cell_renderer_text_new ();
+  gtk_cell_layout_pack_start ((GtkCellLayout *) self->presets_combo,
+                              rend, TRUE);
+  gtk_cell_layout_add_attribute ((GtkCellLayout *) self->presets_combo,
+                                 rend, "text", 1);
+
+  gtk_combo_box_set_model ((GtkComboBox *) self->presets_combo,
+                           (GtkTreeModel *) self->presets_model);
+
+  /*<Items>*/
+  gtk_list_store_append (self->presets_model,
+                         &self->default_iter);  
+  gtk_list_store_set (self->presets_model, &self->default_iter,
+                      0, -1, 1, N_("Default"), -1);
+  gtk_list_store_append (self->presets_model,
+                         &self->custom_iter);
+  gtk_list_store_set (self->presets_model, &self->custom_iter,
+                      0, 0, 1, N_("Custom"), -1);
+  
+  self->interface = gst_element_factory_make("equalizer-10bands",
+                                             "equalizer");
+
+  g_object_ref (self->interface);
+  
+  rhythmbox_equalizer_load_configs (self);
+
+  gtk_builder_connect_signals_full (self->builder,
+                                    (GtkBuilderConnectFunc) rhythmbox_equalizer_connect_signal,
+                                    self);
+  
+  self->interative = TRUE;
+}
+
+RhythmboxEqualizer *
+rhythmbox_equalizer_new (void)
+{
+  RhythmboxEqualizer *obj;
+  obj = g_object_new (RHYTHMBOX_EQUALIZER_TYPE, NULL);
+  return obj;
+}
+
+void
+rhythmbox_equalizer_show (RhythmboxEqualizer *self)
+{
+  gtk_widget_show (self->dialog);
+}
+
+void
+rhythmbox_equalizer_hide (RhythmboxEqualizer *self)
+{
+  gtk_widget_hide (self->dialog);
+}
+
+void
+rhythmbox_equalizer_finalize (GObject *object)
+{
+  g_print ("finalize plugin!\n");
+  RhythmboxEqualizer *self;
+  self = (RhythmboxEqualizer *) object;
+  gtk_widget_destroy (self->dialog);
+  g_object_unref (self->interface);
+  G_OBJECT_CLASS (rhythmbox_equalizer_parent_class)->finalize (object);
+}
+
+void *signals[][2] = {
+  {"on_band0_value_changed", on_band0_value_changed},
+  {"on_band1_value_changed", on_band1_value_changed},
+  {"on_band2_value_changed", on_band2_value_changed},
+  {"on_band3_value_changed", on_band3_value_changed},
+  {"on_band4_value_changed", on_band4_value_changed},
+  {"on_band5_value_changed", on_band5_value_changed},
+  {"on_band6_value_changed", on_band6_value_changed},
+  {"on_band7_value_changed", on_band7_value_changed},
+  {"on_band8_value_changed", on_band8_value_changed},
+  {"on_band9_value_changed", on_band9_value_changed},
+  {"on_dialog_delete_event", on_dialog_delete_event},
+  {"on_save_dialog_delete_event", on_save_dialog_delete_event},
+  {"on_close_clicked", on_close_clicked},
+  {"on_presets_combo_changed", on_presets_combo_changed},
+  {"on_delete_button_clicked", on_delete_button_clicked},
+  {"on_save_button_clicked", on_save_button_clicked},
+  {"on_name_entry_changed", on_name_entry_changed},
+  {"on_cancel_button_save_dialog_clicked", on_cancel_button_save_dialog_clicked},
+  {"on_ok_button_save_dialog_clicked", on_ok_button_save_dialog_clicked},
+  {NULL, NULL}
+};
+
+static void
+rhythmbox_equalizer_connect_signal (GtkBuilder *builder,
+                                    GObject *object,
+                                    const gchar    *signal_name,
+                                    const gchar    *handler_name,
+                                    GObject        *connect_object,
+                                    GConnectFlags   flags,
+                                    RhythmboxEqualizer *self)
+{
+  guint i;
+  for (i=0; signals[i][0]!=NULL; i++)
+      if (g_str_equal (signals[i][0], handler_name))
+        {        
+          g_signal_connect (object, signal_name,
+                            G_CALLBACK (signals[i][1]),
+                            (gpointer) self);
+          return;
+        }
+  
+  g_warning ("Cannot connect %s signal", handler_name);
+  
+}
+
+void
+rhythmbox_equalizer_set_band (RhythmboxEqualizer *self,
+                              gint                band,
+                              gdouble             double_value)
+{
+  self->interative = FALSE;
+  
+  GError *error=NULL;
+  gchar *preset;
+  preset = gconf_client_get_string ((GConfClient *) self->gconfclient,
+                                    "/apps/rhythmbox/plugins/equalizer/preset",
+                                    &error);
+  
+  if (error!=NULL)
+    {
+      g_warning (error->message);
+      g_error_free (error);
+    }
+  
+  if (!g_str_equal (preset, "custom"))
+    {
+      gtk_combo_box_set_active_iter ((GtkComboBox *) self->presets_combo,
+                                     &self->custom_iter);
+      
+      gtk_widget_set_sensitive ((GtkWidget *) self->save_button, TRUE);
+      gtk_widget_set_sensitive ((GtkWidget *) self->delete_button, FALSE);
+      
+      error = NULL;
+      gconf_client_set_string ((GConfClient *) self->gconfclient,
+                               "/apps/rhythmbox/plugins/equalizer/preset",
+                               "custom", &error);
+      
+      guint i;
+      for (i=0; i<10; i++)
+        {
+          if (i == band)
+            continue;
+          
+          gdouble dvalue;
+          
+          GtkWidget *band_widget;
+          band_widget = (GtkWidget *) gtk_builder_get_object (self->builder,
+                                                              g_strdup_printf (
+                                                              "band%d", i));
+          
+          dvalue = gtk_range_get_value ((GtkRange *) band_widget);
+          //g_print ("dvalue %g\n", dvalue);
+          error = NULL;          
+          gconf_client_set_float ((GConfClient *) self->gconfclient,
+                                  g_strdup_printf ("/apps/rhythmbox/plugins/equalizer/band%d",
+                                  i), dvalue,
+                                  &error);
+          
+          if (error)
+            {
+              g_warning (error->message);
+              g_error_free (error);
+            }
+          
+          g_object_set ((GObject *) self->interface,
+                        g_strdup_printf ("band%d", i),
+                        dvalue, NULL);
+          
+          
+        }
+    }
+  
+  if (!gconf_client_set_float ((GConfClient *) self->gconfclient,
+                               g_strdup_printf (
+                               "/apps/rhythmbox/plugins/equalizer/band%d",
+                               band),
+                               double_value, &error))
+  {
+    g_warning (error->message);
+    g_error_free (error);
+  }
+  
+  g_object_set ((GObject *) self->interface,
+                g_strdup_printf ("band%d", band),
+                double_value, NULL);
+  
+  self->interative = TRUE;
+}
+
+static void
+on_band0_value_changed (GtkRange *range, 
+                        RhythmboxEqualizer *self)
+{
+  if (self->interative)
+    rhythmbox_equalizer_set_band (self, 0,
+                                  gtk_range_get_value (range));
+}
+
+static void
+on_band1_value_changed (GtkRange *range, 
+                        RhythmboxEqualizer *self)
+{
+  if (self->interative)
+    rhythmbox_equalizer_set_band (self, 1,
+                                  gtk_range_get_value (range));
+}
+
+static void
+on_band2_value_changed (GtkRange *range, 
+                        RhythmboxEqualizer *self)
+{
+  if (self->interative)
+    rhythmbox_equalizer_set_band (self, 2,
+                                  gtk_range_get_value (range));
+}
+
+static void
+on_band3_value_changed (GtkRange *range, 
+                        RhythmboxEqualizer *self)
+{
+  if (self->interative)
+    rhythmbox_equalizer_set_band (self, 3,
+                                  gtk_range_get_value (range));
+}
+
+static void
+on_band4_value_changed (GtkRange *range, 
+                        RhythmboxEqualizer *self)
+{
+  if (self->interative)
+    rhythmbox_equalizer_set_band (self, 4,
+                                  gtk_range_get_value (range));
+}
+
+static void
+on_band5_value_changed (GtkRange *range, 
+                        RhythmboxEqualizer *self)
+{
+  if (self->interative)
+    rhythmbox_equalizer_set_band (self, 5,
+                                  gtk_range_get_value (range));
+}
+
+static void
+on_band6_value_changed (GtkRange *range, 
+                        RhythmboxEqualizer *self)
+{
+  if (self->interative)
+    rhythmbox_equalizer_set_band (self, 6,
+                                  gtk_range_get_value (range));
+}
+
+static void
+on_band7_value_changed (GtkRange *range, 
+                        RhythmboxEqualizer *self)
+{
+  if (self->interative)
+    rhythmbox_equalizer_set_band (self, 7,
+                                  gtk_range_get_value (range));
+}
+
+static void
+on_band8_value_changed (GtkRange *range, 
+                        RhythmboxEqualizer *self)
+{
+  if (self->interative)
+    rhythmbox_equalizer_set_band (self, 8,
+                                  gtk_range_get_value (range));
+}
+
+static void
+on_band9_value_changed (GtkRange *range, 
+                        RhythmboxEqualizer *self)
+{
+  if (self->interative)
+    rhythmbox_equalizer_set_band (self, 9,
+                                  gtk_range_get_value (range));
+}
+
+static void
+impl_activate (RBPlugin *plugin,
+               RBShell *shell)
+{
+  RhythmboxEqualizer *eplugin = (RhythmboxEqualizer *) plugin;
+  
+  eplugin->shell = shell;
+  
+  g_object_get (shell, "shell-player", &eplugin->shell_player, NULL);
+  if (eplugin->shell_player == NULL) {
+    rb_debug ("couldn't find shell player object..");
+    return;
+  }
+  
+  g_object_get (eplugin->shell_player, "player", &eplugin->player, NULL);
+  if (eplugin->player == NULL) {
+    rb_debug ("couldn't find player object..");
+    return;
+  }
+  rhythmbox_equalizer_set_active (eplugin, TRUE);
+  
+  /* create action group */
+  eplugin->action_group = gtk_action_group_new ("EqualizerActions");
+  gtk_action_group_set_translation_domain (eplugin->action_group, GETTEXT_PACKAGE);
+  gtk_action_group_add_toggle_actions (eplugin->action_group,
+                                       rb_equalizer_plugin_toggle_actions,
+                                       G_N_ELEMENTS (rb_equalizer_plugin_toggle_actions),
+                                       eplugin);
+
+  g_object_get (shell, "ui-manager", &eplugin->uim, NULL);
+  gtk_ui_manager_insert_action_group (eplugin->uim, eplugin->action_group, 0);
+  
+  gchar *ui_file = rb_plugin_find_file (plugin, "equalizer-ui.xml");
+  eplugin->merge_id = gtk_ui_manager_add_ui_from_file (eplugin->uim, ui_file, NULL);
+  g_free (ui_file);
+}
+
+static void
+impl_deactivate (RBPlugin *plugin,
+                 RBShell *shell)
+{
+  RhythmboxEqualizer *eplugin = (RhythmboxEqualizer *) plugin;
+  rhythmbox_equalizer_set_active (eplugin, FALSE);
+  
+  gtk_ui_manager_remove_ui (eplugin->uim, eplugin->merge_id);
+  eplugin->merge_id = 0;
+
+  if (eplugin->action_group != NULL) {
+    gtk_ui_manager_remove_action_group (eplugin->uim, eplugin->action_group);
+    g_object_unref (eplugin->action_group);
+    eplugin->action_group = NULL;
+  }
+  
+  rhythmbox_equalizer_hide (eplugin);
+}
+
+static void
+rb_equalizer_plugin_cmd_toggle (GtkAction *action, RhythmboxEqualizer *self)
+{
+  gboolean enabled;
+  enabled = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
+  
+  if (enabled)
+    rhythmbox_equalizer_show (self);
+  else
+    rhythmbox_equalizer_hide (self);
+}
+
+gboolean
+on_dialog_delete_event (GtkWidget          *widget,
+                        GdkEvent           *event,
+                        RhythmboxEqualizer *self)
+{
+  GtkAction *action;
+  action = gtk_action_group_get_action (self->action_group,
+                                        "ToggleEqualizer");
+  gtk_toggle_action_set_active ((GtkToggleAction *) action, FALSE);
+  return TRUE;
+}
+
+gboolean
+on_save_dialog_delete_event (GtkWidget          *widget,
+                             GdkEvent           *event,
+                             RhythmboxEqualizer *self)
+{
+  gtk_widget_hide (self->save_dialog);
+  return TRUE;
+}
+
+static void
+on_close_clicked (GtkButton *button, RhythmboxEqualizer *self)
+{
+  GtkAction *action;
+  action = gtk_action_group_get_action (self->action_group,
+                                        "ToggleEqualizer");
+  gtk_toggle_action_set_active ((GtkToggleAction *) action, FALSE);
+}
+
+static void
+rhythmbox_equalizer_load_configs (RhythmboxEqualizer *self)
+{
+  gboolean is_default;
+  gboolean is_custom;
+  gchar *selected_preset;
+  gsize lenght;
+  guint i, t;
+  gdouble value;
+  gchar **presets;
+  guint id = 1;
+  
+  GKeyFile *global_presets;
+  GError *error = NULL;
+  GtkWidget *band_widget;
+  GtkTreeIter iter;
+  PresetItem *preset, *selected_preset_item=NULL;
+  
+  error = NULL;
+  selected_preset = gconf_client_get_string ((GConfClient *) self->gconfclient,
+                                             "/apps/rhythmbox/plugins/equalizer/preset",
+                                             &error);
+  
+  if (error!=NULL)
+    {
+      g_warning (error->message);
+      g_error_free (error);
+      selected_preset = "default";
+    }
+  
+  is_default = g_str_equal (selected_preset, "default");
+  is_custom = g_str_equal (selected_preset, "custom");
+  
+  if (is_default)
+    {
+      gtk_combo_box_set_active_iter ((GtkComboBox *) self->presets_combo,
+                                    &self->default_iter);
+      
+      gtk_widget_set_sensitive ((GtkWidget *) self->save_button, FALSE);
+      gtk_widget_set_sensitive ((GtkWidget *) self->delete_button, FALSE);
+    }
+  else if (is_custom)
+    {
+      gtk_combo_box_set_active_iter ((GtkComboBox *) self->presets_combo,
+                                     &self->custom_iter);
+      
+      gtk_widget_set_sensitive ((GtkWidget *) self->save_button, TRUE);
+      gtk_widget_set_sensitive ((GtkWidget *) self->delete_button, FALSE);
+    }
+  
+  /* Global Presets */
+  global_presets = g_key_file_new ();
+  
+  if (!g_key_file_load_from_file (global_presets,
+                                  PLUGINDIR "/presets.ini",
+                                  0, &error))
+    {
+      g_warning (error->message);
+      g_error_free (error);
+    }
+  
+  presets = g_key_file_get_groups (global_presets, &lenght);
+  
+  if (lenght)
+    {
+      gtk_list_store_append (self->presets_model, &iter);
+      gtk_list_store_set (self->presets_model, &iter, 0, -2, -1);
+    }
+  
+  for (i=0; i<lenght; i++)
+    {
+      preset = preset_item_new ();
+      preset->group_name = presets[i];
+      
+      if (!g_key_file_has_key (global_presets,
+                               preset->group_name,
+                               "Name", NULL))
+        g_warning ("Name key not found");
+      
+      preset->name = g_key_file_get_locale_string (global_presets,
+                                                   preset->group_name,
+                                                   "Name", NULL, NULL);
+      preset->is_global = TRUE;
+      
+      /* Extract Values */
+      for (t=0; t<10; t++)
+        {
+          error = NULL;
+          value = g_key_file_get_double (global_presets,
+                                         preset->group_name,
+                                         g_strdup_printf ("Band%d", t),
+                                         &error);
+          if (error)
+            {
+              g_warning (error->message);
+              g_error_free (error);
+            }
+          
+          g_object_set (preset,
+                        g_strdup_printf ("band%d", t),
+                        value,
+                        NULL);
+        }
+      
+      gtk_list_store_append (self->presets_model, &iter);
+      gtk_list_store_set (self->presets_model, &iter,
+                          0, id,
+                          1, preset->name,
+                          2, preset,
+                          -1);
+      
+      if (g_str_equal (preset->group_name, selected_preset))
+        {
+          gtk_combo_box_set_active_iter ((GtkComboBox *) self->presets_combo,
+                                         &iter);
+          selected_preset_item = preset;
+        }
+    }
+  
+  g_key_file_free (global_presets);
+  
+  /* End Global presets */
+  
+  /* User Presets */
+  self->user_key_file = g_key_file_new ();
+  self->user_config_path = g_build_filename (rb_dot_dir (), "presets.ini", NULL);
+
+  if (g_file_test (self->user_config_path, G_FILE_TEST_EXISTS))
+    {
+      error = NULL;
+      g_key_file_load_from_file (self->user_key_file,
+                                 self->user_config_path, 
+                                 0, &error);
+      if (error)
+        {
+          g_warning (error->message);
+          g_error_free (error);
+        }
+    }
+  
+  presets = g_key_file_get_groups (self->user_key_file, &lenght);
+  
+  for (i=0; i<lenght; i++)
+    {
+      preset = preset_item_new ();
+      preset->group_name = presets[i];
+      
+      if (!g_key_file_has_key (self->user_key_file,
+                               preset->group_name,
+                               "Name", NULL))
+        g_warning ("%s: Name key is not found", preset->group_name);
+      
+      preset->name = g_key_file_get_locale_string (self->user_key_file,
+                                                   preset->group_name,
+                                                   "Name", NULL, NULL);
+      
+      preset->is_global = FALSE;
+      
+      /* Extract Values */
+      for (t=0; t<10; t++)
+        {
+          error = NULL;
+          value = g_key_file_get_double (self->user_key_file,
+                                         preset->group_name,
+                                         g_strdup_printf ("Band%d", t),
+                                         &error);
+          if (error)
+            {
+              g_warning (error->message);
+              g_error_free (error);
+              value = 0;
+            }
+          
+          g_object_set (preset,
+                        g_strdup_printf ("band%d", t),
+                        value,
+                        NULL);
+        }
+      
+      gtk_list_store_append (self->presets_model, &iter);
+      gtk_list_store_set (self->presets_model, &iter,
+                          0, id,
+                          1, preset->name,
+                          2, preset,
+                          -1);
+      
+      if (g_str_equal (preset->group_name, selected_preset))
+        {
+          gtk_combo_box_set_active_iter ((GtkComboBox *) self->presets_combo,
+                                         &iter);
+          selected_preset_item = preset;
+        }
+    }
+  
+  if (selected_preset_item)
+    {
+      gtk_widget_set_sensitive ((GtkWidget *) self->save_button, FALSE);
+      
+      if (selected_preset_item->is_global)
+        gtk_widget_set_sensitive ((GtkWidget *) self->delete_button, FALSE);
+      else
+        gtk_widget_set_sensitive ((GtkWidget *) self->delete_button, TRUE);
+    }
+  
+  /* End User Presets */
+  for (i=0; i<10; i++)
+  {
+    error = NULL;
+    if (is_default)
+      value = 0;
+    else if (is_custom)
+      value = gconf_client_get_float ((GConfClient *) self->gconfclient,
+                                      g_strdup_printf (
+                                      "/apps/rhythmbox/plugins/equalizer/band%d",
+                                      i), &error);
+    else if (selected_preset_item)
+      g_object_get (selected_preset_item,
+                    g_strdup_printf ("band%d", i),
+                    &value, NULL);
+    else
+      value = 0;
+    
+    if (error!=NULL)
+    {
+      g_warning (error->message);
+      g_error_free (error);
+      value = 0;
+    }
+    
+    g_object_set ((GObject *) self->interface,
+                   g_strdup_printf ("band%d", i),
+                   value,
+                   NULL);
+    
+    band_widget = (GtkWidget *) gtk_builder_get_object (self->builder,
+                                                        g_strdup_printf (
+                                                        "band%d", i));
+    gtk_range_set_value ((GtkRange *) band_widget, value);
+  }
+}
+
+void
+rhythmbox_equalizer_set_active (RhythmboxEqualizer *self,
+                                gboolean            state)
+{
+  gboolean *playing_state;
+  GError *error = NULL;
+  
+  g_object_get ((GObject *) self->shell_player,
+               "playing", &playing_state,
+               NULL);
+  
+  if ((playing_state)&&(state))
+  {
+      RBSource *source;
+      source = rb_shell_player_get_playing_source (self->shell_player);
+      
+      guint position;
+      if (!rb_shell_player_get_playing_time (self->shell_player,
+                                             &position, &error))
+      {
+        position = 0;
+      }
+      
+      g_print ("position: %d\n", position);
+      
+      rb_shell_player_stop ((RBShellPlayer *) self->shell_player);
+      
+      if (!rb_player_gst_filter_add_filter ((RBPlayerGstFilter *) self->player,
+                                            (GstElement *) self->interface))
+      {
+        g_warning ("Failed to add equalizer filter");
+      }
+      
+      rb_shell_player_set_selected_source (self->shell_player,
+                                           source);
+      
+      error = NULL;
+      rb_shell_player_play ((RBShellPlayer *) self->shell_player,
+                             &error);
+      
+      if (error!=NULL)
+      {
+          rb_error_dialog (NULL, _("Equalizer Plugin"), error->message);
+          g_error_free(error);
+      }
+      
+      rb_shell_player_seek ((RBShellPlayer *) self->shell_player,
+                            position);
+  }
+  else if ((!playing_state)&&(state))
+  {
+    if (!rb_player_gst_filter_add_filter ((RBPlayerGstFilter *) self->player,
+                                          (GstElement *) self->interface))
+      {
+        g_warning ("Failed to add equalizer filter");
+      };
+  }
+  else if ((playing_state)&&(!state))
+  {
+    rb_shell_player_stop ((RBShellPlayer *) self->shell_player);
+    
+    if (!rb_player_gst_filter_remove_filter ((RBPlayerGstFilter *) self->player,
+                                             (GstElement *) self->interface))
+    {
+      g_warning ("Failed to remove equalizer filter");
+    }
+      /*
+      error = NULL;
+      rb_shell_player_play ((RBShellPlayer *) eplugin->shell_player,
+                             &error);
+      
+      if (error!=NULL)
+      {
+          g_warning (error->message);
+          g_error_free(error);
+      }*/
+  }
+  else if ((!playing_state)&&(!state))
+  {
+    if (!rb_player_gst_filter_remove_filter ((RBPlayerGstFilter *) self->player,
+                                             (GstElement *) self->interface))
+      {
+        g_warning ("Failed to remove equalizer filter");
+      }
+  }
+}
+
+static void
+on_presets_combo_changed (GtkComboBox *combo,
+                          RhythmboxEqualizer *self)
+{
+  if (!self->interative)
+    return;
+  
+  self->interative = FALSE;
+  
+  GtkTreeIter iter;
+  gint id, i;
+  GError *error=NULL;
+  gdouble value = 0;
+  
+  gboolean is_default, is_custom;
+  
+  is_default = FALSE;
+  is_custom = FALSE;
+  
+  GtkWidget *band_widget;
+  PresetItem *item;
+  
+  if (!gtk_combo_box_get_active_iter ((GtkComboBox *) self->presets_combo,
+                                      &iter))
+  {
+    self->interative = TRUE;
+    return;
+  }
+  
+  gtk_tree_model_get ((GtkTreeModel *) self->presets_model,
+                      &iter, 0, &id, -1);
+  
+  if (id==-1) /*default*/
+    {
+      error = NULL;
+      gconf_client_set_string (self->gconfclient,
+                               "/apps/rhythmbox/plugins/equalizer/preset",
+                               "default",
+                               &error);
+      if (error!=NULL)
+        {
+          g_warning (error->message);
+          g_error_free (error);
+        }
+      
+      is_default = TRUE;
+      
+      gtk_widget_set_sensitive ((GtkWidget *) self->save_button, FALSE);
+      gtk_widget_set_sensitive ((GtkWidget *) self->delete_button, FALSE);
+    }
+  else if (id==0) /*custom*/
+    {
+      error = NULL;
+      gconf_client_set_string (self->gconfclient,
+                               "/apps/rhythmbox/plugins/equalizer/preset",
+                               "custom",
+                               &error);
+      if (error!=NULL)
+        {
+          g_warning (error->message);
+          g_error_free (error);
+        }
+      
+      is_custom = TRUE;
+      
+      gtk_widget_set_sensitive ((GtkWidget *) self->save_button, TRUE);
+      gtk_widget_set_sensitive ((GtkWidget *) self->delete_button, FALSE);
+    }
+  else
+    {
+      gtk_tree_model_get ((GtkTreeModel *) self->presets_model,
+                          &iter, 2, &item, -1);
+      error = NULL;
+      gconf_client_set_string (self->gconfclient,
+                               "/apps/rhythmbox/plugins/equalizer/preset",
+                               item->group_name,
+                               &error);
+      if (error)
+        {
+          g_warning (error->message);
+          g_error_free (error);
+        }
+      
+      gtk_widget_set_sensitive ((GtkWidget *) self->save_button, FALSE);
+      
+      if (item->is_global)
+        gtk_widget_set_sensitive ((GtkWidget *) self->delete_button, FALSE);
+      else
+        gtk_widget_set_sensitive ((GtkWidget *) self->delete_button, TRUE);
+    }
+
+  
+  for (i=0; i<10; i++)
+  {
+    error = NULL;
+    
+    if (is_default)
+      value = 0;
+    else if (is_custom)
+      value = gconf_client_get_float ((GConfClient *) self->gconfclient,
+                                       g_strdup_printf (
+                                       "/apps/rhythmbox/plugins/equalizer/band%d",
+                                       i), &error);
+    else
+      {
+        g_object_get (item,
+                      g_strdup_printf ("band%d", i),
+                      &value, NULL);
+      }
+
+    if (error!=NULL)
+    {
+      g_warning (error->message);
+      g_error_free (error);
+      value = 0;
+    }
+    
+    g_object_set ((GObject *) self->interface,
+                   g_strdup_printf ("band%d", i),
+                   value,
+                   NULL);
+    
+    band_widget = (GtkWidget *) gtk_builder_get_object (self->builder,
+                                                        g_strdup_printf (
+                                                        "band%d", i));
+    gtk_range_set_value ((GtkRange *) band_widget, value);
+  }
+
+  self->interative = TRUE;
+}
+
+static gboolean
+combobox_separator_func (GtkTreeModel *model,
+                         GtkTreeIter  *iter,
+                         RhythmboxEqualizer *self)
+{
+  gint id;
+  gtk_tree_model_get (model, iter, 0, &id, -1);
+  
+  if (id==-2)
+    return TRUE;
+
+  return FALSE;
+}
+
+static void
+on_delete_button_clicked (GtkButton *button, RhythmboxEqualizer *self)
+{
+  PresetItem *preset;
+  GtkTreeIter iter;
+  
+  if (!gtk_combo_box_get_active_iter ((GtkComboBox *) self->presets_combo,
+                                      &iter))
+    return;
+  
+  gtk_tree_model_get ((GtkTreeModel *) self->presets_model,
+                      &iter,
+                      2, &preset,
+                      -1);
+  
+  GtkWidget *dialog;
+  dialog = gtk_message_dialog_new ((GtkWindow *) self->dialog,
+                                   GTK_DIALOG_MODAL,
+                                   GTK_MESSAGE_QUESTION,
+                                   GTK_BUTTONS_NONE,
+                                   NULL);
+  
+  gtk_message_dialog_set_markup ((GtkMessageDialog *) dialog,
+                                 g_strdup_printf (N_("<big><b>Are you sure you want to permanently delete"
+                                                     " \"%s\"?</b></big>\n\n"
+                                                     "If you delete an item, it will be permanently lost."),
+                                                  preset->name));
+  
+  gtk_dialog_add_buttons ((GtkDialog *) dialog,
+                          GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                          GTK_STOCK_DELETE, GTK_RESPONSE_OK,
+                          NULL);
+
+  gint response = gtk_dialog_run ((GtkDialog *) dialog);
+  gtk_widget_destroy(dialog);
+  
+  if (response == GTK_RESPONSE_CANCEL)
+    return;
+  
+  GError *error = NULL;
+  g_key_file_remove_group (self->user_key_file,
+                           preset->group_name,
+                           &error);
+  
+  if (error)
+    {
+      g_warning (error->message);
+      g_error_free (error);
+    }
+  
+  rhythmbox_equalizer_save_configs (self);
+  
+  gtk_list_store_remove ((GtkListStore *) self->presets_model,
+                         &iter);
+  gtk_combo_box_set_active_iter ((GtkComboBox *) self->presets_combo,
+                                 &self->default_iter);
+  
+  g_object_unref ((GObject *) preset);
+}
+
+static void
+on_save_button_clicked (GtkButton *button, RhythmboxEqualizer *self)
+{
+  gtk_widget_show (self->save_dialog);
+}
+
+static void
+on_name_entry_changed (GtkEntry *entry, RhythmboxEqualizer *self)
+{
+  const gchar *name = gtk_entry_get_text (entry);
+  
+  if (name[0] == '\0')
+    gtk_widget_set_sensitive (self->ok_button_save_dialog, FALSE);
+  else
+    gtk_widget_set_sensitive (self->ok_button_save_dialog, TRUE);
+}
+
+static void
+on_cancel_button_save_dialog_clicked (GtkButton *button, 
+                                      RhythmboxEqualizer *self)
+{
+  gtk_widget_hide (self->save_dialog);
+  gtk_entry_set_text ((GtkEntry *) self->name_entry_save_dialog, "");
+}
+
+static void
+on_ok_button_save_dialog_clicked (GtkButton *button, 
+                                  RhythmboxEqualizer *self)
+{
+  const gchar *name, *lower_name;
+  name = gtk_entry_get_text ((GtkEntry *) self->name_entry_save_dialog);
+  
+  lower_name = g_ascii_strdown (name, -1);
+  
+  g_key_file_set_string (self->user_key_file,
+                         lower_name,
+                         "Name",
+                         name);
+  
+  guint i;
+  GtkWidget *band_widget;
+  gdouble value;
+  PresetItem *preset;
+  preset = preset_item_new ();
+  
+  preset->group_name = lower_name;
+  preset->name = name;
+  
+  for (i=0; i<10; i++)
+    {
+      band_widget = (GtkWidget *) gtk_builder_get_object (self->builder,
+                                                          g_strdup_printf (
+                                                          "band%d", i));
+      
+      value = gtk_range_get_value ((GtkRange *) band_widget);
+      
+      g_key_file_set_double (self->user_key_file,
+                             lower_name,
+                             g_strdup_printf ("Band%d", i),
+                             value);
+      
+      g_object_set (preset,
+                    g_strdup_printf ("band%d", i),
+                    value,
+                    NULL);
+    }
+  
+  GtkTreeIter iter;
+  gtk_list_store_append (self->presets_model, &iter);
+  gtk_list_store_set (self->presets_model, &iter,
+                      0, 1,
+                      1, preset->name,
+                      2, preset,
+                      -1);
+      
+  gtk_combo_box_set_active_iter ((GtkComboBox *) self->presets_combo,
+                                  &iter);
+          
+  gtk_widget_hide (self->save_dialog);
+  rhythmbox_equalizer_save_configs (self);
+  gtk_entry_set_text ((GtkEntry *) self->name_entry_save_dialog, "");
+}
+
+static void
+rhythmbox_equalizer_save_configs (RhythmboxEqualizer *self)
+{
+  gchar *buf;
+  gsize len;
+  GError *error = NULL;
+  buf = g_key_file_to_data(self->user_key_file, &len, &error);
+  
+  if (error)
+    {
+      g_warning (error->message);
+      g_error_free (error);
+      g_free(buf);
+      return;
+    }
+  
+  error = NULL;
+  if (!g_file_set_contents(self->user_config_path, buf, len, &error))
+    {
+      g_assert (error);
+      g_warning (error->message);
+      g_error_free (error);
+    }
+  
+  g_free (buf);
+}
Index: plugins/equalizer/preset_item.h
===================================================================
--- plugins/equalizer/preset_item.h	(revision 0)
+++ plugins/equalizer/preset_item.h	(revision 0)
@@ -0,0 +1,69 @@
+/**
+ * Copyright (C) 2008 Wilson Pinto Júnior
+ *
+ * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _PRESET_ITEM_H
+#define _PRESET_ITEM_H
+
+#define _GNU_SOURCE
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+#define PRESET_ITEM_TYPE                  (preset_item_get_type ())
+#define PRESET_ITEM(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRESET_ITEM_TYPE, PresetItem))
+#define PRESET_ITEM_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), PRESET_ITEM_TYPE, PresetItemClass))
+#define IS_PRESET_ITEM(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRESET_ITEM_TYPE))
+#define IS_PRESET_ITEM_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), PRESET_ITEM_TYPE))
+#define PRESET_ITEM_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), PRESET_ITEM_TYPE, PresetItemClass))
+
+typedef struct _PresetItem PresetItem;
+typedef struct _PresetItemClass PresetItemClass;
+
+struct _PresetItem
+{
+  /*< private >*/
+  GObject parent;
+
+  const gchar *group_name;
+  const gchar *name;
+
+  gdouble band0;
+  gdouble band1;
+  gdouble band2;
+  gdouble band3;
+  gdouble band4;
+  gdouble band5;
+  gdouble band6;
+  gdouble band7;
+  gdouble band8;
+  gdouble band9;
+  
+  gboolean is_global;
+};
+
+struct _PresetItemClass
+{
+  /*< private >*/
+  GObjectClass parent;
+};
+
+GType preset_item_get_type (void) G_GNUC_CONST;
+PresetItem *preset_item_new (void);
+
+G_END_DECLS
+
+#endif /* _PRESET_ITEM_H */
Index: plugins/equalizer/presets.ini.in
===================================================================
--- plugins/equalizer/presets.ini.in	(revision 0)
+++ plugins/equalizer/presets.ini.in	(revision 0)
@@ -0,0 +1,38 @@
+[testing]
+_Name=Testing
+Band0=5.2
+Band1=0.2
+Band2=9.2
+Band3=15.2
+Band4=0.2
+Band5=4.2
+Band6=9.2
+Band7=6.2
+Band8=2.2
+Band9=-12
+
+[testing2]
+_Name=Testing2
+Band0=1.2
+Band1=5.2
+Band2=0.2
+Band3=0.2
+Band4=0.2
+Band5=0.2
+Band6=0.2
+Band7=0.2
+Band8=0.2
+Band9=-12
+
+[testing7]
+_Name=Testing7
+Band0=1.2
+Band1=5.2
+Band2=0.2
+Band3=0.2
+Band4=0.2
+Band5=0.2
+Band6=0.2
+Band7=0.2
+Band8=0.2
+Band9=-12

Property changes on: plugins/equalizer/presets.ini.in
___________________________________________________________________
Added: svn:mergeinfo

Index: plugins/equalizer/Makefile.am
===================================================================
--- plugins/equalizer/Makefile.am	(revision 0)
+++ plugins/equalizer/Makefile.am	(revision 0)
@@ -0,0 +1,62 @@
+
+plugindir = $(PLUGINDIR)/equalizer
+plugin_LTLIBRARIES = libequalizer.la
+
+libequalizer_la_SOURCES = preset_item.c \
+						  rhythmbox_equalizer.c
+
+libequalizer_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
+
+libequalizer_la_LIBADD = 				\
+	-lgstinterfaces-0.10				\
+	$(RHYTHMBOX_LIBS)
+
+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)/backends/gstreamer            	\
+	-I$(top_srcdir)/rhythmdb                       	\
+	-I$(top_srcdir)/widgets                    	\
+	-I$(top_srcdir)/sources                    	\
+	-I$(top_srcdir)/iradio                    	\
+	-I$(top_srcdir)/podcast                    	\
+	-I$(top_srcdir)/remote				\
+	-I$(top_builddir)/remote			\
+	-I$(top_srcdir)/plugins				\
+	-I$(top_srcdir)/shell				\
+	-DPIXMAP_DIR=\""$(datadir)/pixmaps"\"		\
+	-DSHARE_DIR=\"$(pkgdatadir)\"                   \
+	-DDATADIR=\""$(datadir)"\"			\
+	-DPLUGINDIR=\""$(plugindir)"\" \
+	-DPLUGIN_SRC_DIR=\""$(ROOT_UNINSTALLED_DIR)/plugins/equalizer"\" \
+	$(RHYTHMBOX_CFLAGS)				\
+	$(DBUS_CFLAGS)					\
+	-D_XOPEN_SOURCE -D_BSD_SOURCE
+
+plugin_in_files = equalizer.rb-plugin.in
+%.rb-plugin: %.rb-plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+presets_in_files = presets.ini.in
+%.ini: %.ini.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+uixmldir = $(plugindir)
+uixml_DATA = equalizer.ui\
+  equalizer-ui.xml
+
+presetsdir = $(plugindir)
+presets_DATA = $(presets_in_files:.ini.in=.ini)
+
+themedir = $(pkgdatadir)/icons/hicolor
+size = 22x22
+context = actions
+
+icondir = $(themedir)/$(size)/$(context)
+icon_DATA = equalizer.png
+
+plugin_DATA = $(plugin_in_files:.rb-plugin.in=.rb-plugin)
+
+EXTRA_DIST = $(uixml_DATA) $(plugin_in_files) $(plugin_DATA) $(presets_in_files) $(icon_DATA)
\ No newline at end of file
Index: plugins/equalizer/rhythmbox_equalizer.h
===================================================================
--- plugins/equalizer/rhythmbox_equalizer.h	(revision 0)
+++ plugins/equalizer/rhythmbox_equalizer.h	(revision 0)
@@ -0,0 +1,126 @@
+/**
+ * Copyright (C) 2008 Wilson Pinto Júnior
+ *
+ * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifndef _RHYTHMBOX_EQUALIZER_H
+#define _RHYTHMBOX_EQUALIZER_H
+
+#define _GNU_SOURCE
+#include <glib/gi18n-lib.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <gst/gst.h>
+#include <gtk/gtk.h>
+
+#include "rb-plugin.h"
+#include "rb-debug.h"
+#include "rb-shell.h"
+#include "rb-shell-player.h"
+#include "rb-player.h"
+#include "rb-player-gst.h"
+#include "rb-player-gst-tee.h"
+#include "rb-player-gst-filter.h"
+#include "rb-dialog.h"
+#include "rb-file-helpers.h"
+#include "rhythmbox_equalizer.h"
+
+#include <gconf/gconf.h>
+#include <gconf/gconf-client.h>
+
+G_BEGIN_DECLS
+#define RHYTHMBOX_EQUALIZER_TYPE                  (rhythmbox_equalizer_get_type ())
+#define RHYTHMBOX_EQUALIZER(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), RHYTHMBOX_EQUALIZER_TYPE, RhythmboxEqualizer))
+#define RHYTHMBOX_EQUALIZER_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), RHYTHMBOX_EQUALIZER_TYPE, RhythmboxEqualizerClass))
+#define IS_RHYTHMBOX_EQUALIZER(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RHYTHMBOX_EQUALIZER_TYPE))
+#define IS_RHYTHMBOX_EQUALIZER_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), RHYTHMBOX_EQUALIZER_TYPE))
+#define RHYTHMBOX_EQUALIZER_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), RHYTHMBOX_EQUALIZER_TYPE, RhythmboxEqualizerClass))
+
+#define EQUALIZER_ICON_NAME	"equalizer"
+
+typedef struct _RhythmboxEqualizer RhythmboxEqualizer;
+typedef struct _RhythmboxEqualizerClass RhythmboxEqualizerClass;
+
+struct _RhythmboxEqualizer
+{
+  /*< private >*/
+  RBPlugin         parent;
+  GtkBuilder      *builder;
+  GstElement      *interface;
+  GConfClient     *gconfclient;
+  GtkWidget       *dialog;
+  GtkWidget       *presets_combo;
+  
+  GtkWidget       *delete_button;
+  GtkWidget       *save_button;
+  
+  GtkWidget       *save_dialog;
+  GtkWidget       *ok_button_save_dialog;
+  GtkWidget       *cancel_button_save_dialog;
+  GtkWidget       *name_entry_save_dialog;
+  
+  GtkListStore    *presets_model;
+  
+  GtkUIManager    *uim;
+  gint             merge_id;
+  GtkActionGroup  *action_group;
+  
+  RBShell         *shell;
+  RBShellPlayer   *shell_player;
+  RBPlayer        *player;
+  
+  GtkTreeIter      default_iter;
+  GtkTreeIter      custom_iter;
+  gboolean         interative;
+  
+  GKeyFile        *user_key_file;
+  const gchar     *user_config_path;
+};
+
+struct _RhythmboxEqualizerClass
+{
+  /*< private >*/
+  RBPluginClass parent_class;
+};
+
+G_MODULE_EXPORT GType register_rb_plugin (GTypeModule *module);
+GType	rhythmbox_equalizer_get_type		(void) G_GNUC_CONST;
+RhythmboxEqualizer *rhythmbox_equalizer_new (void);
+
+void
+rhythmbox_equalizer_show (RhythmboxEqualizer *self);
+
+void
+rhythmbox_equalizer_hide (RhythmboxEqualizer *self);
+
+void
+rhythmbox_equalizer_finalize (GObject *object);
+
+void
+rhythmbox_equalizer_set_band (RhythmboxEqualizer *self,
+                              gint                band,
+                              gdouble             double_value);
+
+void
+rhythmbox_equalizer_set_active (RhythmboxEqualizer *self,
+                                gboolean            state);
+
+G_END_DECLS
+
+#endif /* _RHYTHMBOX_EQUALIZER_H */
Index: plugins/equalizer/equalizer-ui.xml
===================================================================
--- plugins/equalizer/equalizer-ui.xml	(revision 0)
+++ plugins/equalizer/equalizer-ui.xml	(revision 0)
@@ -0,0 +1,16 @@
+<ui>
+  <menubar name="MenuBar">
+    <menu name="ViewMenu" action="View">
+      <placeholder name="ViewMenuModePlaceholder">
+        <menuitem name="ViewMenuEqualizerToggle" action="ToggleEqualizer"/>
+      </placeholder>
+    </menu>
+  </menubar>
+
+  <toolbar name="ToolBar">
+    <placeholder name="ToolBarPluginPlaceholder">
+      <toolitem name="Equalizer" action="ToggleEqualizer"/>
+    </placeholder>
+  </toolbar>
+</ui>
+
Index: plugins/equalizer/equalizer.ui
===================================================================
--- plugins/equalizer/equalizer.ui	(revision 0)
+++ plugins/equalizer/equalizer.ui	(revision 0)
@@ -0,0 +1,648 @@
+<?xml version="1.0"?>
+<interface>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">12</property>
+    <property name="lower">-24</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">1</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment10">
+    <property name="upper">12</property>
+    <property name="lower">-24</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">1</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="upper">12</property>
+    <property name="lower">-24</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">1</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="upper">12</property>
+    <property name="lower">-24</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">1</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="upper">12</property>
+    <property name="lower">-24</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">1</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment5">
+    <property name="upper">12</property>
+    <property name="lower">-24</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">1</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment6">
+    <property name="upper">12</property>
+    <property name="lower">-24</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">1</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment7">
+    <property name="upper">12</property>
+    <property name="lower">-24</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">1</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment8">
+    <property name="upper">12</property>
+    <property name="lower">-24</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">1</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment9">
+    <property name="upper">12</property>
+    <property name="lower">-24</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">1</property>
+    <property name="value">0</property>
+  </object>
+  
+  <object class="GtkDialog" id="dialog">
+    <property name="border_width">6</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <property name="title" translatable="yes">Equalizer</property>
+    <property name="modal">False</property>
+    <signal handler="on_dialog_delete_event" name="delete_event"/>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="spacing">12</property>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="border_width">6</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkHBox" id="hbox1">
+                <property name="visible">True</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkLabel" id="label11">
+                    <property name="visible">True</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">presets_combo</property>
+                    <property name="label" translatable="yes">_Presets:</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBox" id="presets_combo">
+                    <property name="visible">True</property>
+                    <signal handler="on_presets_combo_changed" name="changed"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkHBox" id="hbox2">
+                    <property name="visible">True</property>
+                    <property name="spacing">4</property>
+                    <child>
+                      <object class="GtkButton" id="save_button">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="tooltip_text" translatable="yes">Save this preset</property>
+                        <signal handler="on_save_button_clicked" name="clicked"/>
+                        <child>
+                          <object class="GtkImage" id="save_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-save</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="delete_button">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="tooltip_text" translatable="yes">Delete this preset</property>
+                        <signal handler="on_delete_button_clicked" name="clicked"/>
+                        <child>
+                          <object class="GtkImage" id="delete_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-delete</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" id="table1">
+                <property name="visible">True</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">10</property>
+                <property name="column_spacing">4</property>
+                <property name="row_spacing">4</property>
+                <child>
+                  <object class="GtkVScale" id="band9">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="update_policy">GTK_UPDATE_DELAYED</property>
+                    <property name="adjustment">adjustment1</property>
+                    <property name="inverted">True</property>
+                    <property name="draw_value">False</property>
+                    <property name="value_pos">GTK_POS_BOTTOM</property>
+                    <signal handler="on_band9_value_changed" name="value_changed"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">9</property>
+                    <property name="right_attach">10</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVScale" id="band8">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="update_policy">GTK_UPDATE_DELAYED</property>
+                    <property name="adjustment">adjustment2</property>
+                    <property name="inverted">True</property>
+                    <property name="draw_value">False</property>
+                    <property name="value_pos">GTK_POS_BOTTOM</property>
+                    <signal handler="on_band8_value_changed" name="value_changed"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">8</property>
+                    <property name="right_attach">9</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVScale" id="band7">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="update_policy">GTK_UPDATE_DELAYED</property>
+                    <property name="adjustment">adjustment3</property>
+                    <property name="inverted">True</property>
+                    <property name="draw_value">False</property>
+                    <property name="value_pos">GTK_POS_BOTTOM</property>
+                    <signal handler="on_band7_value_changed" name="value_changed"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">7</property>
+                    <property name="right_attach">8</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVScale" id="band6">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="update_policy">GTK_UPDATE_DELAYED</property>
+                    <property name="adjustment">adjustment4</property>
+                    <property name="inverted">True</property>
+                    <property name="draw_value">False</property>
+                    <property name="value_pos">GTK_POS_BOTTOM</property>
+                    <signal handler="on_band6_value_changed" name="value_changed"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">6</property>
+                    <property name="right_attach">7</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVScale" id="band5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="update_policy">GTK_UPDATE_DELAYED</property>
+                    <property name="adjustment">adjustment5</property>
+                    <property name="inverted">True</property>
+                    <property name="draw_value">False</property>
+                    <property name="value_pos">GTK_POS_BOTTOM</property>
+                    <signal handler="on_band5_value_changed" name="value_changed"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">5</property>
+                    <property name="right_attach">6</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVScale" id="band4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="update_policy">GTK_UPDATE_DELAYED</property>
+                    <property name="adjustment">adjustment6</property>
+                    <property name="inverted">True</property>
+                    <property name="draw_value">False</property>
+                    <property name="value_pos">GTK_POS_BOTTOM</property>
+                    <signal handler="on_band4_value_changed" name="value_changed"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="right_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVScale" id="band3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="update_policy">GTK_UPDATE_DELAYED</property>
+                    <property name="adjustment">adjustment7</property>
+                    <property name="inverted">True</property>
+                    <property name="draw_value">False</property>
+                    <property name="value_pos">GTK_POS_BOTTOM</property>
+                    <signal handler="on_band3_value_changed" name="value_changed"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="right_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVScale" id="band2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="update_policy">GTK_UPDATE_DELAYED</property>
+                    <property name="adjustment">adjustment8</property>
+                    <property name="inverted">True</property>
+                    <property name="draw_value">False</property>
+                    <property name="value_pos">GTK_POS_BOTTOM</property>
+                    <signal handler="on_band2_value_changed" name="value_changed"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVScale" id="band1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="update_policy">GTK_UPDATE_DELAYED</property>
+                    <property name="adjustment">adjustment9</property>
+                    <property name="inverted">True</property>
+                    <property name="draw_value">False</property>
+                    <property name="value_pos">GTK_POS_BOTTOM</property>
+                    <signal handler="on_band1_value_changed" name="value_changed"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVScale" id="band0">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="update_policy">GTK_UPDATE_DELAYED</property>
+                    <property name="adjustment">adjustment10</property>
+                    <property name="inverted">True</property>
+                    <property name="draw_value">False</property>
+                    <property name="value_pos">GTK_POS_BOTTOM</property>
+                    <signal handler="on_band0_value_changed" name="value_changed"/>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">&lt;small&gt;29Hz&lt;/small&gt;</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">&lt;small&gt;59Hz&lt;/small&gt;</property>
+                  </object>
+                  <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">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">&lt;small&gt;119Hz&lt;/small&gt;</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label4">
+                    <property name="visible">True</property>
+                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">&lt;small&gt;227Hz&lt;/small&gt;</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="right_attach">4</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label5">
+                    <property name="visible">True</property>
+                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">&lt;small&gt;474Hz&lt;/small&gt;</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="right_attach">5</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label6">
+                    <property name="visible">True</property>
+                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">&lt;small&gt;947Hz&lt;/small&gt;</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">5</property>
+                    <property name="right_attach">6</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label7">
+                    <property name="visible">True</property>
+                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">&lt;small&gt;1.5KHz&lt;/small&gt;</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">6</property>
+                    <property name="right_attach">7</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label8">
+                    <property name="visible">True</property>
+                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">&lt;small&gt;3.7KHz&lt;/small&gt;</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">7</property>
+                    <property name="right_attach">8</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label9">
+                    <property name="visible">True</property>
+                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">&lt;small&gt;7.5KHz&lt;/small&gt;</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">8</property>
+                    <property name="right_attach">9</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label10">
+                    <property name="visible">True</property>
+                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">&lt;small&gt;15KHz&lt;/small&gt;</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">9</property>
+                    <property name="right_attach">10</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="NVBox">
+                    <property name="visible">True</property>
+                    <property name="homogeneous">True</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <object class="GtkLabel" id="title01">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="use_markup">True</property>
+                        <property name="label" translatable="yes">&lt;small&gt;+12dB&lt;/small&gt;</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="title02">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="use_markup">True</property>
+                        <property name="label" translatable="yes">&lt;small&gt;0dB&lt;/small&gt;</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="title03">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="use_markup">True</property>
+                        <property name="label" translatable="yes">&lt;small&gt;-12dB&lt;/small&gt;</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="title04">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="use_markup">True</property>
+                        <property name="label" translatable="yes">&lt;small&gt;-24dB&lt;/small&gt;</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">10</property>
+                    <property name="right_attach">11</property>
+                    <property name="top_attach">0</property>
+                    <property name="bottom_attach">1</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <object class="GtkButton" id="button1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-close</property>
+                <property name="use_stock">True</property>
+                <signal handler="on_close_clicked" name="clicked"/>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">button1</action-widget>
+    </action-widgets>
+  </object>
+  
+  <object class="GtkDialog" id="save_dialog">
+    <property name="border_width">6</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <property name="title" translatable="yes">Save Preset</property>
+    <property name="modal">True</property>
+    <signal handler="on_save_dialog_delete_event" name="delete_event"/>
+    <child internal-child="vbox">"
+      <object class="GtkVBox" id="save_dialog_vbox">
+      
+      <child>
+        <object class="GtkHBox" id="hbox_save_dialog">
+          <property name="visible">True</property>
+          <property name="spacing">12</property>
+          <child>
+            <object class="GtkLabel" id="name_save_dialog">
+              <property name="visible">True</property>
+              <property name="use_underline">True</property>
+              <property name="mnemonic_widget">name_entry_save_dialog</property>
+              <property name="label" translatable="yes">_Name:</property>
+            </object>
+            <packing>
+              <property name="expand">False</property>
+            </packing>
+          </child>
+          <child>
+            <object class="GtkEntry" id="name_entry_save_dialog">
+              <property name="visible">True</property>
+              <signal handler="on_name_entry_changed" name="changed"/>
+            </object>
+            <packing>
+              <property name="expand">True</property>
+            </packing>
+          </child>
+        </object>
+      </child>
+      
+      <property name="visible">True</property>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="hbuttonbox_save_dialog">
+          <property name="visible">True</property>
+            <child>
+              <object class="GtkButton" id="cancel_button_save_dialog">
+                <property name="visible">True</property>
+                <property name="use_stock">True</property>
+                <property name="label">gtk-cancel</property>
+                <signal handler="on_cancel_button_save_dialog_clicked" name="clicked"/>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button_save_dialog">
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="use_stock">True</property>
+                <property name="label">gtk-ok</property>
+                <signal handler="on_ok_button_save_dialog_clicked" name="clicked"/>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="3">ok_button_save_dialog</action-widget>
+      <action-widget response="-5">cancel_button_save_dialog</action-widget>
+    </action-widgets>
+  </object>
+
+
+</interface>
Index: plugins/Makefile.am
===================================================================
--- plugins/Makefile.am	(revision 5878)
+++ plugins/Makefile.am	(working copy)
@@ -7,7 +7,8 @@
 	mmkeys						\
 	power-manager					\
 	sample						\
-	visualizer
+	visualizer					\
+	equalizer
 
 if WITH_AUDIOSCROBBLER
 SUBDIRS += audioscrobbler
