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, MoveHistoryItem,
+ ShellAPI,Preview;
+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;
+ GikoApplicationEvents: TApplicationEvents;
+ N22: TMenuItem;
+ N42: TMenuItem;
+ DAT2: TMenuItem;
+ N75: TMenuItem;
+ DAT3: TMenuItem;
+ N76: TMenuItem;
+ FavoriteTreeItemNameCopyPopupMenu: TMenuItem;
+ N77: TMenuItem;
+ N78: TMenuItem;
+ SaveThreadFile: TMenuItem;
+ N79: TMenuItem;
+ HTML1: TMenuItem;
+ DAT4: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
- procedure CabinetPanelHide(Sender: TObject);
- procedure ListViewData(Sender: TObject; Item: TListItem);
- procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
- const FindString: String; const FindPosition: TPoint;
- FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
- Wrap: Boolean; var Index: Integer);
- procedure ListViewDataHint(Sender: TObject; StartIndex,
- EndIndex: Integer);
- procedure ListViewDataStateChange(Sender: TObject; StartIndex,
- EndIndex: Integer; OldState, NewState: TItemStates);
procedure BrowserStatusTextChange(Sender: TObject;
const Text: WideString);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure ListViewKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
- procedure ListViewSort(Sender: TObject; Column: TListColumn);
procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
Button: TToolButton; State: TCustomDrawState;
var DefaultDraw: Boolean);
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 ToolButton19Click(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 MainCoolBarContextPopup(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 MessageListViewAdvancedCustomDrawItem(
- Sender: TCustomListView; Item: TListItem; State: TCustomDrawState;
- Stage: TCustomDrawStage; var DefaultDraw: Boolean);
- 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 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);
+ procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
+ var Handled: Boolean);
private
{ Private \90é\8c¾ }
- FSortIndex: Integer;
- FSortOrder: Boolean;
-
FEnabledCloseButton: Boolean;
-// ThreadCreate: TThreadCreate;
-
FClickNode: TTreeNode;
FHttpState: Boolean;
FHint: TResPopup;
- FPreviewBrowser: TWebBrowser;
+ FPreviewBrowser: TPreviewBrowser;
FPreviewURL: string;
-
FBrowserSizeHeight: Integer;
FBrowserSizeWidth: Integer;
-
-// FFavorite: TFavorite;
FTabHintIndex: Integer;
FListStyle: TViewStyle; //\83\8a\83X\83g\83A\83C\83R\83\93\83X\83^\83C\83\8b
FItemNoVisible: Boolean; //\83\8a\83X\83g\94Ô\8d\86\95\\8e¦\83t\83\89\83O
FWorkCount: Integer;
FNameCookie: string;
FMailCookie: string;
-// FLastRoundTime: TDateTime;
- BrowserNullTab: TBrowserRecord;
-// DoubleClickOccurred: array [TMouseButton] of Boolean;
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
-
- // Fkeynum : Integer; //\83L\81[\83{\81[\83h\83\8c\83X\83|\83b\83v\83A\83b\83v\97p
-
IsDraggingSelectComboBox : Boolean;
DraggingSelectComboBoxPosition : TPoint;
-
FSearchDialog: TSearchDialog;
-
FDropSpaceNode: TTreeNode;
-
FDragTime : Cardinal; ///< \83\8a\83\93\83N\82ÌD&D\97p
FDragButton : TToolButton; ///< \83\8a\83\93\83N\82ÌD&D\97p\82ÉDrag\82µ\82Ä\82éButton\95Û\91¶
FDragWFirst : Boolean; ///< WebTab\82ÌD&D\97p
-
FListViewBackGroundColor : TColor; ///< ListView\82ÌBackGroundColor
FUseOddResOddColor : Boolean; ///< \8eæ\93¾\83\8c\83X\90\94\82Æ\83X\83\8c\83b\83h\82Ì\83\8c\83X\90\94\82ª\88á\82Á\82½\82Æ\82«\82É\91¼\82Ì\90F\82Å\95\\8e¦
FOddColor : TColor; ///< \82»\82Ì\90F
-
FSelectResWord : string; ///< \83\8c\83X\8di\8d\9e\83\8f\81[\83h
FIsIgnoreResize : TResizeType; ///< \83\8a\83T\83C\83Y\83C\83x\83\93\83g\82ð\96³\8e\8b\82·\82é\82©\82Ç\82¤\82©
FIsMinimize : TMinimizeType; ///< \8dÅ\8f¬\89»\82µ\82Ä\82¢\82é\8dÅ\92\86\82©
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ñ
- procedure SetBoardTreeNode( inBBS : TBBS );
- function SetCategoryListItem(ABBS2ch: TBBS): Integer;
- function SetBoardListItem(Category: TCategory): Integer;
- function SetThreadListItem(Board: TBoard): Integer;
-// function GetRoundName(index: integer): string;
+ 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 WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
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 SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
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;
- procedure SkinorCSSFilesCopy(path: string);
- /// \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 );
- /// ListView \82Ì Column \82ð\90^\82Ì\83J\83\89\83\80\82É\95Ï\8a·
- function ActiveListTrueColumn( column : TListColumn ) : TListColumn;
/// 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();
- //\83\8a\83\93\83N\82Ì\95¶\8e\9a\97ñ\82©\82ç\83\8c\83X\83|\83b\83v\83A\83b\83v\97p\82ÌURL\82É\95Ï\8a·\82·\82é
- function GetRespopupURL(AText, AThreadURL : string): string;
+ //\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;
+ //! \83^\83X\83N\83g\83\8c\83C\82Ì\83A\83C\83R\83\93\8dí\8f\9c\81\95\83t\83H\81[\83\80\95\\8e¦
+ procedure UnStoredTaskTray;
+ //! \83\8c\83X\83G\83f\83B\83^\82Ì\95\\8e¦\94ñ\95\\8e¦
+ procedure ShowEditors(nCmdShow: Integer);
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;
+ FIconData : TNotifyIconData;
procedure MoveToURL(const inURL: string);
- function InsertBrowserTab(
- ThreadItem : TThreadItem;
- ActiveTab : Boolean = True
- ) : TBrowserRecord;
+ function InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True) : TBrowserRecord;
procedure ReloadBBS;
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 \83X\83\8c\83b\83h\8ew\92è
+ procedure DeleteTab(ThreadItem: TThreadItem); overload;
+ //\83^\83u\82ð\8dí\8f\9c \83u\83\89\83E\83U\83\8c\83R\81[\83h\81i\83^\83u\81j\8ew\92è
+ procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
+ // \83^\83u\8dí\8f\9c\81i\8eÀ\91\95\95\94\81j
+ procedure DeleteTab(index, selectIndex: Integer); 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 );
+ //ListView\82Å\91I\91ð\82³\82ê\82Ä\82¢\82é\83A\83C\83e\83\80\82ð\8eæ\93¾\82·\82é
+ procedure SelectListItem(List: TList);
+ //\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();
+
+ //! \83^\83X\83N\83g\83\8c\83C\82É\8ai\94[\82µ\82½\83A\83C\83R\83\93\82ð\83N\83\8a\83b\83N\82µ\82½\82Æ\82«\82Ì\8f\88\97\9d
+ procedure TaskTrayIconMessage(var Msg : TMsg); message WM_USER + 2010;
+ //! \83^\83X\83N\83g\83\8c\83C\82É\83A\83C\83R\83\93\93o\98^\81\95\83t\83H\81[\83\80\89B\82µ
+ procedure StoredTaskTray;
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, ToolBarUtil, ToolBarSetting,
+ GikoXMLDoc, RoundName, IniFiles, FavoriteAdd,
+ FavoriteArrange, AddressHistory, Gesture,
About, Option, Round, Splash, Sort, ListSelect, Imm,
NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter,
- HTMLCreate;
+ HTMLCreate, ListViewUtils, GikoDataModule, GikoMessage,
+ InputAssistDataModule, Types;
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_2CH1 = 0; //2ch\83A\83C\83R\83\93
- ITEM_ICON_2CH2 = 1; //2ch\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
+ USER_TASKTRAY = WM_USER + 2010;
{$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);
+ FIconData.uID := 0;
+
//\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;
+
// \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;
dummy1.Hint := ItemReservPMenu.Hint;
- //Samba24\82Ì\83t\83@\83C\83\8b\83`\83F\83b\83N
- GikoSys.SambaFileExists();
-
{$IFDEF SPAM_FILTER_ENABLED}
// \83X\83p\83\80\83t\83B\83\8b\83^\8aw\8fK\97\9a\97ð
GikoSys.Bayesian.LoadFromFile( GikoSys.Setting.GetSpamFilterFileName );
// \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);
-end;
-// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91¶
+ //\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¶
procedure TGikoForm.SaveCoolBarSettings;
begin
end;
end;
-
-//
-//
//
procedure TGikoForm.FormShow(Sender: TObject);
begin
//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.TabsOpenAction.Tag := 1;
+ GikoDM.TabsOpenAction.Execute;
+ GikoDM.TabsOpenAction.Tag := 0;
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;
+
+ //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.TabsSaveAction.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
- if GikoSys.Setting.Gengo <> nil then begin
- GikoSys.Setting.Gengo.Free;
- end;
- }
- //Application.HookMainWindow(Hook);
+
+ //\83X\83N\83\8a\81[\83\93\8fã\82Ì\91S\82Ä\82Ì\83t\83H\81[\83\80\82©\82ç\81AEditorForm\82ð\95Â\82¶\82é
+ GikoDM.CloseAllEditorAction.Execute;
+
Application.UnhookMainWindow(Hook);
Application.Terminate;
end;
wp : TWindowPlacement;
tmpBool : Boolean;
begin
-// Application.OnDeactivate := nil;
-// Self.OnDeactivate := nil;
// \83}\83E\83X\83W\83F\83X\83`\83\83\81[\8aJ\95ú
try
MouseGesture.UnHook;
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;
finally
FControlThread.Free;
end;
+ // \83v\83\89\83O\83C\83\93\82É\82æ\82Á\82Ä\92Ç\89Á\82³\82ê\82½\83\81\83j\83\85\81[\82ð\8aJ\95ú\82·\82é
+ for i := GikoForm.PlugInMenu.Count - 1 downto 0 do begin
+ GikoForm.PlugInMenu.items[i].Free;
+ end;
+ GikoForm.PlugInMenu.Clear;
+
// 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
except
end;
- {
- try
- for i := Length( BoardPlugIns ) - 1 downto 0 do begin
- if BoardPlugIns[ i ] <> nil then
- BoardPlugIns[ i ].Free;
- BoardPlugIns[ i ] := nil;
- end;
- except
- end;
- }
try
if FEvent <> nil then
FEvent.Free;
end;
except
end;
- LockWindowUpdate(0);
-end;
-
-//\83L\83\83\83r\83l\83b\83g\81~\83{\83^\83\93\83N\83\8a\83b\83N
-procedure TGikoForm.CabinetPanelHide(Sender: TObject);
-begin
- CabinetVisibleAction.Execute;
-// CabinetPanelVisible(false);
+ 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;
RoundList.LoadRoundThreadFile;
LockWindowUpdate(0);
- //
- TabsOpenAction.Execute;
end;
-//\83{\81[\83h\83c\83\8a\81[\90Ý\92è
-procedure TGikoForm.SetBoardTreeNode(
- inBBS : TBBS
-);
+{!
+\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
- i, j, k: integer;
- Root: TTreeNode;
- CategoryNode: TTreeNode;
- BoardNode: TTreeNode;
- Category: TCategory;
- Board: TBoard;
-begin
- // \94Â\83\8a\83X\83g\82Ì\90Ý\92è
- FActiveBBS := inBBS;
- TreeView.Items.BeginUpdate;
- TreeView.Items.Clear;
+ p: TPoint;
+ s: string;
+ tmp2: string;
+ URL: string;
+ ATitle: Boolean;
+
+ threadItem : TThreadItem;
+ board : TBoard;
+ Protocol, Host, Path, Document, Port, Bookmark: string;
+
+ wkInt: Integer;
+ wkIntSt: Integer;
+ wkIntTo: Integer;
+ ActiveFileName: string;
+ e: IHTMLElement;
+ Ext: string;
+ PathRec: TPathRec;
+ 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
- if not inBBS.IsBoardFileRead then
- GikoSys.ReadBoardFile( inBBS );
try
- //if SplashWindow <> nil then
- //SplashWindow.ProgressBar.Max := inBBS.Count;
- // SplashWindow.ProgressBar.Max := inBBS.Count + Length(BBSs) * 20;
- except
- end;
-
- // \83L\83\83\83r\83l\83b\83g\95\\8e¦\91O\82É\8dÄ\83\\81[\83g
- if ( GikoSys.Setting.BBSSortIndex <> 0 ) or ( GikoSys.Setting.BBSSortOrder <> true ) then begin
- Sort.SortOrder := true;
- Sort.SortIndex := 0;
- Sort.SortNoFlag := true;
- inBBS.Sort(CategorySortProc);
- end;
-
- Root := TreeView.Items.Add( nil, inBBS.Title );
- Root.ImageIndex := ITEM_ICON_2CH1;
- Root.SelectedIndex := ITEM_ICON_2CH2;
- Root.Data := inBBS;
- for i := inBBS.Count - 1 downto 0 do begin
- Category := TCategory(inBBS.Items[i]);
- CategoryNode := TreeView.Items.AddChildFirst(Root, Category.Title);
- CategoryNode.Data := Category;
- CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
- CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
-
- // \83L\83\83\83r\83l\83b\83g\95\\8e¦\91O\82É\8dÄ\83\\81[\83g
- if ( GikoSys.Setting.CategorySortIndex <> 0 ) or ( GikoSys.Setting.CategorySortOrder <> true ) then begin
- Sort.SortOrder := true;
- Sort.SortIndex := 0;
- Sort.SortNoFlag := true;
- Category.CustomSort(BoardSortProc);
- end;
-
- for j := Category.Count - 1 downto 0 do begin
- Board := TBoard(Category.Items[j]);
- Board.BeginUpdate;
- BoardNode := TreeView.Items.AddChildFirst(CategoryNode, Board.Title);
- BoardNode.Data := Board;
- //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
- if not Board.IsLogFile then begin
- BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
- BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
- end else begin
- BoardNode.ImageIndex := ITEM_ICON_BOARD1;
- BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
- for k := 0 to Board.Count - 1 do begin
- if Board.Items[ k ].IsLogFile then begin
- BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
- BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
-
- Break;
- end;
- end;
+ if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin
+ if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin
+ OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis';
end;
- Board.EndUpdate;
end;
-
- CategoryNode.Expanded := Category.NodeExpand;
-
- //if SplashWindow <> nil then begin
- // SplashWindow.ProgressBar.StepIt;
- //Application.ProcessMessages;
- // SplashWindow.Update;
- //end;
+ except
end;
finally
- TreeView.Items.EndUpdate;
end;
-end;
-
-function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
-var
- TitleColumn : TListColumn;
- ListColumn : TListColumn;
- i, id, idx : Integer;
-begin
- ListView.Items.BeginUpdate;
+ if PreviewTimer.Enabled then
+ PreviewTimer.Enabled := False;
+ Application.CancelHint;
try
- Screen.Cursor := crHourGlass;
+ if GetActiveContent <> nil then
+ ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
+ else
+ ActiveFileName := '';
+ except
+ FActiveContent := nil;
+ Exit;
+ end;
- ListView.Columns.Clear;
- TitleColumn := ListView.Columns.Add;
- TitleColumn.Caption := GikoBBSColumnCaption[ Ord( gbbscTitle ) ];
- TitleColumn.Width := GikoSys.Setting.BBSColumnWidth[ Ord( gbbscTitle ) ];
- idx := 0;
- for i := 0 to GikoSys.Setting.BBSColumnOrder.Count - 1 do begin
- if GikoSys.Setting.BBSColumnOrder[ i ] = gbbscTitle then begin
- TitleColumn.Tag := i;
- idx := i;
- end else begin
- id := Ord( GikoSys.Setting.BBSColumnOrder[ i ] );
- if (Integer( Low( TGikoBBSColumnID ) ) <= id) and
- (id <= Integer( High( TGikoBBSColumnID ) )) then begin
- ListColumn := ListView.Columns.Add;
- // ListColumn.Tag := id;
- ListColumn.Tag := i;
- ListColumn.Caption := GikoBBSColumnCaption[ id ];
- ListColumn.Width := GikoSys.Setting.BBSColumnWidth[ id ];
- end;
- end;
- end;
- TitleColumn.Index := idx;
+ StatusBar.Panels[1].Text := Text2;
- ListView.Items.Count := 0;
- ListView.Items.Clear;
- ListView.Items.Count := ABBS2ch.Count;
-
-// UpFolderAction.Enabled := False;
-// AllItemAction.Enabled := False;
-// LogItemAction.Enabled := False;
-// NewItemAction.Enabled := False;
-// SelectItemAction.Enabled := False;
-// ListDownloadToolButton.Enabled := False;
-// BoardReservToolButton.Enabled := False;
-// ListThreadDownloadToolButton.Enabled := False;
-
- ListNameLabel.Caption := ABBS2ch.Title;
- FolderImage.Picture := nil;
- ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
-
- FSortIndex := GikoSys.Setting.BBSSortIndex;
- FSortOrder := GikoSys.Setting.BBSSortOrder;
- for i := ListView.Columns.Count - 1 downto 0 do begin
- idx := ListView.Column[ i ].Tag;
- if FSortIndex = Ord( GikoSys.Setting.BBSColumnOrder[ idx ] ) then
- ListViewSort( nil, ListView.Column[ i ] );
- end;
-
- Result := ABBS2ch.Count;
- finally
- Screen.Cursor := crDefault;
- ListView.Items.EndUpdate;
+ if FHint <> nil then begin
+ FHint.ReleaseHandle;
+ FHint.ClearAllRes;
end;
-end;
+ if FPreviewBrowser <> nil then
+ ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
-function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
-var
- TitleColumn : TListColumn;
- ListColumn : TListColumn;
- i, id, idx : Integer;
-begin
- ListView.Items.BeginUpdate;
- try
- Screen.Cursor := crHourGlass;
+ if not GikoSys.Setting.UnActivePopup then
+ if not GikoForm.Active then
+ Exit;
- ListView.Columns.Clear;
- TitleColumn := ListView.Columns.Add;
- TitleColumn.Caption := GikoCategoryColumnCaption[ Ord( gccTitle ) ];
- TitleColumn.Width := GikoSys.Setting.CategoryColumnWidth[ Ord( gccTitle ) ];
- idx := 0;
- for i := 0 to GikoSys.Setting.CategoryColumnOrder.Count - 1 do begin
- if GikoSys.Setting.CategoryColumnOrder[ i ] = gccTitle then begin
- TitleColumn.Tag := i;
- idx := i;
- end else begin
- id := Ord( GikoSys.Setting.CategoryColumnOrder[ i ] );
- if (Integer( Low( TGikoCategoryColumnID ) ) <= id) and
- (id <= Integer( High( TGikoCategoryColumnID ) )) then begin
- ListColumn := ListView.Columns.Add;
-// ListColumn.Tag := id;
- ListColumn.Tag := i;
- ListColumn.Caption := GikoCategoryColumnCaption[ id ];
- ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[ id ];
+//file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
+//file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
+
+ s := '';
+ 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);
+ ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
+ 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 := Text2;
+ PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
+ PreviewTimer.Enabled := True;
+ 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;
+ p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
+ e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
+ if (Assigned(e)) then begin
+ 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 := 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 else begin
+ FHint.PopupType := gptRaw;
+ FHint.Caption := s;
end;
end;
- end;
- TitleColumn.Index := idx;
-
- ListView.Items.Count := 0;
- ListView.Items.Clear;
- ListView.Items.Count := Category.Count;
-
- for i := Category.Count - 1 downto 0 do begin
- if( Category.Items[i].ParentCategory <> Category ) then begin
- Category.Items[i].ParentCategory := Category;
- Category.Items[i].No := i + 1;
+ end else begin
+ threadItem := GetActiveContent;
+ URL := THTMLCreate.GetRespopupURL(Text2, threadItem.URL);
+ PathRec := Gikosys.Parse2chURL2(URL);
+ if (PathRec.FNoParam) then begin
+ PathRec.FSt := 1;
+ PathRec.FTo := 1;
+ end else begin
+ Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
end;
- end;
-// UpFolderAction.Enabled := True;
-// AllItemAction.Enabled := False;
-// LogItemAction.Enabled := False;
-// NewItemAction.Enabled := False;
-// SelectItemAction.Enabled := False;
-// ListDownloadToolButton.Enabled := False;
-// BoardReservToolButton.Enabled := False;
-// ListThreadDownloadToolButton.Enabled := False;
+ GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
- ListNameLabel.Caption := Category.Title;
- FolderImage.Picture := nil;
- ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
+ if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
- FSortIndex := GikoSys.Setting.CategorySortIndex;
- FSortOrder := GikoSys.Setting.CategorySortOrder;
- for i := ListView.Columns.Count - 1 downto 0 do begin
- idx := ListView.Column[ i ].Tag;
- if FSortIndex = Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] ) then
- ListViewSort( nil, ListView.Column[ i ] );
- end;
+ URL := GikoSys.GetBrowsableThreadURL( URL );
+ wkIntSt := PathRec.FSt;
+ wkIntTo := PathRec.FTo;
- Result := Category.Count;
- finally
- Screen.Cursor := crDefault;
- ListView.Items.EndUpdate;
- end;
-end;
+ if (wkIntSt = 0) and (wkIntTo = 0) then begin
+ wkIntSt := 1;
+ wkIntTo := 1;
+ end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
+ wkIntSt := wkIntTo;
+ end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
+ wkIntTo := wkIntSt;
+ end else if wkIntSt > wkIntTo then begin
+ wkInt := wkIntTo;
+ wkIntTo := wkIntSt;
+ wkIntSt := wkInt;
+ end;
+ if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
+ ATitle := false
+ else
+ ATitle := true;
-function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
-var
- TitleColumn : TListColumn;
- ListColumn : TListColumn;
- i, id, idx : Integer;
-begin
- ListView.Items.BeginUpdate;
- try
- Screen.Cursor := crHourGlass;
+ threadItem := BBSsFindThreadFromURL( URL );
-{*
- // \83`\83\89\82Â\82«\96h\8e~\82Ì\82½\82ß\81A\95Ï\8dX\82³\82ê\82Ä\82¢\82é\8fê\8d\87\82Ì\82Ý
- // \81¦\96¼\8fÌ\82Í\88á\82¤\82ª\83J\83\89\83\80\90\94\82ª\93¯\82¶\81A\82Æ\82¢\82Á\82½\8fê\8d\87\82É\91Î\8f\88\82Å\82«\82È\82¢\82Ì\82Å\92\8d\88Ó
- if ListView.Columns.Count <> GikoSys.Setting.BoardColumnOrder.Count then
-*}
- begin
- ListView.Columns.Clear;
- TitleColumn := ListView.Columns.Add;
- TitleColumn.Caption := GikoBoardColumnCaption[ Ord( gbcTitle ) ];
- TitleColumn.Width := GikoSys.Setting.BoardColumnWidth[ Ord( gbcTitle ) ];
- idx := 0;
- for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
- if GikoSys.Setting.BoardColumnOrder[ i ] = gbcTitle then begin
- TitleColumn.Tag := i;
- idx := i;
- end else begin
- id := Ord( GikoSys.Setting.BoardColumnOrder[ i ] );
- if (Integer( Low( TGikoBoardColumnID ) ) <= id) and
- (id <= Integer( High( TGikoBoardColumnID ) )) then begin
- ListColumn := ListView.Columns.Add;
- ListColumn.Caption := GikoBoardColumnCaption[ id ];
- // ListColumn.Tag := id;
- ListColumn.Tag := i;
- ListColumn.Width := GikoSys.Setting.BoardColumnWidth[ id ];
- ListColumn.Alignment := GikoBoardColumnAlignment[ id ];
+ if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
+ board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
+ if board <> nil then begin
+ if not board.IsThreadDatRead then
+ GikoSys.ReadSubjectFile( board );
+ threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
end;
end;
- end;
- TitleColumn.Index := idx;
- end;
- ListView.Items.Count := 0;
- ListView.Items.Clear;
-
- {case GikoForm.ViewType of
- gvtAll: ListView.Items.Count := Board.Count;
- gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
- gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
- gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
- end;
- }
- case GikoForm.ViewType of
- gvtAll: ListView.Items.Count := Board.Count;
- gvtLog:
- begin
- Board.LogThreadCount := Board.GetLogThreadCount;
- ListView.Items.Count := Board.LogThreadCount;
- end;
- gvtNew:
- begin
- Board.NewThreadCount := Board.GetNewThreadCount;
- ListView.Items.Count := Board.NewThreadCount;
- end;
- gvtUser:
- begin
- Board.UserThreadCount:= Board.GetUserThreadCount;
- ListView.Items.Count := Board.UserThreadCount;
+ if threadItem <> nil then begin
+ //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
+ //URL\82Ì\8dÅ\8cã\82É/\82ª\95t\82¢\82Ä\82¢\82È\82¢\82Æ\82«\97p
+ if ( IntToStr(wkIntSt) = ChangeFileExt(threadItem.FileName, '') ) then begin
+ wkIntSt := 1;
+ wkIntTo := 1;
+ end;
+ FHint.PopupType := gptThread;
+ HTMLCreater.SetResPopupText(FHint, threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
+ end;
end;
end;
- ListNameLabel.Caption := Board.Title;
- FolderImage.Picture := nil;
- ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
-
- FSortIndex := GikoSys.Setting.BoardSortIndex;
- FSortOrder := GikoSys.Setting.BoardSortOrder;
- for i := ListView.Columns.Count - 1 downto 0 do begin
- idx := ListView.Column[ i ].Tag;
- if FSortIndex = Ord( GikoSys.Setting.BoardColumnOrder[ idx ] ) then
- ListViewSort( nil, ListView.Column[ i ] );
+ if FHint.PopupType = gptRaw then begin
+ if FHint.Caption <> '' then
+ ShowTextPopup;
+ end else begin
+ if (FHint.ResCount <> 0) or (FHint.Title <> '') then
+ ShowTextPopup;
end;
-
- Result := Board.Count;
- finally
- Screen.Cursor := crDefault;
- ListView.Items.EndUpdate;
end;
end;
-procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
+procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
var
-// FileName: string;
-// DateTime: TDateTime;
- BoardCnt: Integer;
- BBS: TBBS;
- Category: TCategory;
- Board: TBoard;
- ThreadItem: TThreadItem;
- RepStr: string;
- ActivListObj : TObject;
- i, idx : Integer;
+ SysMenu: HMenu;
begin
- ActivListObj := ActiveList;
- if ActivListObj is TBBS then begin
- //===== \83J\83e\83S\83\8a\83\8a\83X\83g =====
- BBS := TBBS(ActivListObj);
-
- ListView.StateImages := nil;
-
- if (BBS = nil) or (BBS.Count <= 0) or (Item = nil)
- or (Item.Index >= BBS.Count) or (ListView.Items.Count = 0)
- or (not (BBS.Items[Item.index] is TCategory)) then Exit;
- //if BBS.Count <= 0 then Exit;
- //if Item = nil then Exit;
- //if Item.Index >= BBS.Count then Exit;
- //if ListView.Items.Count = 0 then Exit;
-
- //if not (BBS.Items[Item.index] is TCategory) then Exit;
- Category := TCategory(BBS.Items[Item.index]);
-
- if Category = nil then Exit;
-
- if ListNumberVisibleAction.Checked then
- Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
- else
- Item.Caption := Category.Title;
-
- Item.ImageIndex := ITEM_ICON_CATEGORY1;
- Item.Data := Category;
-
- end else if ActivListObj is TCategory then begin
-
- //===== \94Â\83\8a\83X\83g =====
- Category := TCategory(ActivListObj);
-
- ListView.StateImages := nil;
-
- if (Category = nil) or (Category.Count <= 0) or (Item = nil)
- or (Item.Index >= Category.Count) or (ListView.Items.Count = 0)
- or (not (Category.Items[Item.Index] is TBoard)) then Exit;
- //if Category.Count <= 0 then Exit;
- //if Item = nil then Exit;
- //if Item.Index >= Category.Count then Exit;
- //if ListView.Items.Count = 0 then Exit;
-
- //if not (Category.Items[Item.Index] is TBoard) then Exit;
- Board := TBoard(Category.Items[Item.Index]);
-
- if Board = nil then Exit;
-
- if ListNumberVisibleAction.Checked then
- Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
- //Item.Caption := IntToStr(Item.Index + 1) + ': ' + Board.Title
- else
- Item.Caption := Board.Title;
-
- if Item.SubItems.Count <> ListView.Columns.Count then begin
- Item.SubItems.Clear;
- Item.SubItems.Capacity := GikoSys.Setting.CategoryColumnOrder.Count;
- for i := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 1 do
- Item.SubItems.Add('');
- end;
-
- Item.ImageIndex := ITEM_ICON_BOARD1;
- idx := 0;
- for i := 0 to ListView.Columns.Count - 1 do begin
- if GikoSys.Setting.CategoryColumnOrder.Count <= i then
- Break;
-// case TGikoCategoryColumnID( ListView.Column[ i ].Tag ) of
- case GikoSys.Setting.CategoryColumnOrder[ i ] of
- gccTitle:
- // Item.Caption \82Í SubItems \82É\8aÜ\82Ü\82ê\96³\82¢\82Ì\82Å
- Dec( idx );
-
- gccRoundName:
- if Board.Round then
- Item.SubItems[ idx ] := Board.RoundName // '\97\\96ñ'
- else
- Item.SubItems[ idx ] := '';
-
- gccLastModified:
- if Board.RoundDate = ZERO_DATE then begin
- Item.SubItems[ idx ] := '';
- end else
- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
- end;
- Inc( idx );
- end;
-
- Item.Data := Board;
-
- end else if ActivListObj is TBoard then begin
-
- //===== \83X\83\8c\83\8a\83X\83g =====
- Board := TBoard(ActivListObj);
-
- if GikoSys.Setting.ListIconVisible then
- ListView.StateImages := StateIconImageList
- else
- ListView.StateImages := nil;
-
-
- case GikoForm.ViewType of
- gvtAll: BoardCnt := Board.Count;
- gvtLog: BoardCnt := Board.LogThreadCount;
- gvtNew: BoardCnt := Board.NewThreadCount;
- gvtUser: BoardCnt := Board.UserThreadCount;
- else
- BoardCnt := 0;
- end;
- {
- case GikoForm.ViewType of
- gvtAll: BoardCnt := Board.Count;
- gvtLog: BoardCnt := Board.GetLogThreadCount;
- gvtNew: BoardCnt := Board.GetNewThreadCount;
- gvtUser: BoardCnt := Board.GetUserThreadCount;
- else
- BoardCnt := 0;
- end;
- }
-// if Board = nil then Exit;
- if (BoardCnt <= 0) or (Item = nil) or (Item.Index > BoardCnt)
- or (ListView.Items.Count = 0) or (not (Board.Items[Item.Index] is TThreadItem)) then Exit;
-
- //\89ü\91P\82·\82×\82«\83u\83\8d\83b\83N/////////////////////////////////////////////////////
- ThreadItem := nil;
- case GikoForm.ViewType of
- gvtAll: if Item.Index >= Board.Count then Exit else
- ThreadItem := TThreadItem(Board.Items[Item.Index]);
- gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
- gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
- gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
- end;
- //////////////////////////////////////////////////////////////////////////
-
- if ThreadItem = nil then Exit;
-
- RepStr := CustomStringReplace(ThreadItem.Title, '<', '<' );
- RepStr := CustomStringReplace(RepStr, '>', '>' );
- RepStr := CustomStringReplace(RepStr, '"', '"' );
- RepStr := CustomStringReplace(RepStr, '&', '&' );
- //RepStr := StringReplace(RepStr, '\81\97\81M', ',', [rfReplaceAll]);
- if Item.SubItems.Count <> ListView.Columns.Count then begin
- Item.SubItems.Clear;
- Item.SubItems.Capacity := GikoSys.Setting.BoardColumnOrder.Count;
- for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do
- Item.SubItems.Add('');
- end;
-
- if ListNumberVisibleAction.Checked then
- Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
- else
- Item.Caption := RepStr;
-
- case ThreadItem.AgeSage of
- gasNone: Item.StateIndex := -1;
- gasNew: Item.StateIndex := 0;
- gasAge: Item.StateIndex := 1;
- gasSage: Item.StateIndex := 2;
- end;
-
- if ThreadItem.IsLogFile then begin
- idx := 0;
- for i := 0 to ListView.Columns.Count - 1 do begin
- if GikoSys.Setting.BoardColumnOrder.Count <= i then
- Break;
-// case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
- case GikoSys.Setting.BoardColumnOrder[ i ] of
- gbcTitle:
- // Item.Caption \82Í SubItems \82É\8aÜ\82Ü\82ê\96³\82¢\82Ì\82Å
- Dec( idx );
-
- gbcAllCount:
- Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
-
- gbcLocalCount:
- Item.SubItems[ idx ] := IntToStr(ThreadItem.Count);
-
- gbcNonAcqCount:
- Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count);
-
- gbcNewCount:
- if ThreadItem.NewResCount = 0 then
- Item.SubItems[ idx ] := ''
- else
- Item.SubItems[ idx ] := IntToStr(ThreadItem.NewResCount);
-
- gbcUnReadCount:
- Item.SubItems[ idx ] := '';
-
- gbcRoundName:
- if ThreadItem.Round then
- Item.SubItems[ idx ] := ThreadItem.RoundName
- else
- Item.SubItems[ idx ] := '';
-
- gbcRoundDate://gbcLastModified:
- if (ThreadItem.RoundDate = ZERO_DATE) then begin
- Item.SubItems[ idx ] := '';
- end else
- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
-
- gbcCreated:
- if ThreadItem.CreateDate = ZERO_DATE then begin
- Item.SubItems[ idx ] := '';
- end else
- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
-
- gbcLastModified:
- if (ThreadItem.LastModified = ZERO_DATE) then begin
- Item.SubItems[ idx ] := '';
- end else
- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.LastModified);
-
-
- end;
- Inc( idx );
- end;
-
- if ThreadItem.NewArrival then
- Item.ImageIndex := ITEM_ICON_THREADNEW1
- else
- Item.ImageIndex := ITEM_ICON_THREADLOG1;
-
-
- end else begin
- idx := 0;
- for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
-// case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
- case GikoSys.Setting.BoardColumnOrder[ i ] of
- gbcTitle:
- // Item.Caption \82Í SubItems \82É\8aÜ\82Ü\82ê\96³\82¢\82Ì\82Å
- Dec( idx );
-
- gbcAllCount:
- Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
-
- gbcRoundDate://gbcLastModified:
- Item.SubItems[ idx ] := '';
-
- gbcCreated:
- if ThreadItem.CreateDate = ZERO_DATE then begin
- Item.SubItems[ idx ] := '';
- end else
- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
-
- gbcLastModified:
- Item.SubItems[ idx ] := '';
-
- else
- Item.SubItems[ idx ] := '';
- end;
- Inc( idx );
- end;
- if ThreadItem.NewArrival then
- Item.ImageIndex := ITEM_ICON_THREADNEW1
- else
- Item.ImageIndex := ITEM_ICON_THREAD1;
- end;
-
- Item.Data := ThreadItem;
-
- end;
-end;
-
-procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
- const FindString: String; const FindPosition: TPoint; FindData: Pointer;
- StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
- var Index: Integer);
-begin
-
-//
-end;
-
-procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
- EndIndex: Integer);
-begin
-//
-end;
-
-procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
- EndIndex: Integer; OldState, NewState: TItemStates);
-begin
-//
-end;
-
-procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
-var
- p: TPoint;
- s: string;
- tmp2: string;
- URL: string;
- ATitle: Boolean;
-
- threadItem : TThreadItem;
- board : TBoard;
- Protocol, Host, Path, Document, Port, Bookmark: string;
-
- wkInt: Integer;
- wkIntSt: Integer;
- wkIntTo: Integer;
- ActiveFileName: string;
- e: IHTMLElement;
- Ext: string;
-// buf, buf2: string;
- PathRec: TPathRec;
-begin
- if not( TObject(Sender) is TWebBrowser )then
- Exit;
- try
- try
- if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin
- if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin
- OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis';
- end;
- end;
- except
- end;
- finally
- end;
- if PreviewTimer.Enabled then
- PreviewTimer.Enabled := False;
- Application.CancelHint;
- try
- if GetActiveContent <> nil then
- ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
- else
- ActiveFileName := '';
- except
- FActiveContent := nil;
- Exit;
- end;
-
- StatusBar.Panels[1].Text := Text;
-
- if FHint <> nil then begin
- FHint.ReleaseHandle;
- FHint.ClearAllRes;
- end;
- if FPreviewBrowser <> nil then
- ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
-
- if not GikoSys.Setting.UnActivePopup then
- if not GikoForm.Active then
- Exit;
-
-//file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
-//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 = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
- if FPreviewBrowser = nil then begin
- FPreviewBrowser := TPreviewBrowser.Create(Self);
- ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
- 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;
- 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]);
- //\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;
- p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
- e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
- if (Assigned(e)) then begin
- 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);
- //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
- FHint.PopupType := gptThread;
- SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
- end else begin
- FHint.PopupType := gptRaw;
- FHint.Caption := s;
- end;
- end;
- end else begin
- threadItem := GetActiveContent;
- URL := GetRespopupURL(Text, threadItem.URL);
- PathRec := Gikosys.Parse2chURL2(URL);
- if (PathRec.FNoParam) then begin
- PathRec.FSt := 1;
- PathRec.FTo := 1;
- end else begin
- Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
- end;
- GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
-
- if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
-
- URL := GikoSys.GetBrowsableThreadURL( URL );
- wkIntSt := PathRec.FSt;
- wkIntTo := PathRec.FTo;
-
- if (wkIntSt = 0) and (wkIntTo = 0) then begin
- wkIntSt := 1;
- wkIntTo := 1;
- end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
- wkIntSt := wkIntTo;
- end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
- wkIntTo := wkIntSt;
- end else if wkIntSt > wkIntTo then begin
- wkInt := wkIntTo;
- wkIntTo := wkIntSt;
- wkIntSt := wkInt;
- end;
- if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
- ATitle := false
- else
- ATitle := true;
-
- threadItem := BBSsFindThreadFromURL( URL );
-
- if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
- board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
- if board <> nil then begin
- if not board.IsThreadDatRead then
- GikoSys.ReadSubjectFile( board );
- threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
- end;
- end;
-
- if threadItem <> nil then begin
- //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
- //URL\82Ì\8dÅ\8cã\82É/\82ª\95t\82¢\82Ä\82¢\82È\82¢\82Æ\82«\97p
- if ( IntToStr(wkIntSt) = ChangeFileExt(threadItem.FileName, '') ) then begin
- wkIntSt := 1;
- wkIntTo := 1;
- end;
- FHint.PopupType := gptThread;
- SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
- end;
- end;
- end;
-
- //if s <> '' then
- // ShowTextPopup(s);
- if FHint.PopupType = gptRaw then begin
- if FHint.Caption <> '' then
- ShowTextPopup;
- end else begin
- if (FHint.ResCount <> 0) or (FHint.Title <> '') then
- ShowTextPopup;
- end;
- end;
-end;
-
-procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
-var
- SysMenu: HMenu;
- //SysMenuApp: HMenu;
-begin
- FEnabledCloseButton := Enabled;
- SysMenu := GetSystemMenu(Handle, False);
- //SysMenuApp := GetSystemMenu(Application.Handle, False);
+ FEnabledCloseButton := Enabled;
+ SysMenu := GetSystemMenu(Handle, False);
if Enabled then begin
EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
- //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
end else begin
EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
- //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
end;
DrawMenuBar(Handle);
- //DrawMenuBar(Application.Handle);
end;
procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
Result := FHttpState;
end;
-{!
-\brief ListView \82Ì Column \82ð\90^\82Ì\83J\83\89\83\80\82É\95Ï\8a·
-
-Delphi 6 Personal \82Å\82Ì ListView \82Å\82Í ListViewColumnClick \83C\83x\83\93\83g\82Å
-\90³\82µ\82¢\83J\83\89\83\80\82ª\93n\82³\82ê\82È\82¢\82½\82ß\81A\90³\82µ\82¢\83J\83\89\83\80\82É\95Ï\8a·\82µ\82Ü\82·\81B
-}
-function TGikoForm.ActiveListTrueColumn( column : TListColumn ) : TListColumn;
-{*
-var
- i, idx : Integer;
- orderList : TList;
-*}
-begin
-
- // \90³\82µ\82\95Ï\8a·\82·\82é\95û\96@\82ª\95ª\82©\82ç\82È\82¢\82Ì\82Å\95Û\97¯
- Result := column;
- Exit;
-{*
- Result := column;
-
- 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
- Exit;
-
- idx := column.Tag;
-
- for i := 0 to ListView.Columns.Count - 1 do begin
- if Integer( orderList[ ListView.Column[ i ].Tag ] ) = 0 then begin
- if idx = 0 then
- Result := ListView.Column[ i ]
- else if idx <= i then
- Result := ListView.Column[ idx - 1 ];
- Exit;
- end;
- end;
-*}
-
-end;
-
-procedure TGikoForm.ListViewColumnClick(Sender: TObject;
- Column: TListColumn);
+procedure TGikoForm.ListViewColumnClick(Sender: TObject;
+ Column: TListColumn);
var
id, idx : Integer;
orderList : TList;
+ vSortIndex : Integer;
+ vSortOrder : Boolean;
begin
- idx := 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
- Exit;
-
- id := Integer( orderList[ idx ] );
-
- if FSortIndex = id then
- FSortOrder := not FSortOrder
- else begin
- FSortOrder := id = 0;
- end;
-
- ListViewSort(Sender, Column);
-end;
-
-procedure TGikoForm.ListViewSort(Sender: TObject; Column: TListColumn);
-var
- i, id, idx : Integer;
- orderList : TList;
- wkBBS: TBBS;
- wkCategory: TCategory;
- wkBoard: TBoard;
-begin
- idx := ActiveListTrueColumn( Column ).Tag;
-
- for i := 0 to ListView.Columns.Count - 1 do begin
- ListView.Column[i].ImageIndex := -1;
- end;
-
- if FSortOrder then
- ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT1
- else
- ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT2;
-
- Sort.SortNoFlag := ListNumberVisibleAction.Checked;
-
- //if TObject(TreeView.Selected.Data) is TBBS then begin
+ idx := TListViewUtils.ActiveListTrueColumn( Column ).Tag;
if TObject( FActiveList ) is TBBS then begin
- //wkBBS := TBBS(TreeView.Selected.Data);
- wkBBS := TBBS( FActiveList );
orderList := GikoSys.Setting.BBSColumnOrder;
- id := Integer( orderList[ idx ] );
- Sort.SortOrder := FSortOrder;
- Sort.SortIndex := id;
- GikoSys.Setting.BBSSortIndex := id;
- GikoSys.Setting.BBSSortOrder := FSortOrder;
- wkBBS.Sort(CategorySortProc);
- //end else if TObject(TreeView.Selected.Data) is TCategory then begin
+ vSortIndex := GikoSys.Setting.BBSSortIndex;
+ vSortOrder := GikoSys.Setting.BBSSortOrder;
end else if TObject( FActiveList ) is TCategory then begin
- //wkCategory := TCategory(TreeView.Selected.Data);
- wkCategory := TCategory( FActiveList );
orderList := GikoSys.Setting.CategoryColumnOrder;
- id := Integer( orderList[ idx ] );
- Sort.SortOrder := FSortOrder;
- Sort.SortIndex := id;
- GikoSys.Setting.CategorySortIndex := id;
- GikoSys.Setting.CategorySortOrder := FSortOrder;
- wkCategory.CustomSort(BoardSortProc);
- //end else if TObject(TreeView.Selected.Data) is TBoard then begin
+ vSortIndex := GikoSys.Setting.CategorySortIndex;
+ vSortOrder := GikoSys.Setting.CategorySortOrder;
end else if TObject( FActiveList ) is TBoard then begin
- //wkBoard := TBoard(TreeView.Selected.Data);
- wkBoard := TBoard( FActiveList );
orderList := GikoSys.Setting.BoardColumnOrder;
- id := Integer( orderList[ idx ] );
- Sort.SortOrder := FSortOrder;
- Sort.SortIndex := id;
- GikoSys.Setting.BoardSortIndex := id;
- GikoSys.Setting.BoardSortOrder := FSortOrder;
- wkBoard.CustomSort(ThreadItemSortProc);
- end else begin
- id := 0;
+ vSortIndex := GikoSys.Setting.BoardSortIndex;
+ vSortOrder := GikoSys.Setting.BoardSortOrder;
+ end else
+ Exit;
+
+ id := Integer( orderList[ idx ] );
+
+
+ if vSortIndex = id then
+ vSortOrder := not vSortOrder
+ else begin
+ vSortOrder := id = 0;
end;
- ListView.Refresh;
- FSortIndex := id;
+ 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;
begin
// if FActiveList <> Obj then begin
FActiveList := Obj;
- try
+ try
if ListView.Selected <> nil then
idx := ListView.Selected.Index
else
idx := -1;
- except
- idx := -1;
- end;
+ except
+ idx := -1;
+ end;
ListView.Items.Count := 0;
ListView.Items.Clear;
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;
- if Obj is TBBS then begin
- SetCategoryListItem(TBBS(Obj));
- end else if Obj is TCategory then begin
- SetBoardListItem(TCategory(Obj));
- end else if Obj is TBoard then begin
- SetThreadListItem(TBoard(Obj));
+ Screen.Cursor := crHourGlass;
+ try
+ if Obj is TBBS then begin
+ TListViewUtils.SetCategoryListItem(TBBS(obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
+ end else if Obj is TCategory then begin
+ TListViewUtils.SetBoardListItem(TCategory(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
+ end else if Obj is TBoard then begin
+ TListViewUtils.SetThreadListItem(TBoard(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
+ end;
+ finally
+ Screen.Cursor := crDefault;
end;
if idx >= 0 then begin
//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);
- //
- //SetThreadListItem(Board); //SetActiveList\93à\82Å\8cÄ\82Î\82ê\82é\82©\82ç2\8fd\82É\8cÄ\82Ñ\8fo\82·\95K\97v\82È\82µ
end;
end;
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;
HistoryToolBar.Hide;
- SetBoardTreeNode( inBBS );
+ FActiveBBS := inBBS;
+ TListViewUtils.SetBoardTreeNode(inBBS, TreeView);
TreeView.Items.GetFirstNode.Expanded := True; //?c???[?g?b?v???????J??
//?c???[??g?b?v?????I????
if GetActiveList = nil then
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;
- SetBoardTreeNode( 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 GetActiveList = nil then begin
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);
-begin
- Close;
-end;
-
-procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
+procedure TGikoForm.FormResize(Sender: TObject);
begin
- ListViewAllSelect;
-end;
-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;
+ MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
+ MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
-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;
+ 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;
-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;
+ FIsIgnoreResize := rtResizing;
+ PostMessage( Handle, USER_RESIZED, 0, 0 );
-procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
-var
- CoolBand: TCoolBand;
-begin
- CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
- if CoolBand = nil then
- Exit;
- CoolBand.Visible := ListToolBarVisibleAction.Checked;
- GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
end;
-procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
+procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
var
- CoolBand: TCoolBand;
+ i: Integer;
begin
- CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
- if CoolBand = nil then
- Exit;
- CoolBand.Visible := ListNameBarVisibleAction.Checked;
- GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
+ FTabHintIndex := -1;
+ for i := 0 to BrowserTab.Tabs.Count - 1 do begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
+ DeleteTab(i, BrowserTab.TabIndex);
+ Break;
+ end;
+ end;
end;
-
-procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
+procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
var
- CoolBand: TCoolBand;
+ i: Integer;
begin
- CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
- if CoolBand = nil then
- Exit;
- CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
- GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
+ FTabHintIndex := -1;
+ for i := 0 to BrowserTab.Tabs.Count - 1 do begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
+ DeleteTab(i, BrowserTab.TabIndex);
+ Break;
+ end;
+ end;
end;
-
-procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
+procedure TGikoForm.DeleteTab(index, selectIndex: Integer);
var
- CoolBand: TCoolBand;
+ doc: Variant;
+ j: Integer;
begin
- CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
- if CoolBand = nil then
- Exit;
- CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
- GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
-end;
+ try
+ if TBrowserRecord(BrowserTab.Tabs.Objects[index]).Browser <> nil then begin
+ doc := TBrowserRecord(BrowserTab.Tabs.Objects[index]).Browser.Document;
+ TBrowserRecord(BrowserTab.Tabs.Objects[index]).Thread.ScrollTop := doc.Body.ScrollTop;
+ end;
+ except
+ TBrowserRecord(BrowserTab.Tabs.Objects[index]).Thread.ScrollTop := 0;
+ end;
+ if(FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[index])) then
+ FActiveContent := nil;
+ if TBrowserRecord(BrowserTab.Tabs.Objects[index]).Browser <> nil then begin
+ j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[index]).Browser);
+ if j <> -1 then
+ FBrowsers.Move(j, BROWSER_COUNT - 1);
+ end;
+ BrowserTab.Tabs.BeginUpdate;
+ try
+ TBrowserRecord(BrowserTab.Tabs.Objects[index]).Free;
+ if ( BrowserTab.Tabs.Count - 1 = index ) and
+ ( BrowserTab.TabRect(index).Left
+ <= BrowserTab.DisplayRect.Left ) then begin
+ BrowserTab.ScrollTabs(-1);
+ end;
+ BrowserTab.Tabs.Delete(index);
+ if selectIndex > index then begin
+ BrowserTab.TabIndex := selectIndex - 1;
+ end else begin
+ if BrowserTab.Tabs.Count -1 >= selectIndex then
+ BrowserTab.TabIndex := selectIndex
+ 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;
-procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
+ if( FActiveContent = nil) then
+ BrowserTab.OnChange(nil);
+end;
+function TGikoForm.Hook(var Message: TMessage): Boolean;
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;
+ //\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Ì
+ //\83\81\83j\83\85\81[\82Ì\83V\83\87\81[\83g\83J\83b\83g\83L\81[\82ª\83T\83u\83\81\83j\83\85\81[\82©\82ç\93ü\97Í\82³\82ê\82é\82Ì\82ð\89ñ\94ð
+ Result := False;
+ case Message.Msg of
+ CM_APPKEYDOWN:
+ Result := True; //\83V\83\87\81[\83g\83J\83b\83g\83L\81[\96³\8cø
+ CM_APPSYSCOMMAND:
+ Result := True; // \83A\83N\83Z\83\89\83\8c\81[\83^\82ð\96³\8cø\82É\82·\82é
+ end;
end;
-procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
-begin
- StatusBar.Visible := StatusBarVisibleAction.Checked;
- GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
+procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
+var
+ bBoard, bCategory : Boolean;
+begin
+ bBoard := (GetActiveList is TBoard);
+ bCategory := (GetActiveList is TCategory);
+ ItemRoundPMenu.Visible := bBoard;
+ ItemReservPMenu.Visible := bBoard;
+ LPMSep01.Visible := bBoard;
+ ListRoundPMenu.Visible := bCategory;// or (GetActiveList is TBoard);
+ ListReservPMenu.Visible := bCategory;// or (GetActiveList is TBoard);
+ LPMSep02.Visible := bCategory or bBoard;
+ KidokuPMenu.Visible := bBoard;
+ MidokuPMenu.Visible := bBoard;
+ UrlCopyPMenu.Visible := bCategory or bBoard;
+ NameUrlCopyPMenu.Visible := bCategory or bBoard;
+ AllSelectPMenu.Visible := bCategory or bBoard;
+ LPMSep05.Visible := bCategory or bBoard;
+ DeletePMenu.Visible := bBoard;
+ LPMSep06.Visible := bCategory or bBoard;
+ BoardFavoriteAddMenu.Visible := bCategory;
+ ThreadFavoriteAddMenu.Visible := bBoard;
+ SaveThreadFile.Visible := bBoard;
+ AddRoundNameMenu(ItemReservPMenu);
+ AddRoundNameMenu(ListReservPMenu);
end;
-procedure TGikoForm.IconStyleExecute(Sender: TObject);
+procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
begin
- case ListView.ViewStyle of
- vsIcon: SmallIconAction.Execute;
- vsSmallIcon: ListIconAction.Execute;
- vsList: DetailIconAction.Execute;
- vsReport: LargeIconAction.Execute;
+ FClickNode := TreeView.Selected;
+ if FClickNode = nil then begin
+ TreeSelectThreadPupupMenu.Visible := False;
+ TreeSelectBoardPupupMenu.Visible := False;
+ TPMSep01.Visible := False;
+ TreeSelectURLPupupMenu.Visible := False;
+ TreeSelectNamePupupMenu.Visible := False;
+ TreeSelectNameURLPupupMenu.Visible := False;
+ TreeSelectFavoriteAddPupupMenu.Visible := False;
+ TreeSelectLogDeleteSeparator.Visible := False;
+ TreeSelectLogDeletePopupMenu.Visible := False;
+ end else if TObject(FClickNode.Data) is TBoard then begin
+ TreeSelectThreadPupupMenu.Visible := False;
+ TreeSelectBoardPupupMenu.Visible := True;
+ TPMSep01.Visible := True;
+ TreeSelectURLPupupMenu.Visible := True;
+ TreeSelectNamePupupMenu.Visible := True;
+ TreeSelectNameURLPupupMenu.Visible := True;
+ TreeSelectFavoriteAddPupupMenu.Visible := True;
+ TreeSelectLogDeleteSeparator.Visible := False;
+ TreeSelectLogDeletePopupMenu.Visible := False;
+ end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
+ TreeSelectThreadPupupMenu.Visible := False;
+ TreeSelectBoardPupupMenu.Visible := True;
+ TPMSep01.Visible := True;
+ TreeSelectURLPupupMenu.Visible := True;
+ TreeSelectNamePupupMenu.Visible := True;
+ TreeSelectNameURLPupupMenu.Visible := True;
+ TreeSelectFavoriteAddPupupMenu.Visible := True;
+ TreeSelectLogDeleteSeparator.Visible := False;
+ TreeSelectLogDeletePopupMenu.Visible := False;
+ end else if (TObject(FClickNode.Data) is TThreadItem) then begin
+ TreeSelectThreadPupupMenu.Visible := True;
+ TreeSelectBoardPupupMenu.Visible := False;
+ TPMSep01.Visible := True;
+ TreeSelectURLPupupMenu.Visible := True;
+ TreeSelectNamePupupMenu.Visible := True;
+ TreeSelectNameURLPupupMenu.Visible := True;
+ TreeSelectFavoriteAddPupupMenu.Visible := True;
+ TreeSelectLogDeleteSeparator.Visible := True;
+ TreeSelectLogDeletePopupMenu.Visible := True;
+ end else if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
+ TreeSelectThreadPupupMenu.Visible := True;
+ TreeSelectBoardPupupMenu.Visible := False;
+ TPMSep01.Visible := True;
+ TreeSelectURLPupupMenu.Visible := True;
+ TreeSelectNamePupupMenu.Visible := True;
+ TreeSelectNameURLPupupMenu.Visible := True;
+ TreeSelectFavoriteAddPupupMenu.Visible := True;
+ TreeSelectLogDeleteSeparator.Visible := True;
+ TreeSelectLogDeletePopupMenu.Visible := True;
+ end else if (TObject(FClickNode.Data) is TCategory) then begin
+ TreeSelectThreadPupupMenu.Visible := False;
+ TreeSelectBoardPupupMenu.Visible := False;
+ TPMSep01.Visible := False;
+ TreeSelectURLPupupMenu.Visible := False;
+ TreeSelectNamePupupMenu.Visible := True;
+ TreeSelectNameURLPupupMenu.Visible := False;
+ TreeSelectFavoriteAddPupupMenu.Visible := False;
+ TreeSelectLogDeleteSeparator.Visible := False;
+ TreeSelectLogDeletePopupMenu.Visible := False;
+ end else if FClickNode.IsFirstNode then begin
+ TreeSelectThreadPupupMenu.Visible := False;
+ TreeSelectBoardPupupMenu.Visible := False;
+ TPMSep01.Visible := False;
+ TreeSelectURLPupupMenu.Visible := False;
+ TreeSelectNamePupupMenu.Visible := True;
+ TreeSelectNameURLPupupMenu.Visible := False;
+ TreeSelectFavoriteAddPupupMenu.Visible := False;
+ TreeSelectLogDeleteSeparator.Visible := False;
+ TreeSelectLogDeletePopupMenu.Visible := False;
+ end else begin
+ TreeSelectThreadPupupMenu.Visible := False;
+ TreeSelectBoardPupupMenu.Visible := False;
+ TPMSep01.Visible := False;
+ TreeSelectURLPupupMenu.Visible := False;
+ TreeSelectNamePupupMenu.Visible := False;
+ TreeSelectNameURLPupupMenu.Visible := False;
+ TreeSelectFavoriteAddPupupMenu.Visible := False;
+ TreeSelectLogDeleteSeparator.Visible := False;
+ TreeSelectLogDeletePopupMenu.Visible := False;
end;
end;
-procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
+procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
+ var ppDisp: IDispatch; var Cancel: WordBool);
+var
+ Text: string;
+ Html: string;
+ URL: string;
+ idx: Integer;
+ wkIntSt: Integer;
+ wkIntTo: Integer;
+ BNum, BRes: string;
+ threadItem: TThreadItem;
+ aElement : IHTMLElement;
begin
- ListView.ViewStyle := vsIcon;
- LargeIconAction.Checked := True;
-end;
+ Cancel := True;
+ aElement := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement;
+ if ( aElement <> nil) then begin
+ Text := aElement.Get_outerText;
+ Html := aElement.Get_outerHTML;
+ 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
-procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
-begin
- ListView.ViewStyle := vsSmallIcon;
- SmallIconAction.Checked := True;
-end;
+ Text := ZenToHan(Trim(Text));
-procedure TGikoForm.ListIconActionExecute(Sender: TObject);
-begin
- ListView.ViewStyle := vsList;
- ListIconAction.Checked := True;
-end;
+ if(AnsiPos('>>', Text) = 1) then begin
+ //Text := Copy(Text, 3, Length(Text) - 2);
+ Delete(Text, 1, 2);
+ end else begin
+ //Text := Copy(Text, 2, Length(Text) - 1);
+ Delete(Text, 1, 1);
+ end;
-procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
-begin
- ListView.ViewStyle := vsReport;
- DetailIconAction.Checked := True;
-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 begin
+ wkIntSt := StrToIntDef(Text, 0);
+ end;
-procedure TGikoForm.SearchActionExecute(Sender: TObject);
-var
- chk: TObject;
-begin
+ if wkIntSt <> 0 then begin
+ FActiveContent.IDAnchorPopup('');
+ MoveHisotryManager.pushItem(FActiveContent);
+ BrowserMovement(IntToStr(wkIntSt));
+ end;
- 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;
+ end;
+ end else begin
+ ////'http://be.2ch.net/test/p.php?i='+id+'&u=d:'+bas+num
- try
- FSearchDialog.Show;
- except
+ URL := GikoSys.GetHRefText(Html);
+ URL := GikoSys.HTMLDecode(URL);
+ if AnsiPos('BE:', URL) = 1 then begin
+ BNum := Copy(URL, 4, AnsiPos('/', URL) - 4);
+ BRes := Copy(URL, AnsiPos('/', URL) + 1, Length(URL));
+ threadItem := FActiveContent.Thread;
+ if threadItem = nil then Exit;
+ URL := BE_PHP_URL + BNum + '&u=d'
+ + CustomStringReplace(threadItem.URL, 'l50', '') + BRes;
+ end;
+
+ if( AnsiPos('http://', URL) = 1) or (AnsiPos('https://', URL) = 1) or
+ ( AnsiPos('ftp://', URL) = 1) then begin
+ //\83A\83h\83\8c\83X\83o\81[\82Ì\97\9a\97ð
+ if GikoSys.Setting.LinkAddAddressBar then begin
+ 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);
+ end;
+ end;
+ MoveHisotryManager.pushItem(FActiveContent);
+ MoveToURL( URL );
+ end;
+ end;
end;
end;
-procedure TGikoForm.OptionActionExecute(Sender: TObject);
-var
- Dlg: TOptionDialog;
+procedure TGikoForm.ListSplitterMoved(Sender: TObject);
begin
- Dlg := TOptionDialog.Create(Self);
- try
- Dlg.ShowModal;
- finally
- Dlg.Release;
+ if Mouse.Capture <> 0 then
+ Exit;
+ if GikoSys.Setting.ListOrientation = gloHorizontal then begin
+ if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
+ FBrowserSizeWidth := ViewPanel.Width;
+ end else begin
+ if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
+ FBrowserSizeHeight := ViewPanel.Height;
end;
+ if GikoSys.Setting.ListOrientation = gloHorizontal then begin
+ if ViewPanel.Width < 2 then begin
+ ViewPanel.Width := 1;
+ 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
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
+ GikoSys.Setting.ListWidthState := glsMin;
+ end else begin
+ 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;
+ 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
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
+ GikoSys.Setting.ListHeightState := glsMin;
+ end else begin
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
+ GikoSys.Setting.ListHeightState := glsNormal;
+ end;
+ end;
+{ if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
+ FBrowserSizeHeight := ViewPanel.Height
+ else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
+ FBrowserSizeWidth := ViewPanel.Width;}
end;
-procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
-const
- URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
-begin
- GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
-end;
-
-procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
-const
- URL_MONAZILLA: string = 'http://www.monazilla.org/';
+procedure TGikoForm.BrowserTabChange(Sender: TObject);
+var
+ i, j: Integer;
+ idx: Integer;
begin
- GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
-end;
+ 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);
-procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
-const
- URL_2ch: string = 'http://www.2ch.net/';
-begin
- GikoSys.OpenBrowser(URL_2ch, gbtAuto);
-end;
+ 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;
+ 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]));
-procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
-begin
-// GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
- GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
-end;
+ if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
+ AddressComboBox.Text := GetActiveContent.URL;
-procedure TGikoForm.AboutActionExecute(Sender: TObject);
-var
- Dlg: TAboutDialog;
-begin
- Dlg := TAboutDialog.Create(Self);
- try
- Dlg.ShowModal;
+ 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
- Dlg.Release;
+ BrowserTab.Tabs.EndUpdate;
end;
end;
-procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
-begin
- ShowHistoryTree;
-end;
-procedure TGikoForm.CabinetVisible( isVisible : Boolean );
+procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
+ Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+var
+ p: TPoint;
+ p2: TPoint;
+ idx: Integer;
begin
- TreeSplitter.Visible := isVisible;
- CabinetPanel.Visible := isVisible;
- CabinetVisibleAction.Checked := isVisible;
+ if Button = mbMiddle then begin
+ // \83}\83E\83X\92\86\83{\83^\83\93
+ GetCursorPos(p);
+ p2 := p;
+ p := BrowserTab.ScreenToClient(p);
+ idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
+ if idx <> -1 then
+ DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
+ end else if Button = mbLeft then begin
+ FDragWFirst := true;
+ FMouseDownPos.X := X;
+ FMouseDownPos.Y := Y;
+ end;
+
end;
-procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
+procedure TGikoForm.SetBrowserTabState;
+var
+ CoolBand: TCoolBand;
begin
- case FTreeType of
- gttHistory: CabinetHistoryAction.Execute;
- gttFavorite: CabinetFavoriteAction.Execute;
- else
- CabinetBBSAction.Execute;
+ BrowserBottomPanel.AutoSize := False;
+ if GikoSys.Setting.BrowserTabVisible then begin
+ 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;
+
+ 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;
+ GikoDM.AllTabCloseAction.Execute;
end;
end;
-procedure TGikoForm.AllItemActionExecute(Sender: TObject);
+procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
+ Y: Integer; State: TDragState; var Accept: Boolean);
+var
+ idx: Integer;
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;
+ idx := BrowserTab.IndexOfTabAt(X, Y);
+ Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
end;
-procedure TGikoForm.LogItemActionExecute(Sender: TObject);
+procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
+ Y: Integer);
+var
+ idx: Integer;
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;
+ idx := BrowserTab.IndexOfTabAt(X, Y);
+ if idx <> -1 then
+ BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
end;
-procedure TGikoForm.NewItemActionExecute(Sender: TObject);
+procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
+ Shift: TShiftState; X, Y: Integer);
+var
+ TabIdx: Integer;
+ ThreadItem: TThreadItem;
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;
+ TabIdx := BrowserTab.IndexOfTabAt(x, y);
+
+ if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
+ if FDragWFirst = false then begin
+ FDragWFirst := true;
+ end else begin
+ BrowserTab.EndDrag(false);
+ BrowserTab.BeginDrag(false, DandD_THRESHOLD);
+ FDragWFirst := false;
end;
- except
+ end else begin
+ BrowserTab.EndDrag(false);
+ FDragWFirst := false;
+ end;
+
+ if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
+ Application.CancelHint;
+ ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[TabIdx]).Thread;
+ if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
+ BrowserTab.Hint := ThreadItem.Title;
+ Application.ShowHint := True;
+ end else begin
+ BrowserTab.Hint := '';
+ Application.ShowHint := True;
+ end;
+ FTabHintIndex := TabIdx;
end;
+
end;
-procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
+procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
+ const pDisp: IDispatch; var URL: OleVariant);
var
- idx: Integer;
- Dlg: TListSelectDialog;
+ FDispHtmlDocument: DispHTMLDocument;
+ BrowserRecord :TBrowserRecord;
+ i :Integer;
+ doc : Variant;
+ threadItem : TThreadItem;
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;
+ if TObject(Sender) is TWebBrowser then begin
+ BrowserRecord := nil;
+ if TWebBrowser(Sender) <> Browser then begin
+ for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
+ BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
+ break;
+ end;
+ end;
+ if BrowserRecord <> nil then begin
+ if BrowserRecord.Event <> nil then
+ BrowserRecord.Event.Free;
+ FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
+ 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
+ FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument;
+ if FEvent <> nil then
+ FEvent.Free;
+ 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;
- SelectComboBox.SetFocus;
- exit;
end;
+
end;
- except
- end;
- if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
- SelectComboBox.Text := '';
- SelectComboBox.Color := clWindow;
- end;
+ if (BrowserRecord <> nil) and
+ Assigned( BrowserRecord.Thread ) then begin
+ threadItem := BrowserRecord.Thread;
- 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 (threadItem.JumpAddress > 0) then begin
+ if threadItem.UnRead then begin
+ threadItem.UnRead := False;
+ TreeView.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;
- 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 else if threadItem.UnRead then begin
+ threadItem.UnRead := False;
+ TreeView.Refresh;
+ BrowserRecord.Move('new');
+ RefreshListView(threadItem);
+ end else if threadItem.ScrollTop <> 0 then begin
+ try
+ doc := Idispatch( OleVariant( BrowserRecord.Browser.ControlInterface ).Document ) as IHTMLDocument2;
+ doc.Body.ScrollTop := threadItem.ScrollTop;
+ except
+ on E: Exception do
+ MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
+ end;
end;
- SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
end;
- finally
- Dlg.Release;
end;
+ LockWindowUpdate(0);
end;
-procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
+procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
begin
- GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
- ListView.Refresh;
+ AddRoundNameMenu(RoundNamePopupMenu.Items);
end;
-procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
+procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
+var
+ i: Integer;
+ Item: TMenuItem;
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);
+ MenuItem.Clear;
+ Item := TMenuItem.Create(Self);
+ Item.Caption := '\90V\82µ\82¢\96¼\91O\82Å\8f\84\89ñ\97\\96ñ(&N)...';
+ 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 := GikoDM.SelectDeleteRoundExecute;
+ MenuItem.Add(Item);
+ Item := TMenuItem.Create(Self);
+ Item.Caption := '-';
+ MenuItem.Add(Item);
+ for i := 0 to RoundList.RoundNameList.Count - 1 do begin
+ Item := TMenuItem.Create(Self);
+ Item.Caption := RoundList.RoundNameList[i];
+ Item.OnClick := SetSelectRoundName;
+ MenuItem.Add(Item);
end;
end;
-procedure TGikoForm.RoundActionExecute(Sender: TObject);
+procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
var
- Dlg: TRoundDialog;
+ threadItem : TThreadItem;
begin
- Dlg := TRoundDialog.Create(Self);
- try
- Dlg.ShowModal;
- finally
- Dlg.Release;
+ if ParentName <> 'dummy1' then begin
+ SetSelectItemRound(RoundFlag, RoundName);
+ end else begin
+ threadItem := GetActiveContent;
+ if threadItem <> nil then begin
+ threadItem.RoundName := RoundName;
+ if RoundFlag then
+ RoundList.RoundNameList.Add(RoundName);
+ threadItem.Round := RoundFlag;
+ end;
end;
end;
-procedure TGikoForm.StopActionExecute(Sender: TObject);
+procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
+var
+ i{, idx}: Integer;
+ List: TList;
begin
- FControlThread.DownloadAbort;
- if FWorkCount <> 0 then FWorkCount := 0;
+ List := TList.Create;
try
- Animate.Active := False;
- except
+ SelectListItem(List);
+ for i := 0 to List.Count - 1 do begin
+ 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;
- 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);
+procedure TGikoForm.SetSelectRoundName(Sender: TObject);
+var
+ MenuItem: TMenuItem;
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;
+ if Sender is TMenuItem then begin
+ MenuItem := TMenuItem(Sender);
+ SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
+ ListView.Refresh;
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);
+function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
+var
+ i: Integer;
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;
+ 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.ScrollTopActionExecute(Sender: TObject);
-begin
- BrowserMovement('top');
-end;
-
-procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
-begin
- BrowserMovement('bottom');
-end;
-
-procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
+procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
begin
- BrowserMovement('new');
+ if BrowserTab.Parent = BrowserTabToolBar then
+ BrowserTab.Width := BrowserTabToolBar.Width;
end;
-procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
+procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
begin
- BrowserMovement('koko');
+ SetMenuFont;
end;
-procedure TGikoForm.EditorActionExecute(Sender: TObject);
-var
- Editor: TEditorForm;
- Item: TThreadItem;
+procedure TGikoForm.SetMenuFont;
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;
+// GikoSys.MenuFont(MenuToolBar.Font);
+// MenuToolBar.Buttons[0].AutoSize := False;
+// MenuToolBar.Buttons[0].AutoSize := True;
+// MenuToolBar.Font.Color := clMenuText;
+ GikoSys.MenuFont(MainCoolBar.Font);
+ MenuToolBar.Buttons[0].AutoSize := False;
+ MenuToolBar.Buttons[0].AutoSize := True;
+ MainCoolBar.AutoSize := False;
+ MainCoolBar.AutoSize := True;
-procedure TGikoForm.IEActionExecute(Sender: TObject);
-begin
- ShowThreadAction.Execute;
+ GikoSys.MenuFont(ListCoolBar.Font);
+ GikoSys.MenuFont(BrowserCoolBar.Font);
+// MenuToolBar.Font.Color := clMenuText;
end;
-procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
+procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
var
- ThreadItem: TThreadItem;
+ NewMenu: TMenuItem;
begin
- ThreadItem := GetActiveContent;
- if ThreadItem = nil then Exit;
- GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
-end;
+ if FavoriteDM.Modified then begin
+ FavoriteMenu.Clear;
-procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
-begin
- ThreadItem := GetActiveContent;
- if ThreadItem = nil then Exit;
- GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
+ //\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;
-//(Thread)URL\82ð\83R\83s\81[
-procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
+procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
var
- s: string;
+ i: Integer;
+ NewMenu: array of TMenuItem;
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;
+ 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;
-//(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;
+ 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;
-//(Thread)\83X\83\8c\83b\83h\96¼\82ÆURL\82ð\83R\83s\81[
-procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
+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
- s: string;
+ Dlg : TFavoriteAddDialog;
+ ItemURL : string;
+ Data : Pointer;
+ Node : TTreeNode;
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;
+ if Item is TFavoriteBoardItem then
+ Item := TFavoriteBoardItem( Item ).Item
+ else if Item is TFavoriteThreadItem then
+ Item := TFavoriteThreadItem( Item ).Item;
-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);
+ Node := FavoriteTreeView.Items.GetFirstNode;
+ if Item is TBoard then begin
+ ItemURL := TBoard( Item ).URL;
+ while Node <> nil do begin
+ Data := Node.Data;
+ if TObject( Data ) is TFavoriteBoardItem then begin
+ if ItemURL = TFavoriteBoardItem( Data ).URL then begin
+ if Application.MessageBox(PChar(MsgAdd) , PChar(TitleAdd), MB_YESNO ) = IDNO then
+ Exit;
+ Break;
+ end;
end;
+ Node := Node.GetNext;
+ end;
+ Dlg := TFavoriteAddDialog.Create(Self);
+ try
+ Dlg.SetBoard( TBoard( Item ) );
+ Dlg.ShowModal;
finally
- List.Free;
+ Dlg.Release;
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 else if Item is TThreadItem then begin
+ ItemURL := TThreadItem( Item ).URL;
+ while Node <> nil do begin
+ Data := Node.Data;
+ if TObject( Data ) is TFavoriteThreadItem then begin
+ if ItemURL = TFavoriteThreadItem( Data ).URL then begin
+ if Application.MessageBox( PChar(MsgAdd), PChar(TitleAdd), MB_YESNO ) = IDNO then
+ Exit;
+ Break;
+ end;
+ end;
+ Node := Node.GetNext;
end;
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TThreadItem then
- DownloadContent(TThreadItem(List[i]), shiftDown);
+ Dlg := TFavoriteAddDialog.Create(Self);
+ try
+ Dlg.SetThreadItem( TThreadItem( Item ) );
+ Dlg.ShowModal;
+ finally
+ Dlg.Release;
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
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- 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;
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
-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
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
-{$IFDEF ACTCHK}
end;
-{$ENDIF}
+
+ SetLinkBar;
end;
-procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
+procedure TGikoForm.FavoriteClick(Sender: TObject);
begin
- UpFolderAction.Enabled := not (GetActiveList is TBBS);
+ FavoriteClick( Sender, True );
end;
-procedure TGikoForm.FormResize(Sender: TObject);
+procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
+var
+ Board: TBoard;
+ ThreadItem: TThreadItem;
+ FavBoard: TFavoriteBoardItem;
+ FavThread: TFavoriteThreadItem;
+ Item: TObject;
begin
+// Item := nil;
+ if Sender is TFavoriteMenuItem then
+ Item := TFavoriteMenuItem(Sender).Data
+ else if Sender is TLinkToolButton then
+ Item := TLinkToolButton(Sender).Data
+ else if Sender is TTreeNode then
+ Item := TTreeNode( Sender ).Data
+ else
+ Exit;
- 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;
+ if TObject(Item) is TFavoriteBoardItem then begin
+ FavBoard := TFavoriteBoardItem(Item);
+ Board := FavBoard.Item;
+ if Board <> nil then begin
+ if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
+ ShowBBSTree( Board.ParentCategory.ParenTBBS );
+ SelectTreeNode(Board, True);
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 else if TObject(Item) is TFavoriteThreadItem then begin
+ FavThread := TFavoriteThreadItem(Item);
+ ThreadItem := FavThread.Item;
+ if ThreadItem = nil then
+ Exit;
+
+ InsertBrowserTab(ThreadItem, ActiveTab);
+
+ if GikoSys.Setting.ListOrientation = gloHorizontal then begin
+ if GikoSys.Setting.ListWidthState = glsMin then begin
+ GikoDM.BrowserMaxAndFocusAction.Execute;
+ end;
+ end else begin
+ if GikoSys.Setting.ListHeightState = glsMin then begin
+ GikoDM.BrowserMaxAndFocusAction.Execute;
+ end;
end;
end;
+end;
- FIsIgnoreResize := rtResizing;
- PostMessage( Handle, USER_RESIZED, 0, 0 );
+procedure TGikoForm.BBSMenuItemOnClick(
+ Sender : TObject
+);
+begin
+ if Sender is TBBSMenuItem then
+ ShowBBSTree( TBBSMenuItem( Sender ).Data );
end;
-procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
+procedure TGikoForm.MainCoolBarResize(Sender: TObject);
begin
- ScrollKokoAction.Enabled := (GetActiveContent <> nil)
- and (GetActiveContent.IsLogFile)
- and (GetActiveContent.Kokomade <> -1);
+ TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
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);
+//! \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
+ stRes, edRes : Int64;
+ browserRec : TBrowserRecord;
+ threadNumber : String;
+ doc : Variant;
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0);
-{$IFDEF ACTCHK}
+ 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;
-{$ENDIF}
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';
+procedure TGikoForm.MoveToURL(const inURL: string);
var
+ protocol, host, path, document, port, bookmark : string;
+ URL, protocol2, host2, path2, document2, port2, bookmark2 : string;
+ tmp1, tmp2: string;
+ BBSID, BBSKey: string;
+ {tmpBoard,} Board: TBoard;
ThreadItem: TThreadItem;
- TmpListItem: TListItem;
- List: TList;
- i: Integer;
+ i, bi : Integer;
+ boardURL : string;
+ tmpThread : TThreadItem;
+ shiftDown : Boolean;
+ ctrlDown : Boolean;
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;
+ GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark );
+ GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey );
- 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;
+
+ shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
+ ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
+ if shiftDown then begin
+ GikoSys.OpenBrowser(inURL, gbtUserApp);
+ Exit;
+ end else if ctrlDown then begin
+ GikoSys.OpenBrowser(inURL, gbtIE);
+ Exit;
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
+
+ //===== \83v\83\89\83O\83C\83\93
+ try
+ //\8dì\8bÆ\92\86//
+ bi := Length(BoardGroups) - 1;
+ for i := 1 to bi do begin
+ if (BoardGroups[i].BoardPlugIn <> nil) and (Assigned(Pointer(BoardGroups[i].BoardPlugIn.Module))) then begin
+ case BoardGroups[i].BoardPlugIn.AcceptURL( inURL ) of
+ atThread:
begin
- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
- break;
+ boardURL := BoardGroups[i].BoardPlugIn.ExtractBoardURL( inURL );
+ Board := BBSsFindBoardFromURL( boardURL );
+
+
+ if Board = nil then begin
+ //break;
+ // \81¦\8dì\82Á\82Ä\82à\92Ç\89Á\82·\82é\82Æ\82±\82ë\82ª\96³\82¢\82Ì\82Å\8c\83\82µ\82\95Û\97¯
+ //GikoSys.OpenBrowser(inURL, gbtUserApp);
+ //Exit;
+ {
+ Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
+ if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
+ ShowBBSTree( BBSs[ 1 ] );
+ }
+ end else begin
+ tmpThread := TThreadItem.Create( BoardGroups[i].BoardPlugIn, Board, inURL );
+ if not Board.IsThreadDatRead then begin
+ GikoSys.ReadSubjectFile( Board );
+ tmpThread.Free;
+ Exit;
+ end;
+ ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
+ if ThreadItem = nil then begin
+ //tmpThread\82ð\82±\82Á\82¿\82Í\8aJ\95ú\82µ\82Ä\82Í\82¢\82¯\82È\82¢
+ ThreadItem := tmpThread;
+ Board.Insert( 0, ThreadItem );
+ if ActiveList is TBoard then begin
+ if TBoard(ActiveList) = Board then
+ ListView.Items.Count := ListView.Items.Count + 1;
+ end;
+ end else begin
+ tmpThread.Free;
+ end;
+ OpenThreadItem(ThreadItem, inURL);
+ Exit;
+ end;
+ end;
+
+ atBoard:
+ begin
+ Board := BBSsFindBoardFromURL(
+ BoardGroups[i].BoardPlugIn.ExtractBoardURL( inURL )
+ );
+ if Board <> nil then begin
+ if FActiveBBS <> Board.ParentCategory.ParenTBBS then
+ ShowBBSTree( Board.ParentCategory.ParenTBBS );
+ SelectTreeNode( Board, True );
+ Exit;
+ end;
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;
+ except
+ // exception \82ª\94\90¶\82µ\82½\8fê\8d\87\82Í\93à\95\94\8f\88\97\9d\82É\94C\82¹\82½\82¢\82Ì\82Å\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢
end;
-end;
-procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
-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]).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;
- 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;
+
+ if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
+ boardURL := GikoSys.Get2chThreadURL2BoardURL( inURL );
+ Board := BBSsFindBoardFromURL( boardURL );
+ 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);
+ Exit;
+ end else begin
+ // \8aO\95\94\82Ì\94Â\82È\82Ì\82É2ch\82ÌURL\82É\82³\82ê\82Ä\82µ\82Ü\82Á\82½\93z\82ð\82±\82±\82Å\8am\94F\82·\82é
+ URL := Board.URL;
+ GikoSys.ParseURI(URL , protocol2, host2, path2, document2, port2, bookmark2 );
+ tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host));
+ tmp2 := Copy(host2, AnsiPos('.', host2) + 1, Length(host2));
+ if ( not GikoSys.Is2chHost(tmp1)) and (tmp1 <> tmp2) then begin
+ GikoSys.OpenBrowser(inURL, gbtUserApp);
+ Exit;
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;
+
+ if not Board.IsThreadDatRead then
+ GikoSys.ReadSubjectFile(Board);
+ URL := GikoSys.Get2chBrowsableThreadURL( inURL );
+ ThreadItem := Board.FindThreadFromURL( URL );
+ //\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)
+ if ThreadItem = nil then begin
+ ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
+ end;
+ 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;
- 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;
+ // \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 := '';
+ end;
+ OpenThreadItem(ThreadItem, inURL);
+ except
+ end;
+ end else begin
+ Board := BBSsFindBoardFromURL( inURL );
+ if Board = nil then begin
+ GikoSys.OpenBrowser(inURL, gbtAuto);
+ end else begin
+ if FActiveBBS <> Board.ParentCategory.ParenTBBS then
+ ShowBBSTree( Board.ParentCategory.ParenTBBS );
+ SelectTreeNode( Board, True );
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;
+procedure TGikoForm.AddressToolBarResize(Sender: TObject);
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Ì
- //\83\81\83j\83\85\81[\82Ì\83V\83\87\81[\83g\83J\83b\83g\83L\81[\82ª\83T\83u\83\81\83j\83\85\81[\82©\82ç\93ü\97Í\82³\82ê\82é\82Ì\82ð\89ñ\94ð
- Result := False;
- case Message.Msg of
- CM_APPKEYDOWN:
- Result := True; //\83V\83\87\81[\83g\83J\83b\83g\83L\81[\96³\8cø
- CM_APPSYSCOMMAND:
- Result := True; // \83A\83N\83Z\83\89\83\8c\81[\83^\82ð\96³\8cø\82É\82·\82é
- end;
+ AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
+ CoolBarResized( Sender, MainCoolBar );
end;
-procedure TGikoForm.KokoResActionExecute(Sender: TObject);
-var
- Editor: TEditorForm;
- Item: TThreadItem;
- Number: Integer;
+procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
+ Shift: TShiftState);
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;
+ if Key = VK_RETURN then
+ GikoDM.MoveToAction.Execute;
end;
-procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
+procedure TGikoForm.BrowserEnter(Sender: TObject);
begin
- ItemRoundPMenu.Visible := (GetActiveList is TBoard);
- ItemReservPMenu.Visible := (GetActiveList is TBoard);
- LPMSep01.Visible := (GetActiveList is TBoard);
- ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
- ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
- LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
- KidokuPMenu.Visible := (GetActiveList is TBoard);
- MidokuPMenu.Visible := (GetActiveList is TBoard);
- UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
- NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
- AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
- LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
- DeletePMenu.Visible := (GetActiveList is TBoard);
- LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
- BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
- ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
-
- AddRoundNameMenu(ItemReservPMenu);
- AddRoundNameMenu(ListReservPMenu);
+ Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
end;
-procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
+procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
var
- URL: string;
+ CDS:PCopyDataStruct;
+ PC:PChar;
+ sURL: string;
begin
- if GetActiveList is TBoard then begin
- URL := TBoard(GetActiveList).URL;
- GikoSys.OpenBrowser(URL, gbtAuto);
+ CDS := Message.CopyDataStruct;
+ GetMem(PC, CDS^.cbData);
+ try
+ lstrcpy(PC,CDS^.lpData);
+ SetString(sURL, PC,lstrlen(PC));
+ MoveToURL(sURL);
+ finally
+ FreeMem(PC);
end;
+ Message.Result := 1;
end;
-procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
+procedure TGikoForm.WndProc(var Message: TMessage);
var
- List: TList;
- i: Integer;
- s: string;
+ senderBrowser : TWebBrowser;
+ url : OleVariant;
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;
+ case Message.Msg of
+ CM_DIALOGCHAR:
+ if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
+ Exit;
+ WM_SYSCOMMAND:
+ if Message.WParam = SC_MINIMIZE then begin
+ OnMinimize;
+ PostMessage(Handle, USER_MINIMIZED, 0, 0);
+ end;
+ USER_TREECLICK:
+ TreeClick( TreeView.Selected );
+ USER_RESIZED:
+ OnResized;
+ USER_MINIMIZED:
+ begin
+ if (GikoSys.Setting.StoredTaskTray) then begin
+ StoredTaskTray;
+ end;
+ OnMinimized;
+ end;
+ USER_SETLINKBAR:
+ SetLinkBar;
+ USER_DOCUMENTCOMPLETE:
+ if (Message.WParam <> 0) and
+ (TObject(Message.WParam) is TWebBrowser) then begin
+ senderBrowser := TWebBrowser( Message.WParam );
+ BrowserDocumentComplete( senderBrowser, senderBrowser.Parent, url );
+ end;
end;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- List.Free;
+
+ inherited;
+ except
end;
end;
-procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
+procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
var
- List: TList;
- i: Integer;
- s: string;
+ handle: THandle;
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;
+ 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
+ //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;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- List.Free;
+ end else if (AddressComboBox.Focused) or (SelectComboBox.Focused) then begin
+ if Msg.CharCode in [VK_BACK] then begin
+ //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
+ handle := GetFocus;
+ if handle <> 0 then
+ SendMessage(handle, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
+ Handled := True;
+ end;
+ end else begin
+ Handled := GikoDM.GikoFormActionList.IsShortCut(Msg);
end;
end;
-procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
+procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
var
- List: TList;
- i: Integer;
- s: string;
+ p: TPoint;
+ ARect: TRect;
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;
+ PreviewTimer.Enabled := False;
+
+ GetCursorpos(p);
+
+ ARect := FPreviewBrowser.GetWindowRect(p);
+
+ FPreviewBrowser.PreviewImage(FPreviewURL);
+
+ if ARect.Bottom > Screen.DesktopHeight then
+ ARect.Top := Screen.DesktopHeight - (ARect.Bottom - ARect.Top);
+ if ARect.Right > Screen.DesktopWidth then
+ ARect.Left := Screen.DesktopWidth - (ARect.Right - ARect.Left);
+ if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
+ if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
+
+ SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST,
+ ARect.Left, ARect.Top,
+ (ARect.Right - ARect.Left), (ARect.Bottom - ARect.Top),
+ SWP_NOACTIVATE or SWP_HIDEWINDOW);
+
+ ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
+ FPreviewBrowserRect := ARect;
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);
+procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
+var
+ Pos : TPoint;
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
- TAction(Sender).Enabled := True
- else
- TAction(Sender).Enabled := False;
-{$IFDEF ACTCHK}
+
+ if PreviewTimer.Enabled then
+ PreviewTimer.Enabled := False;
+ if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
+ FHint.ReleaseHandle;
+ FHint.ClearAllRes;
end;
-{$ENDIF}
-end;
+ 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;
-procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
+ Message.Result := 1;
+ inherited;
+end;
+procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
begin
- AllSelectAction.Enabled := ListView.SelCount > 0;
+ GikoDM.MsgBarCloseAction.Execute;
end;
-procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
+function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
var
- idx: Integer;
-// ThreadItem: TThreadItem;
+ Doc: IHtmlDocument2;
+ Range: IHTMLTxtRange;
+ s: string;
+ Num: 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]));
+ Result := False;
+ 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É
+ s := ZenToHan(Trim(s));
+ if GikoSys.IsNumeric(s) then begin
+
+ ThreadItem := GetActiveContent;
+ if ThreadItem <> nil then begin
+ Num := StrToInt64(s);
+ FHint.PopupType := gptThread;
+ HTMLCreater.SetResPopupText(FHint, ThreadItem, Num, Num, False, False);
+ if FHint.ResCount <> 0 then
+ ShowTextPopup;
+ Result := False;
+ end else
+ Result := True;
+ end else begin
+ Result := True;
end;
end;
end;
-procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
+procedure TGikoForm.ShowTextPopup;
var
- i: Integer;
- idx: Integer;
+ p: TPoint;
+ ARect: TRect;
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);
+// if Trim(s) = '' then
+// Exit;
+ try
+ FHint.Font.Name := GikoSys.Setting.HintFontName;
+ FHint.Font.Size := GikoSys.Setting.HintFontSize;
+ FHint.Font.Color := GikoSys.Setting.HintFontColor;
+ FHint.Color := GikoSys.Setting.HintBackColor;
+ FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
+ GetCursorpos(p);
+ if FHint.PopupType = gptRaw then
+ ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
+ else
+ ARect := FHint.CalcHintRect(Screen.Width, '', nil);
+ case GikoSys.Setting.PopupPosition of
+ gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
+ gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
+ gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
+ gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
+ gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
+ gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
+ gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
+ gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
+ gppLeftBottom: OffsetRect(ARect, p.x + 15, p.y + 15); //\83M\83R\83i\83r\83X\83\8c \83p\81[\83g\82P\82Ì453\8e\81\82É\8a´\8eÓ
end;
+ //FHint.ActivateHint(ARect, s);
+ if FHint.PopupType = gptRaw then
+ FHint.ActivateHint(ARect, FHint.Caption)
+ else
+ FHint.ActivateHint(ARect, '');
+ except
+ FHint.ReleaseHandle;
+ FHint.ClearAllRes;
+ end;
+end;
+
+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';
+begin
+ if FTreeType = gttHistory then 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;
+ ClearHistory;
+ FHistoryList.Clear;
+ TreeView.Items.Clear;
end;
- BrowserTab.Tabs.EndUpdate;
end;
-procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
+procedure TGikoForm.SetLinkBar;
var
i: Integer;
+ j: Integer;
+ ToolButton: TLinkToolButton;
+ MenuItem: TMenuItem;
+ oldIgnoreResize : TResizeType;
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;
+ oldIgnoreResize := FIsIgnoreResize;
+ FIsIgnoreResize := rtResizing;
+ MainCoolBar.Bands.BeginUpdate;
+ try
+ LinkBarPopupMenu.Items.Clear;
+ for i := LinkToolBar.ButtonCount - 1 downto 0 do
+ //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
+ LinkToolBar.Buttons[i].Free;
+ for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
+ if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
+ for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
+ ToolButton := TLinkToolButton.Create(LinkToolBar);
+// ToolButton.Parent := LinkToolBar;
+ if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
+ MenuItem := TMenuItem.Create(Self);
+ CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
+ LinkBarPopupMenu.Items.Add(MenuItem);
+ ToolButton.MenuItem := MenuItem;
+ ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_FOLDER;
+ end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
+ 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 := GikoDataModule.TOOL_ICON_FAV_THREAD;
+ ToolButton.OnClick := FavoriteClick;
+ end;
+ ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
+ ToolButton.Left := 10000;
+ ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
+ ToolButton.AutoSize := True;
+ ToolButton.OnDragDrop := LinkToolButtonDragDrop;
+ ToolButton.OnDragOver := FavoriteDragOver;
+ ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
+ ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
+ ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
+ ToolButton.OnStartDrag := LinkToolButtonStartDrag;
+ //ToolButton.DragMode := dmAutomatic;
+ ToolButton.DragMode := dmManual;
+ ToolButton.PopupMenu := FavoriteTreePopupMenu;
- 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;
+ LinkToolBar.InsertControl(ToolButton);
+ end;
+ break;
+ end;
+ end;
+{ if LinkToolBar.ButtonCount = 0 then begin
+ ToolButton := TLinkToolButton.Create(LinkToolBar);
+ ToolButton.Style := tbsButton;
+ ToolButton.ImageIndex := -1;
+ ToolButton.Caption := '';
+ LinkToolBar.InsertControl(ToolButton);
+ end;}
+ finally
+ MainCoolBar.Bands.EndUpdate;
+ LoadCoolBarSettings;
+ FIsIgnoreResize := oldIgnoreResize;
end;
- BrowserTab.Tabs.Clear;
- BrowserTab.Tabs.EndUpdate;
- BrowserTab.OnChange := BrowserTabChange;
- SetContent(BrowserNullTab);
- Self.Caption := CAPTION_NAME ;
end;
-procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
+procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
var
- Board: TBoard;
- TmpTreeNode: TTreeNode;
+ Node: TTreeNode;
+ bound: TRect;
+ height: Integer;
+ Change: Boolean;
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 Sender = FavoriteTreeView then begin
+ Node := FavoriteTreeView.GetNodeAt(X, Y);
- if Board <> nil then
- DownloadList(Board);
-end;
+ if Node = nil then
+ Exit;
-procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
- TmpTreeNode: TTreeNode;
-begin
- TmpTreeNode := FClickNode;
- TreeView.Selected := FClickNode;
- ThreadItem := nil;
+ bound := Node.DisplayRect( False );
+ height := bound.Bottom - bound.Top;
+ if (bound.Top + height / 2) <= Y then
+ Node := FavoriteTreeView.GetNodeAt(X, Y + height);
- 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 Node = nil then
+ Exit;
- if ThreadItem <> nil then
- DownloadContent(ThreadItem);
-end;
+ if Node.IsFirstNode then
+ Exit;
-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;
+ Change := True;
-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;
+ if FDropSpaceNode <> nil then
+ if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
+ Change := False;
+
+ if Change then begin
+ if FDropSpaceNode <> nil then
+ FDropSpaceNode.Free;
+
+ FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObjectFirst(Node.Parent, '', nil );
+ FDropSpaceNode.MoveTo( Node, naInsert );
+ FDropSpaceNode.ImageIndex := -1;
+ FDropSpaceNode.SelectedIndex := -1;
+ end;
end;
- Clipboard.AsText := s;
-end;
-procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
-begin
- FClickNode := TreeView.Selected;
- if FClickNode = nil then begin
- TreeSelectThreadPupupMenu.Visible := False;
- TreeSelectBoardPupupMenu.Visible := False;
- TPMSep01.Visible := False;
- TreeSelectURLPupupMenu.Visible := False;
- TreeSelectNamePupupMenu.Visible := False;
- TreeSelectNameURLPupupMenu.Visible := False;
- TreeSelectFavoriteAddPupupMenu.Visible := False;
- TreeSelectLogDeleteSeparator.Visible := False;
- TreeSelectLogDeletePopupMenu.Visible := False;
- end else if TObject(FClickNode.Data) is TBoard then begin
- TreeSelectThreadPupupMenu.Visible := False;
- TreeSelectBoardPupupMenu.Visible := True;
- TPMSep01.Visible := True;
- TreeSelectURLPupupMenu.Visible := True;
- TreeSelectNamePupupMenu.Visible := True;
- TreeSelectNameURLPupupMenu.Visible := True;
- TreeSelectFavoriteAddPupupMenu.Visible := True;
- TreeSelectLogDeleteSeparator.Visible := False;
- TreeSelectLogDeletePopupMenu.Visible := False;
- end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
- TreeSelectThreadPupupMenu.Visible := False;
- TreeSelectBoardPupupMenu.Visible := True;
- TPMSep01.Visible := True;
- TreeSelectURLPupupMenu.Visible := True;
- TreeSelectNamePupupMenu.Visible := True;
- TreeSelectNameURLPupupMenu.Visible := True;
- TreeSelectFavoriteAddPupupMenu.Visible := True;
- TreeSelectLogDeleteSeparator.Visible := False;
- TreeSelectLogDeletePopupMenu.Visible := False;
- end else if (TObject(FClickNode.Data) is TThreadItem) then begin
- TreeSelectThreadPupupMenu.Visible := True;
- TreeSelectBoardPupupMenu.Visible := False;
- TPMSep01.Visible := True;
- TreeSelectURLPupupMenu.Visible := True;
- TreeSelectNamePupupMenu.Visible := True;
- TreeSelectNameURLPupupMenu.Visible := True;
- TreeSelectFavoriteAddPupupMenu.Visible := True;
- TreeSelectLogDeleteSeparator.Visible := True;
- TreeSelectLogDeletePopupMenu.Visible := True;
- end else if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
- TreeSelectThreadPupupMenu.Visible := True;
- TreeSelectBoardPupupMenu.Visible := False;
- TPMSep01.Visible := True;
- TreeSelectURLPupupMenu.Visible := True;
- TreeSelectNamePupupMenu.Visible := True;
- TreeSelectNameURLPupupMenu.Visible := True;
- TreeSelectFavoriteAddPupupMenu.Visible := True;
- TreeSelectLogDeleteSeparator.Visible := True;
- TreeSelectLogDeletePopupMenu.Visible := True;
- end else if (TObject(FClickNode.Data) is TCategory) then begin
- TreeSelectThreadPupupMenu.Visible := False;
- TreeSelectBoardPupupMenu.Visible := False;
- TPMSep01.Visible := False;
- TreeSelectURLPupupMenu.Visible := False;
- TreeSelectNamePupupMenu.Visible := True;
- TreeSelectNameURLPupupMenu.Visible := False;
- TreeSelectFavoriteAddPupupMenu.Visible := False;
- TreeSelectLogDeleteSeparator.Visible := False;
- TreeSelectLogDeletePopupMenu.Visible := False;
- end else if FClickNode.IsFirstNode then begin
- TreeSelectThreadPupupMenu.Visible := False;
- TreeSelectBoardPupupMenu.Visible := False;
- TPMSep01.Visible := False;
- TreeSelectURLPupupMenu.Visible := False;
- TreeSelectNamePupupMenu.Visible := True;
- TreeSelectNameURLPupupMenu.Visible := False;
- TreeSelectFavoriteAddPupupMenu.Visible := False;
- TreeSelectLogDeleteSeparator.Visible := False;
- TreeSelectLogDeletePopupMenu.Visible := False;
- end else begin
- TreeSelectThreadPupupMenu.Visible := False;
- TreeSelectBoardPupupMenu.Visible := False;
- TPMSep01.Visible := False;
- TreeSelectURLPupupMenu.Visible := False;
- TreeSelectNamePupupMenu.Visible := False;
- TreeSelectNameURLPupupMenu.Visible := False;
- TreeSelectFavoriteAddPupupMenu.Visible := False;
- TreeSelectLogDeleteSeparator.Visible := False;
- TreeSelectLogDeletePopupMenu.Visible := False;
- end;
-end;
-
-procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
- var ppDisp: IDispatch; var Cancel: WordBool);
-var
- Text: string;
- Html: string;
- URL: string;
- idx: Integer;
- wkIntSt: Integer;
- wkIntTo: Integer;
- document: IHTMLDocument2;
- BNum, BRes: string;
- threadItem: TThreadItem;
-begin
-
- Cancel := True;
- if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
- Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
- Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
- 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);
-
- if(AnsiPos('>>', Text) = 1) then begin
- //Text := Copy(Text, 3, Length(Text) - 2);
- Delete(Text, 1, 2);
- end else begin
- //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
- wkIntSt := StrToIntDef(Text, 0);
-
- if wkIntSt <> 0 then begin
- document := FActiveContent.Browser.Document as IHTMLDocument2;
- IDAnchorPopup('');
- BrowserMovement(IntToStr(wkIntSt));
- end;
-
-
- end;
- end else begin
- ////'http://be.2ch.net/test/p.php?i='+id+'&u=d:'+bas+num
-
- URL := GikoSys.GetHRefText(Html);
- URL := GikoSys.HTMLDecode(URL);
- if AnsiPos('BE:', URL) = 1 then begin
- BNum := Copy(URL, 4, AnsiPos('/', URL) - 4);
- BRes := Copy(URL, AnsiPos('/', URL) + 1, Length(URL));
- threadItem := FActiveContent.Thread;
- if threadItem = nil then Exit;
- URL := BE_PHP_URL + BNum + '&u=d'
- + CustomStringReplace(threadItem.URL, 'l50', '') + BRes;
- end;
-
- if( AnsiPos('http://', URL) = 1) or (AnsiPos('https://', URL) = 1) or
- ( AnsiPos('ftp://', URL) = 1) then begin
- //\83A\83h\83\8c\83X\83o\81[\82Ì\97\9a\97ð
- if GikoSys.Setting.LinkAddAddressBar then begin
- 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);
- end;
- end;
- MoveToURL( URL );
- end;
- end;
- end;
-
-end;
-
-procedure TGikoForm.ListSplitterMoved(Sender: TObject);
-begin
- if Mouse.Capture <> 0 then
- Exit;
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
- FBrowserSizeWidth := ViewPanel.Width;
- end else begin
- if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
- FBrowserSizeHeight := ViewPanel.Height;
- 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;
- 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;
- GikoSys.Setting.ListWidthState := glsMin;
- end else begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := 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;
- 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;
- GikoSys.Setting.ListHeightState := glsMin;
- end else begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
- GikoSys.Setting.ListHeightState := glsNormal;
- end;
- end;
-{ if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
- FBrowserSizeHeight := ViewPanel.Height
- else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
- FBrowserSizeWidth := ViewPanel.Width;}
-end;
-
-procedure TGikoForm.BrowserTabChange(Sender: TObject);
-var
- i, j: Integer;
- idx: Integer;
-begin
-
-// 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;
- 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;
- 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]));
-
- 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;
-
- end;
-
- end;
-
-end;
-
-
-procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
- Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-var
- p: TPoint;
- p2: TPoint;
- idx: Integer;
-begin
- if Button = mbMiddle then begin
- // \83}\83E\83X\92\86\83{\83^\83\93
- GetCursorPos(p);
- p2 := p;
- p := BrowserTab.ScreenToClient(p);
- idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
- if idx <> -1 then
- DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
- end else if Button = mbLeft then begin
- FDragWFirst := true;
- FMouseDownPos.X := X;
- FMouseDownPos.Y := Y;
- 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;
-
- 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;
- 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;
- end;
-end;
-
-procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
- Y: Integer; State: TDragState; var Accept: Boolean);
-var
- idx: Integer;
-begin
- idx := BrowserTab.IndexOfTabAt(X, Y);
- Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
-end;
-
-procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
- Y: Integer);
-var
- idx: Integer;
-begin
- idx := BrowserTab.IndexOfTabAt(X, Y);
- if idx <> -1 then
- BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
-end;
-
-procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
- Shift: TShiftState; X, Y: Integer);
-var
- TabIdx: Integer;
- ThreadItem: TThreadItem;
-begin
-
- TabIdx := BrowserTab.IndexOfTabAt(x, y);
-
- if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
- if FDragWFirst = false then begin
- FDragWFirst := true;
- end else begin
- BrowserTab.EndDrag(false);
- BrowserTab.BeginDrag(false, DandD_THRESHOLD);
- FDragWFirst := false;
- end;
- end else begin
- BrowserTab.EndDrag(false);
- FDragWFirst := false;
- end;
-
- if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
- Application.CancelHint;
- ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[TabIdx]).Thread;
- if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
- BrowserTab.Hint := ThreadItem.Title;
- Application.ShowHint := True;
- end else begin
- BrowserTab.Hint := '';
- Application.ShowHint := True;
- end;
- FTabHintIndex := TabIdx;
- end;
-
-end;
-
-procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
- const pDisp: IDispatch; var URL: OleVariant);
-var
- FDispHtmlDocument: DispHTMLDocument;
- BrowserRecord :TBrowserRecord;
- i :Integer;
- doc : Variant;
- threadItem : TThreadItem;
-begin
-// AddMessageList('DocumentComplete', nil, gmiWhat);
- if TObject(Sender) is TWebBrowser then begin
- BrowserRecord := nil;
- if TWebBrowser(Sender) <> Browser then begin
- for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
- BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
- break;
- end;
- end;
- if BrowserRecord <> nil then begin
- if BrowserRecord.FEvent <> nil then
- BrowserRecord.FEvent.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
- end;
- end else begin
- if GetActiveContent <> nil then begin
- FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument;
- if FEvent <> nil then
- FEvent.Free;
- FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
- FEvent.OnContextMenu := OnDocumentContextMenu;
- FEvent.OnClick := WebBrowserClick; //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
- 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.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;
- 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;
- end else if threadItem.ScrollTop <> 0 then begin
- try
- doc := Idispatch( OleVariant( BrowserRecord.Browser.ControlInterface ).Document ) as IHTMLDocument2;
- doc.Body.ScrollTop := threadItem.ScrollTop;
- except
- on E: Exception do
- MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
- end;
- 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;
-end;
-
-procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
-begin
- AddRoundNameMenu(RoundNamePopupMenu.Items);
-end;
-
-procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
-var
- i: Integer;
- Item: TMenuItem;
-begin
- MenuItem.Clear;
- Item := TMenuItem.Create(Self);
- Item.Caption := '\90V\82µ\82¢\96¼\91O\82Å\8f\84\89ñ\97\\96ñ(&N)...';
- Item.OnClick := 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;
- MenuItem.Add(Item);
- Item := TMenuItem.Create(Self);
- Item.Caption := '-';
- MenuItem.Add(Item);
- for i := 0 to RoundList.RoundNameList.Count - 1 do begin
- Item := TMenuItem.Create(Self);
- Item.Caption := RoundList.RoundNameList[i];
- Item.OnClick := SetSelectRoundName;
- MenuItem.Add(Item);
- 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);
- end else begin
- threadItem := GetActiveContent;
- if threadItem <> nil then begin
- threadItem.RoundName := RoundName;
- if RoundFlag then
- RoundList.RoundNameList.Add(RoundName);
- threadItem.Round := RoundFlag;
- end;
- end;
-end;
-
-procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
-var
- i{, idx}: Integer;
- List: TList;
-begin
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- 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Ý\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\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\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);
- end;
- end;
-end;
-
-procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
-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;
- end;
-end;
-
-procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
-begin
- if BrowserTab.Tabs.Count > 0 then begin
- BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
- BrowserTab.OnChange(nil);
- 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
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> 0);
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
-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);
-begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1);
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
-end;
-
-procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
-begin
- SetMenuFont;
-end;
-
-procedure TGikoForm.SetMenuFont;
-begin
-// GikoSys.MenuFont(MenuToolBar.Font);
-// MenuToolBar.Buttons[0].AutoSize := False;
-// MenuToolBar.Buttons[0].AutoSize := True;
-// MenuToolBar.Font.Color := clMenuText;
- GikoSys.MenuFont(MainCoolBar.Font);
- MenuToolBar.Buttons[0].AutoSize := False;
- MenuToolBar.Buttons[0].AutoSize := True;
- MainCoolBar.AutoSize := False;
- MainCoolBar.AutoSize := True;
-
- GikoSys.MenuFont(ListCoolBar.Font);
- GikoSys.MenuFont(BrowserCoolBar.Font);
-// MenuToolBar.Font.Color := clMenuText;
-end;
-
-procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
-var
- NewMenu: TMenuItem;
-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);
-end;
-
-procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
-var
- i: Integer;
- NewMenu: 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);
-
- 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;
- end;
- end;
-end;
-
-procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
-var
- Dlg : TFavoriteAddDialog;
- ItemURL : string;
- Data : Pointer;
- Node : TTreeNode;
-begin
-
- if Item is TFavoriteBoardItem then
- Item := TFavoriteBoardItem( Item ).Item
- else if Item is TFavoriteThreadItem then
- Item := TFavoriteThreadItem( Item ).Item;
-
- Node := FavoriteTreeView.Items.GetFirstNode;
- if Item is TBoard then begin
- ItemURL := TBoard( Item ).URL;
- while Node <> nil do begin
- 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
- Exit;
- Break;
- end;
- end;
- Node := Node.GetNext;
- end;
- Dlg := TFavoriteAddDialog.Create(Self);
- try
- Dlg.SetBoard( TBoard( Item ) );
- Dlg.ShowModal;
- finally
- Dlg.Release;
- end;
- end else if Item is TThreadItem then begin
- ItemURL := TThreadItem( Item ).URL;
- while Node <> nil do begin
- 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
- Exit;
- Break;
- end;
- end;
- Node := Node.GetNext;
- end;
- Dlg := TFavoriteAddDialog.Create(Self);
- try
- Dlg.SetThreadItem( TThreadItem( Item ) );
- Dlg.ShowModal;
- finally
- Dlg.Release;
- end;
- 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);
-var
- Board: TBoard;
- ThreadItem: TThreadItem;
- FavBoard: TFavoriteBoardItem;
- FavThread: TFavoriteThreadItem;
- Item: TObject;
-begin
-// Item := nil;
- if Sender is TFavoriteMenuItem then
- Item := TFavoriteMenuItem(Sender).Data
- else if Sender is TLinkToolButton then
- Item := TLinkToolButton(Sender).Data
- else if Sender is TTreeNode then
- Item := TTreeNode( Sender ).Data
- else
- Exit;
-
- if TObject(Item) is TFavoriteBoardItem then begin
- FavBoard := TFavoriteBoardItem(Item);
- Board := FavBoard.Item;
- if Board <> nil then begin
- if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
- ShowBBSTree( Board.ParentCategory.ParenTBBS );
- SelectTreeNode(Board, True);
- end;
- end else if TObject(Item) is TFavoriteThreadItem then begin
- FavThread := TFavoriteThreadItem(Item);
- ThreadItem := FavThread.Item;
- if ThreadItem = nil then
- Exit;
-
- InsertBrowserTab(ThreadItem, ActiveTab);
-
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- if GikoSys.Setting.ListWidthState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
- end;
- end else begin
- if GikoSys.Setting.ListHeightState = glsMin then begin
- 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
-);
-begin
-
- if Sender is TBBSMenuItem then
- ShowBBSTree( TBBSMenuItem( Sender ).Data );
-
-end;
-
-procedure TGikoForm.MainCoolBarResize(Sender: TObject);
-begin
- TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
-
-end;
-
-procedure TGikoForm.MoveToActionExecute(Sender: TObject);
-var
- URL: string;
- idx: Integer;
-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);
- end;
-end;
-
-procedure TGikoForm.MoveToURL(const inURL: string);
-var
- protocol, host, path, document, port, bookmark : string;
- URL, protocol2, host2, path2, document2, port2, bookmark2 : string;
- tmp1, tmp2: string;
- BBSID, BBSKey: string;
- {tmpBoard,} Board: TBoard;
- ThreadItem: TThreadItem;
- 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 );
- GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey );
-
-
- shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
- ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
- if shiftDown then begin
- GikoSys.OpenBrowser(inURL, gbtUserApp);
- Exit;
- end else if ctrlDown then begin
- GikoSys.OpenBrowser(inURL, gbtIE);
- Exit;
- end;
-
- //===== \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:
- begin
- boardURL := BoardGroups[i].BoardPlugIn.ExtractBoardURL( inURL );
- Board := BBSsFindBoardFromURL( boardURL );
-
-
- if Board = nil then begin
- //break;
- // \81¦\8dì\82Á\82Ä\82à\92Ç\89Á\82·\82é\82Æ\82±\82ë\82ª\96³\82¢\82Ì\82Å\8c\83\82µ\82\95Û\97¯
- //GikoSys.OpenBrowser(inURL, gbtUserApp);
- //Exit;
- {
- Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
- if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
- ShowBBSTree( BBSs[ 1 ] );
- }
- end else begin
- tmpThread := TThreadItem.Create( BoardGroups[i].BoardPlugIn, Board, inURL );
- if not Board.IsThreadDatRead then begin
- GikoSys.ReadSubjectFile( Board );
- tmpThread.Free;
- Exit;
- end;
- ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
- if ThreadItem = nil then begin
- //tmpThread\82ð\82±\82Á\82¿\82Í\8aJ\95ú\82µ\82Ä\82Í\82¢\82¯\82È\82¢
- ThreadItem := tmpThread;
- 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 );
- 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;
- end;
- end;
-
- atBoard:
- begin
- Board := BBSsFindBoardFromURL(
- BoardGroups[i].BoardPlugIn.ExtractBoardURL( inURL )
- );
- if Board <> nil then begin
- if FActiveBBS <> Board.ParentCategory.ParenTBBS then
- ShowBBSTree( Board.ParentCategory.ParenTBBS );
- SelectTreeNode( Board, True );
- Exit;
- end;
- end;
- end;
- end;
- end;
- except
- // exception \82ª\94\90¶\82µ\82½\8fê\8d\87\82Í\93à\95\94\8f\88\97\9d\82É\94C\82¹\82½\82¢\82Ì\82Å\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢
- 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);
- Exit;
- end else begin
- // \8aO\95\94\82Ì\94Â\82È\82Ì\82É2ch\82ÌURL\82É\82³\82ê\82Ä\82µ\82Ü\82Á\82½\93z\82ð\82±\82±\82Å\8am\94F\82·\82é
- URL := Board.URL;
- GikoSys.ParseURI(URL , protocol2, host2, path2, document2, port2, bookmark2 );
- tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host));
- tmp2 := Copy(host2, AnsiPos('.', host2) + 1, Length(host2));
- if ( not GikoSys.Is2chHost(tmp1)) and (tmp1 <> tmp2) then begin
- GikoSys.OpenBrowser(inURL, gbtUserApp);
- Exit;
- end;
- end;
-
- if not Board.IsThreadDatRead then
- GikoSys.ReadSubjectFile(Board);
- URL := GikoSys.Get2chBrowsableThreadURL( inURL );
- ThreadItem := Board.FindThreadFromURL( URL );
- //\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)
- 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
- 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;
- end;
- end else begin
- Board := BBSsFindBoardFromURL( inURL );
- if Board = nil then begin
- GikoSys.OpenBrowser(inURL, gbtAuto);
- end else begin
- if FActiveBBS <> Board.ParentCategory.ParenTBBS then
- ShowBBSTree( Board.ParentCategory.ParenTBBS );
- SelectTreeNode( Board, True );
- end;
- end;
-end;
-
-procedure TGikoForm.AddressToolBarResize(Sender: TObject);
-begin
- AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
- CoolBarResized( Sender, MainCoolBar );
-end;
-
-procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
- Shift: TShiftState);
-begin
- if Key = VK_RETURN then
- MoveToAction.Execute;
-end;
-
-procedure TGikoForm.BrowserEnter(Sender: TObject);
-begin
- Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
-end;
-
-procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
-var
- CDS:PCopyDataStruct;
- PC:PChar;
- sURL: string;
-begin
- CDS := Message.CopyDataStruct;
- GetMem(PC, CDS^.cbData);
- try
- lstrcpy(PC,CDS^.lpData);
- SetString(sURL, PC,lstrlen(PC));
- MoveToURL(sURL);
- finally
- FreeMem(PC);
- end;
- Message.Result := 1;
-end;
-
-procedure TGikoForm.WndProc(var Message: TMessage);
-var
- senderBrowser : TWebBrowser;
- url : OleVariant;
-begin
- try
- case Message.Msg of
- CM_DIALOGCHAR:
- if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
- Exit;
- WM_SYSCOMMAND:
- if Message.WParam = SC_MINIMIZE then
- OnMinimize;
- USER_TREECLICK:
- TreeClick( TreeView.Selected );
- USER_RESIZED:
- OnResized;
- USER_MINIMIZED:
- OnMinimized;
- USER_SETLINKBAR:
- SetLinkBar;
- USER_DOCUMENTCOMPLETE:
- if (Message.WParam <> 0) and
- (TObject(Message.WParam) is TWebBrowser) then begin
- senderBrowser := TWebBrowser( Message.WParam );
- BrowserDocumentComplete( senderBrowser, senderBrowser.Parent, url );
- end;
- end;
-
- inherited;
- except
- end;
-end;
-
-procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
-var
- hComboEdit: THandle;
-// KeyData: Integer;
-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);
- 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;
- 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);
- 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;
-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;
- ARect: TRect;
- sl: TStringList;
- html: string;
- HtmlFileName: string;
-
- NavURL: OleVariant;
- Flags: OleVariant;
- TargetFrameName: OleVariant;
- PostData: OleVariant;
- Headers: OleVariant;
- WindowHeight: Integer;
- WindowWidth: Integer;
-
-// Style: Longint;
- Referer: string;
- Protocol, Host, Path, Document, Port, Bookmark: string;
-begin
- PreviewTimer.Enabled := False;
-
- GetCursorpos(p);
-
- case GikoSys.Setting.PreviewSize of
- gpsXSmall: begin
- WindowWidth := 128;
- WindowHeight := 96;
- end;
- gpsSmall: begin
- WindowWidth := 256;
- WindowHeight := 192;
- end;
- gpsLarge: begin
- WindowWidth := 512;
- WindowHeight := 384;
- end;
- gpsXLarge: begin
- WindowWidth := 640;
- WindowHeight := 480;
- end;
- else begin //gpsMedium
- WindowWidth := 384;
- WindowHeight := 288;
- end;
- end;
-
- ARect := Rect(0, 0, WindowWidth, WindowHeight);
-
- case GikoSys.Setting.PopupPosition of
- gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
- gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
- gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
- gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
- gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
- gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
- gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
- gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
- gppLeftBottom: OffsetRect(ARect, p.x + 15, p.y + 15); //\83M\83R\83i\83r\83X\83\8c \83p\81[\83g\82P\82Ì453\8e\81\82É\8a´\8eÓ
- end;
-
- html := '<html><head>'#13#10
- + '<SCRIPT>'#13#10
- + 'function init() {'#13#10
- + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
- + ' } else {'#13#10
- + ' var dh, ih;'#13#10
- + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
- + ' ih = Image1.width / Image1.height;'#13#10
- + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
- + ' if (ih > dh)'#13#10
- + ' Image1.width = document.body.clientWidth;'#13#10
- + ' else'#13#10
- + ' Image1.height = document.body.clientHeight;'#13#10
- + ' } else {'#13#10
- + ' if (ih < dh)'#13#10
- + ' Image1.height = document.body.clientHeight;'#13#10
- + ' else'#13#10
- + ' Image1.width = document.body.clientWidth;'#13#10
- + ' }'#13#10
- + ' }'#13#10
- + ' Message.style.display = "none";'#13#10
- + '}'#13#10
- + '</SCRIPT>'#13#10
- + '</head>'#13#10
- + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
- + '<div align="center" id="Message">\83v\83\8c\83r\83\85\81[\8dì\90¬\92\86</div>'#13#10
- + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
- + '</body></html>';
- sl := TStringList.Create;
- try
- try
- HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
- sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
- sl.SaveToFile(HtmlFileName);
- finally
- sl.Free;
- end;
- except
- end;
-
- NavURL := HtmlFileName;
- Flags := 0;
- TargetFrameName := '';
- PostData := '';
-
- GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
- Referer := Protocol + '://' + Host;
- if Port <> '' then
- Referer := Referer + ':' + Port;
- Referer := Referer + Path;
- Headers := 'Referer: ' + Referer;
- FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
- if ARect.Top + WindowHeight > Screen.DesktopHeight then
- ARect.Top := Screen.DesktopHeight - WindowHeight;
- if ARect.Left + WindowWidth > Screen.DesktopWidth then
- ARect.Left := Screen.DesktopWidth - WindowWidth;
- if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
- if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
-
- SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
- ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
-
-// Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
-// SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
-
-end;
-
-procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
-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);
- Message.Result := 1;
- inherited;
-end;
-
-procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
-begin
- MsgBarCloseAction.Execute;
-end;
-
-function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
-var
- Doc: IHtmlDocument2;
- Range: IHTMLTxtRange;
- s: string;
- Num: Integer;
- ThreadItem: TThreadItem;
-begin
- Result := False;
- IDAnchorPopup('');
- Doc := FactiveContent.FBrowser.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É
- s := ZenToHan(Trim(s));
- if GikoSys.IsNumeric(s) then begin
-
- ThreadItem := GetActiveContent;
- if ThreadItem <> nil then begin
- Num := StrToInt(s);
- FHint.PopupType := gptThread;
- SetResPopupText(ThreadItem, Num, Num, False, False);
- if FHint.ResCount <> 0 then
- ShowTextPopup;
- Result := False;
- end else
- Result := True;
- end else begin
- Result := True;
- end;
- end;
-end;
-
-procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
-var
- i: Integer;
- tmp: string;
- FileName: string;
- Line: Integer;
-
- wkInt: Integer;
-
- Res: TResRec;
- Header: string;
- Body: string;
- boardPlugIn : TBoardPlugIn;
-begin
- try
- if StNum > ToNum then begin
- wkInt := StNum;
- StNum := ToNum;
- ToNum := wkInt;
- end;
-
- //\8dÅ\91å10\83\8c\83X\82Ü\82Å\95\\8e¦
- if StNum + MAX_POPUP_RES < ToNum then
- ToNum := StNum + MAX_POPUP_RES;
-
- //\83^\83C\83g\83\8b\95\\8e¦
- if Title then
- if ThreadItem <> nil then
- FHint.Title := ThreadItem.Title;
-
- if ThreadItem <> nil then begin
- //if ThreadItem.IsBoardPlugInAvailable then begin
- if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
- //===== \83v\83\89\83O\83C\83\93\82É\82æ\82é\95\\8e¦
- //boardPlugIn := ThreadItem.BoardPlugIn;
- boardPlugIn := ThreadItem.ParentBoard.BoardPlugIn;
-
- // \83t\83H\83\93\83g\82â\83T\83C\83Y\82Ì\90Ý\92è
- // \95¶\8e\9a\83R\81[\83h\82Í\83v\83\89\83O\83C\83\93\82É\94C\82¹\82é
- for i := StNum to ToNum do begin
- Line := i;
- //\82±\82±\82Å\82Q\82¿\82á\82ñ\82Ë\82é\82Ìdat\82Ì\8c`\8e®\82Å\82P\8ds\93Ç\82Ý\8d\9e\82ß\82ê\82Î¥¥¥\81B\81«\93Ç\82ß\82é\82æ\82¤\82É\82È\82Á\82½
- tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
- if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
- Res := DivideStrLine(tmp);
- if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
- Header := IntToStr(Line) + ' \96¼\91O\81F ' + Res.FName + ' \93\8a\8de\93ú\81F ' + Res.FDateTime
- else
- Header := IntToStr(Line) + ' \96¼\91O\81F ' + Res.FName + ' [' + res.FMailTo + '] \93\8a\8de\93ú\81F ' + Res.FDateTime;
- Header := DeleteFontTag(Header);
- Header := CustomStringReplace(Header, '<br>', '',true);
-
- Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
- Body := CustomStringReplace(Body, '<br>', #10,true);
- Body := CustomStringReplace(Body, '</a>', '',true);
- Body := GikoSys.DeleteLink(Body);
- Body := CustomStringReplace(Body, '<', '<');
- Body := CustomStringReplace(Body, '>', '>');
- Body := CustomStringReplace(Body, '"', '"');
- Body := CustomStringReplace(Body, '&', '&');
- Body := CustomStringReplace(Body, ' ', ' ');
-
- FHint.Add(Header, Body);
- //FHint.Title := '';
- end;
- end;
- end else begin
- for i := StNum to ToNum do begin
- Line := i;
- FileName := ThreadItem.FilePath;
- tmp := GikoSys.ReadThreadFile(FileName, Line);
- if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
- Res := DivideStrLine(tmp);
- if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
- Header := IntToStr(Line) + ' \96¼\91O\81F ' + Res.FName + ' \93\8a\8de\93ú\81F ' + Res.FDateTime
- else
- Header := IntToStr(Line) + ' \96¼\91O\81F ' + Res.FName + ' [' + res.FMailTo + '] \93\8a\8de\93ú\81F ' + Res.FDateTime;
-
- Body := DeleteFontTag(Res.FBody);
- Body := CustomStringReplace(Body, '<br> ', #10,true);
- Body := CustomStringReplace(Body, '<br>', #10,true);
- Body := CustomStringReplace(Body, '</a>', '',true);
- Body := GikoSys.DeleteLink(Body);
- Body := CustomStringReplace(Body, '<', '<');
- Body := CustomStringReplace(Body, '>', '>');
- Body := CustomStringReplace(Body, '"', '"');
- Body := CustomStringReplace(Body, '&', '&');
- Body := CustomStringReplace(Body, ' ', ' ');
- FHint.Add(Header, Body);
- //FHint.Title := ''; //\82½\82Ô\82ñ\82±\82ê\82Í\82¢\82ç\82È\82¢\82ñ\82¾\82¯\82Ç\82Ë\81B\82à\82¶\82ã \82â\82Á\82Ï\82è\82¢\82ç\82È\82©\82Á\82½\81i2004/01/13\81j
- end;
- end;
- end;
- end;
- finally
- end;
-end;
-
-procedure TGikoForm.ShowTextPopup;
-var
- p: TPoint;
- ARect: TRect;
-begin
-// if Trim(s) = '' then
-// Exit;
- try
- FHint.Font.Name := GikoSys.Setting.HintFontName;
- FHint.Font.Size := GikoSys.Setting.HintFontSize;
- FHint.Font.Color := GikoSys.Setting.HintFontColor;
- FHint.Color := GikoSys.Setting.HintBackColor;
- FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
- GetCursorpos(p);
- if FHint.PopupType = gptRaw then
- ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
- else
- ARect := FHint.CalcHintRect(Screen.Width, '', nil);
- case GikoSys.Setting.PopupPosition of
- gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
- gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
- gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
- gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
- gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
- gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
- gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
- gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
- gppLeftBottom: OffsetRect(ARect, p.x + 15, p.y + 15); //\83M\83R\83i\83r\83X\83\8c \83p\81[\83g\82P\82Ì453\8e\81\82É\8a´\8eÓ
- end;
- //FHint.ActivateHint(ARect, s);
- if FHint.PopupType = gptRaw then
- FHint.ActivateHint(ARect, FHint.Caption)
- else
- FHint.ActivateHint(ARect, '');
- except
- FHint.ReleaseHandle;
- FHint.ClearAllRes;
- 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);
-const
- DEL_MSG = '\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 FTreeType = gttHistory then 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;
- ClearHistory;
- FHistoryList.Clear;
- TreeView.Items.Clear;
- 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;
- j: Integer;
- ToolButton: TLinkToolButton;
- MenuItem: TMenuItem;
- oldIgnoreResize : TResizeType;
-begin
- oldIgnoreResize := FIsIgnoreResize;
- FIsIgnoreResize := rtResizing;
- MainCoolBar.Bands.BeginUpdate;
- try
- LinkBarPopupMenu.Items.Clear;
- for i := LinkToolBar.ButtonCount - 1 downto 0 do
- //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
- LinkToolBar.Buttons[i].Free;
- for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
- if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
- for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
- ToolButton := TLinkToolButton.Create(LinkToolBar);
-// ToolButton.Parent := LinkToolBar;
- if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
- MenuItem := TMenuItem.Create(Self);
- CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
- LinkBarPopupMenu.Items.Add(MenuItem);
- ToolButton.MenuItem := MenuItem;
- ToolButton.ImageIndex := 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.OnClick := FavoriteClick;
- end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
- ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
- ToolButton.OnClick := FavoriteClick;
- end;
- ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
- ToolButton.Left := 10000;
- ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
- ToolButton.AutoSize := True;
- ToolButton.OnDragDrop := LinkToolButtonDragDrop;
- ToolButton.OnDragOver := FavoriteDragOver;
- ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
- ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
- ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
- ToolButton.OnStartDrag := LinkToolButtonStartDrag;
- //ToolButton.DragMode := dmAutomatic;
- ToolButton.DragMode := dmManual;
- ToolButton.PopupMenu := FavoriteTreePopupMenu;
-
- LinkToolBar.InsertControl(ToolButton);
- end;
- break;
- end;
- end;
-{ if LinkToolBar.ButtonCount = 0 then begin
- ToolButton := TLinkToolButton.Create(LinkToolBar);
- ToolButton.Style := tbsButton;
- ToolButton.ImageIndex := -1;
- ToolButton.Caption := '';
- LinkToolBar.InsertControl(ToolButton);
- end;}
- finally
- MainCoolBar.Bands.EndUpdate;
- LoadCoolBarSettings;
- FIsIgnoreResize := oldIgnoreResize;
- end;
-end;
-
-procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
-var
- Node: TTreeNode;
- bound: TRect;
- height: Integer;
- Change: Boolean;
-begin
-
- if Sender = FavoriteTreeView then begin
- Node := FavoriteTreeView.GetNodeAt(X, Y);
-
- if Node = nil then
- Exit;
-
- bound := Node.DisplayRect( False );
- height := bound.Bottom - bound.Top;
- if (bound.Top + height / 2) <= Y then
- Node := FavoriteTreeView.GetNodeAt(X, Y + height);
-
- if Node = nil then
- Exit;
-
- if Node.IsFirstNode then
- Exit;
-
- Change := True;
-
- if FDropSpaceNode <> nil then
- if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
- Change := False;
-
- if Change then begin
- if FDropSpaceNode <> nil then
- FDropSpaceNode.Free;
-
- FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObjectFirst(Node.Parent, '', nil );
- FDropSpaceNode.MoveTo( Node, naInsert );
- FDropSpaceNode.ImageIndex := -1;
- FDropSpaceNode.SelectedIndex := -1;
- end;
- end;
-
- if Source = FavoriteTreeView then begin
- if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
- Accept := False;
- Exit;
- end;
- Accept := True;
- end else if Source = BrowserTab then
- Accept := True
- else if Source = ListView then
- Accept := True
- else if Source is TLinkToolButton then
- Accept := True
- else if Source = TreeView then
- Accept := True
- else
- Accept := False;
-end;
-
-procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
-begin
-
- FavoriteDragOver( Sender, Source, X, Y, State, Accept );
-
-end;
-procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
-begin
- // FDragging := true;
-end;
-
-procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
-var
- SenderNode: TTreeNode;
- LinkToolButton: TLinkToolButton;
-begin
-
- LinkToolButton := TLinkToolButton( Sender );
- SenderNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
- SenderNode.Selected := False;
- FavoriteDragDrop( SenderNode, Source );
-
- SetLinkBar;
-
-end;
-
-procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-var
- favButton : TLinkToolButton;
- favThreadItem : TFavoriteThreadItem;
-begin
-
- case Button of
- mbMiddle:
- begin
- if Sender is TLinkToolButton then begin
- favButton := TLinkToolButton( Sender );
- if TObject( favButton.Data ) is TFavoriteThreadItem then begin
- favThreadItem := TFavoriteThreadItem( favButton.Data );
- if favThreadItem.Item <> nil then
- InsertBrowserTab( favThreadItem.Item, False );
- end;
- end;
- end;
- end;
-
-end;
-
-procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
-var
- Now : Cardinal;
-begin
- TToolButton( Sender ).DragMode := dmManual;
- if ssLeft in Shift then begin
-// TToolButton( Sender ).Down := true; // \83\8a\83\93\83N\83c\81[\83\8b\83o\81[\82Ì\8b\93\93®\95s\90R\82Ì\8c´\88ö\82Ì\82æ\82¤\82È\82Ì\82Å\83R\83\81\83\93\83g\83A\83E\83g\82µ\82½(2003-dec-02)
- if FDragTime = 0 then begin
- FDragTime := GetTickCount();
- end else begin
- Now := GetTickCount();
- if (Now - FDragTime) > 500 then begin
- if FDragButton <> TToolButton( Sender ) then begin
- try
- FDragButton := TToolButton( Sender );
- TToolButton(Sender).BeginDrag(false ,5);
- FDragTime := 0;
- except
- {$IF Defined(debug)}
- ShowMessage('Error');
- {$IFEND}
- end;
- end;
- end;
- end;
- end else begin
- FDragTime := 0;
- end;
-end;
-
-procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-begin
- FDragTime := 0;
-end;
-
-function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
-var
- i: Integer;
-begin
- Result := 0;
- for i := 0 to ToolBar.ButtonCount - 1 do
- if ToolBar.Buttons[i].Visible then
- Result := Result + ToolBar.Buttons[i].Width;
-end;
-
-procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
-var
- Control : TWinControl;
- i, idx : Integer;
-begin
- Control := FindControl(BandInfo^.hwndChild);
- if Control = nil then
- Exit;
- idx := 0;
- for i := MainCoolBar.Bands.Count - 1 downto 0 do begin
- if MainCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
- idx := MainCoolBar.Bands[ i ].ID;
- Break;
- end;
- end;
- Canvas.Font.Handle := GetStockObject( DEFAULT_GUI_FONT );
- if (Control = MenuToolBar) or (Control = StdToolBar) then begin
- BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
- BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
- BandInfo^.cxMinChild := 0;
- BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth;
- BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
- end else if Control = LinkToolBar then begin
- BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
- BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
- BandInfo^.cxMinChild := 0;
- BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '\83\8a\83\93\83N' );
- BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
- end else begin // AddressToolBar
- BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
- BandInfo^.cxMinChild := 0;
- BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '\83A\83h\83\8c\83X' );
- end;
-end;
-
-procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
-var
- i : Integer;
- Idx: Integer;
- p: TPoint;
-begin
- ChevronPopupMenu.Items.Clear;
- Idx := 0;
- for i := 0 to MainCoolBar.Bands.Count - 1 do begin
- if MainCoolBar.Bands[ i ].Visible then begin
- if Idx = Int64(RebarChevron^.uBand) then begin
- Idx := i;
- break;
- end;
- Inc( Idx );
- end;
- end;
- if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
- if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
- MenuBarChevronMenu;
- end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
- ToolBarChevronMenu(StdToolBar);
- end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
- LinkBarChevronMenu;
- end else
- Exit;
- p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
- ChevronPopupMenu.Popup(p.x, p.y);
- end;
-end;
-
-procedure TGikoForm.MenuBarChevronMenu;
- procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
- var
- i: Integer;
- Item: TMenuItem;
- begin
- MenuItem.Click;
- for i := 0 to MenuItem.Count - 1 do begin
-// Item := nil;
- if MenuItem[i] is TFavoriteMenuItem then begin
- Item := TFavoriteMenuItem.Create(Self);
- TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
- end else
- Item := TMenuItem.Create(Self);
- Item.Caption := MenuItem[i].Caption;
- Item.Action := MenuItem[i].Action;
- Item.ImageIndex := MenuItem[i].ImageIndex;
- Item.OnClick := MenuItem[i].OnClick;
- PopupItem.Add(Item);
- if MenuItem[i].Count > 0 then
- SetSubMenu(MenuItem[i], Item);
- end;
- end;
-var
- i: Integer;
- w: Integer;
- bw: Integer;
- Item: TMenuItem;
-begin
- ChevronPopupMenu.Items.Clear;
- ChevronPopupMenu.Images := MainMenu.Images;
- bw := GetWidthAllToolButton(MenuToolBar);
- if MenuToolBar.Width < bw then begin
- w := 0;
- for i := 0 to MenuToolBar.ButtonCount - 1 do begin
- w := w + MenuToolBar.Buttons[i].Width;
- if MenuToolBar.Width <= w then begin
- Item := TMenuItem.Create(Self);
- Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
- //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
- ChevronPopupMenu.Items.Add(Item);
- SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
- end;
- end;
- end;
-end;
-
-procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
- procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
- var
- i: Integer;
- Item: TMenuItem;
- begin
- if Assigned(PopupMenu.OnPopup) then
- PopupMenu.OnPopup(nil);
- for i := 0 to PopupMenu.Items.Count - 1 do begin
-// Item := nil;
- if PopupMenu.Items[i] is TFavoriteMenuItem then begin
- Item := TFavoriteMenuItem.Create(Self);
- TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
- end else
- Item := TMenuItem.Create(Self);
- Item.Caption := PopupMenu.Items[i].Caption;
- Item.Action := PopupMenu.Items[i].Action;
- Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
- Item.OnClick := PopupMenu.Items[i].OnClick;
- PopupItem.Add(Item);
- end;
- end;
-var
- i: Integer;
- w: Integer;
- bw: Integer;
- Item: TMenuItem;
-begin
- ChevronPopupMenu.Items.Clear;
- ChevronPopupMenu.Images := ToolBar.HotImages;
- bw := GetWidthAllToolButton(ToolBar);
- if ToolBar.Width < bw then begin
- w := 0;
- for i := 0 to ToolBar.ButtonCount - 1 do begin
- if ToolBar.Buttons[i].Visible then
- w := w + ToolBar.Buttons[i].Width;
- if ToolBar.Width <= w then begin
- if ToolBar.Buttons[i].Tag = 0 then begin
- Item := TMenuItem.Create(Self);
- if ToolBar.Buttons[i].Style = tbsSeparator then
- Item.Caption := '-'
- else begin
- //\83X\83\8c\8di\8d\9e\82ÝComBox\82ÌTPanel\82ð\94r\8f\9c\82·\82é
- if TObject(ToolBar.Buttons[i]) is TPanel then begin
- Continue;
- end else begin
- Item.Caption := ToolBar.Buttons[i].Caption;
- Item.Action := ToolBar.Buttons[i].Action;
- end;
- //Item.Visible := True;
- end;
- ChevronPopupMenu.Items.Add(Item);
- if ToolBar.Buttons[i].DropdownMenu <> nil then begin
- Item.Action := nil;
- Item.OnClick := nil;
- SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
- end;
- end;
- end;
- end;
- end;
-end;
-
-procedure TGikoForm.LinkBarChevronMenu;
-var
- i: Integer;
- j: Integer;
- w: Integer;
- Item: TFavoriteMenuItem;
- bw: Integer;
- Button: TLinkToolButton;
-begin
- ChevronPopupMenu.Items.Clear;
- ChevronPopupMenu.Images := LinkToolBar.Images;
- bw := GetWidthAllToolButton(LinkToolBar);
- if LinkToolBar.Width < bw then begin
- w := 0;
- for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
- if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
- for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
- w := w + LinkToolBar.Buttons[j].Width;
- if LinkToolBar.Width <= w then begin
- if LinkToolBar.Buttons[j] is TLinkToolButton then begin
- Button := TLinkToolButton(LinkToolBar.Buttons[j]);
- Item := TFavoriteMenuItem.Create(Self);
- if TObject(Button.Data) is TFavoriteFolder then begin
- CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
- end else if TObject(Button.Data) is TFavoriteBoardItem then begin
- Item.OnClick := FavoriteClick;
- end else if TObject(Button.Data) is TFavoriteThreadItem then begin
- Item.OnClick := FavoriteClick;
- end;
- Item.Data := Button.Data;
- Item.Caption := LinkToolBar.Buttons[j].Caption;
- Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
- ChevronPopupMenu.Items.Add(Item);
- end;
- end;
- end;
- break;
- end;
- end;
- end;
-end;
-
-{!
-\brief \83o\83\93\83h\95\9d\82ð\8dÄ\8cv\8eZ\81E\8dÄ\90Ý\92è\82·\82é
-\param bar \83o\83\93\83h\82ª\8f\8a\91®\82·\82é CoolBar
-\param band \8dÄ\8cv\8eZ\81E\8dÄ\90Ý\92è\82·\82é\83o\83\93\83h
-
-\93Æ\8e©\82É\83o\83\93\83h\82É\94z\92u\82³\82ê\82Ä\82¢\82é\83R\83\93\83g\83\8d\81[\83\8b\82Ì\83T\83C\83Y\82ð\95Ï\8dX\82µ\82½\8fê\8d\87\82É
-\83V\83F\83u\83\8d\83\93\82Ì\95\\8e¦\88Ê\92u\82ð\8dÄ\90Ý\92è\82·\82é\82½\82ß\82É\8eg\97p\82µ\82Ü\82·\81B
-}
-procedure TGikoForm.ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
-var
- bandInfo : tagREBARBANDINFOA;
- pBandInfo : PReBarBandInfoA;
- lResult : Integer;
- h : HWND;
- i, idx : Integer;
-begin
-
- h := band.Handle;
- pBandInfo := @bandInfo;
- ZeroMemory( pBandInfo, sizeof( bandInfo ) );
- bandInfo.cbSize := sizeof( bandInfo );
- bandInfo.hwndChild := h;
- bandInfo.cyMinChild := bar.Height;
- bar.OnBandInfo( nil, pBandInfo );
- // band \82Ì\83C\83\93\83f\83b\83N\83X\82ð\92T\82·
- idx := 0;
- for i := bar.Bands.Count - 1 downto 0 do begin
- if bar.Bands[ i ].Control.Handle = h then begin
- idx := i;
- Break;
- end;
- end;
- // \90Ý\92è
- lResult := SendMessage( bar.Handle, RB_SETBANDINFO, idx, Integer( pBandInfo ) );
-
-end;
-
-procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
-var
- Control: TWinControl;
- i, idx : Integer;
-begin
- Control := FindControl(BandInfo^.hwndChild);
- if Control = nil then
- Exit;
- idx := 0;
- for i := ListCoolBar.Bands.Count - 1 downto 0 do begin
- if ListCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
- idx := ListCoolBar.Bands[ i ].ID;
- Break;
- end;
- end;
- if Control = ListToolBar then begin
- BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
- BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
- BandInfo^.cxMinChild := 0;
- BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
- BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
- end else begin
- BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
- BandInfo^.cxMinChild := 0;
- BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
- end;
-end;
-
-procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
-var
- Idx: Integer;
- p: TPoint;
-begin
- ChevronPopupMenu.Items.Clear;
- Idx := RebarChevron^.uBand;
- if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
- if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
- ToolBarChevronMenu(ListToolBar);
- end else
- Exit;
- p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
- ChevronPopupMenu.Popup(p.x, p.y);
- end;
-end;
-
-procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
-var
- Control: TWinControl;
- i, idx : Integer;
-begin
- Control := FindControl(BandInfo^.hwndChild);
- if Control = nil then
- Exit;
- idx := 0;
- for i := BrowserCoolBar.Bands.Count - 1 downto 0 do begin
- if BrowserCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
- idx := BrowserCoolBar.Bands[ i ].ID;
- Break;
- end;
- end;
- if Control = BrowserToolBar then begin
- BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
- BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
- BandInfo^.cxMinChild := 0;
- BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
- BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
- end else begin
- BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
- BandInfo^.cxMinChild := 0;
- BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
- end;
-end;
-
-procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
-var
- Idx: Integer;
- p: TPoint;
-begin
- ChevronPopupMenu.Items.Clear;
- Idx := RebarChevron^.uBand;
- if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
- if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
- ToolBarChevronMenu(BrowserToolBar)
- else
- Exit;
- p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
- ChevronPopupMenu.Popup(p.x, p.y);
- end;
-end;
-
-procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
-begin
- if Column^.iImage = -1 then begin
- Column^.mask := Column^.mask or LVCF_FMT;
- end else begin
- Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
- Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
- 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
-
- for i := bar.ButtonCount - 1 downto 0 do begin
- if bar.Buttons[ i ].Action = action then begin
- Result := bar.Buttons[ i ];
- Exit;
- end;
- end;
-
- Result := nil;
-
-end;
-
-procedure TGikoForm.SetToolBarPopup;
-var
- i : Integer;
- aIEButton : TToolButton;
- aCabinetBBSButton : TToolButton;
- aResRangeButton : TToolButton;
- aThreadRangeButton: TToolButton;
-begin
- 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
- ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
- if ListToolBar.Buttons[i].Action = SelectReservAction then
- ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
- end;
- aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
- if aIEButton <> nil then
- aIEButton.DropdownMenu := BrowserPopupMenu;
- aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
- if aCabinetBBSButton <> nil then
- aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
- aResRangeButton := FindToolBarButton( BrowserToolBar, ResRangeAction );
- if aResRangeButton <> nil then
- aResRangeButton.DropdownMenu := ResRangePopupMenu;
- aThreadRangeButton:= FindToolBarButton( ListToolBar, ThreadRangeAction );
- if aThreadRangeButton <> nil then
- aThreadRangeButton.DropdownMenu := ThreadRangePopupMenu;
-end;
-
-procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
- WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
-var
- Wnd: THandle;
- delta: Integer;
-// browserPos : TPoint;
-const
- ICON_SIZE = 16;
-begin
- Wnd := WindowFromPoint(Mouse.CursorPos);
- Handled := True;
- if WheelDelta > 0 then
- Delta := -1
- else
- Delta := 1;
-
- if (Wnd = BrowserTab.Handle) or
- (Wnd = BrowserTab.Parent.Handle) then begin
- BrowserTab.ScrollTabs(Delta);
- end else begin
- if FIsHandledWheel then begin
- FIsHandledWheel := False;
- Handled := False;
- end else begin
- FIsHandledWheel := True;
- if (Wnd = TreeView.Handle) or (Wnd = FavoriteTreeView.Handle)
- or (Wnd = ListView.Handle) or (Wnd = MessageListView.Handle)
- then
- SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y )
- else
- Handled := False;
-
- end;
- end;
-end;
-
-procedure TGikoForm.SetSelectWord( const text : string );
-begin
-
- 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
- SetListViewType( gvtAll )
- else
- SetListViewType( gvtUser, text, false );
-
-end;
-
-procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
-begin
-
- SetSelectWord( SelectComboBox.Text );
-
-end;
-
-procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
- Shift: TShiftState);
-var
- IMC: HIMC;
- Len: integer;
- Str: string;
- tmp: string;
-begin
-
- if Key = VK_Return then
- begin
- ModifySelectList;
- end else if Key = 229 then begin
- if GikoSys.Setting.UseUndecided then begin
- IMC := ImmGetContext(SelectComboBox.Handle); //\83R\83\93\83e\83L\83X\83g\8eæ\93¾
- Len := ImmGetCompositionString(IMC, GCS_COMPSTR, nil, 0); //\82Ü\82¸\92·\82³\82ð\8eæ\93¾
- SetLength(Str, Len + 1); //Buffer\82Ì\83\81\83\82\83\8a\82ð\90Ý\92è
- ImmGetCompositionString(IMC, GCS_COMPSTR, PChar(Str), Len + 1); //\82Ü\82¸\92·\82³\82ð\8eæ\93¾
- ImmReleaseContext(SelectComboBox.Handle, IMC); //\83R\83\93\83e\83L\83X\83g\89ð\95ú
- SetLength(Str, Len);
- if SelectComboBox.SelLength > 0 then begin //\91I\91ð\92\86\82Ì\95¶\8e\9a\97ñ\82ª\82 \82é\82©
- tmp := Copy(SelectComboBox.Text, 1, SelectComboBox.SelStart);
- Str := tmp + Str + Copy(SelectComboBox.Text, SelectComboBox.SelStart + SelectComboBox.SelLength + 1, Length(SelectComboBox.Text));
- end else
- Str := SelectComboBox.Text + Str;
-
- SetSelectWord(Str);
- end;
- end else if Length( SelectComboBox.Text ) = 0 then
- begin
- {* SelectComboBox.Text\82ª\8bó\82Å\82à\81A\93ü\97Í\93r\92\86\82ÅEsc\82µ\82½\82Æ\82©
- * \8bó\82Ì\82Æ\82«\82ÉDel\83L\81[\82ð\89\9f\82µ\82½\82Æ\82©\82È\82Ì\82Å\81A\83X\83\8c\82Ì\8di\8d\9e\82Ý\82ð\88Û\8e\9d\82·\82é\81B
- * \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;
- end;
-
-end;
-
-procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
-begin
-
- ModifySelectList;
-
- if Length( SelectComboBox.Text ) = 0 then
- begin
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
- end;
-
-end;
-
-// \8di\82è\8d\9e\82Ý\8c\9f\8dõ\82Ì\97\9a\97ð\8dX\90V
-procedure TGikoForm.ModifySelectList;
-var
- idx : Integer;
- oldText : string;
-begin
-
- try
- if not SelectComboBoxPanel.Visible then
- exit;
-
- if Length( SelectComboBox.Text ) > 0 then
- begin
- oldText := SelectComboBox.Text;
- idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
- if idx <> -1 then
- 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.Destroy;
- 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.Destroy;
- 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();
- 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);
-var
- pos : TPoint;
- w : Integer;
-begin
- If (SelectComboBoxPanel.Visible) and (IsDraggingSelectComboBox) Then begin
- pos.X := X;
- pos.Y := Y;
- pos := SelectComboBoxSplitter.ClientToScreen( pos );
- //w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
- w := SelectComboBoxPanel.Width + (pos.X - DraggingSelectComboBoxPosition.X);
-
- If w <= 50 Then Begin
- // \8e\9f\82Ì\88Ú\93®\82Ì\8aî\8f\80\82ª\81u\89ß\82¬\82Ä\82µ\82Ü\82Á\82½\88Ê\92u\81v\82Å\82Í\82È\82
- // \81u\8e~\82Ü\82Á\82½(50pixel)\88Ê\92u\81v\82É\82È\82é\82æ\82¤\82É
- pos.X := pos.X + (50 - w);
-
- // \8f¬\82³\82\82È\82è\82·\82¬\82È\82¢\82æ\82¤\82É
- w := 50;
- End;
-
- // \83`\83\89\82Â\82«\8cy\8c¸\82Ì\88×
- //If SelectComboBox.Width <> w Then Begin
- If SelectComboBoxPanel.Width <> w Then Begin
- SelectComboBoxPanel.Width := w;
- SelectComboBox.Width := SelectComboBoxPanel.Width - SelectComboBoxSplitter.Width;
- GikoSys.Setting.SelectComboBoxWidth := w;
- DraggingSelectComboBoxPosition := pos;
-
- // \83V\83F\83u\83\8d\83\93\88Ê\92u\82ª\95Ï\82í\82é\82Ì\82Å BandInfo \82Ì\8dÄ\90Ý\92è
- ResetBandInfo( ListCoolBar, ListToolBar );
- End;
- End;
-
-end;
-
-procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
- Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-var
- pos : TPoint;
-begin
- IsDraggingSelectComboBox := True;
- pos.X := X;
- pos.Y := Y;
- DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
-
-end;
-
-procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
- Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-begin
- IsDraggingSelectComboBox := False;
-
-end;
-
-procedure TGikoForm.StatusBarResize(Sender: TObject);
-begin
- StatusBar.Panels[1].Width := StatusBar.Width -
- StatusBar.Panels[0].Width -
- StatusBar.Panels[2].Width;
-end;
-procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
-begin
-
- if (Length( SelectComboBox.Text ) = 0) or
- (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
- begin
- SelectComboBox.Text := '';
- SelectComboBox.Color := clWindow;
- end;
-
-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
-
- if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
- Exit;
-
- if TObject(SenderNode.Data) is TFavoriteFolder then
- SourceNode.MoveTo(SenderNode, naAddChild)
- else
- SourceNode.MoveTo(SenderNode, naInsert);
-
-end;
-
-procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
-var
- Node: TTreeNode;
- FavNode: TTreeNode;
- FavoBoardItem: TFavoriteBoardItem;
- FavoThreadItem: TFavoriteThreadItem;
- Board: TBoard;
- ThreadItem: TThreadItem;
-begin
-
- if (SenderNode = nil) or (Source = nil) then
- Exit;
-
- if not (TObject(SenderNode.Data) is TFavoriteFolder) then
- FavNode := SenderNode.Parent
- else
- FavNode := SenderNode;
-
- Node := nil;
-
- if Source is TBoard then begin
- Board := TBoard( Source );
- FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
- Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
- Node.ImageIndex := 15;
- Node.SelectedIndex := 15;
- end else if Source is TFavoriteBoardItem then begin
- FavoBoardItem := TFavoriteBoardItem( Source );
- Board := FavoBoardItem.Item;
- if Board <> nil then
- if not Board.IsThreadDatRead then
- GikoSys.ReadSubjectFile(Board);
- Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
- Node.ImageIndex := 15;
- Node.SelectedIndex := 15;
- end else if Source is TThreadItem then begin
- ThreadItem := TThreadItem( Source );
- FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
- Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
- Node.ImageIndex := 16;
- Node.SelectedIndex := 16;
- end else if Source is TBrowserRecord then begin
- ThreadItem := TBrowserRecord( Source ).FThread;
- FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
- Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
- Node.ImageIndex := 16;
- Node.SelectedIndex := 16;
- end else if Source is TFavoriteThreadItem then begin
- FavoThreadItem := TFavoriteThreadItem( Source );
- ThreadItem := FavoThreadItem.Item;
- Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
- Node.ImageIndex := 16;
- Node.SelectedIndex := 16;
- end;
-
- if not (TObject(SenderNode.Data) is TFavoriteFolder) then
- if Node <> nil then
- FavoriteMoveTo( SenderNode, Node );
-
-end;
-
-procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
-var
- idx: Integer;
- SourceNode: TTreeNode;
- LinkToolButton: TLinkToolButton;
-begin
-
- if SenderNode = nil then
- Exit;
-
- if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
- if FDropSpaceNode <> nil then
- SenderNode := FDropSpaceNode;
-
- if Source = FavoriteTreeView then begin
-
- SourceNode := FavoriteTreeView.Selected;
- FavoriteMoveTo( SenderNode, SourceNode );
-
- end else if Source is TLinkToolButton then begin
-
- LinkToolButton := TLinkToolButton( Source );
- //ShowMessage(LinkToolButton.Text);
- SourceNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
- FavoriteMoveTo( SenderNode, SourceNode );
-
- end else if Source = BrowserTab then begin
-
- idx := BrowserTab.TabIndex;
- FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
- end else if Source = ListView then begin
-
- FavoriteAddTo( SenderNode, ListView.Selected.Data );
-
- end else if Source = TreeView then begin
-
- FavoriteAddTo( SenderNode, TreeView.Selected.Data );
-
- end;
-
-
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
- Y: Integer);
-var
- SenderNode: TTreeNode;
-begin
-
- SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
- if SenderNode <> nil then begin
- FavoriteDragDrop( SenderNode, Source );
- end;
-
- //\8bó\94\92\8d\80\96Ú\82ª\82¢\82½\82ç\8dí\8f\9c\82·\82é
- if FDropSpaceNode <> nil then begin
- try
- FDropSpaceNode.Delete;
- finally
- FDropSpaceNode := nil;
- end;
- end;
-
-
- SetLinkBar;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
- Node: TTreeNode; var S: String);
-begin
-
- FavoriteTreeView.ReadOnly := True;
- SetLinkBar;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
- Shift: TShiftState);
-begin
- if not TTreeView(Sender).IsEditing then begin
- Case Key of
- VK_F2:
- begin
- FClickNode := FavoriteTreeView.Selected;
- FavoriteTreeViewRenameActionExecute( Sender );
- end;
- VK_DELETE:
- begin
- FClickNode := FavoriteTreeView.Selected;
- FavoriteTreeViewDeleteActionExecute( Sender );
- end;
- VK_RETURN:
- begin
- FavoriteClick( FavoriteTreeView.Selected );
- FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
- end;
- VK_SPACE:
- FavoriteTreeViewDblClick( Sender );
- 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·
- if Key = VK_ESCAPE then begin
- if (TTreeView(Sender).Selected <> nil) then begin
- TTreeView(Sender).Selected.Text := FOrigenCaption;
- end;
- TTreeView(Sender).Selected.Focused := False;
- end;
- end;
-
-end;
-
-procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
-var
- i: Integer;
- LinkToolButton: TLinkToolButton;
-begin
-
- if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
-
- FClickNode := FavoriteTreeView.Selected;
-
- end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
-
- LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
- for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
- if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
- FClickNode := FavoriteTreeView.Items[i];
- Break;
- end;
- end;
- for i := 0 to FClickNode.Count - 1 do begin
- if FClickNode.Item[i].Data = LinkToolButton.Data then begin
- FClickNode := FClickNode.Item[i];
- Break;
- end;
- end;
-
- end;
-
- if FClickNode = nil then begin
- FavoriteTreeBrowseFolderPopupMenu.Visible := False;
- FavoriteTreeDeletePopupMenu.Visible := False;
- FavoriteTreeRenamePopupMenu.Visible := False;
- FavoriteTreeNewFolderPopupMenu.Visible := False;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
- FavoriteTreeURLCopyPopupMenu.Visible := False;
- FavoriteTreeNameCopyPopupMenu.Visible := False;
- FavoriteTreeNameURLCopyPopupMenu.Visible := False;
- FavoriteTreeReloadPopupMenu.Visible := False;
- FavoriteTreeLogDeletePopupMenu.Visible := False;
- end else if FClickNode.IsFirstNode then begin
- FavoriteTreeBrowseFolderPopupMenu.Visible := True;
- FavoriteTreeDeletePopupMenu.Visible := False;
- FavoriteTreeRenamePopupMenu.Visible := False;
- FavoriteTreeNewFolderPopupMenu.Visible := True;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
- FavoriteTreeURLCopyPopupMenu.Visible := False;
- FavoriteTreeNameCopyPopupMenu.Visible := True;
- FavoriteTreeNameURLCopyPopupMenu.Visible := False;
- FavoriteTreeReloadPopupMenu.Visible := False;
- FavoriteTreeLogDeletePopupMenu.Visible := False;
- end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
- FavoriteTreeBrowseFolderPopupMenu.Visible := True;
- FavoriteTreeDeletePopupMenu.Visible := True;
- FavoriteTreeRenamePopupMenu.Visible := False;
- FavoriteTreeNewFolderPopupMenu.Visible := True;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
- FavoriteTreeURLCopyPopupMenu.Visible := False;
- FavoriteTreeNameCopyPopupMenu.Visible := True;
- FavoriteTreeNameURLCopyPopupMenu.Visible := False;
- FavoriteTreeReloadPopupMenu.Visible := False;
- FavoriteTreeLogDeletePopupMenu.Visible := False;
- end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
- FavoriteTreeBrowseFolderPopupMenu.Visible := True;
- FavoriteTreeDeletePopupMenu.Visible := True;
- FavoriteTreeRenamePopupMenu.Visible := True;
- FavoriteTreeNewFolderPopupMenu.Visible := True;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
- FavoriteTreeURLCopyPopupMenu.Visible := False;
- FavoriteTreeNameCopyPopupMenu.Visible := True;
- FavoriteTreeNameURLCopyPopupMenu.Visible := False;
- FavoriteTreeReloadPopupMenu.Visible := False;
- FavoriteTreeLogDeletePopupMenu.Visible := False;
- end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
- FavoriteTreeBrowseFolderPopupMenu.Visible := False;
- FavoriteTreeDeletePopupMenu.Visible := True;
- FavoriteTreeRenamePopupMenu.Visible := True;
- FavoriteTreeNewFolderPopupMenu.Visible := True;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := True;
- FavoriteTreeURLCopyPopupMenu.Visible := True;
- FavoriteTreeNameCopyPopupMenu.Visible := True;
- FavoriteTreeNameURLCopyPopupMenu.Visible := True;
- FavoriteTreeReloadPopupMenu.Visible := True;
- FavoriteTreeLogDeletePopupMenu.Visible := True;
- end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
- FavoriteTreeBrowseFolderPopupMenu.Visible := False;
- FavoriteTreeDeletePopupMenu.Visible := True;
- FavoriteTreeRenamePopupMenu.Visible := True;
- FavoriteTreeNewFolderPopupMenu.Visible := True;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
- FavoriteTreeURLCopyPopupMenu.Visible := True;
- FavoriteTreeNameCopyPopupMenu.Visible := True;
- FavoriteTreeNameURLCopyPopupMenu.Visible := True;
- FavoriteTreeReloadPopupMenu.Visible := True;
- FavoriteTreeLogDeletePopupMenu.Visible := False;
- end else begin
- FavoriteTreeBrowseFolderPopupMenu.Visible := False;
- FavoriteTreeDeletePopupMenu.Visible := False;
- FavoriteTreeRenamePopupMenu.Visible := False;
- FavoriteTreeNewFolderPopupMenu.Visible := False;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
- FavoriteTreeURLCopyPopupMenu.Visible := False;
- FavoriteTreeNameCopyPopupMenu.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;
+ if Source = FavoriteTreeView then begin
+ if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
+ Accept := False;
+ 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
- end;
-
-end;
-
-procedure TGikoForm.ToolButton19Click(Sender: TObject);
-begin
-
- FavoriteArrangeActionExecute( nil );
-
+ Accept := True;
+ end else if Source = BrowserTab then
+ Accept := True
+ else if Source = ListView then
+ Accept := True
+ else if Source is TLinkToolButton then
+ Accept := True
+ else if Source = TreeView then
+ Accept := True
+ else
+ Accept := False;
end;
-procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
-var
- i: Integer;
+procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
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;
+ FavoriteDragOver( Sender, Source, X, Y, State, Accept );
end;
-
-procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
- Sender: TObject);
+procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
begin
-
- FavoriteBrowseFolder( FClickNode );
- //BrowserTab.OnChange(nil);
-
+ // FDragging := true;
end;
-procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
+procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
+var
+ SenderNode: TTreeNode;
+ LinkToolButton: TLinkToolButton;
begin
- FClickNode := FavoriteTreeView.Selected;
- FavoriteTreeViewReloadActionExecute( Sender );
+ LinkToolButton := TLinkToolButton( Sender );
+ SenderNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
+ SenderNode.Selected := False;
+ FavoriteDragDrop( SenderNode, Source );
+
+ SetLinkBar;
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';
+procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
- ThreadItem: TThreadItem;
- FavThread: TFavoriteThreadItem;
+ favButton : TLinkToolButton;
+ favThreadItem : 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;
+ case Button of
+ mbMiddle:
+ begin
+ if Sender is TLinkToolButton then begin
+ favButton := TLinkToolButton( Sender );
+ if TObject( favButton.Data ) is TFavoriteThreadItem then begin
+ favThreadItem := TFavoriteThreadItem( favButton.Data );
+ if favThreadItem.Item <> nil then
+ InsertBrowserTab( favThreadItem.Item, False );
+ end;
+ end;
end;
-
- DeleteHistory(ThreadItem);
- DeleteTab(ThreadItem);
- ThreadItem.DeleteLogFile;
-
- ListView.Refresh;
- finally
end;
end;
-procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
+procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
- ThreadItem: TThreadItem;
- FavThread: TFavoriteThreadItem;
- Board: TBoard;
- FavBoard: TFavoriteBoardItem;
- shiftDown: Boolean;
+ Now : Cardinal;
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);
+ TToolButton( Sender ).DragMode := dmManual;
+ if ssLeft in Shift then begin
+// TToolButton( Sender ).Down := true; // \83\8a\83\93\83N\83c\81[\83\8b\83o\81[\82Ì\8b\93\93®\95s\90R\82Ì\8c´\88ö\82Ì\82æ\82¤\82È\82Ì\82Å\83R\83\81\83\93\83g\83A\83E\83g\82µ\82½(2003-dec-02)
+ if FDragTime = 0 then begin
+ FDragTime := GetTickCount();
+ end else begin
+ Now := GetTickCount();
+ if (Now - FDragTime) > 500 then begin
+ if FDragButton <> TToolButton( Sender ) then begin
+ try
+ FDragButton := TToolButton( Sender );
+ TToolButton(Sender).BeginDrag(false ,5);
+ FDragTime := 0;
+ except
+ {$IF Defined(debug)}
+ ShowMessage('Error');
+ {$IFEND}
+ end;
+ end;
+ end;
+ end;
+ end else begin
+ FDragTime := 0;
end;
+end;
+procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+begin
+ FDragTime := 0;
end;
-procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
+function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
var
- FavThread : TFavoriteThreadItem;
- FavBoard : TFavoriteBoardItem;
- s : string;
+ i: Integer;
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;
-
+ Result := 0;
+ for i := 0 to ToolBar.ButtonCount - 1 do
+ if ToolBar.Buttons[i].Visible then
+ Result := Result + ToolBar.Buttons[i].Width;
end;
-procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
+procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
var
- ThreadItem: TThreadItem;
- FavThread: TFavoriteThreadItem;
- Board: TBoard;
- FavBoard: TFavoriteBoardItem;
- s: string;
+ Control : TWinControl;
+ i, idx : Integer;
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
+ Control := FindControl(BandInfo^.hwndChild);
+ if Control = nil then
+ Exit;
+ idx := 0;
+ for i := MainCoolBar.Bands.Count - 1 downto 0 do begin
+ if MainCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
+ idx := MainCoolBar.Bands[ i ].ID;
+ Break;
end;
+ end;
+ Canvas.Font.Handle := GetStockObject( DEFAULT_GUI_FONT );
+ if (Control = MenuToolBar) or (Control = StdToolBar) then begin
+ BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
+ BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
+ BandInfo^.cxMinChild := 0;
+ BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth;
+ BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
+ end else if Control = LinkToolBar then begin
+ BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
+ BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
+ BandInfo^.cxMinChild := 0;
+ BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '\83\8a\83\93\83N' );
+ BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
+ end else begin // AddressToolBar
+ BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
+ BandInfo^.cxMinChild := 0;
+ BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '\83A\83h\83\8c\83X' );
+ end;
+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
+procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
+var
+ i : Integer;
+ Idx: Integer;
+ p: TPoint;
+begin
+ ChevronPopupMenu.Items.Clear;
+ Idx := 0;
+ for i := 0 to MainCoolBar.Bands.Count - 1 do begin
+ if MainCoolBar.Bands[ i ].Visible then begin
+ if Idx = Int64(RebarChevron^.uBand) then begin
+ Idx := i;
+ break;
+ end;
+ Inc( Idx );
end;
-
end;
-
+ if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
+ if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
+ MenuBarChevronMenu;
+ end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
+ ToolBarChevronMenu(StdToolBar);
+ end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
+ LinkBarChevronMenu;
+ end else
+ Exit;
+ p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
+ ChevronPopupMenu.Popup(p.x, p.y);
+ end;
end;
-procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
- Sender: TObject);
+procedure TGikoForm.MenuBarChevronMenu;
+ procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
+ var
+ i: Integer;
+ Item: TMenuItem;
+ begin
+ MenuItem.Click;
+ for i := 0 to MenuItem.Count - 1 do begin
+// Item := nil;
+ if MenuItem[i] is TFavoriteMenuItem then begin
+ Item := TFavoriteMenuItem.Create(Self);
+ TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
+ end else
+ Item := TMenuItem.Create(Self);
+ Item.Caption := MenuItem[i].Caption;
+ Item.Action := MenuItem[i].Action;
+ Item.ImageIndex := MenuItem[i].ImageIndex;
+ Item.OnClick := MenuItem[i].OnClick;
+ PopupItem.Add(Item);
+ if MenuItem[i].Count > 0 then
+ SetSubMenu(MenuItem[i], Item);
+ end;
+ end;
var
- ThreadItem: TThreadItem;
- FavThread: TFavoriteThreadItem;
- Board: TBoard;
- FavBoard: TFavoriteBoardItem;
- s: string;
+ i: Integer;
+ w: Integer;
+ bw: Integer;
+ Item: TMenuItem;
begin
+ ChevronPopupMenu.Items.Clear;
+ ChevronPopupMenu.Images := MainMenu.Images;
+ bw := GetWidthAllToolButton(MenuToolBar);
+ if MenuToolBar.Width < bw then begin
+ w := 0;
+ for i := 0 to MenuToolBar.ButtonCount - 1 do begin
+ w := w + MenuToolBar.Buttons[i].Width;
+ if MenuToolBar.Width <= w then begin
+ Item := TMenuItem.Create(Self);
+ Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
+ //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
+ ChevronPopupMenu.Items.Add(Item);
+ SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
+ end;
+ end;
+ end;
+end;
- 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
+procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
+ procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
+ var
+ i: Integer;
+ Item: TMenuItem;
+ begin
+ if Assigned(PopupMenu.OnPopup) then
+ PopupMenu.OnPopup(nil);
+ for i := 0 to PopupMenu.Items.Count - 1 do begin
+// Item := nil;
+ if PopupMenu.Items[i] is TFavoriteMenuItem then begin
+ Item := TFavoriteMenuItem.Create(Self);
+ TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
+ end else
+ Item := TMenuItem.Create(Self);
+ Item.Caption := PopupMenu.Items[i].Caption;
+ Item.Action := PopupMenu.Items[i].Action;
+ Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
+ Item.OnClick := PopupMenu.Items[i].OnClick;
+ PopupItem.Add(Item);
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 + Board.URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
- finally
+ end;
+var
+ i: Integer;
+ w: Integer;
+ bw: Integer;
+ Item: TMenuItem;
+begin
+ ChevronPopupMenu.Items.Clear;
+ ChevronPopupMenu.Images := ToolBar.HotImages;
+ bw := GetWidthAllToolButton(ToolBar);
+ if ToolBar.Width < bw then begin
+ w := 0;
+ for i := 0 to ToolBar.ButtonCount - 1 do begin
+ if ToolBar.Buttons[i].Visible then
+ w := w + ToolBar.Buttons[i].Width;
+ if ToolBar.Width <= w then begin
+ if ToolBar.Buttons[i].Tag = 0 then begin
+ Item := TMenuItem.Create(Self);
+ if ToolBar.Buttons[i].Style = tbsSeparator then
+ Item.Caption := '-'
+ else begin
+ //\83X\83\8c\8di\8d\9e\82ÝComBox\82ÌTPanel\82ð\94r\8f\9c\82·\82é
+ if TObject(ToolBar.Buttons[i]) is TPanel then begin
+ Continue;
+ end else begin
+ Item.Caption := ToolBar.Buttons[i].Caption;
+ Item.Action := ToolBar.Buttons[i].Action;
+ end;
+ //Item.Visible := True;
+ end;
+ ChevronPopupMenu.Items.Add(Item);
+ if ToolBar.Buttons[i].DropdownMenu <> nil then begin
+ Item.Action := nil;
+ Item.OnClick := nil;
+ SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
+ end;
+ end;
+ end;
end;
-
end;
-
end;
-function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
+procedure TGikoForm.LinkBarChevronMenu;
var
- Found: TTreeNode;
i: Integer;
+ j: Integer;
+ w: Integer;
+ Item: TFavoriteMenuItem;
+ bw: Integer;
+ Button: TLinkToolButton;
begin
-
- for i := 0 to Node.Count - 1 do begin
- if Node.Item[i].Data = FindPointer then begin
- Result := Node.Item[i];
- Exit;
- end else if Node.Item[i].Count > 0 then begin
- Found := TreeNodeDataFind( Node.Item[i], FindPointer );
- if Found <> nil then begin
- Result := Found;
- Exit;
+ ChevronPopupMenu.Items.Clear;
+ ChevronPopupMenu.Images := LinkToolBar.Images;
+ bw := GetWidthAllToolButton(LinkToolBar);
+ if LinkToolBar.Width < bw then begin
+ w := 0;
+ for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
+ if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
+ for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
+ w := w + LinkToolBar.Buttons[j].Width;
+ if LinkToolBar.Width <= w then begin
+ if LinkToolBar.Buttons[j] is TLinkToolButton then begin
+ Button := TLinkToolButton(LinkToolBar.Buttons[j]);
+ Item := TFavoriteMenuItem.Create(Self);
+ if TObject(Button.Data) is TFavoriteFolder then begin
+ CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
+ end else if TObject(Button.Data) is TFavoriteBoardItem then begin
+ Item.OnClick := FavoriteClick;
+ end else if TObject(Button.Data) is TFavoriteThreadItem then begin
+ Item.OnClick := FavoriteClick;
+ end;
+ Item.Data := Button.Data;
+ Item.Caption := LinkToolBar.Buttons[j].Caption;
+ Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
+ ChevronPopupMenu.Items.Add(Item);
+ end;
+ end;
+ end;
+ break;
end;
end;
end;
-
- Result := nil;
-
end;
-procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
- Y: Integer);
+{!
+\brief \83o\83\93\83h\95\9d\82ð\8dÄ\8cv\8eZ\81E\8dÄ\90Ý\92è\82·\82é
+\param bar \83o\83\93\83h\82ª\8f\8a\91®\82·\82é CoolBar
+\param band \8dÄ\8cv\8eZ\81E\8dÄ\90Ý\92è\82·\82é\83o\83\93\83h
+
+\93Æ\8e©\82É\83o\83\93\83h\82É\94z\92u\82³\82ê\82Ä\82¢\82é\83R\83\93\83g\83\8d\81[\83\8b\82Ì\83T\83C\83Y\82ð\95Ï\8dX\82µ\82½\8fê\8d\87\82É
+\83V\83F\83u\83\8d\83\93\82Ì\95\\8e¦\88Ê\92u\82ð\8dÄ\90Ý\92è\82·\82é\82½\82ß\82É\8eg\97p\82µ\82Ü\82·\81B
+}
+procedure TGikoForm.ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
var
- i: Integer;
- SenderNode: TTreeNode;
+ bandInfo : tagREBARBANDINFOA;
+ pBandInfo : PReBarBandInfoA;
+ lResult : Integer;
+ h : HWND;
+ i, idx : Integer;
begin
- SenderNode := nil;
- for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
- if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
- SenderNode := FavoriteTreeView.Items[i];
+ h := band.Handle;
+ pBandInfo := @bandInfo;
+ ZeroMemory( pBandInfo, sizeof( bandInfo ) );
+ bandInfo.cbSize := sizeof( bandInfo );
+ bandInfo.hwndChild := h;
+ bandInfo.cyMinChild := bar.Height;
+ bar.OnBandInfo( nil, pBandInfo );
+ // band \82Ì\83C\83\93\83f\83b\83N\83X\82ð\92T\82·
+ idx := 0;
+ for i := bar.Bands.Count - 1 downto 0 do begin
+ if bar.Bands[ i ].Control.Handle = h then begin
+ idx := i;
Break;
end;
end;
- SenderNode.Selected := False;
-
- FavoriteDragDrop( SenderNode, Source );
+ // \90Ý\92è
+ lResult := SendMessage( bar.Handle, RB_SETBANDINFO, idx, Integer( pBandInfo ) );
- SetLinkBar;
end;
-procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
- Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
+var
+ Control: TWinControl;
+ i, idx : Integer;
begin
- if FDragWFirst <> true then begin
- FDragWFirst := false;
-{
- end else if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold)
- and (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
-(*}
+ Control := FindControl(BandInfo^.hwndChild);
+ if Control = nil then
+ Exit;
+ idx := 0;
+ for i := ListCoolBar.Bands.Count - 1 downto 0 do begin
+ if ListCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
+ idx := ListCoolBar.Bands[ i ].ID;
+ Break;
+ end;
+ end;
+ if Control = ListToolBar then begin
+ BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
+ BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
+ BandInfo^.cxMinChild := 0;
+ BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
+ BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
end else begin
-//*)
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- if GikoSys.Setting.ListWidthState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
- end;
- end else begin
- if GikoSys.Setting.ListHeightState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
- end;
- end;
+ BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
+ BandInfo^.cxMinChild := 0;
+ BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
end;
end;
-procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
- Y: Integer; State: TDragState; var Accept: Boolean);
-begin
-
- FavoriteDragOver( Sender, Source, X, Y, State, Accept );
-
-end;
-
-procedure TGikoForm.ResRangeActionExecute(Sender: TObject);
+procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
+var
+ Idx: Integer;
+ p: TPoint;
begin
- case FResRangeMenuSelect of
- Ord( grrAll ): AllResAction.Execute;
- Ord( grrKoko ): OnlyKokoResAction.Execute;
- Ord( grrNew ): OnlyNewResAction.Execute;
- 100: OnlyAHundredResAction.Execute;
+ ChevronPopupMenu.Items.Clear;
+ Idx := RebarChevron^.uBand;
+ if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
+ if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
+ ToolBarChevronMenu(ListToolBar);
+ end else
+ Exit;
+ p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
+ ChevronPopupMenu.Popup(p.x, p.y);
end;
end;
-procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
- Y: Integer);
+procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
+var
+ Control: TWinControl;
+ i, idx : Integer;
begin
-
- if FDropSpaceNode <> nil then begin
- try
- FDropSpaceNode.Delete;
- finally
- FDropSpaceNode := nil;
+ Control := FindControl(BandInfo^.hwndChild);
+ if Control = nil then
+ Exit;
+ idx := 0;
+ for i := BrowserCoolBar.Bands.Count - 1 downto 0 do begin
+ if BrowserCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
+ idx := BrowserCoolBar.Bands[ i ].ID;
+ Break;
end;
- SetLinkBar;
end;
-
-end;
-
-procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
- MousePos: TPoint; var Handled: Boolean);
-begin
-
- FToolBarSettingSender := tssList;
- MousePos := ListCoolBar.ClientToScreen( MousePos );
- MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
-
-end;
-
-procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
- MousePos: TPoint; var Handled: Boolean);
-begin
-
- FToolBarSettingSender := tssMain;
- MousePos := MainCoolBar.ClientToScreen( MousePos );
- MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
-
-end;
-
-procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
- MousePos: TPoint; var Handled: Boolean);
-begin
-
- FToolBarSettingSender := tssBrowser;
- MousePos := BrowserCoolBar.ClientToScreen( MousePos );
- 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½');
+ if Control = BrowserToolBar then begin
+ BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
+ BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
+ BandInfo^.cxMinChild := 0;
+ BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
+ BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
end else begin
- ShowMessage('\83t\83@\83C\83\8b\82Ì\8fo\97Í\82É\8e¸\94s\82µ\82Ü\82µ\82½');
+ BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
+ BandInfo^.cxMinChild := 0;
+ BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
end;
end;
-procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
+
+procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
+var
+ Idx: Integer;
+ p: TPoint;
begin
- if FListViewBackGroundColor <> value then begin
- FListViewBackGroundColor := value;
- ListView.Color := FListViewBackGroundColor;
+ ChevronPopupMenu.Items.Clear;
+ Idx := RebarChevron^.uBand;
+ if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
+ if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
+ ToolBarChevronMenu(BrowserToolBar)
+ else
+ Exit;
+ p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
+ ChevronPopupMenu.Popup(p.x, p.y);
end;
end;
-procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
+
+procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
begin
- ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
+ if Column^.iImage = -1 then begin
+ Column^.mask := Column^.mask or LVCF_FMT;
+ end else begin
+ Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
+ Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
+ end;
end;
-procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
+function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
+var
+ i : Integer;
begin
-
- if CabinetPanel.Visible then begin
- if FTreeType = gtt2ch then begin
- CabinetVisible( False );
-
- CabinetBBSAction.Checked := False;
- end else begin
- CabinetBBSAction.Checked := True;
+ Result := nil;
+ for i := bar.ButtonCount - 1 downto 0 do begin
+ if bar.Buttons[ i ].Action = action then begin
+ Result := bar.Buttons[ i ];
+ Break;
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);
+procedure TGikoForm.SetToolBarPopup;
var
- threadItem : TThreadItem;
+ i : Integer;
+ aIEButton : TToolButton;
+ aCabinetBBSButton : TToolButton;
+ aResRangeButton : TToolButton;
+ aThreadRangeButton: TToolButton;
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 );
-
+ for i := 0 to StdToolBar.ButtonCount - 1 do begin
end;
-
+ for i := 0 to ListToolBar.ButtonCount - 1 do begin
+ if ListToolBar.Buttons[i].Action = GikoDM.IconStyle then
+ ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
+ if ListToolBar.Buttons[i].Action = GikoDM.SelectReservAction then
+ ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
+ end;
+ aIEButton := FindToolBarButton( BrowserToolBar, GikoDM.IEAction );
+ if aIEButton <> nil then
+ aIEButton.DropdownMenu := BrowserPopupMenu;
+ aCabinetBBSButton := FindToolBarButton( StdToolBar, GikoDM.CabinetBBSAction );
+ if aCabinetBBSButton <> nil then
+ aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
+ aResRangeButton := FindToolBarButton( BrowserToolBar, GikoDM.ResRangeAction );
+ if aResRangeButton <> nil then
+ aResRangeButton.DropdownMenu := ResRangePopupMenu;
+ aThreadRangeButton:= FindToolBarButton( ListToolBar, GikoDM.ThreadRangeAction );
+ if aThreadRangeButton <> nil then
+ aThreadRangeButton.DropdownMenu := ThreadRangePopupMenu;
end;
-procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
+procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
+ WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
var
- threadItem : TThreadItem;
- boardItem : TBoard;
+ Wnd: THandle;
+ delta: Integer;
+// browserPos : TPoint;
+const
+ ICON_SIZE = 16;
begin
+ Wnd := WindowFromPoint(Mouse.CursorPos);
+ Handled := True;
+ if WheelDelta > 0 then
+ Delta := -1
+ else
+ Delta := 1;
- 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.ParentBoard.URL, gbtAuto );
+ if (Wnd = BrowserTab.Handle) or
+ (Wnd = BrowserTab.Parent.Handle) then begin
+ BrowserTab.ScrollTabs(Delta);
+ end else begin
+ if FIsHandledWheel then begin
+ FIsHandledWheel := False;
+ Handled := False;
+ end else begin
+ FIsHandledWheel := True;
+ if (Wnd = TreeView.Handle) or (Wnd = FavoriteTreeView.Handle)
+ or (Wnd = ListView.Handle) or (Wnd = MessageListView.Handle)
+ then
+ SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y )
+ else
+ Handled := False;
- end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
+ end;
+ end;
+end;
- boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
- if boardItem = nil then
- Exit;
- GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
+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
+ GikoDM.AllItemAction.Checked := True;
+ SetListViewType( gvtAll )
+ end else begin
+ SetListViewType( gvtUser, text, false );
end;
-
end;
-procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
+procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
begin
- SelectTreeNode( GetActiveContent.ParentBoard, True );
+ SetSelectWord( SelectComboBox.Text );
end;
-procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
- MousePos: TPoint; var Handled: Boolean);
+procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
+ Shift: TShiftState);
var
- idx : Integer;
+ IMC: HIMC;
+ Len: integer;
+ Str: string;
+ tmp: string;
begin
- idx := BrowserTab.IndexOfTabAt(MousePos.X, MousePos.Y);
- if BrowserTab.TabIndex <> idx then begin
- BrowserTab.TabIndex := idx;
- BrowserTab.OnChange(nil);
+
+ if Key = VK_Return then
+ begin
+ ModifySelectList;
+ end else if Key = 229 then begin
+ if GikoSys.Setting.UseUndecided then begin
+ IMC := ImmGetContext(SelectComboBox.Handle); //\83R\83\93\83e\83L\83X\83g\8eæ\93¾
+ Len := ImmGetCompositionString(IMC, GCS_COMPSTR, nil, 0); //\82Ü\82¸\92·\82³\82ð\8eæ\93¾
+ SetLength(Str, Len + 1); //Buffer\82Ì\83\81\83\82\83\8a\82ð\90Ý\92è
+ ImmGetCompositionString(IMC, GCS_COMPSTR, PChar(Str), Len + 1); //\82Ü\82¸\92·\82³\82ð\8eæ\93¾
+ ImmReleaseContext(SelectComboBox.Handle, IMC); //\83R\83\93\83e\83L\83X\83g\89ð\95ú
+ SetLength(Str, Len);
+ if SelectComboBox.SelLength > 0 then begin //\91I\91ð\92\86\82Ì\95¶\8e\9a\97ñ\82ª\82 \82é\82©
+ tmp := Copy(SelectComboBox.Text, 1, SelectComboBox.SelStart);
+ Str := tmp + Str + Copy(SelectComboBox.Text, SelectComboBox.SelStart + SelectComboBox.SelLength + 1, Length(SelectComboBox.Text));
+ end else
+ Str := SelectComboBox.Text + Str;
+
+ if (Length(Str) > 0) then begin
+ SetSelectWord(Str);
+ end;
end;
+ end else if Length( SelectComboBox.Text ) = 0 then
+ begin
+ {* SelectComboBox.Text\82ª\8bó\82Å\82à\81A\93ü\97Í\93r\92\86\82ÅEsc\82µ\82½\82Æ\82©
+ * \8bó\82Ì\82Æ\82«\82ÉDel\83L\81[\82ð\89\9f\82µ\82½\82Æ\82©\82È\82Ì\82Å\81A\83X\83\8c\82Ì\8di\8d\9e\82Ý\82ð\88Û\8e\9d\82·\82é\81B
+ * \81i\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢\81j
+ *}
+ end else begin
+ // \83X\83\8c\88ê\97\97\82Ì\94Í\88Í\8ew\92è\82ð\89ð\8f\9c
+ ClearThreadRengeAction;
+ end;
end;
-
-procedure TGikoForm.KoreCopyExecute(Sender: TObject);
+//! \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
- KonoresCopy(KokoPopupMenu.Tag, true);
+ // \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.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
-var
- ThreadItem: TThreadItem;
- tmp: string;
- FileName: string;
- Res: TResRec;
- Header: string;
- Body: string;
- boardPlugIn : TBoardPlugIn;
-begin
- if Number = 0 then Exit;
- ThreadItem := GetActiveContent;
- if ThreadItem <> nil then begin
- //if ThreadItem.IsBoardPlugInAvailable then begin
- if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
- //===== \83v\83\89\83O\83C\83\93\82É\82æ\82é\95\\8e¦
- //boardPlugIn := ThreadItem.BoardPlugIn;
- boardPlugIn := ThreadItem.ParentBoard.BoardPlugIn;
+procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
+begin
- // \83t\83H\83\93\83g\82â\83T\83C\83Y\82Ì\90Ý\92è
- // \95¶\8e\9a\83R\81[\83h\82Í\83v\83\89\83O\83C\83\93\82É\94C\82¹\82é
- //\82±\82±\82Å\82Q\82¿\82á\82ñ\82Ë\82é\82Ìdat\82Ì\8c`\8e®\82Å\82P\8ds\93Ç\82Ý\8d\9e\82ß\82ê\82Î¥¥¥\81B
- tmp := boardPlugIn.GetDat( DWORD( threadItem ), Number );
- end else begin
- FileName := ThreadItem.FilePath;
- tmp := GikoSys.ReadThreadFile(FileName, Number);
- end;
- if tmp <> '' then begin
- Res := DivideStrLine(tmp);
+ ModifySelectList;
- Header := IntToStr(Number) + ' \81F' + Res.FName + ' \81F' + Res.FDateTime + #13#10;
- if ReplaceTag then begin
- Header := CustomStringReplace(Header, '</b>', '',true);
- Header := CustomStringReplace(Header, '<b>', '',true);
- Header := CustomStringReplace(Header, '<br>', '',true);
- Header := DeleteFontTag(Header);
- end;
- //if ThreadItem.IsBoardPlugInAvailable then begin
- if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
- Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true);
- Body := CustomStringReplace(Body, '<br>', #13#10,true);
- end else begin
- Body := CustomStringReplace(Res.FBody, ' <br> ', #13#10,true);
- Body := CustomStringReplace(Body, ' <br>', #13#10,true);
- Body := CustomStringReplace(Body, '<br> ', #13#10,true);
- Body := CustomStringReplace(Body, '<br>', #13#10,true);
+ if Length( SelectComboBox.Text ) = 0 then
+ begin
+ SelectComboBox.Text := GikoDataModule.SELECTCOMBOBOX_NAME;
+ SelectComboBox.Color := GikoDataModule.SELECTCOMBOBOX_COLOR;
+ end;
- end;
- Body := CustomStringReplace(Body, '</a>', '',true);
+end;
- Body := GikoSys.DeleteLink(Body);
- if ReplaceTag then begin
- Body := CustomStringReplace(Body, '<', '<');
- Body := CustomStringReplace(Body, '>', '>');
- Body := CustomStringReplace(Body, '"', '"');
- Body := CustomStringReplace(Body, '&', '&');
- //Body := CustomStringReplace(Body, ' ', ' ');
- end;
+// \8di\82è\8d\9e\82Ý\8c\9f\8dõ\82Ì\97\9a\97ð\8dX\90V
+procedure TGikoForm.ModifySelectList;
+var
+ idx : Integer;
+ oldText : string;
+begin
- Header := Header + Body;
+ try
+ if not SelectComboBoxPanel.Visible then
+ exit;
- Clipboard.SetTextBuf( PChar(Header) );
+ if Length( SelectComboBox.Text ) > 0 then
+ begin
+ oldText := SelectComboBox.Text;
+ idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
+ if idx <> -1 then
+ 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;
-
-
-procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
-begin
- AddRoundNameMenu(dummy1);
-end;
-procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
-begin
- FavoriteDM.URLReplace(oldURLs, newURLs);
end;
-procedure TGikoForm.RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
-begin
- RoundList.URLReplace(oldURLs, newURLs);
-end;
-procedure TGikoForm.TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
-const
- Filename = 'tab.sav';
- bFilename = '~tab.sav';
+procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
+ Shift: TShiftState; X, Y: Integer);
var
- i, j: Integer;
- tempString: string;
- tmpURL: string;
- oldHost: string;
- oldBoardName: string;
- newHost: string;
- newBoardName: string;
- TabList: TStringList;
+ pos : TPoint;
+ w : Integer;
begin
+ If (SelectComboBoxPanel.Visible) and (IsDraggingSelectComboBox) Then begin
+ pos.X := X;
+ pos.Y := Y;
+ pos := SelectComboBoxSplitter.ClientToScreen( pos );
+ //w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
+ w := SelectComboBoxPanel.Width + (pos.X - DraggingSelectComboBoxPosition.X);
- if oldURLs.Count <> newURLs.Count then begin
- Exit;
- end;
- if FileExists(GikoSys.GetAppDir + 'tab.sav') then begin
- TabList := TStringList.Create;
- try
- TabList.LoadFromFile(GikoSys.GetAppDir + Filename);
+ If w <= 50 Then Begin
+ // \8e\9f\82Ì\88Ú\93®\82Ì\8aî\8f\80\82ª\81u\89ß\82¬\82Ä\82µ\82Ü\82Á\82½\88Ê\92u\81v\82Å\82Í\82È\82
+ // \81u\8e~\82Ü\82Á\82½(50pixel)\88Ê\92u\81v\82É\82È\82é\82æ\82¤\82É
+ pos.X := pos.X + (50 - w);
- //\82±\82±\82©\82ç\81AThread\82ÌURL\82Ì\95Ï\8dX
- //\96Ê\93|\82¾\82¯\82Çthread\82Í\82»\82ê\82¼\82êURL\82ð\83`\83\83\83b\83N\82µ\82È\82ª\82ç\82â\82Á\82Ä\82©\82È\82«\82á\82¢\82¯\82È\82¢\81B
- for i := 0 to oldURLs.Count - 1 do begin
- tmpURL := Copy(oldURLs[i], 1, Length(oldURLs[i]) -1);
- oldHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
- oldBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
- tmpURL := Copy(newURLs[i], 1, Length(newURLs[i]) -1);
- newHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
- newBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
+ // \8f¬\82³\82\82È\82è\82·\82¬\82È\82¢\82æ\82¤\82É
+ w := 50;
+ End;
- for j := 0 to TabList.Count - 1 do begin
- tempString := TabList[j];
- if ( AnsiPos(oldBoardName, tempString) <> 0 ) and ( AnsiPos(oldHost, tempString ) <> 0 ) then begin
- tempString := StringReplace(tempString, oldHost, newHost,[]);
- TabList[j] := tempString;
- end;
- end;
- end;
- //\82±\82±\82Ü\82Å\81AThread\82ÌURL\82Ì\95Ï\8dX
+ // \83`\83\89\82Â\82«\8cy\8c¸\82Ì\88×
+ //If SelectComboBox.Width <> w Then Begin
+ If SelectComboBoxPanel.Width <> w Then Begin
+ SelectComboBoxPanel.Width := w;
+ SelectComboBox.Width := SelectComboBoxPanel.Width - SelectComboBoxSplitter.Width;
+ GikoSys.Setting.SelectComboBoxWidth := w;
+ DraggingSelectComboBoxPosition := pos;
- if FileExists( GikoSys.GetAppDir + Filename) then begin
- if FileExists( GikoSys.GetAppDir + bFilename) then
- DeleteFile(GikoSys.GetAppDir + bFilename);
+ // \83V\83F\83u\83\8d\83\93\88Ê\92u\82ª\95Ï\82í\82é\82Ì\82Å BandInfo \82Ì\8dÄ\90Ý\92è
+ ResetBandInfo( ListCoolBar, ListToolBar );
+ End;
+ End;
- //\83o\83b\83N\83A\83b\83v\82ð\8dì\82é\81B
- RenameFile(GikoSys.GetAppDir + Filename, GikoSys.GetAppDir + bFilename);
- end;
+end;
- TabList.SaveToFile(GikoSys.GetAppDir + Filename);
- finally
- TabList.Free;
- end;
- end;
+procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
+ Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+var
+ pos : TPoint;
+begin
+ IsDraggingSelectComboBox := True;
+ pos.X := X;
+ pos.Y := Y;
+ DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
end;
-/// \8dÅ\8f¬\89»\82³\82ê\82é
-procedure TGikoForm.OnMinimize;
+procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
+ Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
- if FActiveContent <> nil then begin
- FIsMinimize := mtMinimizing;
- FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
- end;
+ IsDraggingSelectComboBox := False;
+
end;
-/// \8dÅ\8f¬\89»\82³\82ê\82½ (OnResized \82©\82ç\8cÄ\82Î\82ê\82é)
-procedure TGikoForm.OnMinimized;
+procedure TGikoForm.StatusBarResize(Sender: TObject);
begin
- FIsMinimize := mtMinimized;
+ StatusBar.Panels[1].Width := StatusBar.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 = GikoDataModule.SELECTCOMBOBOX_NAME) then
+ begin
+ SelectComboBox.Text := '';
+ SelectComboBox.Color := clWindow;
+ end;
-procedure TGikoForm.BrowserTabResize(Sender: TObject);
-begin
- CoolBarResized( Sender, BrowserCoolBar );
end;
-// *************************************************************************
-// ExternalBoardPlugInMain
-// \83v\83\89\83O\83C\83\93\83\81\83j\83\85\81[\82Ì\8d\80\96Ú\82ª\8eÀ\8ds\82³\82ê\82½
-// *************************************************************************
-procedure TGikoForm.OnPlugInMenuItem( Sender : TObject );
-var
- item : TMenuItem;
- boardPlugIn : TBoardPlugIn;
+procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
begin
- if not (Sender is TMenuItem) then
- Exit;
-
- item := TMenuItem( Sender );
- if not Assigned( Pointer( item.Tag ) ) then
+ if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
Exit;
- // \83v\83\89\83O\83C\83\93\82Ì\83\81\83j\83\85\81[\83n\83\93\83h\83\89\82ð\8cÄ\82Ñ\8fo\82·
- boardPlugIn := TBoardPlugIn( item.Tag );
- boardPlugIn.PlugInMenu( item.Handle );
+ if TObject(SenderNode.Data) is TFavoriteFolder then
+ SourceNode.MoveTo(SenderNode, naAddChild)
+ else
+ SourceNode.MoveTo(SenderNode, naInsert);
end;
-// TreeView \82ª\83N\83\8a\83b\83N\82³\82ê\82½
-procedure TGikoForm.TreeClick( Node : TTreeNode );
+
+procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
+var
+ Node: TTreeNode;
+ FavNode: TTreeNode;
+ FavoBoardItem: TFavoriteBoardItem;
+ FavoThreadItem: TFavoriteThreadItem;
+ Board: TBoard;
+ ThreadItem: TThreadItem;
begin
- if Node = nil then
+ if (SenderNode = nil) or (Source = nil) then
Exit;
- if FTreeType = gttHistory then begin
- if Node <> nil then
- if TObject( Node.Data ) is TFavoriteThreadItem then
- if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
- FavoriteClick( Node );
- Exit;
- end;
+ if not (TObject(SenderNode.Data) is TFavoriteFolder) then
+ FavNode := SenderNode.Parent
+ else
+ FavNode := SenderNode;
- ActiveListColumnSave;
+ Node := nil;
- if TObject(Node.Data) is TBBS then begin
- SetActiveList(Node.data);
- end else if TObject(Node.Data) is TCategory then begin
- SetActiveList(Node.data);
- end else if TObject(Node.Data) is TBoard then begin
- if not TBoard(Node.Data).IsThreadDatRead then begin
- Screen.Cursor := crHourGlass;
- try
- if not TBoard(Node.Data).IsThreadDatRead then
- GikoSys.ReadSubjectFile(Node.Data);
- finally
- Screen.Cursor := crDefault;
- end;
- end;
- SetActiveList(Node.data);
+ if Source is TBoard then begin
+ Board := TBoard( Source );
+ FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
+ Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
+ Node.ImageIndex := 15;
+ Node.SelectedIndex := 15;
+ end else if Source is TFavoriteBoardItem then begin
+ FavoBoardItem := TFavoriteBoardItem( Source );
+ Board := FavoBoardItem.Item;
+ if Board <> nil then
+ if not Board.IsThreadDatRead then
+ GikoSys.ReadSubjectFile(Board);
+ Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
+ Node.ImageIndex := 15;
+ Node.SelectedIndex := 15;
+ end else if Source is TThreadItem then begin
+ ThreadItem := TThreadItem( Source );
+ FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
+ Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
+ Node.ImageIndex := 16;
+ Node.SelectedIndex := 16;
+ end else if Source is TBrowserRecord then begin
+ ThreadItem := TBrowserRecord( Source ).Thread;
+ FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
+ Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
+ Node.ImageIndex := 16;
+ Node.SelectedIndex := 16;
+ end else if Source is TFavoriteThreadItem then begin
+ FavoThreadItem := TFavoriteThreadItem( Source );
+ ThreadItem := FavoThreadItem.Item;
+ Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
+ Node.ImageIndex := 16;
+ Node.SelectedIndex := 16;
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;
- if GikoForm.Visible then
- ListView.SetFocus;
- end;
- end else begin
- if GikoSys.Setting.ListHeightState = glsMax then begin
- BrowserMinAction.Execute;
- if GikoForm.Visible then
- ListView.SetFocus;
- end;
- end;
+ if not (TObject(SenderNode.Data) is TFavoriteFolder) then
+ if Node <> nil then
+ FavoriteMoveTo( SenderNode, Node );
+
+end;
+
+procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
+var
+ idx: Integer;
+ SourceNode: TTreeNode;
+ LinkToolButton: TLinkToolButton;
+begin
+
+ if SenderNode = nil then
+ Exit;
+
+ if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
+ if FDropSpaceNode <> nil then
+ SenderNode := FDropSpaceNode;
+
+ if Source = FavoriteTreeView then begin
+ SourceNode := FavoriteTreeView.Selected;
+ FavoriteMoveTo( SenderNode, SourceNode );
+ end else if Source is TLinkToolButton then begin
+ LinkToolButton := TLinkToolButton( Source );
+ SourceNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
+ FavoriteMoveTo( SenderNode, SourceNode );
+ end else if Source = BrowserTab then begin
+ idx := BrowserTab.TabIndex;
+ FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
+ end else if Source = ListView then begin
+ FavoriteAddTo( SenderNode, ListView.Selected.Data );
+ end else if Source = TreeView then begin
+ FavoriteAddTo( SenderNode, TreeView.Selected.Data );
end;
-
end;
-// TreeView \82ª\83_\83u\83\8b\83N\83\8a\83b\83N\82³\82ê\82½
-procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
+procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
+ Y: Integer);
var
- Board : TBoard;
- ThreadItem : TThreadItem;
- shiftDown : Boolean;
+ SenderNode: TTreeNode;
begin
- if Node = nil then Exit;
-
- shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
+ SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
+ if SenderNode <> nil then begin
+ FavoriteDragDrop( SenderNode, Source );
+ end;
- if FTreeType = gtt2ch then begin
- if not (TObject(Node.Data) is TBoard) then Exit;
- Board := TBoard(Node.Data);
- DownloadList(Board, shiftDown);
- end else if FTreeType = gttHistory then begin
- if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
- ThreadItem := TFavoriteThreadItem(Node.Data).Item;
- DownloadContent(ThreadItem, shiftDown);
+ //\8bó\94\92\8d\80\96Ú\82ª\82¢\82½\82ç\8dí\8f\9c\82·\82é
+ if FDropSpaceNode <> nil then begin
+ try
+ FDropSpaceNode.Delete;
+ finally
+ FDropSpaceNode := nil;
+ end;
end;
+ //\8dX\90V\82µ\82½\82±\82Æ\82ð\8b³\82¦\82é
+ FavoriteDM.Modified := true;
-end;
+ SetLinkBar;
-procedure TGikoForm.TreeViewClick(Sender: TObject);
-begin
- TreeClick( TreeView.Selected );
end;
-procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
- Shift: TShiftState);
+procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
+ Node: TTreeNode; var S: String);
begin
- if Key = VK_BACK then begin
-// UpFolderButtonClick(Sender);
- end else if Key = VK_SPACE then begin
- TreeDoubleClick( TreeView.Selected );
- end else if Key = VK_RETURN then begin
- TreeClick( TreeView.Selected );
- TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
- end;
-end;
+ //\8dX\90V\82µ\82½\82±\82Æ\82ð\8b³\82¦\82é
+ FavoriteDM.Modified := true;
+
+ FavoriteTreeView.ReadOnly := True;
+ SetLinkBar;
+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;
+procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
+ Shift: TShiftState);
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 ) );
+ if not TTreeView(Sender).IsEditing then begin
+ Case Key of
+ VK_F2:
+ begin
+ FClickNode := FavoriteTreeView.Selected;
+ GikoDM.FavoriteTreeViewRenameActionExecute( Sender );
end;
- end;}
-
- WM_XBUTTONDOWN:
- case Msg.wParam shr 16 of
- XBUTTON1:
+ VK_DELETE:
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;
+ FClickNode := FavoriteTreeView.Selected;
+ GikoDM.FavoriteTreeViewDeleteActionExecute( Sender );
+ end;
+ VK_RETURN:
+ begin
+ FavoriteClick( FavoriteTreeView.Selected );
+ FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
+ end;
+ VK_SPACE:
+ 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·
+ if Key = VK_ESCAPE then begin
+ if (TTreeView(Sender).Selected <> nil) then begin
+ TTreeView(Sender).Selected.Text := FOrigenCaption;
end;
- XBUTTON2:
+ TTreeView(Sender).Selected.Focused := False;
end;
end;
+
end;
-procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
- Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
var
- favItem : TTreeNode;
- favThreadItem : TFavoriteThreadItem;
+ i: Integer;
+ LinkToolButton: TLinkToolButton;
begin
- case Button of
- mbLeft:
- begin
- FMouseDownPos.X := X;
- FMouseDownPos.Y := Y;
- end;
- mbMiddle:
- begin
- favItem := FavoriteTreeView.GetNodeAt( X, Y );
- if favItem = nil then Exit;
+ if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
+
+ FClickNode := FavoriteTreeView.Selected;
- if TObject( favItem.Data ) is TFavoriteThreadItem then begin
- favThreadItem := TFavoriteThreadItem( favItem.Data );
- if favThreadItem.Item <> nil then
- InsertBrowserTab( favThreadItem.Item, False );
+ end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
+
+ LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
+ for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
+ if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
+ FClickNode := FavoriteTreeView.Items[i];
+ Break;
+ end;
+ end;
+ for i := 0 to FClickNode.Count - 1 do begin
+ if FClickNode.Item[i].Data = LinkToolButton.Data then begin
+ FClickNode := FClickNode.Item[i];
+ Break;
end;
end;
+
+ end;
+
+ if FClickNode = nil then begin
+ FavoriteTreeBrowseFolderPopupMenu.Visible := False;
+ FavoriteTreeDeletePopupMenu.Visible := False;
+ FavoriteTreeRenamePopupMenu.Visible := False;
+ FavoriteTreeNewFolderPopupMenu.Visible := False;
+ FavoriteTreeURLCopyPopupMenu.Visible := False;
+ FavoriteTreeNameCopyPopupMenu.Visible := False;
+ 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 := 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 := 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;
+ FavoriteTreeRenamePopupMenu.Visible := True;
+ FavoriteTreeNewFolderPopupMenu.Visible := True;
+ FavoriteTreeURLCopyPopupMenu.Visible := False;
+ FavoriteTreeNameCopyPopupMenu.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;
+ FavoriteTreeRenamePopupMenu.Visible := True;
+ FavoriteTreeNewFolderPopupMenu.Visible := True;
+ FavoriteTreeURLCopyPopupMenu.Visible := True;
+ FavoriteTreeNameCopyPopupMenu.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;
+ FavoriteTreeRenamePopupMenu.Visible := True;
+ FavoriteTreeNewFolderPopupMenu.Visible := True;
+ FavoriteTreeURLCopyPopupMenu.Visible := True;
+ FavoriteTreeNameCopyPopupMenu.Visible := True;
+ FavoriteTreeNameURLCopyPopupMenu.Visible := True;
+ FavoriteTreeReloadPopupMenu.Visible := True;
+ FavoriteTreeLogDeletePopupMenu.Visible := False;
+ FavoriteTreeItemNameCopyPopupMenu.Visible := True;
+ end else begin
+ FavoriteTreeBrowseFolderPopupMenu.Visible := False;
+ FavoriteTreeDeletePopupMenu.Visible := False;
+ FavoriteTreeRenamePopupMenu.Visible := False;
+ FavoriteTreeNewFolderPopupMenu.Visible := False;
+ FavoriteTreeURLCopyPopupMenu.Visible := False;
+ FavoriteTreeNameCopyPopupMenu.Visible := False;
+ FavoriteTreeNameURLCopyPopupMenu.Visible := False;
+ FavoriteTreeReloadPopupMenu.Visible := False;
+ FavoriteTreeLogDeletePopupMenu.Visible := False;
+ FavoriteTreeItemNameCopyPopupMenu.Visible := False;
end;
end;
-procedure TGikoForm.MessagePanelResize(Sender: TObject);
+procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
+var
+ i: Integer;
begin
- if FIsIgnoreResize <> rtNone then
- Exit;
+ if not (TObject(node.Data) is TFavoriteFolder) then
+ exit;
- if GikoSys.Setting.ListOrientation = gloVertical then begin
- if GikoSys.Setting.ListHeightState = glsMin then begin
- // \8dÅ\8f¬\95\\8e¦\82É\82·\82é
- ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
- end;
+ 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.OnResized;
+function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
var
- doc : Variant;
+ Found: TTreeNode;
+ i: Integer;
begin
- FOldFormWidth := Width;
- FIsIgnoreResize := rtNone;
-
- case FIsMinimize of
- mtMinimizing:
- begin
- // \8dÅ\8f¬\89»\92\86\82Å\82 \82é
- PostMessage( Handle, USER_MINIMIZED, 0, 0 );
- end;
-
- mtMinimized:
- begin
- // \8dÅ\8f¬\89»\82Í\8aù\82É\8a®\97¹\82µ\82Ä\82¢\82é (\82Â\82Ü\82è\83^\83X\83N\83o\81[\82©\82ç\83E\83B\83\93\83h\83E\82ð\95\9c\8c³\92\86)
- if FActiveContent <> nil then begin
- doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
- doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
+ for i := 0 to Node.Count - 1 do begin
+ if Node.Item[i].Data = FindPointer then begin
+ Result := Node.Item[i];
+ Exit;
+ end else if Node.Item[i].Count > 0 then begin
+ Found := TreeNodeDataFind( Node.Item[i], FindPointer );
+ if Found <> nil then begin
+ Result := Found;
+ Exit;
end;
- FIsMinimize := mtNone;
end;
end;
+ Result := nil;
+
end;
-procedure TGikoForm.TreeSelectNameCopyExecute(Sender: TObject);
+procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
+ Y: Integer);
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);
+ i: Integer;
+ SenderNode: TTreeNode;
begin
- if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
- (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
- FavoriteClick( TObject( FavoriteTreeView.Selected ) );
+ SenderNode := nil;
+ for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
+ if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
+ SenderNode := FavoriteTreeView.Items[i];
+ Break;
+ end;
end;
+ SenderNode.Selected := False;
+
+ FavoriteDragDrop( SenderNode, Source );
+ SetLinkBar;
end;
-destructor TBrowserRecord.Destroy;
-var
- doc :OleVariant;
+procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
+ Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
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;
+ if FDragWFirst <> true then begin
+ FDragWFirst := false;
+{
+ end else if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold)
+ and (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
+(*}
+ end else begin
+//*)
+ if GikoSys.Setting.ListOrientation = gloHorizontal then begin
+ if GikoSys.Setting.ListWidthState = glsMin then begin
+ GikoDM.BrowserMaxAndFocusAction.Execute;
end;
- end;
- //TOleControl(Self.FBrowser).Visible := false;
- ShowWindow(Self.FBrowser.Handle, SW_HIDE);
+ end else begin
+ if GikoSys.Setting.ListHeightState = glsMin then begin
+ GikoDM.BrowserMaxAndFocusAction.Execute;
+ end;
+ end;
end;
-
end;
-function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
-var
- p : TPoint;
- e: IHTMLElement;
- AID: string;
- stlist : TStringList;
- i, count, rc : Integer;
- body : String;
- limited : boolean;
+procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
+ Y: Integer; State: TDragState; var Accept: Boolean);
begin
- result := true;
- try
- if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then
- FActiveContent.Browser.SetFocus;
- try
- GetCursorPos(p);
- p.x := p.x - FActiveContent.Browser.ClientOrigin.x;
- p.y := p.y - FActiveContent.Browser.ClientOrigin.y;
- 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;
+ FavoriteDragOver( Sender, Source, X, Y, State, Accept );
-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
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
- (FActiveContent.Browser <> BrowserNullTab.Browser) then
- TAction(Sender).Enabled := true
- else
- TAction(Sender).Enabled := false;
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
end;
-procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);
+procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
+ Y: Integer);
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);
+ if FDropSpaceNode <> nil then begin
+ try
+ FDropSpaceNode.Delete;
+ finally
+ FDropSpaceNode := nil;
+ end;
+ //\8dX\90V\82µ\82½\82±\82Æ\82ð\8b³\82¦\82é
+ FavoriteDM.Modified := true;
+ SetLinkBar;
end;
+
end;
-procedure TGikoForm.SetFocusForCabinetActionExecute(Sender: TObject);
+procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
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;
+ if FListViewBackGroundColor <> value then begin
+ FListViewBackGroundColor := value;
+ ListView.Color := FListViewBackGroundColor;
end;
end;
-procedure TGikoForm.SetFocusForCabinetActionUpdate(Sender: TObject);
+procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
+var
+ threadItem : TThreadItem;
+ boardItem : TBoard;
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;
+ if FClickNode = nil then Exit;
-//\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;
+ if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
-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;
+ threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
+ if threadItem = nil then
+ Exit;
+ GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
+
+ end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
+
+ boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
+ if boardItem = nil then
+ Exit;
+ GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
-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);
+procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
+ MousePos: TPoint; var Handled: Boolean);
var
- List: TList;
- i: Integer;
- html: TStringList;
- title: string;
+ idx : 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ð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);
- SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName));
- finally
- html.Free;
- end;
- end;
- end;
- end;
+ idx := BrowserTab.IndexOfTabAt(MousePos.X, MousePos.Y);
+ if BrowserTab.TabIndex <> idx then begin
+ BrowserTab.TabIndex := idx;
+ BrowserTab.OnChange(nil);
end;
- finally
- Screen.Cursor := crDefault;
- List.Free;
- end;
end;
-procedure TGikoForm.SkinorCSSFilesCopy(path: string);
+
+procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
var
- tmp, tmpD, tmpF: string;
- current: string;
- dirs: TStringList;
- files: TStringList;
- i, j: Integer;
+ ThreadItem: TThreadItem;
+ tmp: string;
+ FileName: string;
+ Res: TResRec;
+ Header: string;
+ Body: string;
+ boardPlugIn : TBoardPlugIn;
begin
- if GikoSys.Setting.UseSkin then begin
- current := ExtractFilePath(GikoSys.GetSkinDir);
- tmp := GikoSys.Setting.CSSFileName;
- end else if GikoSys.Setting.UseCSS then begin
- current := ExtractFilePath(GikoSys.GetStyleSheetDir);
- tmp := ExtractFilePath(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName);
- end;
- dirs := TStringList.Create;
- try
- dirs.Add(tmp);
- if tmp <> current then begin
- GikoSys.GetDirectoryList(current, '*.*', dirs, true);
- for i := 0 to dirs.Count - 1 do begin
- files := TStringList.Create;
- try
- files.BeginUpdate;
- gikoSys.GetFileList(dirs[i], '*.*', files, true);
- files.EndUpdate;
- tmpD := CustomStringReplace(dirs[i], GikoSys.GetConfigDir, path);
- if (AnsiPos(dirs[i], tmp) <> 0) and not (DirectoryExists(tmpD)) then
- ForceDirectories(tmpD);
-
- if(dirs[i] = tmp) and (dirs[i] <> current) then begin
- for j := 0 to files.Count - 1 do begin
- tmpF := CustomStringReplace(files[j], GikoSys.GetConfigDir, path);
- if not FileExists(tmpF) then begin
- CopyFile(PChar(files[j]), PChar(tmpF),True);
- end;
- end;
- end;
- finally
- files.Free;
- end;
- end;
+ if Number = 0 then Exit;
+ ThreadItem := GetActiveContent;
+
+ if ThreadItem <> nil then begin
+ //if ThreadItem.IsBoardPlugInAvailable then begin
+ if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
+ //===== \83v\83\89\83O\83C\83\93\82É\82æ\82é\95\\8e¦
+ //boardPlugIn := ThreadItem.BoardPlugIn;
+ boardPlugIn := ThreadItem.ParentBoard.BoardPlugIn;
+
+ // \83t\83H\83\93\83g\82â\83T\83C\83Y\82Ì\90Ý\92è
+ // \95¶\8e\9a\83R\81[\83h\82Í\83v\83\89\83O\83C\83\93\82É\94C\82¹\82é
+ //\82±\82±\82Å\82Q\82¿\82á\82ñ\82Ë\82é\82Ìdat\82Ì\8c`\8e®\82Å\82P\8ds\93Ç\82Ý\8d\9e\82ß\82ê\82Î¥¥¥\81B
+ tmp := boardPlugIn.GetDat( DWORD( threadItem ), Number );
end else begin
- tmpD := CustomStringReplace(dirs[0], GikoSys.GetConfigDir, path);
- if not DirectoryExists(tmpD) then
- ForceDirectories(tmpD);
- tmpF := CustomStringReplace(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName
- , GikoSys.GetConfigDir, path);
- if not FileExists(tmpF) then begin
- CopyFile(PChar(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName)
- , PChar(tmpF), True);
- end;
+ FileName := ThreadItem.FilePath;
+ tmp := GikoSys.ReadThreadFile(FileName, Number);
end;
- finally
- dirs.Free;
- end;
-
+ if tmp <> '' then begin
+ THTMLCreate.DivideStrLine(tmp, @Res);
+
+ Header := IntToStr(Number) + ' \81F' + Res.FName + ' \81F' + Res.FDateTime + #13#10;
+ if ReplaceTag then begin
+ Header := CustomStringReplace(Header, '</b>', '',true);
+ Header := CustomStringReplace(Header, '<b>', '',true);
+ Header := CustomStringReplace(Header, '<br>', '',true);
+ Header := DeleteFontTag(Header);
+ end;
+ //if ThreadItem.IsBoardPlugInAvailable then begin
+ if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
+ Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true);
+ Body := CustomStringReplace(Body, '<br>', #13#10,true);
+ end else begin
+ Body := CustomStringReplace(Res.FBody, ' <br> ', #13#10,true);
+ Body := CustomStringReplace(Body, ' <br>', #13#10,true);
+ Body := CustomStringReplace(Body, '<br> ', #13#10,true);
+ Body := CustomStringReplace(Body, '<br>', #13#10,true);
-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;
+ Body := CustomStringReplace(Body, '</a>', '',true);
-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;
- end;
+ Body := HTMLCreater.DeleteLink(Body);
+ if ReplaceTag then begin
+ Body := CustomStringReplace(Body, '<', '<');
+ Body := CustomStringReplace(Body, '>', '>');
+ Body := CustomStringReplace(Body, '"', '"');
+ Body := CustomStringReplace(Body, '&', '&');
+ //Body := CustomStringReplace(Body, ' ', ' ');
end;
+
+ Header := Header + Body;
+
+ Clipboard.SetTextBuf( PChar(Header) );
end;
- if TreeView.Visible then
- TreeView.Refresh;
- if ListView.Visible then
- ListView.Refresh;
- finally
- List.Free;
end;
end;
-procedure TGikoForm.LogFolderOpenActionExecute(Sender: TObject);
-var
- List: TList;
-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;
- end;
- end else if GetActiveList is TBoard then begin
- GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(GetActiveList).FilePath) + '"');
- end;
+procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
+begin
+ AddRoundNameMenu(dummy1);
end;
-function TGikoForm.GetTabURLs(AStringList: TStringList) : Boolean;
-var
- rec : TBrowserRecord;
- i, bound : Integer;
+procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
begin
- 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;
+ FavoriteDM.URLReplace(oldURLs, newURLs);
end;
-procedure TGikoForm.TabsSaveActionExecute(Sender: TObject);
+procedure TGikoForm.RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
begin
-
- 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;
- end;
+ RoundList.URLReplace(oldURLs, newURLs);
end;
-function TGikoForm.SaveTabURLs : Boolean;
+procedure TGikoForm.TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
const
Filename = 'tab.sav';
bFilename = '~tab.sav';
var
- SaveStringList: TStringList;
+ i, j: Integer;
+ tempString: string;
+ tmpURL: string;
+ oldHost: string;
+ oldBoardName: string;
+ newHost: string;
+ newBoardName: string;
+ TabList: TStringList;
begin
- Result := false;
- SaveStringList := TStringList.Create;
- try
- if GetTabURLs(SaveStringList) then begin
+ if oldURLs.Count <> newURLs.Count then begin
+ Exit;
+ end;
+ if FileExists(GikoSys.GetAppDir + 'tab.sav') then begin
+ TabList := TStringList.Create;
+ try
+ TabList.LoadFromFile(GikoSys.GetAppDir + Filename);
+
+ //\82±\82±\82©\82ç\81AThread\82ÌURL\82Ì\95Ï\8dX
+ //\96Ê\93|\82¾\82¯\82Çthread\82Í\82»\82ê\82¼\82êURL\82ð\83`\83\83\83b\83N\82µ\82È\82ª\82ç\82â\82Á\82Ä\82©\82È\82«\82á\82¢\82¯\82È\82¢\81B
+ for i := 0 to oldURLs.Count - 1 do begin
+ tmpURL := Copy(oldURLs[i], 1, Length(oldURLs[i]) -1);
+ oldHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
+ oldBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
+ tmpURL := Copy(newURLs[i], 1, Length(newURLs[i]) -1);
+ newHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
+ newBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
+
+ for j := 0 to TabList.Count - 1 do begin
+ tempString := TabList[j];
+ if ( AnsiPos(oldBoardName, tempString) <> 0 ) and ( AnsiPos(oldHost, tempString ) <> 0 ) then begin
+ tempString := StringReplace(tempString, oldHost, newHost,[]);
+ TabList[j] := tempString;
+ end;
+ end;
+ end;
+ //\82±\82±\82Ü\82Å\81AThread\82ÌURL\82Ì\95Ï\8dX
+
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);
end;
- SaveStringList.SaveToFile(GikoSys.GetAppDir + Filename);
- Result := true;
+
+ TabList.SaveToFile(GikoSys.GetAppDir + Filename);
+ finally
+ TabList.Free;
end;
- finally
- SaveStringList.Free;
end;
+
end;
-procedure TGikoForm.TabsOpenActionExecute(Sender: TObject);
+/// \8dÅ\8f¬\89»\82³\82ê\82é
+procedure TGikoForm.OnMinimize;
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;
+ if FActiveContent <> nil then begin
+ FIsMinimize := mtMinimizing;
+ FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
end;
end;
-function TGikoForm.LoadTabURLs : Boolean;
+/// \8dÅ\8f¬\89»\82³\82ê\82½ (OnResized \82©\82ç\8cÄ\82Î\82ê\82é)
+procedure TGikoForm.OnMinimized;
+begin
+ FIsMinimize := mtMinimized;
+end;
+
+
+procedure TGikoForm.BrowserTabResize(Sender: TObject);
+begin
+ CoolBarResized( Sender, BrowserCoolBar );
+end;
+
+// *************************************************************************
+// ExternalBoardPlugInMain
+// \83v\83\89\83O\83C\83\93\83\81\83j\83\85\81[\82Ì\8d\80\96Ú\82ª\8eÀ\8ds\82³\82ê\82½
+// *************************************************************************
+procedure TGikoForm.OnPlugInMenuItem( Sender : TObject );
var
- i, bound : Integer;
- item : TThreadItem;
- URLs : TStringList;
- GikoTab : TGikoTabAppend;
- fileName : string;
+ item : TMenuItem;
+ boardPlugIn : TBoardPlugIn;
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;
+
+ if not (Sender is TMenuItem) then
+ Exit;
+
+ item := TMenuItem( Sender );
+ if not Assigned( Pointer( item.Tag ) ) then
+ Exit;
+
+ // \83v\83\89\83O\83C\83\93\82Ì\83\81\83j\83\85\81[\83n\83\93\83h\83\89\82ð\8cÄ\82Ñ\8fo\82·
+ boardPlugIn := TBoardPlugIn( item.Tag );
+ boardPlugIn.PlugInMenu( item.Handle );
+
+end;
+// TreeView \82ª\83N\83\8a\83b\83N\82³\82ê\82½
+procedure TGikoForm.TreeClick( Node : TTreeNode );
+begin
+
+ if Node = nil then
+ Exit;
+
+ if FTreeType = gttHistory then begin
+ if Node <> nil then
+ if TObject( Node.Data ) is TFavoriteThreadItem then
+ if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
+ 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 TObject(Node.Data) is TBBS then begin
+ SetActiveList(Node.data);
+ end else if TObject(Node.Data) is TCategory then begin
+ SetActiveList(Node.data);
+ end else if TObject(Node.Data) is TBoard then begin
+ if not TBoard(Node.Data).IsThreadDatRead then begin
+ Screen.Cursor := crHourGlass;
+ try
+ if not TBoard(Node.Data).IsThreadDatRead then
+ GikoSys.ReadSubjectFile(Node.Data);
+ finally
+ Screen.Cursor := crDefault;
+ end;
end;
+ Sort.SetSortDate(Now());
+ SetActiveList(Node.data);
end;
- fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
- URLs := TStringList.Create();
- GikoTab := GikoSys.Setting.BrowserTabAppend;
- try
- try
- Result := True;
- if FileExists(fileName) then begin
- URLs.LoadFromFile(fileName);
- bound := URLs.Count - 1;
- if bound > -1 then begin
- GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
- for i := 0 to bound do begin
- item := BBSsFindThreadFromURL( URLs[ i ] );
- if item <> nil then
- InsertBrowserTab( item, false );
- end;
- end else
- Result := False;
- end else
- Result := False;
- except
- on EFOpenError do begin
- ShowMessage('\83^\83u\83t\83@\83C\83\8b\82ª\8aJ\82¯\82Ü\82¹\82ñ');
+ if TObject( Node.Data ) is TBoard then begin // not TCategory
+ if GikoSys.Setting.ListOrientation = gloHorizontal then begin
+ if GikoSys.Setting.ListWidthState = glsMax then begin
+ GikoDM.BrowserMinAction.Execute;
+ if GikoForm.Visible then
+ ListView.SetFocus;
+ end;
+ end else begin
+ if GikoSys.Setting.ListHeightState = glsMax then begin
+ GikoDM.BrowserMinAction.Execute;
+ if GikoForm.Visible then
+ ListView.SetFocus;
end;
end;
- finally
- GikoSys.Setting.BrowserTabAppend := GikoTab;
- URLs.Free;
end;
end;
-procedure TGikoForm.OnlyAHundredResActionExecute(Sender: TObject);
+// TreeView \82ª\83_\83u\83\8b\83N\83\8a\83b\83N\82³\82ê\82½
+procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
var
- FilterList : TStringList;
+ Board : TBoard;
+ ThreadItem : TThreadItem;
+ shiftDown : Boolean;
begin
- if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
- and (FActiveContent.FBrowser.Busy) then Exit;
- FResRangeMenuSelect := 100;
- OnlyAHundredResAction.Checked := True;
+ if Node = nil then Exit;
+
+ shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
- if GikoSys.ResRange <> 100 then begin
- GikoSys.ResRange := 100;
+ if FTreeType = gtt2ch then begin
+ if not (TObject(Node.Data) is TBoard) then Exit;
+ Board := TBoard(Node.Data);
+ DownloadList(Board, shiftDown);
+ end else if FTreeType = gttHistory then begin
+ if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
+ ThreadItem := TFavoriteThreadItem(Node.Data).Item;
+ DownloadContent(ThreadItem, shiftDown);
+ end;
- // \83t\83B\83\8b\83^\95¶\8e\9a\97ñ\82ð\8bó\82É\82·\82é
- FilterList := TStringList.Create;
- try
- GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
- GikoSys.FSelectResFilter.Reverse := False;
- finally
- FilterList.Destroy;
+end;
+// *************************************************************************
+//! \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
+ if Key = VK_BACK then begin
+// UpFolderButtonClick(Sender);
+ end else if Key = VK_SPACE then begin
+ TreeDoubleClick( TreeView.Selected );
+ end else if Key = VK_RETURN then begin
+ TreeClick( TreeView.Selected );
+ TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
+ 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
+ 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
+ favItem := FavoriteTreeView.GetNodeAt( X, Y );
+ if favItem = nil then Exit;
- FSelectResWord := '';
- RepaintAllTabsBrowser();
+ if TObject( favItem.Data ) is TFavoriteThreadItem then begin
+ favThreadItem := TFavoriteThreadItem( favItem.Data );
+ if favThreadItem.Item <> nil then
+ InsertBrowserTab( favThreadItem.Item, False );
+ end;
+ end;
end;
+
end;
-procedure TGikoForm.OnlyKokoResActionExecute(Sender: TObject);
-var
- FilterList : TStringList;
+procedure TGikoForm.MessagePanelResize(Sender: TObject);
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 );
+ if FIsIgnoreResize <> rtNone then
+ Exit;
- // \83t\83B\83\8b\83^\95¶\8e\9a\97ñ\82ð\8bó\82É\82·\82é
- FilterList := TStringList.Create;
- try
- GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
- GikoSys.FSelectResFilter.Reverse := False;
- finally
- FilterList.Destroy;
+ if GikoSys.Setting.ListOrientation = gloVertical then begin
+ if GikoSys.Setting.ListHeightState = glsMin then begin
+ // \8dÅ\8f¬\95\\8e¦\82É\82·\82é
+ ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
end;
-
- FSelectResWord := '';
- RepaintAllTabsBrowser();
end;
+
end;
-procedure TGikoForm.OnlyNewResActionExecute(Sender: TObject);
+procedure TGikoForm.OnResized;
var
- FilterList : TStringList;
+ doc : Variant;
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 );
+ FOldFormWidth := Width;
+ FIsIgnoreResize := rtNone;
- // \83t\83B\83\8b\83^\95¶\8e\9a\97ñ\82ð\8bó\82É\82·\82é
- FilterList := TStringList.Create;
- try
- GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
- GikoSys.FSelectResFilter.Reverse := False;
- finally
- FilterList.Destroy;
+ case FIsMinimize of
+ mtMinimizing:
+ begin
+ // \8dÅ\8f¬\89»\92\86\82Å\82 \82é
+ PostMessage( Handle, USER_MINIMIZED, 0, 0 );
end;
- FSelectResWord := '';
- RepaintAllTabsBrowser();
+ mtMinimized:
+ begin
+ // \8dÅ\8f¬\89»\82Í\8aù\82É\8a®\97¹\82µ\82Ä\82¢\82é (\82Â\82Ü\82è\83^\83X\83N\83o\81[\82©\82ç\83E\83B\83\93\83h\83E\82ð\95\9c\8c³\92\86)
+ if FActiveContent <> nil then begin
+ doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
+ doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
+ end;
+ FIsMinimize := mtNone;
+ end;
end;
-end;
-procedure TGikoForm.BrowsBoradHeadActionExecute(Sender: TObject);
+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
- RefURL, URL : string;
- List : TList;
+ p : TPoint;
+ e: IHTMLElement;
+ AID: string;
+ stlist : TStringList;
+ i, count, rc : Integer;
+ body : String;
+ limited : boolean;
begin
- RefURL := '';
- if GetActiveList is TCategory then begin
- List := TList.Create;
+ result := true;
+ try
+ if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then
+ FActiveContent.Browser.SetFocus;
try
- SelectListItem(List);
- RefURL := TBoard(List[0]).URL;
- finally
- List.Free;
+ GetCursorPos(p);
+ p.x := p.x - FActiveContent.Browser.ClientOrigin.x;
+ p.y := p.y - FActiveContent.Browser.ClientOrigin.y;
+ 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);
+ FActiveContent.IDAnchorPopup(body);
+ end;
+ end;
+ except
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;
+ except
+ end;
end;
-procedure TGikoForm.TabAutoLoadActionExecute(Sender: TObject);
+//\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
- LoadTabURLs;
+ SelectTimer.Interval := 0;
+ if not (ListView.Selected = nil) then
+ if( FActiveContent = nil) or
+ (GetActiveContent <> TThreadItem(ListView.Selected.Data) ) then begin
+ ListClick;
+ end;
end;
/// ListView \82Ì\83J\83\89\83\80\95\9d\82¨\82æ\82Ñ\88Ê\92u\82Ì\95Û\91¶
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
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 1);
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
-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
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;
-
-procedure TGikoForm.IndividualAbonID0ActionExecute(Sender: TObject);
-begin
- IndividualAbonID(0);
-end;
//\93¯\88êID\82Ì\82 \82Ú\81`\82ñ
procedure TGikoForm.IndividualAbonID(Atype : Integer);
var
wordCount.Free;
ReadList.Free;
end;
- FActiveContent.Repaint := true;
- if ThreadItem <> nil then
- InsertBrowserTab( ThreadItem, True );
- finally
- body.Free;
- end;
-
-end;
-
-procedure TGikoForm.KokoPopupMenuPopup(Sender: TObject);
-var
- firstElement: IHTMLElement;
- document: IHTMLDocument2;
-begin
- document := FActiveContent.Browser.Document as IHTMLDocument2;
- if Assigned(document) then
- firstElement := document.all.item('idSearch', 0) as IHTMLElement;
- if Assigned(firstElement) then
- if firstElement.style.visibility <> 'hidden' then
- firstElement.style.visibility := 'hidden';
-
-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;
- ListViewSort( nil, ListView.Column[ i ] );
- 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;
- ListViewSort( nil, ListView.Column[ id ] );
- break;
- end;
+ FActiveContent.Repaint := true;
+ if ThreadItem <> nil then
+ InsertBrowserTab( ThreadItem, True );
+ finally
+ body.Free;
end;
end;
-procedure TGikoForm.SortPrevColumnActionExecute(Sender: TObject);
+
+procedure TGikoForm.KokoPopupMenuPopup(Sender: TObject);
var
- i, id : Integer;
+ firstElement: IHTMLElement;
+ document: IHTMLDocument2;
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;
- ListViewSort( nil, ListView.Column[ id ] );
- break;
- end;
- end;
+ document := FActiveContent.Browser.Document as IHTMLDocument2;
+ if Assigned(document) then
+ firstElement := document.all.item('idSearch', 0) as IHTMLElement;
+ if Assigned(firstElement) then
+ if firstElement.style.visibility <> 'hidden' then
+ firstElement.style.visibility := 'hidden';
end;
end;
-procedure TGikoForm.MessageListViewAdvancedCustomDrawItem(
- Sender: TCustomListView; Item: TListItem; State: TCustomDrawState;
- Stage: TCustomDrawStage; var DefaultDraw: Boolean);
-begin
- //if DiffComp then begin
- //if Odd(Item.Index) then Sender.Canvas.Brush.Color := clBlue;
- //DiffComp := False;
-// end;
-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;
-//\83\8a\83\93\83N\82Ì\95¶\8e\9a\97ñ\82©\82ç\83\8c\83X\83|\83b\83v\83A\83b\83v\97p\82ÌURL\82É\95Ï\8a·\82·\82é
-function TGikoForm.GetRespopupURL(AText, AThreadURL : string): string;
-var
- wkInt: Integer;
-begin
- Result := '';
- if Pos('about:blank..', AText) = 1 then begin
- wkInt := LastDelimiter( '/', AThreadURL );
- if Pos( '?', Copy( AThreadURL, wkInt, MaxInt ) ) = 0 then begin
- // Thread.URL \82Í PATH_INFO \93n\82µ
- Result := Copy( AThreadURL, 1, LastDelimiter( '/', AThreadURL ) );
- wkInt := LastDelimiter( '/', AText );
- if Pos( '?', Copy( AText, wkInt, MaxInt ) ) = 0 then
- // Text \82à PATH_INFO \93n\82µ
- Result := Result + Copy( AText, LastDelimiter( '/', AText ) + 1, MaxInt )
- else
- // Text \82Í QUERY_STRING \93n\82µ
- Result := Result + Copy( AText, LastDelimiter( '?', AText ) + 1, MaxInt );
- end else begin
- // Thread.URL \82Í QUERY_STRING \93n\82µ
- Result := Copy( AThreadURL, 1, LastDelimiter( '?', AThreadURL ) );
- wkInt := LastDelimiter( '/', AText );
- if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then begin
- // Text \82Í PATH_INFO \93n\82µ
- // URL \82É\94Â\82Æ\83L\81[\82ª\91«\82ç\82È\82¢\82Ì\82Å Text \82©\82ç\92¸\91Õ\82·\82é
- wkInt := LastDelimiter( '/', Copy( AText, 1, wkInt - 1 ) );
- wkInt := LastDelimiter( '/', Copy( AText, 1, wkInt - 1 ) );
- Result := Copy( Result, 1, Length( Result ) - 1 ) + Copy( AText, wkInt, MaxInt );
- end else begin
- // Text \82à QUERY_STRING \93n\82µ
- Result := Result + Copy( Text, LastDelimiter( '?', AText ) + 1, MaxInt )
- end;
- end;
- end else if Pos('about:blank/bbs/', AText) = 1 then begin
- //\82µ\82½\82ç\82ÎJBBS\82Ì\8ed\95Ï\82Ì\8bz\8eû
- AText := CustomStringReplace(AText, 'about:blank/bbs/', 'about:blank../../bbs/');
- Result := GetRespopupURL(AText, AThreadURL);
- end else begin
- Result := AText;
- end;
-
-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
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (GetActiveContent <> nil);
-{$IFDEF ACTCHK}
+ Result := Application.MainForm;
+end;
+// *************************************************************************
+//! \8c»\8dÝ\82Ì\83J\81[\83\\83\8b\82ð\8eæ\93¾\82·\82é
+// *************************************************************************
+function TGikoForm.GetScreenCursor(): TCursor;
+begin
+ Result := Screen.Cursor;
+end;
+// *************************************************************************
+//! \83J\81[\83\\83\8b\82ð\90Ý\92è\82·\82é
+// *************************************************************************
+procedure TGikoForm.SetScreenCursor(Cursor : TCursor);
+begin
+ if (Screen.Cursor <> Cursor) then
+ Screen.Cursor := Cursor;
+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;
-{$ENDIF}
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);
+// *************************************************************************
+//! \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
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
-{$IFDEF ACTCHK}
+ if GikoDM.FavoriteArrangeAction.Enabled then begin
+ GikoDM.FavoriteArrangeAction.Execute;
end;
-{$ENDIF}
end;
-//TAction\82ÅActiveList\82ªTBoard\82Å\97L\8cø\82É\82È\82é
-procedure TGikoForm.DependActiveListTBoardActionUpdate(Sender: TObject);
+// *************************************************************************
+//! \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
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (GetActiveList is TBoard);
-{$IFDEF ACTCHK}
+ //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;
-{$ENDIF}
end;
-
-procedure TGikoForm.FavoriteTreeViewEditing(Sender: TObject;
- Node: TTreeNode; var AllowEdit: Boolean);
+// *************************************************************************
+//! \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
- //\95Ò\8fW\91O\82Ì\95¶\8e\9a\97ñ\82ð\88ê\8e\9e\95Û\91¶\82·\82é
- FOrigenCaption := Node.Text;
+ 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;
+
+ 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
+;
+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;
+
+procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
+ MousePos: TPoint; var Handled: Boolean);
+var
+ pos : TPoint;
+ coolBar: TGikoCoolBar;
+begin
+ Handled := False;
+ if (Sender <> nil) and (Sender is TGikoCoolBar) then begin
+ coolBar := TGikoCoolBar(Sender);
+ if (coolBar = MainCoolBar) then begin
+ FToolBarSettingSender := tssMain;
+ end else if (coolBar = ListCoolBar) then begin
+ FToolBarSettingSender := tssList;
+ end else if (coolBar = BrowserCoolBar) then begin
+ FToolBarSettingSender := tssBrowser;
+ end else begin
+ FToolBarSettingSender := tssNone;
+ end;
+ pos := coolBar.ClientToScreen( MousePos );
+ MainCoolBarPopupMenu.Popup( pos.X, pos.Y );
+ Handled := True;
+ end;
+end;
+
+procedure TGikoForm.TaskTrayIconMessage(var Msg: TMsg);
+begin
+ // \8d¶\83N\83\8a\83b\83N\82È\82ç\95\9c\8c³\82·\82é
+ if (Msg.wParam = WM_LBUTTONUP) then begin
+ UnStoredTaskTray;
+ end;
+end;
+//! \83^\83X\83N\83g\83\8c\83C\82É\83A\83C\83R\83\93\93o\98^\81\95\83t\83H\81[\83\80\89B\82µ
+procedure TGikoForm.StoredTaskTray;
+begin
+ try
+ if (FIconData.uID = 0) then begin
+ FIconData.cbSize := SizeOf(TNotifyIconData);
+ FIconData.uID := Self.Handle;
+ FIconData.Wnd := Handle;
+ FIconData.uFlags := NIF_MESSAGE or NIF_ICON or NIF_TIP;
+ FIconData.uCallbackMessage := USER_TASKTRAY;
+ FIconData.hIcon := Application.Icon.Handle; {\83A\83C\83R\83\93\8ew\92è}
+ FIconData.szTip := '\83M\83R\83i\83r'; {\83q\83\93\83g\95¶\8e\9a\97ñ}
+ Shell_NotifyIcon(NIM_ADD, @FIconData);
+ ShowEditors(SW_HIDE);
+ ShowWindow(Self.Handle, SW_HIDE);
+ end;
+ except
+ end;
+end;
+//! \83^\83X\83N\83g\83\8c\83C\82Ì\83A\83C\83R\83\93\8dí\8f\9c\81\95\83t\83H\81[\83\80\95\\8e¦
+procedure TGikoForm.UnStoredTaskTray;
+begin
+ try
+ try
+ Shell_NotifyIcon(NIM_DELETE, @FIconData);
+ SetForegroundWindow(Application.Handle);
+ except
+ end;
+ finally
+ FIconData.uID := 0;
+ // Action\82©\82ç\8ai\94[\82µ\82½\82Æ\82«\82ÍTag\82Ì\92l\82Í0\88È\8aO
+ if (GikoDM.StoredTaskTrayAction.Tag = 0) then begin
+ ShowWindow(Self.Handle, SW_RESTORE);
+ end else begin
+ ShowWindow(Self.Handle, SW_SHOW);
+ end;
+ ShowEditors(SW_SHOW);
+ GikoDM.StoredTaskTrayAction.Tag := 0;
+ end;
+end;
+{
+\brief \83\8c\83X\83G\83f\83B\83^\82Ì\95\\8e¦\94ñ\95\\8e¦
+\param nCmdShow Windows.ShowWindow\82É\91\97\82é\83p\83\89\83\81\81[\83^\82Æ\93¯\82¶
+}
+procedure TGikoForm.ShowEditors(nCmdShow: Integer);
+var
+ i : Integer;
+begin
+ // \83\8c\83X\83G\83f\83B\83^\82ð\92T\82·
+ for i := 0 to Screen.CustomFormCount - 1 do begin
+ if TObject(Screen.CustomForms[i]) is TEditorForm then
+ ShowWindow(Screen.CustomForms[i].Handle, nCmdShow);
+ end;
+end;
initialization
OleInitialize(nil);