# HG changeset patch # User William Pitcock # Date 1193492000 18000 # Node ID 6b0ddc8443273d169f9b146d8e3e0d82f14e1710 # Parent b7ecd8c438adb63ed47105d90f610d3f40acb8d5# Parent de26ea4a42fcdd1dc55e2538b19113c72266b260 Automated merge with ssh://hg.atheme.org//hg/audacious diff -r b7ecd8c438ad -r 6b0ddc844327 src/audacious/ui_preferences.c --- a/src/audacious/ui_preferences.c Sat Oct 27 08:32:33 2007 -0500 +++ b/src/audacious/ui_preferences.c Sat Oct 27 08:33:20 2007 -0500 @@ -1634,66 +1634,34 @@ } static void +reload_skin() +{ + /* reload the skin to apply the change */ + skin_reload_forced(); + ui_skinned_window_draw_all(mainwin); + ui_skinned_window_draw_all(equalizerwin); + ui_skinned_window_draw_all(playlistwin); +} + +static void on_red_scale_value_changed(GtkHScale *scale, gpointer data) { - //GladeXML *xml = prefswin_get_xml(); - //GtkWidget *widget; - gint value; - - value = gtk_range_get_value(GTK_RANGE(scale)); - - if (value != cfg.colorize_r) - { - cfg.colorize_r = value; - - /* reload the skin to apply the change */ - skin_reload_forced(); - ui_skinned_window_draw_all(mainwin); - ui_skinned_window_draw_all(equalizerwin); - ui_skinned_window_draw_all(playlistwin); - } + cfg.colorize_r = gtk_range_get_value(GTK_RANGE(scale)); + reload_skin(); } static void on_green_scale_value_changed(GtkHScale *scale, gpointer data) { - //GladeXML *xml = prefswin_get_xml(); - //GtkWidget *widget; - gint value; - - value = gtk_range_get_value(GTK_RANGE(scale)); - - if (value != cfg.colorize_r) - { - cfg.colorize_g = value; - - /* reload the skin to apply the change */ - skin_reload_forced(); - ui_skinned_window_draw_all(mainwin); - ui_skinned_window_draw_all(equalizerwin); - ui_skinned_window_draw_all(playlistwin); - } + cfg.colorize_g = gtk_range_get_value(GTK_RANGE(scale)); + reload_skin(); } static void on_blue_scale_value_changed(GtkHScale *scale, gpointer data) { - //GladeXML *xml = prefswin_get_xml(); - //GtkWidget *widget; - gint value; - - value = gtk_range_get_value(GTK_RANGE(scale)); - - if (value != cfg.colorize_r) - { - cfg.colorize_b = value; - - /* reload the skin to apply the change */ - skin_reload_forced(); - ui_skinned_window_draw_all(mainwin); - ui_skinned_window_draw_all(equalizerwin); - ui_skinned_window_draw_all(playlistwin); - } + cfg.colorize_b = gtk_range_get_value(GTK_RANGE(scale)); + reload_skin(); } static void