From: h677 Date: Sun, 6 Jul 2008 04:14:54 +0000 (+0000) Subject: タブに表示されているスレッドの一覧をスレッド一覧に表示する機能を作成 X-Git-Tag: v1_64_1_820~167 X-Git-Url: http://git.osdn.net/view?p=gikonavigoeson%2Fgikonavi.git;a=commitdiff_plain;h=3152aa5e4a757007e33ef6117a609cd1885f80cd タブに表示されているスレッドの一覧をスレッド一覧に表示する機能を作成 それようにSpecialBBSなどを追加 --- diff --git a/BoardGroup.pas b/BoardGroup.pas index f189df0..0412d9b 100644 --- a/BoardGroup.pas +++ b/BoardGroup.pas @@ -334,6 +334,12 @@ type property BoardPlugIn : TBoardPlugIn read FBoardPlugIn write FBoardPlugIn; end; + // “ÁŽê—p“r—pTBoard + TSpecialBoard = class(TBoard) + public + function Add(item: TThreadItem): integer; overload; + procedure Clear; overload; + end; function BBSsFindBoardFromBBSID( inBBSID : string ) : TBoard; function BBSsFindBoardFromURL( inURL : string ) : TBoard; @@ -341,10 +347,13 @@ type function BBSsFindThreadFromURL(const inURL : string ) : TThreadItem; function ConvertDateTimeString( inDateTimeString : string) : TDateTime; + procedure DestorySpecialBBS( inBBS : TBBS ); + var BBSs : array of TBBS; BoardGroups : array of TBoardGroup; - + SpecialBBS : TBBS; + implementation uses @@ -529,6 +538,28 @@ begin end; end; +{! +\brief “ÁŽê—p“rBBSíœ +\param bbs íœ‚·‚é“ÁŽê—p“rBBS +} +procedure DestorySpecialBBS( inBBS : TBBS ); +var + sCategory : TCategory; + sBoard : TSpecialBoard; +begin + if inBBS <> nil then begin + sCategory := inBBS.Items[0]; + if sCategory <> nil then begin + sBoard := TSpecialBoard(sCategory.Items[0]); + if sBoard <> nil then begin + sBoard.Modified := False; + sBoard.Clear; + FreeAndNil(sBoard); + end; + end; + FreeAndNil(inBBS); + end; +end; (************************************************************************* *‹@”\–¼FTBBSƒRƒ“ƒXƒgƒ‰ƒNƒ^ @@ -1830,6 +1861,19 @@ begin end; +function TSpecialBoard.Add(item: TThreadItem): integer; +begin + Result := inherited AddObject(Item.URL, Item); +end; + +procedure TSpecialBoard.Clear; +var + i: integer; +begin + for i := Count - 1 downto 0 do + DeleteList(i); + Capacity := 0; +end; end. diff --git a/Giko.pas b/Giko.pas index dcb1a01..ab1627d 100644 --- a/Giko.pas +++ b/Giko.pas @@ -1739,6 +1739,7 @@ begin BBSs[ i ].Free; BBSs[ i ] := nil; end; + DestorySpecialBBS(BoardGroup.SpecialBBS); except end; @@ -3084,6 +3085,9 @@ begin BBSs[i].SelectText := SelectText; BBSs[i].KubetsuChk := KubetsuChk; end; + BoardGroup.SpecialBBS.SelectText := SelectText; + BoardGroup.SpecialBBS.KubetsuChk := KubetsuChk; + ViewType := AViewType; if ActiveList is TBoard then begin Board := TBoard(ActiveList); diff --git a/GikoDataModule.dfm b/GikoDataModule.dfm index 860184d..c38f7d1 100644 --- a/GikoDataModule.dfm +++ b/GikoDataModule.dfm @@ -1,8 +1,8 @@ object GikoDM: TGikoDM OldCreateOrder = False OnCreate = DataModuleCreate - Left = 516 - Top = 172 + Left = 518 + Top = 174 Height = 336 Width = 286 object GikoFormActionList: TActionList @@ -538,7 +538,7 @@ object GikoDM: TGikoDM Hint = #29694#22312#34920#31034#12375#12390#12356#12427#26495#12434#12502#12521#12454#12470#12391#34920#31034#12377#12427 ImageIndex = 27 OnExecute = BoardIEActionExecute - OnUpdate = DependActiveListTBoardActionUpdate + OnUpdate = BoardIEActionUpdate end object SelectItemURLCopyAction: TAction Category = #26495 @@ -1363,6 +1363,12 @@ object GikoDM: TGikoDM OnExecute = ExtractSameIDActionExecute OnUpdate = DependActiveCntentLogActionUpdate end + object ShowTabListAction: TAction + Category = #34920#31034 + Caption = #12479#12502#19968#35239#34920#31034 + Hint = #12479#12502#19968#35239#34920#31034 + OnExecute = ShowTabListActionExecute + end end object ToobarImageList: TImageList Left = 44 diff --git a/GikoDataModule.pas b/GikoDataModule.pas index 98df852..ce50fa2 100644 --- a/GikoDataModule.pas +++ b/GikoDataModule.pas @@ -240,6 +240,7 @@ type AddIDtoNGWord0Action: TAction; AddIDtoNGWord1Action: TAction; ExtractSameIDAction: TAction; + ShowTabListAction: TAction; procedure EditNGActionExecute(Sender: TObject); procedure ReloadActionExecute(Sender: TObject); procedure GoFowardActionExecute(Sender: TObject); @@ -450,6 +451,8 @@ type procedure AddIDtoNGWord0ActionExecute(Sender: TObject); procedure AddIDtoNGWord1ActionExecute(Sender: TObject); procedure ExtractSameIDActionExecute(Sender: TObject); + procedure ShowTabListActionExecute(Sender: TObject); + procedure BoardIEActionUpdate(Sender: TObject); private { Private éŒ¾ } procedure ClearResFilter; @@ -2637,7 +2640,8 @@ end; // ************************************************************************* procedure TGikoDM.UpFolderActionUpdate(Sender: TObject); begin - UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS); + UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS) and + (GikoForm.GetActiveList <> BoardGroup.SpecialBBS.Items[0].Items[0]); end; // ************************************************************************* //! •\Ž¦@•\Ž¦ƒŠƒXƒg‚̃‚[ƒh•ÏX @@ -3000,9 +3004,10 @@ procedure TGikoDM.SelectListReloadActionUpdate(Sender: TObject); begin if (GikoForm.GetActiveList is TCategory) and (GikoForm.ListView.SelCount > 0) then TAction(Sender).Enabled := True - else if GikoForm.GetActiveList is TBoard then - TAction(Sender).Enabled := True - else + else if GikoForm.GetActiveList is TBoard then begin + TAction(Sender).Enabled := + (GikoForm.GetActiveList <> BoardGroup.SpecialBBS.Items[0].Items[0]); + end else TAction(Sender).Enabled := False; end; // ************************************************************************* @@ -4463,6 +4468,27 @@ begin end; end; end; +//! ƒ^ƒu‚̃XƒŒƒbƒhˆê——‚ð•\Ž¦‚·‚é +procedure TGikoDM.ShowTabListActionExecute(Sender: TObject); +var + i, j : Integer; + sBoard : TSpecialBoard; +begin + sBoard := TSpecialBoard(SpecialBBS.Items[0].Items[0]); + sBoard.Clear; + for i := GikoForm.BrowserTab.Tabs.Count - 1 downto 0 do begin + sBoard.Add( + TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Thread); + end; + GikoForm.SelectTreeNode(sBoard , True ); +end; +//! TBoard‚©‚“ÁŽê—p“r”‚łȂ¢ +procedure TGikoDM.BoardIEActionUpdate(Sender: TObject); +begin + TAction(Sender).Enabled := + (GikoForm.GetActiveList is TBoard) and + (GikoForm.GetActiveList <> BoardGroup.SpecialBBS.Items[0].Items[0]); +end; end. diff --git a/GikoSystem.pas b/GikoSystem.pas index 5e8b832..a1a644a 100644 --- a/GikoSystem.pas +++ b/GikoSystem.pas @@ -2509,6 +2509,8 @@ procedure TGikoSys.ListBoardFile; var boardFileList : TStringList; i, l : Integer; + sCategory : TCategory; + sBoard : TBoard; begin // BBS ‚ÌŠJ•ú try @@ -2551,6 +2553,19 @@ begin BoardFileList.Free; end; end; + + // “ÁŽê—p“rBBS¶¬ + // Šù‚É‘¶Ý‚·‚éê‡‚͍폜‚·‚é + DestorySpecialBBS(BoardGroup.SpecialBBS); + SpecialBBS := TBBS.Create(''); + SpecialBBS.Title := '“ÁŽê—p“r(”ñ•\Ž¦)'; + sCategory := TCategory.Create; + sCategory.No := 1; + sCategory.Title := '“ÁŽê—p“r(”ñ•\Ž¦)'; + SpecialBBS.Add(sCategory); + sBoard := TSpecialBoard.Create(nil, 'http://localhost/gikonavi/special/index.html'); + sBoard.IsThreadDatRead := True; + sCategory.Add(sBoard); end; {! diff --git a/gikoNavi.res b/gikoNavi.res index 9f4d38b..85003b5 100644 Binary files a/gikoNavi.res and b/gikoNavi.res differ