OSDN Git Service

アドレスバーのURL数の上限と履歴のスレッド数の上限を分けた
authorh677 <h677>
Sun, 5 Jun 2005 14:28:30 +0000 (14:28 +0000)
committerh677 <h677>
Sun, 5 Jun 2005 14:28:30 +0000 (14:28 +0000)
Giko.pas
Option.dfm
Option.pas
Setting.pas

index cfac8af..b724308 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -1385,7 +1385,7 @@ begin
        Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
 
        //\83A\83h\83\8c\83X\97\9a\97ð\93Ç\82Ý\8d\9e\82Ý
-       AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
+       AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
 
        EnabledCloseButton := True;
 
@@ -2102,7 +2102,7 @@ begin
        //\83A\83h\83\8c\83X\97\9a\97ð\95Û\91
        try
                //AddressHistoryDM\82Í\8e©\93®\90\90¬\83t\83H\81[\83\80\82È\82Ì\82Å\81A\89ð\95ú\82Í\8e©\93®\93I\82É\82³\82ê\82é\81B
-               AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
+               AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
        except
        end;
 
@@ -4285,7 +4285,7 @@ begin
        else
                FHistoryList.Add( favItem );
 //     SetContent(ThreadItem);
-       while GikoSys.Setting.AddressHistoryCount < FHistoryList.Count do begin
+       while GikoSys.Setting.MaxRecordCount < FHistoryList.Count do begin
                i := FHistoryList.Count - 1;
                TObject( FHistoryList.Items[ i ] ).Free;
                FHistoryList.Delete( i );
@@ -4308,7 +4308,7 @@ begin
                Node.ImageIndex := ITEM_ICON_THREADLOG1;
                Node.SelectedIndex := ITEM_ICON_THREADLOG2;
                Node.Data := favItem;
-               while GikoSys.Setting.AddressHistoryCount < TreeView.Items.Count do begin
+               while GikoSys.Setting.MaxRecordCount < TreeView.Items.Count do begin
                        i := TreeView.Items.Count - 1;
                        TreeView.Items.Item[ i ].Delete;
                end;
index 8334c15..79180ea 100644 (file)
@@ -60,9 +60,9 @@ object OptionDialog: TOptionDialog
     Top = 4
     Width = 509
     Height = 389
-    ActivePage = UserIDSheet
+    ActivePage = TabSheet4
     MultiLine = True
-    TabIndex = 11
+    TabIndex = 7
     TabOrder = 3
     OnChange = OptionTabChange
     object ConnectSheet: TTabSheet
@@ -1166,6 +1166,38 @@ object OptionDialog: TOptionDialog
           TabOrder = 0
         end
       end
+      object GroupBox19: TGroupBox
+        Left = 16
+        Top = 80
+        Width = 465
+        Height = 49
+        Caption = #23653#27508
+        TabOrder = 1
+        object Label17: TLabel
+          Left = 12
+          Top = 21
+          Width = 89
+          Height = 12
+          Caption = #12473#12524#12483#12489#20445#23384#25968'(&T)'
+          FocusControl = MaxRecordCountEdit
+        end
+        object Label18: TLabel
+          Left = 194
+          Top = 20
+          Width = 12
+          Height = 12
+          Caption = #20491
+        end
+        object MaxRecordCountEdit: TEdit
+          Left = 120
+          Top = 16
+          Width = 65
+          Height = 20
+          TabOrder = 0
+          Text = 'RecordMaxCountEdit'
+          OnExit = MaxRecordCountEditExit
+        end
+      end
     end
     object SoundSheet: TTabSheet
       Caption = #12469#12454#12531#12489
index 2575eb8..6c8f226 100644 (file)
@@ -195,6 +195,10 @@ type
                 Label8: TLabel;
     BeCodeEdit: TEdit;
                 BeAutoLoginCheckBox: TCheckBox;
+    GroupBox19: TGroupBox;
+    Label17: TLabel;
+    MaxRecordCountEdit: TEdit;
+    Label18: TLabel;
                procedure FormCreate(Sender: TObject);
                procedure FormDestroy(Sender: TObject);
                procedure ApplyButtonClick(Sender: TObject);
@@ -243,6 +247,7 @@ type
                 procedure OddResNumCheckBoxClick(Sender: TObject);
                 procedure ResRangeHoldCheckBoxClick(Sender: TObject);
                 procedure CroutOptionClick(Sender: TObject);
+    procedure MaxRecordCountEditExit(Sender: TObject);
        private
                { Private \90é\8c¾ }
                FClose: Boolean;
@@ -270,7 +275,7 @@ var
 implementation
 
 uses
-       Giko, Editor, Setting, ActnList, KuroutSetting;
+       Giko, Editor, Setting, ActnList, KuroutSetting, Math;
 
 const
        FONT_TEXT: string = '%s %d pt';
@@ -338,6 +343,7 @@ begin
        ReadPortEditExit(Sender);
        WritePortEditExit(Sender);
        AddressHistoryCountEditExit(Sender);
+    MaxRecordCountEditExit(Sender);
        PreviewWaitEditExit(Sender);
 
        if not CheckFolder then begin
@@ -355,6 +361,7 @@ begin
        ReadPortEditExit(Sender);
        WritePortEditExit(Sender);
        AddressHistoryCountEditExit(Sender);
+       MaxRecordCountEditExit(Sender);
        PreviewWaitEditExit(Sender);
 
        if not CheckFolder then begin
@@ -849,6 +856,8 @@ begin
        BeUserIDEdit.Text := GikoSys.Setting.BeUserID;
        BeCodeEdit.Text := GikoSys.Setting.BeCode;
        BeAutoLoginCheckBox.Checked := GikoSys.Setting.BeAutoLogin;
+       //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\90\94
+       MaxRecordCountEdit.Text := IntToStr(GikoSys.Setting.MaxRecordCount);
 end;
 
 procedure TOptionDialog.SaveSetting;
@@ -1127,7 +1136,9 @@ begin
         //Be2ch
         GikoSys.Setting.BeUserID := BeUserIDEdit.Text;
         GikoSys.Setting.BeCode := BeCodeEdit.Text;
-        GikoSys.Setting.BeAutoLogin := BeAutoLoginCheckBox.Checked;
+               GikoSys.Setting.BeAutoLogin := BeAutoLoginCheckBox.Checked;
+       //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\90\94
+       GikoSys.Setting.MaxRecordCount := Max(StrToInt64Def(MaxRecordCountEdit.Text,100),1);
 end;
 
 procedure TOptionDialog.SettingApply;
@@ -1628,5 +1639,13 @@ begin
        end;
 end;
 
+procedure TOptionDialog.MaxRecordCountEditExit(Sender: TObject);
+begin
+       if not GikoSys.IsNumeric(MaxRecordCountEdit.Text) then
+               MaxRecordCountEdit.Text := '100'
+       else if StrToIntDef(MaxRecordCountEdit.Text, 100) <= 0 then
+        MaxRecordCountEdit.Text := '1';
+end;
+
 end.
 
index ff3722e..4a701fe 100644 (file)
@@ -441,7 +441,9 @@ type
                FBeUserID: String;
                FBeCode: String;
                FBeAutoLogin: Boolean;
-        FBeLogin: Boolean;
+               FBeLogin: Boolean;
+               //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\8c\8f\90\94
+               FMaxRecordCount : Integer;
 
                function GetMainCoolSet(Index: Integer): TCoolSet;
                function GetBoardCoolSet(Index: Integer): TCoolSet;
@@ -753,7 +755,9 @@ type
                property BeUserID: string read FBeUserID write FBeUserID;
                property BeCode: string read FBeCode write FBeCode;
                property BeAutoLogin: Boolean read FBeAutoLogin write FBeAutoLogin;
-        property BeLogin: Boolean read FBeLogin write FBeLogin;
+               property BeLogin: Boolean read FBeLogin write FBeLogin;
+               property MaxRecordCount : Integer read FMaxRecordCount write FMaxRecordCount;
+
 end;
 
 
@@ -1331,10 +1335,13 @@ begin
                FUseUndecided := ini.ReadBool('ThreadList', 'UseUndecided', False);
 
         //Be2ch
-        //\94F\8fØ\97p\83\86\81[\83UID\81E\94F\8fØ\83R\81[\83h
+               //\94F\8fØ\97p\83\86\81[\83UID\81E\94F\8fØ\83R\81[\83h
                FBeUserID := ini.ReadString('Be', 'UserID', '');
                FBeCode := Decrypt(ini.ReadString('Be', 'Code', ''));
                FBeAutoLogin := ini.ReadBool('Be', 'AutoLogin', False);
+               //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\8c\8f\90\94
+               FMaxRecordCount := Max(ini.ReadInteger('Recode', 'Max', 100), 1);
+
                ini.UpdateFile;
        finally
                ini.Free;
@@ -1689,6 +1696,9 @@ begin
                ini.WriteString('Be', 'Code', Encrypt(FBeCode));
                ini.WriteBool('Be', 'AutoLogin', FBeAutoLogin);
 
+               //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\8c\8f\90\94
+               ini.WriteInteger('Recode', 'Max', FMaxRecordCount);
+
                ini.UpdateFile;
        finally
                ini.Free;