changeset 3858:6b0ddc844327

Automated merge with ssh://hg.atheme.org//hg/audacious
author William Pitcock <nenolod@atheme.org>
date Sat, 27 Oct 2007 08:33:20 -0500
parents b7ecd8c438ad (current diff) de26ea4a42fc (diff)
children f964e381d704
files
diffstat 1 files changed, 16 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- 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