As current viewer does not allow to make unnamed bookmark, it requires
many actions to make new bookmark.
In the following patch, the paragraph number is given as the candidate
for bookmark name.
Please take a look and give me your opinions.
Index: bookmarkform.c
===================================================================
RCS file: /cvs/plucker/plucker_src/viewer/bookmarkform.c,v
retrieving revision 1.18
diff -C3 -r1.18 bookmarkform.c
*** bookmarkform.c 9 Jul 2002 15:45:03 -0000 1.18
--- bookmarkform.c 17 Jul 2002 09:52:11 -0000
***************
*** 22,27 ****
--- 22,28 ----
#include "bookmark.h"
#include "debug.h"
+ #include "document.h"
#include "prefsdata.h"
#include "resourceids.h"
#include "util.h"
***************
*** 61,69 ****
--- 62,79 ----
static void AddBookmarkFormInit( void )
{
FormType* addBookmarkForm;
+ MetaRecord* meta;
+ Int16 paragraph_index, length;
+ Char name[32];
+ meta = MemHandleLock( GetMetaRecord() );
+ paragraph_index = meta->firstVisibleParagraph;
addBookmarkForm = FrmGetFormPtr( frmAddBookmark );
fldPtr = GetObjectPtr( frmAddBookmarkName );
+ StrPrintF(name,"Paragraph %d",paragraph_index);
+ length = StrLen( name );
+ FldInsert( fldPtr, name, length );
+ FldSetSelection( fldPtr, 0, length );
FrmDrawForm( addBookmarkForm );
FrmSetFocus( addBookmarkForm, FrmGetObjectIndex( addBookmarkForm,
frmAddBookmarkName ) );