From 48fad229ae1f033e694a7eb663945a6a3f1f4cb2 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Mon, 10 Aug 2020 17:06:05 -0400 Subject: Dumb renderer now can mark favorites correctly. Placeholder for handling internal links. --- dumb_render.f90 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'dumb_render.f90') diff --git a/dumb_render.f90 b/dumb_render.f90 index be911b7..2f2f2b8 100644 --- a/dumb_render.f90 +++ b/dumb_render.f90 @@ -386,11 +386,21 @@ contains character(*), intent(out)::input - write(*, '(A68)', advance='no') "*** [A]/[Z] PgUp/PgDn | [#] Link | [B] Back | [U] URL | [Q] Quit => " + write(*, '(A67)', advance='no') "*** [A]/[Z] PgUp/Dn | [#] Link | [B] Back | [M] More | [Q] Quit => " read(*, *) input end subroutine prompt_user + subroutine prompt_user_more(input) + implicit none + + character(*), intent(out)::input + + write(*, '(A66)', advance='no') "*** [U] URL | [!] Save/Remove Fave | [F] Goto Faves | [Q] Quit => " + read(*, *) input + + end subroutine prompt_user_more + function dumb_action(self, text) use render, only: render_action_none, render_action_layout, & render_action_goto, render_action_quit @@ -404,6 +414,9 @@ contains integer::link_id, iostatus call prompt_user(input) + if(trim(input) == 'M' .or. trim(input) == 'm') then + call prompt_user_more(input) + end if if(len_trim(input) == 0) then dumb_action = render_action_none @@ -425,6 +438,10 @@ contains else dumb_action = render_action_goto end if + else if(trim(input) == 'M' .or. trim(input) == 'm') then + dumb_action = render_action_none + else if(trim(input) == '!') then + dumb_action = render_action_favorite else read(input, '(I3)', iostat=iostatus) link_id if(iostatus == 0 .and. link_id >= 1 .and. link_id <= self%link_index) then -- cgit v1.2.3