Mercurial > audlegacy
changeset 1893:1830d09e33bf trunk
[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
author | nenolod |
---|---|
date | Mon, 23 Oct 2006 12:56:12 -0700 |
parents | 9d53c0faac1b |
children | 5a357f0941cb |
files | ChangeLog audacious/credits.c audacious/mainwin.c audacious/mainwin.h |
diffstat | 4 files changed, 55 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 <nenolod@nenolod.net> + 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 <nenolod@nenolod.net> revision [2739] - use rand() instead
--- 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",
--- 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, "<Separator>", NULL}, {N_("/Jump to Playlist Start"), "<control>Z", mainwin_general_menu_callback, MAINWIN_GENERAL_START, "<StockItem>", GTK_STOCK_GOTO_TOP}, + {N_("/-"), NULL, NULL, 0, "<Separator>"}, + {N_("/Set A-B"), "A", mainwin_general_menu_callback, + MAINWIN_GENERAL_SETAB, "<Item>"}, + {N_("/Clear A-B"), "S", mainwin_general_menu_callback, + MAINWIN_GENERAL_CLEARAB, "<Item>"}, {"/-", NULL, NULL, 0, "<Separator>", NULL}, {N_("/Jump to File"), "J", mainwin_general_menu_callback, MAINWIN_GENERAL_JTF, "<StockItem>", 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);
--- 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;