uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
- OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils, Math,
+ OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils,
{$IF Defined(DELPRO) }
SHDocVw,
MSHTML,
MSHTML_TLB,
{$IFEND}
IdHTTP, ActiveX, ActnList, ImgList,
- ToolWin, Buttons, {Clipbrd,} {HTTPApp,} YofUtils, IdComponent,
- ShellAPI, UrlMon, Tabs, IdGlobal, StrUtils,
- CommCtrl, IniFiles, Dialogs,
- GikoSystem, GikoUtil, Setting, BoardGroup, ThreadControl, ItemDownload,
- Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd,
- FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan,
- HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil,
- IndividualAbon, Search, ExternalBoardManager, ExternalBoardPlugInMain,
- StdActns, GikoXMLDoc, Variants, ExtActns,IdTCPConnection, IdBaseComponent,
- IdTCPClient, Gesture;
+ ToolWin, Buttons, IdComponent, UrlMon, Tabs, IdGlobal, StrUtils,
+ CommCtrl, Dialogs, GikoSystem, Setting, BoardGroup, ThreadControl, ItemDownload,
+ Editor, RoundData, GikoPanel, Favorite, HTMLDocumentEvent,
+ HintWindow, GikoCoolBar, GikoListView, Search, ExternalBoardManager,
+ ExternalBoardPlugInMain, StdActns, Variants, ExtActns,IdTCPConnection,
+ IdBaseComponent, IdTCPClient, AppEvnts, BrowserRecord;
+const
+ NGWORDNAME_PANEL = 3;
+ THREADSIZE_PANEL = 2;
+
type
TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser);
TMinimizeType = (mtNone, mtMinimizing, mtMinimized);
TResizeType = (rtNone, rtResizing);
- TBrowserRecord = class;
+// TBrowserRecord = class;
TGikoForm = class(TForm)
StatusBar: TStatusBar;
MessageListView: TListView;
MessageSplitter: TSplitter;
Panel3: TPanel;
- SpeedButton1: TSpeedButton;
+ CabinetCloseSpeedButton: TSpeedButton;
ToolBar1: TToolBar;
CabinetSelectToolButton: TToolButton;
HistoryToolBar: TToolBar;
- ToolButton15: TToolButton;
- ToolButton18: TToolButton;
+ HistoryShowToolButton: TToolButton;
+ HistoryAllClearToolButton: TToolButton;
ItemIcon16: TImageList;
ItemIcon32: TImageList;
HotToobarImageList: TImageList;
- ToobarImageList: TImageList;
ItemImageList: TImageList;
- ActionList: TActionList;
- LogDeleteAction: TAction;
- KidokuAction: TAction;
- StdToolBarVisibleAction: TAction;
- SearchAction: TAction;
- GikoNaviWebPageAction: TAction;
- AboutAction: TAction;
- ExitAction: TAction;
- MsgBarVisibleAction: TAction;
- StatusBarVisibleAction: TAction;
- LargeIconAction: TAction;
- SmallIconAction: TAction;
- ListIconAction: TAction;
- DetailIconAction: TAction;
- CabinetBBSAction: TAction;
- CabinetHistoryAction: TAction;
- CabinetVisibleAction: TAction;
- MidokuAction: TAction;
- AllSelectAction: TAction;
- UpFolderAction: TAction;
- ListNumberVisibleAction: TAction;
- AllItemAction: TAction;
- LogItemAction: TAction;
- NewItemAction: TAction;
- SelectItemAction: TAction;
- ShowThreadAction: TAction;
- StopAction: TAction;
MainMenu: TMainMenu;
FileMenu: TMenuItem;
DeleteMenu: TMenuItem;
G1: TMenuItem;
N1: TMenuItem;
AboutMenu: TMenuItem;
- IconStyle: TAction;
BrowserPopupMenu: TPopupMenu;
ShowThreadMenu: TMenuItem;
ShowBoardMenu: TMenuItem;
- ShowBoardAction: TAction;
ListIconPopupMenu: TPopupMenu;
LargeIconPMenu: TMenuItem;
SmallIconPMenu: TMenuItem;
ListPMenu: TMenuItem;
DetailPMenu: TMenuItem;
- CabinetCloseAction: TAction;
ClosePopupMenu: TPopupMenu;
CloseMenu: TMenuItem;
- OptionAction: TAction;
U1: TMenuItem;
N3: TMenuItem;
B1: TMenuItem;
L1: TMenuItem;
N5: TMenuItem;
S2: TMenuItem;
- RoundAction: TAction;
ListPopupMenu: TPopupMenu;
ListRoundPMenu: TMenuItem;
ListReservPMenu: TMenuItem;
T1: TMenuItem;
B2: TMenuItem;
N8: TMenuItem;
- URLCopyAction: TAction;
URLC1: TMenuItem;
N9: TMenuItem;
N10: TMenuItem;
- MsgBarCloseAction: TAction;
- ScrollTopAction: TAction;
- ScrollLastAction: TAction;
- ScrollNewAction: TAction;
- ScrollKokoAction: TAction;
- EditorAction: TAction;
- IEAction: TAction;
- ItemReloadAction: TAction;
- BrowserMaxAction: TAction;
G2: TMenuItem;
N11: TMenuItem;
T3: TMenuItem;
R1: TMenuItem;
A2: TMenuItem;
N15: TMenuItem;
- SelectListReloadAction: TAction;
- SelectThreadReloadAction: TAction;
KokoPopupMenu: TPopupMenu;
KokomadePMenu: TMenuItem;
AllPMenu: TMenuItem;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
- BrowserTabCloseAction: TAction;
BrowserTabPopupMenu: TPopupMenu;
Close1: TMenuItem;
- KokomadeAction: TAction;
- ZenbuAction: TAction;
- KokoResAction: TAction;
- SelectItemURLCopyAction: TAction;
- SelectReservAction: TAction;
- NotSelectTabCloseAction: TAction;
A3: TMenuItem;
N16: TMenuItem;
A4: TMenuItem;
TreeSelectBoardPupupMenu: TMenuItem;
TPMSep01: TMenuItem;
TreeSelectURLPupupMenu: TMenuItem;
- TreeSelectBoradReload: TAction;
- TreeSelectThreadReload: TAction;
- TreeSelectURLCopy: TAction;
- ListToolBarVisibleAction: TAction;
- BrowserToolBarVisibleAction: TAction;
T2: TMenuItem;
L3: TMenuItem;
B3: TMenuItem;
H2: TMenuItem;
ItemReservPMenu: TMenuItem;
RoundNamePopupMenu: TPopupMenu;
- SelectNewRoundName: TAction;
- SelectDeleteRound: TAction;
- NewBoardAction: TAction;
N7: TMenuItem;
B4: TMenuItem;
- LoginAction: TAction;
L4: TMenuItem;
- KeySettingAction: TAction;
K2: TMenuItem;
- AllTabCloseAction: TAction;
A5: TMenuItem;
A6: TMenuItem;
C1: TMenuItem;
D2: TMenuItem;
MessageImageList: TImageList;
ProgressBar: TProgressBar;
- ArrangeAction: TAction;
URL1: TMenuItem;
- NameURLCopyAction: TAction;
- SelectItemNameURLCopyAction: TAction;
NameUrlCopyPMenu: TMenuItem;
URLC2: TMenuItem;
URLN1: TMenuItem;
BrowserBoardNameLabel: TLabel;
ItemImage: TImage;
BrowserNameLabel: TLabel;
- ActiveLogDeleteAction: TAction;
D3: TMenuItem;
N25: TMenuItem;
N26: TMenuItem;
- ListNameBarVisibleAction: TAction;
D4: TMenuItem;
- BrowserNameBarVisibleAction: TAction;
S3: TMenuItem;
R2: TMenuItem;
- TreeSelectNameURLCopy: TAction;
TreeSelectNameURLPupupMenu: TMenuItem;
N27: TMenuItem;
H3: TMenuItem;
- PaneInitAction: TAction;
I1: TMenuItem;
BrowserTabToolBar: TToolBar;
BrowserTab: TTabControl;
- BrowserMinAction: TAction;
About1: TMenuItem;
N28: TMenuItem;
- SelectTextClearAction: TAction;
- MailTextClearAction: TAction;
- NameTextClearAction: TAction;
S4: TMenuItem;
N29: TMenuItem;
N30: TMenuItem;
- LeftmostTabSelectAction: TAction;
- LeftTabSelectAction: TAction;
- RightTabSelectAction: TAction;
- RightmostTabSelectAction: TAction;
N31: TMenuItem;
L5: TMenuItem;
L6: TMenuItem;
A7: TMenuItem;
R3: TMenuItem;
FavoriteMenu: TMenuItem;
- FavoriteAddAction: TAction;
N32: TMenuItem;
BoardFavoriteAddMenu: TMenuItem;
- BoardFavoriteAddAction: TAction;
- ThreadFavoriteAddAction: TAction;
ThreadFavoriteAddMenu: TMenuItem;
- TreeSelectFavoriteAddAction: TAction;
N33: TMenuItem;
TreeSelectFavoriteAddPupupMenu: TMenuItem;
- FavoriteArrangeAction: TAction;
FavoriteTreeView: TTreeView;
StateIconImageList: TImageList;
TopPanel: TPanel;
AddressToolBar: TToolBar;
AddressComboBox: TComboBox;
MoveToToolButton: TToolButton;
- MoveToAction: TAction;
AddressImageList: TImageList;
- AddressBarVisibleAction: TAction;
AddressToolBarMenu: TMenuItem;
T4: TMenuItem;
- BrowserTabVisibleAction: TAction;
Show1: TMenuItem;
N34: TMenuItem;
- BrowserTabTopAction: TAction;
- BrowserTabBottomAction: TAction;
T5: TMenuItem;
B5: TMenuItem;
N35: TMenuItem;
- BrowserTabTabStyleAction: TAction;
- BrowserTabButtonStyleAction: TAction;
- BrowserTabFlatStyleAction: TAction;
A8: TMenuItem;
U2: TMenuItem;
F1: TMenuItem;
PreviewTimer: TTimer;
- MonazillaWebPageAction: TAction;
MonazillaWebPageAction1: TMenuItem;
- GikoHelpAction: TAction;
N36: TMenuItem;
H4: TMenuItem;
- KotehanAction: TAction;
K3: TMenuItem;
- LinkBarVisibleAction: TAction;
L7: TMenuItem;
N37: TMenuItem;
A9: TMenuItem;
ChevronPopupMenu: TPopupMenu;
- BBS2chWebPageAction: TAction;
N2N1: TMenuItem;
N38: TMenuItem;
- GikoFolderOpenAction: TAction;
F2: TMenuItem;
LinkToolBar: TToolBar;
a10: TMenuItem;
- ThreadEditorAction: TAction;
N39: TMenuItem;
T6: TMenuItem;
N40: TMenuItem;
LinkBarPopupMenu: TPopupMenu;
- ToolBarSettingAction: TAction;
T7: TMenuItem;
ThreadPopupMenu: TPopupMenu;
MenuItem4: TMenuItem;
MenuItem5: TMenuItem;
MenuItem6: TMenuItem;
T8: TMenuItem;
- NameCopyAction: TAction;
- BoardIEAction: TAction;
URLN3: TMenuItem;
- SelectItemNameCopyAction: TAction;
SelectItemNameCopyAction1: TMenuItem;
B6: TMenuItem;
T9: TMenuItem;
F4: TMenuItem;
N48: TMenuItem;
T14: TMenuItem;
- SelectResAction: TAction;
ToolButton16: TToolButton;
- AllResAction: TAction;
N50: TMenuItem;
A11: TMenuItem;
S5: TMenuItem;
Reload: TMenuItem;
GoBack: TMenuItem;
GoFoward: TMenuItem;
- EditNGAction: TAction;
- ReloadAction: TAction;
- GoFowardAction: TAction;
- GoBackAction: TAction;
IndividualAbon1: TMenuItem;
N41: TMenuItem;
IndividualAbon2: TMenuItem;
- N42: TMenuItem;
- CancellIndividualAbon: TAction;
+ AntiIndivAbonMenuItem: TMenuItem;
AntiIndividualAbon: TMenuItem;
N49: TMenuItem;
N51: TMenuItem;
N52: TMenuItem;
SearchBoardName: TMenuItem;
TreeSelectLogDeleteSeparator: TMenuItem;
- TreeSelectSearchBoardName: TAction;
- CabinetFavoriteAction: TAction;
N54: TMenuItem;
A13: TMenuItem;
FavoriteTreePopupMenu: TPopupMenu;
- FavoriteTreeViewRenameAction: TAction;
FavoriteTreeRenamePopupMenu: TMenuItem;
- FavoriteTreeViewNewFolderAction: TAction;
FavoriteTreeNewFolderPopupMenu: TMenuItem;
N56: TMenuItem;
- FavoriteTreeViewDeleteAction: TAction;
FavoriteTreeDeletePopupMenu: TMenuItem;
FavoriteToolBar: TToolBar;
- ToolButton17: TToolButton;
- ToolButton19: TToolButton;
- FavoriteTreeViewBrowseFolderAction: TAction;
+ FavoriteAddToolButton: TToolButton;
+ FavoriteArrangeToolButton: TToolButton;
FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
N57: TMenuItem;
FavoriteTreeReloadPopupMenu: TMenuItem;
FavoriteTreeLogDeletePopupMenu: TMenuItem;
N59: TMenuItem;
FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
- FavoriteTreeViewReloadAction: TAction;
- FavoriteTreeViewURLCopyAction: TAction;
- FavoriteTreeViewNameCopyAction: TAction;
- FavoriteTreeViewNameURLCopyAction: TAction;
- FavoriteTreeViewLogDeleteAction: TAction;
- ResRangeAction: TAction;
ToolButton20: TToolButton;
N60: TMenuItem;
ExportFavoriteFileAction1: TMenuItem;
- ExportFavoriteFile: TFileSaveAs;
N6: TMenuItem;
N17: TMenuItem;
- FavoriteTreeViewBrowseBoardAction: TAction;
- FavoriteTreeViewBrowseThreadAction: TAction;
- UpBoardAction: TAction;
N18: TMenuItem;
N20: TMenuItem;
- N24: TMenuItem;
+ N24: TMenuItem;
N62: TMenuItem;
N61: TMenuItem;
N63: TMenuItem;
- KoreCopy: TAction;
N64: TMenuItem;
dummy1: TMenuItem;
- TreeSelectLogDeletePopupMenu: TMenuItem;
+ TreeSelectLogDeletePopupMenu: TMenuItem;
N65: TMenuItem;
BBSSelectPopupMenu: TPopupMenu;
PlugInMenu: TMenuItem;
- TreeSelectNameCopy: TAction;
- TreeSelectNamePupupMenu: TMenuItem;
+ TreeSelectNamePupupMenu: TMenuItem;
BrowserPanel: TPanel;
- SetFocusForBrowserAction: TAction;
- SetFocusForThreadListAction: TAction;
- SetFocusForCabinetAction: TAction;
- FileRun1: TFileRun;
- ThreadlistMaxAndFocusAction: TAction;
- BrowserMaxAndFocusAction: TAction;
SelectTimer: TTimer;
SelectThreadSave: TMenuItem;
- SelectItemSaveForHTML: TAction;
- FileSaveAs1: TFileSaveAs;
N55: TMenuItem;
N66: TMenuItem;
dat1: TMenuItem;
- SelectItemSaveForDat: TAction;
- LogFolderOpenAction: TAction;
OpenLogFolder: TMenuItem;
Browser: TWebBrowser;
TabSave: TMenuItem;
TabOpen: TMenuItem;
- TabsSaveAction: TAction;
- TabsOpenAction: TAction;
ResRangePopupMenu: TPopupMenu;
- N1001: TMenuItem;
- N501: TMenuItem;
- N22: TMenuItem;
- OnlyAHundredResAction: TAction;
- OnlyNewResAction: TAction;
- OnlyKokoResAction: TAction;
- A14: TMenuItem;
- BrowsBoradHeadAction: TAction;
- BrowsBoradHeadAction1: TMenuItem;
- ThreadRangeAction: TAction;
+ ResRangeHundPMenuItem: TMenuItem;
+ ResRangeKokoPMenuItem: TMenuItem;
+ ResRangeNewPMenuItem: TMenuItem;
+ ResRangeAllPMenuItem: TMenuItem;
+ BrowsBoradHeadAction1: TMenuItem;
ThreadRangePopupMenu: TPopupMenu;
A15: TMenuItem;
L8: TMenuItem;
- N67: TMenuItem;
+ N67: TMenuItem;
N68: TMenuItem;
S6: TMenuItem;
N69: TMenuItem;
- S7: TMenuItem;
- TabAutoSaveAction: TAction;
- TabAutoLoadAction: TAction;
+ ResRangeSelectPMenuItem: TMenuItem;
ListColumnPopupMenu: TPopupMenu;
- JumpToNumOfResAction: TAction;
- FavoriteTreeViewCollapseAction: TAction;
- RightTabCloseAction: TAction;
- LeftTabCloseAction: TAction;
N70: TMenuItem;
- SameIDResAnchorAction: TAction;
ID1: TMenuItem;
- IndividualAbon1Action: TAction;
- IndividualAbon0Action: TAction;
- AntiIndividualAbonAction: TAction;
- AntiIndividualAbonDlgAction: TAction;
- IndividualAbonID1Action: TAction;
ID2: TMenuItem;
N53: TMenuItem;
ID3: TMenuItem;
- IndividualAbonID0Action: TAction;
N71: TMenuItem;
- MuteAction: TAction;
N72: TMenuItem;
N73: TMenuItem;
- SortActiveColumnAction: TAction;
- SortNextColumnAction: TAction;
- SortPrevColumnAction: TAction;
- BeLogInOutAction: TAction;
- UnSelectedListViewAction: TAction;
SelectComboBoxPanel: TPanel;
SelectComboBoxSplitter: TImage;
- ToolButton1: TToolButton;
+ ToolButton1: TToolButton;
N74: TMenuItem;
WikiFAQ: TMenuItem;
- WikiFAQWebPageAction: TAction;
+ GikoApplicationEvents: TApplicationEvents;
+ N22: TMenuItem;
+ N42: TMenuItem;
+ DAT2: TMenuItem;
+ N75: TMenuItem;
+ DAT3: TMenuItem;
+ N76: TMenuItem;
+ FavoriteTreeItemNameCopyPopupMenu: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure BrowserStatusTextChange(Sender: TObject;
procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
- procedure TreeViewDblClick(Sender: TObject);
procedure ListViewCustomDraw(Sender: TCustomListView;
const ARect: TRect; var DefaultDraw: Boolean);
procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
procedure MessageListViewResize(Sender: TObject);
- procedure ExitActionExecute(Sender: TObject);
- procedure AllSelectActionExecute(Sender: TObject);
- procedure StdToolBarVisibleActionExecute(Sender: TObject);
- procedure MsgBarVisibleActionExecute(Sender: TObject);
- procedure StatusBarVisibleActionExecute(Sender: TObject);
- procedure LargeIconActionExecute(Sender: TObject);
- procedure SmallIconActionExecute(Sender: TObject);
- procedure ListIconActionExecute(Sender: TObject);
- procedure DetailIconActionExecute(Sender: TObject);
- procedure SearchActionExecute(Sender: TObject);
- procedure OptionActionExecute(Sender: TObject);
- procedure GikoNaviWebPageActionExecute(Sender: TObject);
- procedure AboutActionExecute(Sender: TObject);
- procedure CabinetHistoryActionExecute(Sender: TObject);
procedure CabinetVisible( isVisible : Boolean );
- procedure CabinetVisibleActionExecute(Sender: TObject);
- procedure AllItemActionExecute(Sender: TObject);
- procedure LogItemActionExecute(Sender: TObject);
- procedure NewItemActionExecute(Sender: TObject);
- procedure SelectItemActionExecute(Sender: TObject);
- procedure ListNumberVisibleActionExecute(Sender: TObject);
- procedure UpFolderActionExecute(Sender: TObject);
- procedure IconStyleExecute(Sender: TObject);
- procedure RoundActionExecute(Sender: TObject);
- procedure StopActionExecute(Sender: TObject);
- procedure MsgBarCloseActionExecute(Sender: TObject);
- procedure BrowserMaxActionExecute(Sender: TObject);
- procedure ScrollTopActionExecute(Sender: TObject);
- procedure ScrollLastActionExecute(Sender: TObject);
- procedure ScrollNewActionExecute(Sender: TObject);
- procedure ScrollKokoActionExecute(Sender: TObject);
- procedure EditorActionExecute(Sender: TObject);
- procedure IEActionExecute(Sender: TObject);
- procedure ShowThreadActionExecute(Sender: TObject);
- procedure ShowBoardActionExecute(Sender: TObject);
- procedure URLCopyActionExecute(Sender: TObject);
- procedure ItemReloadActionExecute(Sender: TObject);
- procedure SelectListReloadActionExecute(Sender: TObject);
- procedure SelectThreadReloadActionExecute(Sender: TObject);
- procedure SelectListReloadActionUpdate(Sender: TObject);
- procedure UpFolderActionUpdate(Sender: TObject);
procedure FormResize(Sender: TObject);
- procedure ScrollKokoActionUpdate(Sender: TObject);
- procedure SelectThreadReloadActionUpdate(Sender: TObject);
- procedure LogDeleteActionExecute(Sender: TObject);
- procedure KokomadeActionExecute(Sender: TObject);
- procedure ZenbuActionExecute(Sender: TObject);
- procedure KokoResActionExecute(Sender: TObject);
procedure ListPopupMenuPopup(Sender: TObject);
- procedure SelectItemURLCopyActionExecute(Sender: TObject);
- procedure AllSelectActionUpdate(Sender: TObject);
- procedure BrowserTabCloseActionExecute(Sender: TObject);
- procedure NotSelectTabCloseActionExecute(Sender: TObject);
- procedure TreeSelectBoradReloadExecute(Sender: TObject);
- procedure TreeSelectThreadReloadExecute(Sender: TObject);
- procedure TreeSelectURLCopyExecute(Sender: TObject);
procedure TreePopupMenuPopup(Sender: TObject);
- procedure ListToolBarVisibleActionExecute(Sender: TObject);
- procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
var Cancel: WordBool);
procedure ListSplitterMoved(Sender: TObject);
Y: Integer);
procedure BrowserDocumentComplete(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant);
- procedure SelectReservActionUpdate(Sender: TObject);
procedure RoundNamePopupMenuPopup(Sender: TObject);
- procedure SelectNewRoundNameExecute(Sender: TObject);
- procedure SelectDeleteRoundExecute(Sender: TObject);
- procedure SelectReservActionExecute(Sender: TObject);
- procedure NewBoardActionExecute(Sender: TObject);
- procedure LoginActionExecute(Sender: TObject);
- procedure KeySettingActionExecute(Sender: TObject);
- procedure AllTabCloseActionExecute(Sender: TObject);
- procedure ArrangeActionExecute(Sender: TObject);
- procedure NameURLCopyActionExecute(Sender: TObject);
- procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
- procedure AllTabCloseActionUpdate(Sender: TObject);
- procedure ActiveLogDeleteActionExecute(Sender: TObject);
- procedure ListNameBarVisibleActionExecute(Sender: TObject);
- procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
- procedure TreeSelectNameURLCopyExecute(Sender: TObject);
- procedure PaneInitActionExecute(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure BrowserTabToolBarResize(Sender: TObject);
- procedure BrowserMinActionExecute(Sender: TObject);
- procedure SelectTextClearActionExecute(Sender: TObject);
- procedure NameTextClearActionExecute(Sender: TObject);
- procedure MailTextClearActionExecute(Sender: TObject);
- procedure LeftmostTabSelectActionExecute(Sender: TObject);
- procedure LeftTabSelectActionExecute(Sender: TObject);
- procedure RightTabSelectActionExecute(Sender: TObject);
- procedure RightmostTabSelectActionExecute(Sender: TObject);
- procedure LeftTabSelectActionUpdate(Sender: TObject);
- procedure RightTabSelectActionUpdate(Sender: TObject);
procedure FavoriteMenuClick(Sender: TObject);
- procedure FavoriteAddActionExecute(Sender: TObject);
- procedure BoardFavoriteAddActionExecute(Sender: TObject);
- procedure BoardFavoriteAddActionUpdate(Sender: TObject);
- procedure ThreadFavoriteAddActionExecute(Sender: TObject);
- procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
- procedure FavoriteArrangeActionExecute(Sender: TObject);
procedure MainCoolBarResize(Sender: TObject);
- procedure MoveToActionExecute(Sender: TObject);
procedure AddressToolBarResize(Sender: TObject);
procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
- procedure AddressBarVisibleActionExecute(Sender: TObject);
procedure BrowserEnter(Sender: TObject);
procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
- procedure BrowserTabVisibleActionExecute(Sender: TObject);
- procedure BrowserTabTopActionExecute(Sender: TObject);
- procedure BrowserTabBottomActionExecute(Sender: TObject);
- procedure BrowserTabTabStyleActionExecute(Sender: TObject);
- procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
- procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
procedure PreviewTimerTimer(Sender: TObject);
procedure MessageHideButtonClick(Sender: TObject);
- procedure MonazillaWebPageActionExecute(Sender: TObject);
- procedure GikoHelpActionExecute(Sender: TObject);
- procedure ToolButton18Click(Sender: TObject);
- procedure KotehanActionExecute(Sender: TObject);
- procedure LinkBarVisibleActionExecute(Sender: TObject);
- procedure BBS2chWebPageActionExecute(Sender: TObject);
- procedure GikoFolderOpenActionExecute(Sender: TObject);
+ procedure HistoryAllClearToolButtonClick(Sender: TObject);
procedure MainCoolBarBandInfo(Sender: TObject;
var BandInfo: PReBarBandInfoA);
procedure MainCoolBarChevronClick(Sender: TObject;
procedure BrowserCoolBarChevronClick(Sender: TObject;
RebarChevron: PNMRebarChevron);
procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
- procedure ThreadEditorActionExecute(Sender: TObject);
- procedure ToolBarSettingActionExecute(Sender: TObject);
- procedure NameCopyActionExecute(Sender: TObject);
- procedure BoardIEActionExecute(Sender: TObject);
- procedure SelectItemNameCopyActionExecute(Sender: TObject);
- procedure SelectItemNameCopyActionUpdate(Sender: TObject);
procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
procedure SelectComboBoxChange(Sender: TObject);
procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure SelectComboBoxExit(Sender: TObject);
- procedure SelectResActionExecute(Sender: TObject);
- procedure AllResActionExecute(Sender: TObject);
- procedure ReloadClick(Sender: TObject);
- procedure GoBackClick(Sender: TObject);
- procedure GoFowardClick(Sender: TObject);
procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure StatusBarResize(Sender: TObject);
procedure SelectComboBoxEnter(Sender: TObject);
- procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
- procedure CabinetFavoriteActionExecute(Sender: TObject);
procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
Y: Integer);
procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure FavoriteTreePopupMenuPopup(Sender: TObject);
- procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
- procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
- procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
- procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
- procedure FavoriteTreeViewDblClick(Sender: TObject);
- procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
- procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
- procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
- procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
- procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
- procedure ResRangeActionExecute(Sender: TObject);
procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
Y: Integer);
procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
- procedure ExportFavoriteFileAccept(Sender: TObject);
- procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
- procedure CabinetBBSActionExecute(Sender: TObject);
- procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
- procedure UpBoardActionExecute(Sender: TObject);
procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
- procedure KoreCopyExecute(Sender: TObject);
procedure BrowserTabPopupMenuPopup(Sender: TObject);
procedure BrowserTabResize(Sender: TObject);
- procedure TreeViewClick(Sender: TObject);
procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure FavoriteTreeViewMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure MessagePanelResize(Sender: TObject);
procedure OnResized;
- procedure TreeSelectNameCopyExecute(Sender: TObject);
- procedure FavoriteTreeViewMouseUp(Sender: TObject;
- Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
- procedure SetFocusForBrowserActionExecute(Sender: TObject);
- procedure SetFocusForBrowserActionUpdate(Sender: TObject);
- procedure SetFocusForThreadListActionExecute(Sender: TObject);
- procedure SetFocusForCabinetActionExecute(Sender: TObject);
- procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
- procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject);
- procedure SetFocusForCabinetActionUpdate(Sender: TObject);
- procedure SelectTimerTimer(Sender: TObject);
- procedure SelectItemSaveForHTMLExecute(Sender: TObject);
- procedure KidokuActionExecute(Sender: TObject);
- procedure MidokuActionExecute(Sender: TObject);
- procedure SelectItemSaveForDatExecute(Sender: TObject);
- procedure LogFolderOpenActionExecute(Sender: TObject);
- procedure TabsSaveActionExecute(Sender: TObject);
- procedure TabsOpenActionExecute(Sender: TObject);
- procedure OnlyAHundredResActionExecute(Sender: TObject);
- procedure OnlyKokoResActionExecute(Sender: TObject);
- procedure OnlyNewResActionExecute(Sender: TObject);
- procedure BrowsBoradHeadActionExecute(Sender: TObject);
- procedure EditNGActionExecute(Sender: TObject);
- procedure ThreadRangeActionExecute(Sender: TObject);
- procedure TabAutoSaveActionExecute(Sender: TObject);
- procedure TabAutoLoadActionExecute(Sender: TObject);
+ procedure SelectTimerTimer(Sender: TObject);
procedure ListViewColumnRightClick(Sender: TObject;
Column: TListColumn; Point: TPoint);
- procedure JumpToNumOfResActionExecute(Sender: TObject);
- procedure FavoriteTreeViewCollapseActionExecute(Sender: TObject);
procedure ListViewCustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
procedure FormActivate(Sender: TObject);
procedure MenuToolBarResize(Sender: TObject);
procedure ListToolBarResize(Sender: TObject);
procedure BrowserToolBarResize(Sender: TObject);
- procedure RightTabCloseActionExecute(Sender: TObject);
- procedure RightTabCloseActionUpdate(Sender: TObject);
- procedure LeftTabCloseActionExecute(Sender: TObject);
- procedure SameIDResAnchorActionExecute(Sender: TObject);
- procedure IndividualAbon1ActionExecute(Sender: TObject);
- procedure IndividualAbon0ActionExecute(Sender: TObject);
- procedure AntiIndividualAbonActionExecute(Sender: TObject);
- procedure AntiIndividualAbonDlgActionExecute(Sender: TObject);
- procedure IndividualAbonID1ActionExecute(Sender: TObject);
- procedure IndividualAbonID0ActionExecute(Sender: TObject);
- procedure KokoPopupMenuPopup(Sender: TObject);
- procedure MuteActionExecute(Sender: TObject);
- procedure SortActiveColumnActionExecute(Sender: TObject);
- procedure SortNextColumnActionExecute(Sender: TObject);
- procedure SortPrevColumnActionExecute(Sender: TObject);
- procedure BeLogInOutActionExecute(Sender: TObject);
- procedure BeLogInOutActionUpdate(Sender: TObject);
- procedure UnSelectedListViewActionExecute(Sender: TObject);
+ procedure KokoPopupMenuPopup(Sender: TObject);
procedure ListViewKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure FavoriteTreeViewEditing(Sender: TObject; Node: TTreeNode;
var AllowEdit: Boolean);
- procedure WikiFAQWebPageActionExecute(Sender: TObject);
+ procedure CabinetCloseSpeedButtonClick(Sender: TObject);
+ procedure FavoriteArrangeToolButtonClick(Sender: TObject);
+ procedure GikoApplicationEventsMessage(var Msg: tagMSG;
+ var Handled: Boolean);
+ procedure GikoApplicationEventsDeactivate(Sender: TObject);
+ procedure GikoApplicationEventsException(Sender: TObject; E: Exception);
+ procedure TreeViewMouseDown(Sender: TObject; Button: TMouseButton;
+ Shift: TShiftState; X, Y: Integer);
+ procedure GetResURLMenuClick(Sender: TObject);
private
{ Private \90é\8c¾ }
- FSortIndex: Integer;
- FSortOrder: Boolean;
FEnabledCloseButton: Boolean;
FClickNode: TTreeNode;
FHttpState: Boolean;
FWorkCount: Integer;
FNameCookie: string;
FMailCookie: string;
- BrowserNullTab: TBrowserRecord;
FDownloadTitle: string; //\83_\83E\83\93\83\8d\81[\83h\92\86\82Ì\83^\83C\83g\83\8b\96¼
FDownloadMax: Integer; //\83_\83E\83\93\83\8d\81[\83h\92\86\82Ì\8dÅ\91å\83T\83C\83Y
FEvent: THTMLDocumentEventSink;//\83u\83\89\83E\83U\83h\83L\83\85\83\81\83\93\83g\83C\83x\83\93\83g
FStartUp : Boolean;
FIsHandledWheel : Boolean; ///< \8aù\82É\8eó\82¯\8eæ\82Á\82½ WM_MOUSEWHEEL \82©\82Ç\82¤\82©
DiffComp: Boolean; //Add by Genyakun \83X\83\8c\82ª\8dX\90V\82³\82ê\82½\82Æ\82«\82ÉTrue\82É\82È\82é
- FOrigenCaption: String; //\82¨\8bC\82É\93ü\82è\83c\83\8a\81[\82Ì\83A\83C\83e\83\80\95Ò\8fW\8e\9e\82Ì\95Ò\8fW\91O\82Ì\95¶\8e\9a\97ñ
+ FOrigenCaption: String; //\82¨\8bC\82É\93ü\82è\83c\83\8a\81[\82Ì\83A\83C\83e\83\80\95Ò\8fW\8e\9e\82Ì\95Ò\8fW\91O\82Ì\95¶\8e\9a\97ñ
+ FPreviewBrowserRect: TRect; ///< \83v\83\8c\83r\83\85\81[\82Ì\95\\8e¦\88Ê\92u\82ð\8bL\89¯\82·\82é
+ FActionListGroupIndexes: array of Integer; ///<GikoDM\8fã\82Ì\83A\83N\83V\83\87\83\93\83\8a\83X\83g\82Ì\8ae\83A\83N\83V\83\87\83\93\82É\90Ý\92è\82³\82ê\82½GroupIndex\82ð\95Û\91¶\82·\82é\94z\97ñ
procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
procedure ListClick;
procedure ListDoubleClick(Shift: TShiftState);
- procedure BrowserMovement(const AName: string); overload;
- procedure BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); overload;
- procedure SelectListItem(List: TList);
- procedure DeleteTab(ThreadItem: TThreadItem); overload;
- procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
function Hook(var Message: TMessage): Boolean;
procedure AddRoundNameMenu(MenuItem: TMenuItem);
- procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
- procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
- procedure SetSelectRoundName(Sender: TObject);
- function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
procedure SetMenuFont;
procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
procedure FavoriteClick(Sender: TObject); overload;
procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
- procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
function OnDocumentContextMenu(Sender: TObject): WordBool;
procedure ShowTextPopup;
- procedure SetLinkBar;
function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
procedure MenuBarChevronMenu;
procedure LinkBarChevronMenu;
procedure ToolBarChevronMenu(ToolBar: TToolBar);
- procedure ModifySelectList;
- procedure FavoriteBrowseFolder( node: TTreeNode );
procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
//
procedure SetListViewBackGroundColor(value: TColor);
procedure BBSMenuItemOnClick( Sender : TObject );
- //
- procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
/// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91¶
procedure SaveCoolBarSettings;
procedure SaveMainCoolBarSettings;
procedure TreeClick( Node : TTreeNode );
/// TreeView \82ª\83_\83u\83\8b\83N\83\8a\83b\83N\82³\82ê\82½
procedure TreeDoubleClick( Node : TTreeNode );
- /// \83M\83R\83i\83r\82Ì\83\81\83b\83Z\81[\83W\83\8b\81[\83v\82ð\89¡\8eæ\82è\82µ\82Ü\82·
- procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
- /// \83u\83\89\83E\83U\82Ì\83L\81[\83_\83E\83\93\83C\83x\83\93\83g
- /// \83C\83x\83\93\83g\82ð\8eæ\82è\88µ\82Á\82½\8fê\8d\87\82Í True \82ð\95Ô\82·
-// function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
/// \8ae\8f\8a\82É\82 \82é\83L\83\83\83r\83l\83b\83g\81E BBS \83\81\83j\83\85\81[\82ð\83Z\83b\83g\81^\8dX\90V
procedure SetBBSMenu;
- function WebBrowserClick(Sender: TObject): WordBool;
/// \83^\83u\8eæ\93¾
function GetTabURLs(AStringList: TStringList) : Boolean;
- /// \83^\83u\95Û\91¶
- function SaveTabURLs : Boolean;
- /// \83^\83u\93Ç\82Ý\8fo\82µ
- function LoadTabURLs : Boolean;
- /// \83o\83\93\83h\95\9d\82ð\8dÄ\8cv\8eZ\81E\8dÄ\90Ý\92è\82·\82é
- procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
/// ListColumnPopupMenu \83A\83C\83e\83\80\82Ì\83N\83\8a\83b\83N\83C\83x\83\93\83g
procedure ListColumnPopupMenuOnClick( Sender : TObject );
- // BrowserRecord\82É\82Â\82¢\82Ä\82¢\82éFBrowser\82ð\8aO\82·
- procedure ReleaseBrowser( BRecord: TBrowserRecord);
- //! \83}\83E\83X\83W\83F\83X\83`\83\83\81[\8aJ\8en
- procedure OnGestureStart(Sender: TObject);
- //! \83}\83E\83X\83W\83F\83X\83`\83\83\81[\92\86
- procedure OnGestureMove(Sender: TObject);
- //! \83}\83E\83X\83W\83F\83X\83`\83\83\81[\8fI\97¹
- procedure OnGestureEnd(Sender: TObject);
//! \8di\82è\8d\9e\82Ý\95¶\8e\9a\97ñ\90Ý\92è
procedure SetSelectWord( const text : string );
- //\83u\83\89\83E\83U\82Ì\8dÄ\95`\89æ true:\91S\82Ä\82Ì\83^\83u false:\83A\83N\83e\83B\83u\82È\83^\83u\82Ì\82Ý
- procedure RepaintAllTabsBrowser();
+ //\8c»\8dÝ\82Ì\83J\81[\83\\83\8b\82ð\8eæ\93¾\82·\82é
+ function GetScreenCursor(): TCursor;
+ //\83J\81[\83\\83\8b\82ð\90Ý\92è\82·\82é
+ procedure SetScreenCursor(Cursor : TCursor);
+ //! \83_\83E\83\93\83\8d\81[\83h\83R\83\93\83g\83\8d\81[\83\8b\83X\83\8c\83b\83h\82Ì\90¶\90¬
+ procedure CreateControlThread();
+ //! \83u\83\89\83E\83U\82Ì\90¶\90¬
+ procedure CreateBrowsers(count: Integer);
+ //! ActionList\82ÌGroupIndex\82Ì\95Û\91¶
+ procedure GetGroupIndex(ActionList: TActionList);
+ //! ActionList\82ÌGroupIndex\82Ì\90Ý\92è
+ procedure SetGroupIndex(ActionList: TActionList);
+ //! \8ew\92è\82³\82ê\82½\83X\83\8c\83b\83h\82ð\8aJ\82(\83\8d\83O\82ª\96³\82¢\82Æ\82« or \8ew\92èJUMP\82Ü\82Å\91«\82è\82È\82¢\82Æ\82«\82ÍDL\82·\82é)
+ procedure OpenThreadItem(Thread: TThreadItem; URL: String);
+ //! ListView\81i\83X\83\8c\83b\83h\88ê\97\97\81j\82ð\8dX\90V\82·\82é
+ procedure RefreshListView(Thread: TThreadItem);
+ //! \83X\83\8c\83b\83h\88ê\97\97\82Ì\95\\8e¦\94Í\88Í\90Ý\92è\83`\83F\83b\83N\83N\83\8a\83A
+ procedure ClearThreadRengeAction;
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure WndProc(var Message: TMessage); override;
public
{ Public \90é\8c¾ }
- LastRoundTime: TDateTime;
+ LastRoundTime: TDateTime;
+ BrowserNullTab: TBrowserRecord;
FControlThread: TThreadControl;
procedure MoveToURL(const inURL: string);
function InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True) : TBrowserRecord;
function GetHttpState: Boolean;
procedure SetEnabledCloseButton(Enabled: Boolean);
function GetTreeNode(Data: TObject): TTreeNode;
- procedure AppFormDeactivate(Sender: TObject);
procedure ListViewAllSelect;
property ListStyle: TViewStyle read FListStyle write FListStyle;
property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
property ViewType: TGikoViewType read FViewType write FViewType;
property NameCookie: string read FNameCookie write FNameCookie;
property MailCookie: string read FMailCookie write FMailCookie;
+ property ClickNode: TTreeNode read FClickNode write FClickNode;
+ property TreeType: TGikoTreeType read FTreeType write FTreeType;
+ property ActiveContent: TBrowserRecord read FActiveContent write FActiveContent;
+ property ResRangeMenuSelect: Longint read FResRangeMenuSelect write FResRangeMenuSelect;
+ property SelectResWord : string read FSelectResWord write FSelectResWord;
+ property BrowserSizeWidth: Integer read FBrowserSizeWidth write FBrowserSizeWidth;
+ property BrowserSizeHeight: Integer read FBrowserSizeHeight write FBrowserSizeHeight;
+ property SearchDialog: TSearchDialog read FSearchDialog write FSearchDialog;
+ property ToolBarSettingSender : TToolBarSettingSenderType
+ read FToolBarSettingSender write FToolBarSettingSender;
+ property ScreenCursor : TCursor read GetScreenCursor write SetScreenCursor;
+ property ActiveBBS : TBBS read FActiveBBS write FActiveBBS;
+ property WorkCount: Integer read FWorkCount write FWorkCount;
procedure SetContent(inThread: TBrowserRecord);
function GetActiveContent: TThreadItem;
function GetActiveList: TObject;
+
procedure SetListViewType(AViewType: TGikoViewType); overload;
procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
- procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
- procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
procedure PlaySound(SoundEventName: string);
function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
- procedure DeleteHistory( threadItem: TThreadItem );
procedure ClearHistory;
procedure SaveHistory;
procedure LoadHistory;
procedure IndividualAbonID(Atype : Integer);
//\82±\82Ì\83\8c\83X\82 \82Ú\81`\82ñ
procedure IndividualAbon(Atag, Atype : Integer);
- //ID\83A\83\93\83J\81[\92Ç\89Á
- procedure IDAnchorPopup(Abody :string);
+ //\83u\83\89\83E\83U\82Ì\8dÄ\95`\89æ true:\91S\82Ä\82Ì\83^\83u false:\83A\83N\83e\83B\83u\82È\83^\83u\82Ì\82Ý
+ procedure RepaintAllTabsBrowser();
+ //\83\8a\83\93\83N\83o\81[\90Ý\92è
+ procedure SetLinkBar;
+ procedure FavoriteBrowseFolder( node: TTreeNode );
+ //\83X\83\8c\83b\83h\82Ì\83_\83E\83\93\83\8d\81[\83h
+ procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
+ //\94Â\82Ì\83_\83E\83\93\83\8d\81[\83h
+ procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
+ //\97\9a\97ð\82©\82ç\8dí\8f\9c
+ procedure DeleteHistory( threadItem: TThreadItem );
+ //\83^\83u\82ð\8dí\8f\9c
+ procedure DeleteTab(ThreadItem: TThreadItem); overload;
+ procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
+ //\8c»\8dÝ\95\\8e¦\82µ\82Ä\82¢\82é\83X\83\8c\83b\83h\82ð\83X\83N\83\8d\81[\83\8b
+ procedure BrowserMovement(const AName: string);
+ //Application\82ÌMainForm\82ð\8eæ\93¾\82·\82é
+ function GetMainForm(): TComponent;
+ procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
+ //! \83}\83E\83X\83W\83F\83X\83`\83\83\81[\8aJ\8en
+ procedure OnGestureStart(Sender: TObject);
+ //! \83}\83E\83X\83W\83F\83X\83`\83\83\81[\92\86
+ procedure OnGestureMove(Sender: TObject);
+ //! \83}\83E\83X\83W\83F\83X\83`\83\83\81[\8fI\97¹
+ procedure OnGestureEnd(Sender: TObject);
+ /// \83o\83\93\83h\95\9d\82ð\8dÄ\8cv\8eZ\81E\8dÄ\90Ý\92è\82·\82é
+ procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
+ //\83X\83N\83\8a\81[\83\93\8fã\82ÉEditorForm\82ª\82¢\82é\82©
+ function EditorFormExists(): boolean;
+ //\83X\83N\83\8a\81[\83\93\8fã\82É\82¢\82é\82·\82×\82Ä\82ÌEditorForm\82©\82ç\96¼\91O\97\9a\97ð\82ð\8dí\8f\9c\82·\82é
+ procedure AllEditroFormNameTextClearClear();
+ //\83X\83N\83\8a\81[\83\93\8fã\82É\82¢\82é\82·\82×\82Ä\82ÌEditorForm\82©\82ç\83\81\81[\83\8b\97\9a\97ð\82ð\8dí\8f\9c\82·\82é
+ procedure AllEditroFormMailTextClearClear();
+ //ListView\82Å\91I\91ð\82³\82ê\82Ä\82¢\82é\83A\83C\83e\83\80\82ð\8eæ\93¾\82·\82é
+ procedure SelectListItem(List: TList);
+ /// \83^\83u\95Û\91¶
+ function SaveTabURLs : Boolean;
+ /// \83^\83u\93Ç\82Ý\8fo\82µ
+ function LoadTabURLs : Boolean;
+ //\8ew\92è\82µ\82½\83\8c\83X\82ð\83R\83s\81[\82·\82é
+ procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
+ //
+ procedure ModifySelectList;
+ //
+ procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
+ //
+ procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
+ //
+ procedure SetSelectRoundName(Sender: TObject);
+ //
+ function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
+ //
+ function WebBrowserClick(Sender: TObject): WordBool;
+ //! \83c\81[\83\8b\83o\81[\82É\83X\83\8c\8di\8d\9e\82Ý\83R\83\93\83{\83{\83b\83N\83X\82ð\90Ý\92è\82·\82é
+ procedure SetSelectComboBox();
+
published
property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
- //TAction\82ÅGetActiveContent\82ªnil\88È\8aO\82Å\97L\8cø\82É\82È\82é
- 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é
- procedure DependActiveListTBoardActionUpdate(Sender: TObject);
- //\97á\8aO\8f\88\97\9d\82³\82ê\82È\82©\82Á\82½\97á\8aO\82ð\8f\88\97\9d\82·\82é
- procedure AppException(Sender: TObject; E: Exception);
end;
TFavoriteMenuItem = class(TMenuItem)
property Data: Pointer read FData write FData;
end;
- TBrowserRecord = class( TObject )
- private
- FBrowser : TWebBrowser;
- FEvent: THTMLDocumentEventSink; ///< \83u\83\89\83E\83U\83h\83L\83\85\83\81\83\93\83g\83C\83x\83\93\83g
- FThread : TThreadItem;
- FLastSize : Integer;
- FRepaint : Boolean;
- FMovement : string; ///< \83X\83N\83\8d\81[\83\8b\90æ\83A\83\93\83J\81[
- public
- destructor Destroy; override;
- property Browser : TWebBrowser read FBrowser write FBrowser;
- property Thread : TThreadItem read FThread write FThread;
- property LastSize : Integer read FLastSize write FLastSize;
- property Repaint : Boolean read FRepaint write FRepaint;
- property Movement : string read FMovement write FMovement;
- end;
-
var
GikoForm: TGikoForm;
implementation
uses
+ GikoUtil, IndividualAbon, Math, Kotehan, KeySetting,
+ YofUtils, ShellAPI, ToolBarUtil, ToolBarSetting,
+ GikoXMLDoc, RoundName, IniFiles, FavoriteAdd,
+ FavoriteArrange, AddressHistory, Preview, Gesture,
About, Option, Round, Splash, Sort, ListSelect, Imm,
NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter,
- HTMLCreate, ListViewUtils;
+ HTMLCreate, ListViewUtils, GikoDataModule, GikoMessage,
+ InputAssistDataModule;
const
- CAPTION_NAME: string = '\83M\83R\83i\83r';
BLANK_HTML: string = 'about:blank';
- SELECTCOMBOBOX_NAME: string = ''; // '\83X\83\8c\83b\83h\8di\8d\9e\8c\9f\8dõ';
- SELECTCOMBOBOX_COLOR: TColor = clWindow;
+ BROWSER_COUNT = 5; //\83u\83\89\83E\83U\82Ì\90\94
//D&D臒l
DandD_THRESHOLD = 5; //D&D\82Ìè\87\92l\81ipixcel)
- //\83c\83\8a\81[\81E\83\8a\83X\83g\83A\83C\83R\83\93
- //ITEM_ICON_CATEGORY1 = 2; //\83J\83e\83S\83\8a\83A\83C\83R\83\93
- //ITEM_ICON_CATEGORY2 = 3; //\83J\83e\83S\83\8a\83A\83C\83R\83\93
- //ITEM_ICON_BOARD_NOSUBJECT = 3; //\93Ç\82Ý\8d\9e\82Ü\82ê\82Ä\82¢\82È\82¢\94Â\83A\83C\83R\83\93
- //ITEM_ICON_BOARD1 = 4; //\94Â\83A\83C\83R\83\93
- //ITEM_ICON_BOARD2 = 5; //\94Â\83A\83C\83R\83\93
+ //\83v\83\8c\83r\83\85\81[\83t\83@\83C\83\8b\96¼
+ HTML_FILE_NAME = 'temp_preview.html';
ITEM_ICON_THREADLOG1 = 6; //\83X\83\8c\83A\83C\83R\83\93\81i\83\8d\83O\82 \82è\81j
ITEM_ICON_THREADLOG2 = 7; //\83X\83\8c\83A\83C\83R\83\93\81i\83\8d\83O\82 \82è\81j
- //ITEM_ICON_THREAD1 = 8; //\83X\83\8c\83A\83C\83R\83\93\81i\83\8d\83O\82È\82µ\81j
- //ITEM_ICON_THREAD2 = 9; //\83X\83\8c\83A\83C\83R\83\93\81i\83\8d\83O\82È\82µ\81j
- //ITEM_ICON_THREADNEW1 = 10; //\83X\83\8c\83A\83C\83R\83\93\81i\90V\92\85\81j
- //ITEM_ICON_THREADNEW2 = 11; //\83X\83\8c\83A\83C\83R\83\93\81i\90V\92\85\81j
- ITEM_ICON_SORT1 = 12; //\83\\81[\83g\83A\83C\83R\83\93
- ITEM_ICON_SORT2 = 13; //\83\\81[\83g\83A\83C\83R\83\93
- //ITEM_ICON_BOARD_LOG = 17; //\83X\83\8c\83\8d\83O\82 \82è\94Â\83A\83C\83R\83\93
- //ITEM_ICON_BOARD_NEW = 18; //\83X\83\8c\90V\92\85\94Â\83A\83C\83R\83\93
-
- //\83c\81[\83\8b\83o\81[\83A\83C\83R\83\93
- TOOL_ICON_HEIGHT_MAX = 16; //\8d\82\82³\8dÅ\91å\83A\83C\83R\83\93
- TOOL_ICON_HEIGHT_MIN = 17; //\8d\82\82³\8dÅ\8f¬\83A\83C\83R\83\93
- TOOL_ICON_HEIGHT_NORMAL = 18; //\8d\82\82³\95W\8f\80\83A\83C\83R\83\93
- TOOL_ICON_WIDTH_MAX = 19; //\95\9d\8dÅ\91å\83A\83C\83R\83\93
- TOOL_ICON_WIDTH_MIN = 20; //\95\9d\8dÅ\8f¬\83A\83C\83R\83\93
- TOOL_ICON_WIDTH_NORMAL = 21; //\95\9d\95W\8f\80\83A\83C\83R\83\93
-
- TOOL_ICON_FAV_FOLDER = 30; //\82¨\8bC\82É\93ü\82è\83t\83H\83\8b\83_\83A\83C\83R\83\93
- TOOL_ICON_FAV_BOARD = 31; //\82¨\8bC\82É\93ü\82è\94Â\83A\83C\83R\83\93
- TOOL_ICON_FAV_THREAD = 32; //\82¨\8bC\82É\93ü\82è\83X\83\8c\83A\83C\83R\83\93
-
- HTML_FILE_NAME = 'temp_preview.html';
-
- WM_XBUTTONDOWN = $020B;
- WM_XBUTTONUP = $020C;
- WM_XBUTTONDBLCLK = $020D;
- XBUTTON1 = $0001;
- XBUTTON2 = $0002;
+ //\83\81\83b\83Z\81[\83WID
USER_TREECLICK = WM_USER + 2000;
USER_RESIZED = WM_USER + 2001;
USER_MINIMIZED = WM_USER + 2002;
USER_SETLINKBAR = WM_USER + 2003;
USER_DOCUMENTCOMPLETE = WM_USER + 2004; ///< wParam : TWebBrowser
- SELECTTIME_INTERBAL = 110;
-
- BROWSER_COUNT = 5; //\83u\83\89\83E\83U\82Ì\90\94
-
- URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
- URL_MONAZILLA: string = 'http://www.monazilla.org/';
- URL_2ch: string = 'http://www.2ch.net/';
- URL_Wiki: string = 'http://gikowiki.dyndns.info/index.php?FAQ';
-
{$R *.DFM}
procedure TGikoForm.CreateParams(var Params: TCreateParams);
msg: string;
i: Integer;
wp: TWindowPlacement;
- s: string;
- newbrowser: TWebBrowser;
- ToolButton: TToolButton;
begin
{$IFDEF DEBUG}
AllocConsole;
Writeln(' \8fI\97¹\8e\9e\82Í\81A\83M\83R\83i\83r\83E\83B\83\93\83h\83E\82ð\95Â\82¶\82Ä\82\82¾\82³\82¢');
Writeln('============================================================');
{$ENDIF}
+//try
+ Sort.SetSortDate(Now());
+
FTreeType := gttNone;
// \8bN\93®\8e\9e\82É\95Û\91¶\82³\82ê\82Ä\82µ\82Ü\82¤\91Î\8dô
FStartUp := true;
-// LockWindowUpdate(Self.Handle);
- Application.OnDeactivate := AppFormDeactivate;
- //Self.OnDeactivate := AppFormDeactivate;
Application.HookMainWindow(Hook);
- Application.OnException := AppException; //\8f\88\97\9d\82³\82ê\82È\82¢\97á\8aO\82ð\95â\91«
-// Application.OnMessage := HandleAppMessage; //\82È\82ñ\82©\96³\82\82Ä\82à\91å\8fä\95v\82É\82È\82Á\82½\81@by\81@\82à\82¶\82ã
FIsIgnoreResize := rtResizing;
-
+ //ActionList\82ÌGuoupIndex\82ð\95Û\91¶\82µ\82Ä\81A0\82É\83N\83\8a\83A\82·\82é\81B
+ //(\8bN\93®\8e\9e\82É\83c\81[\83\8b\83{\83^\83\93\82ÌDown\83v\83\8d\83p\83e\83B\82ð\94½\89f\82³\82¹\82é\93s\8d\87\8fãGroupIndex\82Í\90Ý\92è\82Å\82«\82È\82¢)
+ //\82±\82ê\88È\8cãSet\81`\82Å\8dÄ\90Ý\92è\82·\82é\82Ü\82Å\81AAction\82ÌChecked\82ð\82¢\82¶\82é\82Æ\82«\82Í\92\8d\88Ó\81I
+ GetGroupIndex(GikoDM.GikoFormActionList);
FSearchDialog := nil;
- BrowserNullTab := TBrowserRecord.Create;
- BrowserNullTab.Browser := Browser;
- BrowserNullTab.Browser.Navigate(BLANK_HTML);
- FBrowsers := TList.Create;
- for i := 0 to BROWSER_COUNT -1 do begin
- FBrowsers.Add(TWebBrowser.Create(BrowserPanel));
- newBrowser := FBrowsers[FBrowsers.Count - 1];
- TOleControl(newBrowser).Parent := BrowserPanel;
- TOleControl(newBrowser).Align := alNone;
- TOleControl(newBrowser).Left := 0;
- TOleControl(newBrowser).Top := 0;
- newBrowser.OnDocumentComplete := BrowserDocumentComplete;
- newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
- newBrowser.OnEnter := BrowserEnter;
- newBrowser.OnNewWindow2 := BrowserNewWindow2;
- newBrowser.OnStatusTextChange := BrowserStatusTextChange;
- newBrowser.Navigate(BLANK_HTML);
- ShowWindow(newBrowser.Handle, SW_HIDE);
- end;
- BrowserNullTab.Browser.BringToFront;
- ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
+ CreateBrowsers(BROWSER_COUNT);
//\83\81\83j\83\85\81[\83t\83H\83\93\83g
SetMenuFont;
Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
//\83A\83h\83\8c\83X\97\9a\97ð\93Ç\82Ý\8d\9e\82Ý
- //AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
EnabledCloseButton := True;
CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
//\83\81\83b\83Z\81[\83W\83o\81[
- MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
- MsgBarVisibleActionExecute(nil);
+ GikoDM.MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
+ GikoDM.MsgBarVisibleActionExecute(nil);
MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
//\83X\83e\81[\83^\83X\83o\81[
- StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
- StatusBarVisibleActionExecute(nil);
+ GikoDM.StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
+ GikoDM.StatusBarVisibleActionExecute(nil);
//\83t\83H\83\93\83g\81E\90F\90Ý\92è
TreeView.Items.BeginUpdate;
ListView.Items.EndUpdate;
end;
//ViewNoButton.Down := GikoSys.Setting.ListViewNo;
- ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
+ GikoDM.ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
+
+ //\83~\83\85\81[\83g\82Ì\8fó\91Ô\82ð\90Ý\92è
+ GikoDM.MuteAction.Checked := GikoSys.Setting.Mute;
+
+ // \83\8c\83X\95\\8e¦\94Í\88Í
+ FResRangeMenuSelect := GikoSys.ResRange;
+ case GikoSys.ResRange of
+ Ord( grrAll ):
+ begin
+ GikoDM.AllResAction.Execute;
+ end;
+ Ord( grrSelect ):
+ begin
+ SelectComboBox.Text := SelectComboBox.Items[ 1 ];
+ GikoDM.SelectResAction.Checked := True;
+ end;
+ else
+ case FResRangeMenuSelect of
+ Ord( grrKoko ): GikoDM.OnlyKokoResAction.Checked := True;
+ Ord( grrNew ): GikoDM.OnlyNewResAction.Checked := True;
+ 100: GikoDM.OnlyAHundredResAction.Checked := True;
+ end;
+ end;
+
+ // \83X\83\8c\83b\83h\88ê\97\97\95\\8e¦\94Í\88Í
+ case GikoSys.Setting.ThreadRange of
+ gtrAll:
+ begin
+ GikoDM.AllItemAction.Checked := True;
+ ViewType := gvtAll;
+ end;
+ gtrLog:
+ begin
+ GikoDM.LogItemAction.Checked := True;
+ ViewType := gvtLog;
+ end;
+ gtrNew:
+ begin
+ GikoDM.NewItemAction.Checked := True;
+ ViewType := gvtNew;
+ end;
+ gtrLive:
+ begin
+ GikoDM.LiveItemAction.Checked := True;
+ ViewType := gvtLive;
+ end;
+ gtrArch:
+ begin
+ GikoDM.ArchiveItemAction.Checked := True;
+ ViewType := gvtArch;
+ end;
+ end;
+
//\83u\83\89\83E\83U\83^\83u\83t\83H\83\93\83g
BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
BrowserTab.Font.Style := [fsBold];
if GikoSys.Setting.BrowserTabFontItalic then
BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic];
+ BrowserTab.DoubleBuffered := True;
FDragWFirst := false;
SetContent(BrowserNullTab); //\83u\83\89\83E\83U\82ð\8bó\94\92\95\\8e¦
+ //\83u\83\89\83E\83U\83^\83u
+ GikoDM.BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
+
+ if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
+ GikoDM.BrowserTabTopAction.Checked := True;
+ end else begin
+ GikoDM.BrowserTabBottomAction.Checked := True;
+ end;
+
+ if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
+ GikoDM.BrowserTabTabStyleAction.Checked := True;
+ end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
+ GikoDM.BrowserTabButtonStyleAction.Checked := True;
+ end else begin
+ GikoDM.BrowserTabFlatStyleAction.Checked := True;
+ end;
+
//\83v\83\8d\83O\83\8c\83X\83o\81[\82Ì\8f\89\8aú\89»
ProgressBar.Parent := StatusBar;
ProgressBar.Top := 2;
// \83{\81[\83h\83t\83@\83C\83\8b\97ñ\8b\93(ReadFavorite \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
GikoSys.ListBoardFile;
-
+ //\81@\98A\91±\8bN\93®\8e\9e\82É\83X\83v\83\89\83b\83V\83\85\83E\83B\83\93\83h\83E\82Ì\83\81\83\82\83\8a\82ª\95s\92è\82É
+ try
// \83X\83v\83\89\83b\83V\83\85\83E\83B\83\93\83h\83E\82Ì\83v\83\8d\83O\83\8c\83X\83o\81[\82Ì\90Ý\92è
- SplashWindow.ProgressBar.Max := Length(BBSs) * 20;
-
+ if (SplashWindow <> nil) then begin
+ SplashWindow.ProgressBar.Max := Length(BBSs) * 20;
+ end;
+ except
+ end;
// \82·\82×\82Ä\82ÌBBS\82ð\93Ç\82Ý\8d\9e\82ñ\82Å\82¨\82
for i := Length(BBSs) - 1 downto 0 do begin
if not BBSs[i].IsBoardFileRead then
SplashWindow.Update;
end;
end;
+
//\8f\84\89ñ\83f\81[\83^\93Ç\82Ý\8d\9e\82Ý
RoundList := TRoundList.Create;
RoundList.LoadRoundBoardFile;
FNameCookie := '';
FMailCookie := '';
- //\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;
-
//\83u\83\89\83E\83U\83T\83C\83Y\95Ï\8dX\82Ì\8f\89\8aú\89»
FBrowserSizeHeight := GikoSys.Setting.ListHeight;
FBrowserSizeWidth := GikoSys.Setting.ListWidth;
FavoriteDM.SetFavTreeView(FavoriteTreeView);
FavoriteDM.ReadFavorite;
- ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
- ArrangeAction.Execute;
+ GikoDM.ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
+ GikoDM.ArrangeAction.Execute;
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
case GikoSys.Setting.ListWidthState of
glsMax: begin
ViewPanel.Width := 1;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
end;
glsMin: begin
ViewPanel.Width := GikoSys.Setting.ListWidth;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
end;
else begin
ViewPanel.Width := GikoSys.Setting.ListWidth;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
end;
end;
end else begin
case GikoSys.Setting.ListHeightState of
glsMax: begin
ViewPanel.Height := 1;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
end;
glsMin: begin
ViewPanel.Height := GikoSys.Setting.ListHeight;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
end;
else begin
ViewPanel.Height := GikoSys.Setting.ListHeight;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
end;
end;
end;
//\83_\83E\83\93\83\8d\81[\83h\83I\83u\83W\83F\83N\83g
- FControlThread := TThreadControl.Create(True);
- FControlThread.MaxThreadCount := 1;
- FControlThread.Resume;
- FControlThread.OnDownloadEnd := DownloadEnd;
- FControlThread.OnDownloadMsg := DownloadMsg;
- FControlThread.OnWork := Work;
- FControlThread.OnWorkBegin := WorkBegin;
- FControlThread.OnWorkEnd := WorkEnd;
-// ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
+ CreateControlThread();
// \8di\8d\9e\8c\9f\8dõ\97\9a\97ð
SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
MakeDefaultINIFile();
//\83c\81[\83\8b\83{\83^\83\93\93Ç\82Ý\8d\9e\82Ý
- ReadToolBarSetting(ActionList, StdToolBar);
- ReadToolBarSetting(ActionList, ListToolBar);
- ReadToolBarSetting(ActionList, BrowserToolBar);
+ ReadToolBarSetting(GikoDM.GikoFormActionList, StdToolBar);
+ ReadToolBarSetting(GikoDM.GikoFormActionList, ListToolBar);
+ ReadToolBarSetting(GikoDM.GikoFormActionList, BrowserToolBar);
SetToolBarPopup;
//ListToolBar\82É\82¢\82é\82©\82à\82µ\82ê\82È\82¢\8di\8d\9e\82ÝComboBox\82ð\94z\92u
- SelectComboBoxPanel.Visible := False;
- try
- for i := ListToolBar.ControlCount - 1 downto 0 do
- begin
- if ListToolBar.Controls[ i ].Action = SelectItemAction then
- begin
- SelectComboBoxPanel.Left := ListToolBar.Controls[ i ].Left;
- SelectComboBoxPanel.Width := GikoSys.Setting.SelectComboBoxWidth;
- SelectComboBoxPanel.Parent := ListToolBar;
- SelectComboBoxPanel.Visible := True;
-
- SelectComboBox.Left := 0;
- SelectComboBox.Top := 0;
- SelectComboBox.Height := SelectComboBoxPanel.ClientHeight;
- SelectComboBox.Width := SelectComboBoxPanel.Width -
- SelectComboBoxSplitter.Width;
-
- //\88ê\82Â\8c©\82¦\82È\82¢\83{\83^\83\93\82ð\93Ë\82Á\8d\9e\82Þ
- ToolButton := TToolButton.Create(ListToolBar);
- ToolButton.Name := 'SelectComboBoxDummy';
- ToolButton.Style := tbsSeparator;
- ToolButton.Width := 0;
- ToolButton.Left := ListToolBar.Controls[ i ].Left;
- ListToolBar.InsertControl(ToolButton);
- ToolButton.Visible := False;
-
- // \83X\83\8c\83b\83h\8di\8d\9e\82Ì\97×\82É\83Z\83p\83\8c\81[\83^\82ª\82 \82é\8fê\8d\87\82Í\89B\82·
- if (i + 1) < ListToolBar.ControlCount then
- if ListToolBar.Controls[ i + 1 ] is TToolButton then
- if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
- ListToolBar.Controls[ i + 1 ].Visible := False;
-
-
- // \83X\83\8c\83b\83h\8di\8d\9e\83{\83^\83\93\82ð\89B\82·
- ListToolBar.Controls[ i ].Visible := False;
-
- break;
- end;
- end;
- except
- end;
-
+ SetSelectComboBox();
//\83A\83h\83\8c\83X\83o\81[
AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
//\83\8a\83\93\83N\83o\81[
SetLinkBar;
-
- // \83\8c\83X\95\\8e¦\94Í\88Í
- FResRangeMenuSelect := GikoSys.ResRange;
- case GikoSys.ResRange of
- Ord( grrAll ):
- begin
- AllResAction.Execute;
- end;
- Ord( grrSelect ):
- begin
- SelectComboBox.Text := SelectComboBox.Items[ 1 ];
- SelectResAction.Checked := True;
- end;
- else
-// ResRangeAction.Execute;
- case FResRangeMenuSelect of
- Ord( grrKoko ): OnlyKokoResAction.Checked := True;
- Ord( grrNew ): OnlyNewResAction.Checked := True;
- 100: OnlyAHundredResAction.Checked := True;
- end;
- end;
-
- // \83X\83\8c\83b\83h\88ê\97\97\95\\8e¦\94Í\88Í
-// ThreadRangeAction.Execute;
- case GikoSys.Setting.ThreadRange of
- gtrAll:
- begin
- AllItemAction.Checked := True;
- ViewType := gvtAll;
- end;
- gtrLog:
- begin
- LogItemAction.Checked := True;
- ViewType := gvtLog;
- end;
- gtrNew:
- begin
- NewItemAction.Checked := True;
- ViewType := gvtNew;
- end;
- end;
-
-
//\83N\81[\83\8b\83o\81[\95\9c\8c³\82ÍFormShow\82É\88Ú\93®\82µ\82½
//\83{\81[\83h\83t\83@\83C\83\8b\82ª\96³\82¢\8fê\8d\87\82Í\83\81\83b\83Z\81[\83W\95\\8e¦
+ '\82±\82ê\82©\82ç\81A\81u\82Q\82¿\82á\82ñ\82Ë\82é\81v\82Ì\83A\83h\83\8c\83X\88ê\97\97\82ð\83_\83E\83\93\83\8d\81[\83h\82µ\82Ü\82·' + #13#10
+ '\8e\9f\82É\8fo\82Ä\82\82é\89æ\96Ê\82Å\81A\81u\8dX\90V\81v\83{\83^\83\93\82ð\89\9f\82µ\82Ä\82\82¾\82³\82¢\81B';
MsgBox(SplashWindow.Handle, msg, '\83M\83R\83i\83r', MB_OK or MB_ICONINFORMATION);
- NewBoardAction.Execute;
+ GikoDM.NewBoardAction.Execute;
end;
//\83L\81[\90Ý\92è\93Ç\82Ý\8d\9e\82Ý
- GikoSys.LoadKeySetting(ActionList);
+ GikoSys.LoadKeySetting(GikoDM.GikoFormActionList, GikoSys.GetMainKeyFileName);
//\8dÅ\8fI\8f\84\89ñ\8e\9e\8aÔ
// FLastRoundTime := 0;
//ResHint
FHint := TResPopup.Create(Self);
- ListView.OnData := TListViewUtils.ListViewData;
+ ListView.OnData := TListViewUtils.ListViewData;
// \8dÅ\8cã\82É\91I\91ð\82³\82ê\82½\83L\83\83\83r\83l\83b\83g\82Ì\95\9c\8c³
CabinetVisible( False );
if GikoSys.Setting.CabinetVisible then begin
i := CabinetSelectPopupMenu.Items.Count - 1;
if GikoSys.Setting.CabinetIndex = i - 1 then
- CabinetHistoryAction.Execute
+ GikoDM.CabinetHistoryAction.Execute
else if GikoSys.Setting.CabinetIndex = i then
- CabinetFavoriteAction.Execute
+ GikoDM.CabinetFavoriteAction.Execute
else begin
if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
// \8bN\93®\8e\9e\82É\95Û\91¶\82³\82ê\82Ä\82µ\82Ü\82¤\91Î\8dô 2
FIsIgnoreResize := rtResizing;
- CabinetBBSAction.Execute;
+ GikoDM.CabinetBBSAction.Execute;
end;
end else begin
ShowBBSTreeOld( BBSs[ 0 ] );
PostMessage( Handle, USER_TREECLICK, 0, 0 );
end;
-
//\88ø\90\94\82ª\82 \82Á\82½\82ç\83X\83\8c\82ð\8aJ\82\81i\96¢\8eæ\93¾\82È\82ç\83_\83E\83\93\83\8d\81[\83h\81j
for i := 1 to ParamCount do begin
MoveToURL(ParamStr(i));
end;
- s := GikoSys.FAbon.NGwordname;
- StatusBar.Panels[2].Text := s;
- StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
+ GikoDM.RepaintStatusBar;
StatusBarResize(Sender);
dummy1.Caption := ItemReservPMenu.Caption;
// \83}\83E\83X\83W\83F\83X\83`\83\83\81[
MouseGesture := TMouseGesture.Create;
GikoSys.Setting.Gestures.LoadGesture(
- GikoSys.Setting.GetGestureFileName, ActionList );
+ GikoSys.Setting.GetGestureFileName, GikoDM.GikoFormActionList );
MouseGesture.Margin := GikoSys.Setting.Gestures.Margin;
MouseGesture.OnGestureStart := OnGestureStart;
MouseGesture.OnGestureMove := OnGestureMove;
MouseGesture.SetHook( Handle );
//2ch\8c¾\8cê\93Ç\82Ý\8fo\82µ
- GikoSys.Setting.SetMessages;
+ GikoSys.SetGikoMessage;
//\83I\81[\83g\83\8d\83O\83C\83\93
if GikoSys.Setting.AutoLogin then
- LoginAction.Execute;
-
- MuteAction.Checked := GikoSys.Setting.Mute;
+ GikoDM.LoginAction.Execute;
GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
-// LockWindowUpdate(0);
+
+ //\83L\83\83\83v\83V\83\87\83\93\82ª\8fã\8f\91\82«\82³\82ê\82Ä\82µ\82Ü\82¤\82Ì\82Å\81A\82±\82±\82Å\8dÄ\90Ý\92è
+ FavoriteAddToolButton.Caption := '\92Ç\89Á...';
+ AntiIndivAbonMenuItem.Caption := '\8cÂ\95Ê\82 \82Ú\81`\82ñ\89ð\8f\9c';
+
+ //\93ü\97Í\83A\83V\83X\83g\8b@\8d\\82Ì\8f\89\8aú\89»
+ InputAssistDM.Init(GikoSys.GetInputAssistFileName);
end;
// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91¶
//FormCreate\82Å\82â\82é\82Æ\89Â\8e\8b\90Ý\92è\82ª\94½\89f\82³\82ê\82È\82¢\8fê\8d\87\82ª\82 \82é\82Ì\82ÅFormShow\82Å\82â\82é\82±\82Æ\82É\82µ\82½
//\83c\81[\83\8b\83o\81[\95\\8e¦
- StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
- StdToolBarVisibleActionExecute( nil );
- AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
- AddressBarVisibleActionExecute( nil );
- LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
- LinkBarVisibleActionExecute( nil );
- ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
- ListToolBarVisibleActionExecute( nil );
- ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
- ListNameBarVisibleActionExecute( nil );
- BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
- BrowserToolBarVisibleActionExecute( nil );
- BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
- BrowserNameBarVisibleActionExecute( nil );
-
- //\83u\83\89\83E\83U\83^\83u
- BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
- BrowserTabVisibleActionExecute(nil);
-
- if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
- BrowserTabTopAction.Checked := True;
- BrowserTabTopActionExecute(nil);
- end else begin
- BrowserTabBottomAction.Checked := True;
- BrowserTabBottomActionExecute(nil);
- end;
-
- if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
- BrowserTabTabStyleAction.Checked := True;
- BrowserTabTabStyleActionExecute(nil);
- end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
- BrowserTabButtonStyleAction.Checked := True;
- BrowserTabButtonStyleActionExecute(nil);
- end else begin
- BrowserTabFlatStyleAction.Checked := True;
- BrowserTabFlatStyleActionExecute(nil);
- end;
-
- // ListView \82Ì\83w\83b\83_\83h\83\89\83b\83O
-// ListView.FullDrag := True;
+ GikoDM.StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
+ GikoDM.StdToolBarVisibleActionExecute( nil );
+ GikoDM.AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
+ GikoDM.AddressBarVisibleActionExecute( nil );
+ GikoDM.LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
+ GikoDM.LinkBarVisibleActionExecute( nil );
+ GikoDM.ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
+ GikoDM.ListToolBarVisibleActionExecute( nil );
+ GikoDM.ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
+ GikoDM.ListNameBarVisibleActionExecute( nil );
+ GikoDM.BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
+ GikoDM.BrowserToolBarVisibleActionExecute( nil );
+ GikoDM.BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
+ GikoDM.BrowserNameBarVisibleActionExecute( nil );
// CoolBar \95\9c\8c³
LoadCoolBarSettings;
// ResetBandInfo( ListCoolBar, ListToolBar );
FIsIgnoreResize := rtNone;
- //TabAutoLoad
//FormCrete\82©\82ç\88Ú\93®\81B
if GikoSys.Setting.TabAutoLoadSave then begin
- TabAutoLoadAction.Execute;
+ GikoDM.TabAutoLoadAction.Execute;
end;
- //\82É\82¿\82á\82ñ\8cê\88Ä\93à\83T\83|\81[\83g\8b@\94\
- if GikoSys.Setting.GengoSupport then begin
- //\97\\92è\92n
- //Test\8cü\82¯
- end;
- FStartUp := false;
+
+ //ActionList\82ÌGroupIndex\82ð\8c³\82É\96ß\82·
+ SetGroupIndex(GikoDM.GikoFormActionList);
+
+ FStartUp := false;
end;
end;
begin
// if GikoForm.WindowState <> wsMinimized then
// SaveCoolBarSettings;
+ CanClose := True;
if ( GikoSys.Setting.ShowDialogForEnd ) and
(MessageDlg('\83M\83R\83i\83r\82ð\8fI\97¹\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82·\82©\81H', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
CanClose := false;
Exit;
- end else begin
- CanClose := True;
- if GikoSys.Setting.TabAutoLoadSave then begin
- TabAutoSaveAction.Execute;
+ end;
+
+ if GikoSys.Setting.TabAutoLoadSave then begin
+ GikoDM.TabAutoSaveAction.Execute;
+ end;
+
+ if (SearchDialog <> nil) then begin
+ if (SearchDialog.Visible) then begin
+ SearchDialog.Close;
+ try
+ SearchDialog.Release;
+ except
+ end;
+ SearchDialog := nil;
end;
end;
- { //2ch\8c¾\8cȩ̂²ÙFree
+ { //2ch\8c¾\8cȩ̂²ÙFree
if GikoSys.Setting.Gengo <> nil then begin
GikoSys.Setting.Gengo.Free;
end;
- }
+ }
Application.UnhookMainWindow(Hook);
Application.Terminate;
end;
GikoSys.Setting.WindowMax := WindowState = wsMaximized;
GikoSys.Setting.ListStyle := ListView.ViewStyle;
- GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
+ GikoSys.Setting.CabinetVisible := GikoDM.CabinetVisibleAction.Checked;
GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
GikoSys.Setting.ListHeight := FBrowserSizeHeight;
GikoSys.Setting.ListWidth := FBrowserSizeWidth;
- if ArrangeAction.Checked then
+ if GikoDM.ArrangeAction.Checked then
GikoSys.Setting.ListOrientation := gloVertical
else
GikoSys.Setting.ListOrientation := gloHorizontal;
// CoolBar \95Û\91¶
//if (GikoForm.WindowState <> wsMinimized) and (GikoForm.WindowState <> wsMaximized) then
+ //\93ü\97Í\83A\83V\83X\83g\8b@\8d\\82Ì\90Ý\92è\82Ì\95Û\91¶
+ InputAssistDM.SaveToFile(GikoSys.GetInputAssistFileName);
//\82¨\8bC\82É\93ü\82è\95Û\91¶
try
//\83^\83u\83N\83\8d\81[\83Y
tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
GikoSys.Setting.ShowDialogForAllTabClose := false;
- AllTabCloseAction.Execute;
+ GikoDM.AllTabCloseAction.Execute;
GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
except
end;
//\83A\83h\83\8c\83X\97\9a\97ð\95Û\91¶
try
//AddressHistoryDM\82Í\8e©\93®\90¶\90¬\83t\83H\81[\83\80\82È\82Ì\82Å\81A\89ð\95ú\82Í\8e©\93®\93I\82É\82³\82ê\82é\81B
- //AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
except
end;
// TBBS \82Í\95Û\8e\9d\82µ\82Ä\82¢\82é TCategory, TBoard, TThreadItem \82·\82×\82Ä\82ð\8aJ\95ú\82·\82é
// TBoard, TThreadItem \82Ì\83f\83X\83g\83\89\83N\83^\82Í\83v\83\89\83O\83C\83\93\82É\94j\8aü\82ð\93`\82¦\82é\82Ì\82Å
// BoardPluteIns \82Ì\8aJ\95ú\82æ\82è\90æ\82É\8ds\82¤\82±\82Æ
- for i := Length(BoardGroups) - 1 downto 0 do begin
+ for i := Length(BoardGroups) - 1 downto 0 do begin
//BoardGroups[i].Clear;
BoardGroups[i].Free;
- end;
+ end;
try
for i := Length( BBSs ) - 1 downto 0 do begin
end;
except
end;
- LockWindowUpdate(0);
+ LockWindowUpdate(0);
end;
// \8ae\8f\8a\82É\82 \82é\83L\83\83\83r\83l\83b\83g\81E BBS \83\81\83j\83\85\81[\82ð\83Z\83b\83g\81^\8dX\90V
//\83^\83u\83N\83\8d\81[\83Y
tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
GikoSys.Setting.ShowDialogForAllTabClose := false;
- AllTabCloseAction.Execute;
+ GikoDM.AllTabCloseAction.Execute;
GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
-
SetContent(BrowserNullTab);
//TreeView\83N\83\8a\83A\81iBBS2ch.Free\82Ì\8cã\82É\83N\83\8a\83A\82·\82é\82ÆXP\83X\83^\83C\83\8b\8e\9e\82É\83G\83\89\81[\8fo\82é\81j
TreeView.Items.Clear;
LockWindowUpdate(0);
//
- TabsOpenAction.Execute;
+ GikoDM.TabsOpenAction.Execute;
end;
-
+{!
+\todo \89½\8cÌ IE 7 \82Å\82Í about:.. \82É\82È\82é\82Ì\82©
+ (IE 7 \82ª about:.. \82ð\92Ç\89Á\82µ\82Ä\82¢\82é\82Ì\82©\81A\83M\83R\83i\83r\82ª\92Ç\89Á\82µ\82Ä\82¢\82é\82Ì\82©)
+ \92²\8d¸\82·\82é\82±\82Æ
+}
procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
var
p: TPoint;
e: IHTMLElement;
Ext: string;
PathRec: TPathRec;
-begin
+ Text2: string;
+begin
+ // \83M\83R\83i\83r\82Í\83\8c\83X\83A\83\93\83J\81[\82ª about:blank.. \82Å\8en\82Ü\82é\82±\82Æ\82ð\8aú\91Ò\82µ\82Ä\82¢\82é\82ª
+ // IE 7 \82Å\82Í about:blank.. \82Å\82Í\82È\82 about:.. \82É\82È\82é\82Ì\82Å\81A\92u\8a·\82·\82é(\93\8a\82°\82â\82è)
+ if Pos('about:..', Text) = 1 then
+ Text2 := 'about:blank..' + Copy( Text, Length('about:..')+1, Length(Text) )
+ else
+ Text2 := Text;
if not( TObject(Sender) is TWebBrowser )then
Exit;
try
Exit;
end;
- StatusBar.Panels[1].Text := Text;
+ StatusBar.Panels[1].Text := Text2;
if FHint <> nil then begin
FHint.ReleaseHandle;
//file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
s := '';
- Ext := AnsiLowerCase(ExtractFileExt(Text));
- if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
+ Ext := AnsiLowerCase(ExtractFileExt(Text2));
+ if (Pos('http://', Text2) = 1) and (GikoSys.Setting.PreviewVisible) and
((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
if FPreviewBrowser = nil then begin
FPreviewBrowser := TPreviewBrowser.Create(Self);
TOleControl(FPreviewBrowser).Parent := nil;
end;
FPreviewBrowser.Navigate(BLANK_HTML);//\91O\89ñ\82Ì\83v\83\8c\83r\83\85\81[\89æ\91\9c\8fÁ\8b\8e\97p
- FPreviewURL := Text;
+ FPreviewURL := Text2;
PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
PreviewTimer.Enabled := True;
- end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
- if Pos('mailto:', Text) = 1 then begin
- s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
+ end else if (Pos('about:blank', Text2) = 1) or (Pos('http://', Text2) = 1) or (Pos('mailto:', Text2) = 1) then begin
+ if Pos('mailto:', Text2) = 1 then begin
+ s := StringReplace(Text2, 'mailto:', '', [rfIgnoreCase]);
//\83M\83R\83i\83r\83X\83\8c \83p\81[\83g3\82Ì466\8e\81\82É\8a´\8eÓ
GetCursorPos(p);
p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
tmp2 := ZenToHan(e.Get_outerText);
if (GikoSys.IsNumeric(tmp2)) then begin
//\82\93\82Í\83\8c\83X\94Ô\8d\86\82Á\82Û\82¢\82Á\82·\81B
- wkIntSt := StrToInt(tmp2);
- wkIntTo := StrToInt(tmp2);
+ wkIntSt := StrToInt64(tmp2);
+ wkIntTo := StrToInt64(tmp2);
//s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
FHint.PopupType := gptThread;
HTMLCreater.SetResPopupText(FHint, GetActiveContent, wkIntSt, wkIntTo, False, False);
end;
end else begin
threadItem := GetActiveContent;
- URL := THTMLCreate.GetRespopupURL(Text, threadItem.URL);
+ URL := THTMLCreate.GetRespopupURL(Text2, threadItem.URL);
PathRec := Gikosys.Parse2chURL2(URL);
if (PathRec.FNoParam) then begin
PathRec.FSt := 1;
var
id, idx : Integer;
orderList : TList;
+ vSortIndex : Integer;
+ vSortOrder : Boolean;
begin
idx := TListViewUtils.ActiveListTrueColumn( Column ).Tag;
-
- if TObject( FActiveList ) is TBBS then
- orderList := GikoSys.Setting.BBSColumnOrder
- else if TObject( FActiveList ) is TCategory then
- orderList := GikoSys.Setting.CategoryColumnOrder
- else if TObject( FActiveList ) is TBoard then
- orderList := GikoSys.Setting.BoardColumnOrder
- else
+ if TObject( FActiveList ) is TBBS then begin
+ orderList := GikoSys.Setting.BBSColumnOrder;
+ vSortIndex := GikoSys.Setting.BBSSortIndex;
+ vSortOrder := GikoSys.Setting.BBSSortOrder;
+ end else if TObject( FActiveList ) is TCategory then begin
+ orderList := GikoSys.Setting.CategoryColumnOrder;
+ vSortIndex := GikoSys.Setting.CategorySortIndex;
+ vSortOrder := GikoSys.Setting.CategorySortOrder;
+ end else if TObject( FActiveList ) is TBoard then begin
+ orderList := GikoSys.Setting.BoardColumnOrder;
+ vSortIndex := GikoSys.Setting.BoardSortIndex;
+ vSortOrder := GikoSys.Setting.BoardSortOrder;
+ end else
Exit;
id := Integer( orderList[ idx ] );
- if FSortIndex = id then
- FSortOrder := not FSortOrder
+
+ if vSortIndex = id then
+ vSortOrder := not vSortOrder
else begin
- FSortOrder := id = 0;
+ vSortOrder := id = 0;
end;
- TListViewUtils.ListViewSort(Sender, ListView, Column, ListNumberVisibleAction.Checked, FSortOrder, FSortIndex );
+ TListViewUtils.ListViewSort(Sender, ListView, Column, GikoDM.ListNumberVisibleAction.Checked, vSortOrder);
end;
procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
end;
-procedure TGikoForm.AppFormDeactivate(Sender: TObject);
-begin
- Application.ProcessMessages;
- if not Application.Terminated then begin
- if PreviewTimer.Enabled then
- PreviewTimer.Enabled := False;
- //\83t\83H\81[\83J\83X\82ª\91¼\82Ì\83A\83v\83\8a\82É\95Ï\82í\82Á\82½\82Æ\82«\82É\83q\83\93\83g\82ð\8fÁ\8b\8e
- if FHint <> nil then begin
- FHint.ReleaseHandle;
- FHint.ClearAllRes;
- end;
- //\83v\83\8c\83r\83\85\81[\82ð\89B\82·
- if FPreviewBrowser <> nil then
- ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
- end;
-end;
-
procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
const ARect: TRect; var DefaultDraw: Boolean);
var
end;
end;
-{procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
-begin
- TreeSplitter.Visible := PanelVisible;
- CabinetPanel.Visible := PanelVisible;
- CabinetToolButton.Down := PanelVisible;
-end;}
-
procedure TGikoForm.ListViewAllSelect;
begin
ListView.SetFocus;
ListView.SelectAll;
end;
-
-procedure TGikoForm.TreeViewDblClick(Sender: TObject);
-var
- APoint: TPoint;
- HitTest: THitTests;
-begin
- GetCursorPos(APoint);
- APoint := TreeView.ScreenToClient(APoint);
- HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
- if not (htOnLabel in HitTest) then Exit;
-
- TreeDoubleClick( TreeView.Selected );
-end;
-
procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
begin
AddMessageList(Msg, nil, Icon);
end;
-
+// *************************************************************************
+//! \83_\83E\83\93\83\8d\81[\83h\82ª\8a®\97¹\82µ\82½\82Æ\82«\82É\94\90¶\82·\82é\83C\83x\83\93\83g
+// *************************************************************************
procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
var
ATitle: string;
s: string;
boardPlugIn : TBoardPlugIn;
i: Integer;
- browserRec : TBrowserRecord;
+ Res : TResRec;
begin
try
if Item.DownType = gdtBoard then
else
ATitle := Item.ThreadItem.Title;
if ATitle = '' then
- ATitle := GikoSys.Setting.GetMessage(Ord(gmUnKnown));
+ ATitle := GikoSys.GetGikoMessage(gmUnKnown);
if Item.State in [gdsComplete, gdsDiffComplete] then begin
//\90³\8fí\8fI\97¹
if Item.DownType = gdtBoard then begin
//\94Â
Item.SaveListFile;
- AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureItiran)), nil, gmiOK);
+ AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmSureItiran), nil, gmiOK);
if GetActiveList = Item.Board then begin
FActiveList := nil;
+ //\8e©\93®\83\\81[\83g\82Ì\8fê\8d\87\94Â\88ê\97\97\82Ì\83\\81[\83g\8f\87\82ð\83N\83\8a\83A\82·\82é
+ if (GikoSys.Setting.AutoSortThreadList) then begin
+ GikoSys.Setting.BoardSortIndex := 0;
+ GikoSys.Setting.BoardSortOrder := True;
+ end;
+ Sort.SetSortDate(Now());
SetActiveList(Item.Board);
end;
Item.Board.Modified := True;
Item.Board.IsThreadDatRead := True;
PlaySound('New');
+ ListView.Refresh;
end else if Item.DownType = gdtThread then begin
//\83X\83\8c
Item.SaveItemFile;
if (Item.ThreadItem.ParentBoard.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
//boardPlugIn := Item.ThreadItem.BoardPlugIn;
boardPlugIn := Item.ThreadItem.ParentBoard.BoardPlugIn;
- Item.ThreadItem.Title := DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
+ THTMLCreate.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 ), @Res);
+ Item.ThreadItem.Title := Res.FTitle;
ATitle := Item.ThreadItem.Title;
end else if ATitle = '\81i\96¼\8fÌ\95s\96¾\81j' then begin
- ATitle := DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
+ THTMLCreate.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1), @Res);
+ ATitle := Res.FTitle;
end;
for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then begin
end;
if GikoSys.Setting.BrowserTabVisible then begin
if GetActiveContent = Item.ThreadItem then
- browserRec := InsertBrowserTab(Item.ThreadItem)
+ InsertBrowserTab(Item.ThreadItem)
else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
- browserRec := InsertBrowserTab(Item.ThreadItem, True)
+ InsertBrowserTab(Item.ThreadItem, True)
else
- browserRec := InsertBrowserTab(Item.ThreadItem, False);
- if browserRec.Thread = BrowserNullTab.Thread then begin
- browserRec.Movement := BrowserNullTab.Movement;
- BrowserNullTab.Movement := '';
- end;
+ InsertBrowserTab(Item.ThreadItem, False);
+
end else begin
if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then
InsertBrowserTab(Item.ThreadItem);
if Item.State = gdsComplete then begin
PlaySound('New');
- AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureSyutoku)), nil, gmiOK);
+ AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmSureSyutoku), nil, gmiOK);
//Add by Genyakun
DiffComp := True;
end else begin
PlaySound('NewDiff');
- AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureDiff)), nil, gmiOK);
+ AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmSureDiff), nil, gmiOK);
//Add by Genyakun
DiffComp := True;
end;
gvtAll: ListView.Items.Count := TBoard(ActiveList).Count;
gvtLog: ListView.Items.Count := TBoard(ActiveList).LogThreadCount;
gvtNew: ListView.Items.Count := TBoard(ActiveList).NewThreadCount;
+ gvtArch: ListView.Items.Count := TBoard(ActiveList).ArchiveThreadCount;
+ gvtLive: ListView.Items.Count := TBoard(ActiveList).LiveThreadCount;
gvtUser: ListView.Items.Count := TBoard(ActiveList).UserThreadCount;
end;
end;
+ RefreshListView(Item.ThreadItem);
end;
- ListView.Refresh;
+
end else if Item.State = gdsNotModify then begin
//\95Ï\8dX\83i\83V
{ if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
//SetContent(Item.ThreadItem);
InsertBrowserTab(Item.ThreadItem);
end;}
- AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmNotMod)), nil, gmiSAD);
+ AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmNotMod), nil, gmiSAD);
PlaySound('NoChange');
Screen.Cursor := crDefault;
end else if Item.State = gdsAbort then begin
//\92\86\92f
- AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmAbort)), nil, gmiOK);
+ AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmAbort), nil, gmiOK);
end else if Item.State = gdsError then begin
//\83G\83\89\81[
s := Item.ErrText;
if s <> '' then
s := ':' + s;
- AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmError)) + ' (' + IntToStr(Item.ResponseCode) + ')' + s, nil, gmiNG);
+ AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmError) + ' (' + IntToStr(Item.ResponseCode) + ')' + s, nil, gmiNG);
// if Item.ResponseCode = 302 then
// AddMessageList('\94Â\82ª\88Ú\93]\82µ\82½\82©\82à\82µ\82ê\82È\82¢\82Ì\82Å\94Â\8dX\90V\82ð\8ds\82Á\82Ä\82\82¾\82³\82¢\81B', nil, gmiNG);
PlaySound('Error');
StatusBar.Panels[1].Text := FDownloadTitle + ' - \83_\83E\83\93\83\8d\81[\83h\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
end;
-{
-procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
-var
- Component: TComponent;
-begin
- Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
- if Component <> nil then begin
- if not (Component is TProgressBar) then Exit;
- if Max <> -1 then
- TProgressBar(Component).Max := Max;
- TProgressBar(Component).Position := Value;
- end;
-end;
-}
-
procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
var
ListItem: TListItem;
if ThreadItem.IsLogFile then begin
//\82¨\8bC\82É\93ü\82è\82Ì\91S\82Ä\8aJ\82\82Æ\82©\82â\82é\82Æ\81A\8d¡\8aJ\82¢\82Ä\82é\83X\83\8c\82Ìbrowser\82ð\95t\82¯\91Ö\82¦\82é\8b°\82ê\82ª\82 \82é
//\8fí\82É\82S\94Ô\96Ú\82ÉActive\82Ì\83u\83\89\83E\83U\82ª\97\88\82È\82¢\82æ\82¤\82É\88Ú\93®\82³\82¹\82é
- if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil) and
- (FActiveContent.FBrowser <> BrowserNullTab.Browser)then begin
- j := FBrowsers.IndexOf(FActiveContent.FBrowser);
+ if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
+ (FActiveContent.Browser <> BrowserNullTab.Browser)then begin
+ j := FBrowsers.IndexOf(FActiveContent.Browser);
if j = BROWSER_COUNT - 1 then
FBrowsers.Move(BROWSER_COUNT - 1, 0);
end;
if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
Result := TBrowserRecord( BrowserTab.Tabs.Objects[i] );
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = nil then begin
for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
break;
end;
end;
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
FBrowsers.Move(BROWSER_COUNT - 1, 0);
end;
if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
newBrowser := TBrowserRecord.Create;
for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
break;
end;
end else begin
newBrowser := TBrowserRecord.Create;
for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
break;
end;
BrowserNullTab := TBrowserRecord.Create;
BrowserNullTab.Browser := Browser;
end;
+// if BrowserNullTab.thread <> ThreadItem then begin
+// BrowserNullTab.Movement := '';
+// end;
BrowserNullTab.thread := ThreadItem;
Result := BrowserNullTab;
BrowserTab.TabIndex := -1;
BBSID: string;
FileName: string;
sTitle: string;
- doc: Variant;
+ doc: Variant;
s: string;
i: Integer;
idx: Integer;
idx := BrowserTab.TabIndex;
if (FActiveContent <> nil) and
(FActiveContent.Thread <> Thread.Thread) and
+ (FActiveContent.Browser <> nil) and
(Assigned(FActiveContent.Browser.Document)) then begin
try
try
- Sleep(1);
FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop;
except
on E: Exception do
ItemBoardImage.Picture := nil;
BrowserNameLabel.Caption := '';
ItemImage.Picture := nil;
- BrowserNullTab.Thread := nil;
+ BrowserNullTab.Thread := nil;
//TOleControl(BrowserNullTab.Browser).Visible := true;
ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
FActiveContent := nil;
if FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then
FBrowsers.Move(BROWSER_COUNT - 1, 0);
for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
break;
end;
if (FActiveContent.Browser <> BrowserNullTab.Browser) then
ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
end;
- ShowWindow(Thread.FBrowser.Handle, SW_SHOW);
+ ShowWindow(Thread.Browser.Handle, SW_SHOW);
if (not Assigned(Thread.Browser.Document)) then begin
Thread.Browser.Navigate('about:blank');
end;
-
while (Thread.Browser.ReadyState <> READYSTATE_COMPLETE) and
(Thread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
Application.ProcessMessages;
end;
end;
+ if (Thread <> nil) and (ThreadItem <>nil) then begin
+ BrowserBoardNameLabel.Caption := ThreadPTitle;
+ ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
+ BrowserNameLabel.Caption := ThreadTitle;
+ ItemImage.Picture := nil;
+ if ThreadIsLog then
+ if ThreadNewArraical then
+ ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
+ else
+ ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
+ else
+ ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
+
+ ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
+ BrowserNameLabel.Left := ItemImage.Left + 20;
+
+ end;
//ActiveContent\81@\82Ì\8dX\90V
FActiveContent := Thread;
if not ThreadIsLog then begin
- Self.Caption := CAPTION_NAME ;
+ Self.Caption := GikoDataModule.CAPTION_NAME ;
+ //\83X\83e\81[\83^\83X\83o\81[\82É\95\\8e¦\82µ\82Ä\82¢\82é\83X\83\8c\82Ì\97e\97Ê\82ð\8fÁ\8b\8e
+ StatusBar.Panels[THREADSIZE_PANEL].Text := '';
try
+ Thread.Browser.BringToFront;
s := '<HTML><BODY><CENTER>\82±\82Ì\83X\83\8c\83b\83h\82Í\8eæ\93¾\82µ\82Ä\82¢\82Ü\82¹\82ñ</CENTER></BODY></HTML>';
doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
doc.open;
doc.Write(s);
doc.Close;
finally
+
end;
end else begin
- Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']';
+ Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + ThreadTitle + ']';
+ //\83X\83e\81[\83^\83X\83o\81[\82É\95\\8e¦\82µ\82Ä\82¢\82é\83X\83\8c\82Ì\97e\97Ê\82ð\95\\8e¦
+ StatusBar.Panels[THREADSIZE_PANEL].Text := Format('%6.2f kB', [ThreadItem.Size / 1024]);
+ StatusBar.Panels[THREADSIZE_PANEL].Width :=
+ Max(StatusBar.Canvas.TextWidth(StatusBar.Panels[THREADSIZE_PANEL].Text), 70);
//Thread.Repaint\82Í\81A\83X\83L\83\93\93\99\82Ì\90Ý\92è\82ð\95Ï\8dX\82µ\82½\82Æ\82«\81AThread\82ð\83_\83E\83\93\83\8d\81[\83h\82µ\82½\82Æ\82«
//\90V\8bK\82ÉThread\82ð\8aJ\82¢\82½\82Æ\82«\82É\90^\82É\82È\82Á\82Ä\82¢\82é\81B
if Thread.Repaint then begin
Thread.Repaint := false;
Thread.Browser.OnStatusTextChange := nil;
- doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
-
- //GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
- HTMLCreater.CreateHTML2(doc, ThreadItem, sTitle);
+ LockWindowUpdate(Thread.Browser.ParentWindow);
+ HTMLCreater.CreateHTML2(Thread.Browser, ThreadItem, sTitle);
Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
-
- if ThreadItem = nil then begin
- FActiveContent := nil;
- BrowserTab.Repaint;
- Exit;
- end;
PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( Thread.Browser ), 0 );
end;
end;
- if (Thread <> nil) and (ThreadItem <>nil) then begin
- BrowserBoardNameLabel.Caption := ThreadPTitle;
- ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
- BrowserNameLabel.Caption := ThreadTitle;
- ItemImage.Picture := nil;
- if ThreadIsLog then
- if ThreadNewArraical then
- ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
- else
- ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
- else
- ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
- ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
- BrowserNameLabel.Left := ItemImage.Left + 20;
-
- //Thread\82Ì\94Â\82Æ\95\\8e¦\82µ\82Ä\82¢\82é\94Â\82ª\93¯\82¶\82È\82ç\95`\89æ\82ð\8dX\90V\82·\82é
- if (FActiveList is TBoard) and (TBoard(ActiveList) = ThreadItem.ParentBoard) then
- ListView.Refresh;
- end else begin
- FActiveContent := nil;
- end;
+ RefreshListView(ThreadItem);
finally
Screen.Cursor := crDefault;
end;
ListView.Selected := nil;
// ListView.Columns.Clear;
if (FActiveContent <> nil) and (FActiveContent.Thread <> nil)
- and (FActiveContent.Thread.IsLogFile) then
- Self.Caption := CAPTION_NAME + ' - [' + FActiveContent.Thread.Title + ']'
- else
- Self.Caption := CAPTION_NAME;
+ and (FActiveContent.Thread.IsLogFile) then begin
+ try
+ Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + FActiveContent.Thread.Title + ']'
+ except
+ on E: Exception do begin
+ //\83X\83\8c\88ê\97\97DL\8cã\82È\82Ç\82ÉFActiveContent\82Ì\8e\9d\82ÂThread\82ª
+ //\8dí\8f\9c\82³\82ê\82Ä\82¢\82é\8fê\8d\87\82ª\82 \82é\82Ì\82Å\82±\82±\82Ä\8f\88\97\9d\82·\82é
+ ReleaseBrowser(FActiveContent);
+ FActiveContent.Thread := nil;
+ Self.Caption := GikoDataModule.CAPTION_NAME;
+ end;
+ end;
+ end else
+ Self.Caption := GikoDataModule.CAPTION_NAME;
//Application.Title := CAPTION_NAME;
// ActiveListColumnSave;
Screen.Cursor := crHourGlass;
try
if Obj is TBBS then begin
- TListViewUtils.SetCategoryListItem(TBBS(obj), ListView, ListNumberVisibleAction.Checked,
- FSortIndex, FSortOrder);
+ TListViewUtils.SetCategoryListItem(TBBS(obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
end else if Obj is TCategory then begin
- TListViewUtils.SetBoardListItem(TCategory(Obj), ListView, ListNumberVisibleAction.Checked,
- FSortIndex, FSortOrder);
+ TListViewUtils.SetBoardListItem(TCategory(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
end else if Obj is TBoard then begin
- TListViewUtils.SetThreadListItem(TBoard(Obj), ListView, ListNumberVisibleAction.Checked,
- FSortIndex, FSortOrder);
+ TListViewUtils.SetThreadListItem(TBoard(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
end;
finally
Screen.Cursor := crDefault;
//gvtAll: ListView.Items.Count := Board.Count;
gvtLog: Board.LogThreadCount := Board.GetLogThreadCount;
gvtNew: Board.NewThreadCount := Board.GetNewThreadCount;
+ gvtArch: Board.ArchiveThreadCount := Board.GetArchiveThreadCount;
+ gvtLive: Board.LiveThreadCount := Board.GetLiveThreadCount;
gvtUser: Board.UserThreadCount:= Board.GetUserThreadCount;
+
end;
SetActiveList(Board);
ListView.Canvas.Font.Color := clGreen;
s := '\82±\82Ì\83r\83\85\81[\82É\82Í\90V\92\85\83A\83C\83e\83\80\82ª\82 \82è\82Ü\82¹\82ñ\81B';
end;
+ gvtArch: begin
+ ListView.Canvas.Font.Color := clFuchsia;
+ s := '\82±\82Ì\83r\83\85\81[\82É\82ÍDAT\97\8e\82¿\83A\83C\83e\83\80\82ª\82 \82è\82Ü\82¹\82ñ\81B';
+ end;
+ gvtLive: begin
+ ListView.Canvas.Font.Color := clMaroon;
+ s := '\82±\82Ì\83r\83\85\81[\82É\82Í\90¶\91¶\83A\83C\83e\83\80\82ª\82 \82è\82Ü\82¹\82ñ\81B';
+ end;
gvtUser: begin
ListView.Canvas.Font.Color := clNavy;
s := '\82±\82Ì\83r\83\85\81[\82É\82Í\83^\83C\83g\83\8b\82ª\81u%s\81v\82ð\8aÜ\82Þ\83A\83C\83e\83\80\82ª\82 \82è\82Ü\82¹\82ñ\81B';
procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
var
i: Integer;
-begin
+ node: TTreeNode;
+begin
+ // \83L\83\83\83r\83l\83b\83g\82É\97\9a\97ð\82ª\95\\8e¦\82³\82ê\82Ä\82¢\82½\82ç\81A
+ // \83L\83\83\83r\83l\83b\83g\93à\82Ì\83A\83C\83e\83\80\82à\8dí\8f\9c\82·\82é\81B
+ if (FTreeType = gttHistory) then begin
+ node := TreeView.Items.GetFirstNode;
+ while (node <> nil) do begin
+ if ( TFavoriteThreadItem(node.Data).Item = threadItem ) then begin
+ TreeView.Items.Delete(node);
+ TreeView.Refresh;
+ node := nil;
+ end else begin
+ node := node.GetNext;
+ end;
+ end;
+ end;
for i := 0 to FHistoryList.Count - 1 do begin
- if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
+ if threadItem = TFavoriteThreadItem( FHistoryList.Items[i] ).Item then begin
TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
FHistoryList.Delete(i);
- FHistoryList.Capacity := FHistoryList.Count;
+ FHistoryList.Capacity := FHistoryList.Count;
Break;
end;
end;
// title \82Í\8d¡\82Ì\82Æ\82±\82ë\8eg\82Á\82Ä\82¢\82È\82¢
saveList.Add(
'<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
- ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
+ ' title="' + HtmlEncode( MojuUtils.Sanitize(TFavoriteThreadItem( FHistoryList[ i ] ).Title )) + '"/>');
end;
saveList.Add('</address>');
saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
HistoryNode : IXMLNode;
s : string;
favItem : TFavoriteThreadItem;
+{$IFDEF DEBUG}
+ st, rt : Cardinal;
+{$ENDIF}
begin
+{$IFDEF DEBUG}
+ st := GetTickCount;
+{$ENDIF}
fileName := GikoSys.GetConfigDir + 'History.xml';
if FileExists( fileName ) then begin
try
- XMLDoc := IXMLDocument.Create;
+ XMLDoc := IXMLDocument.Create;
//XMLDoc := LoadXMLDocument(FileName);
- LoadXMLDocument(FileName, XMLDoc);
+ LoadXMLDocument(FileName, XMLDoc);
try
XMLNode := XMLDoc.DocumentElement;
s := Trim(HistoryNode.Attributes['url']);
if s <> '' then begin
favItem := TFavoriteThreadItem.Create(
- s, HistoryNode.Attributes[ 'title' ] );
+ s, MojuUtils.UnSanitize(HistoryNode.Attributes[ 'title' ]) );
if not AddHistory( favItem ) then
- favItem.Free;
+ favItem.Free;
end;
//end;
end;
except
end;
end;
+{$IFDEF DEBUG}
+ rt := GetTickCount - st;
+ Writeln('Runtime(Load Histroy) : ' + IntToStr(rt) + ' ms');
+{$ENDIF}
end;
end;
CabinetSelectToolButton.Caption := inBBS.Title;
- CabinetHistoryAction.Checked := False;
- CabinetFavoriteAction.Checked := False;
+ GikoDM.CabinetHistoryAction.Checked := False;
+ GikoDM.CabinetFavoriteAction.Checked := False;
if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
FTreeType := gtt2ch;
end;
CabinetSelectToolButton.Caption := inBBS.Title;
- CabinetHistoryAction.Checked := False;
- CabinetFavoriteAction.Checked := False;
+ GikoDM.CabinetHistoryAction.Checked := False;
+ GikoDM.CabinetFavoriteAction.Checked := False;
- if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
+ if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS)
+ or (not (CabinetPanel.Visible)) then begin
FTreeType := gtt2ch;
HistoryToolBar.Hide;
- FActiveBBS := inBBS;
+ FActiveBBS := inBBS;
TListViewUtils.SetBoardTreeNode(inBBS, TreeView);
TreeView.Items.GetFirstNode.Expanded := True; //\83c\83\8a\81[\83g\83b\83v\8d\80\96Ú\82¾\82¯\82ð\8aJ\82
//\83c\83\8a\81[\82Ì\83g\83b\83v\8d\80\96Ú\82ð\91I\91ð\82·\82é
if CabinetPanel.Visible then begin
if FTreeType = gttHistory then begin
CabinetVisible( False );
- CabinetHistoryAction.Checked := False;
+ GikoDM.CabinetHistoryAction.Checked := False;
end else begin
- CabinetHistoryAction.Checked := True;
+ GikoDM.CabinetHistoryAction.Checked := True;
end;
end else begin
- CabinetVisible( True );
- CabinetHistoryAction.Checked := True;
+ CabinetVisible( True );
+ GikoDM.CabinetHistoryAction.Checked := True;
end;
// BBS...BBS, History, Favorite
FavoriteTreeView.Visible := False;
TreeView.Visible := True;
- CabinetBBSAction.Checked := False;
- CabinetFavoriteAction.Checked := False;
+ GikoDM.CabinetBBSAction.Checked := False;
+ GikoDM.CabinetFavoriteAction.Checked := False;
if FTreeType <> gttHistory then begin
b := CabinetSelectPopupMenu.Items.Count - 1;
end else begin
if Item <> FActiveList then begin
ActiveListColumnSave;
-
if (Item is TBBS) or (Item is TCategory) then begin
ListView.Columns.Clear;
SetActiveList( Item );
Screen.Cursor := crDefault;
end;
end;
+ Sort.SetSortDate(Now());
SetActiveList( Item );
end;
end;
if Item is TBoard then begin // not TCategory
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if GikoSys.Setting.ListWidthState = glsMax then begin
- BrowserMinAction.Execute;
+ GikoDM.BrowserMinAction.Execute;
if GikoForm.Visible then
ListView.SetFocus;
end;
end else begin
if GikoSys.Setting.ListHeightState = glsMax then begin
- BrowserMinAction.Execute;
+ GikoDM.BrowserMinAction.Execute;
if GikoForm.Visible then
ListView.SetFocus;
end;
if GikoSys.Setting.BrowserAutoMaximize = gbmClick then begin
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if GikoSys.Setting.ListWidthState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
+ GikoDM.BrowserMaxAndFocusAction.Execute;
end;
end else begin
if GikoSys.Setting.ListHeightState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
+ GikoDM.BrowserMaxAndFocusAction.Execute;
end;
end;
end;
if GikoSys.Setting.BrowserAutoMaximize = gbmDoubleClick then begin
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if GikoSys.Setting.ListWidthState = glsMin then begin
- BrowserMaxAction.Execute;
- SetFocusForBrowserAction.Execute;
+ GikoDM.BrowserMaxAction.Execute;
+ GikoDM.SetFocusForBrowserAction.Execute;
end;
end else begin
if GikoSys.Setting.ListHeightState = glsMin then begin
- BrowserMaxAction.Execute;
- SetFocusForBrowserAction.Execute;
+ GikoDM.BrowserMaxAction.Execute;
+ GikoDM.SetFocusForBrowserAction.Execute;
end;
end;
end;
end;
end;
-procedure TGikoForm.BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord);
-var
- top: Integer;
- item: OleVariant;
- nm: OleVariant;
- activeBrower :TWebBrowser;
-begin
- //
- while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and
- (BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
- Sleep(1);
- Application.ProcessMessages;
- end;
-
- // Access Violation \82ª\8bN\82«\82é\8e\96\82ª\82 \82é\82Ì\82Å\8d¡\8cã\97v\83`\83F\83b\83N
- if(BrowserRecord <> nil) and (BrowserRecord.FBrowser <> nil) then begin
- activeBrower := BrowserRecord.FBrowser;
- try
- top := 0;
- nm := AName;
- item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
- item.focus();
- repeat
- top := top + item.offsetTop;
- item := item.offsetParent;
- until AnsiCompareText(item.tagName, 'body' ) = 0;
- OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
- except
- end;
- end;
-end;
procedure TGikoForm.BrowserMovement(const AName: string);
-var
- top: Integer;
- item: OleVariant;
- nm: OleVariant;
- activeBrower :TWebBrowser;
begin
// Access Violation \82ª\8bN\82«\82é\8e\96\82ª\82 \82é\82Ì\82Å\8d¡\8cã\97v\83`\83F\83b\83N
- if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin
- activeBrower := FActiveContent.Browser;
- try
- top := 0;
- nm := AName;
- item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
- item.focus();
- repeat
- top := top + item.offsetTop;
- item := item.offsetParent;
- until AnsiCompareText(item.tagName, 'body' ) = 0;
-
- OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
- except
- end;
+ if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0)
+ and (FActiveContent <> nil) then begin
+ FActiveContent.Move(AName);
end;
end;
end else if TObject(Node.Data) is TBoard then begin
TBoard(Node.Data).NodeExpand := False;
end;
+ if (TreeView.Selected <> nil) and (TreeView.Selected = Node) then begin
+ TreeClick(TreeView.Selected);
+ end;
end;
procedure TGikoForm.MessageListViewResize(Sender: TObject);
begin
// MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
end;
+procedure TGikoForm.CabinetVisible( isVisible : Boolean );
+begin
+ TreeSplitter.Visible := isVisible;
+ CabinetPanel.Visible := isVisible;
+ GikoDM.CabinetVisibleAction.Checked := isVisible;
+end;
procedure TGikoForm.SelectListItem(List: TList);
var
end;
-procedure TGikoForm.ExitActionExecute(Sender: TObject);
+procedure TGikoForm.FormResize(Sender: TObject);
begin
- Close;
-end;
-procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
-begin
- ListViewAllSelect;
-end;
+ MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
+ MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
-procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
-var
- CoolBand: TCoolBand;
-begin
- CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
- if CoolBand = nil then
- Exit;
- GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
- CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
- StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
-end;
+ if GikoSys.Setting.ListOrientation = gloHorizontal then begin
+ if GikoSys.Setting.ListWidthState = glsMin then begin
+ // \8dÅ\8f¬\95\\8e¦\82É\82·\82é
+ ViewPanel.Width := ThreadMainPanel.Width - 80;
+ end;
+ end else begin
+ if GikoSys.Setting.ListHeightState = glsMin then begin
+ // \8dÅ\8f¬\95\\8e¦\82É\82·\82é
+ ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
+ end;
+ end;
+
+ FIsIgnoreResize := rtResizing;
+ PostMessage( Handle, USER_RESIZED, 0, 0 );
-procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
-var
- CoolBand: TCoolBand;
-begin
- CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
- if CoolBand = nil then
- Exit;
- GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
- CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
- AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
-end;
-procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
-var
- CoolBand: TCoolBand;
-begin
- CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
- if CoolBand = nil then
- Exit;
- GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
- CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
- LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
end;
-procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
+procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
var
- CoolBand: TCoolBand;
+ i, j, idx: Integer;
+ doc: Variant;
begin
- CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
- if CoolBand = nil then
- Exit;
- CoolBand.Visible := ListToolBarVisibleAction.Checked;
- GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
-
+ idx := BrowserTab.TabIndex;
+ FTabHintIndex := -1;
+ for i := 0 to BrowserTab.Tabs.Count - 1 do begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
+ try
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
+ doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
+ end;
+ except
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
+ end;
+ if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
+ FActiveContent := nil;
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
+ j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
+ if j <> -1 then
+ FBrowsers.Move(j, BROWSER_COUNT - 1);
+ end;
+ BrowserTab.Tabs.BeginUpdate;
+ try
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
+ if ( BrowserTab.Tabs.Count - 1 = i ) and
+ ( BrowserTab.TabRect(i).Left
+ <= BrowserTab.DisplayRect.Left ) then begin
+ BrowserTab.ScrollTabs(-1);
+ end;
+ BrowserTab.Tabs.Delete(i);
+ if idx > i then begin
+ BrowserTab.TabIndex := idx - 1;
+ end else begin
+ if BrowserTab.Tabs.Count -1 >= idx then
+ BrowserTab.TabIndex := idx
+ else
+ BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
+ end;
+ finally
+ BrowserTab.Tabs.EndUpdate;
+ end;
+ if BrowserTab.Tabs.Count = 0 then begin
+ BrowserNullTab.Thread := nil;
+ end;
+ if(BrowserTab.TabIndex <> -1) and
+ ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
+ for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
+ if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
+ = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
+ begin
+ ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
+ break;
+ end;
+ end;
+ TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
+ := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
+ TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
+ FBrowsers.Move(BROWSER_COUNT - 1, 0);
+ end;
+ if( FActiveContent = nil) then
+ BrowserTab.OnChange(nil);
+ Exit;
+ end;
+ end;
end;
-
-procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
+procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
var
- CoolBand: TCoolBand;
-begin
- CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
- if CoolBand = nil then
- Exit;
- CoolBand.Visible := ListNameBarVisibleAction.Checked;
- GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
-end;
-
-procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
-var
- CoolBand: TCoolBand;
-begin
- CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
- if CoolBand = nil then
- Exit;
- CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
- GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
-end;
-
-procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
-var
- CoolBand: TCoolBand;
-begin
- CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
- if CoolBand = nil then
- Exit;
- CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
- GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
-end;
-
-procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
-begin
- MessageSplitter.Visible := MsgBarVisibleAction.Checked;
- MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
- MessageSplitter.Top := MessagePanel.Top + 1;
- MessagePanel.Visible := MsgBarVisibleAction.Checked;
- GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
-end;
-
-procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
-begin
- StatusBar.Visible := StatusBarVisibleAction.Checked;
- GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
-end;
-
-procedure TGikoForm.IconStyleExecute(Sender: TObject);
-begin
- case ListView.ViewStyle of
- vsIcon: SmallIconAction.Execute;
- vsSmallIcon: ListIconAction.Execute;
- vsList: DetailIconAction.Execute;
- vsReport: LargeIconAction.Execute;
- end;
-end;
-
-procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
-begin
- ListView.ViewStyle := vsIcon;
- LargeIconAction.Checked := True;
-end;
-
-procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
-begin
- ListView.ViewStyle := vsSmallIcon;
- SmallIconAction.Checked := True;
-end;
-
-procedure TGikoForm.ListIconActionExecute(Sender: TObject);
-begin
- ListView.ViewStyle := vsList;
- ListIconAction.Checked := True;
-end;
-
-procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
-begin
- ListView.ViewStyle := vsReport;
- DetailIconAction.Checked := True;
-end;
-
-procedure TGikoForm.SearchActionExecute(Sender: TObject);
-var
- chk: TObject;
-begin
-
- if FSearchDialog = nil then begin
- if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
- chk := GikoForm.GetActiveList
- else
- chk := nil;
-
- FSearchDialog := TSearchDialog.Create(Self, chk);
- FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
- end;
-
- try
- FSearchDialog.Show;
- except
- end;
-
-end;
-
-procedure TGikoForm.OptionActionExecute(Sender: TObject);
-var
- Dlg: TOptionDialog;
-begin
- Dlg := TOptionDialog.Create(Self);
- try
- Dlg.ShowModal;
- finally
- Dlg.Release;
- end;
-end;
-
-procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
-begin
- GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
-end;
-
-procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
-begin
- GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
-end;
-
-procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
-begin
- GikoSys.OpenBrowser(URL_2ch, gbtAuto);
-end;
-
-procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
-begin
- GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
-end;
-
-procedure TGikoForm.AboutActionExecute(Sender: TObject);
-var
- Dlg: TAboutDialog;
-begin
- Dlg := TAboutDialog.Create(Self);
- try
- Dlg.ShowModal;
- finally
- Dlg.Release;
- end;
-end;
-
-procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
-begin
- ShowHistoryTree;
-end;
-
-procedure TGikoForm.CabinetVisible( isVisible : Boolean );
-begin
- TreeSplitter.Visible := isVisible;
- CabinetPanel.Visible := isVisible;
- CabinetVisibleAction.Checked := isVisible;
-end;
-
-procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
-begin
- case FTreeType of
- gttHistory: CabinetHistoryAction.Execute;
- gttFavorite: CabinetFavoriteAction.Execute;
- else
- CabinetBBSAction.Execute;
- end;
-end;
-
-procedure TGikoForm.AllItemActionExecute(Sender: TObject);
-begin
- try
- if ViewType <> gvtAll then
- SetListViewType(gvtAll);
- GikoSys.Setting.ThreadRange := gtrAll;
- AllItemAction.Checked := True;
- // SelectComboBox \82Ì\97\9a\97ð\82ð\8dX\90V\82µ\82Ä\82¨\82
- ModifySelectList;
- // SelectComboBox \82Ì\92l\82ð\83N\83\8a\83A
- if SelectComboBoxPanel.Visible then begin
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
- ListView.SetFocus;
- end;
- except
- end;
-end;
-
-procedure TGikoForm.LogItemActionExecute(Sender: TObject);
-begin
- try
- if ViewType <> gvtLog then
- SetListViewType(gvtLog);
- GikoSys.Setting.ThreadRange := gtrLog;
- LogItemAction.Checked := True;
- // SelectComboBox \82Ì\97\9a\97ð\82ð\8dX\90V\82µ\82Ä\82¨\82
- ModifySelectList;
- // SelectComboBox \82Ì\92l\82ð\83N\83\8a\83A
- if SelectComboBoxPanel.Visible then begin
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
- ListView.SetFocus;
- end;
- except
- end;
-end;
-
-procedure TGikoForm.NewItemActionExecute(Sender: TObject);
-begin
- try
-
- if ViewType <> gvtNew then
- SetListViewType(gvtNew);
- GikoSys.Setting.ThreadRange := gtrNew;
- NewItemAction.Checked := True;
- // SelectComboBox \82Ì\97\9a\97ð\82ð\8dX\90V\82µ\82Ä\82¨\82
- ModifySelectList;
- // SelectComboBox \82Ì\92l\82ð\83N\83\8a\83A
- if SelectComboBoxPanel.Visible then begin
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
- ListView.SetFocus;
- end;
- except
- end;
-end;
-
-procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
-var
- idx: Integer;
- Dlg: TListSelectDialog;
-begin
- try
- if SelectComboBoxPanel.Visible then begin
- if SelectComboBoxPanel.Left + SelectComboBoxPanel.Width < ListToolBar.Width then begin
- // SelectComboBox \82ª\82 \82é\8fê\8d\87\82Í\83t\83H\81[\83J\83X\82ð\88Ú\82·
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- if GikoSys.Setting.ListWidthState = glsMax then
- BrowserMinAction.Execute;
- end else begin
- if GikoSys.Setting.ListHeightState = glsMax then
- BrowserMinAction.Execute;
- end;
- SelectComboBox.SetFocus;
- exit;
- end;
- end;
- except
- end;
-
- if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
- SelectComboBox.Text := '';
- SelectComboBox.Color := clWindow;
- end;
-
- AllItemAction.Checked := False;
- LogItemAction.Checked := False;
- NewItemAction.Checked := False;
- //SelectItemAction.Checked := True;
- ModifySelectList;
- Dlg := TListSelectDialog.Create(Self);
- try
- Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
- Dlg.SelectComboBox.Text := SelectComboBox.Text;
- Dlg.ShowModal;
- if Dlg.ModalResult = mrCancel then begin
- if Length( SelectComboBox.Text ) = 0 then begin
- AllItemAction.Checked := True;
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
- end;
-
- if GetActiveList is TBoard then
- SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
- end else begin
- idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
- if idx <> -1 then
- GikoSys.Setting.SelectTextList.Delete(idx);
- GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
- while Dlg.SelectComboBox.Items.Count > 100 do begin
- Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
- end;
-
- if Length( Dlg.SelectComboBox.Text ) = 0 then begin
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
- end else begin
- SelectComboBox.Text := Dlg.SelectComboBox.Text;
- SelectComboBox.Color := clWindow;
- end;
- SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
- end;
- finally
- Dlg.Release;
- end;
-end;
-
-procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
-begin
- GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
- ListView.Refresh;
-end;
-
-procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
-begin
- if GetActiveList is TBoard then begin
- if TBoard(GetActiveList).ParentCategory <> nil then
- SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
- end else if GetActiveList is TCategory then begin
- SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
- end;
-end;
-
-procedure TGikoForm.RoundActionExecute(Sender: TObject);
-var
- Dlg: TRoundDialog;
-begin
- Dlg := TRoundDialog.Create(Self);
- try
- Dlg.ShowModal;
- finally
- Dlg.Release;
- end;
-end;
-
-procedure TGikoForm.StopActionExecute(Sender: TObject);
-begin
- FControlThread.DownloadAbort;
- if FWorkCount <> 0 then FWorkCount := 0;
- try
- Animate.Active := False;
- except
- end;
- Screen.Cursor := crDefault;
-end;
-
-procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
-begin
-// MessagePanel.Visible := False;
-// MessageSplitter.Visible := False;
-// MsgBarVisibleAction.Checked := False;
- MsgBarVisibleAction.Execute;
-end;
-
-procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
-begin
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- case GikoSys.Setting.ListWidthState of
- glsMax: begin
- //\92Ê\8fí\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- ViewPanel.Width := FBrowserSizeWidth;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
- GikoSys.Setting.ListWidthState := glsNormal;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- end;
- glsMin, glsNormal: begin
- //\8dÅ\91å\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- if GikoSys.Setting.ListWidthState = glsNormal then
- FBrowserSizeWidth := ViewPanel.Width;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- ViewPanel.Width := 1;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
- GikoSys.Setting.ListWidthState := glsMax;
- end;
- end;
- end else begin
- case GikoSys.Setting.ListHeightState of
- glsMax: begin
- //\92Ê\8fí\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- ViewPanel.Height := FBrowserSizeHeight;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
- GikoSys.Setting.ListHeightState := glsNormal;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- end;
- glsMin, glsNormal: begin
- //\8dÅ\91å\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- if GikoSys.Setting.ListHeightState = glsNormal then
- FBrowserSizeHeight := ViewPanel.Height;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- ViewPanel.Height := 1;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
- GikoSys.Setting.ListHeightState := glsMax;
- end;
- end;
- end;
-// Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
-// System.Round(BrowserToolBar.ButtonWidth div 2),
-// System.Round(BrowserToolBar.ButtonHeight div 2)));
- //BrowserTab.OnChange(nil);
-end;
-
-procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
-begin
-
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- case GikoSys.Setting.ListWidthState of
- glsMax, glsNormal: begin
- //\8dÅ\8f¬\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- if GikoSys.Setting.ListWidthState = glsNormal then
- FBrowserSizeWidth := ViewPanel.Width;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- ViewPanel.Width := ThreadMainPanel.Width - 80;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
- GikoSys.Setting.ListWidthState := glsMin;
- end;
- glsMin: begin
- //\92Ê\8fí\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- ViewPanel.Width := FBrowserSizeWidth;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
- GikoSys.Setting.ListWidthState := glsNormal;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- end;
- end;
- end else begin
- case GikoSys.Setting.ListHeightState of
- glsMax, glsNormal: begin
- //\8dÅ\8f¬\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- if GikoSys.Setting.ListHeightState = glsNormal then
- FBrowserSizeHeight := ViewPanel.Height;
- ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
- GikoSys.Setting.ListHeightState := glsMin;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- end;
- glsMin: begin
- //\92Ê\8fí\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- ViewPanel.Height := FBrowserSizeHeight;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
- GikoSys.Setting.ListHeightState := glsNormal;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- end;
- end;
- end;
-end;
-
-procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
-begin
- BrowserMovement('top');
-end;
-
-procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
-begin
- BrowserMovement('bottom');
-end;
-
-procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
-begin
- BrowserMovement('new');
-end;
-
-procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
-begin
- BrowserMovement('koko');
-end;
-
-procedure TGikoForm.EditorActionExecute(Sender: TObject);
-var
- Editor: TEditorForm;
- Item: TThreadItem;
-begin
- Item := GetActiveContent;
- if Item = nil then Exit;
- Editor := TEditorForm.Create(Application.MainForm);
- Editor.SetThreadItem(Item);
- GikoSys.LoadEditorKeySetting(Editor.ActionList);
- Editor.Show;
- Editor.BodyEdit.SetFocus;
-end;
-
-procedure TGikoForm.IEActionExecute(Sender: TObject);
-begin
- ShowThreadAction.Execute;
-end;
-
-procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
-begin
- ThreadItem := GetActiveContent;
- if ThreadItem = nil then Exit;
- GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
-end;
-
-procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
-begin
- ThreadItem := GetActiveContent;
- if ThreadItem = nil then Exit;
- GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
-end;
-
-//(Thread)URL\82ð\83R\83s\81[
-procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
-var
- s: string;
-begin
- s := '';
- if TObject(GetActiveContent) is TBoard then
- s := s + TBoard(GetActiveContent).URL + #13#10
- else if TObject(GetActiveContent) is TThreadItem then
- s := s + TThreadItem(GetActiveContent).URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
-end;
-
-//(Thread)\83X\83\8c\83b\83h\96¼\82ð\83R\83s\81[
-procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
-var
- s: string;
-begin
- s := '';
- if TObject(GetActiveContent) is TBoard then
- s := s + TBoard(GetActiveContent).Title + #13#10
- else if TObject(GetActiveContent) is TThreadItem then
- s := s + TThreadItem(GetActiveContent).Title + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
-end;
-
-//(Thread)\83X\83\8c\83b\83h\96¼\82ÆURL\82ð\83R\83s\81[
-procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
-var
- s: string;
-begin
- s := '';
- if TObject(GetActiveContent) is TBoard then
- s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
- else if TObject(GetActiveContent) is TThreadItem then
- s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
-end;
-
-procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
- shiftDown: Boolean;
-begin
- ThreadItem := GetActiveContent;
- shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
- if ThreadItem <> nil then
- DownloadContent(ThreadItem, shiftDown);
-end;
-
-procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
-var
- i: Integer;
- List: TList;
- msg: string;
- shiftDown: Boolean;
-begin
- shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
- if GetActiveList is TCategory then begin
- List := TList.Create;
- try
- SelectListItem(List);
- if List.Count > 5 then begin
- msg := '5\8cÂ\88È\8fã\82Í\8ew\92è\82Å\82«\82Ü\82¹\82ñ' + #13#10
- + '\82Q\82¿\82á\82ñ\82Ë\82é\95\89\89×\8cy\8c¸\82É\82²\8b¦\97Í\82\82¾\82³\82¢';
- MsgBox(Handle, msg, '\8cx\8d\90', MB_ICONEXCLAMATION);
- Exit;
- end;
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TBoard then
- DownloadList(TBoard(List[i]), shiftDown);
- end;
- finally
- List.Free;
- end;
- end else if GetActiveList is TBoard then begin
- DownloadList(TBoard(GetActiveList), shiftDown);
- end;
-end;
-
-procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
- msg: string;
- shiftDown: Boolean;
-begin
- shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
- List := TList.Create;
- try
- SelectListItem(List);
- if List.Count > 10 then begin
- msg := '10\8cÂ\88È\8fã\82Í\8ew\92è\82Å\82«\82Ü\82¹\82ñ' + #13#10
- + '\82Q\82¿\82á\82ñ\82Ë\82é\95\89\89×\8cy\8c¸\82É\82²\8b¦\97Í\82\82¾\82³\82¢';
- MsgBox(Handle, msg, '\8cx\8d\90', MB_ICONEXCLAMATION);
- Exit;
- end;
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TThreadItem then
- DownloadContent(TThreadItem(List[i]), shiftDown);
- end;
- finally
- List.Free;
- end;
-end;
-//ActiveList\82ªTCategoy\82Å\83X\83\8c\88ê\97\97\82Å\82P\82Â\88È\8fã\91I\91ð\82©ActiveList\82ªTBoard\82Å\97L\8cø\82È
-//Action\82Å\8b¤\92Ê
-procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
-begin
- if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
- TAction(Sender).Enabled := True
- else if GetActiveList is TBoard then
- TAction(Sender).Enabled := True
- else
- TAction(Sender).Enabled := False;
-end;
-//ActiveList\82ªTBoard\82Å\83X\83\8c\88ê\97\97\82Å\82P\82Â\88È\8fã\91I\91ð\82µ\82Ä\82¢\82é\82Æ\97L\8cø\82É\82È\82éAction\82Å\8b¤\92Ê
-procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
-begin
- TAction(Sender).Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
-end;
-
-procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
-begin
- UpFolderAction.Enabled := not (GetActiveList is TBBS);
-end;
-
-procedure TGikoForm.FormResize(Sender: TObject);
-begin
-
- MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
- MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
-
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- if GikoSys.Setting.ListWidthState = glsMin then begin
- // \8dÅ\8f¬\95\\8e¦\82É\82·\82é
- ViewPanel.Width := ThreadMainPanel.Width - 80;
- end;
- end else begin
- if GikoSys.Setting.ListHeightState = glsMin then begin
- // \8dÅ\8f¬\95\\8e¦\82É\82·\82é
- ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
- end;
- end;
-
- FIsIgnoreResize := rtResizing;
- PostMessage( Handle, USER_RESIZED, 0, 0 );
-
-
-end;
-
-procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
-begin
- ScrollKokoAction.Enabled := (GetActiveContent <> nil)
- and (GetActiveContent.IsLogFile)
- and (GetActiveContent.Kokomade <> -1);
-
-end;
-
-//\83u\83\89\83E\83U\83^\83u\82ª\82P\82Â\88È\8fã\82Å\97L\8cø\82É\82È\82éAction\82Å\8b¤\92Ê\89»
-procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
-begin
- TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0);
-end;
-
-procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
-const
- DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_SAME_MSG = '\82±\82ê\82ç ^0 \8cÂ\82Ì\83X\83\8c\83b\83h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_TITLE = '\8dí\8f\9c\8am\94F';
-var
- ThreadItem: TThreadItem;
- TmpListItem: TListItem;
- List: TList;
- i: Integer;
-begin
- List := TList.Create;
- try
- TmpListItem := ListView.Selected;
- while TmpListItem <> nil do begin
- if TObject(TmpListItem.Data) is TThreadItem then begin
- ThreadItem := TThreadItem(TmpListItem.Data);
- if ThreadItem.IsLogFile then
- List.Add(ThreadItem);
- end;
- TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
- end;
-
- if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
- if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
- if List.Count = 1 then begin
- if MsgBox(Handle, StringReplace( DEL_MSG, '^0', TThreadItem( List[ 0 ] ).Title, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
- Exit;
- end else begin
- if MsgBox(Handle, StringReplace( DEL_SAME_MSG, '^0', IntToStr( List.Count ), [rfReplaceAll] ), DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> IDYES then
- Exit;
- end;
- end;
- end;
-
- for i := 0 to List.Count - 1 do begin
- ThreadItem := TThreadItem(List[i]);
- DeleteHistory(ThreadItem);
- DeleteTab(ThreadItem);
- ThreadItem.DeleteLogFile;
-
- TreeView.Refresh; // UnRead \82Ì\95\\8e¦\82ð\8dX\90V
- end;
- ListView.Refresh;
- finally
- List.Free;
- end;
-end;
-procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
-var
- i, j, idx: Integer;
- doc: Variant;
-begin
- idx := BrowserTab.TabIndex;
- FTabHintIndex := -1;
- for i := 0 to BrowserTab.Tabs.Count - 1 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
- BrowserTab.Tabs.BeginUpdate;
- try
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
- doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
- end;
- except
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
- end;
- if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
- FActiveContent := nil;
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
- j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
- if j <> -1 then
- FBrowsers.Move(j, BROWSER_COUNT - 1);
- end;
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
- BrowserTab.Tabs.Delete(i);
- if idx > i then begin
- BrowserTab.TabIndex := idx - 1;
- end else begin
- if BrowserTab.Tabs.Count -1 >= idx then
- BrowserTab.TabIndex := idx
- else
- BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
- end;
- if BrowserTab.Tabs.Count = 0 then begin
- BrowserNullTab.Thread := nil;
- end;
- if(BrowserTab.TabIndex <> -1) and
- ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
- for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
- = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
- begin
- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
- break;
- end;
- end;
- TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
- := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
- TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
- FBrowsers.Move(BROWSER_COUNT - 1, 0);
- end;
- BrowserTab.Tabs.EndUpdate;
- if( FActiveContent = nil) then
- BrowserTab.OnChange(nil);
- Exit;
- end;
- end;
-end;
-procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
-var
- i, j, idx: Integer;
- doc: Variant;
+ i, j, idx: Integer;
+ doc: Variant;
begin
idx := BrowserTab.TabIndex;
FTabHintIndex := -1;
for i := 0 to BrowserTab.Tabs.Count - 1 do begin
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
- BrowserTab.Tabs.BeginUpdate;
try
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
if j <> -1 then
FBrowsers.Move(j, BROWSER_COUNT - 1);
end;
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
- BrowserTab.Tabs.Delete(i);
- if idx > i then begin
- BrowserTab.TabIndex := idx - 1;
- end else begin
- if BrowserTab.Tabs.Count -1 >= idx then
- BrowserTab.TabIndex := idx
- else
- BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
+ BrowserTab.Tabs.BeginUpdate;
+ try
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
+ if ( BrowserTab.Tabs.Count - 1 = i ) and
+ ( BrowserTab.TabRect(i).Left
+ <= BrowserTab.DisplayRect.Left ) then begin
+ BrowserTab.ScrollTabs(-1);
+ end;
+ BrowserTab.Tabs.Delete(i);
+ if idx > i then begin
+ BrowserTab.TabIndex := idx - 1;
+ end else begin
+ if BrowserTab.Tabs.Count -1 >= idx then
+ BrowserTab.TabIndex := idx
+ else
+ BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
+ end;
+ finally
+ BrowserTab.Tabs.EndUpdate;
end;
if(BrowserTab.TabIndex <> -1) and
( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
FBrowsers.Move(BROWSER_COUNT - 1, 0);
end;
- BrowserTab.Tabs.EndUpdate;
if( FActiveContent = nil) then
BrowserTab.OnChange(nil);
Exit;
end;
end;
end;
-procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
-var
- No: Integer;
- ThreadItem: TThreadItem;
-begin
- No := KokoPopupMenu.Tag;
- if No = 0 then Exit;
- ThreadItem := GetActiveContent;
- if ThreadItem = nil then Exit;
- ThreadItem.Kokomade := No;
- FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
- FActiveContent.FRepaint := true;
- InsertBrowserTab(FActiveContent.Thread, true);
- Application.ProcessMessages;
-end;
-
-procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
-begin
- ThreadItem := GetActiveContent;
- if ThreadItem = nil then Exit;
- ThreadItem.Kokomade := -1;
- FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
- FActiveContent.FRepaint := true;
- InsertBrowserTab(FActiveContent.Thread, true);
- Application.ProcessMessages;
-end;
-
function TGikoForm.Hook(var Message: TMessage): Boolean;
begin
//\83T\83u\83t\83H\81[\83\80\82ª\83\81\83C\83\93\83\81\83j\83\85\81[\82ð\8e\9d\82½\82È\82¢\82Æ\82«\82É\81A\83\81\83C\83\93\83t\83H\81[\83\80\82Ì
end;
end;
-procedure TGikoForm.KokoResActionExecute(Sender: TObject);
-var
- Editor: TEditorForm;
- Item: TThreadItem;
- Number: Integer;
-begin
- Number := KokoPopupMenu.Tag;
- if Number = 0 then Exit;
- Item := GetActiveContent;
- if Item = nil then Exit;
-
- Editor := TEditorForm.Create(Self);
- Editor.SetThreadItem(Item);
- GikoSys.LoadEditorKeySetting(Editor.ActionList);
- Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
- Editor.Show;
- Editor.BodyEdit.SetFocus;
-end;
-
procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
begin
ItemRoundPMenu.Visible := (GetActiveList is TBoard);
AddRoundNameMenu(ListReservPMenu);
end;
-procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
-var
- URL: string;
-begin
- if GetActiveList is TBoard then begin
- URL := TBoard(GetActiveList).URL;
- GikoSys.OpenBrowser(URL, gbtAuto);
- end;
-end;
-
-procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
- s: string;
-begin
- s := '';
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TBoard then
- s := s + TBoard(List[i]).URL + #13#10
- else if TObject(List[i]) is TThreadItem then
- s := s + TThreadItem(List[i]).URL + #13#10;
- end;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- List.Free;
- end;
-end;
-
-procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
- s: string;
-begin
- s := '';
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TBoard then
- s := s + TBoard(List[i]).Title + #13#10
- else if TObject(List[i]) is TThreadItem then
- s := s + TThreadItem(List[i]).Title + #13#10;
- end;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- List.Free;
- end;
-end;
-
-procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
- s: string;
-begin
- s := '';
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TBoard then
- s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
- else if TObject(List[i]) is TThreadItem then
- s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
- end;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- List.Free;
- end;
-end;
-
-//ActiveList\82ªTBoard\82©TCategory\82Å\83X\83\8c\88ê\97\97\82Å\82P\82Â\88È\8fã\91I\91ð\82µ\82Ä\82¢\82é\82Æ\97L\8cø\82É\82È\82éActionde\8b¤\92Ê
-procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
-begin
- if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
- TAction(Sender).Enabled := True
- else
- TAction(Sender).Enabled := False;
-end;
-
-procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
-begin
- AllSelectAction.Enabled := ListView.SelCount > 0;
-end;
-
-procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
-var
- idx: Integer;
-// ThreadItem: TThreadItem;
-begin
- idx := BrowserTab.TabIndex;
- if idx <> -1 then begin
- if BrowserTab.Tabs.Objects[idx] <> nil then begin
- //ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
- DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
- end;
- end;
-end;
-
-procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
-var
- i: Integer;
- idx: Integer;
-begin
- idx := BrowserTab.TabIndex;
- if idx = -1 then Exit;
- BrowserTab.Tabs.BeginUpdate;
- for i := BrowserTab.Tabs.Count - 1 downto BrowserTab.TabIndex + 1 do begin
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
- BrowserTab.Tabs.Delete(i);
- end;
- if idx > 0 then begin
- for i := BrowserTab.TabIndex - 1 downto 0 do begin
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
- BrowserTab.Tabs.Delete(i);
- end;
- end;
- BrowserTab.Tabs.EndUpdate;
-end;
-
-procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
-var
- i: Integer;
-begin
- if GikoSys.Setting.ShowDialogForAllTabClose then
- if(MessageDlg('\91S\82Ä\82Ì\83^\83u\82ð\95Â\82¶\82Ä\82æ\82ë\82µ\82¢\82Å\82·\82©\81H', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then
- Exit;
-
- FActiveContent := nil;
- BrowserNullTab.Thread := nil;
- BrowserTab.OnChange := nil;
- BrowserTab.Tabs.BeginUpdate;
- for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
- end;
- BrowserTab.Tabs.Clear;
- BrowserTab.Tabs.EndUpdate;
- BrowserTab.OnChange := BrowserTabChange;
- SetContent(BrowserNullTab);
- Self.Caption := CAPTION_NAME ;
-end;
-
-procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
-var
- Board: TBoard;
- TmpTreeNode: TTreeNode;
-begin
- TmpTreeNode := FClickNode;
- TreeView.Selected := FClickNode;
- Board := nil;
-
- if TObject(TmpTreeNode.Data) is TBoard then
- Board := TBoard(TmpTreeNode.Data)
- else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then
- Board := TFavoriteBoardItem(TmpTreeNode.Data).Item;
-
- if Board <> nil then
- DownloadList(Board);
-end;
-
-procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
- TmpTreeNode: TTreeNode;
-begin
- TmpTreeNode := FClickNode;
- TreeView.Selected := FClickNode;
- ThreadItem := nil;
-
- if TObject(TmpTreeNode.Data) is TThreadItem then
- ThreadItem := TThreadItem(TmpTreeNode.Data)
- else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then
- ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item;
-
- if ThreadItem <> nil then
- DownloadContent(ThreadItem);
-end;
-
-procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
-var
- TmpTreeNode: TTreeNode;
- s: string;
-begin
- TmpTreeNode := FClickNode;
- TreeView.Selected := FClickNode;
- if TObject(TmpTreeNode.Data) is TBoard then begin
- s := TBoard(TmpTreeNode.Data).URL + #13#10;
- end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
- s := TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
- end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
- s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
- end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
- s := TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
- end;
- Clipboard.AsText := s;
-end;
-
-procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
-var
- TmpTreeNode: TTreeNode;
- s: string;
-begin
- TmpTreeNode := FClickNode;
- TreeView.Selected := FClickNode;
- if TObject(TmpTreeNode.Data) is TBoard then begin
- s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
- end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
- s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
- end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
- s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
- end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
- s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
- end;
- Clipboard.AsText := s;
-end;
-
procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
begin
FClickNode := TreeView.Selected;
idx: Integer;
wkIntSt: Integer;
wkIntTo: Integer;
- document: IHTMLDocument2;
BNum, BRes: string;
threadItem: TThreadItem;
begin
if(AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1)
or (AnsiPos('\81\84\81\84', Text) = 1) or (AnsiPos('\81\84', Text) = 1) then begin
if GikoSys.Setting.ResAnchorJamp then begin
- Text := ZenToHan(Text);
+ Text := ZenToHan(Trim(Text));
if(AnsiPos('>>', Text) = 1) then begin
//Text := Copy(Text, 3, Length(Text) - 2);
//Text := Copy(Text, 2, Length(Text) - 1);
Delete(Text, 1, 1);
end;
+
if AnsiPos('-', Text) <> 0 then begin
wkIntSt := StrToIntDef(Copy(Text, 1, AnsiPos('-', Text) - 1), 0);
Text := Copy(Text, AnsiPos('-', Text) + 1, Length(Text));
wkIntTo := StrToIntDef(Text, 0);
if wkIntTo < wkIntSt then
wkIntSt := wkIntTo;
- end else
+ end else begin
wkIntSt := StrToIntDef(Text, 0);
+ end;
if wkIntSt <> 0 then begin
- document := FActiveContent.Browser.Document as IHTMLDocument2;
- IDAnchorPopup('');
+ FActiveContent.IDAnchorPopup('');
BrowserMovement(IntToStr(wkIntSt));
end;
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if ViewPanel.Width < 2 then begin
ViewPanel.Width := 1;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
GikoSys.Setting.ListWidthState := glsMax;
end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
GikoSys.Setting.ListWidthState := glsMin;
end else begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
GikoSys.Setting.ListWidthState := glsNormal;
end;
end else begin
if ViewPanel.Height < 2 then begin
ViewPanel.Height := 1;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
GikoSys.Setting.ListHeightState := glsMax;
end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
GikoSys.Setting.ListHeightState := glsMin;
end else begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
GikoSys.Setting.ListHeightState := glsNormal;
end;
end;
i, j: Integer;
idx: Integer;
begin
+ BrowserTab.Tabs.BeginUpdate;
+ try
+ if not BrowserTab.Dragging then begin
+ FTabHintIndex := -1;
+ BrowserTab.Hint := '';
+ idx := BrowserTab.TabIndex;
+ if idx = -1 then begin
+ SetContent(BrowserNullTab);
+
+ end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
+ j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
+ if j <> -1 then
+ FBrowsers.Move(j ,0);
+ end else begin
+ if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
+ (FActiveContent.Browser <> BrowserNullTab.Browser) and
+ (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
+ FBrowsers.Move(BROWSER_COUNT - 1, 0);
-// if NewTab = -1 then
-// ThreadItem := nil;
- if not BrowserTab.Dragging then begin
- FTabHintIndex := -1;
- BrowserTab.Hint := '';
- idx := BrowserTab.TabIndex;
- if idx = -1 then begin
- BrowserNullTab.Thread := nil;
- SetContent(BrowserNullTab);
-
- end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
- j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
- if j <> -1 then
- FBrowsers.Move(j ,0);
- end else begin
- if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
- (FActiveContent.Browser <> BrowserNullTab.Browser) and
- (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
- FBrowsers.Move(BROWSER_COUNT - 1, 0);
-
- for i := 0 to BrowserTab.Tabs.Count - 1 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
- break;
+ for i := 0 to BrowserTab.Tabs.Count - 1 do begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
+ ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
+ break;
+ end;
end;
+ TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
+ TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
+ FBrowsers.Move(BROWSER_COUNT - 1, 0);
end;
- TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
- TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
- FBrowsers.Move(BROWSER_COUNT - 1, 0);
- end;
- MoveWindow(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser.Handle, 0, 0, BrowserPanel.Width, BrowserPanel.Height, false);
- TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
-// GikoSys.OnlyAHundredRes := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
-// OnlyAHundredRes.Checked := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
- SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
+ MoveWindow(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser.Handle, 0, 0, BrowserPanel.Width, BrowserPanel.Height, false);
+ TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
+ SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
- if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
- AddressComboBox.Text := GetActiveContent.URL;
-
- if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
- (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
- then
- else
- SetFocusForBrowserAction.Execute;
+ if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
+ AddressComboBox.Text := GetActiveContent.URL;
+ if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
+ (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
+ then
+ else
+ GikoDM.SetFocusForBrowserAction.Execute;
+ end;
end;
-
+ finally
+ BrowserTab.Tabs.EndUpdate;
end;
-
end;
procedure TGikoForm.SetBrowserTabState;
var
-// i: Integer;
CoolBand: TCoolBand;
begin
BrowserBottomPanel.AutoSize := False;
if GikoSys.Setting.BrowserTabVisible then begin
- if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
- BrowserTab.Style := tsTabs;
- if GikoSys.Setting.BrowserTabPosition = gtpTop then
- BrowserTab.TabPosition := tpTop
- else
- BrowserTab.TabPosition := tpBottom;
- end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
- BrowserTab.TabPosition := tpTop;
- BrowserTab.Style := tsButtons;
- end else begin
- BrowserTab.TabPosition := tpTop;
- BrowserTab.Style := tsFlatButtons
- end;
-
- if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
- BrowserTab.Parent := BrowserTabToolBar;
- BrowserBottomPanel.Hide;
- CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
- if CoolBand <> nil then
- CoolBand.Visible := True;
-// BrowserTab.Parent := BrowserTopPanel;
-// BrowserTab.Parent := BrowserCoolBar;
-// BrowserTab.Top := 26;
-// BrowserTopPanel.Height := 44;
+ BrowserTab.Hide;
+ BrowserTab.Tabs.BeginUpdate;
+ try
+ if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
+ BrowserTab.Style := tsTabs;
+ if GikoSys.Setting.BrowserTabPosition = gtpTop then
+ BrowserTab.TabPosition := tpTop
+ else
+ BrowserTab.TabPosition := tpBottom;
+ end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
+ BrowserTab.TabPosition := tpTop;
+ BrowserTab.Style := tsButtons;
+ end else begin
+ BrowserTab.TabPosition := tpTop;
+ BrowserTab.Style := tsFlatButtons
+ end;
- end else begin
- BrowserTab.Parent := BrowserBottomPanel;
- BrowserTab.Top := 0;
- BrowserTab.Left := 0;
- BrowserBottomPanel.Show;
- CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
- if CoolBand <> nil then
- CoolBand.Visible := False;
-// BrowserTopPanel.Height := 26;
- end;
- BrowserTab.Show;
+ if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
+ BrowserTab.Parent := BrowserTabToolBar;
+ BrowserBottomPanel.Hide;
+ CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
+ if CoolBand <> nil then
+ CoolBand.Visible := True;
+ end else begin
+ BrowserTab.Parent := BrowserBottomPanel;
+ BrowserTab.Top := 0;
+ BrowserTab.Left := 0;
+ BrowserBottomPanel.Show;
+ CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
+ if CoolBand <> nil then
+ CoolBand.Visible := False;
+ end;
+ finally
+ BrowserTab.Tabs.EndUpdate;
+ BrowserTab.Show;
+ end;
end else begin
CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
if CoolBand <> nil then
CoolBand.Visible := False;
BrowserBottomPanel.Visible := False;
-// BrowserTab.Visible := False;
-// BrowserTopPanel.Height := 26;
- AllTabCloseAction.Execute;
+ GikoDM.AllTabCloseAction.Execute;
end;
end;
doc : Variant;
threadItem : TThreadItem;
begin
-// AddMessageList('DocumentComplete', nil, gmiWhat);
if TObject(Sender) is TWebBrowser then begin
BrowserRecord := nil;
if TWebBrowser(Sender) <> Browser then begin
end;
end;
if BrowserRecord <> nil then begin
- if BrowserRecord.FEvent <> nil then
- BrowserRecord.FEvent.Free;
+ if BrowserRecord.Event <> nil then
+ BrowserRecord.Event.Free;
FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
- BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
- BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
- BrowserRecord.FEvent.OnClick := WebBrowserClick; //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
+ BrowserRecord.Event := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
+ BrowserRecord.Event.OnContextMenu := OnDocumentContextMenu;
+ BrowserRecord.Event.OnClick := WebBrowserClick; //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
end;
end else begin
if GetActiveContent <> nil then begin
FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
FEvent.OnContextMenu := OnDocumentContextMenu;
FEvent.OnClick := WebBrowserClick; //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
+ end else begin
+ if FEvent <> nil then begin
+ FEvent.Free;
+ FEvent := nil;
+ end;
end;
-
+
end;
if (BrowserRecord <> nil) and
Assigned( BrowserRecord.Thread ) then begin
threadItem := BrowserRecord.Thread;
- if (BrowserRecord <> nil) and (Length( BrowserRecord.Movement ) > 0) then begin
+ if (threadItem.JumpAddress > 0) then begin
if threadItem.UnRead then begin
threadItem.UnRead := False;
- threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
- if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
TreeView.Refresh;
- ListView.Refresh;
+ RefreshListView(threadItem);
+ end;
+ // \83X\83N\83\8d\81[\83\8b\90æ\82ª\8eæ\93¾\8aO\82Ì\83\8c\83X\82Ì\8e\9e\82Í\8fI\92[\82É\88Ú\93®
+ //if (StrToIntDef(BrowserRecord.Movement, 0) <= BrowserRecord.Thread.Count) then begin
+ if (threadItem.JumpAddress <= BrowserRecord.Thread.Count) then begin
+ BrowserRecord.Move(IntToStr(threadItem.JumpAddress));
+ threadItem.JumpAddress := 0;
+ end else begin
+ BrowserRecord.Move(IntToStr(BrowserRecord.Thread.Count));
end;
- BrowserMovement( BrowserRecord.Movement, BrowserRecord );
- BrowserRecord.Movement := '';
+
end else if threadItem.UnRead then begin
threadItem.UnRead := False;
- threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
- if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
TreeView.Refresh;
- BrowserMovement( 'new', BrowserRecord );
- ListView.Refresh;
+ BrowserRecord.Move('new');
+ RefreshListView(threadItem);
end else if threadItem.ScrollTop <> 0 then begin
try
doc := Idispatch( OleVariant( BrowserRecord.Browser.ControlInterface ).Document ) as IHTMLDocument2;
end;
end;
end;
-end;
-
-procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
-var
- i: Integer;
- List: TList;
-begin
- if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TThreadItem then begin
- if TThreadItem(List[i]).IsLogFile then begin
- SelectReservAction.Enabled := True;
- Exit;
- end;
- end;
- end;
- SelectReservAction.Enabled := False;
- finally
- List.Free;
- end;
- end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
- SelectReservAction.Enabled := True
- else
- SelectReservAction.Enabled := False;
+ LockWindowUpdate(0);
end;
procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
MenuItem.Clear;
Item := TMenuItem.Create(Self);
Item.Caption := '\90V\82µ\82¢\96¼\91O\82Å\8f\84\89ñ\97\\96ñ(&N)...';
- Item.OnClick := SelectNewRoundNameExecute;
+ Item.OnClick := GikoDM.SelectNewRoundNameExecute;
MenuItem.Add(Item);
Item := TMenuItem.Create(Self);
Item.Caption := '\8f\84\89ñ\83\8a\83X\83g\82©\82ç\8dí\8f\9c(&D)';
- Item.OnClick := SelectDeleteRoundExecute;
+ Item.OnClick := GikoDM.SelectDeleteRoundExecute;
MenuItem.Add(Item);
Item := TMenuItem.Create(Self);
Item.Caption := '-';
end;
end;
-procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
-var
- s: string;
- Dlg: TRoundNameDialog;
- cnt: Integer;
-
-begin
- //\8cÄ\82Ñ\8fo\82µ\8c³\82ª\81ATAction\82ÅListView\82É\91I\91ð\82ª\82¢\82È\82¯\82ê\82Î\81AEXIT\82·\82é
- if (Sender is TAction) and (ListView.Selected = nil) then
- Exit;
-
- //\93o\98^\8fã\8cÀ\83`\83F\83b\83N
- cnt := RoundList.Count[grtBoard];
- cnt := cnt + RoundList.Count[grtItem];
- if cnt > 500 then begin
- MsgBox(Handle, '\8f\84\89ñ\82Í500\88È\8fã\93o\98^\82Å\82«\82Ü\82¹\82ñ', '\83G\83\89\81[', MB_OK or MB_ICONSTOP);
- Exit;
- end;
-
- Dlg := TRoundNameDialog.Create(Self);
- try
- Dlg.ShowModal;
- if Dlg.ModalResult <> mrCancel then begin
- s := Trim(Dlg.RoundNameEdit.Text);
- if (Sender is TMenuItem) then begin
- SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
- end else if (Sender is TAction) then begin
- if (ListView.Selected <> nil) then begin
- if (TObject(ListView.Selected.Data) is TThreadItem) then begin
- SetSelectItemRound(True, s,
- TThreadItem(ListView.Selected.Data).Title);
- end else if (TObject(ListView.Selected.Data) is TBoard) then begin
- SetSelectItemRound(True, s,
- TBoard(ListView.Selected.Data).Title);
- end;
- end;
- end;
- ListView.Refresh;
- end;
- finally
- Dlg.Free;
- end;
-end;
procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
var
threadItem : TThreadItem;
- i: Integer;
begin
if ParentName <> 'dummy1' then begin
SetSelectItemRound(RoundFlag, RoundName);
if TObject(List[i]) is TBoard then begin
TBoard(List[i]).RoundName := RoundName;
if RoundFlag then
- RoundList.RoundNameList.Add(RoundName);
- TBoard(List[i]).Round := RoundFlag;
- end else if TObject(List[i]) is TThreadItem then begin
- if TThreadItem(List[i]).IsLogFile then begin
- TThreadItem(List[i]).RoundName := RoundName;
- if RoundFlag then
- RoundList.RoundNameList.Add(RoundName);
- TThreadItem(List[i]).Round := RoundFlag;
- end;
- end;
- end;
- finally
- List.Free;
- end;
-end;
-
-procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
-var
- s : String;
-begin
- if (Sender is TMenuItem) then begin
- try
- SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name);
- except
- end;
- end else if (Sender is TAction) then begin
- try
- if ListView.Selected <> nil then begin
- if (TObject(ListView.Selected.Data) is TThreadItem) then begin
- s := TThreadItem(ListView.Selected.Data).Title;
- end else if (TObject(ListView.Selected.Data) is TBoard) then begin
- s := TBoard(ListView.Selected.Data).Title;
- end;
- SetSelectItemRound(False, '', s);
-
- end;
- except
- end;
- end;
- ListView.Refresh;
-end;
-
-procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
-begin
- // \82±\82Ì\83R\83\81\83\93\83g\8dí\8f\9c\82µ\82Ä\82Í\91Ê\96Ú
-end;
-
-procedure TGikoForm.SetSelectRoundName(Sender: TObject);
-var
- MenuItem: TMenuItem;
-begin
- if Sender is TMenuItem then begin
- MenuItem := TMenuItem(Sender);
- SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
- ListView.Refresh;
- end;
-end;
-
-procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
-var
- Dlg: TNewBoardDialog;
- Msg: string;
- i: Integer;
-begin
- for i := 0 to Screen.CustomFormCount - 1 do begin
- if TObject(Screen.CustomForms[i]) is TEditorForm then begin
- Msg := '\83\8c\83X\83G\83f\83B\83^\82ð\91S\82Ä\95Â\82¶\82Ä\82\82¾\82³\82¢';
- MsgBox(Handle, Msg, '\83G\83\89\81[', MB_OK or MB_ICONSTOP);
- Exit;
- end;
- end;
- Dlg := TNewBoardDialog.Create(Self);
- try
- Dlg.ShowModal;
- finally
- Dlg.Release;
- end;
-end;
-
-procedure TGikoForm.LoginActionExecute(Sender: TObject);
-var
- TmpCursor: TCursor;
- msg : String;
-begin
- if GikoSys.Dolib.Connected then begin
- //\83\8d\83O\83A\83E\83g
- GikoSys.Dolib.Disconnect;
- LoginAction.Checked := False;
- AddMessageList(GikoSys.Setting.GetMessage(Ord(gmLogout)), nil, gmiOK);
- LoginAction.Caption := '\83\8d\83O\83C\83\93(&L)';
- end else begin
- TmpCursor := Screen.Cursor;
- Screen.Cursor := crHourGlass;
- try
- //\92Ê\8fí\83\8d\83O\83C\83\93
- if not GikoSys.Setting.ForcedLogin then begin
- GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
- GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
- GikoSys.Dolib.Password := GikoSys.Setting.Password;
- if GikoSys.Setting.ReadProxy then begin
- GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
- GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
- end else begin
- GikoSys.Dolib.ProxyAddress := '';
- GikoSys.Dolib.ProxyPort := 0;
- end;
- if GikoSys.Dolib.Connect then begin
- LoginAction.Checked := True;
- AddMessageList(GikoSys.Setting.GetMessage(Ord(gmLogin)) + GikoSys.Setting.UserID, nil, gmiOK);
- LoginAction.Caption := '\83\8d\83O\83A\83E\83g(&L)';
- //LoginToolButton.Style := tbsCheck;
- end else begin
- // MsgBox(Handle, '\83\8d\83O\83C\83\93\8fo\97\88\82Ü\82¹\82ñ\82Å\82µ\82½', '\83G\83\89\81[', MB_OK or MB_ICONSTOP);
- AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
- PlaySound('Error');
- LoginAction.Checked := False;
- //LoginToolButton.Down := False;
- ///LoginToolButton.Style := tbsButton;
- end;
- end else begin
- msg := '\8b\90§\83\8d\83O\83C\83\93\83\82\81[\83h\82Å\82Í\81C\83T\81[\83o\82Ì\8fØ\96¾\8f\91\82Ì\97L\8cø\90«\82ð\83`\83F\83b\83N\82µ\82Ü\82¹\82ñ\81B' + #13#10
- + '\8bU\91\95\83T\81[\83o\82Ì\8fê\8d\87\81A\82 \82È\82½\82Ì\83p\83X\83\8f\81[\83h\93\90\82Ü\82ê\82é\89Â\94\\90«\82ª\82 \82è\82Ü\82·\81B' + #13#10
- + '\82±\82Ì\83\82\81[\83h\82Å\83\8d\83O\83C\83\93\82ð\8e\8e\82Ý\82Ü\82·\82©\81H' + #13#10;
- if MsgBox(Handle, msg, '\8cx\8d\90', MB_YESNO or MB_ICONEXCLAMATION) = IDYES then begin
- GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
- GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
- GikoSys.Dolib.Password := GikoSys.Setting.Password;
- if GikoSys.Setting.ReadProxy then begin
- GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
- GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
- end else begin
- GikoSys.Dolib.ProxyAddress := '';
- GikoSys.Dolib.ProxyPort := 0;
- end;
- //SSL\8fá\8aQ\97p\8b\90§\83\8d\83O\83C\83\93
- GikoSys.Dolib.ForcedConnect;
- if GikoSys.Dolib.Connect then begin
- LoginAction.Checked := True;
- AddMessageList(GikoSys.Setting.GetMessage(Ord(gmForceLogin)) + GikoSys.Setting.UserID, nil, gmiOK);
- LoginAction.Caption := '\83\8d\83O\83A\83E\83g(&L)';
- //LoginToolButton.Style := tbsCheck;
- end else begin
- // MsgBox(Handle, '\83\8d\83O\83C\83\93\8fo\97\88\82Ü\82¹\82ñ\82Å\82µ\82½', '\83G\83\89\81[', MB_OK or MB_ICONSTOP);
- AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
- PlaySound('Error');
- LoginAction.Checked := False;
- //LoginToolButton.Down := False;
- //LoginToolButton.Style := tbsButton;
- end;
- end else begin
- LoginAction.Checked := False;
- //LoginToolButton.Down := False;
- //LoginToolButton.Style := tbsButton;
- end;
- end;
- finally
- Screen.Cursor := TmpCursor;
- end;
- end;
-end;
-
-procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
-var
- Dlg: TKeySettingForm;
-begin
- Dlg := TKeySettingForm.Create(Self);
- try
- if Dlg.ShowModal = mrOk then begin
- GikoSys.SaveKeySetting(ActionList);
- GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
- GikoSys.Setting.Gestures.SaveGesture( GikoSys.Setting.GetGestureFileName );
- end;
-
- finally
- Dlg.Release;
- MouseGesture.UnHook;
- MouseGesture.OnGestureStart := OnGestureStart;
- MouseGesture.OnGestureMove := OnGestureMove;
- MouseGesture.OnGestureEnd := OnGestureEnd;
- if GikoSys.Setting.GestureEnabled then begin
- GikoSys.Setting.Gestures.ClearGesture;
- GikoSys.Setting.Gestures.LoadGesture(
- GikoSys.Setting.GetGestureFileName, ActionList );
- MouseGesture.SetHook( Handle );
- end;
- end;
-end;
-
-procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
-begin
- if ArrangeAction.Checked then begin
- //\8fc
- ViewPanel.Align := alNone;
- ListSplitter.Align := alNone;
- ThreadPanel.Align := alNone;
-
- ViewPanel.Width := FBrowserSizeWidth;
- ViewPanel.Align := alLeft;
-
- ListSplitter.Width := 5;
- ListSplitter.Align := alLeft;
-
- ViewPanel.Left := -10;
-
- ThreadPanel.Align := alClient;
-
- GikoSys.Setting.ListOrientation := gloHorizontal;
- case GikoSys.Setting.ListWidthState of
- glsMax: begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
- ViewPanel.Width := 1;
- end;
- glsNormal: begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
- end;
- glsMin: begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
- ViewPanel.Width := ThreadMainPanel.Width - 80;
- end;
- end;
- end else begin
- //\89¡
- ViewPanel.Align := alNone;
- ListSplitter.Align := alNone;
- ThreadPanel.Align := alNone;
-
- ViewPanel.Height := FBrowserSizeHeight;
- ViewPanel.Align := alTop;
-
- ListSplitter.Height := 5;
- ListSplitter.Align := alTop;
-
- ViewPanel.Top := -10;
-
- ThreadPanel.Align := alClient;
- GikoSys.Setting.ListOrientation := gloVertical;
- case GikoSys.Setting.ListHeightState of
- glsMax: begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
- ViewPanel.Height := 1;
- end;
- glsNormal: begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
- end;
- glsMin: begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
- ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
- end;
- end;
- end;
-
-end;
-
-procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
-begin
- CabinetPanel.Width := 150;
- MessagePanel.Height := 40;
-
- FBrowserSizeWidth := 200;
- FBrowserSizeHeight := 200;
- if ArrangeAction.Checked then begin
- ViewPanel.Width := FBrowserSizeWidth;
- end else begin
- ViewPanel.Height := FBrowserSizeHeight;
- end;
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- if GikoSys.Setting.ListHeightState = glsMax then begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- GikoSys.Setting.ListHeightState := glsNormal;
- end;
- end else begin
- if GikoSys.Setting.ListWidthState = glsMax then begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- GikoSys.Setting.ListWidthState := glsNormal;
- end;
- end;
-end;
-
-procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
-const
- DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_TITLE = '\8dí\8f\9c\8am\94F';
-var
- idx: Integer;
- ThreadItem: TThreadItem;
-begin
- idx := BrowserTab.TabIndex;
- if idx <> -1 then begin
- if BrowserTab.Tabs.Objects[idx] <> nil then begin
- ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).FThread;
- if GikoSys.Setting.DeleteMsg then
- if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
- if MsgBox(Handle, StringReplace( DEL_MSG, '^0', ThreadItem.Title, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
- Exit;
- DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
- ThreadItem.DeleteLogFile;
- if ThreadItem.ParentBoard = FActiveList then
- ListView.Refresh;
- end;
- end;
-end;
-
-function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
-var
- i: Integer;
-begin
- Result := nil;
- if CoolBar = nil then
- Exit;
- for i := 0 to CoolBar.Bands.Count - 1 do begin
- if CoolBar.Bands[i].Control = Control then begin
- Result := CoolBar.Bands[i];
- Exit;
- end;
- end;
-end;
-
-procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
-begin
- if BrowserTab.Parent = BrowserTabToolBar then
- BrowserTab.Width := BrowserTabToolBar.Width;
-end;
-
-procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
-const
- DEL_MSG = '\8di\8d\9e\82Ý\91S\97\9a\97ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_TITLE = '\8dí\8f\9c\8am\94F';
-begin
- if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
- if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
- Exit;
- GikoSys.Setting.SelectTextList.Clear;
- SelectComboBox.Items.Clear;
- SelectComboBox.Text := '';
- SetListViewType( gvtAll );
-end;
-
-procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
-var
- i: Integer;
-const
- DEL_MSG = '\83\8c\83X\83G\83f\83B\83^\96¼\91O\91S\97\9a\97ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_TITLE = '\8dí\8f\9c\8am\94F';
-begin
- if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
- if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
- Exit;
- GikoSys.Setting.NameList.Clear;
- for i := 0 to Screen.CustomFormCount - 1 do begin
- if TObject(Screen.CustomForms[i]) is TEditorForm then
- TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
- end;
-end;
-
-procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
-var
- i: Integer;
-const
- DEL_MSG = '\83\8c\83X\83G\83f\83B\83^\83\81\81[\83\8b\91S\97\9a\97ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_TITLE = '\8dí\8f\9c\8am\94F';
-begin
- if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
- if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
- Exit;
- GikoSys.Setting.MailList.Clear;
- for i := 0 to Screen.CustomFormCount - 1 do begin
- if TObject(Screen.CustomForms[i]) is TEditorForm then
- TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
- end;
-end;
-
-procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
-begin
- if BrowserTab.Tabs.Count > 0 then begin
- BrowserTab.TabIndex := 0;
- BrowserTab.OnChange(nil);
- end;
-end;
-
-procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
-begin
- if BrowserTab.Tabs.Count > 0 then begin
- if BrowserTab.TabIndex = -1 then begin
- BrowserTab.TabIndex := 0;
- BrowserTab.OnChange(nil);
- end else if BrowserTab.TabIndex > 0 then begin
- BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
- BrowserTab.OnChange(nil);
+ RoundList.RoundNameList.Add(RoundName);
+ TBoard(List[i]).Round := RoundFlag;
+ end else if TObject(List[i]) is TThreadItem then begin
+ if TThreadItem(List[i]).IsLogFile then begin
+ TThreadItem(List[i]).RoundName := RoundName;
+ if RoundFlag then
+ RoundList.RoundNameList.Add(RoundName);
+ TThreadItem(List[i]).Round := RoundFlag;
+ end;
+ end;
end;
+ finally
+ List.Free;
end;
end;
-procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
+procedure TGikoForm.SetSelectRoundName(Sender: TObject);
+var
+ MenuItem: TMenuItem;
begin
- if BrowserTab.Tabs.Count > 0 then begin
- if BrowserTab.TabIndex = -1 then begin
- BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
- BrowserTab.OnChange(nil);
- end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
- BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
- BrowserTab.OnChange(nil);
- end;
+ if Sender is TMenuItem then begin
+ MenuItem := TMenuItem(Sender);
+ SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
+ ListView.Refresh;
end;
end;
-procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
+function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
+var
+ i: Integer;
begin
- if BrowserTab.Tabs.Count > 0 then begin
- BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
- BrowserTab.OnChange(nil);
+ Result := nil;
+ if CoolBar = nil then
+ Exit;
+ for i := 0 to CoolBar.Bands.Count - 1 do begin
+ if CoolBar.Bands[i].Control = Control then begin
+ Result := CoolBar.Bands[i];
+ Exit;
+ end;
end;
end;
-//\83u\83\89\83E\83U\83^\83u\82ª\82P\82Â\88È\8fã\82Å\8d¶\92[\82Å\82È\82¢Action\82Å\8b¤\92Ê
-procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
-begin
- TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> 0);
-end;
-//\83u\83\89\83E\83U\83^\83u\82ª\82P\82Â\88È\8fã\82Å\89E\92[\82Å\82È\82¢Action\82Å\8b¤\92Ê
-procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
+procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
begin
- TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1);
+ if BrowserTab.Parent = BrowserTabToolBar then
+ BrowserTab.Width := BrowserTabToolBar.Width;
end;
procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
var
NewMenu: TMenuItem;
begin
- FavoriteMenu.Clear;
+ if FavoriteDM.Modified then begin
+ FavoriteMenu.Clear;
- //\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á
- NewMenu := TMenuItem.Create(MainMenu);
- NewMenu.Action := FavoriteAddAction;
- FavoriteMenu.Add(NewMenu);
- //\82¨\8bC\82É\93ü\82è\82Ì\90®\97\9d
- NewMenu := TMenuItem.Create(FavoriteMenu);
- NewMenu.Action := FavoriteArrangeAction;
- FavoriteMenu.Add(NewMenu);
- //\83Z\83p\83\8c\81[\83^
- NewMenu := TMenuItem.Create(FavoriteMenu);
- NewMenu.Caption := '-';
- FavoriteMenu.Add(NewMenu);
-
- CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
+ //\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á
+ NewMenu := TMenuItem.Create(MainMenu);
+ NewMenu.Action := GikoDM.FavoriteAddAction;
+ FavoriteMenu.Add(NewMenu);
+ //\82¨\8bC\82É\93ü\82è\82Ì\90®\97\9d
+ NewMenu := TMenuItem.Create(FavoriteMenu);
+ NewMenu.Action := GikoDM.FavoriteArrangeAction;
+ FavoriteMenu.Add(NewMenu);
+ //\83Z\83p\83\8c\81[\83^
+ FavoriteMenu.InsertNewLineAfter(NewMenu);
+ CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
+ FavoriteDM.Modified := false;
+ end;
end;
procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
var
i: Integer;
- NewMenu: TMenuItem;
+ NewMenu: array of TMenuItem;
begin
- for i := 0 to Node.Count - 1 do begin
- NewMenu := TFavoriteMenuItem.Create(Self);
- NewMenu.AutoHotkeys := maAutomatic;
- NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
- TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
- MenuItem.Add(NewMenu);
+ SetLength(NewMenu, Node.Count);
+ Node := Node.getFirstChild;
+ i := 0;
+ while ( Node <> nil ) do begin
+ NewMenu[i] := TFavoriteMenuItem.Create(nil);
+ NewMenu[i].AutoHotkeys := maAutomatic;
+ NewMenu[i].Caption := CustomStringReplace(Node.Text, '&', '&&');
+ TFavoriteMenuItem(NewMenu[i]).Data := Node.Data;
- if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
- NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
- CreateFavMenu(Node.Item[i], NewMenu);
- end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
- NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
- NewMenu.OnClick := FavoriteClick;
- end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
- NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
- NewMenu.OnClick := FavoriteClick;
+ if TObject(Node.Data) is TFavoriteFolder then begin
+ NewMenu[i].ImageIndex := GikoDataModule.TOOL_ICON_FAV_FOLDER;
+ CreateFavMenu(Node, NewMenu[i]);
+ end else if TObject(Node.Data) is TFavoriteBoardItem then begin
+ NewMenu[i].ImageIndex := GikoDataModule.TOOL_ICON_FAV_BOARD;
+ NewMenu[i].OnClick := FavoriteClick;
+ end else if TObject(Node.Data) is TFavoriteThreadItem then begin
+ NewMenu[i].ImageIndex := GikoDataModule.TOOL_ICON_FAV_THREAD;
+ NewMenu[i].OnClick := FavoriteClick;
end;
+ Inc(i);
+ Node := Node.getNextSibling;
end;
+ MenuItem.Add(NewMenu);
end;
procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
+const
+ MsgAdd : String = '\8aù\82É\82¨\8bC\82É\93ü\82è\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81B\82»\82ê\82Å\82à\92Ç\89Á\82µ\82Ü\82·\82©\81H';
+ TitleAdd: String = '\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á';
var
Dlg : TFavoriteAddDialog;
ItemURL : string;
Data := Node.Data;
if TObject( Data ) is TFavoriteBoardItem then begin
if ItemURL = TFavoriteBoardItem( Data ).URL then begin
- if Application.MessageBox( '\8aù\82É\82¨\8bC\82É\93ü\82è\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81B\82»\82ê\82Å\82à\92Ç\89Á\82µ\82Ü\82·\82©\81H', '\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á', MB_YESNO ) = IDNO then
+ if Application.MessageBox(PChar(MsgAdd) , PChar(TitleAdd), MB_YESNO ) = IDNO then
Exit;
Break;
end;
Data := Node.Data;
if TObject( Data ) is TFavoriteThreadItem then begin
if ItemURL = TFavoriteThreadItem( Data ).URL then begin
- if Application.MessageBox( '\8aù\82É\82¨\8bC\82É\93ü\82è\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81B\82»\82ê\82Å\82à\92Ç\89Á\82µ\82Ü\82·\82©\81H', '\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á', MB_YESNO ) = IDNO then
+ if Application.MessageBox( PChar(MsgAdd), PChar(TitleAdd), MB_YESNO ) = IDNO then
Exit;
Break;
end;
SetLinkBar;
end;
-procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
-begin
- ShowFavoriteAddDialog(GetActiveContent);
-end;
-
procedure TGikoForm.FavoriteClick(Sender: TObject);
begin
-
FavoriteClick( Sender, True );
-
end;
procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if GikoSys.Setting.ListWidthState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
+ GikoDM.BrowserMaxAndFocusAction.Execute;
end;
end else begin
if GikoSys.Setting.ListHeightState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
+ GikoDM.BrowserMaxAndFocusAction.Execute;
end;
end;
end;
end;
-procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
-begin
- if TObject(ListView.Selected.Data) is TBoard then
- ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
-end;
-
-procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
-begin
- BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
-end;
-
-procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
-begin
- if TObject(ListView.Selected.Data) is TThreadItem then
- ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
-end;
-
-procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
-begin
- ShowFavoriteAddDialog(TObject(FClickNode.Data));
-end;
-
-procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
-var
- Dlg: TFavoriteArrangeDialog;
-begin
- Dlg := TFavoriteArrangeDialog.Create(Self);
- try
- Dlg.ShowModal;
- finally
- Dlg.Release;
- end;
- PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
-end;
-
procedure TGikoForm.BBSMenuItemOnClick(
Sender : TObject
);
TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
end;
-
-procedure TGikoForm.MoveToActionExecute(Sender: TObject);
+//! \8ew\92è\82³\82ê\82½\83X\83\8c\83b\83h\82ð\8aJ\82(\83\8d\83O\82ª\96³\82¢\82Æ\82« or \8ew\92èJUMP\82Ü\82Å\91«\82è\82È\82¢\82Æ\82«\82ÍDL\82·\82é)
+procedure TGikoForm.OpenThreadItem(Thread: TThreadItem; URL: String);
var
- URL: string;
- idx: Integer;
+ stRes, edRes : Int64;
+ browserRec : TBrowserRecord;
+ threadNumber : String;
+ doc : Variant;
begin
- URL := Trim(AddressComboBox.Text);
- MoveToURL(URL);
-
- idx := AddressComboBox.Items.IndexOf(URL);
- if idx = -1 then begin
- AddressComboBox.Items.Insert(0, URL);
- if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
- AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
- end else begin
- AddressComboBox.Items.Delete(idx);
- AddressComboBox.Items.Insert(0, URL);
+ stRes := 0;
+ edRes := 0;
+ Thread.JumpAddress := 0;
+ // \83^\83u\82ð\90¶\90¬
+ browserRec := InsertBrowserTab(Thread);
+ if (browserRec <> nil) then begin
+ // JUMP\82·\82×\82«\83\8c\83X\94Ô\8d\86\82ª\82 \82é\82©\83`\83F\83b\83N\82·\82é
+ threadNumber := ChangeFileExt(Thread.FileName, '');
+ GikoSys.GetPopupResNumber( URL, stRes, edRes );
+ // \83X\83\8c\82Ì\94Ô\8d\86\82ð\83\8c\83X\94Ô\82Æ\8cë\82Á\82Ä\94F\8e¯\82µ\82Ä\82¢\82é\82Ì\82ð\83N\83\8a\83A
+ if (StrToInt64(threadNumber) = stRes) then begin
+ if not (AnsiEndsText(threadNumber + '/' + threadNumber, URL))
+ and (Pos('&st=' + threadNumber , URL) = 0) then begin
+ stRes := 0;
+ end;
+ end;
+ if ( stRes > 0 ) then begin
+ Thread.JumpAddress := stRes;
+ end;
+ // \83\8d\83O\82ð\8e\9d\82Á\82Ä\82¢\82È\82¢\82© JUMP\82·\82×\82«\83\8c\83X\94Ô\8d\86\82Ü\82Å\8eæ\93¾\82µ\82Ä\82¢\82È\82¢\82Æ\82«\82ÍDL\82·\82é
+ if (not Thread.IsLogFile) or (stRes > Thread.Count) then begin
+ DownloadContent(Thread);
+ end else if (not browserRec.Repaint) and (stRes > 0) then begin
+ browserRec.Move(IntToStr(stRes));
+ Thread.JumpAddress := 0;
+ try
+ doc := Idispatch( OleVariant( browserRec.Browser.ControlInterface ).Document ) as IHTMLDocument2;
+ Thread.ScrollTop := doc.Body.ScrollTop;
+ except
+ end;
+ end;
end;
end;
i, bi : Integer;
boardURL : string;
tmpThread : TThreadItem;
-// category : TCategory;
-// categoryNode : TTreeNode;
-// boardNode : TTreeNode;
shiftDown : Boolean;
ctrlDown : Boolean;
- stRes, edRes : Int64;
- browserRec : TBrowserRecord;
begin
GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark );
//===== \83v\83\89\83O\83C\83\93
try
//\8dì\8bÆ\92\86//
- //bi := High( BoardPlugIns );
bi := Length(BoardGroups) - 1;
- //for i := Low( BoardPlugIns ) to bi do begin
for i := 1 to bi do begin
- //if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
if (BoardGroups[i].BoardPlugIn <> nil) and (Assigned(Pointer(BoardGroups[i].BoardPlugIn.Module))) then begin
case BoardGroups[i].BoardPlugIn.AcceptURL( inURL ) of
atThread:
if TBoard(ActiveList) = Board then
ListView.Items.Count := ListView.Items.Count + 1;
end;
- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
- browserRec := InsertBrowserTab( ThreadItem );
- if (browserRec <> nil) and (stRes > 0) then
- browserRec.Movement := IntToStr( stRes );
- DownloadContent( ThreadItem );
- Exit;
end else begin
tmpThread.Free;
- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
- browserRec := InsertBrowserTab( ThreadItem );
- if ThreadItem.IsLogFile then begin
- if (browserRec <> nil) and (stRes > 0) then
- BrowserMovement( IntToStr( stRes ), browserRec );
- end else begin
- if (browserRec <> nil) and (stRes > 0) then
- browserRec.Movement := IntToStr( stRes );
- DownloadContent( ThreadItem );
- end;
- Exit;
end;
+ OpenThreadItem(ThreadItem, inURL);
+ Exit;
end;
end;
if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
boardURL := GikoSys.Get2chThreadURL2BoardURL( inURL );
Board := BBSsFindBoardFromURL( boardURL );
- //if Board = nil then
- // Board := BBSsFindBoardFromBBSID( BBSID );
- { \82±\82Ì\95\94\95ª\82àBBS\82\93FindBoardFromURL\82É\8e\9d\82½\82¹\82½\81@20050523
- if Board = nil then begin
- // \81¦\8dì\82Á\82Ä\82à\92Ç\89Á\82·\82é\82Æ\82±\82ë\82ª\96³\82¢\82Ì\82Å\8c\83\82µ\82\95Û\97¯
- //\81@\89ß\8b\8e\83\8d\83O\91q\8cÉ\82©\82ç\81A\83_\83E\83\\82µ\82½\83X\83\8c\82ª\94\8c©\82Å\82«\82È\82¢\82Ì\82Å\82±\82±\82Å\92T\82·\82æ\82¤\82É\82·\82é (2004/01/22)
- Board := BBSs[ 0 ].FindBBSID( BBSID );
- end;
- }
if Board = nil then begin
// \93ü\82é\82×\82«\94Â\82ª\8c©\82Â\82©\82ç\82È\82©\82Á\82½\82Ì\82Å\81A\95\81\92Ê\82Ì\83u\83\89\83E\83U\82Å\8aJ\82
GikoSys.OpenBrowser(inURL, gbtUserApp);
if ThreadItem = nil then begin
ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
end;
- if ThreadItem = nil then begin
- //shift -> \90Ý\92è\83u\83\89\83E\83U\81i\96³\82¯\82ê\82ÎIE\81j
- //ctrl -> IE
- {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
- ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
- if shiftDown then
- GikoSys.OpenBrowser(URL1, gbtUserApp)
- else if ctrlDown then
- GikoSys.OpenBrowser(URL1, gbtIE)
- else begin
- }
- ThreadItem := TThreadItem.Create( nil, Board, URL );
- ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
- if AnsiPos(Host, Board.URL) = 0 then
- ThreadItem.DownloadHost := Host
- else
- ThreadItem.DownloadHost := '';
- Board.Insert(0, ThreadItem);
- if ActiveList is TBoard then begin
- if TBoard(ActiveList) = Board then
- ListView.Items.Count := ListView.Items.Count + 1;
- end;
- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
- browserRec := InsertBrowserTab(ThreadItem);
- if (browserRec <> nil) and (stRes > 0) then
- browserRec.Movement := IntToStr( stRes );
- DownloadContent(ThreadItem);
- {end;}
- end else begin
- if ThreadItem.IsLogFile then begin
- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
- browserRec := InsertBrowserTab(ThreadItem);
- if (browserRec <> nil) and (stRes > 0) then
- browserRec.Movement := IntToStr( stRes );
- end else begin
+ try
+ // \83X\83\8c\83b\83h\83A\83C\83e\83\80\82ª\82È\82¢\82È\82ç\90¶\90¬\82·\82é\81B
+ if ThreadItem = nil then begin
+ ThreadItem := TThreadItem.Create( nil, Board, URL );
+ ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
+ Board.Insert(0, ThreadItem);
+ if ActiveList is TBoard then begin
+ if TBoard(ActiveList) = Board then
+ ListView.Items.Count := ListView.Items.Count + 1;
+ end;
+ end;
+ // \83\8d\83O\82È\82µ\83X\83\8c\83b\83h\82Ì\82Æ\82«\82Í\81A\83z\83X\83g\96¼\82Ì\83`\83F\83b\83N\82ð\82·\82é
+ if (not ThreadItem.IsLogFile) then begin
if AnsiPos(Host, Board.URL) = 0 then
ThreadItem.DownloadHost := Host
else
ThreadItem.DownloadHost := '';
- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
- browserRec := InsertBrowserTab(ThreadItem);
- if (browserRec <> nil) and (stRes > 0) then
- browserRec.Movement := IntToStr( stRes );
- DownloadContent(ThreadItem);
end;
+ OpenThreadItem(ThreadItem, inURL);
+ except
end;
end else begin
Board := BBSsFindBoardFromURL( inURL );
if FActiveBBS <> Board.ParentCategory.ParenTBBS then
ShowBBSTree( Board.ParentCategory.ParenTBBS );
SelectTreeNode( Board, True );
- end;
+ end;
end;
end;
Shift: TShiftState);
begin
if Key = VK_RETURN then
- MoveToAction.Execute;
+ GikoDM.MoveToAction.Execute;
end;
procedure TGikoForm.BrowserEnter(Sender: TObject);
procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
var
- hComboEdit: THandle;
-// KeyData: Integer;
+ handle: THandle;
begin
Handled := False;
//\83A\83h\83\8c\83X\82à\82µ\82\82Í\8di\82è\8d\9e\82Ý\83R\83\93\83{\83{\83b\83N\83X\82à\82µ\82\82Í\82¨\8bC\82É\93ü\82è\82ª\95Ò\8fW\92\86\82Í
//\83V\83\87\81[\83g\83J\83b\83g\82È\82Ç\82ð\96³\8cø\82É\82·\82é
if ((FavoriteTreeView.Visible) and (FavoriteTreeView.IsEditing)) then begin
if Msg.CharCode in [VK_BACK] then begin
- hComboEdit := GetFocus;
- if hComboEdit <> 0 then
- SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
- Handled := True;
- //\82¨\8bC\82É\93ü\82è\82ÍESC\82Å\92E\8fo\82µ\82½\82¢\82Ì\82Å\81A\82»\82ê\82à\91\97\82é
- end else if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT, VK_ESCAPE] then begin
- hComboEdit := GetFocus;
- if hComboEdit <> 0 then
- SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
+ //BS\82ª\82Q\89ñ\91\97\82ç\82ê\82é\95s\8bï\8d\87\89ñ\94ð
+ if Msg.KeyData > 0 then begin
+ handle := GetFocus;
+ if handle <> 0 then
+ SendMessage(handle, WM_CHAR, Msg.CharCode, Msg.KeyData);
+ Handled := True;
+ end;
+ end else
+ //\82¨\8bC\82É\93ü\82è\82ÍESC\82Å\92E\8fo\82µ\82½\82¢\82Ì\82Å\81A\82»\82ê\82à\91\97\82é
+ if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT, VK_ESCAPE] then begin
+ handle := GetFocus;
+ if handle <> 0 then
+ SendMessage(handle, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
Handled := True;
end;
end else if (AddressComboBox.Focused) or (SelectComboBox.Focused) then begin
if Msg.CharCode in [VK_BACK] then begin
- hComboEdit := GetFocus;
- if hComboEdit <> 0 then
- SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
- Handled := True;
+ //BS\82ª\82Q\89ñ\91\97\82ç\82ê\82é\95s\8bï\8d\87\89ñ\94ð
+ if Msg.KeyData > 0 then begin
+ handle := GetFocus;
+ if handle <> 0 then
+ SendMessage(handle, WM_CHAR, Msg.CharCode, Msg.KeyData);
+ Handled := True;
+ end;
end else if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
- hComboEdit := GetFocus;
- if hComboEdit <> 0 then
- SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
+ handle := GetFocus;
+ if handle <> 0 then
+ SendMessage(handle, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
Handled := True;
end;
-{ end else begin
- //\83\81\83j\83\85\81[\82Ì\83t\83@\83C\83\8b(F)\82Æ\82©\82ÅF\82ð\92P\91Ì\82Å\89\9f\82µ\82½\82Æ\82«\82É\91I\91ð\82³\82ê\82Ä\82µ\82Ü\82¤\8c»\8fÛ\82ð\89ñ\94ð
- KeyData := Msg.KeyData;
- if (KeyData and $20000000) = 0 then begin
- if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
- Ord('A'), Ord('T'), Ord('H')] then begin
- if not ActionList.IsShortCut(Msg) then begin
- Handled := True;
- end;
- end;
- end;}
+ end else begin
+ Handled := GikoDM.GikoFormActionList.IsShortCut(Msg);
end;
end;
-procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
-begin
- GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
- SetBrowserTabState;
-end;
-
-procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
-begin
- BrowserTabBottomAction.Checked := False;
- BrowserTabTopAction.Checked := True;
- GikoSys.Setting.BrowserTabPosition := gtpTop;
- SetBrowserTabState;
-end;
-
-procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
-begin
- BrowserTabTopAction.Checked := False;
- BrowserTabBottomAction.Checked := True;
- GikoSys.Setting.BrowserTabPosition := gtpBottom;
- SetBrowserTabState;
-end;
-
-procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
-begin
- BrowserTabButtonStyleAction.Checked := False;
- BrowserTabFlatStyleAction.Checked := False;
- BrowserTabTabStyleAction.Checked := True;
- GikoSys.Setting.BrowserTabStyle := gtsTab;
- SetBrowserTabState;
-end;
-
-procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
-begin
- BrowserTabTabStyleAction.Checked := False;
- BrowserTabFlatStyleAction.Checked := False;
- BrowserTabButtonStyleAction.Checked := True;
- GikoSys.Setting.BrowserTabStyle := gtsButton;
- SetBrowserTabState;
-end;
-
-procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
-begin
- BrowserTabFlatStyleAction.Checked := True;
- BrowserTabTabStyleAction.Checked := False;
- BrowserTabButtonStyleAction.Checked := False;
- GikoSys.Setting.BrowserTabStyle := gtsFlat;
- SetBrowserTabState;
-end;
-
procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
var
p: TPoint;
SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
-
+ FPreviewBrowserRect := ARect;
// Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
// SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
end;
procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
+var
+ Pos : TPoint;
begin
+
if PreviewTimer.Enabled then
PreviewTimer.Enabled := False;
if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
FHint.ReleaseHandle;
FHint.ClearAllRes;
end;
- if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
- ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
+
+ if (FPreviewBrowser <> nil)
+ and (IsWindowVisible(FPreviewBrowser.Handle)) then begin
+ //\82±\82±\82Å\8fÁ\82³\82ê\82é\82Ì\82ª\96â\91è
+ //\82½\82Ô\82ñ\82±\82ê\82Å\95\\8e¦\94Í\88Í\94»\92è\82Å\82«\82Ä\82¢\82é\82Í\82¸
+ Pos := Mouse.CursorPos;
+ Pos.X := Pos.X + Left;
+ Pos.Y := Pos.Y + Top;
+ if (FPreviewBrowserRect.Left > Pos.X) or
+ (FPreviewBrowserRect.Right < Pos.X) or
+ (FPreviewBrowserRect.Top > Pos.Y) or
+ (FPreviewBrowserRect.Bottom < Pos.Y) then begin
+ ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
+ end;
+ end;
+
Message.Result := 1;
inherited;
end;
-
procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
begin
- MsgBarCloseAction.Execute;
+ GikoDM.MsgBarCloseAction.Execute;
end;
function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
ThreadItem: TThreadItem;
begin
Result := False;
- IDAnchorPopup('');
- Doc := FactiveContent.FBrowser.Document as IHtmlDocument2;
+ FactiveContent.IDAnchorPopup('');
+ Doc := FactiveContent.Browser.Document as IHtmlDocument2;
if Assigned(Doc) then begin
Range := Doc.selection.createRange as IHTMLTxtRange;
s := CustomStringReplace(Range.text, '\81@', ' ');//\91S\8ap\8bó\94\92\82ð\94¼\8ap\8bó\94\92\82É
ThreadItem := GetActiveContent;
if ThreadItem <> nil then begin
- Num := StrToInt(s);
+ Num := StrToInt64(s);
FHint.PopupType := gptThread;
HTMLCreater.SetResPopupText(FHint, ThreadItem, Num, Num, False, False);
if FHint.ResCount <> 0 then
end;
end;
-procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
-var
- FileName: string;
-begin
- FileName := GikoSys.GetAppDir + 'batahlp.chm';
- if not FileExists(FileName) then begin
- MsgBox(
- Handle,
- '\83w\83\8b\83v\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\82Å\82µ\82½' + #13#10 +
- '\83w\83\8b\83v\83t\83@\83C\83\8b\82ð\83M\83R\83i\83r\82Ì\83t\83H\83\8b\83_\82É\92u\82¢\82Ä\82\82¾\82³\82¢' + #13#10 +
- '\83w\83\8b\83v\82Í\83M\83R\83i\83r\82Ì\83T\83C\83g\82É\92u\82¢\82Ä\82 \82è\82Ü\82·',
- '\83G\83\89\81[',
- MB_ICONSTOP);
- Exit;
- end;
- ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
-end;
-
-procedure TGikoForm.ToolButton18Click(Sender: TObject);
+procedure TGikoForm.HistoryAllClearToolButtonClick(Sender: TObject);
const
DEL_MSG = '\91S\97\9a\97ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
DEL_TITLE = '\8dí\8f\9c\8am\94F';
end;
end;
-procedure TGikoForm.KotehanActionExecute(Sender: TObject);
-var
- Dlg: TKotehanDialog;
-begin
- Dlg := TKotehanDialog.Create(Self);
- try
- Dlg.ShowModal;
- finally
- Dlg.Release;
- end;
-end;
-
procedure TGikoForm.SetLinkBar;
var
i: Integer;
CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
LinkBarPopupMenu.Items.Add(MenuItem);
ToolButton.MenuItem := MenuItem;
- ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
+ ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_FOLDER;
end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
- ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
+ ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_BOARD;
ToolButton.OnClick := FavoriteClick;
end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
- ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
+ ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_THREAD;
ToolButton.OnClick := FavoriteClick;
end;
ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
end;
end;
-procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
-var
- Editor: TEditorForm;
-begin
- if not (GetActiveList is TBoard) then
- Exit;
- Editor := TEditorForm.Create(Self);
- Editor.SetBoard(TBoard(GetActiveList));
- Editor.Show;
- Editor.BodyEdit.SetFocus;
-end;
-
-procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
-var
- Dlg: TToolBarSettingDialog;
- i: Integer;
- //Component: TComponent;
- ToolButton : TToolButton;
-begin
- Dlg := TToolBarSettingDialog.Create(Self, ActionList);
- try
- Dlg.AddToolBar(StdToolBar, gttStandard);
- Dlg.AddToolBar(ListToolBar, gttList);
- Dlg.AddToolBar(BrowserToolBar, gttBrowser);
- case FToolBarSettingSender of
- tssMain: Dlg.ToolBarIndex := 0;
- tssList: Dlg.ToolBarIndex := 1;
- tssBrowser: Dlg.ToolBarIndex := 2;
- end;
- if Dlg.ShowModal = mrOK then begin
- SetToolBarPopup;
-
- //\8dÅ\93K\95\9d\82ð\8dÄ\90Ý\92è\82·\82é\82½\82ß\82É\93K\93\96\82È\83v\83\8d\83p\83e\83B\82ð\82¢\82¶\82\82é
- for i := 0 to MainCoolBar.Bands.Count - 1 do begin
- MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
- MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
- end;
- for i := 0 to ListCoolBar.Bands.Count - 1 do begin
- ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
- ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
- end;
- for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
- BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
- BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
- end;
-
- SaveToolBarSetting(StdToolBar);
- SaveToolBarSetting(ListToolBar);
- //ListToolBar\82É\82¢\82é\82©\82à\82µ\82ê\82È\82¢\8di\8d\9e\82ÝComboBox\82ð\94z\92u
- SelectComboBoxPanel.Visible := False;
- try
- for i := ListToolBar.ControlCount - 1 downto 0 do
- begin
- if ListToolBar.Controls[ i ].Action = SelectItemAction then
- begin
- SelectComboBoxPanel.Left := ListToolBar.Controls[ i ].Left;
- SelectComboBoxPanel.Width := GikoSys.Setting.SelectComboBoxWidth;
- SelectComboBoxPanel.Parent := ListToolBar;
- SelectComboBoxPanel.Visible := True;
-
- SelectComboBox.Left := 0;
- SelectComboBox.Top := 0;
- SelectComboBox.Height := SelectComboBoxPanel.ClientHeight;
- SelectComboBox.Width := SelectComboBoxPanel.Width -
- SelectComboBoxSplitter.Width;
-
-
- //\88ê\82Â\8c©\82¦\82È\82¢\83{\83^\83\93\82ð\93Ë\82Á\8d\9e\82Þ
- ToolButton := TToolButton(ListToolBar.FindComponent('SelectComboBoxDummy'));
- if ToolButton <> nil then begin
- ToolButton.Parent := nil;
- end else begin
- ToolButton := TToolButton.Create(ListToolBar);
- ToolButton.Name := 'SelectComboBoxDummy';
- end;
-
- ToolButton.Style := tbsSeparator;
- ToolButton.Width := 0;
- ToolButton.Left := ListToolBar.Controls[ i ].Left;
- ListToolBar.InsertControl(ToolButton);
- ToolButton.Visible := False;
-
- // \83X\83\8c\83b\83h\8di\8d\9e\82Ì\97×\82É\83Z\83p\83\8c\81[\83^\82ª\82 \82é\8fê\8d\87\82Í\89B\82·
- if (i + 1) < ListToolBar.ControlCount then
- if ListToolBar.Controls[ i + 1 ] is TToolButton then
- if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
- ListToolBar.Controls[ i + 1 ].Visible := False;
-
-
- // \83X\83\8c\83b\83h\8di\8d\9e\83{\83^\83\93\82ð\89B\82·
- ListToolBar.Controls[ i ].Visible := False;
-
- break;
- end;
- end;
- except
- end;
- ResetBandInfo( ListCoolBar, ListToolBar );
- SaveToolBarSetting(BrowserToolBar);
- end;
- finally
- Dlg.Release;
- FToolBarSettingSender := tssNone;
- end;
-end;
-
function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
var
i : Integer;
begin
-
+ Result := nil;
for i := bar.ButtonCount - 1 downto 0 do begin
if bar.Buttons[ i ].Action = action then begin
Result := bar.Buttons[ i ];
- Exit;
+ Break;
end;
end;
-
- Result := nil;
-
end;
procedure TGikoForm.SetToolBarPopup;
for i := 0 to StdToolBar.ButtonCount - 1 do begin
end;
for i := 0 to ListToolBar.ButtonCount - 1 do begin
- if ListToolBar.Buttons[i].Action = IconStyle then
+ if ListToolBar.Buttons[i].Action = GikoDM.IconStyle then
ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
- if ListToolBar.Buttons[i].Action = SelectReservAction then
+ if ListToolBar.Buttons[i].Action = GikoDM.SelectReservAction then
ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
end;
- aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
+ aIEButton := FindToolBarButton( BrowserToolBar, GikoDM.IEAction );
if aIEButton <> nil then
aIEButton.DropdownMenu := BrowserPopupMenu;
- aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
+ aCabinetBBSButton := FindToolBarButton( StdToolBar, GikoDM.CabinetBBSAction );
if aCabinetBBSButton <> nil then
aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
- aResRangeButton := FindToolBarButton( BrowserToolBar, ResRangeAction );
+ aResRangeButton := FindToolBarButton( BrowserToolBar, GikoDM.ResRangeAction );
if aResRangeButton <> nil then
aResRangeButton.DropdownMenu := ResRangePopupMenu;
- aThreadRangeButton:= FindToolBarButton( ListToolBar, ThreadRangeAction );
+ aThreadRangeButton:= FindToolBarButton( ListToolBar, GikoDM.ThreadRangeAction );
if aThreadRangeButton <> nil then
aThreadRangeButton.DropdownMenu := ThreadRangePopupMenu;
end;
procedure TGikoForm.SetSelectWord( const text : string );
begin
+ // \83X\83\8c\88ê\97\97\82Ì\94Í\88Í\8ew\92è\82ð\89ð\8f\9c
+ ClearThreadRengeAction;
if Length( text ) = 0 then
begin
- AllItemAction.Checked := True;
- LogItemAction.Checked := False;
- NewItemAction.Checked := False;
- end else begin
- // \83`\83\89\82Â\82\82Æ\8c\99\82¾\82©\82ç\81A\88ê\89\9e\89\9f\82µ\82Ä\82 \82é\82Æ\82«\82¾\82¯\8f\88\97\9d\82·\82é
- if AllItemAction.Checked then
- AllItemAction.Checked := False;
- if LogItemAction.Checked then
- LogItemAction.Checked := False;
- if NewItemAction.Checked then
- NewItemaction.Checked := False;
- end;
-
- if Length( text ) = 0 then
+ GikoDM.AllItemAction.Checked := True;
SetListViewType( gvtAll )
- else
+ end else begin
SetListViewType( gvtUser, text, false );
-
+ end;
end;
procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
end else
Str := SelectComboBox.Text + Str;
- SetSelectWord(Str);
+ if (Length(Str) > 0) then begin
+ SetSelectWord(Str);
+ end;
end;
end else if Length( SelectComboBox.Text ) = 0 then
begin
* \81i\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢\81j
*}
end else begin
- // \83`\83\89\82Â\82\82Æ\8c\99\82¾\82©\82ç\81A\88ê\89\9e\89\9f\82µ\82Ä\82 \82é\82Æ\82«\82¾\82¯\8f\88\97\9d\82·\82é
- if AllItemAction.Checked then
- AllItemAction.Checked := False;
- if LogItemAction.Checked then
- LogItemAction.Checked := False;
- if NewItemAction.Checked then
- NewItemaction.Checked := False;
+ // \83X\83\8c\88ê\97\97\82Ì\94Í\88Í\8ew\92è\82ð\89ð\8f\9c
+ ClearThreadRengeAction;
end;
end;
+//! \83X\83\8c\83b\83h\88ê\97\97\82Ì\95\\8e¦\94Í\88Í\90Ý\92è\83`\83F\83b\83N\83N\83\8a\83A
+procedure TGikoForm.ClearThreadRengeAction;
+begin
+ // \83`\83\89\82Â\82\82Æ\8c\99\82¾\82©\82ç\81A\88ê\89\9e\89\9f\82µ\82Ä\82 \82é\82Æ\82«\82¾\82¯\8f\88\97\9d\82·\82é
+ if GikoDM.AllItemAction.Checked then
+ GikoDM.AllItemAction.Checked := False;
+ if GikoDM.LogItemAction.Checked then
+ GikoDM.LogItemAction.Checked := False;
+ if GikoDM.NewItemAction.Checked then
+ GikoDM.NewItemaction.Checked := False;
+ if GikoDM.LiveItemAction.Checked then
+ GikoDM.LiveItemAction.Checked := False;
+ if GikoDM.ArchiveItemAction.Checked then
+ GikoDM.ArchiveItemAction.Checked := False;
+
+end;
procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
begin
if Length( SelectComboBox.Text ) = 0 then
begin
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
+ SelectComboBox.Text := GikoDataModule.SELECTCOMBOBOX_NAME;
+ SelectComboBox.Color := GikoDataModule.SELECTCOMBOBOX_COLOR;
end;
end;
GikoSys.Setting.SelectTextList.Delete( idx );
idx := SelectComboBox.Items.IndexOf( oldText );
if idx <> -1 then
- SelectComboBox.Items.Delete( idx );
- GikoSys.Setting.SelectTextList.Insert( 0, oldText );
- SelectComboBox.Items.Insert( 0, oldText );
- SelectComboBox.Text := oldText;
- end;
- except
- end;
-
-end;
-
-
-//NG\83\8f\81[\83h\83t\83@\83C\83\8b\82ð\8dÄ\93Ç\82Ý\8d\9e\82Ý\82·\82é
-procedure TGikoForm.SelectResActionExecute(Sender: TObject);
-var
- Dlg: TListSelectDialog;
- FilterList : TStringList;
- idx : Integer;
-begin
- Dlg := TListSelectDialog.Create(Self);
- try
- Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
- Dlg.SelectComboBox.Text := FSelectResWord;
- Dlg.ShowModal;
- if Dlg.ModalResult = mrOK then begin
- SelectResAction.Checked := True;
- if Length( Dlg.SelectComboBox.Text ) = 0 then begin
- // \8bó\93ü\97Í\82Å OK \82Í\8di\82è\8d\9e\82Ý\89ð\8f\9c\82Æ\93¯\88Ó\8b`
- ResRangeAction.Execute;
- end else begin
- GikoSys.ResRange := Ord( grrSelect );
-
- // \8dÅ\8cã\82É\90Ý\92è\82µ\82½\82à\82Ì\82ð\8ao\82¦\82Ä\82¨\82
- FSelectResWord := Dlg.SelectComboBox.Text;
-
- // \8c\9f\8dõ\97\9a\97ð\82Ì\8dX\90V
- idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
- if idx <> -1 then
- GikoSys.Setting.SelectTextList.Delete(idx);
- GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
- while Dlg.SelectComboBox.Items.Count > 100 do begin
- Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
- end;
-
- try
- //if SelectComboBox.Parent <> nil then
- if SelectComboBoxPanel.Visible then
- SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
- except
- end;
-
- // \83t\83B\83\8b\83^\82Ì\90Ý\92è
- FilterList := TStringList.Create;
- try
- GikoSys.FSelectResFilter.Reverse := True;
- FilterList.Delimiter := ' '; //\8bæ\90Ø\82è\8eq\82ð\94¼\8ap\83X\83y\81[\83X\82É\90Ý\92è
- FilterList.DelimitedText := Dlg.SelectComboBox.Text;
-
- GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
- finally
- FilterList.Free;
- end;
- RepaintAllTabsBrowser();
- end;
- end else begin
- // \83L\83\83\83\93\83Z\83\8b
- if GikoSys.ResRange <> Ord( grrSelect ) then
- ResRangeAction.Execute;
- end;
- finally
- Dlg.Release;
- end;
-
-end;
-
-// \91S\82Ä\82Ì\83\8c\83X\82ð\95\\8e¦
-procedure TGikoForm.AllResActionExecute(Sender: TObject);
-var
- FilterList : TStringList;
-begin
- if(FActiveContent <> nil) and (FActiveContent.FBrowser <> nil )
- and (FActiveContent.FBrowser.Busy) then Exit;
-
- FResRangeMenuSelect := Ord( grrAll );
- AllResAction.Checked := True;
-
- if GikoSys.ResRange <> Ord( grrAll ) then begin
- GikoSys.ResRange := Ord( grrAll );
-
- // \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.Free;
- end;
-
- FSelectResWord := '';
-
- RepaintAllTabsBrowser();
- end;
-end;
-
-procedure TGikoForm.ReloadClick(Sender: TObject);
-begin
- if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
- MsgBox(Handle, 'NG\83\8f\81[\83h\83t\83@\83C\83\8b\82Ì\8dÄ\93Ç\82Ý\8d\9e\82Ý\82É\8e¸\94s\82µ\82Ü\82µ\82½', '\83G\83\89\81[', MB_OK or MB_ICONEXCLAMATION);
- end else begin
- RepaintAllTabsBrowser();
- end;
-
-end;
-
-procedure TGikoForm.GoBackClick(Sender: TObject);
-var
- s: string;
-begin
- if GikoSys.FAbon.GoForward =false then begin
- MsgBox(Handle, '\88ê\82Â\91O\82ÌNG\83\8f\81[\83h\83t\83@\83C\83\8b\82Ì\93Ç\82Ý\8d\9e\82Ý\82É\8e¸\94s\82µ\82Ü\82µ\82½', '\83G\83\89\81[', MB_OK or MB_ICONEXCLAMATION);
- end else begin
- s := GikoSys.FAbon.NGwordname;
- StatusBar.Panels.Items[2].Text := s;
- StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
- StatusBarResize(Sender);
- RepaintAllTabsBrowser();
+ SelectComboBox.Items.Delete( idx );
+ GikoSys.Setting.SelectTextList.Insert( 0, oldText );
+ SelectComboBox.Items.Insert( 0, oldText );
+ SelectComboBox.Text := oldText;
+ end;
+ except
end;
end;
-procedure TGikoForm.GoFowardClick(Sender: TObject);
-var
- s: string;
-begin
- if GikoSys.FAbon.GoBack =false then begin
- MsgBox(Handle, '\88ê\82Â\8cã\82ë\82ÌNG\83\8f\81[\83h\83t\83@\83C\83\8b\82Ì\93Ç\82Ý\8d\9e\82Ý\82É\8e¸\94s\82µ\82Ü\82µ\82½', '\83G\83\89\81[', MB_OK or MB_ICONEXCLAMATION);
- end else begin
- s := GikoSys.FAbon.NGwordname;
- StatusBar.Panels.Items[2].Text := s;
- StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
- StatusBarResize(Sender);
- RepaintAllTabsBrowser();
- end;
-
-end;
procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
procedure TGikoForm.StatusBarResize(Sender: TObject);
begin
StatusBar.Panels[1].Width := StatusBar.Width -
- StatusBar.Panels[0].Width -
- StatusBar.Panels[2].Width;
+ StatusBar.Panels[0].Width -
+ StatusBar.Panels[THREADSIZE_PANEL].Width -
+ StatusBar.Panels[NGWORDNAME_PANEL].Width;
end;
procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
begin
if (Length( SelectComboBox.Text ) = 0) or
- (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
+ (SelectComboBox.Text = GikoDataModule.SELECTCOMBOBOX_NAME) then
begin
SelectComboBox.Text := '';
SelectComboBox.Color := clWindow;
end;
-//\94Â\96¼\8c\9f\8dõ
-procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
-var
- s : String;
- msg : String;
- CurItem : TTreeNode;
- next : boolean;
-begin
- if InputQuery('\94Â\96¼\8c\9f\8dõ','\94Â\96¼\82Ì\93ü\97Í',s) then begin
- next := true;
- while next do begin
- if TreeView.Selected = nil then
- CurItem := TreeView.Items.GetFirstNode
- else begin
- CurItem := TreeView.Selected.GetNext;
- if CurItem = nil then
- CurItem := TreeView.Items.GetFirstNode;
- end;
- while CurItem <> nil do begin
- if (CurItem.ImageIndex <> 2) and (VaguePos(s,CurItem.Text) <> 0) then begin
- break;
- end;
- CurItem := CurItem.GetNext;
- end;
- try
- if CurItem = nil then begin
- msg := '\90æ\93ª\82É\96ß\82è\82Ü\82·\82©\81H';
- if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
- CurItem := TreeView.Items.GetFirstNode;
- end else begin
- Exit;
- end;
- TreeView.Select(CurItem);
- TreeView.SetFocus;
- end else begin
- TreeView.Select(CurItem);
- TreeView.SetFocus;
- msg := '\8e\9f\82É\8ds\82«\82Ü\82·\82©\81H';
- if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
- next := true;
- end else begin
- next := false;
- end;
- end;
-
- except
- Exit;
- end;
- end;
- end;
-end;
-
-procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
-var
- i, b : Integer;
- item : TMenuItem;
-begin
-
- if CabinetPanel.Visible then begin
- if FTreeType = gttFavorite then begin
- CabinetVisible( False );
- CabinetFavoriteAction.Checked := False;
- end else begin
- CabinetFavoriteAction.Checked := True;
- end;
- end else begin
- CabinetVisible( True );
- CabinetFavoriteAction.Checked := True;
- end;
-
- // BBS...BBS, History, Favorite
- GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
-
- b := CabinetSelectPopupMenu.Items.Count - 1;
- for i := 0 to b do begin
- item := CabinetSelectPopupMenu.Items[ i ];
- if item is TBBSMenuItem then begin
- item.Checked := False;
- // CabinetMenu \82Í CabinetSelectPopupMenu \82Æ\93¯\82¶\82Æ\8c\88\82ß\82¤\82¿\82µ\82¿\82á\82¤
- CabinetMenu.Items[ i ].Checked := False;
- end;
- end;
-
- // \83L\83\83\83r\83l\83b\83g\83c\81[\83\8b\83o\81[\8by\82Ñ\83L\83\83\83r\83l\83b\83g\82Ì\95\\8e¦\90Ø\91Ö
- HistoryToolBar.Hide;
- FavoriteToolBar.Show;
- TreeView.Visible := False;
- FavoriteTreeView.Visible := True;
-
- CabinetSelectToolButton.Caption := '\82¨\8bC\82É\93ü\82è';
- FTreeType := gttFavorite;
-
- // \83\81\83j\83\85\81[\8by\82Ñ\83{\83^\83\93\82Ì\83`\83F\83b\83N\82ð\90Ý\92è
- CabinetBBSAction.Checked := False;
- CabinetHistoryAction.Checked := False;
-
- // \82¨\8bC\82É\93ü\82è\82Ì\83c\83\8a\81[\82ð\93W\8aJ
- FavoriteTreeView.Items.GetFirstNode.Expanded := True;
-
-end;
-
procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
begin
Node.ImageIndex := 16;
Node.SelectedIndex := 16;
end else if Source is TBrowserRecord then begin
- ThreadItem := TBrowserRecord( Source ).FThread;
+ ThreadItem := TBrowserRecord( Source ).Thread;
FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
Node.ImageIndex := 16;
FDropSpaceNode := nil;
end;
end;
+ //\8dX\90V\82µ\82½\82±\82Æ\82ð\8b³\82¦\82é
+ FavoriteDM.Modified := true;
SetLinkBar;
procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
Node: TTreeNode; var S: String);
begin
+ //\8dX\90V\82µ\82½\82±\82Æ\82ð\8b³\82¦\82é
+ FavoriteDM.Modified := true;
FavoriteTreeView.ReadOnly := True;
SetLinkBar;
VK_F2:
begin
FClickNode := FavoriteTreeView.Selected;
- FavoriteTreeViewRenameActionExecute( Sender );
+ GikoDM.FavoriteTreeViewRenameActionExecute( Sender );
end;
VK_DELETE:
begin
FClickNode := FavoriteTreeView.Selected;
- FavoriteTreeViewDeleteActionExecute( Sender );
+ GikoDM.FavoriteTreeViewDeleteActionExecute( Sender );
end;
VK_RETURN:
begin
FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
end;
VK_SPACE:
- FavoriteTreeViewDblClick( Sender );
+ begin
+ FClickNode := FavoriteTreeView.Selected;
+ GikoDM.FavoriteTreeViewReloadActionExecute( Sender );
+ end;
end;
end else begin
//\95Ò\8fW\92\86\82ÉESC\82ð\89\9f\82µ\82½\82ç\81A\95Ò\8fW\82ð\8fI\97¹\82µ\82Ä\81A\8c³\82Ì\95¶\8e\9a\97ñ\82É\96ß\82·
FavoriteTreeNameURLCopyPopupMenu.Visible := False;
FavoriteTreeReloadPopupMenu.Visible := False;
FavoriteTreeLogDeletePopupMenu.Visible := False;
+ FavoriteTreeItemNameCopyPopupMenu.Visible := False;
end else if FClickNode.IsFirstNode then begin
FavoriteTreeBrowseFolderPopupMenu.Visible := True;
FavoriteTreeDeletePopupMenu.Visible := False;
FavoriteTreeRenamePopupMenu.Visible := False;
FavoriteTreeNewFolderPopupMenu.Visible := True;
FavoriteTreeURLCopyPopupMenu.Visible := False;
- FavoriteTreeNameCopyPopupMenu.Visible := True;
+ FavoriteTreeNameCopyPopupMenu.Visible := False;
FavoriteTreeNameURLCopyPopupMenu.Visible := False;
FavoriteTreeReloadPopupMenu.Visible := False;
FavoriteTreeLogDeletePopupMenu.Visible := False;
+ FavoriteTreeItemNameCopyPopupMenu.Visible := True;
end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
FavoriteTreeBrowseFolderPopupMenu.Visible := True;
FavoriteTreeDeletePopupMenu.Visible := True;
FavoriteTreeRenamePopupMenu.Visible := False;
FavoriteTreeNewFolderPopupMenu.Visible := True;
FavoriteTreeURLCopyPopupMenu.Visible := False;
- FavoriteTreeNameCopyPopupMenu.Visible := True;
+ FavoriteTreeNameCopyPopupMenu.Visible := False;
FavoriteTreeNameURLCopyPopupMenu.Visible := False;
FavoriteTreeReloadPopupMenu.Visible := False;
FavoriteTreeLogDeletePopupMenu.Visible := False;
+ FavoriteTreeItemNameCopyPopupMenu.Visible := True;
end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
FavoriteTreeBrowseFolderPopupMenu.Visible := True;
FavoriteTreeDeletePopupMenu.Visible := True;
FavoriteTreeNameURLCopyPopupMenu.Visible := False;
FavoriteTreeReloadPopupMenu.Visible := False;
FavoriteTreeLogDeletePopupMenu.Visible := False;
+ FavoriteTreeItemNameCopyPopupMenu.Visible := True;
end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
FavoriteTreeBrowseFolderPopupMenu.Visible := False;
FavoriteTreeDeletePopupMenu.Visible := True;
FavoriteTreeNameURLCopyPopupMenu.Visible := True;
FavoriteTreeReloadPopupMenu.Visible := True;
FavoriteTreeLogDeletePopupMenu.Visible := True;
+ FavoriteTreeItemNameCopyPopupMenu.Visible := True;
end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
FavoriteTreeBrowseFolderPopupMenu.Visible := False;
FavoriteTreeDeletePopupMenu.Visible := True;
FavoriteTreeNameURLCopyPopupMenu.Visible := True;
FavoriteTreeReloadPopupMenu.Visible := True;
FavoriteTreeLogDeletePopupMenu.Visible := False;
+ FavoriteTreeItemNameCopyPopupMenu.Visible := True;
end else begin
FavoriteTreeBrowseFolderPopupMenu.Visible := False;
FavoriteTreeDeletePopupMenu.Visible := False;
FavoriteTreeNameURLCopyPopupMenu.Visible := False;
FavoriteTreeReloadPopupMenu.Visible := False;
FavoriteTreeLogDeletePopupMenu.Visible := False;
- end;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
-const
- DEL_LINK_MSG = '\81g\83\8a\83\93\83N\81h\82Í\83\8a\83\93\83N\83o\81[\97p\83t\83H\83\8b\83_\82Å\82·\81B\8dí\8f\9c\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_MSG = '\81g^0\81h\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_TITLE = '\8dí\8f\9c\8am\94F';
-begin
-
- if FClickNode = nil then
- Exit;
- if FClickNode.IsFirstNode then
- Exit;
- if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
- if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
- if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
- Exit;
- end else begin
- if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
- Exit;
- end;
- end;
-
- //FDeleteList.Add(FClickNode.Data);
- //SetDeleteItemList(FClickNode);
-
- FClickNode.Delete;
-
- SetLinkBar;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
-var
- node : TTreeNode;
-begin
-
- if FClickNode = nil then
- Exit;
- if FClickNode.IsFirstNode then
- Exit;
- if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
- Exit;
- FavoriteTreeView.ReadOnly := False;
- if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
- node := FClickNode.Parent;
- while node <> nil do begin
- node.Expanded := True;
- node := node.Parent;
- end;
- FClickNode.EditText;
- end else begin
- FClickNode.Text := InputBox( '\96¼\91O\82Ì\95Ï\8dX', '\82¨\8bC\82É\93ü\82è\82Ì\90V\82µ\82¢\96¼\91O\82ð\93ü\97Í\82µ\82Ä\82\82¾\82³\82¢', FClickNode.Text );
- end;
-
- SetLinkBar;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
- Sender: TObject);
-var
- NewFavFolder: TFavoriteFolder;
- Node: TTreeNode;
-begin
-
- if FClickNode = nil then
- Exit;
-
- try
- if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
- FavoriteTreeView.Selected := FClickNode.Parent;
- FClickNode := FClickNode.Parent;
- end;
-
- NewFavFolder := TFavoriteFolder.Create;
- Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '\90V\82µ\82¢\83t\83H\83\8b\83_', NewFavFolder);
- Node.ImageIndex := 14;
- Node.SelectedIndex := 14;
- // FClickNode.Selected.Expanded := True;
- FavoriteTreeView.Selected := Node;
- FClickNode := Node;
- FavoriteTreeViewRenameAction.Execute;
- finally
+ FavoriteTreeItemNameCopyPopupMenu.Visible := False;
end;
end;
procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
-var
- i: Integer;
-begin
-
- if not (TObject(node.Data) is TFavoriteFolder) then
- exit;
-
- for i := 0 to node.Count - 1 do
- begin
- if TObject(node.Item[i].Data) is TFavoriteFolder then
- FavoriteBrowseFolder( node.Item[i] )
- else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
- FavoriteClick( node.Item[i], False );
- end;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
- Sender: TObject);
-begin
- FavoriteBrowseFolder( FClickNode );
-end;
-
-procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
-var
- mousePoint : TPoint;
- item : TTreeNode;
- rect : TRect;
-begin
- mousePoint := Mouse.CursorPos;
- mousePoint := FavoriteTreeView.ScreenToClient(mousePoint);
- item := FavoriteTreeView.GetNodeAt(mousePoint.X, mousePoint.Y);
- //\91I\91ð\82µ\82½\83A\83C\83e\83\80\82Æ\93¯\82¶\82©\83`\83F\83b\83N
- if item = FavoriteTreeView.Selected then begin
- //\95\\8e¦\82µ\82Ä\82¢\82é\94Í\88Í\82Æ\93¯\82¶\82Æ\82±\82ë\82©\83`\83F\83b\83N
- rect := item.DisplayRect(true);
- //\83C\83\81\81[\83W\95ª\8d¶\82É\90L\82Î\82·
- rect.Left := rect.Left - FavoriteTreeView.Images.Width;
- if ((mousePoint.X >= rect.Left) and (mousePoint.X <= rect.Right)) and
- ((mousePoint.Y >= rect.Top) and (mousePoint.Y <= rect.Bottom)) then begin
- FClickNode := FavoriteTreeView.Selected;
- FavoriteTreeViewReloadActionExecute( Sender );
- end;
- end;
-end;
-
-procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
- Sender: TObject);
-const
- DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_TITLE = '\8dí\8f\9c\8am\94F';
-var
- ThreadItem: TThreadItem;
- FavThread: TFavoriteThreadItem;
-begin
-
- if FClickNode = nil then Exit;
- if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
-
- FavThread := TFavoriteThreadItem( FClickNode.Data );
- ThreadItem := FavThread.Item;
-
- try
- if GikoSys.Setting.DeleteMsg then begin
- if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
- if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
- Exit;
- end;
-
- DeleteHistory(ThreadItem);
- DeleteTab(ThreadItem);
- ThreadItem.DeleteLogFile;
-
- ListView.Refresh;
- finally
- end;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
- FavThread: TFavoriteThreadItem;
- Board: TBoard;
- FavBoard: TFavoriteBoardItem;
- shiftDown: Boolean;
-begin
-
- if FClickNode = nil then Exit;
-
- shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
-
- if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
- FavThread := TFavoriteThreadItem( FClickNode.Data );
- ThreadItem := FavThread.Item;
- if ThreadItem <> nil then
- DownloadContent(ThreadItem, shiftDown);
- end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
- FavBoard := TFavoriteBoardItem( FClickNode.Data );
- Board := FavBoard.Item;
- DownloadList(Board, shiftDown);
- end;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
-var
- FavThread : TFavoriteThreadItem;
- FavBoard : TFavoriteBoardItem;
- s : string;
-begin
-
- if FClickNode = nil then Exit;
-
- if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
-
- FavThread := TFavoriteThreadItem( FClickNode.Data );
- s := FavThread.URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
-
- end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
-
- FavBoard := TFavoriteBoardItem( FClickNode.Data );
- s := FavBoard.URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
-
- end;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
- FavThread: TFavoriteThreadItem;
- Board: TBoard;
- FavBoard: TFavoriteBoardItem;
- s: string;
-begin
-
- if FClickNode = nil then Exit;
-
- if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
-
- FavThread := TFavoriteThreadItem( FClickNode.Data );
- ThreadItem := FavThread.Item;
-
- try
- s := ThreadItem.Title + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- end;
-
- end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
-
- FavBoard := TFavoriteBoardItem( FClickNode.Data );
- Board := FavBoard.Item;
- if Board <> nil then
- if not Board.IsThreadDatRead then
- GikoSys.ReadSubjectFile(Board);
-
- try
- s := Board.Title + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- end;
-
- end;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
- Sender: TObject);
-var
- ThreadItem: TThreadItem;
- FavThread: TFavoriteThreadItem;
- Board: TBoard;
- FavBoard: TFavoriteBoardItem;
- s: string;
-begin
-
- if FClickNode = nil then Exit;
-
- if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
-
- FavThread := TFavoriteThreadItem( FClickNode.Data );
- ThreadItem := FavThread.Item;
-
- try
- s := ThreadItem.Title + #13#10 + ThreadItem.URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- end;
-
- end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
-
- FavBoard := TFavoriteBoardItem( FClickNode.Data );
- Board := FavBoard.Item;
- if Board <> nil then
- if not Board.IsThreadDatRead then
- GikoSys.ReadSubjectFile(Board);
+var
+ i: Integer;
+begin
- try
- s := Board.Title + #13#10 + Board.URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- end;
+ if not (TObject(node.Data) is TFavoriteFolder) then
+ exit;
+ for i := 0 to node.Count - 1 do
+ begin
+ if TObject(node.Item[i].Data) is TFavoriteFolder then
+ FavoriteBrowseFolder( node.Item[i] )
+ else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
+ FavoriteClick( node.Item[i], False );
end;
end;
-
function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
var
Found: TTreeNode;
//*)
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if GikoSys.Setting.ListWidthState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
+ GikoDM.BrowserMaxAndFocusAction.Execute;
end;
end else begin
if GikoSys.Setting.ListHeightState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
+ GikoDM.BrowserMaxAndFocusAction.Execute;
end;
end;
end;
end;
-procedure TGikoForm.ResRangeActionExecute(Sender: TObject);
-begin
- case FResRangeMenuSelect of
- Ord( grrAll ): AllResAction.Execute;
- Ord( grrKoko ): OnlyKokoResAction.Execute;
- Ord( grrNew ): OnlyNewResAction.Execute;
- 100: OnlyAHundredResAction.Execute;
- end;
-end;
-
procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
Y: Integer);
begin
finally
FDropSpaceNode := nil;
end;
+ //\8dX\90V\82µ\82½\82±\82Æ\82ð\8b³\82¦\82é
+ FavoriteDM.Modified := true;
SetLinkBar;
end;
MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
end;
-procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
-begin
-
- if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
- ShowMessage('\83t\83@\83C\83\8b\82ð\8fo\97Í\82µ\82Ü\82µ\82½');
- end else begin
- ShowMessage('\83t\83@\83C\83\8b\82Ì\8fo\97Í\82É\8e¸\94s\82µ\82Ü\82µ\82½');
- end;
-end;
procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
begin
if FListViewBackGroundColor <> value then begin
ListView.Color := FListViewBackGroundColor;
end;
end;
-procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
-begin
- ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
-end;
-
-procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
-begin
-
- if CabinetPanel.Visible then begin
- if FTreeType = gtt2ch then begin
- CabinetVisible( False );
-
- CabinetBBSAction.Checked := False;
- end else begin
- CabinetBBSAction.Checked := True;
- end;
- end else begin
- CabinetVisible( True );
- CabinetBBSAction.Checked := True;
- end;
-
- if FActiveBBS = nil then
- ShowBBSTree( BBSs[ 0 ] )
- else
- ShowBBSTree( FActiveBBS );
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
- Sender: TObject);
-var
- threadItem : TThreadItem;
-begin
-
- if FClickNode = nil then Exit;
-
- if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
-
- threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
- if threadItem = nil then
- Exit;
- GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
-
- end;
-
-end;
-
procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
var
threadItem : TThreadItem;
end;
-procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
-begin
- SelectTreeNode( GetActiveContent.ParentBoard, True );
-end;
-
procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
MousePos: TPoint; var Handled: Boolean);
var
end;
end;
-procedure TGikoForm.KoreCopyExecute(Sender: TObject);
-begin
- KonoresCopy(KokoPopupMenu.Tag, true);
-end;
procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
var
ThreadItem: TThreadItem;
tmp := GikoSys.ReadThreadFile(FileName, Number);
end;
if tmp <> '' then begin
- Res := DivideStrLine(tmp);
+ THTMLCreate.DivideStrLine(tmp, @Res);
Header := IntToStr(Number) + ' \81F' + Res.FName + ' \81F' + Res.FDateTime + #13#10;
if ReplaceTag then begin
end;
Body := CustomStringReplace(Body, '</a>', '',true);
- Body := GikoSys.DeleteLink(Body);
+ Body := HTMLCreater.DeleteLink(Body);
if ReplaceTag then begin
Body := CustomStringReplace(Body, '<', '<');
Body := CustomStringReplace(Body, '>', '>');
FavoriteClick( Node );
Exit;
end;
+ //\8c»\8dÝ\95\\8e¦\82µ\82Ä\82¢\82é\82Ì\82Æ\93¯\82¶\82È\82ç\8dÄ\95`\89æ\82µ\82È\82¢
+ if ActiveList = Node.Data then
+ Exit;
ActiveListColumnSave;
if not TBoard(Node.Data).IsThreadDatRead then begin
Screen.Cursor := crHourGlass;
try
- if not TBoard(Node.Data).IsThreadDatRead then
+ if not TBoard(Node.Data).IsThreadDatRead then
GikoSys.ReadSubjectFile(Node.Data);
finally
Screen.Cursor := crDefault;
end;
end;
+ Sort.SetSortDate(Now());
SetActiveList(Node.data);
end;
if TObject( Node.Data ) is TBoard then begin // not TCategory
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if GikoSys.Setting.ListWidthState = glsMax then begin
- BrowserMinAction.Execute;
+ GikoDM.BrowserMinAction.Execute;
if GikoForm.Visible then
ListView.SetFocus;
end;
end else begin
if GikoSys.Setting.ListHeightState = glsMax then begin
- BrowserMinAction.Execute;
+ GikoDM.BrowserMinAction.Execute;
if GikoForm.Visible then
ListView.SetFocus;
end;
end;
end;
-
-procedure TGikoForm.TreeViewClick(Sender: TObject);
-begin
- TreeClick( TreeView.Selected );
-end;
-
+// *************************************************************************
+//! \83c\83\8a\81[\83r\83\85\81[\82ÌKeyDown\83C\83x\83\93\83g
+// *************************************************************************
procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
end;
end;
-
-
-// \83M\83R\83i\83r\82Ì\83\81\83b\83Z\81[\83W\83\8b\81[\83v\82ð\89¡\8eæ\82è\82µ\82Ü\82·
-procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
-//var
-// key : Word;
-begin
- case Msg.message of
- {WM_KEYDOWN:
- if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
- if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
- key := Msg.wParam;
- Handled := BrowserKeyDown( Msg, key, KeyDataToShiftState( Msg.lParam ) );
- end;
- end;}
-
- WM_XBUTTONDOWN:
- case Msg.wParam shr 16 of
- XBUTTON1:
- begin
- if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
- if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
- UpBoardAction.Execute;
- Handled := True;
- end;
- end;
- if not Handled then begin
- if IsDialogMessage( ListView.Handle, Msg ) then begin
- UpFolderAction.Execute;
- Handled := True;
- end;
- end;
- end;
- XBUTTON2:
- end;
- end;
-end;
-
+//! \82¨\8bC\82É\93ü\82è\82ÌMouseDown\83C\83x\83\93\83g
procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
favItem : TTreeNode;
favThreadItem : TFavoriteThreadItem;
+ rect: TRect;
begin
-
case Button of
mbLeft:
begin
- FMouseDownPos.X := X;
- FMouseDownPos.Y := Y;
+ if not (ssAlt in Shift) and (FavoriteTreeView.Selected <> nil) and
+ (FavoriteTreeView.Selected = FavoriteTreeView.GetNodeAt(X, Y)) then begin
+ //\83}\83E\83X\82ªnode\82Ì\8fã\82É\82¢\82é\82©
+ rect := FavoriteTreeView.Selected.DisplayRect(true);
+ // \83A\83C\83R\83\93\95ª\8d¶\82É\82¸\82ç\82·
+ if ((rect.Left - FavoriteTreeView.Indent <= X) and (rect.Right >= X)) and
+ ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin
+ if ssDouble in Shift then begin
+ FClickNode := FavoriteTreeView.Selected;
+ GikoDM.FavoriteTreeViewReloadActionExecute(Sender);
+ FClickNode := nil;
+ end else begin
+ FavoriteClick(
+ TObject(FavoriteTreeView.Selected));
+ end;
+ end;
+ end;
end;
mbMiddle:
begin
end;
end;
-
-procedure TGikoForm.TreeSelectNameCopyExecute(Sender: TObject);
-var
- s: string;
-begin
- TreeView.Selected := FClickNode;
- s := FClickNode.Text;
- Clipboard.AsText := s;
-end;
-
-procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
- Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-var
- item : TTreeNode;
- rect : TRect;
-begin
- if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
- (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
- item := FavoriteTreeView.GetNodeAt(X, Y);
- if item = FavoriteTreeView.Selected then begin
- //\83C\83\81\81[\83W\94Í\88Í\82ð\8eæ\93¾
- rect := FavoriteTreeView.Selected.DisplayRect(true);
- //\83A\83C\83R\83\93\95ª\8d¶\82É\90L\82Î\82·
- rect.Left := rect.Left - FavoriteTreeView.Images.Width;
- if ((X >= rect.Left) and (X <= rect.Right)) and
- ((Y >= rect.Top) and (Y <= rect.Bottom)) then begin
- FavoriteClick( TObject( FavoriteTreeView.Selected ) );
- end;
- end;
- end;
-end;
-
-destructor TBrowserRecord.Destroy;
-var
- doc :OleVariant;
-begin
- if Self.FEvent <> nil then
- Self.FEvent.Free;
- if Self.FBrowser <> nil then begin
- if Self.Thread <> nil then begin
- //\83^\83u\82Ì\95\9c\8c³\82Å\95\9c\8c³\82³\82ê\82½\83X\83\8c\82Í\81A\95`\89æ\82³\82ê\82Ä\82¢\82È\82¢\82Æ\82«\82ª\82 \82é\82Ì\82Å
- //\82»\82Ì\82Æ\82«\82Ì\83X\83N\83\8d\81[\83\8b\97Ê\82ð\95Û\91¶\82µ\82Ä\82µ\82Ü\82¤\82Æ\83g\83b\83v\82É\96ß\82Á\82Ä\82µ\82Ü\82¤\81B
- if Self.FBrowser.OleObject.Document.documentElement.innerText <> '' then begin
- doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
- Self.Thread.ScrollTop := doc.Body.ScrollTop;
- end;
- end;
- //TOleControl(Self.FBrowser).Visible := false;
- ShowWindow(Self.FBrowser.Handle, SW_HIDE);
- end;
-
-end;
-
+// *************************************************************************
+//! \82¨\8bC\82É\93ü\82è\83c\83\8a\81[\82Ì\83}\83E\83X\83A\83b\83v\83C\83x\83\93\83g
+// *************************************************************************
function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
var
p : TPoint;
e := IHTMLDocument2(FActiveContent.Browser.Document).elementFromPoint(p.x, p.y);
if (Assigned(e)) then begin
if (e.className = 'date') or (e.id = 'date') then begin
- AID := e.innerText;
- if AnsiPos('id', AnsiLowerCase(AID)) > 0 then begin
- AID := Copy(AID, AnsiPos('id', AnsiLowerCase(AID)) - 1, 11);
- if AnsiPos(' be:', AnsiLowerCase(AID)) > 0 then begin
- AID := Copy(AID, 1, AnsiPos(' BE:', AnsiLowerCase(AID)) - 1)
- end;
- end else begin
- stlist := TStringList.Create;
- try
- stList.DelimitedText := AID;
- AID := '';
- for i := 0 to stList.Count - 1 do
- if Length(WideString(stList[i])) = 8 then begin
- if GikoSys.NotDateorTimeString(stList[i]) then begin
- AID := stList[i];
- break;
- end;
- end;
- finally
- stList.Free;
- end;
- end;
- count := GikoSys.GetSameIDResCount(AID, FActiveContent.Thread);
- limited := false;
- if count > 20 then begin
- rc := GikoUtil.MsgBox(Handle,
- '20\8cÂ\88È\8fã\82 \82è\82Ü\82·\82ª\81A\82·\82×\82Ä\95\\8e¦\82µ\82Ü\82·\82©\81H',
- 'ID\83|\83b\83v\83A\83b\83v\8cx\8d\90',
- MB_YESNO or MB_ICONQUESTION);
- limited := rc <> ID_YES;
- end;
- body := GikoSys.GetSameIDResAnchor(AID, FActiveContent.Thread, limited);
- IDAnchorPopup(body);
- end;
- end;
- except
- end;
- except
- end;
-end;
-
-
-procedure TGikoForm.SetFocusForBrowserActionExecute(Sender: TObject);
-begin
- FActiveContent.FBrowser.SetFocus;
-end;
-//\83u\83\89\83E\83U\82ª\82 \82Á\82Ä\81ANULL\83^\83u\97p\82Ì\82È\82¯\82ê\82Î\97L\8cø\82É\82È\82éAction\82Å\8b¤\92Ê
-procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);
-begin
- if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
- (FActiveContent.Browser <> BrowserNullTab.Browser) then
- TAction(Sender).Enabled := true
- else
- TAction(Sender).Enabled := false;
-end;
-
-procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);
-begin
- if FActiveContent <> nil then
- WebBrowserClick(FActiveContent.Browser); //\88ê\89ñBrowser\82É\93\96\82Ä\82È\82¢\82Æ\93®\82©\82È\82¢\82Æ\82«\82ª\82 \82é
- ListView.SetFocus;
-
- if( ListView.Items.Count > 0 ) and (ListView.ItemFocused = nil) then
- ListView.Items.Item[0].Selected := true; //\91I\91ð\83A\83C\83e\83\80\82ª\96³\82¢\82Æ\82«\82Í\90æ\93ª\82Ì\82ð\91I\91ð\82·\82é
-
- //\83X\83N\83\8d\81[\83\8b\82³\82¹\82é
- if (ListView.ItemFocused <> nil) then begin
- ListView.ItemFocused.MakeVisible(False);
- end;
-end;
-
-procedure TGikoForm.SetFocusForCabinetActionExecute(Sender: TObject);
-begin
- if FActiveContent <> nil then
- WebBrowserClick(FActiveContent.Browser); //\88ê\89ñBrowser\82É\93\96\82Ä\82È\82¢\82Æ\93®\82©\82È\82¢\82Æ\82«\82ª\82 \82é
- if TreeView.Visible then begin
- TreeView.SetFocus;
- if(TreeView.Items.Count > 0) and ( TreeView.Selected = nil ) then
- TreeView.Items.Item[0].Selected := true;
- end else if FavoriteTreeView.Visible then begin
- FavoriteTreeView.SetFocus;
- if(FavoriteTreeView.Items.Count > 0) and (FavoriteTreeView.Selected = nil) then
- FavoriteTreeView.Items.Item[0].Selected := true;
- end;
-end;
-procedure TGikoForm.SetFocusForCabinetActionUpdate(Sender: TObject);
-begin
- SetFocusForCabinetAction.Enabled := CabinetPanel.Visible;
-end;
-
-//\83u\83\89\83E\83U\82ð\8dÅ\91å\89»\82µ\82Ä\83t\83H\81[\83J\83X\82ð\93\96\82Ä\82é\81B
-procedure TGikoForm.BrowserMaxAndFocusActionExecute(Sender: TObject);
-begin
- BrowserMaxAction.Execute;
- SetFocusForBrowserAction.Execute;
-end;
-
-//\83X\83\8c\83b\83h\88ê\97\97\82ð\8dÅ\91å\89»\82µ\82Ä\83t\83H\81[\83J\83X\82ð\93\96\82Ä\82é
-procedure TGikoForm.ThreadlistMaxAndFocusActionExecute(Sender: TObject);
-begin
- BrowserMinAction.Execute;
- SetFocusForThreadListAction.Execute;
-end;
-
-procedure TGikoForm.SelectTimerTimer(Sender: TObject);
-begin
- SelectTimer.Interval := 0;
- if not (ListView.Selected = nil) then
- if( FActiveContent = nil) or
- (GetActiveContent <> TThreadItem(ListView.Selected.Data) ) then begin
- ListClick;
- end;
-end;
-
-procedure TGikoForm.SelectItemSaveForDatExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
-begin
- List := TList.Create;
- try
- Screen.Cursor := crHourGlass;
- SelectListItem(List);
- if ((GikoSys.Setting.ListOrientation = gloVertical) and
- (GikoSys.Setting.ListHeightState = glsMax)) or
- ((GikoSys.Setting.ListOrientation = gloHorizontal) and
- (GikoSys.Setting.ListWidthState = glsMax)) then
- ShowMessage('\83X\83\8c\83b\83h\88ê\97\97\82ð\95\\8e¦\82µ\82Ä\82\82¾\82³\82¢')
- else if(List.Count = 0) then
- ShowMessage('\83X\83\8c\83b\83h\82ð\91I\91ð\82µ\82Ä\82\82¾\82³\82¢')
- else begin
- FileSaveAs1.Dialog.Title := '\91I\91ð\83X\83\8c\83b\83h\82ðdat\82Ì\82Ü\82Ü\95Û\91¶';
- FileSaveAs1.Dialog.Filter := 'DAT\83t\83@\83C\83\8b(*.dat)|*.dat';
- for i := 0 to List.Count - 1 do begin
- if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
- FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).FileName;
- if FileSaveAs1.Dialog.Execute then begin
- CopyFile(PChar(TThreadItem(List[i]).FilePath),
- PChar(FileSaveAs1.Dialog.FileName), true);
- end;
- end;
- end;
- end;
- finally
- Screen.Cursor := crDefault;
- List.Free;
- end;
-
-end;
-
-procedure TGikoForm.SelectItemSaveForHTMLExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
- html: TStringList;
- title: string;
-begin
- List := TList.Create;
- try
- Screen.Cursor := crHourGlass;
- SelectListItem(List);
- if ((GikoSys.Setting.ListOrientation = gloVertical) and
- (GikoSys.Setting.ListHeightState = glsMax)) or
- ((GikoSys.Setting.ListOrientation = gloHorizontal) and
- (GikoSys.Setting.ListWidthState = glsMax)) then
- ShowMessage('\83X\83\8c\83b\83h\88ê\97\97\82ð\95\\8e¦\82µ\82Ä\82\82¾\82³\82¢')
- else if(List.Count = 0) then
- ShowMessage('\83X\83\8c\83b\83h\82ð\91I\91ð\82µ\82Ä\82\82¾\82³\82¢')
- else begin
- FileSaveAs1.Dialog.Title := '\91I\91ð\83X\83\8c\83b\83h\82ðHTML\89»\82µ\82Ä\95Û\91¶';
- FileSaveAs1.Dialog.Filter := 'HTML\83t\83@\83C\83\8b(*.html)|*.html';
- for i := 0 to List.Count - 1 do begin
- if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
- FileSaveAs1.Dialog.FileName := ReplaseNoValidateChar(TThreadItem(List[i]).Title) + '.html';
- if FileSaveAs1.Dialog.Execute then begin
- html := TStringList.Create;
- title := TThreadItem(List[i]).Title;
- try
- HTMLCreater.CreateHTML3(html, TThreadItem(List[i]), title);
- html.SaveToFile(FileSaveAs1.Dialog.FileName);
- THTMLCreate.SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName));
- finally
- html.Free;
- end;
- end;
- end;
- end;
- end;
- finally
- Screen.Cursor := crDefault;
- List.Free;
- end;
-end;
-procedure TGikoForm.KidokuActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
-begin
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TThreadItem then begin
- if (TThreadItem(List[i]).UnRead) then begin
- TThreadItem(List[i]).UnRead := false;
- TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
- end;
- end;
- end;
- if TreeView.Visible then
- TreeView.Refresh;
- if ListView.Visible then
- ListView.Refresh;
- finally
- List.Free;
- end;
-end;
-
-procedure TGikoForm.MidokuActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
-begin
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TThreadItem then begin
- if (TThreadItem(List[i]).IsLogFile) and (not TThreadItem(List[i]).UnRead) then begin
- TThreadItem(List[i]).UnRead := true;
- TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
+ AID := e.innerText;
+ if AnsiPos('id', AnsiLowerCase(AID)) > 0 then begin
+ AID := Copy(AID, AnsiPos('id', AnsiLowerCase(AID)) - 1, 11);
+ if AnsiPos(' be:', AnsiLowerCase(AID)) > 0 then begin
+ AID := Copy(AID, 1, AnsiPos(' BE:', AnsiLowerCase(AID)) - 1)
+ end;
+ end else begin
+ stlist := TStringList.Create;
+ try
+ stList.DelimitedText := AID;
+ AID := '';
+ for i := 0 to stList.Count - 1 do
+ if Length(WideString(stList[i])) = 8 then begin
+ if GikoSys.NotDateorTimeString(stList[i]) then begin
+ AID := stList[i];
+ break;
+ end;
+ end;
+ finally
+ stList.Free;
+ end;
+ end;
+ count := GikoSys.GetSameIDResCount(AID, FActiveContent.Thread);
+ limited := false;
+ if count > 20 then begin
+ rc := GikoUtil.MsgBox(Handle,
+ '20\8cÂ\88È\8fã\82 \82è\82Ü\82·\82ª\81A\82·\82×\82Ä\95\\8e¦\82µ\82Ü\82·\82©\81H',
+ 'ID\83|\83b\83v\83A\83b\83v\8cx\8d\90',
+ MB_YESNO or MB_ICONQUESTION);
+ limited := rc <> ID_YES;
+ end;
+ body := GikoSys.GetSameIDResAnchor(AID, FActiveContent.Thread, limited);
+ FActiveContent.IDAnchorPopup(body);
end;
end;
+ except
end;
- if TreeView.Visible then
- TreeView.Refresh;
- if ListView.Visible then
- ListView.Refresh;
- finally
- List.Free;
- end;
+ except
+ end;
end;
-procedure TGikoForm.LogFolderOpenActionExecute(Sender: TObject);
-var
- List: TList;
+//\83X\83\8c\83b\83h\88ê\97\97\82ð\8dÅ\91å\89»\82µ\82Ä\83t\83H\81[\83J\83X\82ð\93\96\82Ä\82é
+procedure TGikoForm.SelectTimerTimer(Sender: TObject);
begin
- if ((GikoSys.Setting.ListOrientation = gloVertical) and
- (GikoSys.Setting.ListHeightState = glsMax)) or
- ((GikoSys.Setting.ListOrientation = gloHorizontal) and
- (GikoSys.Setting.ListWidthState = glsMax)) then begin
- if(GetActiveContent <> nil) then begin
- GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(GetActiveContent.FilePath) + '"');
- end;
- end else if GetActiveList is TCategory then begin
- List := TList.Create;
- try
- SelectListItem(List);
- GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(List[0]).FilePath) + '"');
- finally
- List.Free;
+ SelectTimer.Interval := 0;
+ if not (ListView.Selected = nil) then
+ if( FActiveContent = nil) or
+ (GetActiveContent <> TThreadItem(ListView.Selected.Data) ) then begin
+ ListClick;
end;
- end else if GetActiveList is TBoard then begin
- GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(GetActiveList).FilePath) + '"');
- end;
-
end;
function TGikoForm.GetTabURLs(AStringList: TStringList) : Boolean;
rec : TBrowserRecord;
i, bound : Integer;
begin
- bound := BrowserTab.Tabs.Count -1;
+ bound := BrowserTab.Tabs.Count -1;
if bound = -1 then begin
Result := False;
Exit; //for\82É\94ò\82Î\82È\82¢\82Å\91\80\8dì\82ð\94²\82¯\82é
- end;
-
- for i := 0 to bound do begin
- rec := TBrowserRecord( BrowserTab.Tabs.Objects[ i ] );
- if( rec <> nil) and (rec.Thread <> nil) then
- AStringList.Add( rec.Thread.URL );
- end;
- Result := True;
-end;
-
-procedure TGikoForm.TabsSaveActionExecute(Sender: TObject);
-begin
+ end;
- if not SaveTabURLs then begin
- if TabsSaveAction.Tag = 0 then
- ShowMessage('\95Û\91¶\82·\82é\83^\83u\82ª\82 \82è\82Ü\82¹\82ñ')
- else if TabsSaveAction.Tag = 1 then
- GikoForm.TabsOpenAction.Tag := -1;
+ for i := 0 to bound do begin
+ try
+ rec := TBrowserRecord( BrowserTab.Tabs.Objects[ i ] );
+ if( rec <> nil) and (rec.Thread <> nil) then
+ AStringList.Add( rec.Thread.URL );
+ except
+ end;
end;
+ Result := True;
end;
function TGikoForm.SaveTabURLs : Boolean;
SaveStringList := TStringList.Create;
try
if GetTabURLs(SaveStringList) then begin
- if FileExists( GikoSys.GetAppDir + Filename) then begin
- if FileExists( GikoSys.GetAppDir + bFilename) then
- DeleteFile(GikoSys.GetAppDir + bFilename);
+ try
+ if FileExists( GikoSys.GetAppDir + Filename) then begin
+ if FileExists( GikoSys.GetAppDir + bFilename) then
+ DeleteFile(GikoSys.GetAppDir + bFilename);
- //\83o\83b\83N\83A\83b\83v\82ð\8dì\82é\81B
- RenameFile(GikoSys.GetAppDir + Filename, GikoSys.GetAppDir + bFilename);
+ //\83o\83b\83N\83A\83b\83v\82ð\8dì\82é\81B
+ RenameFile(GikoSys.GetAppDir + Filename, GikoSys.GetAppDir + bFilename);
+ end;
+ except
end;
SaveStringList.SaveToFile(GikoSys.GetAppDir + Filename);
Result := true;
end;
end;
-procedure TGikoForm.TabsOpenActionExecute(Sender: TObject);
-begin
- if TabsOpenAction.Tag <> -1 then begin
- if not LoadTabURLs then begin
- if TabsOpenAction.Tag = 0 then
- ShowMessage('\95\\8e¦\82·\82é\83^\83u\82ª\82 \82è\82Ü\82¹\82ñ\81B');
- end;
- end;
-end;
-
function TGikoForm.LoadTabURLs : Boolean;
+const
+ TABFILE = 'tab.sav';
var
i, bound : Integer;
item : TThreadItem;
GikoTab : TGikoTabAppend;
fileName : string;
begin
- if FStartUp then begin
- //\8bN\93®\8e\9e\82É\83^\83u\8e©\93®\95\9c\8c³\82ð\93ü\82ê\82Ä\82¢\82é\82Æ\81A\8bó\83y\81[\83W\97p\82ÌBrowser\82Ì
- //\95`\89æ\82ª\8fI\82í\82Á\82Ä\82¢\82È\82\82Ä\81A\83N\83\8a\83b\83N\83C\83x\83\93\83g\82Ì\90Ý\92è\93\99\82É\93Ë\93ü\82·\82é\82Ì\82Å
- //\82±\82±\82Å\8fI\82í\82ç\82¹\82Ä\82¨\82
- while (Browser.ReadyState <> READYSTATE_COMPLETE) and
- (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
- Application.ProcessMessages;
- end;
- end;
- fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
+ fileName := ExtractFilePath(Application.ExeName) + TABFILE;
URLs := TStringList.Create();
GikoTab := GikoSys.Setting.BrowserTabAppend;
try
if item <> nil then
InsertBrowserTab( item, false );
end;
+ //\8dÅ\8f\89\82Ì\82P\96\87\82É\90Ý\92è \83A\83h\83\8c\83X\82Ì\90Ý\92è\82Ì\82½\82ß\82Ì\83J\83\89\8cÄ\82Ñ
+ if BrowserTab.Tabs.Count > 0 then begin
+ BrowserTab.OnChange(nil);
+ end;
end else
Result := False;
end else
end;
-procedure TGikoForm.OnlyAHundredResActionExecute(Sender: TObject);
-var
- FilterList : TStringList;
-begin
- if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
- and (FActiveContent.FBrowser.Busy) then Exit;
-
- FResRangeMenuSelect := 100;
- OnlyAHundredResAction.Checked := True;
-
- if GikoSys.ResRange <> 100 then begin
- GikoSys.ResRange := 100;
-
- // \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.Free;
- end;
-
- FSelectResWord := '';
- RepaintAllTabsBrowser();
- end;
-end;
-
-procedure TGikoForm.OnlyKokoResActionExecute(Sender: TObject);
-var
- FilterList : TStringList;
-begin
- if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
- and (FActiveContent.FBrowser.Busy) then Exit;
-
- FResRangeMenuSelect := Ord( grrKoko );
- OnlyKokoResAction.Checked := True;
-
- if GikoSys.ResRange <> Ord( grrKoko ) then begin
- GikoSys.ResRange := Ord( grrKoko );
-
- // \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.Free;
- end;
-
- FSelectResWord := '';
- RepaintAllTabsBrowser();
- end;
-end;
-
-procedure TGikoForm.OnlyNewResActionExecute(Sender: TObject);
-var
- FilterList : TStringList;
-begin
- if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
- and (FActiveContent.FBrowser.Busy) then Exit;
-
- FResRangeMenuSelect := Ord( grrNew );
- OnlyNewResAction.Checked := True;
-
- if GikoSys.ResRange <> Ord( grrNew ) then begin
- GikoSys.ResRange := Ord( grrNew );
-
- // \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.Free;
- end;
-
- FSelectResWord := '';
- RepaintAllTabsBrowser();
- end;
-end;
-
-procedure TGikoForm.BrowsBoradHeadActionExecute(Sender: TObject);
-var
- RefURL, URL : string;
- List : TList;
-begin
- RefURL := '';
- if GetActiveList is TCategory then begin
- List := TList.Create;
- try
- SelectListItem(List);
- RefURL := TBoard(List[0]).URL;
- finally
- List.Free;
- end;
- end else if GetActiveList is TBoard then begin
- RefURL := TBoard(GetActiveList).URL
- end;
- if RefURL <> '' then begin
- if RefURL[Length(RefURL)] <> '/' then
- URL := RefURL + '/' + 'head.txt'
- else
- URL := RefURL + 'head.txt';
-
- MoveToURL(URL);
- end else begin
- ShowMessage('\94Â\82ð\93Á\92è\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½\81B');
- end;
-
-end;
-
-//NG\83\8f\81[\83h\83t\83@\83C\83\8b\82ð\95Ò\8fW\82·\82é\82½\82ß\82É\8aJ\82
-procedure TGikoForm.EditNGActionExecute(Sender: TObject);
-begin
- GikoSys.FAbon.EditNGwords;
-end;
-
-procedure TGikoForm.ThreadRangeActionExecute(Sender: TObject);
-begin
- case GikoSys.Setting.ThreadRange of
- gtrAll: AllItemAction.Execute;
- gtrLog: LogItemAction.Execute;
- gtrNew: NewItemAction.Execute;
- end;
-end;
-
-procedure TGikoForm.TabAutoSaveActionExecute(Sender: TObject);
-begin
- SaveTabURLs;
-end;
-
-procedure TGikoForm.TabAutoLoadActionExecute(Sender: TObject);
-begin
- LoadTabURLs;
-end;
/// ListView \82Ì\83J\83\89\83\80\95\9d\82¨\82æ\82Ñ\88Ê\92u\82Ì\95Û\91¶
procedure TGikoForm.ActiveListColumnSave;
SetActiveList( FActiveList );
end;
-//\8ew\92è\82µ\82½\94Ô\8d\86\82Ì\83\8c\83X\82Éjump\82·\82éAction
-procedure TGikoForm.JumpToNumOfResActionExecute(Sender: TObject);
-var
- str: string;
- res: integer;
-begin
- str := '1';
- if( InputQuery('\8ew\92è\82µ\82½\94Ô\8d\86\82Ì\83\8c\83X\82É\94ò\82Ô', '\94Ô\8d\86\82ð\93ü\97Í\82µ\82Ä\82\82¾\82³\82¢', str) ) then begin
- str := ZenToHan(str);
- res := StrToIntDef(str, -1);
- if (res > 0) and (res <= GetActiveContent.Count) then begin
- BrowserMovement(IntToStr(res), FActiveContent);
- SetFocusForBrowserAction.Execute;
- end else if res > GetActiveContent.Count then begin
- BrowserMovement(IntToStr(GetActiveContent.Count), FActiveContent);
- SetFocusForBrowserAction.Execute;
- end;
- end;
-end;
-
-procedure TGikoForm.FavoriteTreeViewCollapseActionExecute(Sender: TObject);
-var
- node : TTreeNode;
-begin
-
- node := FavoriteTreeView.Items.GetFirstNode;
- while node <> nil do begin
- if node.HasChildren then
- node.Expanded := False;
- node := node.GetNext;
- end;
-
-end;
-procedure TGikoForm.ReleaseBrowser( BRecord: TBrowserRecord);
-begin
- if BRecord <> nil then begin
- BRecord.Browser := nil;
- if BRecord.FEvent <> nil then begin
- BRecord.FEvent.Free;
- BRecord.FEvent := nil;
- end;
- BRecord.Repaint := true;
- end;
-end;
procedure TGikoForm.OnGestureStart(Sender: TObject);
begin
if GikoSys.Setting.GestureEnabled then begin
GikoSys.Setting.Gestures.ClearGesture;
GikoSys.Setting.Gestures.LoadGesture(
- GikoSys.Setting.GetGestureFileName, ActionList );
+ GikoSys.Setting.GetGestureFileName, GikoDM.GikoFormActionList );
MouseGesture.UnHook;
MouseGesture.OnGestureStart := OnGestureStart;
MouseGesture.OnGestureMove := OnGestureMove;
CoolBarResized( Sender, BrowserCoolBar );
end;
-procedure TGikoForm.RightTabCloseActionExecute(Sender: TObject);
-var
- i: Integer;
- idx: Integer;
-begin
- idx := BrowserTab.TabIndex;
- if idx = -1 then Exit;
- BrowserTab.Tabs.BeginUpdate;
- for i := BrowserTab.Tabs.Count - 1 downto idx + 1 do begin
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
- BrowserTab.Tabs.Delete(i);
- end;
- BrowserTab.Tabs.EndUpdate;
-end;
-//\83u\83\89\83E\83U\83^\83u\82ª\82Q\82Â\88È\8fã\82 \82ê\82Î\97L\8cø\82É\82È\82é\83A\83N\83V\83\87\83\93\82Å\8b¤\92Ê\89»
-procedure TGikoForm.RightTabCloseActionUpdate(Sender: TObject);
-begin
- TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 1);
-end;
-
-procedure TGikoForm.LeftTabCloseActionExecute(Sender: TObject);
-var
- i: Integer;
- idx: Integer;
-begin
- idx := BrowserTab.TabIndex;
- if idx = -1 then Exit;
- BrowserTab.Tabs.BeginUpdate;
- if idx > 0 then begin
- for i := idx - 1 downto 0 do begin
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
- BrowserTab.Tabs.Delete(i);
- end;
- end;
- BrowserTab.Tabs.EndUpdate;
-end;
-
-procedure TGikoForm.SameIDResAnchorActionExecute(Sender: TObject);
-var
- ThreadItem : TThreadItem;
- No, count, rc : Integer;
- body : string;
- limited: boolean;
-begin
- No := KokoPopupMenu.Tag;
- if No = 0 then Exit;
- ThreadItem := GetActiveContent;
- if ThreadItem = nil then Exit;
- count := GikoSys.GetSameIDResCount(No, FActiveContent.Thread);
- limited := false;
- if count > 20 then begin
- rc := GikoUtil.MsgBox(Handle,
- '20\8cÂ\88È\8fã\82 \82è\82Ü\82·\82ª\81A\82·\82×\82Ä\95\\8e¦\82µ\82Ü\82·\82©\81H',
- 'ID\83|\83b\83v\83A\83b\83v\8cx\8d\90',
- MB_YESNO or MB_ICONQUESTION);
- limited := rc <> ID_YES;
- end;
- body := GikoSys.GetSameIDResAnchor(No, ThreadItem, limited);
- IDAnchorPopup(body);
-end;
-//ID\83A\83\93\83J\81[\92Ç\89Á
-procedure TGikoForm.IDAnchorPopup(Abody :string);
-var
- firstElement: IHTMLElement;
- document: IHTMLDocument2;
- docAll: IHTMLElementCollection;
- doc : Variant;
- nCSS : string;
-begin
- try
- document := FActiveContent.Browser.Document as IHTMLDocument2;
-
- if Assigned(document) then begin
- docAll := document.all;
- firstElement := docAll.item('idSearch', 0) as IHTMLElement;
- if (Assigned(firstElement)) then begin
- if Length(Abody) > 0 then begin
- doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
- nCSS := '<p id="idSearch" style="position:absolute;top:' + IntToStr(doc.Body.ScrollTop + 10) + 'px;right:5px;' //
- + 'background-color:window; border:outset 1px infobackground; z-index:10; overflow-y:auto; border-top:none">'
- + Abody + '</p>';
- firstElement.outerHTML := nCSS;
- firstElement.style.visibility := 'visible';
- end else begin
- firstElement.outerHTML := '<p id="idSearch"></p>';
- firstElement.style.visibility := 'hidden';
- end;
- end else if (Assigned(firstElement)) then begin
- firstElement.outerHTML := '<p id="idSearch"></p>';
- firstElement.style.visibility := 'hidden';
- end;
- end;
- except
- end;
-end;
-//\82±\82Ì\83\8c\83X\82 \82Ú\81`\82ñ
-procedure TGikoForm.IndividualAbon1ActionExecute(Sender: TObject);
-begin
- IndividualAbon(KokoPopupMenu.Tag, 1);
-end;
-//\82±\82Ì\83\8c\83X\93§\96¾\82 \82Ú\81`\82ñ
-procedure TGikoForm.IndividualAbon0ActionExecute(Sender: TObject);
-begin
- IndividualAbon(KokoPopupMenu.Tag, 0);
-end;
-
//\82±\82Ì\83\8c\83X\82 \82Ú\81`\82ñ
procedure TGikoForm.IndividualAbon(Atag, Atype : Integer);
var
finally
wordCount.Free;
ReadList.Free;
- end;
- FActiveContent.Repaint := true;
- if ThreadItem <> nil then
- InsertBrowserTab( ThreadItem, True );
-end;
-
-procedure TGikoForm.AntiIndividualAbonActionExecute(Sender: TObject);
-var
- IndividualForm :TIndividualAbonForm;
- ThreadItem : TThreadItem;
- msg : String;
- ReadList : TStringList;
- wordCount : TWordCount;
-begin
- IndividualForm := TIndividualAbonForm.Create(Self);
- try
- ThreadItem := GetActiveContent;
- ThreadItem.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
- if (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin
- if IndividualForm.SetThreadLogFileName(ThreadItem.GetThreadFileName) then begin
- ReadList := TStringList.Create;
- wordCount := TWordCount.Create;
- try
-{$IFDEF SPAM_FILTER_ENABLED}
- // \83X\83p\83\80\82ð\89ð\8f\9c
- ReadList.LoadFromFile( ThreadItem.GetThreadFileName );
- GikoSys.SpamCountWord( ReadList[ KokoPopupMenu.Tag - 1 ], wordCount );
- GikoSys.SpamForget( wordCount, True ); // \83X\83p\83\80\82ð\89ð\8f\9c
- GikoSys.SpamLearn( wordCount, False ); // \83n\83\80\82É\90Ý\92è
-{$ENDIF}
- if IndividualForm.DeleteNG(KokoPopupMenu.Tag) then begin
- FActiveContent.Repaint := true;
- InsertBrowserTab( ThreadItem, True );
- end;
- finally
- wordCount.Free;
- ReadList.Free;
- end;
- end else begin
- msg := '\82±\82Ì\83X\83\8c\83b\83h\82Å\82Í\8cÂ\95Ê\82 \82Ú\81`\82ñ\82ð\8ds\82Á\82Ä\82Ü\82¹\82ñ';
- MsgBox(Handle, msg, '\83\81\83b\83Z\81[\83W', MB_OK);
- end;
- end;
- finally
- IndividualForm.Release;
- end;
-end;
-
-procedure TGikoForm.AntiIndividualAbonDlgActionExecute(Sender: TObject);
-var
- IndividualForm :TIndividualAbonForm;
- ThreadItem : TThreadItem;
- msg : String;
- ReadList : TStringList;
- wordCount : TWordCount;
-{$IFDEF SPAM_FILTER_ENABLED}
- i : Integer;
-{$ENDIF}
-begin
- IndividualForm := TIndividualAbonForm.Create(Self);
- try
- ThreadItem := GetActiveContent;
- ThreadItem.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
- if (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin
- if IndividualForm.SetThreadLogFileName(ThreadItem.GetThreadFileName) then begin
- if (IndividualForm.ShowModal = mrOK) then begin
- ReadList := TStringList.Create;
- wordCount := TWordCount.Create;
- try
-{$IFDEF SPAM_FILTER_ENABLED}
- // \83X\83p\83\80\82ð\89ð\8f\9c
- ReadList.LoadFromFile( ThreadItem.GetThreadFileName );
- for i := 0 to IndividualForm.DeleteList.Count - 1 do begin
- GikoSys.SpamCountWord( ReadList[ StrToInt(IndividualForm.DeleteList[i]) - 1 ], wordCount );
- GikoSys.SpamForget( wordCount, True ); // \83X\83p\83\80\82ð\89ð\8f\9c
- GikoSys.SpamLearn( wordCount, False ); // \83n\83\80\82É\90Ý\92è
- end;
-{$ENDIF}
- if IndividualForm.FRepaint then begin
- FActiveContent.Repaint := true;
- InsertBrowserTab( ThreadItem, True );
- end;
- finally
- wordCount.Free;
- ReadList.Free;
- end;
- end;
- end else begin
- msg := '\82±\82Ì\83X\83\8c\83b\83h\82Å\82Í\8cÂ\95Ê\82 \82Ú\81`\82ñ\82ð\8ds\82Á\82Ä\82Ü\82¹\82ñ';
- MsgBox(Handle, msg, '\83\81\83b\83Z\81[\83W', MB_OK);
- end;
- end;
- finally
- IndividualForm.Release;
- end;
-end;
-
-procedure TGikoForm.IndividualAbonID1ActionExecute(Sender: TObject);
-begin
- IndividualAbonID(1);
+ end;
+ FActiveContent.Repaint := true;
+ if ThreadItem <> nil then
+ InsertBrowserTab( ThreadItem, True );
end;
-procedure TGikoForm.IndividualAbonID0ActionExecute(Sender: TObject);
-begin
- IndividualAbonID(0);
-end;
//\93¯\88êID\82Ì\82 \82Ú\81`\82ñ
procedure TGikoForm.IndividualAbonID(Atype : Integer);
var
end;
-procedure TGikoForm.MuteActionExecute(Sender: TObject);
-begin
- GikoSys.Setting.Mute := not GikoSys.Setting.Mute;
-end;
-
-procedure TGikoForm.SortActiveColumnActionExecute(Sender: TObject);
-var
- i : Integer;
-begin
- for i := 0 to ListView.Columns.Count - 1 do begin
- if (ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or
- (ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT2) then begin
- FSortOrder := not FSortOrder;
- TListViewUtils.ListViewSort( nil, ListView, ListView.Column[ i ], ListNumberVisibleAction.Checked, FSortOrder, FSortIndex );
- break;
- end;
- end;
-end;
-
-procedure TGikoForm.SortNextColumnActionExecute(Sender: TObject);
-var
- i, id : Integer;
-begin
- for i := 0 to ListView.Columns.Count - 1 do begin
- if (ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or
- (ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT2) then begin
- id := i + 1;
- if id > ListView.Columns.Count - 1 then
- id := 0;
- FSortOrder := id = 0;
- TListViewUtils.ListViewSort( nil, ListView, ListView.Column[ id ], ListNumberVisibleAction.Checked, FSortOrder, FSortIndex );
- break;
- end;
- end;
-
-end;
-procedure TGikoForm.SortPrevColumnActionExecute(Sender: TObject);
-var
- i, id : Integer;
-begin
- for i := 0 to ListView.Columns.Count - 1 do begin
- if (ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or
- (ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT2) then begin
- id := i - 1;
- if id < 0 then
- id := ListView.Columns.Count - 1;
- FSortOrder := id = 0;
- TListViewUtils.ListViewSort( nil, ListView, ListView.Column[ id ], ListNumberVisibleAction.Checked, FSortOrder, FSortIndex );
- break;
- end;
- end;
-
-end;
-
procedure TGikoForm.RepaintAllTabsBrowser();
var
i : Integer;
end;
-procedure TGikoForm.BeLogInOutActionExecute(Sender: TObject);
-begin
- GikoSys.Setting.BeLogin := not GikoSys.Setting.BeLogin;
-end;
-
-procedure TGikoForm.BeLogInOutActionUpdate(Sender: TObject);
-begin
- if (GikoSys.Setting.BeUserID <> '') and (GikoSys.Setting.BeCode <> '') then begin
- if (GikoSys.Setting.BeLogin) then BeLogInOutAction.Checked := true
- else BeLogInOutAction.Checked := false;
- BeLogInOutAction.Enabled := true
- end else
- BeLogInOutAction.Enabled := false;
-
-end;
//ListView\82Ì\91I\91ð\8fó\91Ô\82ð\89ð\8f\9c\82·\82é
-procedure TGikoForm.UnSelectedListViewActionExecute(Sender: TObject);
-begin
- if ListView.Selected <> nil then begin
- ListView.Selected.Focused := True;
- ListView.Selected := nil;
- end;
-end;
-
procedure TGikoForm.ListViewKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
end;
end;
end;
-//TAction\82ÅGetActiveContent\82ªnil\88È\8aO\82Å\97L\8cø\82É\82È\82é
-procedure TGikoForm.DependActiveCntentActionUpdate(Sender: TObject);
+// *************************************************************************
+//! \82¨\8bC\82É\93ü\82è\82Ì\95Ò\8fW\8aJ\8en\83C\83x\83\93\83g
+// *************************************************************************
+procedure TGikoForm.FavoriteTreeViewEditing(Sender: TObject;
+ Node: TTreeNode; var AllowEdit: Boolean);
+begin
+ //\95Ò\8fW\91O\82Ì\95¶\8e\9a\97ñ\82ð\88ê\8e\9e\95Û\91¶\82·\82é
+ FOrigenCaption := Node.Text;
+end;
+// *************************************************************************
+//! Application\82ÌMainForm\82ð\8eæ\93¾\82·\82é
+// *************************************************************************
+function TGikoForm.GetMainForm(): TComponent;
begin
- TAction(Sender).Enabled := (GetActiveContent <> nil);
+ Result := Application.MainForm;
end;
-//TAction\82ÅGetActiveContent\82ªnil\88È\8aO\82©\82Â\83\8d\83O\82ð\8e\9d\82Á\82Ä\82¢\82é
-procedure TGikoForm.DependActiveCntentLogActionUpdate(Sender: TObject);
+// *************************************************************************
+//! \8c»\8dÝ\82Ì\83J\81[\83\\83\8b\82ð\8eæ\93¾\82·\82é
+// *************************************************************************
+function TGikoForm.GetScreenCursor(): TCursor;
begin
- TAction(Sender).Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
+ Result := Screen.Cursor;
end;
-//TAction\82ÅActiveList\82ªTBoard\82Å\97L\8cø\82É\82È\82é
-procedure TGikoForm.DependActiveListTBoardActionUpdate(Sender: TObject);
+// *************************************************************************
+//! \83J\81[\83\\83\8b\82ð\90Ý\92è\82·\82é
+// *************************************************************************
+procedure TGikoForm.SetScreenCursor(Cursor : TCursor);
begin
- TAction(Sender).Enabled := (GetActiveList is TBoard);
+ if (Screen.Cursor <> Cursor) then
+ Screen.Cursor := Cursor;
end;
-
-procedure TGikoForm.FavoriteTreeViewEditing(Sender: TObject;
- Node: TTreeNode; var AllowEdit: Boolean);
+// *************************************************************************
+//! \83X\83N\83\8a\81[\83\93\8fã\82ÉEditorForm\82ª\82¢\82é\82©
+// *************************************************************************
+function TGikoForm.EditorFormExists(): boolean;
+var
+ i : Integer;
begin
- //\95Ò\8fW\91O\82Ì\95¶\8e\9a\97ñ\82ð\88ê\8e\9e\95Û\91¶\82·\82é
- FOrigenCaption := Node.Text;
+ Result := false;
+ //\83X\83N\83\8a\81[\83\93\8fã\82Ì\91S\82Ä\82Ì\83t\83H\81[\83\80\82©\82ç\81AEditorForm\82ð\92T\82·
+ for i := 0 to Screen.CustomFormCount - 1 do begin
+ if TObject(Screen.CustomForms[i]) is TEditorForm then begin
+ Result := true;
+ Break;
+ end;
+ end;
+end;
+// *************************************************************************
+//! \83X\83N\83\8a\81[\83\93\8fã\82É\82¢\82é\82·\82×\82Ä\82ÌEditorForm\82©\82ç\96¼\91O\82Ì\97\9a\97ð\82ð\8dí\8f\9c\82·\82é
+// *************************************************************************
+procedure TGikoForm.AllEditroFormNameTextClearClear();
+var
+ i : Integer;
+begin
+ for i := 0 to Screen.CustomFormCount - 1 do begin
+ if TObject(Screen.CustomForms[i]) is TEditorForm then
+ TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
+ end;
+end;
+// *************************************************************************
+//! \83X\83N\83\8a\81[\83\93\8fã\82É\82¢\82é\82·\82×\82Ä\82ÌEditorForm\82©\82ç\83\81\81[\83\8b\97\9a\97ð\82ð\8dí\8f\9c\82·\82é
+// *************************************************************************
+procedure TGikoForm.AllEditroFormMailTextClearClear();
+var
+ i : Integer;
+begin
+ for i := 0 to Screen.CustomFormCount - 1 do begin
+ if TObject(Screen.CustomForms[i]) is TEditorForm then
+ TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
+ end;
+end;
+// *************************************************************************
+//! \83L\83\83\83r\83l\83b\83g\82ð\95Â\82¶\82é\81~\83{\83^\83\93\82Ì\83N\83\8a\83b\83N\83C\83x\83\93\83g
+// *************************************************************************
+procedure TGikoForm.CabinetCloseSpeedButtonClick(Sender: TObject);
+begin
+ //Action\82Å\90Ý\92è\82·\82é\82Æ\83L\83\83\83v\83V\83\87\83\93\82ª\8fÁ\82¹\82È\82¢\82Ì\82Å\81AOnClick\83C\83x\83\93\83g\82Å\82Ì
+ //\8cÄ\82Ñ\8fo\82µ\82É\82µ\82½\81@by \82à\82¶\82ã
+ if GikoDM.CabinetVisibleAction.Enabled then begin
+ GikoDM.CabinetVisibleAction.Execute;
+ end;
+end;
+// *************************************************************************
+//! \82¨\8bC\82É\93ü\82è\83L\83\83\83r\83l\83b\83g\82Ì\90®\97\9d\83{\83^\83\93\82Ì\83N\83\8a\83b\83N\83C\83x\83\93\83g
+// *************************************************************************
+procedure TGikoForm.FavoriteArrangeToolButtonClick(Sender: TObject);
+begin
+ if GikoDM.FavoriteArrangeAction.Enabled then begin
+ GikoDM.FavoriteArrangeAction.Execute;
+ end;
+end;
+// *************************************************************************
+//! \83M\83R\83i\83r\82Ì\83\81\83b\83Z\81[\83W\83n\83\93\83h\83\8a\83\93\83O (\92\8d\88Ó\81j\8f\88\97\9d\97Ê\82É\92\8d\88Ó\81I
+// *************************************************************************
+procedure TGikoForm.GikoApplicationEventsMessage(var Msg: tagMSG;
+ var Handled: Boolean);
+var
+ wmMsg: TWMKey;
+begin
+ //GikoForm\82ª\83A\83N\83e\83B\83u\82È\82Æ\82«\82¾\82¯\8eó\82¯\8eæ\82é \91¼\82Ì\83t\83H\81[\83\80\82Ì\82ð\89¡\8eæ\82è\82µ\82È\82¢\82½\82ß
+ if Self.Active then begin
+ case Msg.message of
+ //\83L\81[\93ü\97Í\82·\82×\82Ä
+ WM_KEYFIRST..WM_KEYLAST :
+ begin
+ //\83L\81[\83A\83b\83v\82Í\96³\8e\8b\82·\82é\81@KeyDown\82Æ\8d\87\82í\82¹\82Ä\82Q\89ñ\8cÄ\82Î\82ê\82é\82©\82ç
+ if (Msg.message <> WM_KEYUP) and (Msg.message <> WM_CHAR) then begin
+ wmMsg.Msg := Msg.message;
+ wmMsg.CharCode := Word(Msg.wParam);
+ wmMsg.KeyData := Msg.lParam;
+ //\83t\83H\81[\83\80\82Ì\83V\83\87\81[\83g\83J\83b\83g\82Ì\8f\88\97\9d\82É\93]\91\97
+ Self.OnShortCut(wmMsg, Handled);
+ end;
+ end;
+ end;
+ end;
+end;
+// *************************************************************************
+//! \83A\83v\83\8a\83P\81[\83V\83\87\83\93\82ª\83A\83N\83e\83B\83u\82Å\82È\82\82È\82Á\82½\82Æ\82«\82Ì\83C\83x\83\93\83g
+// *************************************************************************
+procedure TGikoForm.GikoApplicationEventsDeactivate(Sender: TObject);
+begin
+ Application.ProcessMessages;
+ if not Application.Terminated then begin
+ if PreviewTimer.Enabled then
+ PreviewTimer.Enabled := False;
+ //\83t\83H\81[\83J\83X\82ª\91¼\82Ì\83A\83v\83\8a\82É\95Ï\82í\82Á\82½\82Æ\82«\82É\83q\83\93\83g\82ð\8fÁ\8b\8e
+ if FHint <> nil then begin
+ FHint.ReleaseHandle;
+ FHint.ClearAllRes;
+ end;
+ //\83v\83\8c\83r\83\85\81[\82ð\89B\82·
+ if FPreviewBrowser <> nil then
+ ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
+ end;
+
end;
-//\97á\8aO\8f\88\97\9d\82³\82ê\82È\82©\82Á\82½\97á\8aO\82ð\8f\88\97\9d\82·\82é
-procedure TGikoForm.AppException(Sender: TObject; E: Exception);
+// *************************************************************************
+//! \83A\83v\83\8a\83P\81[\83V\83\87\83\93\82ª\8f\88\97\9d\82³\82ê\82È\82¢\97á\8aO\82ð\8fE\82Á\82½\82Æ\82«\82Ì\83C\83x\83\93\83g
+// *************************************************************************
+procedure TGikoForm.GikoApplicationEventsException(Sender: TObject;
+ E: Exception);
var
s : String;
begin
s := s + E.Message;
MsgBox(Handle, s, '\8f\88\97\9d\82³\82ê\82È\82©\82Á\82½\97á\8aO', MB_OK or MB_ICONSTOP);
end;
+// *************************************************************************
+//! \83_\83E\83\93\83\8d\81[\83h\83R\83\93\83g\83\8d\81[\83\8b\83X\83\8c\83b\83h\82Ì\90¶\90¬
+// *************************************************************************
+procedure TGikoForm.CreateControlThread();
+begin
+ //\83_\83E\83\93\83\8d\81[\83h\83I\83u\83W\83F\83N\83g
+ FControlThread := TThreadControl.Create(True);
+ FControlThread.MaxThreadCount := 1;
+ FControlThread.Resume;
+ FControlThread.OnDownloadEnd := DownloadEnd;
+ FControlThread.OnDownloadMsg := DownloadMsg;
+ FControlThread.OnWork := Work;
+ FControlThread.OnWorkBegin := WorkBegin;
+ FControlThread.OnWorkEnd := WorkEnd;
+end;
+// *************************************************************************
+//! \83u\83\89\83E\83U\82Ì\90¶\90¬
+// *************************************************************************
+procedure TGikoForm.CreateBrowsers(count: Integer);
+var
+ i: Integer;
+ newBrowser: TWebBrowser;
+begin
+ BrowserNullTab := TBrowserRecord.Create;
+ BrowserNullTab.Browser := Browser;
+ BrowserNullTab.Browser.Navigate(BLANK_HTML);
+ FBrowsers := TList.Create;
+ for i := 0 to count -1 do begin
+ FBrowsers.Add(TWebBrowser.Create(BrowserPanel));
+ newBrowser := FBrowsers[FBrowsers.Count - 1];
+ TOleControl(newBrowser).Parent := BrowserPanel;
+ TOleControl(newBrowser).Align := alNone;
+ TOleControl(newBrowser).Left := 0;
+ TOleControl(newBrowser).Top := 0;
+ newBrowser.RegisterAsDropTarget := False;
+ newBrowser.OnDocumentComplete := BrowserDocumentComplete;
+ newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
+ newBrowser.OnEnter := BrowserEnter;
+ newBrowser.OnNewWindow2 := BrowserNewWindow2;
+ newBrowser.OnStatusTextChange := BrowserStatusTextChange;
+ newBrowser.Navigate(BLANK_HTML);
+ ShowWindow(newBrowser.Handle, SW_HIDE);
+ end;
+ BrowserNullTab.Browser.BringToFront;
+ ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
+ //\8bN\93®\8e\9e\82É\83^\83u\8e©\93®\95\9c\8c³\82ð\93ü\82ê\82Ä\82¢\82é\82Æ\81A\8bó\83y\81[\83W\97p\82ÌBrowser\82Ì
+ //\95`\89æ\82ª\8fI\82í\82Á\82Ä\82¢\82È\82\82Ä\81A\83N\83\8a\83b\83N\83C\83x\83\93\83g\82Ì\90Ý\92è\93\99\82É\93Ë\93ü\82·\82é\82Ì\82Å
+ //\82±\82±\82Å\8fI\82í\82ç\82¹\82Ä\82¨\82
+ while (Browser.ReadyState <> READYSTATE_COMPLETE) and
+ (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
+ Application.ProcessMessages;
+ end;
+end;
+// *************************************************************************
+//! \83c\81[\83\8b\83o\81[\82É\83X\83\8c\8di\8d\9e\82Ý\83R\83\93\83{\83{\83b\83N\83X\82ð\90Ý\92è\82·\82é
+// *************************************************************************
+procedure TGikoForm.SetSelectComboBox();
+const
+ DUMMYCOMPNAME = 'SelectComboBoxDummy';
+var
+ i: Integer;
+ ToolButton: TToolButton;
+begin
+ //ListToolBar\82É\82¢\82é\82©\82à\82µ\82ê\82È\82¢\8di\8d\9e\82ÝComboBox\82ð\94z\92u
+ SelectComboBoxPanel.Visible := False;
+ try
+ for i := ListToolBar.ControlCount - 1 downto 0 do
+ begin
+ if ListToolBar.Controls[ i ].Action = GikoDM.SelectItemAction then
+ begin
+ SelectComboBoxPanel.Left := ListToolBar.Controls[ i ].Left;
+ SelectComboBoxPanel.Width := GikoSys.Setting.SelectComboBoxWidth;
+ SelectComboBoxPanel.Parent := ListToolBar;
+ SelectComboBoxPanel.Visible := True;
+
+ SelectComboBox.Left := 0;
+ SelectComboBox.Top := 0;
+ SelectComboBox.Height := SelectComboBoxPanel.ClientHeight;
+ SelectComboBox.Width := SelectComboBoxPanel.Width -
+ SelectComboBoxSplitter.Width;
+
+ //\88ê\82Â\8c©\82¦\82È\82¢\83{\83^\83\93\82ð\93Ë\82Á\8d\9e\82Þ
+ ToolButton := TToolButton(ListToolBar.FindComponent(DUMMYCOMPNAME));
+ if ToolButton = nil then begin
+ ToolButton := TToolButton.Create(ListToolBar);
+ ToolButton.Name := DUMMYCOMPNAME;
+ end;
+ ToolButton.Style := tbsSeparator;
+ ToolButton.Width := 0;
+ ToolButton.Left := ListToolBar.Controls[ i ].Left;
+ ListToolBar.InsertControl(ToolButton);
+ ToolButton.Visible := False;
+
+ // \83X\83\8c\83b\83h\8di\8d\9e\82Ì\97×\82É\83Z\83p\83\8c\81[\83^\82ª\82 \82é\8fê\8d\87\82Í\89B\82·
+ if (i + 1) < ListToolBar.ControlCount then
+ if ListToolBar.Controls[ i + 1 ] is TToolButton then
+ if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
+ ListToolBar.Controls[ i + 1 ].Visible := False;
+
+
+ // \83X\83\8c\83b\83h\8di\8d\9e\83{\83^\83\93\82ð\89B\82·
+ ListToolBar.Controls[ i ].Visible := False;
+
+ break;
+ end;
+ end;
+ except
+ end;
+end;
+//! \83L\83\83\83r\83l\83b\83g\82Ì\83}\83E\83X\83_\83E\83\93\83C\83x\83\93\83g
+procedure TGikoForm.TreeViewMouseDown(Sender: TObject;
+ Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+var
+ rect : TRect;
+begin
+ case Button of
+ mbLeft:
+ begin
+ if (TreeView.Selected <> nil) and
+ (TreeView.Selected = TreeView.GetNodeAt(X, Y)) then begin
+ //\83}\83E\83X\82ªnode\82Ì\8fã\82É\82¢\82é\82©
+ rect := TreeView.Selected.DisplayRect(true);
+ // \83A\83C\83R\83\93\95ª\82¾\82¯\8d¶\82É\82¸\82ç\82·
+ if ((rect.Left - TreeView.Indent <= X) and (rect.Right >= X)) and
+ ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin
+ // \83N\83\8a\83b\83N\82Æ\83_\83u\83\8b\83N\83\8a\83b\83N\82ð\83R\83R\82Å\94»\92è
+ if ssDouble in Shift then begin
+ TreeDoubleClick( TreeView.Selected );
+ end else begin
+ TreeClick(TreeView.Selected);
+ end;
+ end;
+ end;
+ end;
+ end;
+end;
+//! ActionList\82ÌGroupIndex\82Ì\95Û\91¶
+procedure TGikoForm.GetGroupIndex(ActionList: TActionList);
+var
+ i: Integer;
+begin
+ if ActionList <> nil then begin
+ SetLength(FActionListGroupIndexes, ActionList.ActionCount);
+
+ for i := 0 to ActionList.ActionCount - 1 do begin
+ try
+ FActionListGroupIndexes[i] :=
+ TCustomAction(ActionList.Actions[i]).GroupIndex;
+ TCustomAction(ActionList.Actions[i]).GroupIndex
+ := 0;
+ except
+ ;//Cast\82Å\82«\82È\82¢\82Æ\82«\91Î\8dô
+ end;
+ end;
-procedure TGikoForm.WikiFAQWebPageActionExecute(Sender: TObject);
+ end;
+end;
+//! ActionList\82ÌGroupIndex\82Ì\90Ý\92è
+procedure TGikoForm.SetGroupIndex(ActionList: TActionList);
+var
+ i: Integer;
+begin
+ if ActionList <> nil then begin
+ if Length( FActionListGroupIndexes ) = ActionList.ActionCount then begin
+ for i := 0 to ActionList.ActionCount - 1 do begin
+ try
+ TCustomAction(ActionList.Actions[i]).GroupIndex
+ := FActionListGroupIndexes[i];
+ except
+ ;//Cast\82Å\82«\82È\82¢\82Æ\82«\91Î\8dô
+ end;
+ end;
+ end;
+ end;
+end;
+//! \82±\82Ì\83\8c\83X\82ÌURL\8eæ\93¾
+procedure TGikoForm.GetResURLMenuClick(Sender: TObject);
begin
- GikoSys.OpenBrowser(URL_Wiki, gbtAuto);
+;
+end;
+//! ListView\81i\83X\83\8c\83b\83h\88ê\97\97\81j\82ð\8dX\90V\82·\82é
+procedure TGikoForm.RefreshListView(Thread: TThreadItem);
+begin
+ //Thread\82Ì\94Â\82Æ\95\\8e¦\82µ\82Ä\82¢\82é\94Â\82ª\93¯\82¶\82È\82ç\95`\89æ\82ð\8dX\90V\82·\82é
+ if (FActiveList is TBoard) and (TBoard(ActiveList) = Thread.ParentBoard) then begin
+ ListView.Refresh;
+ end;
end;
initialization