# HG changeset patch # User nenolod # Date 1161633372 25200 # Node ID 1830d09e33bfa917f76fe476a735e855ee8452b3 # Parent 9d53c0faac1b75a345365e60c463f6229e17448e [svn] - integrate A-B patch, with a few changes: + the A-B indicator is not compatible with freeform skins and as such has been removed. once I add textbox_set_text_delayed() i will add a new indicator diff -r 9d53c0faac1b -r 1830d09e33bf ChangeLog --- a/ChangeLog Mon Oct 23 11:42:56 2006 -0700 +++ b/ChangeLog Mon Oct 23 12:56:12 2006 -0700 @@ -1,3 +1,11 @@ +2006-10-23 18:42:56 +0000 William Pitcock + revision [2741] + - add --disable-rpath option to disable hardbinding an rpath to the audacious binaries + + trunk/configure.ac | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + + 2006-10-22 19:12:43 +0000 William Pitcock revision [2739] - use rand() instead diff -r 9d53c0faac1b -r 1830d09e33bf audacious/credits.c --- a/audacious/credits.c Mon Oct 23 11:42:56 2006 -0700 +++ b/audacious/credits.c Mon Oct 23 12:56:12 2006 -0700 @@ -79,6 +79,18 @@ "Tony Vroon", NULL, + N_("Patch authors:"), + "Laszlo Dvornik", + "Mike Frysinger", + "Michael Hanselmann", + "Henrik Johansson", + "Rodrigo Martins de Matos Ventura", + "Diego Pettenò", + "Kazuki Shimura", + "Valentine Sinitsyn", + "Johan Tavelin", + NULL, + N_("0.1.x developers:"), "William Pitcock", "Mohammed Sameer", diff -r 9d53c0faac1b -r 1830d09e33bf audacious/mainwin.c --- a/audacious/mainwin.c Mon Oct 23 11:42:56 2006 -0700 +++ b/audacious/mainwin.c Mon Oct 23 12:56:12 2006 -0700 @@ -220,6 +220,8 @@ static gchar *mainwin_title_text = NULL; static gboolean mainwin_info_text_locked = FALSE; +static int ab_position_a = -1; +static int ab_position_b = -1; static void mainwin_songname_menu_callback(gpointer user_data, guint action, @@ -355,6 +357,11 @@ {"/-", NULL, NULL, 0, "", NULL}, {N_("/Jump to Playlist Start"), "Z", mainwin_general_menu_callback, MAINWIN_GENERAL_START, "", GTK_STOCK_GOTO_TOP}, + {N_("/-"), NULL, NULL, 0, ""}, + {N_("/Set A-B"), "A", mainwin_general_menu_callback, + MAINWIN_GENERAL_SETAB, ""}, + {N_("/Clear A-B"), "S", mainwin_general_menu_callback, + MAINWIN_GENERAL_CLEARAB, ""}, {"/-", NULL, NULL, 0, "", NULL}, {N_("/Jump to File"), "J", mainwin_general_menu_callback, MAINWIN_GENERAL_JTF, "", GTK_STOCK_JUMP_TO}, @@ -2305,6 +2312,8 @@ void mainwin_play_pushed(void) { + if (ab_position_a != -1) + bmp_playback_seek(ab_position_a / 1000); if (bmp_playback_get_paused()) { bmp_playback_pause(); return; @@ -2912,6 +2921,26 @@ case MAINWIN_GENERAL_EXIT: mainwin_quit_cb(); break; + case MAINWIN_GENERAL_SETAB: + if (playlist_get_current_length() != -1) { + if (ab_position_a == -1) { + ab_position_a = bmp_playback_get_time(); + ab_position_b = -1; + } else if (ab_position_b == -1) { + int time = bmp_playback_get_time(); + if (time > ab_position_a) + ab_position_b = time; + } else { + ab_position_a = bmp_playback_get_time(); + ab_position_b = -1; + } + } + break; + case MAINWIN_GENERAL_CLEARAB: + if (playlist_get_current_length() != -1) { + ab_position_a = ab_position_b = -1; + } + break; } } @@ -3704,8 +3733,10 @@ if (bmp_playback_get_playing()) vis_playback_start(); - else + else { vis_playback_stop(); + ab_position_a = ab_position_b = -1; + } draw_main_window(mainwin_force_redraw); diff -r 9d53c0faac1b -r 1830d09e33bf audacious/mainwin.h --- a/audacious/mainwin.h Mon Oct 23 11:42:56 2006 -0700 +++ b/audacious/mainwin.h Mon Oct 23 12:56:12 2006 -0700 @@ -83,7 +83,9 @@ MAINWIN_GENERAL_QUEUE, MAINWIN_GENERAL_CQUEUE, MAINWIN_GENERAL_VOLUP, - MAINWIN_GENERAL_VOLDOWN + MAINWIN_GENERAL_VOLDOWN, + MAINWIN_GENERAL_SETAB, + MAINWIN_GENERAL_CLEARAB }; extern GtkWidget *mainwin;