From: h677 Date: Sun, 27 Aug 2006 16:30:02 +0000 (+0000) Subject: 100レス表示で、先頭表示レス数を設定できるように変更。 X-Git-Tag: v1_64_1_820~325 X-Git-Url: http://git.osdn.net/view?p=gikonavigoeson%2Fgikonavi.git;a=commitdiff_plain;h=3765056ae8b8453b94c490f94f831a926f2e0347 100レス表示で、先頭表示レス数を設定できるように変更。 --- diff --git a/HTMLCreate.pas b/HTMLCreate.pas index ff690d9..2917c2e 100644 --- a/HTMLCreate.pas +++ b/HTMLCreate.pas @@ -67,7 +67,7 @@ type dat : boolean; var s : String) : string; function getNumberString(const str: String;var index :Integer; var dbCharlen: Boolean; sLen :Integer): String; - + function isOutsideRange(item: TThreadItem; index: Integer ): Boolean; public { Public éŒ¾ } procedure AddAnchorTag(PRes: PResRec); @@ -637,7 +637,6 @@ begin PRes.FBody := PRes.FBody + res; end; - //Plugin‚ð—˜—p‚·‚éBoard‚̃XƒŒƒbƒh‚ÌHTML‚ðì¬‚µ‚Ädoc‚ɏ‘‚«ž‚Þ procedure THTMLCreate.CreateUsePluginHTML(html:TBufferedWebBrowser; ThreadItem: TThreadItem; var sTitle: string); var @@ -660,17 +659,9 @@ begin // 1 ‚Í•K‚¸•\Ž¦ if i <> 0 then begin // •\Ž¦”͈͂ðŒÀ’è - case GikoSys.ResRange of - Ord( grrKoko ): - if ThreadItem.Kokomade > (i + 1) then - Continue; - Ord( grrNew ): - if NewReceiveNo > (i + 1) then - Continue; - 10..65535: - if (threadItem.Count - i) > GikoSys.ResRange then - Continue; - end; + if (isOutsideRange(ThreadItem, i)) then begin + Continue; + end; end; // V’…ƒ}[ƒN @@ -765,17 +756,9 @@ begin // 1 ‚Í•K‚¸•\Ž¦ if i <> 0 then begin // •\Ž¦”͈͂ðŒÀ’è - case GikoSys.ResRange of - Ord( grrKoko ): - if ThreadItem.Kokomade > (i + 1) then - Continue; - Ord( grrNew ): - if NewReceiveNo > (i + 1) then - Continue; - 10..65535: - if (threadItem.Count - i) > GikoSys.ResRange then - Continue; - end; + if (isOutsideRange(ThreadItem, i)) then begin + Continue; + end; end; // V’…ƒ}[ƒN @@ -862,18 +845,10 @@ begin for i := 0 to ReadList.Count - 1 do begin // 1 ‚Í•K‚¸•\Ž¦ if i <> 0 then begin - // •\Ž¦”͈͂ðŒÀ’è - case GikoSys.ResRange of - Ord( grrKoko ): - if ThreadItem.Kokomade > (i + 1) then - Continue; - Ord( grrNew ): - if NewReceiveNo > (i + 1) then - Continue; - 10..65535: - if (threadItem.Count - i) > GikoSys.ResRange then - Continue; - end; + // •\Ž¦”͈͂ðŒÀ’è + if (isOutsideRange(ThreadItem, i)) then begin + Continue; + end; end; if (NewReceiveNo = (i + 1)) or ((NewReceiveNo = 0) and (i = 0)) then begin @@ -932,17 +907,9 @@ begin // 1 ‚Í•K‚¸•\Ž¦ if i <> 0 then begin // •\Ž¦”͈͂ðŒÀ’è - case GikoSys.ResRange of - Ord( grrKoko ): - if ThreadItem.Kokomade > (i + 1) then - Continue; - Ord( grrNew ): - if NewReceiveNo > (i + 1) then - Continue; - 10..65535: - if (threadItem.Count - i) > GikoSys.ResRange then - Continue; - end; + if (isOutsideRange(ThreadItem, i)) then begin + Continue; + end; end; if (NewReceiveNo = (i + 1)) or ((NewReceiveNo = 0) and (i = 0)) then begin @@ -1617,6 +1584,31 @@ begin Result := Result + ''; end; +{ +\brief •\Ž¦”͈͊OƒŒƒX”ԍ†”»’菈— +\param item •\Ž¦ƒXƒŒƒbƒh +\param index ƒŒƒX”ԍ† +\return ture:•\Ž¦”͈͊O false:•\Ž¦”͈͓à +} +function THTMLCreate.isOutsideRange( item: TThreadItem; index: Integer ): Boolean; +begin + Result := False; + // •\Ž¦”͈͂ðŒÀ’è + case GikoSys.ResRange of + Ord( grrKoko ): + if item.Kokomade > (index + 1) then + Result := True; + Ord( grrNew ): + if item.NewReceive > (index + 1) then + Result := True; + 10..65535: + if (GikoSys.Setting.HeadResCount) < (index + 1) then begin + if (item.Count - index) > GikoSys.ResRange then begin + Result := True; + end; + end; + end; +end; constructor TBufferedWebBrowser.Create(Browser: TWebBrowser; BuffSize: Integer); begin inherited Create; diff --git a/KuroutSetting.dfm b/KuroutSetting.dfm index f46be37..52a9913 100644 --- a/KuroutSetting.dfm +++ b/KuroutSetting.dfm @@ -1,6 +1,6 @@ object KuroutOption: TKuroutOption - Left = 285 - Top = 132 + Left = 319 + Top = 169 Width = 525 Height = 457 Caption = #35443#32048#35373#23450 @@ -21,8 +21,8 @@ object KuroutOption: TKuroutOption Top = 0 Width = 517 Height = 393 - ActivePage = TabSheet1 - TabIndex = 0 + ActivePage = KakikomiTabSheet + TabIndex = 2 TabOrder = 0 object TabSheet1: TTabSheet Caption = #35443#32048#35373#23450#65297 @@ -422,6 +422,40 @@ object KuroutOption: TKuroutOption Width = 105 Height = 20 TabOrder = 0 + OnExit = MoveHistoryMaxEditExit + end + end + object AHandredGroupBox: TGroupBox + Left = 16 + Top = 192 + Width = 465 + Height = 65 + Caption = '100'#12524#12473#34920#31034#35373#23450 + TabOrder = 2 + object AHandredLabeledEdit: TLabeledEdit + Left = 96 + Top = 24 + Width = 73 + Height = 20 + EditLabel.Width = 81 + EditLabel.Height = 12 + EditLabel.Caption = #20808#38957#34920#31034#12524#12473#25968 + LabelPosition = lpLeft + LabelSpacing = 3 + TabOrder = 0 + Text = '1' + OnExit = AHandredLabeledEditExit + end + object UpDown1: TUpDown + Left = 169 + Top = 24 + Width = 15 + Height = 20 + Associate = AHandredLabeledEdit + Min = 1 + Position = 1 + TabOrder = 1 + Wrap = False end end end diff --git a/KuroutSetting.pas b/KuroutSetting.pas index 156cf66..93bbaf4 100644 --- a/KuroutSetting.pas +++ b/KuroutSetting.pas @@ -4,7 +4,7 @@ interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, StdCtrls, ComCtrls, GikoSystem, GikoUtil; + Dialogs, StdCtrls, ComCtrls, GikoSystem, GikoUtil, ExtCtrls; type TKuroutOption = class(TForm) @@ -65,6 +65,9 @@ type Label10: TLabel; MoveHistoryMaxEdit: TEdit; Label11: TLabel; + AHandredGroupBox: TGroupBox; + AHandredLabeledEdit: TLabeledEdit; + UpDown1: TUpDown; procedure OkBottonClick(Sender: TObject); procedure FormCreate(Sender: TObject); procedure CDeleteButtonClick(Sender: TObject); @@ -75,6 +78,8 @@ type procedure CDownButtonClick(Sender: TObject); procedure BUpButtonClick(Sender: TObject); procedure BDownButtonClick(Sender: TObject); + procedure MoveHistoryMaxEditExit(Sender: TObject); + procedure AHandredLabeledEditExit(Sender: TObject); private { Private éŒ¾ } procedure SetValue; @@ -129,6 +134,8 @@ begin FixedCookieEdit.Text := GikoSys.Setting.FixedCookie; // ƒŠƒ“ƒNˆÚ“®—š—ð MoveHistoryMaxEdit.Text := IntToStr( GikoSys.Setting.MoveHistorySize ); + //@æ“ª•\Ž¦ƒŒƒX” + AHandredLabeledEdit.Text := IntToStr( GikoSys.Setting.HeadResCount ); end; procedure TKuroutOption.SaveSetting; @@ -160,6 +167,10 @@ begin GikoSys.Setting.MoveHistorySize := StrToIntDef( MoveHistoryMaxEdit.Text, 20 ); + //@æ“ª•\Ž¦ƒŒƒX” + GikoSys.Setting.HeadResCount := + StrToIntDef( AHandredLabeledEdit.Text , 1); + GikoSys.Setting.KuroutSettingTabIndex := PageControl1.ActivePageIndex; end; @@ -189,7 +200,9 @@ procedure TKuroutOption.OkBottonClick(Sender: TObject); begin RecvBufferSizeExit(Sender); PostTimeEditExit(Sender); - PostColumnData(); + MoveHistoryMaxEditExit(Sender); + AHandredLabeledEditExit(Sender); + PostColumnData(); SaveSetting; end; @@ -385,5 +398,22 @@ begin //ƒXƒŒˆê——‚Ì•`‰æ‚̍XV GikoForm.SetActiveList(GikoForm.ActiveList); end; +// ƒŠƒ“ƒNˆÚ“®—š—ð‚̕ҏWŒã‚̐ݒ蕶Žš—ñƒ`ƒFƒbƒN +procedure TKuroutOption.MoveHistoryMaxEditExit(Sender: TObject); +begin + if not GikoSys.IsNumeric(MoveHistoryMaxEdit.Text) then + MoveHistoryMaxEdit.Text := '20'; + if StrToInt(MoveHistoryMaxEdit.Text) < 1 then + MoveHistoryMaxEdit.Text := '1'; +end; +// æ“ª•\Ž¦ƒŒƒX”‚̕ҏWŒã‚̐ݒ蕶Žš—ñƒ`ƒFƒbƒN +procedure TKuroutOption.AHandredLabeledEditExit(Sender: TObject); +begin + if not GikoSys.IsNumeric(AHandredLabeledEdit.Text) then + AHandredLabeledEdit.Text := '1'; + if StrToInt(AHandredLabeledEdit.Text) < 1 then + AHandredLabeledEdit.Text := '1'; + +end; end. diff --git a/Option.dfm b/Option.dfm index 337ccae..808d2fd 100644 --- a/Option.dfm +++ b/Option.dfm @@ -61,9 +61,9 @@ object OptionDialog: TOptionDialog Top = 4 Width = 509 Height = 389 - ActivePage = TabSheet4 + ActivePage = CSSTabSheet MultiLine = True - TabIndex = 7 + TabIndex = 2 TabOrder = 3 OnChange = OptionTabChange object ConnectSheet: TTabSheet @@ -253,7 +253,7 @@ object OptionDialog: TOptionDialog Top = 43 Width = 417 Height = 20 - ItemHeight = 12 + ItemHeight = 0 TabOrder = 0 Text = 'BoardURLComboBox' end diff --git a/Setting.pas b/Setting.pas index f766753..4465ab3 100644 --- a/Setting.pas +++ b/Setting.pas @@ -438,6 +438,8 @@ type FStoredTaskTray : Boolean; //! ƒ^ƒu‚̈ړ®‚Ń‹[ƒv‚ð‹–‰Â‚·‚é FLoopBrowserTabs : Boolean; + //! 100ƒŒƒX•\Ž¦‚̐擪•\Ž¦ƒŒƒX” + FHeadResCount : Integer; function GetMainCoolSet(Index: Integer): TCoolSet; function GetBoardCoolSet(Index: Integer): TCoolSet; function GetBrowserCoolSet(Index: Integer): TCoolSet; @@ -784,6 +786,8 @@ type property StoredTaskTray : Boolean read FStoredTaskTray write FStoredTaskTray; //! ƒuƒ‰ƒEƒUƒ^ƒu‚̃‹[ƒv‚ð‹–‰Â‚·‚é property LoopBrowserTabs : Boolean read FLoopBrowserTabs write FLoopBrowserTabs; + //! 100ƒŒƒX•\Ž¦‚̐擪•\Ž¦ƒŒƒX” + property HeadResCount : Integer read FHeadResCount write FHeadResCount; end; @@ -1082,6 +1086,7 @@ begin else FResRange := ini.ReadInteger( 'Thread', 'ResRange', Ord( grrAll ) ); FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False ); + FHeadResCount := ini.ReadInteger('Thread', 'HeadResCount', 1); // ƒXƒŒƒbƒhˆê——•\Ž¦”ÍˆÍ FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) ); //”ñƒAƒNƒeƒBƒuŽžƒŒƒXƒ|ƒbƒvƒAƒbƒv•\Ž¦ @@ -1255,7 +1260,7 @@ begin FStoredTaskTray := ini.ReadBool('Function', 'StroedTaskTray', false); FLoopBrowserTabs := ini.ReadBool('Function', 'LoopBrowserTabs', false); - + ini.UpdateFile; finally ini.Free; @@ -1444,6 +1449,7 @@ begin ini.DeleteKey( 'Thread', 'OnlyAHundredRes' ); // ŒÃ‚¢Ý’è‚̍폜 ini.WriteInteger('Thread', 'ResRange', FResRange); ini.WriteBool('Thread', 'ResRangeHold', FResRangeHold); + ini.WriteInteger('Thread', 'HeadResCount', FHeadResCount); // ƒXƒŒƒbƒhˆê——•\Ž¦”ÍˆÍ ini.WriteInteger('ThreadList', 'ThreadRange', Ord( FThreadRange )); //ƒƒOíœŠm”F