1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Respect alphabetical order for the actions

I didn’t respect the right order when I added the functions to move up and down
by half a page a few years ago.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
This commit is contained in:
Fabienne Ducroquet 2013-12-18 15:59:15 +01:00 committed by Witold Filipczyk
parent 5a34763b39
commit 3379fc988c
3 changed files with 12 additions and 12 deletions

View File

@ -61,6 +61,8 @@ ACTION_(MAIN, "move-cursor-right", MOVE_CURSOR_RIGHT, N__("Move cursor right"),
ACTION_(MAIN, "move-cursor-up", MOVE_CURSOR_UP, N__("Move cursor up"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-cursor-up", MOVE_CURSOR_UP, N__("Move cursor up"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "move-document-end", MOVE_DOCUMENT_END, N__("Move to the end of the document"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-document-end", MOVE_DOCUMENT_END, N__("Move to the end of the document"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "move-document-start", MOVE_DOCUMENT_START, N__("Move to the start of the document"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-document-start", MOVE_DOCUMENT_START, N__("Move to the start of the document"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "move-half-page-down", MOVE_HALF_PAGE_DOWN, N__("Move downwards by half a page"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "move-half-page-up", MOVE_HALF_PAGE_UP, N__("Move upwards by half a page"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "move-link-down", MOVE_LINK_DOWN, N__("Move one link down"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-link-down", MOVE_LINK_DOWN, N__("Move one link down"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "move-link-down-line", MOVE_LINK_DOWN_LINE, N__("Move to the next line with a link"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-link-down-line", MOVE_LINK_DOWN_LINE, N__("Move to the next line with a link"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "move-link-left", MOVE_LINK_LEFT, N__("Move one link left"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-link-left", MOVE_LINK_LEFT, N__("Move one link left"), ACTION_REQUIRE_VIEW_STATE),
@ -72,9 +74,7 @@ ACTION_(MAIN, "move-link-right-line", MOVE_LINK_RIGHT_LINE, N__("Move one link r
ACTION_(MAIN, "move-link-up", MOVE_LINK_UP, N__("Move one link up"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-link-up", MOVE_LINK_UP, N__("Move one link up"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "move-link-up-line", MOVE_LINK_UP_LINE, N__("Move to the previous line with a link"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-link-up-line", MOVE_LINK_UP_LINE, N__("Move to the previous line with a link"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "move-page-down", MOVE_PAGE_DOWN, N__("Move downwards by a page"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-page-down", MOVE_PAGE_DOWN, N__("Move downwards by a page"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "move-half-page-down", MOVE_HALF_PAGE_DOWN, N__("Move downwards by half a page"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "move-page-up", MOVE_PAGE_UP, N__("Move upwards by a page"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-page-up", MOVE_PAGE_UP, N__("Move upwards by a page"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "move-half-page-up", MOVE_HALF_PAGE_UP, N__("Move upwards by half a page"), ACTION_REQUIRE_VIEW_STATE),
ACTION_(MAIN, "open-link-in-new-tab", OPEN_LINK_IN_NEW_TAB, N__("Open the current link in a new tab"), ACTION_REQUIRE_VIEW_STATE | ACTION_JUMP_TO_LINK | ACTION_REQUIRE_LINK), ACTION_(MAIN, "open-link-in-new-tab", OPEN_LINK_IN_NEW_TAB, N__("Open the current link in a new tab"), ACTION_REQUIRE_VIEW_STATE | ACTION_JUMP_TO_LINK | ACTION_REQUIRE_LINK),
ACTION_(MAIN, "open-link-in-new-tab-in-background", OPEN_LINK_IN_NEW_TAB_IN_BACKGROUND, N__("Open the current link in a new tab in the background"), ACTION_REQUIRE_VIEW_STATE | ACTION_JUMP_TO_LINK | ACTION_REQUIRE_LINK), ACTION_(MAIN, "open-link-in-new-tab-in-background", OPEN_LINK_IN_NEW_TAB_IN_BACKGROUND, N__("Open the current link in a new tab in the background"), ACTION_REQUIRE_VIEW_STATE | ACTION_JUMP_TO_LINK | ACTION_REQUIRE_LINK),
ACTION_(MAIN, "open-link-in-new-window", OPEN_LINK_IN_NEW_WINDOW, N__("Open the current link in a new window"), ACTION_RESTRICT_ANONYMOUS | ACTION_REQUIRE_VIEW_STATE | ACTION_JUMP_TO_LINK | ACTION_REQUIRE_LINK), ACTION_(MAIN, "open-link-in-new-window", OPEN_LINK_IN_NEW_WINDOW, N__("Open the current link in a new window"), ACTION_RESTRICT_ANONYMOUS | ACTION_REQUIRE_VIEW_STATE | ACTION_JUMP_TO_LINK | ACTION_REQUIRE_LINK),

View File

@ -359,6 +359,14 @@ do_action(struct session *ses, enum main_action action_id, int verbose)
status = move_cursor_line_start(ses, doc_view); status = move_cursor_line_start(ses, doc_view);
break; break;
case ACT_MAIN_MOVE_HALF_PAGE_DOWN:
status = move_half_page_down(ses, doc_view);
break;
case ACT_MAIN_MOVE_HALF_PAGE_UP:
status = move_half_page_up(ses, doc_view);
break;
case ACT_MAIN_MOVE_LINK_DOWN: case ACT_MAIN_MOVE_LINK_DOWN:
status = move_link_down(ses, doc_view); status = move_link_down(ses, doc_view);
break; break;
@ -403,18 +411,10 @@ do_action(struct session *ses, enum main_action action_id, int verbose)
status = move_page_down(ses, doc_view); status = move_page_down(ses, doc_view);
break; break;
case ACT_MAIN_MOVE_HALF_PAGE_DOWN:
status = move_half_page_down(ses, doc_view);
break;
case ACT_MAIN_MOVE_PAGE_UP: case ACT_MAIN_MOVE_PAGE_UP:
status = move_page_up(ses, doc_view); status = move_page_up(ses, doc_view);
break; break;
case ACT_MAIN_MOVE_HALF_PAGE_UP:
status = move_half_page_up(ses, doc_view);
break;
case ACT_MAIN_MOVE_DOCUMENT_START: case ACT_MAIN_MOVE_DOCUMENT_START:
status = move_document_start(ses, doc_view); status = move_document_start(ses, doc_view);
break; break;

View File

@ -15,10 +15,10 @@ struct terminal;
void detach_formatted(struct document_view *doc_view); void detach_formatted(struct document_view *doc_view);
enum frame_event_status move_current_top(struct session *ses, struct document_view *doc_view); enum frame_event_status move_current_top(struct session *ses, struct document_view *doc_view);
enum frame_event_status move_page_down(struct session *ses, struct document_view *doc_view);
enum frame_event_status move_half_page_down(struct session *ses, struct document_view *doc_view); enum frame_event_status move_half_page_down(struct session *ses, struct document_view *doc_view);
enum frame_event_status move_page_up(struct session *ses, struct document_view *doc_view);
enum frame_event_status move_half_page_up(struct session *ses, struct document_view *doc_view); enum frame_event_status move_half_page_up(struct session *ses, struct document_view *doc_view);
enum frame_event_status move_page_down(struct session *ses, struct document_view *doc_view);
enum frame_event_status move_page_up(struct session *ses, struct document_view *doc_view);
enum frame_event_status move_link(struct session *ses, struct document_view *doc_view, enum frame_event_status move_link(struct session *ses, struct document_view *doc_view,
int direction, int wraparound_bound, int wraparound_link); int direction, int wraparound_bound, int wraparound_link);