changeset 2641:ba91ea50f214

use equalzier changed hook
author Tomasz Mon <desowin@gmail.com>
date Fri, 23 May 2008 15:38:38 +0200
parents dd255ad225f3
children c2603047a1a3
files src/skins/ui_equalizer.c src/skins/ui_main_evlisteners.c src/skins/ui_skinned_equalizer_slider.c
diffstat 3 files changed, 3 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/src/skins/ui_equalizer.c	Fri May 23 13:47:15 2008 +0200
+++ b/src/skins/ui_equalizer.c	Fri May 23 15:38:38 2008 +0200
@@ -184,14 +184,8 @@
     aud_cfg->equalizer_preamp = ui_skinned_equalizer_slider_get_position(equalizerwin_preamp);
     for (i = 0; i < 10; i++)
         aud_cfg->equalizer_bands[i] = ui_skinned_equalizer_slider_get_position(equalizerwin_bands[i]);
-    /* um .. i think we need both of these for xmms compatibility ..
-       not sure. -larne */
-#if 0
-    input_set_eq(aud_cfg->equalizer_active, aud_cfg->equalizer_preamp,
-                 aud_cfg->equalizer_bands);
-    output_set_eq(aud_cfg->equalizer_active, aud_cfg->equalizer_preamp,
-                  aud_cfg->equalizer_bands);
-#endif
+
+    aud_hook_call("equalizer changed", NULL);
     gtk_widget_queue_draw(equalizerwin_graph);
 }
 
--- a/src/skins/ui_main_evlisteners.c	Fri May 23 13:47:15 2008 +0200
+++ b/src/skins/ui_main_evlisteners.c	Fri May 23 15:38:38 2008 +0200
@@ -106,16 +106,9 @@
 static void
 ui_main_evlistener_playback_begin(gpointer hook_data, gpointer user_data)
 {
-
     PlaylistEntry *entry = (PlaylistEntry*)hook_data;
     g_return_if_fail(entry != NULL);
-#if 0
-    equalizerwin_load_auto_preset(entry->filename);
-    input_set_eq(cfg.equalizer_active, cfg.equalizer_preamp,
-                 cfg.equalizer_bands);
-    output_set_eq(cfg.equalizer_active, cfg.equalizer_preamp,
-                  cfg.equalizer_bands);
-#endif
+
     ui_vis_clear_data(mainwin_vis);
     ui_svis_clear_data(mainwin_svis);
     mainwin_disable_seekbar();
--- a/src/skins/ui_skinned_equalizer_slider.c	Fri May 23 13:47:15 2008 +0200
+++ b/src/skins/ui_skinned_equalizer_slider.c	Fri May 23 15:38:38 2008 +0200
@@ -22,9 +22,7 @@
  */
 
 #include "ui_skin.h"
-#if 0
 #include "ui_equalizer.h"
-#endif
 #include "ui_main.h"
 #include "skins_cfg.h"
 #include "ui_skinned_equalizer_slider.h"
@@ -259,9 +257,7 @@
                     priv->position = 25;
 
                 priv->value = ((gfloat) (25 - priv->position) * EQUALIZER_MAX_GAIN / 25.0 );
-#if 0
                 equalizerwin_eq_changed();
-#endif
             }
 
             ui_skinned_equalizer_slider_set_mainwin_text(es);
@@ -305,9 +301,7 @@
 
         priv->value = ((gfloat) (25 - priv->position) * EQUALIZER_MAX_GAIN / 25.0 );
         ui_skinned_equalizer_slider_set_mainwin_text(es);
-#if 0
         equalizerwin_eq_changed();
-#endif
         gtk_widget_queue_draw(widget);
     }
 
@@ -333,9 +327,7 @@
     }
 
     priv->value = ((gfloat) (25 - priv->position) * EQUALIZER_MAX_GAIN / 25.0 );
-#if 0
     equalizerwin_eq_changed();
-#endif
     gtk_widget_queue_draw(widget);
     return TRUE;
 }