lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV Multi bookmarks


From: Drazen Kacar
Subject: LYNX-DEV Multi bookmarks
Date: Mon, 4 Nov 1996 07:40:22 +0100 (MET)

Here goes the rant... Filip, don't let it discourage you :)

First, get rid of [^G^G] thing. You are displaying more than 80 chars to
status line. It is trimmed, but it looks rather bad. And if there really is
a problem with ^G, tell us how to reproduce it, perhaps somebody can do
something about it.

In edit_bookmarks():

   You don't need if(LYlines < 23) check, it was already checked in options().
   Let's try not to print more lines than we have on screen:
      You can print (LYlines - someconstant) lines. Calculate that number and
        put it in some variable, let's say max_book_lines.
      Declare a variable that will tell you on which page of bookmarks you
      are corrently on, book_page with initial value 0.
      Then, in a loop, you can say
         for(a = 0; a < max_book_lines; ++a)
         { ...
           printw("...", TLJ_A_subdescript[a + book_page * max_book_lines);
           ...
         }
      Change things in a main loop for selecting particular bookmark
         while(1)
         {
            response = LYgetch();
            response = TOUPPER(response);
            if(isalpha(response))
            {
               don't go through a loop here, response - 'A' will give you
               offset for indexing arrays.
               Lynx still doesn't do setlocale() call... I think...
                ...
               return;
            }
            switch(response)
            {
               case ' ': increase book_page, but take care that it doesn't
                         grow above max number of pages. Then display
                         next page of bookmark definitions (the last one
                         may not be completely filled).
                         break;
               case 'b': decrease book_page and redisplay. Watch out for
                         similar things as above.
                         break;
               case '>': save things
                         break;
               case 3:
               case 7:
               ...
                         return;
            }
         }
         You get the idea...

         When displaying particular bookmark definition, don't use constant
         field widths, give 1/3rd of width to name and 2/3rds to path.
         You can display with printw("%-.*s", maxwidth, string).
         '-' does left justifying, '.' means that output will have no more
         characters than the following number, '*' means that number will
         not be given as constant, but as a next parameter in function and
         's' means that you are displaying string. Simple? :)

      About displaying the page with bookmarks definitions vs. statusline
      when saving link to bookmark... This is not a question of advanced
      vs. novice user... First time display the page, but make a command
      on it for selecting statusline behaviour. The above switch will have
      to deal with this, too. And make sure that the selection is being saved
      to .lynxrc.

Enough for now?

-- 
Life is a sexually transmitted disease.

address@hidden
address@hidden
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]