Mercurial > audlegacy
changeset 3856:de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
ugly code!)
author | mf0102 <0102@gmx.at> |
---|---|
date | Sat, 27 Oct 2007 14:19:31 +0200 |
parents | a9b7b4145664 |
children | 6b0ddc844327 |
files | src/audacious/ui_preferences.c |
diffstat | 1 files changed, 16 insertions(+), 48 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/ui_preferences.c Sat Oct 27 07:05:12 2007 -0500 +++ b/src/audacious/ui_preferences.c Sat Oct 27 14:19:31 2007 +0200 @@ -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