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 <fabi...@gmail.com>
---

Le mercredi 18 décembre 2013, Witold Filipczyk a écrit :
> Sorry, I aplied patch1 before patch0.
> Could you prepare new patch with correct order of functions?

That one applies after the one adding move-current-top.

 src/config/actions-main.inc |  4 ++--
 src/viewer/action.c         | 16 ++++++++--------
 src/viewer/text/view.h      |  4 ++--
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/config/actions-main.inc b/src/config/actions-main.inc
index 2e90ddc..abe6fa6 100644
--- a/src/config/actions-main.inc
+++ b/src/config/actions-main.inc
@@ -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-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-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-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),
@@ -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-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-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-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-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),
diff --git a/src/viewer/action.c b/src/viewer/action.c
index d33a4c8..6d15e33 100644
--- a/src/viewer/action.c
+++ b/src/viewer/action.c
@@ -359,6 +359,14 @@ do_action(struct session *ses, enum main_action action_id, 
int verbose)
                        status = move_cursor_line_start(ses, doc_view);
                        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:
                        status = move_link_down(ses, doc_view);
                        break;
@@ -403,18 +411,10 @@ do_action(struct session *ses, enum main_action 
action_id, int verbose)
                        status = move_page_down(ses, doc_view);
                        break;
 
-               case ACT_MAIN_MOVE_HALF_PAGE_DOWN:
-                       status = move_half_page_down(ses, doc_view);
-                       break;
-
                case ACT_MAIN_MOVE_PAGE_UP:
                        status = move_page_up(ses, doc_view);
                        break;
 
-               case ACT_MAIN_MOVE_HALF_PAGE_UP:
-                       status = move_half_page_up(ses, doc_view);
-                       break;
-
                case ACT_MAIN_MOVE_DOCUMENT_START:
                        status = move_document_start(ses, doc_view);
                        break;
diff --git a/src/viewer/text/view.h b/src/viewer/text/view.h
index d560bb5..7c11260 100644
--- a/src/viewer/text/view.h
+++ b/src/viewer/text/view.h
@@ -15,10 +15,10 @@ struct terminal;
 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_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_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,
                                  int direction, int wraparound_bound, int 
wraparound_link);
 
-- 
1.8.5.2

_______________________________________________
elinks-dev mailing list
elinks-dev@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-dev

Reply via email to