Changeset 126 for trunk/NewView/MainForm.pas
- Timestamp:
- Apr 27, 2007, 8:55:58 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NewView/MainForm.pas
r120 r126 57 57 58 58 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';64 59 65 60 Type … … 831 826 832 827 // Library 833 // ACLStringUtility,834 828 ACLFileIOUtility, 835 829 ACLUtility, … … 859 853 860 854 // local: others 855 NewViewConstantsUnit, 861 856 SettingsUnit, 862 857 VersionUnit, … … 872 867 // Coolbar button indexes 873 868 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; 882 878 883 879 // Page indexes. … … 1381 1377 // copy menu hints to toolbar hints 1382 1378 Coolbar.Sections[ ciOpen ].Hint := OpenMI.Hint; 1379 Coolbar.Sections[ ciPrint ].Hint := PrintMI.Hint; 1380 Coolbar.Sections[ ciNavigator ].Hint := ShowLeftPanelMI.Hint; 1383 1381 Coolbar.Sections[ ciBack ].Hint := NavigateBackMI.Hint; 1384 1382 Coolbar.Sections[ ciForward ].Hint := NavigateForwardMI.Hint; 1385 Coolbar.Sections[ ciPrint ].Hint := PrintMI.Hint;1386 1383 Coolbar.Sections[ ciAddNote ].Hint := AddNoteMI.Hint; 1387 1384 Coolbar.Sections[ ciAddBookmark ].Hint := AddBookmarkMI.Hint; … … 1526 1523 Language.LL( Apply, EditNoteMsg, 'EditNoteMsg', 'Click to edit note' ); 1527 1524 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' ); 1529 1526 Language.LL( Apply, UnknownLinkMsg, 'UnknownLinkMsg', 'Unknown link' ); 1530 1527 Language.LL( Apply, FootnoteMsg, 'FootnoteMsg', 'Footnote' ); … … 3179 3176 ciOpen: 3180 3177 FileOpen; 3178 ciPrint: 3179 PrintTopics; 3180 ciNavigator: 3181 ShowLeftPanel := not ShowLeftPanel; 3181 3182 ciBack: 3182 3183 NavigateBack; 3183 3184 ciForward: 3184 3185 NavigateForward; 3185 ciPrint:3186 PrintTopics;3187 3186 ciAddNote: 3188 3187 AddNote; … … 5413 5412 // TODO check param here 5414 5413 5415 ProgramInfo.readValuesFromSerializedString(StrSubstringFrom(LinkString, Length(PARAM_LINK_PROGRAM) + 1));5414 ProgramInfo.readValuesFromSerializedString(StrSubstringFrom(LinkString, Length(PARAM_LINK_PROGRAM) + 2)); 5416 5415 ProgramPath := ProgramInfo.get(0); 5417 5416 ProgramLink := ProgramInfo.get(1); … … 5423 5422 else if StrStartsWith(LinkString, PARAM_LINK_URL) then 5424 5423 begin 5425 URL := StrSubstringFrom( LinkString, 5 ); 5424 URL := StrSubstringFrom(LinkString, Length(PARAM_LINK_URL) + 2); // 5425 5426 5426 SetStatus( LinkMsg + URL ); 5427 5427 end 5428 5428 else if StrStartsWith(LinkString, PARAM_LINK_EXTERNAL) then 5429 5429 begin 5430 LinkDetails := StrSubstringFrom(LinkString, 10);5430 LinkDetails := StrSubstringFrom(LinkString, Length(PARAM_LINK_EXTERNAL) + 2); 5431 5431 5432 5432 tmpLinkDetails := TStringList.Create; … … 5492 5492 if StrStartsWith(LinkString, PARAM_LINK_NOTE) then 5493 5493 begin 5494 NoteIndex := StrToInt(StrSubstringFrom(LinkString, Length(PARAM_LINK_NOTE) + 1) );5494 NoteIndex := StrToInt(StrSubstringFrom(LinkString, Length(PARAM_LINK_NOTE) + 2) ); 5495 5495 NotesListBox.ItemIndex := NoteIndex; 5496 5496 EditNote( NoteIndex ); … … 5512 5512 else if StrLeft( LinkString, 3 ) = PARAM_LINK_URL then 5513 5513 begin 5514 URL := StrSubstringFrom(LinkString, 5);5514 URL := StrSubstringFrom(LinkString, Length(PARAM_LINK_URL) + 2); 5515 5515 5516 5516 try … … 5529 5529 else if StrLeft( LinkString, 8 ) = PARAM_LINK_EXTERNAL then 5530 5530 begin 5531 LinkDetails := StrSubstringFrom( LinkString, 10);5531 LinkDetails := StrSubstringFrom(LinkString, Length(PARAM_LINK_EXTERNAL) + 2); 5532 5532 5533 5533 tmpLinkDetails := TStringList.Create;
Note:
See TracChangeset
for help on using the changeset viewer.