OSDN Git Service

・スレッド絞込みが使えなくなる問題の応急処置その3。
authoryoffy <yoffy>
Fri, 15 Aug 2003 12:07:29 +0000 (12:07 +0000)
committeryoffy <yoffy>
Fri, 15 Aug 2003 12:07:29 +0000 (12:07 +0000)
Giko.dfm
Giko.pas
ToolBarSetting.pas
ToolBarUtil.pas

index d9c8836..6abd20d 100644 (file)
--- a/Giko.dfm
+++ b/Giko.dfm
@@ -379,6 +379,7 @@ object GikoForm: TGikoForm
                 Left = 169
                 Top = 0
                 Action = SelectItemAction
+                Style = tbsCheck
                 Visible = False
               end
               object SelectComboBox: TComboBox
@@ -540,14 +541,14 @@ object GikoForm: TGikoForm
                 Control = BrowserToolBar
                 ImageIndex = -1
                 MinHeight = 22
-                Width = 330
+                Width = 352
               end
               item
                 Break = False
                 Control = BrowserNameToolBar
                 ImageIndex = -1
                 MinHeight = 18
-                Width = 306
+                Width = 284
               end
               item
                 Control = BrowserTabToolBar
@@ -563,7 +564,7 @@ object GikoForm: TGikoForm
             object BrowserToolBar: TToolBar
               Left = 9
               Top = 0
-              Width = 317
+              Width = 339
               Height = 22
               AutoSize = True
               ButtonWidth = 25
@@ -619,13 +620,21 @@ object GikoForm: TGikoForm
                 Width = 8
                 Style = tbsSeparator
               end
-              object SelectResToolButton: TToolButton
+              object AllResToolButton: TToolButton
                 Left = 166
                 Top = 0
+                Action = AllResAction
+                Style = tbsCheck
+              end
+              object SelectResToolButton: TToolButton
+                Left = 191
+                Top = 0
+                Hint = #12524#12473#12398#20869#23481#12434#32094#36796#12416
                 Action = SelectResAction
+                Style = tbsCheck
               end
               object ToolButton16: TToolButton
-                Left = 191
+                Left = 216
                 Top = 0
                 Width = 8
                 Caption = 'ToolButton16'
@@ -633,39 +642,39 @@ object GikoForm: TGikoForm
                 Style = tbsSeparator
               end
               object EditorButton: TToolButton
-                Left = 199
+                Left = 224
                 Top = 0
                 Action = EditorAction
               end
               object ToolButton11: TToolButton
-                Left = 224
+                Left = 249
                 Top = 0
                 Width = 8
                 Style = tbsSeparator
               end
               object IEButton: TToolButton
-                Left = 232
+                Left = 257
                 Top = 0
                 Action = IEAction
                 DropdownMenu = BrowserPopupMenu
                 Style = tbsDropDown
               end
               object ToolButton5: TToolButton
-                Left = 268
+                Left = 293
                 Top = 0
                 Width = 8
                 Style = tbsSeparator
               end
               object ItemReloadButton: TToolButton
-                Left = 276
+                Left = 301
                 Top = 0
                 Action = ItemReloadAction
               end
             end
             object BrowserNameToolBar: TToolBar
-              Left = 341
+              Left = 363
               Top = 2
-              Width = 293
+              Width = 271
               Height = 18
               AutoSize = True
               ButtonHeight = 16
@@ -7923,12 +7932,22 @@ object GikoForm: TGikoForm
     end
     object SelectResAction: TAction
       Category = #12473#12524#12483#12489
-      Caption = 'SelectResAction'
-      Hint = #12524#12473#12398#20869#23481#12434#32094#36796#12416
+      Caption = #12524#12473#32094#36796#12415#34920#31034'(&S)...'
+      GroupIndex = 2
+      Hint = #12524#12473#12398#20869#23481#12434#32094#36796#12416'(&S)...'
       ImageIndex = 12
       OnExecute = SelectResActionExecute
       OnUpdate = SelectResActionUpdate
     end
+    object AllResAction: TAction
+      Category = #12473#12524#12483#12489
+      Caption = #12377#12409#12390#34920#31034'(&A)'
+      GroupIndex = 2
+      Hint = #12473#12524#12483#12489#12434#12377#12409#12390#34920#31034#12377#12427
+      ImageIndex = 9
+      OnExecute = AllResActionExecute
+      OnUpdate = AllResActionUpdate
+    end
   end
   object MainMenu: TMainMenu
     Images = HotToobarImageList
index 07f5704..ef9c3f3 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -447,6 +447,8 @@ type
     SelectResToolButton: TToolButton;
     SelectResAction: TAction;
     ToolButton16: TToolButton;
+    AllResAction: TAction;
+    AllResToolButton: TToolButton;
                procedure FormCreate(Sender: TObject);
                procedure FormDestroy(Sender: TObject);
                procedure CabinetPanelHide(Sender: TObject);
@@ -689,6 +691,8 @@ type
       Shift: TShiftState);
     procedure FormKeyUp(Sender: TObject; var Key: Word;
       Shift: TShiftState);
+    procedure AllResActionExecute(Sender: TObject);
+    procedure AllResActionUpdate(Sender: TObject);
        private
                { Private \90é\8c¾ }
 
@@ -1033,6 +1037,7 @@ begin
 
        //\83X\83\8c\91S\95\94\95\\8e¦\83{\83^\83\93\82ð\89\9f\82³\82ê\82½\8fó\91Ô\82É\82·\82é
        AllItemAction.Checked := True;
+        AllResAction.Checked := True;
 
        //TreeView\82Ì\8e×\96\82\8fL\82¢ToolTip\82ð\94ñ\95\\8e¦
        Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
@@ -1172,6 +1177,16 @@ begin
        //\83c\81[\83\8b\83{\83^\83\93\93Ç\82Ý\8d\9e\82Ý
        ReadToolBarSetting(ActionList, StdToolBar);
        ReadToolBarSetting(ActionList, ListToolBar);
+        for i := ListToolBar.ControlCount - 1 downto 0 do
+        begin
+                if ListToolBar.Controls[ i ].Action = SelectItemAction then
+                begin
+                        SelectItemAction.Visible := False;
+                        SelectComboBox.Left := SelectItemToolButton.Left;
+                        ListToolBar.InsertControl( SelectComboBox );
+                        break;
+                end;
+        end;
        ReadToolBarSetting(ActionList, BrowserToolBar);
        SetToolBarPopup;
 
@@ -6477,7 +6492,7 @@ begin
                                BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
                        end;
                        SaveToolBarSetting(StdToolBar);
-                       SaveToolBarSetting(ListToolBar);
+                       SaveToolBarSetting(BrowserToolBar);
                         for i := ListToolBar.ControlCount - 1 downto 0 do
                         begin
                                 if ListToolBar.Controls[ i ].Action = SelectItemAction then
@@ -6488,7 +6503,7 @@ begin
                                         break;
                                 end;
                         end;
-                       SaveToolBarSetting(BrowserToolBar);
+                       SaveToolBarSetting(ListToolBar);
                end;
        finally
                Dlg.Release;
@@ -6644,13 +6659,18 @@ begin
                 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
                 Dlg.ShowModal;
                 if Dlg.ModalResult <> mrCancel then begin
+                        // \83{\83^\83\93\82Ì\8dX\90V
+                        AllResAction.Checked := False;
+                        SelectResAction.Checked := True;
+
+                        // \83t\83B\83\8b\83^\82Ì\90Ý\92è
                         if Length( Dlg.SelectComboBox.Text ) = 0 then
                                 GikoSys.FSelectResFilter.Reverse := False
                         else
                                 GikoSys.FSelectResFilter.Reverse := True;
 
+                        FilterList := TStringList.Create;
                         try
-                                FilterList := TStringList.Create;
                                 FilterList.Delimiter := ' '; //\8bæ\90Ø\82è\8eq\82ð\94¼\8ap\83X\83y\81[\83X\82É\90Ý\92è
                                 //FilterList.Add( Dlg.SelectComboBox.Text );
                                 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
@@ -6659,10 +6679,11 @@ begin
                                 FilterList.Destroy;
                         end;
 
+                        // \83X\83\8c\83b\83h\82Ì\8dÄ\95`\89æ
                         ThreadItem := GetActiveContent;
                         if ThreadItem <> nil then
                                 SetContent( ThreadItem );
-                        
+
                end;
         finally
                Dlg.Release;
@@ -6735,6 +6756,37 @@ begin
 
     end;
 end;
+
+// \91S\82Ä\82Ì\83\8c\83X\82ð\95\\8e¦
+procedure TGikoForm.AllResActionExecute(Sender: TObject);
+var
+       ThreadItem : TThreadItem;
+        FilterList : TStringList;
+begin
+        // \83{\83^\83\93\82Ì\8dX\90V
+        AllResAction.Checked := True;
+        SelectResAction.Checked := False;
+
+        // \83t\83B\83\8b\83^\95\8e\9a\97ñ\82ð\8bó\82É\82·\82é
+        FilterList := TStringList.Create;
+        try
+                GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
+                GikoSys.FSelectResFilter.Reverse := False;
+        finally
+                FilterList.Destroy;
+        end;
+
+        // \83X\83\8c\83b\83h\82ð\8dÄ\95`\89æ
+        ThreadItem := GetActiveContent;
+        if ThreadItem <> nil then
+                SetContent( ThreadItem );
+end;
+
+procedure TGikoForm.AllResActionUpdate(Sender: TObject);
+begin
+       AllResAction.Enabled := GetActiveContent <> nil;
+end;
+
 initialization
         OleInitialize(nil);
 finalization
index c3b3249..6189da0 100644 (file)
@@ -141,8 +141,9 @@ begin
        ToolBarItem := TToolBarItem.Create;
        ToolBarItem.ToolBar := ToolBar;
        ToolBarItem.ToolType := ToolType;
-       for i := 0 to ToolBar.ButtonCount - 1 do
-               ToolBarITem.ButtonActionList.Add(ToolBar.Buttons[i].Action);
+       for i := 0 to ToolBar.ControlCount - 1 do
+                if ToolBar.Controls[ i ] is TToolButton Then
+                       ToolBarITem.ButtonActionList.Add(ToolBar.Controls[i].Action);
        ToolBarComboBox.Items.AddObject(ToolBar.Caption, ToolBarItem);
 end;
 
index 260a669..d1cfbb9 100644 (file)
@@ -146,19 +146,24 @@ end;
 procedure SaveToolBarSetting(ToolBar: TToolBar);
 var
        ini: TMemIniFile;
-       i: Integer;
+       i, j: Integer;
        Action: TBasicAction;
 begin
        ini := TMemIniFile.Create(GikoSys.GetConfigDir + INI_FILENAME);
+        j := 0;
        try
                ini.EraseSection(ToolBar.Name);
                for i := 0 to ToolBar.ButtonCount - 1 do begin
                        if ToolBar.Buttons[i].Style = tbsSeparator then begin
-                               ini.WriteString(ToolBar.Name, 'Button' + IntToStr(i), '-');
+                                ini.WriteString(ToolBar.Name, 'Button' + IntToStr(j), '-');
+                                Inc( j );
                        end else begin
                                Action := ToolBar.Buttons[i].Action;
                                if Action <> nil then
-                                       ini.WriteString(ToolBar.Name, 'Button' + IntToStr(i), Action.Name);
+                                begin
+                                       ini.WriteString(ToolBar.Name, 'Button' + IntToStr(j), Action.Name);
+                                        Inc( j );
+                                end;
                        end;
                end;
                ini.UpdateFile;