OSDN Git Service

[YCへマージ]
authorE01 <e01@users.sourceforge.jp>
Sat, 7 Aug 2004 13:42:45 +0000 (13:42 +0000)
committerE01 <e01@users.sourceforge.jp>
Sat, 7 Aug 2004 13:42:45 +0000 (13:42 +0000)
FMOExplorer.pas <1.11
SettingForm.pas <1.66
SettingForm.dfm <1.84
MainForm.pas <1.185
BottleDef.pas <1.142
BottleSstp.pas <1.25

[YC変更]
FMOExplorerのsenderをAP名に変更。
アクションの実行方法に、このタブ内全ての処理を追加。
MainForm内の不要なconstを削除。

bottleclient/BottleDef.pas
bottleclient/BottleSstp.pas
bottleclient/FMOExplorer.pas
bottleclient/LogForm.dfm
bottleclient/LogForm.pas
bottleclient/MainForm.pas
bottleclient/SettingForm.dfm
bottleclient/SettingForm.pas

index 34aaebe..4d7ec4f 100755 (executable)
@@ -98,6 +98,7 @@ type
     FTabWidth: integer;
     FBrowserExeName: string;
     FReplacePresets: TReplacePresets;
+    FNotWarnGhostIsntExists: Boolean;
     //\82â\82³\82®\82ê\95ª
     FSendAction: boolean;
     FLogAction: boolean;
@@ -184,6 +185,7 @@ type
     procedure SetPlayTimeParams(const Value: TSsPlayTimeParams);
     procedure SetTabWidth(const Value: integer);
     procedure SetBrowserExeName(const Value: string);
+    procedure SetNotWarnGhostIsntExists(const Value: Boolean);
     //\82â\82³\82®\82ê\95ª
     procedure SetSendAction(const Value: boolean);
     procedure SetLogAction(const Value: boolean);
@@ -302,6 +304,9 @@ type
     property BrowserExeName: string read FBrowserExeName write SetBrowserExeName;
     //\8e©\93®\92u\8a·\83v\83\8a\83Z\83b\83g
     property ReplacePresets: TReplacePresets read FReplacePresets;
+    //SSTP\83T\81[\83o\94ñ\91\8dÝ\8cx\8d\90\82Ì\83J\83b\83g\82ð\82·\82é\82©
+    property NotWarnGhostIsntExists: Boolean
+      read FNotWarnGhostIsntExists write SetNotWarnGhostIsntExists;
     //\82â\82³\82®\82ê\95ª
     property SendAction: boolean read FSendAction write SetSendACtion;
     property LogAction: boolean read FLogAction write SetLogAction;
@@ -733,7 +738,8 @@ begin
       TSurfacePreviewOnScriptPointPosition(FIni.ReadInteger('System', 'SurfacePreviewOnScriptPointPosition', 0));
 
     //URL\82ð\8aJ\82­\83u\83\89\83E\83U
-    FBrowserExeName:= FIni.ReadString('System', 'BrowserExeName', '');
+    BrowserExeName:= FIni.ReadString('System', 'BrowserExeName', '');
+    NotWarnGhostIsntExists := FIni.ReadBool('System', 'NotWarnGhostIsntExists', False);
 
     //\8e©\93®\92u\8a·\83v\83\8a\83Z\83b\83g
     if FileExists(ReplacePresetFileName) then
@@ -1117,7 +1123,8 @@ begin
   FIni.WriteBool('System', 'SurfacePreviewOnScriptPoint', SurfacePreviewOnScriptPoint);
   FIni.WriteInteger('System', 'SurfacePreviewOnScriptPointPosition', Ord(SurfacePreviewOnScriptPointPosition));
 
-  FIni.WriteString('System', 'BrowserExeName', FBrowserExeName);
+  FIni.WriteString('System', 'BrowserExeName', BrowserExeName);
+  FIni.WriteBool('System', 'NotWarnGhostIsntExists', NotWarnGhostIsntExists);
 
   Strs := TStringList.Create;
   try
@@ -1278,6 +1285,11 @@ begin
   FBrowserExeName := Value;
 end;
 
+procedure TBottlePrefs.SetNotWarnGhostIsntExists(const Value: boolean);
+begin
+  FNotWarnGhostIsntExists := Value;
+end;
+
 { TChannelListItem }
 
 procedure TChannelListItem.SetGhost(const Value: String);
index 34c3f51..20246e9 100755 (executable)
@@ -256,11 +256,11 @@ begin
             Opt := Opt + 'nodescript';
           end;
           Source.Add('SEND SSTP/1.4');
+          Source.Add('Charset: Shift_JIS');
           if FProcessBottle.Ghost <> '' then
             Source.Add('Sender: SSTP Bottle / ' + FProcessBottle.Channel + '/' + FProcessBottle.Ghost)
           else
             Source.Add('Sender: SSTP Bottle / ' + FProcessBottle.Channel);
-          Source.Add('Charset: Shift_JIS');
           if FProcessBottle.Ghost <> '' then begin
             Source.Add('IfGhost: ' + FTargetSetName);
           end;
index be825e0..d836f3e 100755 (executable)
@@ -100,6 +100,7 @@ begin
         lvwList.Items[i].SubItems[4] := '\90³\8fí';
       end else begin
         DirectSSTP.TargetHWnd := SakuraSeeker[i].HWnd;
+        DirectSSTP.SstpSender := Application.Title;
         s := DirectSSTP.SstpEXECUTE('GetVersion');
         TmpStr := TStringList.Create;
         try
index fde7636..6c112a7 100755 (executable)
@@ -479,8 +479,12 @@ object frmLog: TfrmLog
     Left = 200
     Top = 88
     object mnTestAction: TMenuItem
-      Caption = #12371#12371#12363#12425#12450#12463#12471#12519#12531'(&A)'
+      Caption = #12371#12371#12363#12425#12450#12463#12471#12519#12531'(&S)'
       OnClick = mnTestActionClick
     end
+    object mnAllAction: TMenuItem
+      Caption = #12371#12398#12479#12502#20869#20840#12390'...(&ALL)'
+      OnClick = mnAllActionClick
+    end
   end
 end
index bfcb5e8..ff497b6 100755 (executable)
@@ -81,6 +81,7 @@ type
     PopupMenuAction: TPopupMenu;
     mnTestAction: TMenuItem;
     mnSelAction: TMenuItem;
+    mnAllAction: TMenuItem;
     procedure tbtnClearClick(Sender: TObject);
     procedure FormCreate(Sender: TObject);
     procedure lvwLogChange(Sender: TObject; Item: TListItem;
@@ -134,6 +135,7 @@ type
     procedure mnPopupCopyGhostClick(Sender: TObject);
     procedure mnTestActionClick(Sender: TObject);
     procedure mnSelActionClick(Sender: TObject);
+    procedure mnAllActionClick(Sender: TObject);
   private
     { Private \90é\8c¾ }
     FLastScript: String; //\83X\83N\83\8a\83v\83g\8dÄ\95`\89æ\97}\90§\97p
@@ -1881,8 +1883,9 @@ end;
 
 procedure TfrmLog.mnTestActionClick(Sender: TObject);
 begin
+  // \82±\82±\82©\82ç\83A\83N\83V\83\87\83\93
   Screen.Cursor := crHourGlass;
-  frmSender.LogInsertCue(true); // \83A\83N\83V\83\87\83\93\83e\83X\83g\81i\98A\91±\8dÄ\90\81j\97L\8cø
+  frmSender.LogInsertCue(true, false); // \83A\83N\83V\83\87\83\93\83e\83X\83g\81i\98A\91±\8dÄ\90\81j
   Screen.Cursor := crDefault;
 end;
 
@@ -1896,4 +1899,12 @@ begin
   Pref.LogAction := mnSelAction.Checked;
 end;
 
+procedure TfrmLog.mnAllActionClick(Sender: TObject);
+begin
+  // \82±\82Ì\83^\83u\93à\91S\82Ä\83A\83N\83V\83\87\83\93
+  Screen.Cursor := crHourGlass;
+  frmSender.LogInsertCue(true, true); // \83A\83N\83V\83\87\83\93\83e\83X\83g\81i\98A\91±\8dÄ\90\81\95\91S\82Ä\81j
+  Screen.Cursor := crDefault;
+end;
+
 end.
index 9d07b99..8ac62b1 100755 (executable)
@@ -385,12 +385,12 @@ type
     //\92P\91Ì\83t\83@\83C\83\8b\93ü\8fo\97Í\8aÖ\8cW
     procedure PerformFileOpen(const AFileName: string);
     procedure PerformFileSave(const AFileName: string);
-    procedure SetFileName(const FileName: String; const Value: boolean);
+    procedure SetFileName(const FileName: string; Value: boolean);
     function CheckFileModified(Sender: TObject): integer;
     function FileSave(Sender: TObject): integer;
     function FileSaveAs(Sender: TObject): integer;
     procedure EditerStatusChange;
-    procedure SetFileModified(const Value: boolean);
+    procedure SetFileModified(Value: boolean);
     function CheckFileExt(const AFileName: string): boolean;
 
   protected
@@ -423,7 +423,7 @@ type
     //\83u\83\89\83E\83U\94»\92f\82ÆURL\88ø\93n\82µ
     procedure OpenBrowser(const Url: string);
     //Log\83E\83B\83\93\83h\83E\82©\82ç\8fð\8c\8f\95t\82Å\8cÄ\82Î\82ê\82é
-    procedure LogInsertCue(TestAction: boolean);
+    procedure LogInsertCue(TestAS, TestALA: boolean);
   end;
 
 
@@ -1038,7 +1038,7 @@ begin
   //\8e©\93®\95Û\91\90Ý\92è\82Ì\83\8d\81[\83h
   SetScriptAutoBackUp;
 {
-  if SakuraSeeker.Count = 0 then
+  if (SakuraSeeker.Count = 0) and (Pref.NotWarnGhostIsntExists = False) then
     frmMessageBox.ShowMessage('\83S\81[\83X\83g(SSTP\83T\81[\83o)\82ª1\82Â\82à\8bN\93®\82µ\82Ä\82¢\82Ü\82¹\82ñ\81B'#13#10 +
       'SSTP Bottle\82ð\97\98\97p\82·\82é\82½\82ß\82É\82Í\81A\83S\81[\83X\83g\82ð\93¯\8e\9e\82É\8bN\93®\82µ\82Ä\82­\82¾\82³\82¢\81B'#13#10 +
       '\8fÚ\8d×\82Í\83w\83\8b\83v\82ð\82²\97\97\89º\82³\82¢\81B');
@@ -2717,9 +2717,9 @@ begin
   frmLog.SetBottleState(MID, lsPlaying);
 end;
 
-procedure TfrmSender.LogInsertCue(TestAction: boolean);
+procedure TfrmSender.LogInsertCue(TestAS, TestALA: boolean);
 var InsertItem: TLogItem;
-    i, errCount, Res: integer;
+    i, errCount, Res, Tstart: integer;
     Log: TBottleLogList;
     ErrorMes: String; // \83X\83N\83\8a\83v\83g\82Ì\83G\83\89\81[\82Ì\93à\97e
 begin
@@ -2736,12 +2736,14 @@ begin
   if Log = nil then Exit;
   FBottleSSTP.OnResendCountChange := nil;
   errCount := 0;
-  for i := frmLog.lvwLog.Selected.Index downto 0 do begin
+  if TestALA then Tstart := frmLog.lvwLog.Items.Count-1   // \8ew\92è\82³\82ê\82½\83^\83u\82Ì\91S\90\94
+  else Tstart := frmLog.lvwLog.Selected.Index;            // \91I\91ð\82³\82ê\82Ä\82¢\82é\8fê\8f\8a\82©\82ç
+  for i := Tstart downto 0 do begin
     if (Log[i] as TLogItem).LogType <> ltBottle then Continue;
     InsertItem := TLogItem.Create(Log[i] as TLogItem);
     try
       //\83A\83N\83V\83\87\83\93\82ª\97L\8cø\82Å\82 \82ê\82Î\83X\83N\83\8a\83v\83g\82Ì\95Ï\8a·\82µ\82È\82¢
-      if TestAction then
+      if TestAS then
         ErrorMes := ''
       else
         InsertItem.Script := ScriptTransForSSTP(InsertItem.Script, ErrorMes);
@@ -2762,7 +2764,7 @@ begin
         end;
       end;
       //\83A\83N\83V\83\87\83\93\82ª\97L\8cø\82Å\82 \82ê\82Î\92Ê\8fí\8f\88\97\9d\8fÈ\97ª
-      if TestAction then
+      if TestAS then
         //\8c^\95Ï\8a·\82Æ\8eó\90M
         BottleCnv(InsertItem)
       else
@@ -2788,7 +2790,7 @@ end;
 
 procedure TfrmSender.actInsertCueExecute(Sender: TObject);
 begin
-  LogInsertCue(false); // \92Ê\8fí\82Ì\98A\91±\8dÄ\90\82ð\82·\82é
+  LogInsertCue(false, false); // \92Ê\8fí\82Ì\98A\91±\8dÄ\90\82ð\82·\82é
 end;
 
 function TfrmSender.ScriptTransForSSTP(const Script: String;
@@ -3653,7 +3655,7 @@ begin
       PerformFileOpen(OpenDialog.FileName);
 end;
 
-procedure TfrmSender.SetFileName(const FileName: String; const Value: boolean);
+procedure TfrmSender.SetFileName(const FileName: string; Value: boolean);
 begin
   // \83^\83C\83g\83\8b\95Ï\8dX\82Æ\83t\83@\83C\83\8b\83p\83X\83Z\83b\83g
   // \82à\82µ\81A\91æ\93ñ\88ø\90\94\82ªfalse\82È\82ç\83^\83C\83g\83\8b\82¾\82¯\95Ï\8dX
@@ -3732,7 +3734,7 @@ begin
   FileSave(Self);
 end;
 
-procedure TfrmSender.SetFileModified(const Value: boolean);
+procedure TfrmSender.SetFileModified(Value: boolean);
 begin
   // \83t\83@\83C\83\8b\95Ï\8dX\83t\83\89\83O\82Æ\95\\8e¦\95Ï\8dX
   if Value then
index b731198..a61fd88 100755 (executable)
@@ -135,6 +135,14 @@ object frmSetting: TfrmSetting
         Caption = #33258#21205#12391#37096#20998#30906#35469#12377#12427'(&A)'
         TabOrder = 6
       end
+      object cbxNotWarnGhostIsntExists: TCheckBox
+        Left = 8
+        Top = 256
+        Width = 249
+        Height = 17
+        Caption = #12468#12540#12473#12488#12364#35211#12388#12363#12425#12394#12367#12390#12418#35686#21578#12375#12394#12356'(&G)'
+        TabOrder = 7
+      end
     end
     object tstDisplay: TTabSheet
       Caption = #34920#31034': '#30011#38754#34920#31034#38306#20418#12398#35373#23450
index af8bd19..5ce2c5a 100755 (executable)
@@ -108,6 +108,7 @@ type
     tstPresetReplace: TTabSheet;
     ReplacePresetList: TfrmReplacePresetList;
     cbxAskUseHttpProxy: TCheckBox;
+    cbxNotWarnGhostIsntExists: TCheckBox;
     tstYclientSet: TTabSheet;
     cbxSendAction: TCheckBox;
     cbxEConstBar: TCheckBox;
@@ -285,6 +286,7 @@ begin
     end;
   end;
   edtBrowserName.Text := Pref.BrowserExeName;
+  cbxNotWarnGhostIsntExists.Checked := Pref.NotWarnGhostIsntExists;
   //\82â\82³\82®\82ê\95ª
   cbxSendAction.Checked := Pref.SendAction;
   cbxNotSSTP.Checked := Pref.NotSSTP;
@@ -398,6 +400,7 @@ begin
   end;
   //
   Pref.BrowserExeName := edtBrowserName.Text;
+  Pref.NotWarnGhostIsntExists := cbxNotWarnGhostIsntExists.Checked;
   //\82â\82³\82®\82ê\95ª
   Pref.SendAction := cbxSendAction.Checked;
   Pref.EConstBar := cbxEConstBar.Checked;