# HG changeset patch # User Yoshiki Yazawa # Date 1185606434 -32400 # Node ID c44eb2f310f0c81362ab56d82138b967bbabfaa4 # Parent dcc92b58f06ed19d1c6f26c900ba676cd08e619a revive dsd's titlebar patch (r3083) due to it works fine with message passing UI update. diff -r dcc92b58f06e -r c44eb2f310f0 src/audacious/ui_main.c --- a/src/audacious/ui_main.c Fri Jul 27 19:44:14 2007 -0500 +++ b/src/audacious/ui_main.c Sat Jul 28 16:07:14 2007 +0900 @@ -166,10 +166,7 @@ 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; @@ -633,10 +630,8 @@ void mainwin_set_song_title(const gchar * title) { - G_LOCK(mainwin_title); - g_free(mainwin_title_text); - mainwin_title_text = make_mainwin_title(title); - G_UNLOCK(mainwin_title); + gchar *mainwin_title_text = make_mainwin_title(title); + gtk_window_set_title(GTK_WINDOW(mainwin), mainwin_title_text); } static void @@ -888,10 +883,7 @@ return; /* clear title */ - G_LOCK(mainwin_title); - g_free(mainwin_title_text); - mainwin_title_text = NULL; - G_UNLOCK(mainwin_title); + mainwin_set_song_title(NULL); /* clear sampling parameters */ playback_set_sample_params(0, 0, 0); @@ -3015,16 +3007,6 @@ 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); - - playlistwin_update_list(playlist_get_active()); - } - /* tristate buttons seek */ if ( seek_state != MAINWIN_SEEK_NIL ) {