changeset 3005:3db40ad79fd9 trunk

request GdkGC when needed rather than carry one around
author Tomasz Mon <desowin@gmail.com>
date Sun, 08 Jul 2007 19:56:51 +0200
parents afa46ebd90c7
children 3c4ed53a685f
files src/audacious/ui_equalizer.c src/audacious/ui_main.c src/audacious/ui_playlist.c src/audacious/ui_skinned_button.c src/audacious/ui_skinned_button.h src/audacious/ui_skinned_number.c src/audacious/ui_skinned_number.h src/audacious/ui_skinned_textbox.c src/audacious/ui_skinned_textbox.h
diffstat 9 files changed, 129 insertions(+), 148 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_equalizer.c	Sun Jul 08 14:51:01 2007 +0200
+++ b/src/audacious/ui_equalizer.c	Sun Jul 08 19:56:51 2007 +0200
@@ -654,32 +654,30 @@
     gint i;
 
     equalizerwin_on = ui_skinned_button_new();
-    ui_skinned_toggle_button_setup(equalizerwin_on, SKINNED_WINDOW(equalizerwin)->fixed, equalizerwin_bg,
-			SKINNED_WINDOW(equalizerwin)->gc, 14, 18, 25, 12, 10, 119, 128, 119,
-                        69, 119, 187, 119, SKIN_EQMAIN);
+    ui_skinned_toggle_button_setup(equalizerwin_on, SKINNED_WINDOW(equalizerwin)->fixed,
+                                   14, 18, 25, 12, 10, 119, 128, 119, 69, 119, 187, 119, SKIN_EQMAIN);
     g_signal_connect(equalizerwin_on, "clicked", equalizerwin_on_pushed, NULL);
     UI_SKINNED_BUTTON(equalizerwin_on)->inside = cfg.equalizer_active;
 
     equalizerwin_auto = ui_skinned_button_new();
-    ui_skinned_toggle_button_setup(equalizerwin_auto, SKINNED_WINDOW(equalizerwin)->fixed, equalizerwin_bg,
-			SKINNED_WINDOW(equalizerwin)->gc,39, 18, 33, 12, 35, 119, 153, 119,
-                       94, 119, 212, 119, SKIN_EQMAIN);
+    ui_skinned_toggle_button_setup(equalizerwin_auto, SKINNED_WINDOW(equalizerwin)->fixed,
+                                   39, 18, 33, 12, 35, 119, 153, 119, 94, 119, 212, 119, SKIN_EQMAIN);
     g_signal_connect(equalizerwin_auto, "clicked", equalizerwin_auto_pushed, NULL);
     UI_SKINNED_BUTTON(equalizerwin_auto)->inside = cfg.equalizer_autoload;
 
     equalizerwin_presets = ui_skinned_button_new();
-    ui_skinned_push_button_setup(equalizerwin_presets, SKINNED_WINDOW(equalizerwin)->fixed, equalizerwin_bg,
-                                 SKINNED_WINDOW(equalizerwin)->gc, 217, 18, 44, 12, 224, 164, 224, 176, SKIN_EQMAIN);
+    ui_skinned_push_button_setup(equalizerwin_presets, SKINNED_WINDOW(equalizerwin)->fixed,
+                                 217, 18, 44, 12, 224, 164, 224, 176, SKIN_EQMAIN);
     g_signal_connect(equalizerwin_presets, "clicked", equalizerwin_presets_pushed, NULL );
 
     equalizerwin_close = ui_skinned_button_new();
-    ui_skinned_push_button_setup(equalizerwin_close, SKINNED_WINDOW(equalizerwin)->fixed, equalizerwin_bg,
-                                 SKINNED_WINDOW(equalizerwin)->gc, 264, 3, 9, 9, 0, 116, 0, 125, SKIN_EQMAIN);
+    ui_skinned_push_button_setup(equalizerwin_close, SKINNED_WINDOW(equalizerwin)->fixed,
+                                 264, 3, 9, 9, 0, 116, 0, 125, SKIN_EQMAIN);
     g_signal_connect(equalizerwin_close, "clicked", equalizerwin_close_cb, NULL );
 
     equalizerwin_shade = ui_skinned_button_new();
-    ui_skinned_push_button_setup(equalizerwin_shade, SKINNED_WINDOW(equalizerwin)->fixed, equalizerwin_bg,
-                                 SKINNED_WINDOW(equalizerwin)->gc, 254, 3, 9, 9, 254, 137, 1, 38, SKIN_EQMAIN);
+    ui_skinned_push_button_setup(equalizerwin_shade, SKINNED_WINDOW(equalizerwin)->fixed,
+                                 254, 3, 9, 9, 254, 137, 1, 38, SKIN_EQMAIN);
     ui_skinned_button_set_skin_index2(equalizerwin_shade, SKIN_EQ_EX);
     g_signal_connect(equalizerwin_shade, "clicked", equalizerwin_shade_toggle, NULL );
 
--- a/src/audacious/ui_main.c	Sun Jul 08 14:51:01 2007 +0200
+++ b/src/audacious/ui_main.c	Sun Jul 08 19:56:51 2007 +0200
@@ -2679,129 +2679,115 @@
 mainwin_create_widgets(void)
 {
     mainwin_menubtn = ui_skinned_button_new();
-    ui_skinned_push_button_setup(mainwin_menubtn, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                 SKINNED_WINDOW(mainwin)->gc, 6, 3, 9, 9, 0, 0, 0, 9, SKIN_TITLEBAR);
+    ui_skinned_push_button_setup(mainwin_menubtn, SKINNED_WINDOW(mainwin)->fixed,
+                                 6, 3, 9, 9, 0, 0, 0, 9, SKIN_TITLEBAR);
     g_signal_connect(mainwin_menubtn, "clicked", mainwin_menubtn_cb, NULL );
 
     mainwin_minimize = ui_skinned_button_new();
-    ui_skinned_push_button_setup(mainwin_minimize, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                 SKINNED_WINDOW(mainwin)->gc, 244, 3, 9, 9, 9, 0, 9, 9, SKIN_TITLEBAR);
+    ui_skinned_push_button_setup(mainwin_minimize, SKINNED_WINDOW(mainwin)->fixed,
+                                 244, 3, 9, 9, 9, 0, 9, 9, SKIN_TITLEBAR);
     g_signal_connect(mainwin_minimize, "clicked", mainwin_minimize_cb, NULL );
 
     mainwin_shade = ui_skinned_button_new();
-    ui_skinned_push_button_setup(mainwin_shade, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                 SKINNED_WINDOW(mainwin)->gc,  254, 3, 9, 9, 0,
+    ui_skinned_push_button_setup(mainwin_shade, SKINNED_WINDOW(mainwin)->fixed,
+                                 254, 3, 9, 9, 0,
                                  cfg.player_shaded ? 27 : 18, 9, cfg.player_shaded ? 27 : 18, SKIN_TITLEBAR);
     g_signal_connect(mainwin_shade, "clicked", mainwin_shade_toggle, NULL );
 
     mainwin_close = ui_skinned_button_new();
-    ui_skinned_push_button_setup(mainwin_close, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                 SKINNED_WINDOW(mainwin)->gc, 264, 3, 9, 9, 18, 0, 18, 9, SKIN_TITLEBAR);
+    ui_skinned_push_button_setup(mainwin_close, SKINNED_WINDOW(mainwin)->fixed,
+                                 264, 3, 9, 9, 18, 0, 18, 9, SKIN_TITLEBAR);
     g_signal_connect(mainwin_close, "clicked", mainwin_quit_cb, NULL );
 
     mainwin_rew = ui_skinned_button_new();
-    ui_skinned_push_button_setup(mainwin_rew, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                 SKINNED_WINDOW(mainwin)->gc, 16, 88, 23, 18, 0, 0, 0, 18, SKIN_CBUTTONS);
+    ui_skinned_push_button_setup(mainwin_rew, SKINNED_WINDOW(mainwin)->fixed,
+                                 16, 88, 23, 18, 0, 0, 0, 18, SKIN_CBUTTONS);
     g_signal_connect(mainwin_rew, "pressed", mainwin_rev_pushed, NULL);
     g_signal_connect(mainwin_rew, "released", mainwin_rev_release, NULL);
 
     mainwin_fwd = ui_skinned_button_new();
-    ui_skinned_push_button_setup(mainwin_fwd, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                 SKINNED_WINDOW(mainwin)->gc, 108, 88, 22, 18, 92, 0, 92, 18, SKIN_CBUTTONS);
+    ui_skinned_push_button_setup(mainwin_fwd, SKINNED_WINDOW(mainwin)->fixed,
+                                 108, 88, 22, 18, 92, 0, 92, 18, SKIN_CBUTTONS);
     g_signal_connect(mainwin_fwd, "pressed", mainwin_fwd_pushed, NULL);
     g_signal_connect(mainwin_fwd, "released", mainwin_fwd_release, NULL);
 
     mainwin_play = ui_skinned_button_new();
-    ui_skinned_push_button_setup(mainwin_play, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                 SKINNED_WINDOW(mainwin)->gc, 39, 88, 23, 18, 23, 0, 23, 18, SKIN_CBUTTONS);
+    ui_skinned_push_button_setup(mainwin_play, SKINNED_WINDOW(mainwin)->fixed,
+                                 39, 88, 23, 18, 23, 0, 23, 18, SKIN_CBUTTONS);
     g_signal_connect(mainwin_play, "clicked", mainwin_play_pushed, NULL );
 
     mainwin_pause = ui_skinned_button_new();
-    ui_skinned_push_button_setup(mainwin_pause, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                 SKINNED_WINDOW(mainwin)->gc, 62, 88, 23, 18, 46, 0, 46, 18, SKIN_CBUTTONS);
+    ui_skinned_push_button_setup(mainwin_pause, SKINNED_WINDOW(mainwin)->fixed,
+                                 62, 88, 23, 18, 46, 0, 46, 18, SKIN_CBUTTONS);
     g_signal_connect(mainwin_pause, "clicked", playback_pause, NULL );
 
     mainwin_stop = ui_skinned_button_new();
-    ui_skinned_push_button_setup(mainwin_stop, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                 SKINNED_WINDOW(mainwin)->gc, 85, 88, 23, 18, 69, 0, 69, 18, SKIN_CBUTTONS);
+    ui_skinned_push_button_setup(mainwin_stop, SKINNED_WINDOW(mainwin)->fixed,
+                                 85, 88, 23, 18, 69, 0, 69, 18, SKIN_CBUTTONS);
     g_signal_connect(mainwin_stop, "clicked", mainwin_stop_pushed, NULL );
 
     mainwin_eject = ui_skinned_button_new();
-    ui_skinned_push_button_setup(mainwin_eject, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                 SKINNED_WINDOW(mainwin)->gc, 136, 89, 22, 16, 114, 0, 114, 16, SKIN_CBUTTONS);
+    ui_skinned_push_button_setup(mainwin_eject, SKINNED_WINDOW(mainwin)->fixed,
+                                 136, 89, 22, 16, 114, 0, 114, 16, SKIN_CBUTTONS);
     g_signal_connect(mainwin_eject, "clicked", mainwin_eject_pushed, NULL);
 
     mainwin_srew = ui_skinned_button_new();
-    ui_skinned_small_button_setup(mainwin_srew, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                  SKINNED_WINDOW(mainwin)->gc, 169, 4, 8, 7);
+    ui_skinned_small_button_setup(mainwin_srew, SKINNED_WINDOW(mainwin)->fixed, 169, 4, 8, 7);
     g_signal_connect(mainwin_srew, "clicked", mainwin_playlist_prev, NULL);
 
     mainwin_splay = ui_skinned_button_new();
-    ui_skinned_small_button_setup(mainwin_splay, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                  SKINNED_WINDOW(mainwin)->gc, 177, 4, 10, 7);
+    ui_skinned_small_button_setup(mainwin_splay, SKINNED_WINDOW(mainwin)->fixed, 177, 4, 10, 7);
     g_signal_connect(mainwin_splay, "clicked", mainwin_play_pushed, NULL);
 
     mainwin_spause = ui_skinned_button_new();
-    ui_skinned_small_button_setup(mainwin_spause, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                  SKINNED_WINDOW(mainwin)->gc, 187, 4, 10, 7);
+    ui_skinned_small_button_setup(mainwin_spause, SKINNED_WINDOW(mainwin)->fixed, 187, 4, 10, 7);
     g_signal_connect(mainwin_spause, "clicked", playback_pause, NULL);
 
     mainwin_sstop = ui_skinned_button_new();
-    ui_skinned_small_button_setup(mainwin_sstop, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                  SKINNED_WINDOW(mainwin)->gc, 197, 4, 9, 7);
+    ui_skinned_small_button_setup(mainwin_sstop, SKINNED_WINDOW(mainwin)->fixed, 197, 4, 9, 7);
     g_signal_connect(mainwin_sstop, "clicked", mainwin_stop_pushed, NULL);
 
     mainwin_sfwd = ui_skinned_button_new();
-    ui_skinned_small_button_setup(mainwin_sfwd, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                  SKINNED_WINDOW(mainwin)->gc, 206, 4, 8, 7);
+    ui_skinned_small_button_setup(mainwin_sfwd, SKINNED_WINDOW(mainwin)->fixed, 206, 4, 8, 7);
     g_signal_connect(mainwin_sfwd, "clicked", mainwin_playlist_next, NULL);
 
     mainwin_seject = ui_skinned_button_new();
-    ui_skinned_small_button_setup(mainwin_seject, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                  SKINNED_WINDOW(mainwin)->gc, 216, 4, 9, 7);
+    ui_skinned_small_button_setup(mainwin_seject, SKINNED_WINDOW(mainwin)->fixed, 216, 4, 9, 7);
     g_signal_connect(mainwin_seject, "clicked", mainwin_eject_pushed, NULL);
 
     mainwin_shuffle = ui_skinned_button_new();
-    ui_skinned_toggle_button_setup(mainwin_shuffle, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                   SKINNED_WINDOW(mainwin)->gc, 164, 89, 46,
-                                   15, 28, 0, 28, 15, 28, 30, 28, 45, SKIN_SHUFREP);
+    ui_skinned_toggle_button_setup(mainwin_shuffle, SKINNED_WINDOW(mainwin)->fixed,
+                                   164, 89, 46, 15, 28, 0, 28, 15, 28, 30, 28, 45, SKIN_SHUFREP);
     g_signal_connect(mainwin_shuffle, "clicked", mainwin_shuffle_pushed_cb, NULL);
 
     mainwin_repeat = ui_skinned_button_new();
-    ui_skinned_toggle_button_setup(mainwin_repeat, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                   SKINNED_WINDOW(mainwin)->gc, 210, 89, 28,
-                                   15, 0, 0, 0, 15, 0, 30, 0, 45, SKIN_SHUFREP);
+    ui_skinned_toggle_button_setup(mainwin_repeat, SKINNED_WINDOW(mainwin)->fixed,
+                                   210, 89, 28, 15, 0, 0, 0, 15, 0, 30, 0, 45, SKIN_SHUFREP);
     g_signal_connect(mainwin_repeat, "clicked", mainwin_repeat_pushed_cb, NULL);
 
     mainwin_eq = ui_skinned_button_new();
-    ui_skinned_toggle_button_setup(mainwin_eq, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                   SKINNED_WINDOW(mainwin)->gc, 219, 58, 23,
-                                   12, 0, 61, 46, 61, 0, 73, 46, 73, SKIN_SHUFREP);
+    ui_skinned_toggle_button_setup(mainwin_eq, SKINNED_WINDOW(mainwin)->fixed,
+                                   219, 58, 23, 12, 0, 61, 46, 61, 0, 73, 46, 73, SKIN_SHUFREP);
     g_signal_connect(mainwin_eq, "clicked", mainwin_equalizer_pushed_cb, NULL);
     UI_SKINNED_BUTTON(mainwin_eq)->inside = cfg.equalizer_visible;
 
     mainwin_pl = ui_skinned_button_new();
-    ui_skinned_toggle_button_setup(mainwin_pl, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                   SKINNED_WINDOW(mainwin)->gc, 242, 58, 23,
-                                   12, 23, 61, 69, 61, 23, 73, 69, 73, SKIN_SHUFREP);
+    ui_skinned_toggle_button_setup(mainwin_pl, SKINNED_WINDOW(mainwin)->fixed,
+                                   242, 58, 23, 12, 23, 61, 69, 61, 23, 73, 69, 73, SKIN_SHUFREP);
     g_signal_connect(mainwin_pl, "clicked", mainwin_playlist_pushed_cb, NULL);
     UI_SKINNED_BUTTON(mainwin_pl)->inside = cfg.playlist_visible;
 
-    mainwin_info = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 112, 27,
-                             153, 1, SKIN_TEXT);
+    mainwin_info = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, 112, 27, 153, 1, SKIN_TEXT);
     ui_skinned_textbox_set_scroll(mainwin_info, cfg.autoscroll);
     ui_skinned_textbox_set_xfont(mainwin_info, cfg.mainwin_use_xfont, cfg.mainwin_font);
     g_signal_connect(mainwin_info, "double-clicked", mainwin_info_double_clicked_cb, NULL);
     g_signal_connect(mainwin_info, "right-clicked", mainwin_info_right_clicked_cb, NULL);
 
-    mainwin_othertext = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 112, 43,
-                             153, 1, SKIN_TEXT);
-
-    mainwin_rate_text = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 111, 43, 15,
-                             0, SKIN_TEXT);
-
-    mainwin_freq_text = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 156, 43, 10,
-                            0, SKIN_TEXT);
+    mainwin_othertext = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, 112, 43, 153, 1, SKIN_TEXT);
+
+    mainwin_rate_text = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, 111, 43, 15, 0, SKIN_TEXT);
+
+    mainwin_freq_text = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, 156, 43, 10, 0, SKIN_TEXT);
 
     mainwin_menurow =
         create_menurow(&mainwin_wlist, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 10, 22, 304,
@@ -2828,29 +2814,23 @@
     mainwin_playstatus =
         create_playstatus(&mainwin_wlist, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 24, 28);
 
-    mainwin_minus_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 36, 26,
-                      SKIN_NUMBERS);
+    mainwin_minus_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, 36, 26, SKIN_NUMBERS);
     g_signal_connect(mainwin_minus_num, "clicked", change_timer_mode, NULL);
 
-    mainwin_10min_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 48, 26,
-                      SKIN_NUMBERS);
+    mainwin_10min_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, 48, 26, SKIN_NUMBERS);
     g_signal_connect(mainwin_10min_num, "clicked", change_timer_mode, NULL);
 
-    mainwin_min_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 60, 26,
-                      SKIN_NUMBERS);
+    mainwin_min_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, 60, 26, SKIN_NUMBERS);
     g_signal_connect(mainwin_min_num, "clicked", change_timer_mode, NULL);
 
-    mainwin_10sec_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 78, 26,
-                      SKIN_NUMBERS);
+    mainwin_10sec_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, 78, 26, SKIN_NUMBERS);
     g_signal_connect(mainwin_10sec_num, "clicked", change_timer_mode, NULL);
 
-    mainwin_sec_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 90, 26,
-                      SKIN_NUMBERS);
+    mainwin_sec_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, 90, 26, SKIN_NUMBERS);
     g_signal_connect(mainwin_sec_num, "clicked", change_timer_mode, NULL);
 
     mainwin_about = ui_skinned_button_new();
-    ui_skinned_small_button_setup(mainwin_about, SKINNED_WINDOW(mainwin)->fixed, mainwin_bg,
-                                  SKINNED_WINDOW(mainwin)->gc, 247, 83, 20, 25);
+    ui_skinned_small_button_setup(mainwin_about, SKINNED_WINDOW(mainwin)->fixed, 247, 83, 20, 25);
     g_signal_connect(mainwin_about, "clicked", show_about_window, NULL);
     g_signal_connect(mainwin_about, "right-clicked", mainwin_about_cb, NULL );
 
@@ -2873,12 +2853,10 @@
                        mainwin_spos_release_cb, SKIN_TITLEBAR);
     widget_hide(WIDGET(mainwin_sposition));
 
-    mainwin_stime_min = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 130, 4, 15,
-                       FALSE, SKIN_TEXT);
+    mainwin_stime_min = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, 130, 4, 15, FALSE, SKIN_TEXT);
     g_signal_connect(mainwin_stime_min, "clicked", change_timer_mode, NULL);
 
-    mainwin_stime_sec = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, mainwin_bg, SKINNED_WINDOW(mainwin)->gc, 147, 4, 10,
-                       FALSE, SKIN_TEXT);
+    mainwin_stime_sec = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, 147, 4, 10, FALSE, SKIN_TEXT);
     g_signal_connect(mainwin_stime_sec, "clicked", change_timer_mode, NULL);
 
     err = gtk_message_dialog_new(GTK_WINDOW(mainwin), GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_MODAL,
--- a/src/audacious/ui_playlist.c	Sun Jul 08 14:51:01 2007 +0200
+++ b/src/audacious/ui_playlist.c	Sun Jul 08 19:56:51 2007 +0200
@@ -1558,28 +1558,27 @@
     /* This function creates the custom widgets used by the playlist editor */
 
     /* text box for displaying song title in shaded mode */
-    playlistwin_sinfo = ui_skinned_textbox_new(SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg, SKINNED_WINDOW(playlistwin)->gc,
-                             4, 4, playlistwin_get_width() - 35, TRUE, SKIN_TEXT);
+    playlistwin_sinfo = ui_skinned_textbox_new(SKINNED_WINDOW(playlistwin)->fixed, 
+                                               4, 4, playlistwin_get_width() - 35, TRUE, SKIN_TEXT);
 
     playlistwin_set_sinfo_font(cfg.playlist_font);
 
     playlistwin_shade = ui_skinned_button_new();
     /* shade/unshade window push button */
     if (cfg.playlist_shaded)
-        ui_skinned_push_button_setup(playlistwin_shade, SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg,
-                                     SKINNED_WINDOW(playlistwin)->gc, playlistwin_get_width() - 21, 3,
+        ui_skinned_push_button_setup(playlistwin_shade, SKINNED_WINDOW(playlistwin)->fixed,
+                                     playlistwin_get_width() - 21, 3,
                                      9, 9, 128, 45, 150, 42, SKIN_PLEDIT);
     else
-        ui_skinned_push_button_setup(playlistwin_shade, SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg,
-                                     SKINNED_WINDOW(playlistwin)->gc, playlistwin_get_width() - 21, 3,
+        ui_skinned_push_button_setup(playlistwin_shade, SKINNED_WINDOW(playlistwin)->fixed,
+                                     playlistwin_get_width() - 21, 3,
                                      9, 9, 157, 3, 62, 42, SKIN_PLEDIT);
 
     g_signal_connect(playlistwin_shade, "clicked", playlistwin_shade_toggle, NULL );
 
     /* close window push button */
     playlistwin_close = ui_skinned_button_new();
-    ui_skinned_push_button_setup(playlistwin_close, SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg,
-                                 SKINNED_WINDOW(playlistwin)->gc,
+    ui_skinned_push_button_setup(playlistwin_close, SKINNED_WINDOW(playlistwin)->fixed,
                                  playlistwin_get_width() - 11, 3, 9, 9,
                                  cfg.playlist_shaded ? 138 : 167,
                                  cfg.playlist_shaded ? 45 : 3, 52, 42, SKIN_PLEDIT);
@@ -1603,17 +1602,17 @@
     ui_skinned_window_widgetlist_associate(playlistwin, WIDGET(playlistwin_slider));
 
     /* track time (minute) */
-    playlistwin_time_min = ui_skinned_textbox_new(SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg, SKINNED_WINDOW(playlistwin)->gc,
+    playlistwin_time_min = ui_skinned_textbox_new(SKINNED_WINDOW(playlistwin)->fixed,
                        playlistwin_get_width() - 82,
                        cfg.playlist_height - 15, 15, FALSE, SKIN_TEXT);
 
     /* track time (second) */
-    playlistwin_time_sec = ui_skinned_textbox_new(SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg, SKINNED_WINDOW(playlistwin)->gc,
+    playlistwin_time_sec = ui_skinned_textbox_new(SKINNED_WINDOW(playlistwin)->fixed,
                        playlistwin_get_width() - 64,
                        cfg.playlist_height - 15, 10, FALSE, SKIN_TEXT);
 
     /* playlist information (current track length / total track length) */
-    playlistwin_info = ui_skinned_textbox_new(SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg, SKINNED_WINDOW(playlistwin)->gc,
+    playlistwin_info = ui_skinned_textbox_new(SKINNED_WINDOW(playlistwin)->fixed,
                        playlistwin_get_width() - 143,
                        cfg.playlist_height - 28, 90, FALSE, SKIN_TEXT);
 
@@ -1621,55 +1620,55 @@
 
     /* rewind button */
     playlistwin_srew = ui_skinned_button_new();
-    ui_skinned_small_button_setup(playlistwin_srew, SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg,
-                                  SKINNED_WINDOW(playlistwin)->gc, playlistwin_get_width() - 144,
+    ui_skinned_small_button_setup(playlistwin_srew, SKINNED_WINDOW(playlistwin)->fixed,
+                                  playlistwin_get_width() - 144,
                                   cfg.playlist_height - 16, 8, 7);
     g_signal_connect(playlistwin_srew, "clicked", local_playlist_prev, NULL);
 
     /* play button */
     playlistwin_splay = ui_skinned_button_new();
-    ui_skinned_small_button_setup(playlistwin_splay, SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg,
-                                  SKINNED_WINDOW(playlistwin)->gc, playlistwin_get_width() - 138,
+    ui_skinned_small_button_setup(playlistwin_splay, SKINNED_WINDOW(playlistwin)->fixed,
+                                  playlistwin_get_width() - 138,
                                   cfg.playlist_height - 16, 10, 7);
     g_signal_connect(playlistwin_splay, "clicked", mainwin_play_pushed, NULL);
 
     /* pause button */
     playlistwin_spause = ui_skinned_button_new();
-    ui_skinned_small_button_setup(playlistwin_spause, SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg,
-                                  SKINNED_WINDOW(playlistwin)->gc, playlistwin_get_width() - 128,
+    ui_skinned_small_button_setup(playlistwin_spause, SKINNED_WINDOW(playlistwin)->fixed,
+                                  playlistwin_get_width() - 128,
                                   cfg.playlist_height - 16, 10, 7);
     g_signal_connect(playlistwin_spause, "clicked", playback_pause, NULL);
 
     /* stop button */
     playlistwin_sstop = ui_skinned_button_new();
-    ui_skinned_small_button_setup(playlistwin_sstop, SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg,
-                                  SKINNED_WINDOW(playlistwin)->gc, playlistwin_get_width() - 118,
+    ui_skinned_small_button_setup(playlistwin_sstop, SKINNED_WINDOW(playlistwin)->fixed,
+                                  playlistwin_get_width() - 118,
                                   cfg.playlist_height - 16, 9, 7);
     g_signal_connect(playlistwin_sstop, "clicked", mainwin_stop_pushed, NULL);
 
     /* forward button */
     playlistwin_sfwd = ui_skinned_button_new();
-    ui_skinned_small_button_setup(playlistwin_sfwd, SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg,
-                                  SKINNED_WINDOW(playlistwin)->gc, playlistwin_get_width() - 109,
+    ui_skinned_small_button_setup(playlistwin_sfwd, SKINNED_WINDOW(playlistwin)->fixed,
+                                  playlistwin_get_width() - 109,
                                   cfg.playlist_height - 16, 8, 7);
     g_signal_connect(playlistwin_sfwd, "clicked", local_playlist_next, NULL);
 
     /* eject button */
     playlistwin_seject = ui_skinned_button_new();
-    ui_skinned_small_button_setup(playlistwin_seject, SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg,
-                                  SKINNED_WINDOW(playlistwin)->gc, playlistwin_get_width() - 100,
+    ui_skinned_small_button_setup(playlistwin_seject, SKINNED_WINDOW(playlistwin)->fixed,
+                                  playlistwin_get_width() - 100,
                                   cfg.playlist_height - 16, 9, 7);
     g_signal_connect(playlistwin_seject, "clicked", mainwin_eject_pushed, NULL);
 
     playlistwin_sscroll_up = ui_skinned_button_new();
-    ui_skinned_small_button_setup(playlistwin_sscroll_up, SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg,
-                                  SKINNED_WINDOW(playlistwin)->gc, playlistwin_get_width() - 14,
+    ui_skinned_small_button_setup(playlistwin_sscroll_up, SKINNED_WINDOW(playlistwin)->fixed,
+                                  playlistwin_get_width() - 14,
                                   cfg.playlist_height - 35, 8, 5);
     g_signal_connect(playlistwin_sscroll_up, "clicked", playlistwin_scroll_up_pushed, NULL);
 
     playlistwin_sscroll_down = ui_skinned_button_new();
-    ui_skinned_small_button_setup(playlistwin_sscroll_down, SKINNED_WINDOW(playlistwin)->fixed, playlistwin_bg,
-                                  SKINNED_WINDOW(playlistwin)->gc, playlistwin_get_width() - 14,
+    ui_skinned_small_button_setup(playlistwin_sscroll_down, SKINNED_WINDOW(playlistwin)->fixed,
+                                  playlistwin_get_width() - 14,
                                   cfg.playlist_height - 30, 8, 5);
     g_signal_connect(playlistwin_sscroll_down, "clicked", playlistwin_scroll_down_pushed, NULL);
 }
--- a/src/audacious/ui_skinned_button.c	Sun Jul 08 14:51:01 2007 +0200
+++ b/src/audacious/ui_skinned_button.c	Sun Jul 08 19:56:51 2007 +0200
@@ -253,10 +253,13 @@
         return FALSE;
 
     GdkPixmap *obj;
+    GdkGC *gc;
     obj = gdk_pixmap_new(NULL, priv->w, priv->h, gdk_rgb_get_visual()->depth);
+    gc = gdk_gc_new(obj);
+
     switch (button->type) {
         case TYPE_PUSH:
-            skin_draw_pixmap(bmp_active_skin, obj, priv->gc,
+            skin_draw_pixmap(bmp_active_skin, obj, gc,
                              button->pressed ? priv->skin_index2 : priv->skin_index1,
                              button->pressed ? button->px : button->nx,
                              button->pressed ? button->py : button->ny,
@@ -264,13 +267,13 @@
             break;
         case TYPE_TOGGLE:
             if (button->inside)
-                skin_draw_pixmap(bmp_active_skin, obj, priv->gc,
+                skin_draw_pixmap(bmp_active_skin, obj, gc,
                                  button->pressed ? priv->skin_index2 : priv->skin_index1,
                                  button->pressed ? button->ppx : button->pnx,
                                  button->pressed ? button->ppy : button->pny,
                                  0, 0, priv->w, priv->h);
             else
-                skin_draw_pixmap(bmp_active_skin, obj, priv->gc,
+                skin_draw_pixmap(bmp_active_skin, obj, gc,
                                  button->pressed ? priv->skin_index2 : priv->skin_index1,
                                  button->pressed ? button->px : button->nx,
                                  button->pressed ? button->py : button->ny,
@@ -290,16 +293,18 @@
         GdkImage *img, *img2x;
         img = gdk_drawable_get_image(obj, 0, 0, priv->w, priv->h);
         img2x = create_dblsize_image(img);
-        gdk_draw_image (priv->img, priv->gc, img2x, 0, 0, 0, 0, priv->w*2, priv->h*2);
+        gdk_draw_image (priv->img, gc, img2x, 0, 0, 0, 0, priv->w*2, priv->h*2);
         g_object_unref(img2x);
         g_object_unref(img);
     } else
-        gdk_draw_drawable (priv->img, priv->gc, obj, 0, 0, 0, 0, priv->w, priv->h);
+        gdk_draw_drawable (priv->img, gc, obj, 0, 0, 0, 0, priv->w, priv->h);
 
     g_object_unref(obj);
 
-    gdk_draw_drawable (widget->window, priv->gc, priv->img, 0, 0, 0, 0,
+    gdk_draw_drawable (widget->window, gc, priv->img, 0, 0, 0, 0,
                        priv->w*(1+priv->double_size), priv->h*(1+priv->double_size));
+
+    g_object_unref(gc);
     return FALSE;
 }
 
@@ -309,11 +314,10 @@
     return GTK_WIDGET(button);
 }
 
-void ui_skinned_push_button_setup(GtkWidget *button, GtkWidget *fixed, GdkPixmap *parent, GdkGC *gc, gint x, gint y, gint w, gint h, gint nx, gint ny, gint px, gint py, SkinPixmapId si) {
+void ui_skinned_push_button_setup(GtkWidget *button, GtkWidget *fixed, gint x, gint y, gint w, gint h, gint nx, gint ny, gint px, gint py, SkinPixmapId si) {
 
     UiSkinnedButton *sbutton = UI_SKINNED_BUTTON(button);
     UiSkinnedButtonPrivate *priv = UI_SKINNED_BUTTON_GET_PRIVATE(sbutton);
-    priv->gc = gc;
     priv->w = w;
     priv->h = h;
     sbutton->x = x;
@@ -331,11 +335,10 @@
     gtk_fixed_put(GTK_FIXED(priv->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y);
 }
 
-void ui_skinned_toggle_button_setup(GtkWidget *button, GtkWidget *fixed, GdkPixmap *parent, GdkGC *gc, gint x, gint y, gint w, gint h, gint nx, gint ny, gint px, gint py, gint pnx, gint pny, gint ppx, gint ppy, SkinPixmapId si) {
+void ui_skinned_toggle_button_setup(GtkWidget *button, GtkWidget *fixed, gint x, gint y, gint w, gint h, gint nx, gint ny, gint px, gint py, gint pnx, gint pny, gint ppx, gint ppy, SkinPixmapId si) {
 
     UiSkinnedButton *sbutton = UI_SKINNED_BUTTON(button);
     UiSkinnedButtonPrivate *priv = UI_SKINNED_BUTTON_GET_PRIVATE(sbutton);
-    priv->gc = gc;
     priv->w = w;
     priv->h = h;
     sbutton->x = x;
@@ -357,11 +360,10 @@
     gtk_fixed_put(GTK_FIXED(priv->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y);
 }
 
-void ui_skinned_small_button_setup(GtkWidget *button, GtkWidget *fixed, GdkPixmap *parent, GdkGC *gc, gint x, gint y, gint w, gint h) {
+void ui_skinned_small_button_setup(GtkWidget *button, GtkWidget *fixed, gint x, gint y, gint w, gint h) {
 
     UiSkinnedButton *sbutton = UI_SKINNED_BUTTON(button);
     UiSkinnedButtonPrivate *priv = UI_SKINNED_BUTTON_GET_PRIVATE(sbutton);
-    priv->gc = gc;
     priv->w = w;
     priv->h = h;
     sbutton->x = x;
--- a/src/audacious/ui_skinned_button.h	Sun Jul 08 14:51:01 2007 +0200
+++ b/src/audacious/ui_skinned_button.h	Sun Jul 08 19:56:51 2007 +0200
@@ -70,10 +70,10 @@
 
 GType ui_skinned_button_get_type(void) G_GNUC_CONST;
 GtkWidget* ui_skinned_button_new();
-void ui_skinned_push_button_setup(GtkWidget *button, GtkWidget *fixed, GdkPixmap * parent, GdkGC * gc, gint x, gint y, gint w, gint h, gint nx, gint ny, gint px, gint py, SkinPixmapId si);
+void ui_skinned_push_button_setup(GtkWidget *button, GtkWidget *fixed, gint x, gint y, gint w, gint h, gint nx, gint ny, gint px, gint py, SkinPixmapId si);
 void ui_skinned_set_push_button_data(GtkWidget *button, gint nx, gint ny, gint px, gint py);
-void ui_skinned_toggle_button_setup(GtkWidget *button, GtkWidget *fixed, GdkPixmap *parent, GdkGC *gc, gint x, gint y, gint w, gint h, gint nx, gint ny, gint px, gint py, gint pnx, gint pny, gint ppx, gint ppy, SkinPixmapId si);
-void ui_skinned_small_button_setup(GtkWidget *button, GtkWidget *fixed, GdkPixmap *parent, GdkGC *gc, gint x, gint y, gint w, gint h);
+void ui_skinned_toggle_button_setup(GtkWidget *button, GtkWidget *fixed, gint x, gint y, gint w, gint h, gint nx, gint ny, gint px, gint py, gint pnx, gint pny, gint ppx, gint ppy, SkinPixmapId si);
+void ui_skinned_small_button_setup(GtkWidget *button, GtkWidget *fixed, gint x, gint y, gint w, gint h);
 void ui_skinned_button_set_skin_index(GtkWidget *button, SkinPixmapId si);
 void ui_skinned_button_set_skin_index1(GtkWidget *button, SkinPixmapId si);
 void ui_skinned_button_set_skin_index2(GtkWidget *button, SkinPixmapId si);
--- a/src/audacious/ui_skinned_number.c	Sun Jul 08 14:51:01 2007 +0200
+++ b/src/audacious/ui_skinned_number.c	Sun Jul 08 19:56:51 2007 +0200
@@ -111,13 +111,12 @@
     number->img = NULL;
 }
 
-GtkWidget* ui_skinned_number_new(GtkWidget *fixed, GdkPixmap * parent, GdkGC * gc, gint x, gint y, SkinPixmapId si) {
+GtkWidget* ui_skinned_number_new(GtkWidget *fixed, gint x, gint y, SkinPixmapId si) {
     UiSkinnedNumber *number = g_object_new (ui_skinned_number_get_type (), NULL);
 
     number->x = x;
     number->y = y;
     number->num = 0;
-    number->gc = gc;
     number->skin_index = si;
 
     number->fixed = fixed;
@@ -196,12 +195,14 @@
     UiSkinnedNumber *number = UI_SKINNED_NUMBER (widget);
 
     GdkPixmap *obj = NULL;
+    GdkGC *gc;
     obj = gdk_pixmap_new(NULL, number->width, number->height, gdk_rgb_get_visual()->depth);
+    gc = gdk_gc_new(obj);
 
     if (number->num > 11)
         number->num = 10;
 
-    skin_draw_pixmap(bmp_active_skin, obj, number->gc,
+    skin_draw_pixmap(bmp_active_skin, obj, gc,
                      number->skin_index, number->num * 9, 0,
                      0, 0, number->width, number->height);
 
@@ -215,16 +216,17 @@
         GdkImage *img, *img2x;
         img = gdk_drawable_get_image(obj, 0, 0, number->width, number->height);
         img2x = create_dblsize_image(img);
-        gdk_draw_image (number->img, number->gc, img2x, 0, 0, 0, 0, number->width*2, number->height*2);
+        gdk_draw_image (number->img, gc, img2x, 0, 0, 0, 0, number->width*2, number->height*2);
         g_object_unref(img2x);
         g_object_unref(img);
     } else
-        gdk_draw_drawable (number->img, number->gc, obj, 0, 0, 0, 0, number->width, number->height);
+        gdk_draw_drawable (number->img, gc, obj, 0, 0, 0, 0, number->width, number->height);
 
     g_object_unref(obj);
 
-    gdk_draw_drawable (widget->window, number->gc, number->img, 0, 0, 0, 0,
+    gdk_draw_drawable (widget->window, gc, number->img, 0, 0, 0, 0,
                        number->width*(1+number->double_size), number->height*(1+number->double_size));
+    g_object_unref(gc);
     return FALSE;
 }
 
--- a/src/audacious/ui_skinned_number.h	Sun Jul 08 14:51:01 2007 +0200
+++ b/src/audacious/ui_skinned_number.h	Sun Jul 08 19:56:51 2007 +0200
@@ -41,7 +41,6 @@
     gint             num;
     gboolean         double_size;
     GdkPixmap        *img;
-    GdkGC            *gc;
     SkinPixmapId     skin_index;
     GtkWidget        *fixed;
 };
@@ -52,7 +51,7 @@
     void (* doubled)        (UiSkinnedNumber *textbox);
 };
 
-GtkWidget* ui_skinned_number_new (GtkWidget *fixed, GdkPixmap * parent, GdkGC * gc, gint x, gint y, SkinPixmapId si);
+GtkWidget* ui_skinned_number_new (GtkWidget *fixed, gint x, gint y, SkinPixmapId si);
 GtkType ui_skinned_number_get_type(void);
 void ui_skinned_number_set_number(GtkWidget *widget, gint num);
 
--- a/src/audacious/ui_skinned_textbox.c	Sun Jul 08 14:51:01 2007 +0200
+++ b/src/audacious/ui_skinned_textbox.c	Sun Jul 08 19:56:51 2007 +0200
@@ -53,7 +53,6 @@
 
 struct _UiSkinnedTextboxPrivate {
     GdkPixmap        *img;
-    GdkGC            *gc;
     SkinPixmapId     skin_index;
     GtkWidget        *fixed;
     gboolean         double_size;
@@ -180,7 +179,7 @@
     priv->img = NULL;
 }
 
-GtkWidget* ui_skinned_textbox_new(GtkWidget *fixed, GdkPixmap * parent, GdkGC * gc, gint x, gint y, gint w, gboolean allow_scroll, SkinPixmapId si) {
+GtkWidget* ui_skinned_textbox_new(GtkWidget *fixed, gint x, gint y, gint w, gboolean allow_scroll, SkinPixmapId si) {
     UiSkinnedTextbox *textbox = g_object_new (ui_skinned_textbox_get_type (), NULL);
     UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(textbox);
 
@@ -188,7 +187,6 @@
     textbox->x = x;
     textbox->y = y;
     textbox->text = g_strdup("");
-    priv->gc = gc;
     textbox->width = w;
     priv->scroll_allowed = allow_scroll;
     priv->scroll_enabled = TRUE;
@@ -293,6 +291,7 @@
     UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(textbox);
 
     GdkPixmap *obj = NULL;
+    GdkGC *gc;
     gint cw;
 
     if (textbox->text && (!priv->pixmap_text || strcmp(textbox->text, priv->pixmap_text)))
@@ -304,14 +303,15 @@
             textbox_generate_pixmap(textbox);
         }
         obj = gdk_pixmap_new(NULL, textbox->width, textbox->height, gdk_rgb_get_visual()->depth);
+        gc = gdk_gc_new(obj);
 
         if (cfg.twoway_scroll) { // twoway scroll
             cw = priv->pixmap_width - priv->offset;
             if (cw > textbox->width)
                 cw = textbox->width;
-            gdk_draw_drawable(obj, priv->gc, priv->pixmap, priv->offset, 0, 0, 0, cw, textbox->height);
+            gdk_draw_drawable(obj, gc, priv->pixmap, priv->offset, 0, 0, 0, cw, textbox->height);
             if (cw < textbox->width)
-                gdk_draw_drawable(obj, priv->gc, priv->pixmap, 0, 0,
+                gdk_draw_drawable(obj, gc, priv->pixmap, 0, 0,
                                   textbox->x + cw, textbox->y,
                                   textbox->width - cw, textbox->height);
         } else { // oneway scroll
@@ -322,14 +322,14 @@
 
             if (priv->pixmap_width - priv->offset > textbox->width) { // case1
                 cw1 = textbox->width;
-                gdk_draw_drawable(obj, priv->gc, priv->pixmap, priv->offset, 0,
+                gdk_draw_drawable(obj, gc, priv->pixmap, priv->offset, 0,
                                   0, 0, cw1, textbox->height);
             } else { // case 2
                 cw1 = priv->pixmap_width - priv->offset;
-                gdk_draw_drawable(obj, priv->gc, priv->pixmap, priv->offset, 0,
+                gdk_draw_drawable(obj, gc, priv->pixmap, priv->offset, 0,
                                   0, 0, cw1, textbox->height);
                 cw2 = textbox->width - cw1;
-                gdk_draw_drawable(obj, priv->gc, priv->pixmap, 0, 0, cw1, 0, cw2, textbox->height);
+                gdk_draw_drawable(obj, gc, priv->pixmap, 0, 0, cw1, 0, cw2, textbox->height);
             }
 
         }
@@ -343,18 +343,20 @@
         GdkImage *img, *img2x;
         img = gdk_drawable_get_image(obj, 0, 0, textbox->width, textbox->height);
         img2x = create_dblsize_image(img);
-        gdk_draw_image (priv->img, priv->gc, img2x, 0, 0, 0, 0, textbox->width*2, textbox->height*2);
+        gdk_draw_image (priv->img, gc, img2x, 0, 0, 0, 0, textbox->width*2, textbox->height*2);
         g_object_unref(img2x);
         g_object_unref(img);
     } else
-        gdk_draw_drawable (priv->img, priv->gc, obj, 0, 0, 0, 0, textbox->width, textbox->height);
+        gdk_draw_drawable (priv->img, gc, obj, 0, 0, 0, 0, textbox->width, textbox->height);
 
 
         g_object_unref(obj);
+
+        gdk_draw_drawable (widget->window, gc, priv->img, 0, 0, 0, 0,
+                           textbox->width*(1+priv->double_size), textbox->height*(1+priv->double_size));
+        g_object_unref(gc);
     }
 
-    gdk_draw_drawable (widget->window, priv->gc, priv->img, 0, 0, 0, 0,
-                       textbox->width*(1+priv->double_size), textbox->height*(1+priv->double_size));
     return FALSE;
 }
 
@@ -555,7 +557,7 @@
     priv->pixmap = gdk_pixmap_new(mainwin->window, priv->pixmap_width,
                                    textbox->height,
                                    gdk_rgb_get_visual()->depth);
-    gc = priv->gc;
+    gc = gdk_gc_new(priv->pixmap);
     c = skin_get_color(bmp_active_skin, SKIN_TEXTBG);
     for (i = 0; i < textbox->height; i++) {
         gdk_gc_set_foreground(gc, &c[6 * i / textbox->height]);
@@ -588,7 +590,7 @@
         gdk_draw_line(priv->pixmap, gc, 0, i, priv->pixmap_width, i);
     }
     g_object_unref(mask);
-    gdk_gc_set_clip_mask(gc, NULL);
+    g_object_unref(gc);
 }
 
 static gboolean textbox_scroll(gpointer data) {
@@ -706,7 +708,7 @@
     priv->pixmap = gdk_pixmap_new(NULL,
                                      priv->pixmap_width, bmp_active_skin->properties.textbox_bitmap_font_height,
                                      gdk_rgb_get_visual()->depth);
-    gc = priv->gc;
+    gc = gdk_gc_new(priv->pixmap);
 
     for (tmp = stxt = g_utf8_strup(pixmaptext, -1), i = 0;
          tmp != NULL && i < length; i++, tmp = g_utf8_next_char(tmp)) {
@@ -731,6 +733,7 @@
     }
     g_free(stxt);
     g_free(pixmaptext);
+    g_object_unref(gc);
 }
 
 void ui_skinned_textbox_set_scroll(GtkWidget *widget, gboolean scroll) {
--- a/src/audacious/ui_skinned_textbox.h	Sun Jul 08 14:51:01 2007 +0200
+++ b/src/audacious/ui_skinned_textbox.h	Sun Jul 08 19:56:51 2007 +0200
@@ -56,7 +56,7 @@
     void (* redraw)         (UiSkinnedTextbox *textbox);
 };
 
-GtkWidget* ui_skinned_textbox_new (GtkWidget *fixed, GdkPixmap * parent, GdkGC * gc, gint x, gint y, gint w, gboolean allow_scroll, SkinPixmapId si);
+GtkWidget* ui_skinned_textbox_new (GtkWidget *fixed, gint x, gint y, gint w, gboolean allow_scroll, SkinPixmapId si);
 GtkType ui_skinned_textbox_get_type(void);
 void ui_skinned_textbox_set_xfont(GtkWidget *widget, gboolean use_xfont, const gchar * fontname);
 void ui_skinned_textbox_set_text(GtkWidget *widget, const gchar *text);