Ignore:
Timestamp:
Apr 27, 2007, 8:55:58 PM (18 years ago)
Author:
RBRi
Message:

new toolbar icons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NewView/MainForm.pas

    r120 r126  
    5757
    5858  MAIN_WINDOW_CLASS_NAME = 'NewViewMainForm';
    59 
    60   PARAM_LINK_NOTE = 'note';
    61   PARAM_LINK_PROGRAM = 'program';
    62   PARAM_LINK_URL = 'url';
    63   PARAM_LINK_EXTERNAL = 'external';
    6459
    6560Type
     
    831826
    832827  // Library
    833 //  ACLStringUtility,
    834828  ACLFileIOUtility,
    835829  ACLUtility,
     
    859853
    860854  // local: others
     855  NewViewConstantsUnit,
    861856  SettingsUnit,
    862857  VersionUnit,
     
    872867  // Coolbar button indexes
    873868  ciOpen = 0;
    874   ciBack = 1;
    875   ciForward = 2;
    876   ciPrint = 3;
    877   ciAddNote = 4;
    878   ciAddBookmark = 5;
    879   ciPrevious = 6;
    880   ciNext = 7;
    881   ciGlobalSearch = 8;
     869  ciPrint = 1;
     870  ciNavigator = 2;
     871  ciBack = 3;
     872  ciForward = 4;
     873  ciAddNote = 5;
     874  ciAddBookmark = 6;
     875  ciPrevious = 7;
     876  ciNext = 8;
     877  ciGlobalSearch = 9;
    882878
    883879  // Page indexes.
     
    13811377    // copy menu hints to toolbar hints
    13821378    Coolbar.Sections[ ciOpen ].Hint := OpenMI.Hint;
     1379    Coolbar.Sections[ ciPrint ].Hint := PrintMI.Hint;
     1380    Coolbar.Sections[ ciNavigator ].Hint := ShowLeftPanelMI.Hint;
    13831381    Coolbar.Sections[ ciBack ].Hint := NavigateBackMI.Hint;
    13841382    Coolbar.Sections[ ciForward ].Hint := NavigateForwardMI.Hint;
    1385     Coolbar.Sections[ ciPrint ].Hint := PrintMI.Hint;
    13861383    Coolbar.Sections[ ciAddNote ].Hint := AddNoteMI.Hint;
    13871384    Coolbar.Sections[ ciAddBookmark ].Hint := AddBookmarkMI.Hint;
     
    15261523  Language.LL( Apply, EditNoteMsg, 'EditNoteMsg', 'Click to edit note' );
    15271524  Language.LL( Apply, ExternalLinkMsg, 'ExternalLinkMsg', 'Link to another file' );
    1528   Language.LL( Apply, LinkMsg, 'LinkMsg', 'Link to ' );
     1525  Language.LL( Apply, LinkMsg, 'LinkMsg', 'Link to' );
    15291526  Language.LL( Apply, UnknownLinkMsg, 'UnknownLinkMsg', 'Unknown link' );
    15301527  Language.LL( Apply, FootnoteMsg, 'FootnoteMsg', 'Footnote' );
     
    31793176    ciOpen:
    31803177      FileOpen;
     3178    ciPrint:
     3179      PrintTopics;
     3180    ciNavigator:
     3181      ShowLeftPanel := not ShowLeftPanel;
    31813182    ciBack:
    31823183      NavigateBack;
    31833184    ciForward:
    31843185      NavigateForward;
    3185     ciPrint:
    3186       PrintTopics;
    31873186    ciAddNote:
    31883187      AddNote;
     
    54135412// TODO check param here
    54145413
    5415     ProgramInfo.readValuesFromSerializedString(StrSubstringFrom(LinkString, Length(PARAM_LINK_PROGRAM) + 1));
     5414    ProgramInfo.readValuesFromSerializedString(StrSubstringFrom(LinkString, Length(PARAM_LINK_PROGRAM) + 2));
    54165415    ProgramPath := ProgramInfo.get(0);
    54175416    ProgramLink := ProgramInfo.get(1);
     
    54235422  else if StrStartsWith(LinkString, PARAM_LINK_URL) then
    54245423  begin
    5425     URL := StrSubstringFrom( LinkString, 5 );
     5424    URL := StrSubstringFrom(LinkString, Length(PARAM_LINK_URL) + 2); //
     5425
    54265426    SetStatus( LinkMsg + URL );
    54275427  end
    54285428  else if StrStartsWith(LinkString, PARAM_LINK_EXTERNAL) then
    54295429  begin
    5430     LinkDetails := StrSubstringFrom(LinkString, 10);
     5430    LinkDetails := StrSubstringFrom(LinkString, Length(PARAM_LINK_EXTERNAL) + 2);
    54315431
    54325432    tmpLinkDetails := TStringList.Create;
     
    54925492  if StrStartsWith(LinkString, PARAM_LINK_NOTE) then
    54935493  begin
    5494     NoteIndex := StrToInt(StrSubstringFrom(LinkString, Length(PARAM_LINK_NOTE) + 1) );
     5494    NoteIndex := StrToInt(StrSubstringFrom(LinkString, Length(PARAM_LINK_NOTE) + 2) );
    54955495    NotesListBox.ItemIndex := NoteIndex;
    54965496    EditNote( NoteIndex );
     
    55125512  else if StrLeft( LinkString, 3 ) = PARAM_LINK_URL then
    55135513  begin
    5514     URL := StrSubstringFrom(LinkString, 5);
     5514    URL := StrSubstringFrom(LinkString, Length(PARAM_LINK_URL) + 2);
    55155515
    55165516    try
     
    55295529  else if StrLeft( LinkString, 8 ) = PARAM_LINK_EXTERNAL then
    55305530  begin
    5531     LinkDetails := StrSubstringFrom( LinkString, 10 );
     5531    LinkDetails := StrSubstringFrom(LinkString, Length(PARAM_LINK_EXTERNAL) + 2);
    55325532
    55335533    tmpLinkDetails := TStringList.Create;
Note: See TracChangeset for help on using the changeset viewer.