ギコナビ
Revision | 3152aa5e4a757007e33ef6117a609cd1885f80cd (tree) |
---|---|
Time | 2008-07-06 13:14:54 |
Author | h677 <h677> |
Commiter | h677 |
タブに表示されているスレッドの一覧をスレッド一覧に表示する機能を作成
それようにSpecialBBSなどを追加
@@ -334,6 +334,12 @@ type | ||
334 | 334 | property BoardPlugIn : TBoardPlugIn read FBoardPlugIn write FBoardPlugIn; |
335 | 335 | end; |
336 | 336 | |
337 | + // ÁêprpTBoard | |
338 | + TSpecialBoard = class(TBoard) | |
339 | + public | |
340 | + function Add(item: TThreadItem): integer; overload; | |
341 | + procedure Clear; overload; | |
342 | + end; | |
337 | 343 | |
338 | 344 | function BBSsFindBoardFromBBSID( inBBSID : string ) : TBoard; |
339 | 345 | function BBSsFindBoardFromURL( inURL : string ) : TBoard; |
@@ -341,10 +347,13 @@ type | ||
341 | 347 | function BBSsFindThreadFromURL(const inURL : string ) : TThreadItem; |
342 | 348 | function ConvertDateTimeString( inDateTimeString : string) : TDateTime; |
343 | 349 | |
350 | + procedure DestorySpecialBBS( inBBS : TBBS ); | |
351 | + | |
344 | 352 | var |
345 | 353 | BBSs : array of TBBS; |
346 | 354 | BoardGroups : array of TBoardGroup; |
347 | - | |
355 | + SpecialBBS : TBBS; | |
356 | + | |
348 | 357 | implementation |
349 | 358 | |
350 | 359 | uses |
@@ -529,6 +538,28 @@ begin | ||
529 | 538 | end; |
530 | 539 | |
531 | 540 | end; |
541 | +{! | |
542 | +\brief ÁêprBBSí | |
543 | +\param bbs í·éÁêprBBS | |
544 | +} | |
545 | +procedure DestorySpecialBBS( inBBS : TBBS ); | |
546 | +var | |
547 | + sCategory : TCategory; | |
548 | + sBoard : TSpecialBoard; | |
549 | +begin | |
550 | + if inBBS <> nil then begin | |
551 | + sCategory := inBBS.Items[0]; | |
552 | + if sCategory <> nil then begin | |
553 | + sBoard := TSpecialBoard(sCategory.Items[0]); | |
554 | + if sBoard <> nil then begin | |
555 | + sBoard.Modified := False; | |
556 | + sBoard.Clear; | |
557 | + FreeAndNil(sBoard); | |
558 | + end; | |
559 | + end; | |
560 | + FreeAndNil(inBBS); | |
561 | + end; | |
562 | +end; | |
532 | 563 | |
533 | 564 | (************************************************************************* |
534 | 565 | *@\¼FTBBSRXgN^ |
@@ -1830,6 +1861,19 @@ begin | ||
1830 | 1861 | |
1831 | 1862 | end; |
1832 | 1863 | |
1864 | +function TSpecialBoard.Add(item: TThreadItem): integer; | |
1865 | +begin | |
1866 | + Result := inherited AddObject(Item.URL, Item); | |
1867 | +end; | |
1868 | + | |
1869 | +procedure TSpecialBoard.Clear; | |
1870 | +var | |
1871 | + i: integer; | |
1872 | +begin | |
1873 | + for i := Count - 1 downto 0 do | |
1874 | + DeleteList(i); | |
1875 | + Capacity := 0; | |
1876 | +end; | |
1833 | 1877 | |
1834 | 1878 | end. |
1835 | 1879 |
@@ -1739,6 +1739,7 @@ begin | ||
1739 | 1739 | BBSs[ i ].Free; |
1740 | 1740 | BBSs[ i ] := nil; |
1741 | 1741 | end; |
1742 | + DestorySpecialBBS(BoardGroup.SpecialBBS); | |
1742 | 1743 | except |
1743 | 1744 | end; |
1744 | 1745 |
@@ -3084,6 +3085,9 @@ begin | ||
3084 | 3085 | BBSs[i].SelectText := SelectText; |
3085 | 3086 | BBSs[i].KubetsuChk := KubetsuChk; |
3086 | 3087 | end; |
3088 | + BoardGroup.SpecialBBS.SelectText := SelectText; | |
3089 | + BoardGroup.SpecialBBS.KubetsuChk := KubetsuChk; | |
3090 | + | |
3087 | 3091 | ViewType := AViewType; |
3088 | 3092 | if ActiveList is TBoard then begin |
3089 | 3093 | Board := TBoard(ActiveList); |
@@ -1,8 +1,8 @@ | ||
1 | 1 | object GikoDM: TGikoDM |
2 | 2 | OldCreateOrder = False |
3 | 3 | OnCreate = DataModuleCreate |
4 | - Left = 516 | |
5 | - Top = 172 | |
4 | + Left = 518 | |
5 | + Top = 174 | |
6 | 6 | Height = 336 |
7 | 7 | Width = 286 |
8 | 8 | object GikoFormActionList: TActionList |
@@ -538,7 +538,7 @@ object GikoDM: TGikoDM | ||
538 | 538 | Hint = #29694#22312#34920#31034#12375#12390#12356#12427#26495#12434#12502#12521#12454#12470#12391#34920#31034#12377#12427 |
539 | 539 | ImageIndex = 27 |
540 | 540 | OnExecute = BoardIEActionExecute |
541 | - OnUpdate = DependActiveListTBoardActionUpdate | |
541 | + OnUpdate = BoardIEActionUpdate | |
542 | 542 | end |
543 | 543 | object SelectItemURLCopyAction: TAction |
544 | 544 | Category = #26495 |
@@ -1363,6 +1363,12 @@ object GikoDM: TGikoDM | ||
1363 | 1363 | OnExecute = ExtractSameIDActionExecute |
1364 | 1364 | OnUpdate = DependActiveCntentLogActionUpdate |
1365 | 1365 | end |
1366 | + object ShowTabListAction: TAction | |
1367 | + Category = #34920#31034 | |
1368 | + Caption = #12479#12502#19968#35239#34920#31034 | |
1369 | + Hint = #12479#12502#19968#35239#34920#31034 | |
1370 | + OnExecute = ShowTabListActionExecute | |
1371 | + end | |
1366 | 1372 | end |
1367 | 1373 | object ToobarImageList: TImageList |
1368 | 1374 | Left = 44 |
@@ -240,6 +240,7 @@ type | ||
240 | 240 | AddIDtoNGWord0Action: TAction; |
241 | 241 | AddIDtoNGWord1Action: TAction; |
242 | 242 | ExtractSameIDAction: TAction; |
243 | + ShowTabListAction: TAction; | |
243 | 244 | procedure EditNGActionExecute(Sender: TObject); |
244 | 245 | procedure ReloadActionExecute(Sender: TObject); |
245 | 246 | procedure GoFowardActionExecute(Sender: TObject); |
@@ -450,6 +451,8 @@ type | ||
450 | 451 | procedure AddIDtoNGWord0ActionExecute(Sender: TObject); |
451 | 452 | procedure AddIDtoNGWord1ActionExecute(Sender: TObject); |
452 | 453 | procedure ExtractSameIDActionExecute(Sender: TObject); |
454 | + procedure ShowTabListActionExecute(Sender: TObject); | |
455 | + procedure BoardIEActionUpdate(Sender: TObject); | |
453 | 456 | private |
454 | 457 | { Private é¾ } |
455 | 458 | procedure ClearResFilter; |
@@ -2637,7 +2640,8 @@ end; | ||
2637 | 2640 | // ************************************************************************* |
2638 | 2641 | procedure TGikoDM.UpFolderActionUpdate(Sender: TObject); |
2639 | 2642 | begin |
2640 | - UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS); | |
2643 | + UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS) and | |
2644 | + (GikoForm.GetActiveList <> BoardGroup.SpecialBBS.Items[0].Items[0]); | |
2641 | 2645 | end; |
2642 | 2646 | // ************************************************************************* |
2643 | 2647 | //! \¦@\¦XgÌ[hÏX |
@@ -3000,9 +3004,10 @@ procedure TGikoDM.SelectListReloadActionUpdate(Sender: TObject); | ||
3000 | 3004 | begin |
3001 | 3005 | if (GikoForm.GetActiveList is TCategory) and (GikoForm.ListView.SelCount > 0) then |
3002 | 3006 | TAction(Sender).Enabled := True |
3003 | - else if GikoForm.GetActiveList is TBoard then | |
3004 | - TAction(Sender).Enabled := True | |
3005 | - else | |
3007 | + else if GikoForm.GetActiveList is TBoard then begin | |
3008 | + TAction(Sender).Enabled := | |
3009 | + (GikoForm.GetActiveList <> BoardGroup.SpecialBBS.Items[0].Items[0]); | |
3010 | + end else | |
3006 | 3011 | TAction(Sender).Enabled := False; |
3007 | 3012 | end; |
3008 | 3013 | // ************************************************************************* |
@@ -4463,6 +4468,27 @@ begin | ||
4463 | 4468 | end; |
4464 | 4469 | end; |
4465 | 4470 | end; |
4471 | +//! ^uÌXbhêð\¦·é | |
4472 | +procedure TGikoDM.ShowTabListActionExecute(Sender: TObject); | |
4473 | +var | |
4474 | + i, j : Integer; | |
4475 | + sBoard : TSpecialBoard; | |
4476 | +begin | |
4477 | + sBoard := TSpecialBoard(SpecialBBS.Items[0].Items[0]); | |
4478 | + sBoard.Clear; | |
4479 | + for i := GikoForm.BrowserTab.Tabs.Count - 1 downto 0 do begin | |
4480 | + sBoard.Add( | |
4481 | + TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Thread); | |
4482 | + end; | |
4483 | + GikoForm.SelectTreeNode(sBoard , True ); | |
4484 | +end; | |
4485 | +//! TBoard©ÂÁêprÂÅÈ¢ | |
4486 | +procedure TGikoDM.BoardIEActionUpdate(Sender: TObject); | |
4487 | +begin | |
4488 | + TAction(Sender).Enabled := | |
4489 | + (GikoForm.GetActiveList is TBoard) and | |
4490 | + (GikoForm.GetActiveList <> BoardGroup.SpecialBBS.Items[0].Items[0]); | |
4491 | +end; | |
4466 | 4492 | |
4467 | 4493 | end. |
4468 | 4494 |
@@ -2509,6 +2509,8 @@ procedure TGikoSys.ListBoardFile; | ||
2509 | 2509 | var |
2510 | 2510 | boardFileList : TStringList; |
2511 | 2511 | i, l : Integer; |
2512 | + sCategory : TCategory; | |
2513 | + sBoard : TBoard; | |
2512 | 2514 | begin |
2513 | 2515 | // BBS ÌJú |
2514 | 2516 | try |
@@ -2551,6 +2553,19 @@ begin | ||
2551 | 2553 | BoardFileList.Free; |
2552 | 2554 | end; |
2553 | 2555 | end; |
2556 | + | |
2557 | + // ÁêprBBS¶¬ | |
2558 | + // ùɶݷéêÍí·é | |
2559 | + DestorySpecialBBS(BoardGroup.SpecialBBS); | |
2560 | + SpecialBBS := TBBS.Create(''); | |
2561 | + SpecialBBS.Title := 'Áêpr(ñ\¦)'; | |
2562 | + sCategory := TCategory.Create; | |
2563 | + sCategory.No := 1; | |
2564 | + sCategory.Title := 'Áêpr(ñ\¦)'; | |
2565 | + SpecialBBS.Add(sCategory); | |
2566 | + sBoard := TSpecialBoard.Create(nil, 'http://localhost/gikonavi/special/index.html'); | |
2567 | + sBoard.IsThreadDatRead := True; | |
2568 | + sCategory.Add(sBoard); | |
2554 | 2569 | end; |
2555 | 2570 | |
2556 | 2571 | {! |