Mercurial > audlegacy
changeset 3095:5a7dea5211f3
branch merge
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Tue, 17 Jul 2007 18:33:49 +0900 |
parents | 7fbe8ada95ca (diff) a7e596cf1c3a (current diff) |
children | 8e4da6a4ab91 821a712c08a3 |
files | src/audacious/ui_main.c src/audacious/widgets/hslider.c src/audacious/widgets/hslider.h src/audacious/widgets/menurow.c src/audacious/widgets/menurow.h src/audacious/widgets/monostereo.c src/audacious/widgets/monostereo.h src/audacious/widgets/playstatus.c src/audacious/widgets/playstatus.h src/audacious/widgets/svis.c src/audacious/widgets/svis.h |
diffstat | 1 files changed, 22 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/ui_main.c Mon Jul 16 16:16:33 2007 -0500 +++ b/src/audacious/ui_main.c Tue Jul 17 18:33:49 2007 +0900 @@ -163,7 +163,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; @@ -648,8 +651,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 @@ -901,7 +906,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); @@ -3015,6 +3023,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 ) {