| 190 |
procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject); |
procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject); |
| 191 |
procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject); |
procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject); |
| 192 |
procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject); |
procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject); |
| 193 |
|
procedure OnlyAHundredResActionExecute(Sender: TObject); |
| 194 |
|
procedure OnlyKokoResActionExecute(Sender: TObject); |
| 195 |
|
procedure OnlyNewResActionExecute(Sender: TObject); |
| 196 |
|
procedure BrowserMaxActionExecute(Sender: TObject); |
| 197 |
|
procedure BrowserMinActionExecute(Sender: TObject); |
| 198 |
|
procedure ScrollTopActionExecute(Sender: TObject); |
| 199 |
|
procedure ScrollLastActionExecute(Sender: TObject); |
| 200 |
|
procedure ScrollNewActionExecute(Sender: TObject); |
| 201 |
|
procedure ScrollKokoActionExecute(Sender: TObject); |
| 202 |
|
procedure ScrollKokoActionUpdate(Sender: TObject); |
| 203 |
|
procedure EditorActionExecute(Sender: TObject); |
| 204 |
|
procedure IEActionExecute(Sender: TObject); |
| 205 |
|
procedure ShowThreadActionExecute(Sender: TObject); |
| 206 |
|
procedure ShowBoardActionExecute(Sender: TObject); |
| 207 |
|
procedure URLCopyActionExecute(Sender: TObject); |
| 208 |
|
procedure NameCopyActionExecute(Sender: TObject); |
| 209 |
|
procedure NameURLCopyActionExecute(Sender: TObject); |
| 210 |
|
procedure ItemReloadActionExecute(Sender: TObject); |
| 211 |
|
procedure BrowserTabCloseActionExecute(Sender: TObject); |
| 212 |
|
procedure BrowserTabCloseActionUpdate(Sender: TObject); |
| 213 |
|
procedure NotSelectTabCloseActionExecute(Sender: TObject); |
| 214 |
|
procedure NotSelectTabCloseActionUpdate(Sender: TObject); |
| 215 |
|
procedure AllTabCloseActionExecute(Sender: TObject); |
| 216 |
|
procedure ActiveLogDeleteActionExecute(Sender: TObject); |
| 217 |
|
procedure LeftmostTabSelectActionExecute(Sender: TObject); |
| 218 |
|
procedure LeftmostTabSelectActionUpdate(Sender: TObject); |
| 219 |
|
procedure LeftTabSelectActionExecute(Sender: TObject); |
| 220 |
|
procedure RightTabSelectActionExecute(Sender: TObject); |
| 221 |
|
procedure RightTabSelectActionUpdate(Sender: TObject); |
| 222 |
|
procedure RightmostTabSelectActionExecute(Sender: TObject); |
| 223 |
|
procedure ThreadFavoriteAddActionExecute(Sender: TObject); |
| 224 |
|
procedure ThreadFavoriteAddActionUpdate(Sender: TObject); |
| 225 |
|
procedure SelectResActionExecute(Sender: TObject); |
| 226 |
|
procedure AllResActionExecute(Sender: TObject); |
| 227 |
|
procedure ResRangeActionExecute(Sender: TObject); |
| 228 |
|
procedure UpBoardActionExecute(Sender: TObject); |
| 229 |
|
procedure JumpToNumOfResActionExecute(Sender: TObject); |
| 230 |
|
procedure RightTabCloseActionExecute(Sender: TObject); |
| 231 |
|
procedure RightTabCloseActionUpdate(Sender: TObject); |
| 232 |
|
procedure LeftTabCloseActionExecute(Sender: TObject); |
| 233 |
private |
private |
| 234 |
{ Private 宣言 } |
{ Private 宣言 } |
| 235 |
public |
public |
| 251 |
|
|
| 252 |
uses |
uses |
| 253 |
Windows, Math, Messages, Dialogs, Clipbrd, |
Windows, Math, Messages, Dialogs, Clipbrd, |
| 254 |
Giko, GikoSystem, GikoUtil, BoardGroup, |
Giko, GikoSystem, GikoUtil, BoardGroup, |
| 255 |
FavoriteArrange, Favorite; |
FavoriteArrange, Favorite, Setting, MojuUtils, |
| 256 |
|
Editor, ListSelect; |
| 257 |
|
|
| 258 |
|
|
| 259 |
const |
const |
| 260 |
|
CAPTION_NAME: string = 'ギコナビ'; |
| 261 |
USER_SETLINKBAR = WM_USER + 2003; |
USER_SETLINKBAR = WM_USER + 2003; |
| 262 |
|
//ツールバーアイコン |
| 263 |
|
TOOL_ICON_HEIGHT_MAX = 16; //高さ最大アイコン |
| 264 |
|
TOOL_ICON_HEIGHT_MIN = 17; //高さ最小アイコン |
| 265 |
|
TOOL_ICON_HEIGHT_NORMAL = 18; //高さ標準アイコン |
| 266 |
|
TOOL_ICON_WIDTH_MAX = 19; //幅最大アイコン |
| 267 |
|
TOOL_ICON_WIDTH_MIN = 20; //幅最小アイコン |
| 268 |
|
TOOL_ICON_WIDTH_NORMAL = 21; //幅標準アイコン |
| 269 |
|
|
| 270 |
|
TOOL_ICON_FAV_FOLDER = 30; //お気に入りフォルダアイコン |
| 271 |
|
TOOL_ICON_FAV_BOARD = 31; //お気に入り板アイコン |
| 272 |
|
TOOL_ICON_FAV_THREAD = 32; //お気に入りスレアイコン |
| 273 |
|
|
| 274 |
{$R *.dfm} |
{$R *.dfm} |
| 275 |
// ************************************************************************* |
// ************************************************************************* |
| 276 |
// TActionでGetActiveContentがnil以外で有効になる |
// TActionでGetActiveContentがnil以外で有効になる |
| 715 |
|
|
| 716 |
end; |
end; |
| 717 |
end; |
end; |
| 718 |
|
// ************************************************************************* |
| 719 |
|
// 最新100レスのみ表示 |
| 720 |
|
// ************************************************************************* |
| 721 |
|
procedure TGikoDM.OnlyAHundredResActionExecute(Sender: TObject); |
| 722 |
|
var |
| 723 |
|
FilterList : TStringList; |
| 724 |
|
begin |
| 725 |
|
if (GikoForm.ActiveContent <> nil) and (GikoForm.ActiveContent.Browser <> nil) |
| 726 |
|
and (GikoForm.ActiveContent.Browser.Busy) then Exit; |
| 727 |
|
|
| 728 |
|
GikoForm.ResRangeMenuSelect := 100; |
| 729 |
|
OnlyAHundredResAction.Checked := True; |
| 730 |
|
|
| 731 |
|
if GikoSys.ResRange <> 100 then begin |
| 732 |
|
GikoSys.ResRange := 100; |
| 733 |
|
|
| 734 |
|
// フィルタ文字列を空にする |
| 735 |
|
FilterList := TStringList.Create; |
| 736 |
|
try |
| 737 |
|
GikoSys.FSelectResFilter.LoadFromStringList( FilterList ); |
| 738 |
|
GikoSys.FSelectResFilter.Reverse := False; |
| 739 |
|
finally |
| 740 |
|
FilterList.Free; |
| 741 |
|
end; |
| 742 |
|
|
| 743 |
|
GikoForm.SelectResWord := ''; |
| 744 |
|
GikoForm.RepaintAllTabsBrowser(); |
| 745 |
|
end; |
| 746 |
|
end; |
| 747 |
|
// ************************************************************************* |
| 748 |
|
// 未読レスのみ表示 |
| 749 |
|
// ************************************************************************* |
| 750 |
|
procedure TGikoDM.OnlyKokoResActionExecute(Sender: TObject); |
| 751 |
|
var |
| 752 |
|
FilterList : TStringList; |
| 753 |
|
begin |
| 754 |
|
if (GikoForm.ActiveContent <> nil) and (GikoForm.ActiveContent.Browser <> nil) |
| 755 |
|
and (GikoForm.ActiveContent.Browser.Busy) then Exit; |
| 756 |
|
|
| 757 |
|
GikoForm.ResRangeMenuSelect := Ord( grrKoko ); |
| 758 |
|
OnlyKokoResAction.Checked := True; |
| 759 |
|
|
| 760 |
|
if GikoSys.ResRange <> Ord( grrKoko ) then begin |
| 761 |
|
GikoSys.ResRange := Ord( grrKoko ); |
| 762 |
|
|
| 763 |
|
// フィルタ文字列を空にする |
| 764 |
|
FilterList := TStringList.Create; |
| 765 |
|
try |
| 766 |
|
GikoSys.FSelectResFilter.LoadFromStringList( FilterList ); |
| 767 |
|
GikoSys.FSelectResFilter.Reverse := False; |
| 768 |
|
finally |
| 769 |
|
FilterList.Free; |
| 770 |
|
end; |
| 771 |
|
|
| 772 |
|
GikoForm.SelectResWord := ''; |
| 773 |
|
GikoForm.RepaintAllTabsBrowser(); |
| 774 |
|
end; |
| 775 |
|
end; |
| 776 |
|
// ************************************************************************* |
| 777 |
|
// 新着レスのみ表示 |
| 778 |
|
// ************************************************************************* |
| 779 |
|
procedure TGikoDM.OnlyNewResActionExecute(Sender: TObject); |
| 780 |
|
var |
| 781 |
|
FilterList : TStringList; |
| 782 |
|
begin |
| 783 |
|
if (GikoForm.ActiveContent <> nil) and (GikoForm.ActiveContent.Browser <> nil) |
| 784 |
|
and (GikoForm.ActiveContent.Browser.Busy) then Exit; |
| 785 |
|
|
| 786 |
|
GikoForm.ResRangeMenuSelect := Ord( grrNew ); |
| 787 |
|
OnlyNewResAction.Checked := True; |
| 788 |
|
|
| 789 |
|
if GikoSys.ResRange <> Ord( grrNew ) then begin |
| 790 |
|
GikoSys.ResRange := Ord( grrNew ); |
| 791 |
|
|
| 792 |
|
// フィルタ文字列を空にする |
| 793 |
|
FilterList := TStringList.Create; |
| 794 |
|
try |
| 795 |
|
GikoSys.FSelectResFilter.LoadFromStringList( FilterList ); |
| 796 |
|
GikoSys.FSelectResFilter.Reverse := False; |
| 797 |
|
finally |
| 798 |
|
FilterList.Free; |
| 799 |
|
end; |
| 800 |
|
|
| 801 |
|
GikoForm.SelectResWord := ''; |
| 802 |
|
GikoForm.RepaintAllTabsBrowser(); |
| 803 |
|
end; |
| 804 |
|
end; |
| 805 |
|
// ************************************************************************* |
| 806 |
|
// スレッド表示エリアを大きく表示する |
| 807 |
|
// ************************************************************************* |
| 808 |
|
procedure TGikoDM.BrowserMaxActionExecute(Sender: TObject); |
| 809 |
|
begin |
| 810 |
|
if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
| 811 |
|
case GikoSys.Setting.ListWidthState of |
| 812 |
|
glsMax: begin |
| 813 |
|
//通常表示にする |
| 814 |
|
if GikoForm.ActiveContent <> nil then |
| 815 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //描画停止 |
| 816 |
|
GikoForm.ViewPanel.Width := GikoForm.BrowserSizeWidth; |
| 817 |
|
BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; |
| 818 |
|
BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
| 819 |
|
GikoSys.Setting.ListWidthState := glsNormal; |
| 820 |
|
if GikoForm.ActiveContent <> nil then |
| 821 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //描画 |
| 822 |
|
end; |
| 823 |
|
glsMin, glsNormal: begin |
| 824 |
|
//最大表示にする |
| 825 |
|
if GikoForm.ActiveContent <> nil then |
| 826 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //描画停止 |
| 827 |
|
if GikoSys.Setting.ListWidthState = glsNormal then |
| 828 |
|
GikoForm.BrowserSizeWidth := GikoForm.ViewPanel.Width; |
| 829 |
|
if GikoForm.ActiveContent <> nil then |
| 830 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //描画 |
| 831 |
|
GikoForm.ViewPanel.Width := 1; |
| 832 |
|
BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL; |
| 833 |
|
BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
| 834 |
|
GikoSys.Setting.ListWidthState := glsMax; |
| 835 |
|
end; |
| 836 |
|
end; |
| 837 |
|
end else begin |
| 838 |
|
case GikoSys.Setting.ListHeightState of |
| 839 |
|
glsMax: begin |
| 840 |
|
//通常表示にする |
| 841 |
|
if GikoForm.ActiveContent <> nil then |
| 842 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //描画停止 |
| 843 |
|
GikoForm.ViewPanel.Height := GikoForm.BrowserSizeHeight; |
| 844 |
|
BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; |
| 845 |
|
BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
| 846 |
|
GikoSys.Setting.ListHeightState := glsNormal; |
| 847 |
|
if GikoForm.ActiveContent <> nil then |
| 848 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //描画 |
| 849 |
|
end; |
| 850 |
|
glsMin, glsNormal: begin |
| 851 |
|
//最大表示にする |
| 852 |
|
if GikoForm.ActiveContent <> nil then |
| 853 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //描画停止 |
| 854 |
|
if GikoSys.Setting.ListHeightState = glsNormal then |
| 855 |
|
GikoForm.BrowserSizeHeight := GikoForm.ViewPanel.Height; |
| 856 |
|
if GikoForm.ActiveContent <> nil then |
| 857 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //描画 |
| 858 |
|
GikoForm.ViewPanel.Height := 1; |
| 859 |
|
BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL; |
| 860 |
|
BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
| 861 |
|
GikoSys.Setting.ListHeightState := glsMax; |
| 862 |
|
end; |
| 863 |
|
end; |
| 864 |
|
end; |
| 865 |
|
end; |
| 866 |
|
// ************************************************************************* |
| 867 |
|
// スレッド表示エリアを小さく表示する |
| 868 |
|
// ************************************************************************* |
| 869 |
|
procedure TGikoDM.BrowserMinActionExecute(Sender: TObject); |
| 870 |
|
begin |
| 871 |
|
if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
| 872 |
|
case GikoSys.Setting.ListWidthState of |
| 873 |
|
glsMax, glsNormal: begin |
| 874 |
|
//最小表示にする |
| 875 |
|
if GikoForm.ActiveContent <> nil then |
| 876 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //描画停止 |
| 877 |
|
if GikoSys.Setting.ListWidthState = glsNormal then |
| 878 |
|
GikoForm.BrowserSizeWidth := GikoForm.ViewPanel.Width; |
| 879 |
|
if GikoForm.ActiveContent <> nil then |
| 880 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //描画 |
| 881 |
|
GikoForm.ViewPanel.Width := GikoForm.ThreadMainPanel.Width - 80; |
| 882 |
|
BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; |
| 883 |
|
BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL; |
| 884 |
|
GikoSys.Setting.ListWidthState := glsMin; |
| 885 |
|
end; |
| 886 |
|
glsMin: begin |
| 887 |
|
//通常表示にする |
| 888 |
|
if GikoForm.ActiveContent <> nil then |
| 889 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //描画停止 |
| 890 |
|
GikoForm.ViewPanel.Width := GikoForm.BrowserSizeWidth; |
| 891 |
|
BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; |
| 892 |
|
BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
| 893 |
|
GikoSys.Setting.ListWidthState := glsNormal; |
| 894 |
|
if GikoForm.ActiveContent <> nil then |
| 895 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //描画 |
| 896 |
|
end; |
| 897 |
|
end; |
| 898 |
|
end else begin |
| 899 |
|
case GikoSys.Setting.ListHeightState of |
| 900 |
|
glsMax, glsNormal: begin |
| 901 |
|
//最小表示にする |
| 902 |
|
if GikoForm.ActiveContent <> nil then |
| 903 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //描画停止 |
| 904 |
|
if GikoSys.Setting.ListHeightState = glsNormal then |
| 905 |
|
GikoForm.BrowserSizeHeight := GikoForm.ViewPanel.Height; |
| 906 |
|
GikoForm.ViewPanel.Height := GikoForm.ThreadMainPanel.Height - GikoForm.BrowserCoolBar.Height - 7; |
| 907 |
|
BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; |
| 908 |
|
BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL; |
| 909 |
|
GikoSys.Setting.ListHeightState := glsMin; |
| 910 |
|
if GikoForm.ActiveContent <> nil then |
| 911 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //描画 |
| 912 |
|
end; |
| 913 |
|
glsMin: begin |
| 914 |
|
//通常表示にする |
| 915 |
|
if GikoForm.ActiveContent <> nil then |
| 916 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //描画停止 |
| 917 |
|
GikoForm.ViewPanel.Height := GikoForm.BrowserSizeHeight; |
| 918 |
|
BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; |
| 919 |
|
BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
| 920 |
|
GikoSys.Setting.ListHeightState := glsNormal; |
| 921 |
|
if GikoForm.ActiveContent <> nil then |
| 922 |
|
SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //描画 |
| 923 |
|
end; |
| 924 |
|
end; |
| 925 |
|
end; |
| 926 |
|
end; |
| 927 |
|
// ************************************************************************* |
| 928 |
|
// 現在表示しているスレッドの先頭へ移動する |
| 929 |
|
// ************************************************************************* |
| 930 |
|
procedure TGikoDM.ScrollTopActionExecute(Sender: TObject); |
| 931 |
|
begin |
| 932 |
|
GikoForm.BrowserMovement('top'); |
| 933 |
|
end; |
| 934 |
|
// ************************************************************************* |
| 935 |
|
// 現在表示しているスレッドの最後へ移動する |
| 936 |
|
// ************************************************************************* |
| 937 |
|
procedure TGikoDM.ScrollLastActionExecute(Sender: TObject); |
| 938 |
|
begin |
| 939 |
|
GikoForm.BrowserMovement('bottom'); |
| 940 |
|
end; |
| 941 |
|
// ************************************************************************* |
| 942 |
|
// 現在表示しているスレッドの新着へ移動する |
| 943 |
|
// ************************************************************************* |
| 944 |
|
procedure TGikoDM.ScrollNewActionExecute(Sender: TObject); |
| 945 |
|
begin |
| 946 |
|
GikoForm.BrowserMovement('new'); |
| 947 |
|
end; |
| 948 |
|
// ************************************************************************* |
| 949 |
|
// 現在表示しているスレッドのココまで読んだへ移動する |
| 950 |
|
// ************************************************************************* |
| 951 |
|
procedure TGikoDM.ScrollKokoActionExecute(Sender: TObject); |
| 952 |
|
begin |
| 953 |
|
GikoForm.BrowserMovement('koko'); |
| 954 |
|
end; |
| 955 |
|
// ************************************************************************* |
| 956 |
|
// 現在表示しているスレッドのココまで読んだへ移動するのUpdateイベント |
| 957 |
|
// ************************************************************************* |
| 958 |
|
procedure TGikoDM.ScrollKokoActionUpdate(Sender: TObject); |
| 959 |
|
begin |
| 960 |
|
ScrollKokoAction.Enabled := (GikoForm.GetActiveContent <> nil) |
| 961 |
|
and (GikoForm.GetActiveContent.IsLogFile) |
| 962 |
|
and (GikoForm.GetActiveContent.Kokomade <> -1); |
| 963 |
|
end; |
| 964 |
|
// ************************************************************************* |
| 965 |
|
// レス書き込みウィンドウを表示する |
| 966 |
|
// ************************************************************************* |
| 967 |
|
procedure TGikoDM.EditorActionExecute(Sender: TObject); |
| 968 |
|
var |
| 969 |
|
Editor: TEditorForm; |
| 970 |
|
Item: TThreadItem; |
| 971 |
|
begin |
| 972 |
|
Item := GikoForm.GetActiveContent; |
| 973 |
|
if Item = nil then Exit; |
| 974 |
|
Editor := TEditorForm.Create(GikoForm.GetMainForm); |
| 975 |
|
Editor.SetThreadItem(Item); |
| 976 |
|
GikoSys.LoadEditorKeySetting(Editor.ActionList); |
| 977 |
|
Editor.Show; |
| 978 |
|
Editor.BodyEdit.SetFocus; |
| 979 |
|
end; |
| 980 |
|
// ************************************************************************* |
| 981 |
|
// スレをブラウザで表示する |
| 982 |
|
// ************************************************************************* |
| 983 |
|
procedure TGikoDM.IEActionExecute(Sender: TObject); |
| 984 |
|
begin |
| 985 |
|
ShowThreadAction.Execute; |
| 986 |
|
end; |
| 987 |
|
// ************************************************************************* |
| 988 |
|
// 現在表示しているスレッドをブラウザで表示する |
| 989 |
|
// ************************************************************************* |
| 990 |
|
procedure TGikoDM.ShowThreadActionExecute(Sender: TObject); |
| 991 |
|
var |
| 992 |
|
ThreadItem: TThreadItem; |
| 993 |
|
begin |
| 994 |
|
ThreadItem := GikoForm.GetActiveContent; |
| 995 |
|
if ThreadItem = nil then Exit; |
| 996 |
|
GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto); |
| 997 |
|
end; |
| 998 |
|
// ************************************************************************* |
| 999 |
|
// 現在表示しているスレッドの板をブラウザで表示する |
| 1000 |
|
// ************************************************************************* |
| 1001 |
|
procedure TGikoDM.ShowBoardActionExecute(Sender: TObject); |
| 1002 |
|
var |
| 1003 |
|
ThreadItem: TThreadItem; |
| 1004 |
|
begin |
| 1005 |
|
ThreadItem := GikoForm.GetActiveContent; |
| 1006 |
|
if ThreadItem = nil then Exit; |
| 1007 |
|
GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto); |
| 1008 |
|
end; |
| 1009 |
|
// ************************************************************************* |
| 1010 |
|
// 現在表示しているスレッドのURLをコピーする |
| 1011 |
|
// ************************************************************************* |
| 1012 |
|
procedure TGikoDM.URLCopyActionExecute(Sender: TObject); |
| 1013 |
|
var |
| 1014 |
|
s: string; |
| 1015 |
|
begin |
| 1016 |
|
s := ''; |
| 1017 |
|
if TObject(GikoForm.GetActiveContent) is TBoard then |
| 1018 |
|
s := s + TBoard(GikoForm.GetActiveContent).URL + #13#10 |
| 1019 |
|
else if TObject(GikoForm.GetActiveContent) is TThreadItem then |
| 1020 |
|
s := s + TThreadItem(GikoForm.GetActiveContent).URL + #13#10; |
| 1021 |
|
if s <> '' then |
| 1022 |
|
Clipboard.AsText := s; |
| 1023 |
|
end; |
| 1024 |
|
// ************************************************************************* |
| 1025 |
|
// 現在表示しているスレッド名をコピーする |
| 1026 |
|
// ************************************************************************* |
| 1027 |
|
procedure TGikoDM.NameCopyActionExecute(Sender: TObject); |
| 1028 |
|
var |
| 1029 |
|
s: string; |
| 1030 |
|
begin |
| 1031 |
|
s := ''; |
| 1032 |
|
if TObject(GikoForm.GetActiveContent) is TBoard then |
| 1033 |
|
s := s + TBoard(GikoForm.GetActiveContent).Title + #13#10 |
| 1034 |
|
else if TObject(GikoForm.GetActiveContent) is TThreadItem then |
| 1035 |
|
s := s + TThreadItem(GikoForm.GetActiveContent).Title + #13#10; |
| 1036 |
|
if s <> '' then |
| 1037 |
|
Clipboard.AsText := s; |
| 1038 |
|
end; |
| 1039 |
|
// ************************************************************************* |
| 1040 |
|
// 現在表示しているスレッド名とURLをコピーする |
| 1041 |
|
// ************************************************************************* |
| 1042 |
|
procedure TGikoDM.NameURLCopyActionExecute(Sender: TObject); |
| 1043 |
|
var |
| 1044 |
|
s: string; |
| 1045 |
|
begin |
| 1046 |
|
s := ''; |
| 1047 |
|
if TObject(GikoForm.GetActiveContent) is TBoard then |
| 1048 |
|
s := s + TBoard(GikoForm.GetActiveContent).Title + #13#10 + TBoard(GikoForm.GetActiveContent).URL + #13#10 |
| 1049 |
|
else if TObject(GikoForm.GetActiveContent) is TThreadItem then |
| 1050 |
|
s := s + TThreadItem(GikoForm.GetActiveContent).Title + #13#10 + TThreadItem(GikoForm.GetActiveContent).URL + #13#10; |
| 1051 |
|
if s <> '' then |
| 1052 |
|
Clipboard.AsText := s; |
| 1053 |
|
end; |
| 1054 |
|
// ************************************************************************* |
| 1055 |
|
// 表示されているスレッドをダウンロードする |
| 1056 |
|
// ************************************************************************* |
| 1057 |
|
procedure TGikoDM.ItemReloadActionExecute(Sender: TObject); |
| 1058 |
|
var |
| 1059 |
|
ThreadItem: TThreadItem; |
| 1060 |
|
shiftDown: Boolean; |
| 1061 |
|
begin |
| 1062 |
|
ThreadItem := GikoForm.GetActiveContent; |
| 1063 |
|
shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001); |
| 1064 |
|
if ThreadItem <> nil then |
| 1065 |
|
GikoForm.DownloadContent(ThreadItem, shiftDown); |
| 1066 |
|
end; |
| 1067 |
|
// ************************************************************************* |
| 1068 |
|
// 現在開いているタブを閉じる |
| 1069 |
|
// ************************************************************************* |
| 1070 |
|
procedure TGikoDM.BrowserTabCloseActionExecute(Sender: TObject); |
| 1071 |
|
var |
| 1072 |
|
idx: Integer; |
| 1073 |
|
begin |
| 1074 |
|
idx := GikoForm.BrowserTab.TabIndex; |
| 1075 |
|
if idx <> -1 then begin |
| 1076 |
|
if GikoForm.BrowserTab.Tabs.Objects[idx] <> nil then begin |
| 1077 |
|
GikoForm.DeleteTab(TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[idx])); |
| 1078 |
|
end; |
| 1079 |
|
end; |
| 1080 |
|
end; |
| 1081 |
|
// ************************************************************************* |
| 1082 |
|
// タブが1つ以上あれが有効にするUpdateイベント |
| 1083 |
|
// ************************************************************************* |
| 1084 |
|
procedure TGikoDM.BrowserTabCloseActionUpdate(Sender: TObject); |
| 1085 |
|
begin |
| 1086 |
|
TAction(Sender).Enabled := (GikoForm.BrowserTab.Tabs.Count > 0); |
| 1087 |
|
end; |
| 1088 |
|
// ************************************************************************* |
| 1089 |
|
// 現在開いているタブ以外を閉じる |
| 1090 |
|
// ************************************************************************* |
| 1091 |
|
procedure TGikoDM.NotSelectTabCloseActionExecute(Sender: TObject); |
| 1092 |
|
var |
| 1093 |
|
i: Integer; |
| 1094 |
|
idx: Integer; |
| 1095 |
|
begin |
| 1096 |
|
idx := GikoForm.BrowserTab.TabIndex; |
| 1097 |
|
if idx = -1 then Exit; |
| 1098 |
|
GikoForm.BrowserTab.Tabs.BeginUpdate; |
| 1099 |
|
for i := GikoForm.BrowserTab.Tabs.Count - 1 downto GikoForm.BrowserTab.TabIndex + 1 do begin |
| 1100 |
|
TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Free; |
| 1101 |
|
GikoForm.BrowserTab.Tabs.Delete(i); |
| 1102 |
|
end; |
| 1103 |
|
if idx > 0 then begin |
| 1104 |
|
for i := GikoForm.BrowserTab.TabIndex - 1 downto 0 do begin |
| 1105 |
|
TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Free; |
| 1106 |
|
GikoForm.BrowserTab.Tabs.Delete(i); |
| 1107 |
|
end; |
| 1108 |
|
end; |
| 1109 |
|
GikoForm.BrowserTab.Tabs.EndUpdate; |
| 1110 |
|
end; |
| 1111 |
|
// ************************************************************************* |
| 1112 |
|
// タブが2つ以上あれが有効にするUpdateイベント |
| 1113 |
|
// ************************************************************************* |
| 1114 |
|
procedure TGikoDM.NotSelectTabCloseActionUpdate(Sender: TObject); |
| 1115 |
|
begin |
| 1116 |
|
TAction(Sender).Enabled := (GikoForm.BrowserTab.Tabs.Count > 1); |
| 1117 |
|
end; |
| 1118 |
|
// ************************************************************************* |
| 1119 |
|
// 全てのタブを閉じる |
| 1120 |
|
// ************************************************************************* |
| 1121 |
|
procedure TGikoDM.AllTabCloseActionExecute(Sender: TObject); |
| 1122 |
|
var |
| 1123 |
|
i: Integer; |
| 1124 |
|
begin |
| 1125 |
|
if GikoSys.Setting.ShowDialogForAllTabClose then |
| 1126 |
|
if(MessageDlg('全てのタブを閉じてよろしいですか?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then |
| 1127 |
|
Exit; |
| 1128 |
|
|
| 1129 |
|
GikoForm.ActiveContent := nil; |
| 1130 |
|
GikoForm.BrowserNullTab.Thread := nil; |
| 1131 |
|
GikoForm.BrowserTab.OnChange := nil; |
| 1132 |
|
GikoForm.BrowserTab.Tabs.BeginUpdate; |
| 1133 |
|
for i := GikoForm.BrowserTab.Tabs.Count - 1 downto 0 do begin |
| 1134 |
|
TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Free; |
| 1135 |
|
end; |
| 1136 |
|
GikoForm.BrowserTab.Tabs.Clear; |
| 1137 |
|
GikoForm.BrowserTab.Tabs.EndUpdate; |
| 1138 |
|
GikoForm.BrowserTab.OnChange := GikoForm.BrowserTabChange; |
| 1139 |
|
GikoForm.SetContent(GikoForm.BrowserNullTab); |
| 1140 |
|
GikoForm.Caption := CAPTION_NAME ; |
| 1141 |
|
end; |
| 1142 |
|
// ************************************************************************* |
| 1143 |
|
// 現在開いているタブのスレッドを削除する |
| 1144 |
|
// ************************************************************************* |
| 1145 |
|
procedure TGikoDM.ActiveLogDeleteActionExecute(Sender: TObject); |
| 1146 |
|
const |
| 1147 |
|
DEL_MSG = '“^0”のログを削除します。よろしいですか?'; |
| 1148 |
|
DEL_TITLE = '削除確認'; |
| 1149 |
|
var |
| 1150 |
|
idx: Integer; |
| 1151 |
|
ThreadItem: TThreadItem; |
| 1152 |
|
begin |
| 1153 |
|
idx := GikoForm.BrowserTab.TabIndex; |
| 1154 |
|
if idx <> -1 then begin |
| 1155 |
|
if GikoForm.BrowserTab.Tabs.Objects[idx] <> nil then begin |
| 1156 |
|
ThreadItem := TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[idx]).Thread; |
| 1157 |
|
if GikoSys.Setting.DeleteMsg then |
| 1158 |
|
if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then |
| 1159 |
|
if MsgBox(GikoForm.Handle, StringReplace( DEL_MSG, '^0', ThreadItem.Title, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then |
| 1160 |
|
Exit; |
| 1161 |
|
GikoForm.DeleteTab(TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[idx])); |
| 1162 |
|
ThreadItem.DeleteLogFile; |
| 1163 |
|
if ThreadItem.ParentBoard = GikoForm.ActiveList then |
| 1164 |
|
GikoForm.ListView.Refresh; |
| 1165 |
|
end; |
| 1166 |
|
end; |
| 1167 |
|
end; |
| 1168 |
|
// ************************************************************************* |
| 1169 |
|
// 一番左のタブを選択する |
| 1170 |
|
// ************************************************************************* |
| 1171 |
|
procedure TGikoDM.LeftmostTabSelectActionExecute(Sender: TObject); |
| 1172 |
|
begin |
| 1173 |
|
if GikoForm.BrowserTab.Tabs.Count > 0 then begin |
| 1174 |
|
GikoForm.BrowserTab.TabIndex := 0; |
| 1175 |
|
GikoForm.BrowserTab.OnChange(nil); |
| 1176 |
|
end; |
| 1177 |
|
end; |
| 1178 |
|
// ************************************************************************* |
| 1179 |
|
// タブの数が1以上で、タブのインデックスが0以外で有効になるUpdateイベント |
| 1180 |
|
// ************************************************************************* |
| 1181 |
|
procedure TGikoDM.LeftmostTabSelectActionUpdate(Sender: TObject); |
| 1182 |
|
begin |
| 1183 |
|
TAction(Sender).Enabled := (GikoForm.BrowserTab.Tabs.Count > 0) |
| 1184 |
|
and (GikoForm.BrowserTab.TabIndex <> 0); |
| 1185 |
|
end; |
| 1186 |
|
// ************************************************************************* |
| 1187 |
|
// 左のタブを選択する |
| 1188 |
|
// ************************************************************************* |
| 1189 |
|
procedure TGikoDM.LeftTabSelectActionExecute(Sender: TObject); |
| 1190 |
|
begin |
| 1191 |
|
if GikoForm.BrowserTab.Tabs.Count > 0 then begin |
| 1192 |
|
if GikoForm.BrowserTab.TabIndex = -1 then begin |
| 1193 |
|
GikoForm.BrowserTab.TabIndex := 0; |
| 1194 |
|
GikoForm.BrowserTab.OnChange(nil); |
| 1195 |
|
end else if GikoForm.BrowserTab.TabIndex > 0 then begin |
| 1196 |
|
GikoForm.BrowserTab.TabIndex := GikoForm.BrowserTab.TabIndex - 1; |
| 1197 |
|
GikoForm.BrowserTab.OnChange(nil); |
| 1198 |
|
end; |
| 1199 |
|
end; |
| 1200 |
|
end; |
| 1201 |
|
// ************************************************************************* |
| 1202 |
|
// 右のタブを選択する |
| 1203 |
|
// ************************************************************************* |
| 1204 |
|
procedure TGikoDM.RightTabSelectActionExecute(Sender: TObject); |
| 1205 |
|
begin |
| 1206 |
|
if GikoForm.BrowserTab.Tabs.Count > 0 then begin |
| 1207 |
|
if GikoForm.BrowserTab.TabIndex = -1 then begin |
| 1208 |
|
GikoForm.BrowserTab.TabIndex := GikoForm.BrowserTab.Tabs.Count - 1; |
| 1209 |
|
GikoForm.BrowserTab.OnChange(nil); |
| 1210 |
|
end else if GikoForm.BrowserTab.TabIndex < (GikoForm.BrowserTab.Tabs.Count - 1) then begin |
| 1211 |
|
GikoForm.BrowserTab.TabIndex := GikoForm.BrowserTab.TabIndex + 1; |
| 1212 |
|
GikoForm.BrowserTab.OnChange(nil); |
| 1213 |
|
end; |
| 1214 |
|
end; |
| 1215 |
|
end; |
| 1216 |
|
// ************************************************************************* |
| 1217 |
|
// タブの数が1以上で、タブが右端以外で有効になるUpdateイベント |
| 1218 |
|
// ************************************************************************* |
| 1219 |
|
procedure TGikoDM.RightTabSelectActionUpdate(Sender: TObject); |
| 1220 |
|
begin |
| 1221 |
|
TAction(Sender).Enabled := (GikoForm.BrowserTab.Tabs.Count > 0) |
| 1222 |
|
and (GikoForm.BrowserTab.TabIndex <> GikoForm.BrowserTab.Tabs.Count - 1); |
| 1223 |
|
end; |
| 1224 |
|
// ************************************************************************* |
| 1225 |
|
// 一番右のタブを選択する |
| 1226 |
|
// ************************************************************************* |
| 1227 |
|
procedure TGikoDM.RightmostTabSelectActionExecute(Sender: TObject); |
| 1228 |
|
begin |
| 1229 |
|
if GikoForm.BrowserTab.Tabs.Count > 0 then begin |
| 1230 |
|
GikoForm.BrowserTab.TabIndex := GikoForm.BrowserTab.Tabs.Count - 1; |
| 1231 |
|
GikoForm.BrowserTab.OnChange(nil); |
| 1232 |
|
end; |
| 1233 |
|
end; |
| 1234 |
|
// ************************************************************************* |
| 1235 |
|
// 選択されているスレッドをお気に入りに追加 |
| 1236 |
|
// ************************************************************************* |
| 1237 |
|
procedure TGikoDM.ThreadFavoriteAddActionExecute(Sender: TObject); |
| 1238 |
|
begin |
| 1239 |
|
if TObject(GikoForm.ListView.Selected.Data) is TThreadItem then |
| 1240 |
|
GikoForm.ShowFavoriteAddDialog(TObject(GikoForm.ListView.Selected.Data)); |
| 1241 |
|
end; |
| 1242 |
|
// ************************************************************************* |
| 1243 |
|
// スレッド一覧で、スレが1つ以上選択されている有効になるUpdateイベント |
| 1244 |
|
// ************************************************************************* |
| 1245 |
|
procedure TGikoDM.ThreadFavoriteAddActionUpdate(Sender: TObject); |
| 1246 |
|
begin |
| 1247 |
|
TAction(Sender).Enabled := (GikoForm.GetActiveList is TBoard) |
| 1248 |
|
and (GikoForm.ListView.SelCount > 0); |
| 1249 |
|
end; |
| 1250 |
|
// ************************************************************************* |
| 1251 |
|
// レスの内容を絞り込む |
| 1252 |
|
// ************************************************************************* |
| 1253 |
|
procedure TGikoDM.SelectResActionExecute(Sender: TObject); |
| 1254 |
|
var |
| 1255 |
|
Dlg: TListSelectDialog; |
| 1256 |
|
FilterList : TStringList; |
| 1257 |
|
idx : Integer; |
| 1258 |
|
begin |
| 1259 |
|
Dlg := TListSelectDialog.Create(Self); |
| 1260 |
|
try |
| 1261 |
|
Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList); |
| 1262 |
|
Dlg.SelectComboBox.Text := GikoForm.SelectResWord; |
| 1263 |
|
Dlg.ShowModal; |
| 1264 |
|
if Dlg.ModalResult = mrOK then begin |
| 1265 |
|
SelectResAction.Checked := True; |
| 1266 |
|
if Length( Dlg.SelectComboBox.Text ) = 0 then begin |
| 1267 |
|
// 空入力で OK は絞り込み解除と同意義 |
| 1268 |
|
ResRangeAction.Execute; |
| 1269 |
|
end else begin |
| 1270 |
|
GikoSys.ResRange := Ord( grrSelect ); |
| 1271 |
|
|
| 1272 |
|
// 最後に設定したものを覚えておく |
| 1273 |
|
GikoForm.SelectResWord := Dlg.SelectComboBox.Text; |
| 1274 |
|
|
| 1275 |
|
// 検索履歴の更新 |
| 1276 |
|
idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text); |
| 1277 |
|
if idx <> -1 then |
| 1278 |
|
GikoSys.Setting.SelectTextList.Delete(idx); |
| 1279 |
|
GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text); |
| 1280 |
|
while Dlg.SelectComboBox.Items.Count > 100 do begin |
| 1281 |
|
Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1); |
| 1282 |
|
end; |
| 1283 |
|
|
| 1284 |
|
try |
| 1285 |
|
if GikoForm.SelectComboBoxPanel.Visible then |
| 1286 |
|
GikoForm.SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList ); |
| 1287 |
|
except |
| 1288 |
|
end; |
| 1289 |
|
|
| 1290 |
|
// フィルタの設定 |
| 1291 |
|
FilterList := TStringList.Create; |
| 1292 |
|
try |
| 1293 |
|
GikoSys.FSelectResFilter.Reverse := True; |
| 1294 |
|
FilterList.Delimiter := ' '; //区切り子を半角スペースに設定 |
| 1295 |
|
FilterList.DelimitedText := Dlg.SelectComboBox.Text; |
| 1296 |
|
|
| 1297 |
|
GikoSys.FSelectResFilter.LoadFromStringList( FilterList ); |
| 1298 |
|
finally |
| 1299 |
|
FilterList.Free; |
| 1300 |
|
end; |
| 1301 |
|
GikoForm.RepaintAllTabsBrowser(); |
| 1302 |
|
end; |
| 1303 |
|
end else begin |
| 1304 |
|
// キャンセル |
| 1305 |
|
if GikoSys.ResRange <> Ord( grrSelect ) then |
| 1306 |
|
ResRangeAction.Execute; |
| 1307 |
|
end; |
| 1308 |
|
finally |
| 1309 |
|
Dlg.Release; |
| 1310 |
|
end; |
| 1311 |
|
|
| 1312 |
|
end; |
| 1313 |
|
// ************************************************************************* |
| 1314 |
|
// 全てのレスを表示する |
| 1315 |
|
// ************************************************************************* |
| 1316 |
|
procedure TGikoDM.AllResActionExecute(Sender: TObject); |
| 1317 |
|
var |
| 1318 |
|
FilterList : TStringList; |
| 1319 |
|
begin |
| 1320 |
|
if(GikoForm.ActiveContent <> nil) and (GikoForm.ActiveContent.Browser <> nil ) |
| 1321 |
|
and (GikoForm.ActiveContent.Browser.Busy) then Exit; |
| 1322 |
|
|
| 1323 |
|
GikoForm.ResRangeMenuSelect := Ord( grrAll ); |
| 1324 |
|
AllResAction.Checked := True; |
| 1325 |
|
|
| 1326 |
|
if GikoSys.ResRange <> Ord( grrAll ) then begin |
| 1327 |
|
GikoSys.ResRange := Ord( grrAll ); |
| 1328 |
|
|
| 1329 |
|
// フィルタ文字列を空にする |
| 1330 |
|
FilterList := TStringList.Create; |
| 1331 |
|
try |
| 1332 |
|
GikoSys.FSelectResFilter.LoadFromStringList( FilterList ); |
| 1333 |
|
GikoSys.FSelectResFilter.Reverse := False; |
| 1334 |
|
finally |
| 1335 |
|
FilterList.Free; |
| 1336 |
|
end; |
| 1337 |
|
|
| 1338 |
|
GikoForm.SelectResWord := ''; |
| 1339 |
|
|
| 1340 |
|
GikoForm.RepaintAllTabsBrowser(); |
| 1341 |
|
end; |
| 1342 |
|
end; |
| 1343 |
|
// ************************************************************************* |
| 1344 |
|
// レスの表示範囲を設定 |
| 1345 |
|
// ************************************************************************* |
| 1346 |
|
procedure TGikoDM.ResRangeActionExecute(Sender: TObject); |
| 1347 |
|
begin |
| 1348 |
|
case GikoForm.ResRangeMenuSelect of |
| 1349 |
|
Ord( grrAll ): AllResAction.Execute; |
| 1350 |
|
Ord( grrKoko ): OnlyKokoResAction.Execute; |
| 1351 |
|
Ord( grrNew ): OnlyNewResAction.Execute; |
| 1352 |
|
100: OnlyAHundredResAction.Execute; |
| 1353 |
|
end; |
| 1354 |
|
|
| 1355 |
|
end; |
| 1356 |
|
// ************************************************************************* |
| 1357 |
|
// このスレッドを含むスレッド一覧を表示 |
| 1358 |
|
// ************************************************************************* |
| 1359 |
|
procedure TGikoDM.UpBoardActionExecute(Sender: TObject); |
| 1360 |
|
begin |
| 1361 |
|
GikoForm.SelectTreeNode( GikoForm.GetActiveContent.ParentBoard, True ); |
| 1362 |
|
end; |
| 1363 |
|
// ************************************************************************* |
| 1364 |
|
// 指定した番号のレスに飛ぶ |
| 1365 |
|
// ************************************************************************* |
| 1366 |
|
procedure TGikoDM.JumpToNumOfResActionExecute(Sender: TObject); |
| 1367 |
|
var |
| 1368 |
|
str: string; |
| 1369 |
|
res: integer; |
| 1370 |
|
begin |
| 1371 |
|
str := '1'; |
| 1372 |
|
if( InputQuery('指定した番号のレスに飛ぶ', '番号を入力してください', str) ) then begin |
| 1373 |
|
str := ZenToHan(str); |
| 1374 |
|
res := StrToIntDef(str, -1); |
| 1375 |
|
if (res > 0) and (res <= GikoForm.GetActiveContent.Count) then begin |
| 1376 |
|
GikoForm.BrowserMovement(IntToStr(res), GikoForm.ActiveContent); |
| 1377 |
|
SetFocusForBrowserAction.Execute; |
| 1378 |
|
end else if res > GikoForm.GetActiveContent.Count then begin |
| 1379 |
|
GikoForm.BrowserMovement(IntToStr(GikoForm.GetActiveContent.Count), GikoForm.ActiveContent); |
| 1380 |
|
SetFocusForBrowserAction.Execute; |
| 1381 |
|
end; |
| 1382 |
|
end; |
| 1383 |
|
end; |
| 1384 |
|
// ************************************************************************* |
| 1385 |
|
// アクティブなタブより右を閉じる |
| 1386 |
|
// ************************************************************************* |
| 1387 |
|
procedure TGikoDM.RightTabCloseActionExecute(Sender: TObject); |
| 1388 |
|
var |
| 1389 |
|
i: Integer; |
| 1390 |
|
idx: Integer; |
| 1391 |
|
begin |
| 1392 |
|
idx := GikoForm.BrowserTab.TabIndex; |
| 1393 |
|
if idx = -1 then Exit; |
| 1394 |
|
GikoForm.BrowserTab.Tabs.BeginUpdate; |
| 1395 |
|
for i := GikoForm.BrowserTab.Tabs.Count - 1 downto idx + 1 do begin |
| 1396 |
|
TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Free; |
| 1397 |
|
GikoForm.BrowserTab.Tabs.Delete(i); |
| 1398 |
|
end; |
| 1399 |
|
GikoForm.BrowserTab.Tabs.EndUpdate; |
| 1400 |
|
end; |
| 1401 |
|
// ************************************************************************* |
| 1402 |
|
// タブの数が2以上で有効なUpdateイベント |
| 1403 |
|
// ************************************************************************* |
| 1404 |
|
procedure TGikoDM.RightTabCloseActionUpdate(Sender: TObject); |
| 1405 |
|
begin |
| 1406 |
|
TAction(Sender).Enabled := (GikoForm.BrowserTab.Tabs.Count > 1); |
| 1407 |
|
end; |
| 1408 |
|
// ************************************************************************* |
| 1409 |
|
// アクティブなタブより左を閉じる |
| 1410 |
|
// ************************************************************************* |
| 1411 |
|
procedure TGikoDM.LeftTabCloseActionExecute(Sender: TObject); |
| 1412 |
|
var |
| 1413 |
|
i: Integer; |
| 1414 |
|
idx: Integer; |
| 1415 |
|
begin |
| 1416 |
|
idx := GikoForm.BrowserTab.TabIndex; |
| 1417 |
|
if idx = -1 then Exit; |
| 1418 |
|
GikoForm.BrowserTab.Tabs.BeginUpdate; |
| 1419 |
|
if idx > 0 then begin |
| 1420 |
|
for i := idx - 1 downto 0 do begin |
| 1421 |
|
TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Free; |
| 1422 |
|
GikoForm.BrowserTab.Tabs.Delete(i); |
| 1423 |
|
end; |
| 1424 |
|
end; |
| 1425 |
|
GikoForm.BrowserTab.Tabs.EndUpdate; |
| 1426 |
|
end; |
| 1427 |
|
////////////////////////////////スレッドまでおしまい///////////////////// |
| 1428 |
end. |
end. |
| 1429 |
|
|