浏览代码

* Switch FV to resourcestrings

git-svn-id: trunk@5639 -
daniel 18 年之前
父节点
当前提交
c3773e07c0
共有 10 个文件被更改,包括 233 次插入134 次删除
  1. 10 9
      fv/app.pas
  2. 1 1
      fv/buildfv.pas
  3. 16 0
      fv/dialogs.pas
  4. 91 54
      fv/editors.pas
  5. 15 9
      fv/msgbox.pas
  6. 2 0
      fv/resource.pas
  7. 2 2
      fv/statuses.pas
  8. 80 49
      fv/stddlg.pas
  9. 1 1
      fv/timeddlg.pas
  10. 15 9
      ide/wviews.pas

+ 10 - 9
fv/app.pas

@@ -351,8 +351,11 @@ CONST
                                 IMPLEMENTATION
 {<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>}
 
-  uses
-    Mouse,Resource;
+uses    Mouse{,Resource};
+
+resourcestring  sVideoFailed='Video initialization failed.';
+                sTypeExitOnReturn='Type EXIT to return...';
+
 
 {***************************************************************************}
 {                        PRIVATE DEFINED CONSTANTS                          }
@@ -974,18 +977,16 @@ CONSTRUCTOR TApplication.Init;
 
 BEGIN
 {   InitMemory;}                                              { Start memory up }
-   if not(InitResource) then
+{   if not(InitResource) then
      begin
        writeln('Fatal: Can''t init resources');
        halt(1);
-     end;
+     end;}
    initkeyboard;
    if not Drivers.InitVideo then                              { Start video up }
      begin
        donekeyboard;
-       {Initresource might have failed.}
-       if strings<>nil then
-         writeln(strings^.get(sVideoFailed));
+       writeln(sVideoFailed);
        halt(1);
      end;
    Drivers.InitEvents;                                        { Start event drive }
@@ -1010,7 +1011,7 @@ BEGIN
    drivers.donevideo;
 {   DoneMemory;}                                       { Close memory }
    donekeyboard;
-   DoneResource;
+{   DoneResource;}
 END;
 
 {--TApplication-------------------------------------------------------------}
@@ -1097,7 +1098,7 @@ END;
 procedure TApplication.WriteShellMsg;
 
 begin
-  writeln(Strings^.Get(sTypeExitOnReturn));
+  writeln(sTypeExitOnReturn);
 end;
 
 

+ 1 - 1
fv/buildfv.pas

@@ -10,7 +10,7 @@ uses
   drivers,
 {  memory,}
   fvconsts,
-  resource,
+{  resource,}
   views,
   validate,
   msgbox,

+ 16 - 0
fv/dialogs.pas

@@ -1009,6 +1009,22 @@ CONST
     Load    : @TModalInputLine.Load;
     Store   : @TModalInputLine.Store);
 
+resourcestring  slCancel='Cancel';
+                slOk='O~k~';
+                slYes='~Y~es';
+                slNo='~N~o';
+
+                slHelp='~H~elp';
+                slName='~N~ame';
+
+                slOpen='~O~pen';
+                slClose='~C~lose';
+                slCloseAll='Cl~o~se all';
+
+                slSave='~S~ave';
+                slSaveAll='Save a~l~l';
+                slSaveAs='S~a~ve as...';
+                slSaveFileAs='~S~ave file as';
 
 {<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>}
                                 IMPLEMENTATION

+ 91 - 54
fv/editors.pas

@@ -403,11 +403,48 @@ procedure RegisterEditors;
 implementation
 
 uses
-  Dos, App, StdDlg, MsgBox, Resource;
+  Dos, App, StdDlg, MsgBox{, Resource};
 
 type
   pword = ^word;
 
+resourcestring  sClipboard='Clipboard';
+                sFileCreateError='Error creating file %s';
+                sFileReadError='Error reading file %s';
+                sFileUntitled='Save untitled file?';
+                sFileWriteError='Error writing to file %s';
+                sFind='Find';
+                sJumpTo='Jump To';
+                sModified=''#3'%s'#13#10#13#3'has been modified.  Save?';
+                sOutOfMemory='Not enough memory for this operation.';
+                sPasteNotPossible='Wordwrap on:  Paste not possible in current margins when at end of line.';
+                sReformatDocument='Reformat Document';
+                sReformatNotPossible='Paragraph reformat not possible while trying to wrap current line with current margins.';
+                sReformattingTheDocument='Reformatting the document:';
+                sReplaceNotPossible='Wordwrap on:  Replace not possible in current margins when at end of line.';
+                sReplaceThisOccurence='Replace this occurence?';
+                sRightMargin='Right Margin';
+                sSearchStringNotFound='Search string not found.';
+                sSelectWhereToBegin='Please select where to begin.';
+                sSetting='Setting:';
+                sTabSettings='Tab Settings';
+                sUnknownDialog='Unknown dialog requested!';
+                sUntitled='Untitled';
+                sWordWrapNotPossible='Wordwrap on:  Wordwrap not possible in current margins with continuous line.';
+                sWordWrapOff='You must turn on wordwrap before you can reformat.';
+
+                slCaseSensitive='~C~ase sensitive';
+                slCurrentLine='~C~urrent line';
+                slEntireDocument='~E~ntire document';
+                slLineNumber='~L~ine number';
+                slNewText='~N~ew text';
+                slPromptOnReplace='~P~rompt on replace';
+                slReplace='~R~eplace';
+                slReplaceAll='~R~eplace all';
+                slTextToFind='~T~ext to find';
+                slWholeWordsOnly='~W~hole words only';
+
+
 CONST
   { Update flag constants. }
   ufUpdate = $01;
@@ -575,7 +612,7 @@ var
   R: TRect;
 begin
   R.Assign(0, 0, 38, 12);
-  D := New(PDialog, Init(R, strings^.get(sFind)));
+  D := New(PDialog, Init(R,sFind));
   with D^ do
   begin
     Options := Options or ofCentered;
@@ -585,24 +622,24 @@ begin
     Control^.HelpCtx := hcDFindText;
     Insert(Control);
     R.Assign(2, 2, 15, 3);
-    Insert(New(PLabel, Init(R, labels^.get(slTextToFind), Control)));
+    Insert(New(PLabel, Init(R, slTextToFind, Control)));
     R.Assign(32, 3, 35, 4);
     Insert(New(PHistory, Init(R, PInputLine(Control), 10)));
 
     R.Assign(3, 5, 35, 7);
     Control := New(PCheckBoxes, Init(R,
-        NewSItem (labels^.get(slCaseSensitive),
-        NewSItem (labels^.get(slWholeWordsOnly),nil))));
+        NewSItem (slCaseSensitive,
+        NewSItem (slWholeWordsOnly,nil))));
     Control^.HelpCtx := hcCCaseSensitive;
     Insert(Control);
 
     R.Assign(14, 9, 24, 11);
-    Control := New (PButton, Init(R,labels^.get(slOK),cmOk,bfDefault));
+    Control := New (PButton, Init(R,slOK,cmOk,bfDefault));
     Control^.HelpCtx := hcDOk;
     Insert (Control);
 
     Inc(R.A.X, 12); Inc(R.B.X, 12);
-    Control := New (PButton, Init(R,labels^.get(slCancel),cmCancel, bfNormal));
+    Control := New (PButton, Init(R,slCancel,cmCancel, bfNormal));
     Control^.HelpCtx := hcDCancel;
     Insert (Control);
 
@@ -619,7 +656,7 @@ var
   R: TRect;
 begin
   R.Assign(0, 0, 40, 16);
-  D := New(PDialog, Init(R,labels^.get(slReplace)));
+  D := New(PDialog, Init(R,slReplace));
   with D^ do
   begin
     Options := Options or ofCentered;
@@ -629,7 +666,7 @@ begin
     Control^.HelpCtx := hcDFindText;
     Insert(Control);
     R.Assign(2, 2, 15, 3);
-    Insert(New(PLabel, Init(R,labels^.get(slTextToFind), Control)));
+    Insert(New(PLabel, Init(R,slTextToFind, Control)));
     R.Assign(34, 3, 37, 4);
     Insert(New(PHistory, Init(R, PInputLine(Control), 10)));
 
@@ -638,26 +675,26 @@ begin
     Control^.HelpCtx := hcDReplaceText;
     Insert(Control);
     R.Assign(2, 5, 12, 6);
-    Insert(New(PLabel, Init(R,labels^.get(slNewText), Control)));
+    Insert(New(PLabel, Init(R,slNewText, Control)));
     R.Assign(34, 6, 37, 7);
     Insert(New(PHistory, Init(R, PInputLine(Control), 11)));
 
     R.Assign(3, 8, 37, 12);
     Control := New (Dialogs.PCheckBoxes, Init (R,
-      NewSItem (labels^.get(slCasesensitive),
-      NewSItem (labels^.get(slWholewordsonly),
-      NewSItem (labels^.get(slPromptonreplace),
-      NewSItem (labels^.get(slReplaceall), nil))))));
+      NewSItem (slCasesensitive,
+      NewSItem (slWholewordsonly,
+      NewSItem (slPromptonreplace,
+      NewSItem (slReplaceall, nil))))));
     Control^.HelpCtx := hcCCaseSensitive;
     Insert (Control);
 
     R.Assign (8, 13, 18, 15);
-    Control := New (PButton, Init (R,labels^.get(slOK), cmOk, bfDefault));
+    Control := New (PButton, Init (R,slOK, cmOk, bfDefault));
     Control^.HelpCtx := hcDOk;
     Insert (Control);
 
     R.Assign (22, 13, 32, 15);
-    Control := New (PButton, Init (R,labels^.get(slCancel), cmCancel, bfNormal));
+    Control := New (PButton, Init (R,slCancel, cmCancel, bfNormal));
     Control^.HelpCtx := hcDCancel;
     Insert (Control);
 
@@ -674,13 +711,13 @@ VAR
   Control: PView;
 Begin
   R.Assign (0, 0, 26, 8);
-  D := New(PDialog, Init(R,strings^.get(sJumpTo)));
+  D := New(PDialog, Init(R,sJumpTo));
   with D^ do
     begin
       Options := Options or ofCentered;
 
       R.Assign (3, 2, 15, 3);
-      Control := New (Dialogs.PStaticText, Init (R,labels^.get(slLineNumber)));
+      Control := New (Dialogs.PStaticText, Init (R,slLineNumber));
       Insert (Control);
 
       R.Assign (15, 2, 21, 3);
@@ -692,12 +729,12 @@ Begin
       Insert (New (Dialogs.PHistory, Init (R, Dialogs.PInputLine (Control), 12)));
 
       R.Assign (2, 5, 12, 7);
-      Control := New (Dialogs.PButton, Init (R, labels^.get(slOK), cmOK, Dialogs.bfDefault));
+      Control := New (Dialogs.PButton, Init (R, slOK, cmOK, Dialogs.bfDefault));
       Control^.HelpCtx := hcDOk;
       Insert (Control);
 
       R.Assign (14, 5, 24, 7);
-      Control := New (Dialogs.PButton, Init (R, labels^.get(slCancel), cmCancel, Dialogs.bfNormal));
+      Control := New (Dialogs.PButton, Init (R, slCancel, cmCancel, Dialogs.bfNormal));
       Control^.HelpCtx := hcDCancel;
       Insert (Control);
 
@@ -716,37 +753,37 @@ VAR
   Control      : PView;
 Begin
   R.Assign (0, 0, 32, 11);
-  D := New (Dialogs.PDialog, Init (R, strings^.get(sReformatDocument)));
+  D := New (Dialogs.PDialog, Init (R, sReformatDocument));
   with D^ do
     begin
       Options := Options or ofCentered;
 
       R.Assign (2, 2, 30, 3);
-      Control := New (Dialogs.PStaticText, Init (R, strings^.get(sSelectWhereToBegin)));
+      Control := New (Dialogs.PStaticText, Init (R, sSelectWhereToBegin));
       Insert (Control);
 
       R.Assign (3, 3, 29, 4);
-      Control := New (Dialogs.PStaticText, Init (R, strings^.get(sReformattingTheDocument)));
+      Control := New (Dialogs.PStaticText, Init (R, sReformattingTheDocument));
       Insert (Control);
 
       R.Assign (50, 5, 68, 6);
-      Control := New (Dialogs.PLabel, Init (R, strings^.get(sReformatDocument), Control));
+      Control := New (Dialogs.PLabel, Init (R, sReformatDocument, Control));
       Insert (Control);
 
       R.Assign (5, 5, 26, 7);
       Control := New (Dialogs.PRadioButtons, Init (R,
-        NewSItem (labels^.get(slCurrentLine),
-        NewSItem (labels^.get(slEntireDocument), Nil))));
+        NewSItem (slCurrentLine,
+        NewSItem (slEntireDocument, Nil))));
       Control^.HelpCtx := hcDReformDoc;
       Insert (Control);
 
       R.Assign (4, 8, 14, 10);
-      Control := New (Dialogs.PButton, Init (R,labels^.get(slOK), cmOK, Dialogs.bfDefault));
+      Control := New (Dialogs.PButton, Init (R, slOK, cmOK, Dialogs.bfDefault));
       Control^.HelpCtx := hcDOk;
       Insert (Control);
 
       R.Assign (17, 8, 27, 10);
-      Control := New (Dialogs.PButton, Init (R, labels^.get(slCancel), cmCancel, Dialogs.bfNormal));
+      Control := New (Dialogs.PButton, Init (R, slCancel, cmCancel, Dialogs.bfNormal));
       Control^.HelpCtx := hcDCancel;
       Insert (Control);
 
@@ -765,13 +802,13 @@ VAR
   Control  : PView;
 Begin
   R.Assign (0, 0, 26, 8);
-  D := New (Dialogs.PDialog, Init (R, strings^.get(sRightMargin)));
+  D := New (Dialogs.PDialog, Init (R, sRightMargin));
   with D^ do
     begin
       Options := Options or ofCentered;
 
       R.Assign (5, 2, 13, 3);
-      Control := New (Dialogs.PStaticText, Init (R, strings^.get(sSetting)));
+      Control := New (Dialogs.PStaticText, Init (R, sSetting));
       Insert (Control);
 
       R.Assign (13, 2, 18, 3);
@@ -783,12 +820,12 @@ Begin
       Insert (New (Dialogs.PHistory, Init (R, Dialogs.PInputLine (Control), 13)));
 
       R.Assign (2, 5, 12, 7);
-      Control := New (Dialogs.PButton, Init (R, labels^.get(slOK), cmOK, Dialogs.bfDefault));
+      Control := New (Dialogs.PButton, Init (R, slOK, cmOK, Dialogs.bfDefault));
       Control^.HelpCtx := hcDOk;
       Insert (Control);
 
       R.Assign (14, 5, 24, 7);
-      Control := New (Dialogs.PButton, Init (R, labels^.get(slCancel), cmCancel, Dialogs.bfNormal));
+      Control := New (Dialogs.PButton, Init (R, slCancel, cmCancel, Dialogs.bfNormal));
       Control^.HelpCtx := hcDCancel;
       Insert (Control);
 
@@ -809,7 +846,7 @@ VAR
   Tab_Stop   : String[2];        { Local string to print tab column number. }
 Begin
   R.Assign (0, 0, 80, 8);
-  D := New (Dialogs.PDialog, Init (R, strings^.get(sTabSettings)));
+  D := New (Dialogs.PDialog, Init (R, sTabSettings));
   with D^ do
     begin
       Options := Options or ofCentered;
@@ -836,12 +873,12 @@ Begin
       Insert (New (Dialogs.PHistory, Init (R, Dialogs.PInputLine (Control), 14)));
 
       R.Assign (27, 5, 37, 7);
-      Control := New (Dialogs.PButton, Init (R, labels^.get(slOK), cmOK, Dialogs.bfDefault));
+      Control := New (Dialogs.PButton, Init (R, slOK, cmOK, Dialogs.bfDefault));
       Control^.HelpCtx := hcDOk;
       Insert (Control);
 
       R.Assign (42, 5, 52, 7);
-      Control := New (Dialogs.PButton, Init (R, labels^.get(slCancel), cmCancel, Dialogs.bfNormal));
+      Control := New (Dialogs.PButton, Init (R, slCancel, cmCancel, Dialogs.bfNormal));
       Control^.HelpCtx := hcDCancel;
       Insert (Control);
       SelectNext (False);
@@ -857,24 +894,24 @@ var
 begin
   case Dialog of
     edOutOfMemory:
-      StdEditorDialog := MessageBox(strings^.get(sOutOfMemory), nil, mfError + mfOkButton);
+      StdEditorDialog := MessageBox(sOutOfMemory, nil, mfError + mfOkButton);
     edReadError:
-      StdEditorDialog := MessageBox(strings^.get(sFileReadError), @Info, mfError + mfOkButton);
+      StdEditorDialog := MessageBox(sFileReadError, @Info, mfError + mfOkButton);
     edWriteError:
-      StdEditorDialog := MessageBox(strings^.get(sFileWriteError), @Info, mfError + mfOkButton);
+      StdEditorDialog := MessageBox(sFileWriteError, @Info, mfError + mfOkButton);
     edCreateError:
-      StdEditorDialog := MessageBox(strings^.get(sFileCreateError), @Info, mfError + mfOkButton);
+      StdEditorDialog := MessageBox(sFileCreateError, @Info, mfError + mfOkButton);
     edSaveModify:
-      StdEditorDialog := MessageBox(strings^.get(sModified), @Info, mfInformation + mfYesNoCancel);
+      StdEditorDialog := MessageBox(sModified, @Info, mfInformation + mfYesNoCancel);
     edSaveUntitled:
-      StdEditorDialog := MessageBox(strings^.get(sFileUntitled), nil, mfInformation + mfYesNoCancel);
+      StdEditorDialog := MessageBox(sFileUntitled, nil, mfInformation + mfYesNoCancel);
     edSaveAs:
       StdEditorDialog := Application^.ExecuteDialog(New(PFileDialog, Init('*.*',
-        labels^.get(slSaveFileAs), labels^.get(slName), fdOkButton, 101)), Info);
+        slSaveFileAs, slName, fdOkButton, 101)), Info);
     edFind:
       StdEditorDialog := Application^.ExecuteDialog(CreateFindDialog, Info);
     edSearchFailed:
-      StdEditorDialog := MessageBox(strings^.get(sSearchStringNotFound), nil, mfError + mfOkButton);
+      StdEditorDialog := MessageBox(sSearchStringNotFound, nil, mfError + mfOkButton);
     edReplace:
       StdEditorDialog := Application^.ExecuteDialog(CreateReplaceDialog, Info);
     edReplacePrompt:
@@ -886,7 +923,7 @@ begin
         Inc(T.Y);
         if PPoint(Info)^.Y <= T.Y then
           R.Move(0, Desktop^.Size.Y - R.B.Y - 2);
-        StdEditorDialog := MessageBoxRect(R, strings^.get(sReplaceThisOccurence),
+        StdEditorDialog := MessageBoxRect(R, sReplaceThisOccurence,
           nil, mfYesNoCancel + mfInformation);
       end;
     edJumpToLine:
@@ -894,21 +931,21 @@ begin
     edSetTabStops:
       StdEditorDialog := Application^.ExecuteDialog(TabStopDialog, Info);
     edPasteNotPossible:
-      StdEditorDialog := MessageBox (strings^.get(sPasteNotPossible), nil, mfError + mfOkButton);
+      StdEditorDialog := MessageBox (sPasteNotPossible, nil, mfError + mfOkButton);
     edReformatDocument:
       StdEditorDialog := Application^.ExecuteDialog(ReformDocDialog, Info);
     edReformatNotAllowed:
-      StdEditorDialog := MessageBox (strings^.get(sWordWrapOff), nil, mfError + mfOkButton);
+      StdEditorDialog := MessageBox (sWordWrapOff, nil, mfError + mfOkButton);
     edReformNotPossible:
-      StdEditorDialog := MessageBox (strings^.get(sReformatNotPossible), nil, mfError + mfOkButton);
+      StdEditorDialog := MessageBox (sReformatNotPossible, nil, mfError + mfOkButton);
     edReplaceNotPossible:
-      StdEditorDialog := MessageBox (strings^.get(sReplaceNotPossible), nil, mfError + mfOkButton);
+      StdEditorDialog := MessageBox (sReplaceNotPossible, nil, mfError + mfOkButton);
     edRightMargin:
       StdEditorDialog := Application^.ExecuteDialog(RightMarginDialog, Info);
     edWrapNotPossible:
-      StdEditorDialog := MessageBox (strings^.get(sWordWrapNotPossible), nil, mfError + mfOKButton);
+      StdEditorDialog := MessageBox (sWordWrapNotPossible, nil, mfError + mfOKButton);
   else
-    StdEditorDialog := MessageBox (strings^.get(sUnknownDialog), nil, mfError + mfOkButton);
+    StdEditorDialog := MessageBox (sUnknownDialog, nil, mfError + mfOkButton);
   end;
 end;
 
@@ -1119,8 +1156,8 @@ begin
     IScan := NotFoundValue
   else
     IScan := numb - pred(len);
-end; 
-  
+end;
+
 
 {****************************************************************************
                                  TIndicator
@@ -3696,10 +3733,10 @@ end; { TEditWindow.Close }
 function TEditWindow.GetTitle (MaxSize : Sw_Integer) : TTitleStr;
 begin
   if Editor^.IsClipboard then
-    GetTitle := strings^.get(sClipboard)
+    GetTitle := sClipboard
   else
     if Editor^.FileName = '' then
-      GetTitle := strings^.get(sUntitled)
+      GetTitle := sUntitled
     else
       GetTitle := Editor^.FileName;
 end; { TEditWindow.GetTile }

+ 15 - 9
fv/msgbox.pas

@@ -162,7 +162,7 @@ FUNCTION InputBoxRect (Var Bounds: TRect; Const Title, ALabel: String;
                                 IMPLEMENTATION
 {<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>}
 
-USES Drivers, Views, App, Resource;                    { Standard GFV units }
+USES Drivers, Views, App{, Resource};                    { Standard GFV units }
 
 {***************************************************************************}
 {                            INTERFACE ROUTINES                             }
@@ -174,6 +174,12 @@ const
 var
   ButtonName: array[0..3] of string[40];
 
+resourcestring  sConfirm='Confirm';
+                sError='Error';
+                sInformation='Information';
+                sWarning='Warning';
+
+
 {---------------------------------------------------------------------------}
 {  MessageBox -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 30Sep99 LdB        }
 {---------------------------------------------------------------------------}
@@ -292,14 +298,14 @@ END;
 
 procedure InitMsgBox;
 begin
-  ButtonName[0] := Labels^.Get(slYes);
-  ButtonName[1] := Labels^.Get(slNo);
-  ButtonName[2] := Labels^.Get(slOk);
-  ButtonName[3] := Labels^.Get(slCancel);
-  MsgBoxTitles[0] := Strings^.Get(sWarning);
-  MsgBoxTitles[1] := Strings^.Get(sError);
-  MsgBoxTitles[2] := Strings^.Get(sInformation);
-  MsgBoxTitles[3] := Strings^.Get(sConfirm);
+  ButtonName[0] := slYes;
+  ButtonName[1] := slNo;
+  ButtonName[2] := slOk;
+  ButtonName[3] := slCancel;
+  MsgBoxTitles[0] := sWarning;
+  MsgBoxTitles[1] := sError;
+  MsgBoxTitles[2] := sInformation;
+  MsgBoxTitles[3] := sConfirm;
 end;
 
 procedure DoneMsgBox;

+ 2 - 0
fv/resource.pas

@@ -1,3 +1,5 @@
+
+asjgfsdkjsfld
 { Resource Unit
 
   Programmer: Brad Williams

+ 2 - 2
fv/statuses.pas

@@ -66,8 +66,8 @@ interface
 
 uses
 
-  FVCommon, FVConsts, Objects, Drivers, Views, Dialogs,
-  Resource;
+  FVCommon, FVConsts, Objects, Drivers, Views, Dialogs;
+{  Resource;}
 
 const
 

+ 80 - 49
fv/stddlg.pas

@@ -388,7 +388,7 @@ function IsList(const S: String): Boolean;
 function IsDir(const S: String): Boolean;
   { IsDir returns True if S is a valid DOS directory. }
 
-procedure MakeResources;
+{procedure MakeResources;}
   { MakeResources places a language specific version of all resources
     needed for the StdDlg unit to function on the RezFile using the string
     constants and variables in the Resource unit.  The Resource unit and the
@@ -560,7 +560,7 @@ implementation
 {****************************************************************************}
 
 uses
-  App, {Memory,} HistList, MsgBox, Resource;
+  App, {Memory,} HistList, MsgBox{, Resource};
 
 type
 
@@ -570,6 +570,39 @@ type
     AString : PString;
   end;
 
+resourcestring  sChangeDirectory='Change Directory';
+                sDeleteFile='Delete file?'#13#10#13#3'%s';
+                sDirectory='Directory';
+                sDrives='Drives';
+                sInvalidDirectory='Invalid directory.';
+                sInvalidDriveOrDir='Invalid drive or directory.';
+                sInvalidFileName='Invalid file name.';
+                sOpen='Open';
+                sReplaceFile='Replace file?'#13#10#13#3'%s';
+                sSaveAs='Save As';
+                sTooManyFiles='Too many files.';
+
+                smApr='Apr';
+                smAug='Aug';
+                smDec='Dec';
+                smFeb='Feb';
+                smJan='Jan';
+                smJul='Jul';
+                smJun='Jun';
+                smMar='Mar';
+                smMay='May';
+                smNov='Nov';
+                smOct='Oct';
+                smSep='Sep';
+
+                slChDir='~C~hdir';
+                slClear='C~l~ear';
+                slDirectoryName='Directory ~n~ame';
+                slDirectoryTree='Directory ~t~ree';
+                slFiles='~F~iles';
+                slReplace='~R~eplace';
+                slRevert='~R~evert';
+
 {****************************************************************************}
 { PathValid                        }
 {****************************************************************************}
@@ -1021,7 +1054,7 @@ begin
      begin
 {       P := MemAlloc(SizeOf(P^));
        if assigned(P) then
-       begin} 
+       begin}
          new(P);
          P^.Attr:=S.Attr;
          P^.Time:=S.Time;
@@ -1090,7 +1123,7 @@ begin
 {    end;}
   end;
   if P = nil then
-    MessageBox(strings^.get(sTooManyFiles), nil, mfOkButton + mfWarning);
+    MessageBox(sTooManyFiles, nil, mfOkButton + mfWarning);
   NewList(FileList);
   if List^.Count > 0 then
   begin
@@ -1133,7 +1166,7 @@ var
   Time: DateTime;
   Path: PathStr;
   FmtId: String;
-  Params: array[0..7] of PtrInt;
+  Params: array[0..7] of PtruInt;
   Str: String[80];
 const
   sDirectoryLine = ' %-12s %-9s %3s %2d, %4d  %2d:%02d%cm';
@@ -1142,18 +1175,18 @@ const
 var
   Month: array[1..12] of String[3];
 begin
-  Month[1] := Strings^.Get(smJan);
-  Month[2] := Strings^.Get(smFeb);
-  Month[3] := Strings^.Get(smMar);
-  Month[4] := Strings^.Get(smApr);
-  Month[5] := Strings^.Get(smMay);
-  Month[6] := Strings^.Get(smJun);
-  Month[7] := Strings^.Get(smJul);
-  Month[8] := Strings^.Get(smAug);
-  Month[9] := Strings^.Get(smSep);
-  Month[10] := Strings^.Get(smOct);
-  Month[11] := Strings^.Get(smNov);
-  Month[12] := Strings^.Get(smDec);
+  Month[1] := smJan;
+  Month[2] := smFeb;
+  Month[3] := smMar;
+  Month[4] := smApr;
+  Month[5] := smMay;
+  Month[6] := smJun;
+  Month[7] := smJul;
+  Month[8] := smAug;
+  Month[9] := smSep;
+  Month[10] := smOct;
+  Month[11] := smNov;
+  Month[12] := smDec;
   { Display path }
   if (PFileDialog(Owner)^.Directory <> nil) then
     Path := PFileDialog(Owner)^.Directory^
@@ -1171,12 +1204,12 @@ begin
     Exit;
 
   { Display file }
-  Params[0] := PtrInt(@S.Name);
+  Params[0] := ptruint(@S.Name);
   if S.Attr and Directory <> 0 then
   begin
     FmtId := sDirectoryLine;
-    D := Strings^.Get(sDirectory);
-    Params[1] := PtrInt(@D);
+    D := sDirectory;
+    Params[1] := ptruint(@D);
   end else
   begin
     FmtId := sFileLine;
@@ -1184,7 +1217,7 @@ begin
   end;
   UnpackTime(S.Time, Time);
   M := Month[Time.Month];
-  Params[2] := PtrInt(@M);
+  Params[2] := ptruint(@M);
   Params[3] := Time.Day;
   Params[4] := Time.Year;
   PM := Time.Hour >= 12;
@@ -1412,40 +1445,40 @@ begin
   FileList := New(PFileList, Init(R, PScrollBar(Control)));
   Insert(FileList);
   R.Assign(2,5,8,6);
-  Control := New(PLabel, Init(R, labels^.get(slFiles), FileList));
+  Control := New(PLabel, Init(R, slFiles, FileList));
   Insert(Control);
 
   R.Assign(35,3,46,5);
   Opt := bfDefault;
   if AOptions and fdOpenButton <> 0 then
   begin
-    Insert(New(PButton, Init(R,labels^.get(slOpen), cmFileOpen, Opt)));
+    Insert(New(PButton, Init(R,slOpen, cmFileOpen, Opt)));
     Opt := bfNormal;
     Inc(R.A.Y,3); Inc(R.B.Y,3);
   end;
   if AOptions and fdOkButton <> 0 then
   begin
-    Insert(New(PButton, Init(R,labels^.get(slOk), cmFileOpen, Opt)));
+    Insert(New(PButton, Init(R,slOk, cmFileOpen, Opt)));
     Opt := bfNormal;
     Inc(R.A.Y,3); Inc(R.B.Y,3);
   end;
   if AOptions and fdReplaceButton <> 0 then
   begin
-    Insert(New(PButton, Init(R, labels^.get(slReplace),cmFileReplace, Opt)));
+    Insert(New(PButton, Init(R, slReplace,cmFileReplace, Opt)));
     Opt := bfNormal;
     Inc(R.A.Y,3); Inc(R.B.Y,3);
   end;
   if AOptions and fdClearButton <> 0 then
   begin
-    Insert(New(PButton, Init(R, labels^.get(slClear),cmFileClear, Opt)));
+    Insert(New(PButton, Init(R, slClear,cmFileClear, Opt)));
     Opt := bfNormal;
     Inc(R.A.Y,3); Inc(R.B.Y,3);
   end;
-  Insert(New(PButton, Init(R, labels^.get(slCancel), cmCancel, bfNormal)));
+  Insert(New(PButton, Init(R, slCancel, cmCancel, bfNormal)));
   Inc(R.A.Y,3); Inc(R.B.Y,3);
   if AOptions and fdHelpButton <> 0 then
   begin
-    Insert(New(PButton, Init(R,labels^.get(slHelp),cmHelp, bfNormal)));
+    Insert(New(PButton, Init(R,slHelp,cmHelp, bfNormal)));
     Inc(R.A.Y,3); Inc(R.B.Y,3);
   end;
 
@@ -1602,7 +1635,7 @@ var
   begin
     if not PathValid(S) then
     begin
-      MessageBox(Strings^.Get(sInvalidDriveOrDir), nil, mfError + mfOkButton);
+      MessageBox(sInvalidDriveOrDir, nil, mfError + mfOkButton);
       FileName^.Select;
       CheckDirectory := False;
     end else CheckDirectory := True;
@@ -1689,7 +1722,7 @@ begin
           Valid := True
         else
           begin
-            MessageBox(^C + Strings^.Get(sInvalidFileName), nil, mfError + mfOkButton);
+            MessageBox(^C + sInvalidFileName, nil, mfError + mfOkButton);
             Valid := False;
           end;
     end
@@ -1735,7 +1768,7 @@ const
 constructor TDirListBox.Init(var Bounds: TRect; AScrollBar:
   PScrollBar);
 begin
-  DrivesS := strings^.get(sDrives);
+  DrivesS := sDrives;
   TListBox.Init(Bounds, 1, AScrollBar);
   Dir := '';
 end;
@@ -1924,7 +1957,7 @@ var
   Control: PView;
 begin
   R.Assign(16, 2, 64, 20);
-  TDialog.Init(R,strings^.get(sChangeDirectory));
+  TDialog.Init(R,sChangeDirectory);
 
   Options := Options or ofCentered;
 
@@ -1932,7 +1965,7 @@ begin
   DirInput := New(PInputLine, Init(R, FileNameLen+4));
   Insert(DirInput);
   R.Assign(2, 2, 17, 3);
-  Control := New(PLabel, Init(R,labels^.get(slDirectoryName), DirInput));
+  Control := New(PLabel, Init(R,slDirectoryName, DirInput));
   Insert(Control);
   R.Assign(30, 3, 33, 4);
   Control := New(PHistory, Init(R, DirInput, HistoryId));
@@ -1945,22 +1978,22 @@ begin
   DirList := New(PDirListBox, Init(R, PScrollBar(Control)));
   Insert(DirList);
   R.Assign(2, 5, 17, 6);
-  Control := New(PLabel, Init(R, labels^.get(slDirectoryTree), DirList));
+  Control := New(PLabel, Init(R, slDirectoryTree, DirList));
   Insert(Control);
 
   R.Assign(35, 6, 45, 8);
-  OkButton := New(PButton, Init(R, labels^.get(slOk), cmOK, bfDefault));
+  OkButton := New(PButton, Init(R, slOk, cmOK, bfDefault));
   Insert(OkButton);
   Inc(R.A.Y,3); Inc(R.B.Y,3);
-  ChDirButton := New(PButton,Init(R,labels^.get(slChDir),cmChangeDir,
+  ChDirButton := New(PButton,Init(R,slChDir,cmChangeDir,
            bfNormal));
   Insert(ChDirButton);
   Inc(R.A.Y,3); Inc(R.B.Y,3);
-  Insert(New(PButton, Init(R,labels^.get(slRevert), cmRevert, bfNormal)));
+  Insert(New(PButton, Init(R,slRevert, cmRevert, bfNormal)));
   if AOptions and cdHelpButton <> 0 then
   begin
     Inc(R.A.Y,3); Inc(R.B.Y,3);
-    Insert(New(PButton, Init(R,labels^.get(slHelp), cmHelp, bfNormal)));
+    Insert(New(PButton, Init(R,slHelp, cmHelp, bfNormal)));
   end;
 
   if AOptions and cdNoLoadDir = 0 then SetUpDialog;
@@ -2090,7 +2123,7 @@ begin
     ChDir(P);
     if (IOResult <> 0) then
     begin
-      MessageBox(Strings^.Get(sInvalidDirectory), nil, mfError + mfOkButton);
+      MessageBox(sInvalidDirectory, nil, mfError + mfOkButton);
       Valid := False;
     end;
     {$I+}
@@ -2281,7 +2314,7 @@ begin
   begin
     AFile := ShrinkPath(AFile,33);
     Rec.AString := PString(@AFile);
-    StdDeleteFile := (MessageBox(^C + Strings^.Get(sDeleteFile),
+    StdDeleteFile := (MessageBox(^C + sDeleteFile,
                @Rec,mfConfirmation or mfOkCancel) = cmOk);
   end
   else StdDeleteFile := False;
@@ -2464,6 +2497,7 @@ end;
 {****************************************************************************}
 { MakeResources                           }
 {****************************************************************************}
+(*
 procedure MakeResources;
 var
   Dlg : PDialog;
@@ -2475,14 +2509,12 @@ begin
     case i of
       0 : begin
        Key := reOpenDlg;
-       Dlg := New(PFileDialog,Init('*.*',strings^.get(sOpen),
-             labels^.get(slName),
+       Dlg := New(PFileDialog,Init('*.*',sOpen,slName,
              fdOkButton or fdHelpButton or fdNoLoadDir,0));
      end;
       1 : begin
        Key := reSaveAsDlg;
-       Dlg := New(PFileDialog,Init('*.*',strings^.get(sSaveAs),
-             labels^.get(slName),
+       Dlg := New(PFileDialog,Init('*.*',sSaveAs,slName,
              fdOkButton or fdHelpButton or fdNoLoadDir,0));
      end;
       2 : begin
@@ -2506,7 +2538,7 @@ begin
     end;
   end;
 end;
-
+*)
 {****************************************************************************}
 { NoWildChars                       }
 {****************************************************************************}
@@ -2539,7 +2571,7 @@ begin
   {$ifdef cdResource}
   Dlg := PFileDialog(RezFile^.Get(reOpenDlg));
   {$else}
-  Dlg := New(PFileDialog,Init('*.*',strings^.get(sOpen),labels^.get(slName),
+  Dlg := New(PFileDialog,Init('*.*',sOpen,slName,
         fdOkButton or fdHelpButton,0));
   {$endif cdResource}
     { this might not work }
@@ -2598,7 +2630,7 @@ begin
     AFile := ShrinkPath(AFile,33);
     Rec.AString := PString(@AFile);
     StdReplaceFile :=
-       (MessageBox(^C + Strings^.Get(sReplaceFile),
+       (MessageBox(^C + sReplaceFile,
          @Rec,mfConfirmation or mfOkCancel) = cmOk);
   end
   else StdReplaceFile := True;
@@ -2612,8 +2644,7 @@ var
   Dlg : PFileDialog;
 begin
   SaveAs := False;
-  Dlg := New(PFileDialog,Init('*.*',strings^.get(sSaveAs),
-        labels^.get(slSaveAs),
+  Dlg := New(PFileDialog,Init('*.*',sSaveAs,slSaveAs,
         fdOkButton or fdHelpButton,0));
     { this might not work }
   PHistory(Dlg^.FileName^.Next^.Next)^.HistoryID := HistoryID;

+ 1 - 1
fv/timeddlg.pas

@@ -115,7 +115,7 @@ FUNCTION TimedMessageBoxRect (Var R: TRect; Const Msg: String; Params: Pointer;
 
 USES
   dos,
-  app, resource, msgbox;   { Standard GFV units }
+  app, {resource,} msgbox;   { Standard GFV units }
 
 
 {***************************************************************************}

+ 15 - 9
ide/wviews.pas

@@ -263,7 +263,7 @@ procedure RegisterWViews;
 implementation
 
 uses Mouse,
-     Resource,
+{     Resource,}
 {$ifdef WinClipSupported}
      WinClip,
      FpConst,
@@ -300,6 +300,12 @@ const
   );
 {$endif}
 
+
+resourcestring  sConfirm='Confirm';
+                sError='Error';
+                sInformation='Information';
+                sWarning='Warning';
+
 const
   MessageDialog  : PCenterDialog = nil;
   UserButtonCmd  : array[Low(UserButtonName)..High(UserButtonName)] of word = (cmUserBtn1,cmUserBtn2,cmUserBtn3,cmUserBtn4);
@@ -2527,14 +2533,14 @@ end;
 
 procedure InitAdvMsgBox;
 begin
-  ButtonName[0] := Labels^.Get(slYes);
-  ButtonName[1] := Labels^.Get(slNo);
-  ButtonName[2] := Labels^.Get(slOk);
-  ButtonName[3] := Labels^.Get(slCancel);
-  Titles[0] := Labels^.Get(sWarning);
-  Titles[1] := Labels^.Get(sError);
-  Titles[2] := Labels^.Get(sInformation);
-  Titles[3] := Labels^.Get(sConfirm);
+  ButtonName[0] := slYes;
+  ButtonName[1] := slNo;
+  ButtonName[2] := slOk;
+  ButtonName[3] := slCancel;
+  Titles[0] := sWarning;
+  Titles[1] := sError;
+  Titles[2] := sInformation;
+  Titles[3] := sConfirm;
 end;
 
 procedure DoneAdvMsgBox;