# HG changeset patch # User William Pitcock # Date 1187464706 18000 # Node ID 38d5745b3b932e789817b8eeaf2e79d98045ac83 # Parent 0b9ff4c95e810083a210879a482e5c7291e7fca2# Parent 9da616784f11102f47ed7bbc68910140431c1a91 Automated merge with ssh://hg.atheme.org//hg/audacious diff -r 0b9ff4c95e81 -r 38d5745b3b93 contrib/lap.py --- a/contrib/lap.py Sat Aug 18 14:17:39 2007 -0500 +++ b/contrib/lap.py Sat Aug 18 14:18:26 2007 -0500 @@ -81,7 +81,7 @@ try: if subprocess.call(['audtool','playlist-addurl',file_url]): print "ERROR: audtool fallback returned an error for: %s" % file_url - else: + elif play: os.system('audtool playlist-jump `audtool playlist-length`; audtool playback-play') except OSError: print "ERROR: Unable to call audtool as a fallback for: %s" % file_url diff -r 0b9ff4c95e81 -r 38d5745b3b93 src/audacious/playlist.c --- a/src/audacious/playlist.c Sat Aug 18 14:17:39 2007 -0500 +++ b/src/audacious/playlist.c Sat Aug 18 14:18:26 2007 -0500 @@ -2504,6 +2504,14 @@ return result; } +static gboolean +playlist_request_win_update(gpointer unused) +{ + Playlist *playlist = playlist_get_active(); + playlistwin_update_list(playlist); + return FALSE; /* to be called only once */ +} + static gpointer playlist_get_info_func(gpointer arg) { @@ -2600,7 +2608,9 @@ } if (update_playlistwin) { - playlistwin_update_list(playlist); + /* we are in a different thread, so we can't do UI updates directly; + instead, schedule a playlist update in the main loop --giacomo */ + g_idle_add_full(G_PRIORITY_HIGH_IDLE, playlist_request_win_update, NULL, NULL); update_playlistwin = FALSE; } diff -r 0b9ff4c95e81 -r 38d5745b3b93 src/audacious/tuple_formatter.c --- a/src/audacious/tuple_formatter.c Sat Aug 18 14:17:39 2007 -0500 +++ b/src/audacious/tuple_formatter.c Sat Aug 18 14:18:26 2007 -0500 @@ -124,16 +124,19 @@ level++; } } - else if (*iter == '}' && (sel == argument)) + else if (*iter == '}') { level--; - if (level == 0) - break; + if (sel == argument) + { + if (level == 0) + break; + else + g_string_append_c(sel, *iter); + } else - g_string_append_c(sel, *iter); + break; } - else if (*iter == '}' && ((sel != argument))) - break; else g_string_append_c(sel, *iter); } @@ -188,16 +191,19 @@ level++; } } - else if (*iter == '}' && (sel == argument)) + else if (*iter == '}') { level--; - if (level == 0) - break; + if (sel == argument) + { + if (level == 0) + break; + else + g_string_append_c(sel, *iter); + } else - g_string_append_c(sel, *iter); + break; } - else if (*iter == '}' && ((sel != argument))) - break; else g_string_append_c(sel, *iter); }