OSDN Git Service

[YCへマージ]
[winbottle/winbottle.git] / bottleclient / LogForm.pas
index bcd1897..fca8021 100755 (executable)
@@ -570,7 +570,7 @@ procedure TfrmLog.mnSaveLogClick(Sender: TObject);
 begin
   if SelectedBottleLog = nil then Exit;
   SaveDialog.FileName := GetDefaultFileName(SelectedBottleLog.Title, '.log');
-  SaveDialog.InitialDir := ExtractFileDir(Application.ExeName);
+  SaveDialog.InitialDir := ExtractFileDir(Pref.LogDir);
   SaveDialog.DefaultExt := 'log';
   SaveDialog.FilterIndex := 1;
   if SaveDialog.Execute then
@@ -581,7 +581,7 @@ procedure TfrmLog.mnSaveLogChannelClick(Sender: TObject);
 begin
   if SelectedBottleLog = nil then Exit;
   SaveDialog.FileName := GetDefaultFileName(SelectedBottleLog.Title, '.log');
-  SaveDialog.InitialDir := ExtractFileDir(Application.ExeName);
+  SaveDialog.InitialDir := ExtractFileDir(Pref.LogDir);
   SaveDialog.DefaultExt := 'log';
   SaveDialog.FilterIndex := 1;
   if SaveDialog.Execute then
@@ -592,7 +592,7 @@ procedure TfrmLog.mnSaveLogScriptClick(Sender: TObject);
 begin
   if SelectedBottleLog = nil then Exit;
   SaveDialog.FileName := GetDefaultFileName(SelectedBottleLog.Title, '.txt');
-  SaveDialog.InitialDir := ExtractFileDir(Application.ExeName);
+  SaveDialog.InitialDir := ExtractFileDir(Pref.LogDir);
   SaveDialog.DefaultExt := 'txt';
   SaveDialog.FilterIndex := 2;
   if SaveDialog.Execute then
@@ -1015,6 +1015,7 @@ var BottleLog: TBottleLogList;
     i, Index: integer;
 begin
   Index := -1;
+  OpenDialog.InitialDir := Pref.LogDir;
   if OpenDialog.Execute then begin
     for i := 0 to OpenDialog.Files.Count-1 do begin
       BottleLog := TBottleLogList.Create(ExtractFileName(OpenDialog.Files[i]));
@@ -1621,7 +1622,7 @@ var
 begin
   Res := idYes;
   SaveDialog.FileName := GetDefaultFileName(Log.Title, '.xml');
-  SaveDialog.InitialDir := ExtractFileDir(Application.ExeName);
+  SaveDialog.InitialDir := ExtractFileDir(Pref.LogDir);
   SaveDialog.DefaultExt := 'xml';
   SaveDialog.FilterIndex := 3;
   if SaveDialog.Execute then
@@ -1869,7 +1870,7 @@ begin
   Res := idNo;
   if (BottleLogList[Index] as TBottleLogList).LogModified then
   begin
-    Confirm := Format('\83^\83u"%s"\82Ì\93à\97e\82Í\95Ï\8dX\82³\82ê\82Ä\82¢\82Ü\82·\81B'#13#10#13#10 +
+    Confirm := Format('\83^\83u %s \82Ì\93à\97e\82Í\95Ï\8dX\82³\82ê\82Ä\82¢\82Ü\82·\81B'#13#10#13#10 +
       '\95Û\91\82µ\82Ü\82·\82©\81H', [(FBottleLogList[Index] as TBottleLogList).Title]);
     Res := MessageDlg(Confirm, mtConfirmation, mbYesNoCancel, 0);
     if Res = idYes then