From e9023cbc74651e625c7560bb13634374b965a590 Mon Sep 17 00:00:00 2001 From: h677 Date: Sat, 10 Dec 2005 08:07:50 +0000 Subject: [PATCH] =?utf8?q?=E3=83=AA=E3=83=95=E3=82=A1=E3=82=AF=E3=82=BF?= =?utf8?q?=E3=83=AA=E3=83=B3=E3=82=B0=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- BoardGroup.pas | 8 ++- Giko.pas | 4 -- GikoDataModule.pas | 197 +++++++++++++++++++++++++++-------------------------- ItemDownload.pas | 1 - 4 files changed, 109 insertions(+), 101 deletions(-) diff --git a/BoardGroup.pas b/BoardGroup.pas index 80a3c35..6e9b1e5 100644 --- a/BoardGroup.pas +++ b/BoardGroup.pas @@ -1904,8 +1904,14 @@ procedure TThreadItem.SetUnRead(b: Boolean); begin if FUnRead = b then Exit; FUnRead := b; - if FUpdate and (ParentBoard <> nil) then + if FUpdate and (ParentBoard <> nil) then begin ParentBoard.FModified := True; + if FUnRead then begin + ParentBoard.UnRead := ParentBoard.UnRead + 1; + end else begin + ParentBoard.UnRead := ParentBoard.UnRead - 1; + end; + end; end; procedure TThreadItem.SetScrollTop(i: Integer); diff --git a/Giko.pas b/Giko.pas index fe773af..8e3ccd2 100644 --- a/Giko.pas +++ b/Giko.pas @@ -4165,8 +4165,6 @@ begin if (BrowserRecord <> nil) and (Length( BrowserRecord.Movement ) > 0) then begin if threadItem.UnRead then begin threadItem.UnRead := False; - threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; - if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0; TreeView.Refresh; ListView.Refresh; end; @@ -4174,8 +4172,6 @@ begin BrowserRecord.Movement := ''; end else if threadItem.UnRead then begin threadItem.UnRead := False; - threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; - if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0; TreeView.Refresh; BrowserRecord.Move('new'); ListView.Refresh; diff --git a/GikoDataModule.pas b/GikoDataModule.pas index 2c96212..81b5e6e 100644 --- a/GikoDataModule.pas +++ b/GikoDataModule.pas @@ -11,7 +11,7 @@ uses SHDocVw_TLB, MSHTML_TLB, {$IFEND} - ComCtrls, BrowserRecord, Graphics, Messages; + ComCtrls, BrowserRecord, Graphics, Messages, Setting; const CAPTION_NAME: string = 'ƒMƒRƒiƒr'; @@ -397,6 +397,11 @@ type procedure RepaintStatusBar; procedure ClearResFilter; procedure SetResRange(range: Integer); + procedure SetThreadAreaHorNormal; + procedure SetThreadAreaHorizontal(gls : TGikoListState); + procedure SetThreadAreaVerNormal; + procedure SetThreadAreaVertical(gls : TGikoListState); + procedure SetThreadReadProperty(read: Boolean); public { Public éŒ¾ } published @@ -418,7 +423,7 @@ implementation uses Windows, Math, Dialogs, Clipbrd, Giko, GikoSystem, GikoUtil, BoardGroup, - FavoriteArrange, Favorite, Setting, MojuUtils, + FavoriteArrange, Favorite, MojuUtils, Editor, ListSelect, Search, Option, Round, KeySetting, Gesture, Kotehan, ToolBarSetting, ToolBarUtil, NewBoard, HTMLCreate, IndividualAbon, @@ -868,6 +873,83 @@ begin SetResRange(Ord( grrNew )); end; // ************************************************************************* +//! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒA’ʏí•\Ž¦‚É‚·‚é ’)ListOrientation = gloHorizontal@ +// ************************************************************************* +procedure TGikoDM.SetThreadAreaHorNormal; +begin + //’ʏí•\Ž¦‚É‚·‚é + if GikoForm.ActiveContent <> nil then + SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~ + GikoForm.ViewPanel.Width := GikoForm.BrowserSizeWidth; + BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; + BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; + GikoSys.Setting.ListWidthState := glsNormal; + if GikoForm.ActiveContent <> nil then + SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ +end; +// ************************************************************************* +//! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒAÅ‘å/Å¬•\Ž¦‚É‚·‚é ’)ListOrientation = gloHorizontal@ +// ************************************************************************* +procedure TGikoDM.SetThreadAreaHorizontal(gls : TGikoListState); +begin + if GikoForm.ActiveContent <> nil then + SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~ + if GikoSys.Setting.ListWidthState = glsNormal then + GikoForm.BrowserSizeWidth := GikoForm.ViewPanel.Width; + //Å‘å•\Ž¦ + if (gls = glsMax) then begin + GikoForm.ViewPanel.Width := 1; + BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL; + BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; + GikoSys.Setting.ListWidthState := glsMax; + end else if (gls = glsMin) then begin + GikoForm.ViewPanel.Width := GikoForm.ThreadMainPanel.Width - 80; + BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; + BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL; + GikoSys.Setting.ListWidthState := glsMin; + end; + if GikoForm.ActiveContent <> nil then + SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ +end; +// ************************************************************************* +//! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒA’ʏí•\Ž¦‚É‚·‚é ’)ListOrientation = gloVertical +// ************************************************************************* +procedure TGikoDM.SetThreadAreaVerNormal; +begin + //’ʏí•\Ž¦‚É‚·‚é + if GikoForm.ActiveContent <> nil then + SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~ + GikoForm.ViewPanel.Height := GikoForm.BrowserSizeHeight; + BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; + BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; + GikoSys.Setting.ListHeightState := glsNormal; + if GikoForm.ActiveContent <> nil then + SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ +end; +// ************************************************************************* +//! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒAÅ‘å/Å¬•\Ž¦‚É‚·‚é ’)ListOrientation = gloVertical +// ************************************************************************* +procedure TGikoDM.SetThreadAreaVertical(gls : TGikoListState); +begin + if GikoForm.ActiveContent <> nil then + SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~ + if GikoSys.Setting.ListHeightState = glsNormal then + GikoForm.BrowserSizeHeight := GikoForm.ViewPanel.Height; + if (gls = glsMin) then begin + GikoForm.ViewPanel.Height := GikoForm.ThreadMainPanel.Height - GikoForm.BrowserCoolBar.Height - 7; + BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; + BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL; + GikoSys.Setting.ListHeightState := glsMin; + end else if (gls = glsMax) then begin + GikoForm.ViewPanel.Height := 1; + BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL; + BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; + GikoSys.Setting.ListHeightState := glsMax; + end; + if GikoForm.ActiveContent <> nil then + SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ +end; +// ************************************************************************* //! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒA‚ð‘å‚«‚­•\Ž¦‚·‚é // ************************************************************************* procedure TGikoDM.BrowserMaxActionExecute(Sender: TObject); @@ -876,54 +958,22 @@ begin case GikoSys.Setting.ListWidthState of glsMax: begin //’ʏí•\Ž¦‚É‚·‚é - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~ - GikoForm.ViewPanel.Width := GikoForm.BrowserSizeWidth; - BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; - BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; - GikoSys.Setting.ListWidthState := glsNormal; - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ + SetThreadAreaHorNormal; end; glsMin, glsNormal: begin //Å‘å•\Ž¦‚É‚·‚é - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~ - if GikoSys.Setting.ListWidthState = glsNormal then - GikoForm.BrowserSizeWidth := GikoForm.ViewPanel.Width; - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ - GikoForm.ViewPanel.Width := 1; - BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL; - BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; - GikoSys.Setting.ListWidthState := glsMax; + SetThreadAreaHorizontal(glsMax); end; end; end else begin case GikoSys.Setting.ListHeightState of glsMax: begin //’ʏí•\Ž¦‚É‚·‚é - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~ - GikoForm.ViewPanel.Height := GikoForm.BrowserSizeHeight; - BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; - BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; - GikoSys.Setting.ListHeightState := glsNormal; - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ + SetThreadAreaVerNormal; end; glsMin, glsNormal: begin //Å‘å•\Ž¦‚É‚·‚é - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~ - if GikoSys.Setting.ListHeightState = glsNormal then - GikoForm.BrowserSizeHeight := GikoForm.ViewPanel.Height; - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ - GikoForm.ViewPanel.Height := 1; - BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL; - BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; - GikoSys.Setting.ListHeightState := glsMax; + SetThreadAreaVertical(glsMax); end; end; end; @@ -937,54 +987,22 @@ begin case GikoSys.Setting.ListWidthState of glsMax, glsNormal: begin //Å¬•\Ž¦‚É‚·‚é - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~ - if GikoSys.Setting.ListWidthState = glsNormal then - GikoForm.BrowserSizeWidth := GikoForm.ViewPanel.Width; - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ - GikoForm.ViewPanel.Width := GikoForm.ThreadMainPanel.Width - 80; - BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; - BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL; - GikoSys.Setting.ListWidthState := glsMin; + SetThreadAreaHorizontal(glsMin); end; glsMin: begin //’ʏí•\Ž¦‚É‚·‚é - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~ - GikoForm.ViewPanel.Width := GikoForm.BrowserSizeWidth; - BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; - BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; - GikoSys.Setting.ListWidthState := glsNormal; - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ + SetThreadAreaHorNormal; end; end; end else begin case GikoSys.Setting.ListHeightState of glsMax, glsNormal: begin //Å¬•\Ž¦‚É‚·‚é - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~ - if GikoSys.Setting.ListHeightState = glsNormal then - GikoForm.BrowserSizeHeight := GikoForm.ViewPanel.Height; - GikoForm.ViewPanel.Height := GikoForm.ThreadMainPanel.Height - GikoForm.BrowserCoolBar.Height - 7; - BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; - BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL; - GikoSys.Setting.ListHeightState := glsMin; - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ + SetThreadAreaVertical(glsMin); end; glsMin: begin //’ʏí•\Ž¦‚É‚·‚é - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~ - GikoForm.ViewPanel.Height := GikoForm.BrowserSizeHeight; - BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; - BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; - GikoSys.Setting.ListHeightState := glsNormal; - if GikoForm.ActiveContent <> nil then - SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ + SetThreadAreaVerNormal; end; end; end; @@ -3635,29 +3653,19 @@ var List: TList; i: Integer; begin - List := TList.Create; - try - GikoForm.SelectListItem(List); - for i := 0 to List.Count - 1 do begin - if TObject(List[i]) is TThreadItem then begin - if (TThreadItem(List[i]).UnRead) then begin - TThreadItem(List[i]).UnRead := false; - TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1; - end; - end; - end; - if GikoForm.TreeView.Visible then - GikoForm.TreeView.Refresh; - if GikoForm.ListView.Visible then - GikoForm.ListView.Refresh; - finally - List.Free; - end; + SetThreadReadProperty(true); end; // ************************************************************************* //! ‘I‘ð‚³‚ê‚Ä‚¢‚éƒXƒŒƒbƒh‚𖢓ǂɂ·‚é // ************************************************************************* procedure TGikoDM.MidokuActionExecute(Sender: TObject); +begin + SetThreadReadProperty(false); +end; +// ************************************************************************* +//! ‘I‘ð‚³‚ê‚Ä‚¢‚éƒXƒŒƒbƒh‚Ì–¢“ǁEŠù“Ç‚ðÝ’è‚·‚é true : Šù“Ç false : –¢“Ç +// ************************************************************************* +procedure TGikoDM.SetThreadReadProperty(read: Boolean); var List: TList; i: Integer; @@ -3667,9 +3675,8 @@ begin GikoForm.SelectListItem(List); for i := 0 to List.Count - 1 do begin if TObject(List[i]) is TThreadItem then begin - if (TThreadItem(List[i]).IsLogFile) and (not TThreadItem(List[i]).UnRead) then begin - TThreadItem(List[i]).UnRead := true; - TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1; + if (TThreadItem(List[i]).IsLogFile) then begin + TThreadItem(List[i]).UnRead := not read; end; end; end; diff --git a/ItemDownload.pas b/ItemDownload.pas index 9751dce..b7769d5 100644 --- a/ItemDownload.pas +++ b/ItemDownload.pas @@ -1375,7 +1375,6 @@ begin ThreadItem.RoundDate := Now; if not ThreadItem.UnRead then begin ThreadItem.UnRead := True; - ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1; end; // if ThreadItem.RoundNo = 6 then // ThreadItem.RoundNo := 0; -- 2.11.0