OSDN Git Service

タブ一覧表示時のボタン/Actionの死活制御の修正
authorh677 <h677>
Tue, 8 Jul 2008 16:36:42 +0000 (16:36 +0000)
committerh677 <h677>
Tue, 8 Jul 2008 16:36:42 +0000 (16:36 +0000)
タブ一覧の再実行時の不具合の修正

GikoDataModule.dfm
GikoDataModule.pas

index c38f7d1..93d0a35 100644 (file)
@@ -315,7 +315,7 @@ object GikoDM: TGikoDM
       ImageIndex = 9
       ShortCut = 16433
       OnExecute = AllItemActionExecute
-      OnUpdate = DependActiveListTBoardActionUpdate
+      OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
     end
     object LogItemAction: TAction
       Category = #26495
@@ -326,7 +326,7 @@ object GikoDM: TGikoDM
       ImageIndex = 10
       ShortCut = 16434
       OnExecute = LogItemActionExecute
-      OnUpdate = DependActiveListTBoardActionUpdate
+      OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
     end
     object NewItemAction: TAction
       Category = #26495
@@ -337,7 +337,7 @@ object GikoDM: TGikoDM
       ImageIndex = 11
       ShortCut = 16435
       OnExecute = NewItemActionExecute
-      OnUpdate = DependActiveListTBoardActionUpdate
+      OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
     end
     object ArchiveItemAction: TAction
       Category = #26495
@@ -347,7 +347,7 @@ object GikoDM: TGikoDM
       Hint = 'DAT'#33853#12385#12473#12524#12483#12489#12398#12415#34920#31034#12377#12427
       ImageIndex = 55
       OnExecute = ArchiveItemActionExecute
-      OnUpdate = DependActiveListTBoardActionUpdate
+      OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
     end
     object LiveItemAction: TAction
       Category = #26495
@@ -357,7 +357,7 @@ object GikoDM: TGikoDM
       Hint = #29983#23384#12375#12390#12356#12427#12473#12524#12483#12489#12398#12415#12434#34920#31034#12377#12427
       ImageIndex = 54
       OnExecute = LiveItemActionExecute
-      OnUpdate = DependActiveListTBoardActionUpdate
+      OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
     end
     object ThreadRangeAction: TAction
       Category = #26495
@@ -367,7 +367,7 @@ object GikoDM: TGikoDM
       Hint = #12473#12524#12483#12489#12398#34920#31034#31684#22258#12434#35373#23450
       ImageIndex = 10
       OnExecute = ThreadRangeActionExecute
-      OnUpdate = DependActiveCntentActionUpdate
+      OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
     end
     object SelectItemAction: TAction
       Category = #26495
@@ -378,7 +378,7 @@ object GikoDM: TGikoDM
       ImageIndex = 12
       ShortCut = 16436
       OnExecute = SelectItemActionExecute
-      OnUpdate = DependActiveListTBoardActionUpdate
+      OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
     end
     object StopAction: TAction
       Category = #34920#31034
@@ -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 = BoardIEActionUpdate
+      OnUpdate = DependActiveListTBoardActionUpdate
     end
     object SelectItemURLCopyAction: TAction
       Category = #26495
index ce50fa2..42f953c 100644 (file)
@@ -452,7 +452,6 @@ type
     procedure AddIDtoNGWord1ActionExecute(Sender: TObject);
     procedure ExtractSameIDActionExecute(Sender: TObject);
     procedure ShowTabListActionExecute(Sender: TObject);
-    procedure BoardIEActionUpdate(Sender: TObject);
   private
        { Private \90é\8c¾ }
        procedure ClearResFilter;
@@ -485,8 +484,10 @@ type
        procedure DependActiveCntentActionUpdate(Sender: TObject);
        //! TAction\82ÅGetActiveContent\82ªnil\88È\8aO\82©\82Â\83\8d\83O\82ð\8e\9d\82Á\82Ä\82¢\82é\82Æ\97L\8cø\82É\82È\82é
        procedure DependActiveCntentLogActionUpdate(Sender: TObject);
-       //! TAction\82ÅActiveList\82ªTBoard\82Å\97L\8cø\82É\82È\82é
+       //! TAction\82ÅActiveList\82ªTBoard(\94ñ\93Á\8eê\94Â)\82Å\97L\8cø\82É\82È\82é
        procedure DependActiveListTBoardActionUpdate(Sender: TObject);
+       //! TAction\82ÅActiveList\82ªTBoard\82Å\97L\8cø\82É\82È\82é
+       procedure DependActiveListTBoardWithSpeciapActionUpdate(Sender: TObject);
   end;
 
 var
@@ -527,10 +528,18 @@ begin
                                                                        and (GikoForm.GetActiveContent.IsLogFile);
 end;
 // *************************************************************************
-//! TAction\82ÅActiveList\82ªTBoard\82Å\97L\8cø\82É\82È\82é
+//! TAction\82ÅActiveList\82ªTBoard(\94ñ\93Á\8eê\94Â)\82Å\97L\8cø\82É\82È\82é
 // *************************************************************************
 procedure TGikoDM.DependActiveListTBoardActionUpdate(Sender: TObject);
 begin
+       TAction(Sender).Enabled := (GikoForm.GetActiveList is TBoard) and
+        (GikoForm.GetActiveList <> BoardGroup.SpecialBoard);
+end;
+// *************************************************************************
+//! TAction\82ÅActiveList\82ªTBoard\82Å\97L\8cø\82É\82È\82é
+// *************************************************************************
+procedure TGikoDM.DependActiveListTBoardWithSpeciapActionUpdate(Sender: TObject);
+begin
        TAction(Sender).Enabled := (GikoForm.GetActiveList is TBoard);
 end;
 // *************************************************************************
@@ -2641,7 +2650,7 @@ end;
 procedure TGikoDM.UpFolderActionUpdate(Sender: TObject);
 begin
        UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS) and
-        (GikoForm.GetActiveList <> BoardGroup.SpecialBBS.Items[0].Items[0]);
+        (GikoForm.GetActiveList <> BoardGroup.SpecialBoard);
 end;
 // *************************************************************************
 //! \95\\8e¦\81@\95\\8e¦\83\8a\83X\83g\82Ì\83\82\81[\83h\95Ï\8dX
@@ -3006,7 +3015,7 @@ begin
                TAction(Sender).Enabled := True
        else if GikoForm.GetActiveList is TBoard then begin
                TAction(Sender).Enabled :=
-            (GikoForm.GetActiveList <> BoardGroup.SpecialBBS.Items[0].Items[0]);
+            (GikoForm.GetActiveList <> BoardGroup.SpecialBoard);
        end else
                TAction(Sender).Enabled := False;
 end;
@@ -3205,8 +3214,10 @@ end;
 // *************************************************************************
 procedure TGikoDM.LogFolderOpenActionUpdate(Sender: TObject);
 begin
-       if ((GikoForm.GetActiveList is TBoard) or (GikoForm.GetActiveList is TCategory))
-               and (GikoForm.ListView.SelCount > 0) then
+       if (((GikoForm.GetActiveList is TBoard) and
+        (GikoForm.GetActiveList <> BoardGroup.SpecialBoard))
+        or (GikoForm.GetActiveList is TCategory))
+               and (GikoForm.ListView.SelCount > 0) then
                TAction(Sender).Enabled := True
        else
                TAction(Sender).Enabled := False;
@@ -4471,24 +4482,17 @@ end;
 //! \83^\83u\82Ì\83X\83\8c\83b\83h\88ê\97\97\82ð\95\\8e¦\82·\82é
 procedure TGikoDM.ShowTabListActionExecute(Sender: TObject);
 var
-    i, j : Integer;
-    sBoard : TSpecialBoard;
+    i : Integer;
 begin
-    sBoard := TSpecialBoard(SpecialBBS.Items[0].Items[0]);
-    sBoard.Clear;
+    GikoForm.ListView.Items.BeginUpdate;
+    GikoForm.ListView.Items.Clear;
+    BoardGroup.SpecialBoard.Clear;
        for i := GikoForm.BrowserTab.Tabs.Count - 1 downto 0 do begin
-        sBoard.Add(
+        BoardGroup.SpecialBoard.Add(
                TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Thread);
        end;
-    GikoForm.SelectTreeNode(sBoard , True );
+    GikoForm.ListView.Items.EndUpdate;
+    GikoForm.SetActiveList(BoardGroup.SpecialBoard);
 end;
-//! TBoard\82©\82Â\93Á\8eê\97p\93r\94Â\82Å\82È\82¢
-procedure TGikoDM.BoardIEActionUpdate(Sender: TObject);
-begin
-    TAction(Sender).Enabled :=
-        (GikoForm.GetActiveList is TBoard) and
-        (GikoForm.GetActiveList <> BoardGroup.SpecialBBS.Items[0].Items[0]);
-end;
-
 end.