# HG changeset patch # User Yoshiki Yazawa # Date 1184664534 -32400 # Node ID 7fbe8ada95ca8aba136fc5d80eaf3aaed90aab87 # Parent 7d33bbe11736f8b49cf5a0e407ceddbac66e58e0 Backed out changeset 7d33bbe11736 Since this change causes GUI freeze. diff -r 7d33bbe11736 -r 7fbe8ada95ca src/audacious/ui_main.c --- a/src/audacious/ui_main.c Mon Jul 16 13:31:52 2007 -0500 +++ b/src/audacious/ui_main.c Tue Jul 17 18:28:54 2007 +0900 @@ -162,7 +162,10 @@ static gint mainwin_timeout_id; +G_LOCK_DEFINE_STATIC(mainwin_title); + static gboolean mainwin_force_redraw = FALSE; +static gchar *mainwin_title_text = NULL; static gboolean mainwin_info_text_locked = FALSE; static int ab_position_a = -1; @@ -679,8 +682,10 @@ void mainwin_set_song_title(const gchar * title) { - gchar *mainwin_title_text = make_mainwin_title(title); - gtk_window_set_title(GTK_WINDOW(mainwin), mainwin_title_text); + G_LOCK(mainwin_title); + g_free(mainwin_title_text); + mainwin_title_text = make_mainwin_title(title); + G_UNLOCK(mainwin_title); } static void @@ -928,7 +933,10 @@ return; /* clear title */ - mainwin_set_song_title(NULL); + G_LOCK(mainwin_title); + g_free(mainwin_title_text); + mainwin_title_text = NULL; + G_UNLOCK(mainwin_title); /* clear sampling parameters */ playback_set_sample_params(0, 0, 0); @@ -3102,6 +3110,17 @@ draw_equalizer_window(FALSE); draw_playlist_window(FALSE); + if (mainwin_title_text) { + G_LOCK(mainwin_title); + gtk_window_set_title(GTK_WINDOW(mainwin), mainwin_title_text); + g_free(mainwin_title_text); + mainwin_title_text = NULL; + G_UNLOCK(mainwin_title); + + mainwin_set_info_text(); + playlistwin_update_list(playlist_get_active()); + } + /* tristate buttons seek */ if ( seek_state != MAINWIN_SEEK_NIL ) {