uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
- OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils, Math,
+ OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils,
{$IF Defined(DELPRO) }
SHDocVw,
MSHTML,
MSHTML_TLB,
{$IFEND}
IdHTTP, ActiveX, ActnList, ImgList,
- ToolWin, Buttons, {Clipbrd,} {HTTPApp,} YofUtils, IdComponent,
- ShellAPI, UrlMon, Tabs, IdGlobal, StrUtils,
- CommCtrl, IniFiles, Dialogs,
- GikoSystem, GikoUtil, Setting, BoardGroup, ThreadControl, ItemDownload,
- Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd,
- FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan,
- HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil,
- IndividualAbon, Search, ExternalBoardManager, ExternalBoardPlugInMain,
- StdActns, GikoXMLDoc, Variants, ExtActns,IdTCPConnection, IdBaseComponent,
- IdTCPClient, Gesture;
+ ToolWin, Buttons, IdComponent, UrlMon, Tabs, IdGlobal, StrUtils,
+ CommCtrl, Dialogs, GikoSystem, Setting, BoardGroup, ThreadControl, ItemDownload,
+ Editor, RoundData, GikoPanel, Favorite, HTMLDocumentEvent,
+ HintWindow, GikoCoolBar, GikoListView, Search, ExternalBoardManager,
+ ExternalBoardPlugInMain, StdActns, Variants, ExtActns,IdTCPConnection,
+ IdBaseComponent, IdTCPClient, AppEvnts, BrowserRecord;
+const
+ NGWORDNAME_PANEL = 3;
+ THREADSIZE_PANEL = 2;
+
type
TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser);
TMinimizeType = (mtNone, mtMinimizing, mtMinimized);
TResizeType = (rtNone, rtResizing);
- TBrowserRecord = class;
+// TBrowserRecord = class;
TGikoForm = class(TForm)
StatusBar: TStatusBar;
MessageListView: TListView;
MessageSplitter: TSplitter;
Panel3: TPanel;
- SpeedButton1: TSpeedButton;
+ CabinetCloseSpeedButton: TSpeedButton;
ToolBar1: TToolBar;
CabinetSelectToolButton: TToolButton;
HistoryToolBar: TToolBar;
- ToolButton15: TToolButton;
- ToolButton18: TToolButton;
+ HistoryShowToolButton: TToolButton;
+ HistoryAllClearToolButton: TToolButton;
ItemIcon16: TImageList;
ItemIcon32: TImageList;
HotToobarImageList: TImageList;
- ToobarImageList: TImageList;
ItemImageList: TImageList;
- ActionList: TActionList;
- LogDeleteAction: TAction;
- KidokuAction: TAction;
- StdToolBarVisibleAction: TAction;
- SearchAction: TAction;
- GikoNaviWebPageAction: TAction;
- AboutAction: TAction;
- ExitAction: TAction;
- MsgBarVisibleAction: TAction;
- StatusBarVisibleAction: TAction;
- LargeIconAction: TAction;
- SmallIconAction: TAction;
- ListIconAction: TAction;
- DetailIconAction: TAction;
- CabinetBBSAction: TAction;
- CabinetHistoryAction: TAction;
- CabinetVisibleAction: TAction;
- MidokuAction: TAction;
- AllSelectAction: TAction;
- UpFolderAction: TAction;
- ListNumberVisibleAction: TAction;
- AllItemAction: TAction;
- LogItemAction: TAction;
- NewItemAction: TAction;
- SelectItemAction: TAction;
- ShowThreadAction: TAction;
- StopAction: TAction;
MainMenu: TMainMenu;
FileMenu: TMenuItem;
DeleteMenu: TMenuItem;
G1: TMenuItem;
N1: TMenuItem;
AboutMenu: TMenuItem;
- IconStyle: TAction;
BrowserPopupMenu: TPopupMenu;
ShowThreadMenu: TMenuItem;
ShowBoardMenu: TMenuItem;
- ShowBoardAction: TAction;
ListIconPopupMenu: TPopupMenu;
LargeIconPMenu: TMenuItem;
SmallIconPMenu: TMenuItem;
ListPMenu: TMenuItem;
DetailPMenu: TMenuItem;
- CabinetCloseAction: TAction;
ClosePopupMenu: TPopupMenu;
CloseMenu: TMenuItem;
- OptionAction: TAction;
U1: TMenuItem;
N3: TMenuItem;
B1: TMenuItem;
L1: TMenuItem;
N5: TMenuItem;
S2: TMenuItem;
- RoundAction: TAction;
ListPopupMenu: TPopupMenu;
ListRoundPMenu: TMenuItem;
ListReservPMenu: TMenuItem;
T1: TMenuItem;
B2: TMenuItem;
N8: TMenuItem;
- URLCopyAction: TAction;
URLC1: TMenuItem;
N9: TMenuItem;
N10: TMenuItem;
- MsgBarCloseAction: TAction;
- ScrollTopAction: TAction;
- ScrollLastAction: TAction;
- ScrollNewAction: TAction;
- ScrollKokoAction: TAction;
- EditorAction: TAction;
- IEAction: TAction;
- ItemReloadAction: TAction;
- BrowserMaxAction: TAction;
G2: TMenuItem;
N11: TMenuItem;
T3: TMenuItem;
R1: TMenuItem;
A2: TMenuItem;
N15: TMenuItem;
- SelectListReloadAction: TAction;
- SelectThreadReloadAction: TAction;
KokoPopupMenu: TPopupMenu;
KokomadePMenu: TMenuItem;
AllPMenu: TMenuItem;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
- BrowserTabCloseAction: TAction;
BrowserTabPopupMenu: TPopupMenu;
Close1: TMenuItem;
- KokomadeAction: TAction;
- ZenbuAction: TAction;
- KokoResAction: TAction;
- SelectItemURLCopyAction: TAction;
- SelectReservAction: TAction;
- NotSelectTabCloseAction: TAction;
A3: TMenuItem;
N16: TMenuItem;
A4: TMenuItem;
TreeSelectBoardPupupMenu: TMenuItem;
TPMSep01: TMenuItem;
TreeSelectURLPupupMenu: TMenuItem;
- TreeSelectBoradReload: TAction;
- TreeSelectThreadReload: TAction;
- TreeSelectURLCopy: TAction;
- ListToolBarVisibleAction: TAction;
- BrowserToolBarVisibleAction: TAction;
T2: TMenuItem;
L3: TMenuItem;
B3: TMenuItem;
H2: TMenuItem;
ItemReservPMenu: TMenuItem;
RoundNamePopupMenu: TPopupMenu;
- SelectNewRoundName: TAction;
- SelectDeleteRound: TAction;
- NewBoardAction: TAction;
N7: TMenuItem;
B4: TMenuItem;
- LoginAction: TAction;
L4: TMenuItem;
- KeySettingAction: TAction;
K2: TMenuItem;
- AllTabCloseAction: TAction;
A5: TMenuItem;
A6: TMenuItem;
C1: TMenuItem;
D2: TMenuItem;
MessageImageList: TImageList;
ProgressBar: TProgressBar;
- ArrangeAction: TAction;
URL1: TMenuItem;
- NameURLCopyAction: TAction;
- SelectItemNameURLCopyAction: TAction;
NameUrlCopyPMenu: TMenuItem;
URLC2: TMenuItem;
URLN1: TMenuItem;
N23: TMenuItem;
ListCoolBar: TGikoCoolBar;
ListToolBar: TToolBar;
- ViewNoButton: TToolButton;
- IconToolButton: TToolButton;
- UpFolderButton: TToolButton;
- Sepa01ToolButton: TToolButton;
- AllItemToolButton: TToolButton;
- LogItemToolButton: TToolButton;
- NewItemToolButton: TToolButton;
- ListDownloadToolButton: TToolButton;
- ListThreadDownloadToolButton: TToolButton;
- ToolButton2: TToolButton;
- ToolButton1: TToolButton;
BrowserCoolBar: TGikoCoolBar;
BrowserToolBar: TToolBar;
- BrowserSizeButton: TToolButton;
ToolButton3: TToolButton;
- TopButton: TToolButton;
- LastBotton: TToolButton;
- NewButton: TToolButton;
- KokoButton: TToolButton;
ToolButton9: TToolButton;
- EditorButton: TToolButton;
ToolButton11: TToolButton;
- IEButton: TToolButton;
ToolButton5: TToolButton;
- ItemReloadButton: TToolButton;
ListNameToolBar: TToolBar;
ListNameLabel: TLabel;
FolderImage: TImage;
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;
- ToolButton7: TToolButton;
- 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;
MainCoolBar: TGikoCoolBar;
MenuToolBar: TToolBar;
StdToolBar: TToolBar;
- RoundToolButton: TToolButton;
- ToolButton6: TToolButton;
- ToolButton4: TToolButton;
- ToolButton13: TToolButton;
- AbortToolButton: TToolButton;
- LoginToolButton: TToolButton;
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;
- ToolButton8: TToolButton;
- ToolButton10: TToolButton;
- ThreadEditorAction: TAction;
N39: TMenuItem;
T6: TMenuItem;
N40: TMenuItem;
LinkBarPopupMenu: TPopupMenu;
- ToolBarSettingAction: TAction;
T7: TMenuItem;
- ToolButton12: TToolButton;
- ToolButton14: TToolButton;
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;
- SelectItemToolButton: TToolButton;
- SelectResToolButton: TToolButton;
- 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;
- SelectComboBoxSplitter: TImage;
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;
- ResRangeButton: TToolButton;
N60: TMenuItem;
ExportFavoriteFileAction1: TMenuItem;
- ExportFavoriteFile: TFileSaveAs;
- ToolButton21: TToolButton;
- CabinetBBSToolButton: TToolButton;
- ToolButton23: TToolButton;
- ToolButton24: TToolButton;
N6: TMenuItem;
N17: TMenuItem;
- FavoriteTreeViewBrowseBoardAction: TAction;
- FavoriteTreeViewBrowseThreadAction: TAction;
- UpBoardAction: TAction;
N18: TMenuItem;
N20: TMenuItem;
- N24: TMenuItem;
+ N24: TMenuItem;
N62: TMenuItem;
- N61: TMenuItem;
+ N61: TMenuItem;
N63: TMenuItem;
- KoreCopy: TAction;
N64: TMenuItem;
dummy1: TMenuItem;
- TreeSelectLogDeletePopupMenu: TMenuItem;
+ TreeSelectLogDeletePopupMenu: TMenuItem;
N65: TMenuItem;
BBSSelectPopupMenu: TPopupMenu;
PlugInMenu: TMenuItem;
- TmpToolBar: TToolBar;
- TreeSelectNameCopy: TAction;
- TreeSelectNamePupupMenu: TMenuItem;
+ TreeSelectNamePupupMenu: TMenuItem;
BrowserPanel: TPanel;
- SetFocusForBrowserAction: TAction;
- SetFocusForThreadListAction: TAction;
- SetFocusForCabinetAction: TAction;
- FileRun1: TFileRun;
- ThreadlistMaxAndFocusAction: TAction;
- BrowserMaxAndFocusAction: TAction;
- UpBoardButton: TToolButton;
- SelectTimer: TTimer;
+ 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;
- ThreadRangeButton: TToolButton;
- 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;
- ToolButton22: TToolButton;
N72: TMenuItem;
N73: TMenuItem;
- SortActiveColumnAction: TAction;
- SortNextColumnAction: TAction;
- SortPrevColumnAction: TAction;
- BeLogInOutAction: TAction;
+ SelectComboBoxPanel: TPanel;
+ SelectComboBoxSplitter: TImage;
+ ToolButton1: TToolButton;
+ N74: TMenuItem;
+ WikiFAQ: TMenuItem;
+ GikoApplicationEvents: TApplicationEvents;
+ N22: TMenuItem;
+ N42: TMenuItem;
+ DAT2: TMenuItem;
+ N75: TMenuItem;
+ DAT3: TMenuItem;
+ N76: TMenuItem;
+ FavoriteTreeItemNameCopyPopupMenu: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
- procedure 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 AllItemActionUpdate(Sender: TObject);
- procedure LogItemActionUpdate(Sender: TObject);
- procedure NewItemActionUpdate(Sender: TObject);
- procedure SelectItemActionUpdate(Sender: TObject);
- procedure UpFolderActionUpdate(Sender: TObject);
procedure FormResize(Sender: TObject);
- procedure ScrollTopActionUpdate(Sender: TObject);
- procedure ScrollLastActionUpdate(Sender: TObject);
- procedure ScrollNewActionUpdate(Sender: TObject);
- procedure ScrollKokoActionUpdate(Sender: TObject);
- procedure EditorActionUpdate(Sender: TObject);
- procedure IEActionUpdate(Sender: TObject);
- procedure ShowThreadActionUpdate(Sender: TObject);
- procedure ShowBoardActionUpdate(Sender: TObject);
- procedure SelectThreadReloadActionUpdate(Sender: TObject);
- procedure ItemReloadActionUpdate(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 SelectItemURLCopyActionUpdate(Sender: TObject);
- procedure AllSelectActionUpdate(Sender: TObject);
- procedure LogDeleteActionUpdate(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 URLCopyActionUpdate(Sender: TObject);
- procedure NameURLCopyActionUpdate(Sender: TObject);
- procedure BrowserTabCloseActionUpdate(Sender: TObject);
- procedure NotSelectTabCloseActionUpdate(Sender: TObject);
- procedure AllTabCloseActionUpdate(Sender: TObject);
- procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
- procedure ActiveLogDeleteActionExecute(Sender: TObject);
- procedure ActiveLogDeleteActionUpdate(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 LeftmostTabSelectActionUpdate(Sender: TObject);
- procedure LeftTabSelectActionUpdate(Sender: TObject);
- procedure RightTabSelectActionUpdate(Sender: TObject);
- procedure RightmostTabSelectActionUpdate(Sender: TObject);
procedure FavoriteMenuClick(Sender: TObject);
- procedure FavoriteAddActionExecute(Sender: TObject);
- procedure FavoriteAddActionUpdate(Sender: TObject);
- procedure BoardFavoriteAddActionExecute(Sender: TObject);
- procedure BoardFavoriteAddActionUpdate(Sender: TObject);
- procedure ThreadFavoriteAddActionExecute(Sender: TObject);
- procedure ThreadFavoriteAddActionUpdate(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 ThreadEditorActionUpdate(Sender: TObject);
- procedure ToolBarSettingActionExecute(Sender: TObject);
- procedure NameCopyActionExecute(Sender: TObject);
- procedure BoardIEActionExecute(Sender: TObject);
- procedure SelectItemNameCopyActionExecute(Sender: TObject);
- procedure SelectItemNameCopyActionUpdate(Sender: TObject);
- procedure BoardIEActionUpdate(Sender: TObject);
procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
- procedure NameCopyActionUpdate(Sender: TObject);
procedure SelectComboBoxChange(Sender: TObject);
procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure SelectComboBoxExit(Sender: TObject);
- procedure SelectResActionExecute(Sender: TObject);
- procedure SelectResActionUpdate(Sender: TObject);
- procedure AllResActionExecute(Sender: TObject);
- procedure AllResActionUpdate(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 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 UpBoardActionUpdate(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 ResRangeActionUpdate(Sender: TObject);
- procedure SetFocusForBrowserActionExecute(Sender: TObject);
- procedure SetFocusForBrowserActionUpdate(Sender: TObject);
- procedure SetFocusForThreadListActionExecute(Sender: TObject);
- procedure SetFocusForCabinetActionExecute(Sender: TObject);
- procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
- procedure BrowserMaxAndFocusActionUpdate(Sender: TObject);
- procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject);
- procedure SetFocusForCabinetActionUpdate(Sender: TObject);
- procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
- Selected: Boolean);
- 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 LogFolderOpenActionUpdate(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 BrowsBoradHeadActionUpdate(Sender: TObject);
- procedure EditNGActionExecute(Sender: TObject);
- procedure ThreadRangeActionUpdate(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 JumpToNumOfResActionUpdate(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 LeftTabCloseActionUpdate(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 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);
private
{ Private \90é\8c¾ }
- //RoundList : TRoundList;
- FSortIndex: Integer;
- FSortOrder: Boolean;
-
FEnabledCloseButton: Boolean;
-// ThreadCreate: TThreadCreate;
-
FClickNode: TTreeNode;
FHttpState: Boolean;
FHint: TResPopup;
FPreviewBrowser: TWebBrowser;
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
FViewType: TGikoViewType; //\83\8a\83X\83g\83A\83C\83e\83\80\95\\8e¦\83^\83C\83v
- FActiveList: TObject;
+ FActiveList: TObject;
FActiveContent: TBrowserRecord; //
FActiveBBS : TBBS;
FHistoryList: TList; //\83q\83X\83g\83\8a\83\8a\83X\83g
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©
FResRangeMenuSelect : Longint; ///< ResRangeButton \82Å\91I\91ð\82³\82ê\82Ä\82¢\82é\8d\80\96Ú (\83t\83H\81[\83}\83b\83g\82Í ResRange \8cÝ\8a·)
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é
- procedure SetBoardTreeNode( inBBS : TBBS );
- function SetCategoryListItem(ABBS2ch: TBBS): Integer;
- function SetBoardListItem(Category: TCategory): Integer;
- function SetThreadListItem(Board: TBoard): Integer;
-// function GetRoundName(index: integer): string;
-
+ 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ñ
+ 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 SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
- 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(Folder: TFavoriteFolder);
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;
-// function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
- procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
procedure ShowTextPopup;
- //procedure ShowTextPopup(HintData: THintData);
-// procedure SetStdToolBar;
-// function GetAction(ActionName: string): TContainedAction;
- 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;
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure WndProc(var Message: TMessage); override;
public
{ Public \90é\8c¾ }
- LastRoundTime: TDateTime;
+ LastRoundTime: TDateTime;
+ BrowserNullTab: TBrowserRecord;
FControlThread: TThreadControl;
procedure MoveToURL(const inURL: string);
- function InsertBrowserTab(
- ThreadItem : TThreadItem;
- ActiveTab : Boolean = True
- ) : TBrowserRecord;
+ function 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
+ procedure DeleteTab(ThreadItem: TThreadItem); overload;
+ procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
+ //\8c»\8dÝ\95\\8e¦\82µ\82Ä\82¢\82é\83X\83\8c\83b\83h\82ð\83X\83N\83\8d\81[\83\8b
+ procedure BrowserMovement(const AName: string);
+ //Application\82ÌMainForm\82ð\8eæ\93¾\82·\82é
+ function GetMainForm(): TComponent;
+ procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
+ //! \83}\83E\83X\83W\83F\83X\83`\83\83\81[\8aJ\8en
+ procedure OnGestureStart(Sender: TObject);
+ //! \83}\83E\83X\83W\83F\83X\83`\83\83\81[\92\86
+ procedure OnGestureMove(Sender: TObject);
+ //! \83}\83E\83X\83W\83F\83X\83`\83\83\81[\8fI\97¹
+ procedure OnGestureEnd(Sender: TObject);
+ /// \83o\83\93\83h\95\9d\82ð\8dÄ\8cv\8eZ\81E\8dÄ\90Ý\92è\82·\82é
+ procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
+ //\83X\83N\83\8a\81[\83\93\8fã\82ÉEditorForm\82ª\82¢\82é\82©
+ function EditorFormExists(): boolean;
+ //\83X\83N\83\8a\81[\83\93\8fã\82É\82¢\82é\82·\82×\82Ä\82ÌEditorForm\82©\82ç\96¼\91O\97\9a\97ð\82ð\8dí\8f\9c\82·\82é
+ procedure AllEditroFormNameTextClearClear();
+ //\83X\83N\83\8a\81[\83\93\8fã\82É\82¢\82é\82·\82×\82Ä\82ÌEditorForm\82©\82ç\83\81\81[\83\8b\97\9a\97ð\82ð\8dí\8f\9c\82·\82é
+ procedure AllEditroFormMailTextClearClear();
+ //ListView\82Å\91I\91ð\82³\82ê\82Ä\82¢\82é\83A\83C\83e\83\80\82ð\8eæ\93¾\82·\82é
+ procedure SelectListItem(List: TList);
+ /// \83^\83u\95Û\91¶
+ function SaveTabURLs : Boolean;
+ /// \83^\83u\93Ç\82Ý\8fo\82µ
+ function LoadTabURLs : Boolean;
+ //\8ew\92è\82µ\82½\83\8c\83X\82ð\83R\83s\81[\82·\82é
+ procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
+ //
+ procedure ModifySelectList;
+ //
+ procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
+ //
+ procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
+ //
+ procedure SetSelectRoundName(Sender: TObject);
+ //
+ function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
+ //
+ function WebBrowserClick(Sender: TObject): WordBool;
+ //! \83c\81[\83\8b\83o\81[\82É\83X\83\8c\8di\8d\9e\82Ý\83R\83\93\83{\83{\83b\83N\83X\82ð\90Ý\92è\82·\82é
+ procedure SetSelectComboBox();
+
published
property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
end;
property Data: Pointer read FData write FData;
end;
- TBrowserRecord = class( TObject )
- private
- FBrowser : TWebBrowser;
- FEvent: THTMLDocumentEventSink; ///< \83u\83\89\83E\83U\83h\83L\83\85\83\81\83\93\83g\83C\83x\83\93\83g
- FThread : TThreadItem;
- FLastSize : Integer;
- FRepaint : Boolean;
- FMovement : string; ///< \83X\83N\83\8d\81[\83\8b\90æ\83A\83\93\83J\81[
- public
- destructor Destroy; override;
- property Browser : TWebBrowser read FBrowser write FBrowser;
- property Thread : TThreadItem read FThread write FThread;
- property LastSize : Integer read FLastSize write FLastSize;
- property Repaint : Boolean read FRepaint write FRepaint;
- property Movement : string read FMovement write FMovement;
- end;
-
var
GikoForm: TGikoForm;
implementation
uses
+ GikoUtil, IndividualAbon, Math, Kotehan, KeySetting,
+ YofUtils, ShellAPI, ToolBarUtil, ToolBarSetting,
+ GikoXMLDoc, RoundName, IniFiles, FavoriteAdd,
+ FavoriteArrange, AddressHistory, Preview, Gesture,
About, Option, Round, Splash, Sort, ListSelect, Imm,
- NewBoard, MojuUtils, Clipbrd, GikoBayesian;
+ NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter,
+ HTMLCreate, ListViewUtils, GikoDataModule, GikoMessage,
+ InputAssistDataModule;
const
- CAPTION_NAME: string = '\83M\83R\83i\83r';
BLANK_HTML: string = 'about:blank';
- SELECTCOMBOBOX_NAME: string = ''; // '\83X\83\8c\83b\83h\8di\8d\9e\8c\9f\8dõ';
- SELECTCOMBOBOX_COLOR: TColor = clWindow;
+ BROWSER_COUNT = 5; //\83u\83\89\83E\83U\82Ì\90\94
//D&D臒l
DandD_THRESHOLD = 5; //D&D\82Ìè\87\92l\81ipixcel)
- //\83c\83\8a\81[\81E\83\8a\83X\83g\83A\83C\83R\83\93
- ITEM_ICON_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
{$R *.DFM}
procedure TGikoForm.CreateParams(var Params: TCreateParams);
msg: string;
i: Integer;
wp: TWindowPlacement;
- s: string;
- newbrowser: TWebBrowser;
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.OnMessage := HandleAppMessage; //\82È\82ñ\82©\96³\82\82Ä\82à\91å\8fä\95v\82É\82È\82Á\82½\81@by\81@\82à\82¶\82ã
- FTreeType := gttNone;
-
+ 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(nil));
- newBrowser := FBrowsers[FBrowsers.Count - 1];
- TOleControl(newBrowser).Parent := BrowserPanel;
- TOleControl(newBrowser).Align := alNone;
- TOleControl(newBrowser).Left := 0;
- TOleControl(newBrowser).Top := 0;
- //newBrowser.StatusBar := false;
- //newBrowser.MenuBar := false;
- //newBrowser.AddressBar := 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);
+ CreateBrowsers(BROWSER_COUNT);
- // \8bN\93®\8e\9e\82É\95Û\91¶\82³\82ê\82Ä\82µ\82Ü\82¤\91Î\8dô
- FIsIgnoreResize := rtResizing;
+ //\83\81\83j\83\85\81[\83t\83H\83\93\83g
+ SetMenuFont;
//\8eè\82Ì\83J\81[\83\\83\8b
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;
//\83\8a\83X\83g\83X\83^\83C\83\8b
ListView.ViewStyle := GikoSys.Setting.ListStyle;
- //\83\81\83C\83\93\83N\81[\83\8b\83o\81[\88Ê\92u
-// MainCoolBar.Top := 0;
-// MainCoolBar.Left := 0;
-
//\83A\83j\83\81\83p\83l\83\8b\88Ê\92u
AnimePanel.Top := 0;
AnimePanel.Left := 0;
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;
TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
TreeView.Color := GikoSys.Setting.CabinetBackColor;
- {TreeView.Font.Style := [];
- if GikoSys.Setting.CabinetFontBold then
- TreeView.Font.Style := [fsBold];
- if GikoSys.Setting.CabinetFontItalic then
- TreeView.Font.Style := TreeView.Font.Style + [fsItalic];
- }
- //FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
- //FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
- //FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
FavoriteTreeView.Font.Assign(TreeView.Font);
FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
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¦
-// TreeView.TopItem.Expanded := True; //\83c\83\8a\81[\83g\83b\83v\8d\80\96Ú\82¾\82¯\82ð\8aJ\82
-// TreeView.Selected := TreeView.Items[0]; //\83c\83\8a\81[\82Ì\83g\83b\83v\8d\80\96Ú\82ð\91I\91ð\82·\82é
+ //\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;
+ ProgressBar.Left := 0;
+ ProgressBar.Width := StatusBar.Panels[0].Width;
+ ProgressBar.Height := StatusBar.Height - 2;
+ ProgressBar.Position := 0;
+
+ // \8aO\95\94\94Â\83v\83\89\83O\83C\83\93\82ð\83\8d\81[\83h(ReadBoardFile, LoadHistory \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
+ InitializeBoardPlugIns;
+
+ // \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è
+ 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
+ GikoSys.ReadBoardFile(BBSs[i]);
+
+ if SplashWindow <> nil then begin
+ SplashWindow.ProgressBar.StepBy(20);
+ SplashWindow.Update;
+ end;
+ end;
+
+ //\8f\84\89ñ\83f\81[\83^\93Ç\82Ý\8d\9e\82Ý
+ RoundList := TRoundList.Create;
+ RoundList.LoadRoundBoardFile;
+ RoundList.LoadRoundThreadFile;
+
+ //TreeView\82Ì\8e×\96\82\8fL\82¢ToolTip\82ð\94ñ\95\\8e¦
+ Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
+ Style := Style or TVS_NOTOOLTIPS;
+ SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
+
+ // \83c\83\8a\81[\82ð\83\81\83C\83\93\82¾\82¯\95\\8e¦\82É\82µ\82Ä\8dÅ\91å\89»
+ TreeView.Align := alClient;
+ FavoriteTreeView.Align := alClient;
+ FavoriteTreeView.Visible := False;
+
+ // \83\81\83j\83\85\81[\82É\92Ç\89Á
+ SetBBSMenu;
//\8dÅ\91å\89»\81E\83E\83B\83\93\83h\83E\88Ê\92u\95\9c\8c³
wp.length := sizeof(wp);
wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
wp.showCmd := SW_HIDE;
SetWindowPlacement(Handle, @wp);
+ //Self.Update;
-// SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
-// GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
if GikoSys.Setting.WindowMax then
- WindowState := wsMaximized;
+ WindowState := wsMaximized;
//\83M\83R\83A\83j\83\81
try
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;
-
- //TreeView\82Ì\8e×\96\82\8fL\82¢ToolTip\82ð\94ñ\95\\8e¦
- Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
- Style := Style or TVS_NOTOOLTIPS;
- SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
-
- // \83c\83\8a\81[\82ð\83\81\83C\83\93\82¾\82¯\95\\8e¦\82É\82µ\82Ä\8dÅ\91å\89»
- TreeView.Align := alClient;
- FavoriteTreeView.Align := alClient;
- FavoriteTreeView.Visible := False;
-
//\83u\83\89\83E\83U\83T\83C\83Y\95Ï\8dX\82Ì\8f\89\8aú\89»
-// FBrowserSizeFlag := False;
-// FBrowserSizeHeight := ViewPanel.Height;
-
FBrowserSizeHeight := GikoSys.Setting.ListHeight;
FBrowserSizeWidth := GikoSys.Setting.ListWidth;
- // \8aO\95\94\94Â\83v\83\89\83O\83C\83\93\82ð\83\8d\81[\83h(ReadBoardFile, LoadHistory \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
- InitializeBoardPlugIns;
-
- //\8f\84\89ñ\83f\81[\83^\93Ç\82Ý\8d\9e\82Ý
- RoundList := TRoundList.Create;
- RoundList.LoadRoundBoardFile;
-
- // \83{\81[\83h\83t\83@\83C\83\8b\97ñ\8b\93(ReadFavorite \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
- GikoSys.ListBoardFile;
-
- RoundList.LoadRoundThreadFile;
-
- if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
- GikoSys.ListBoardFile;
-
- // \83\81\83j\83\85\81[\82É\92Ç\89Á
- SetBBSMenu;
// \83q\83X\83g\83\8a\83\8a\83X\83g(LoadHistory \82æ\82è\82à\90æ\82É\8ds\82¤\82±\82Æ)
FHistoryList := TList.Create;
LoadHistory;
//\82¨\8bC\82É\93ü\82è\93Ç\82Ý\8d\9e\82Ý
-// FFavorite := TFavorite.Create(FavoriteTreeView);
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;
- //\83v\83\8d\83O\83\8c\83X\83o\81[\82Ì\8f\89\8aú\89»
-// ProgressBar.Visible := False;
- ProgressBar.Parent := StatusBar;
- ProgressBar.Top := 2;
- ProgressBar.Left := 0;
- ProgressBar.Width := StatusBar.Panels[0].Width;
- ProgressBar.Height := StatusBar.Height - 2;
- ProgressBar.Position := 0;
-
//\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 );
FTabHintIndex := -1;
- //\83\8a\83\93\83N\83o\81[
- SetLinkBar;
-
- //\83\81\83j\83\85\81[\83t\83H\83\93\83g
- SetMenuFont;
-
//\83c\81[\83\8b\83o\81[Wrapable
ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
- KeepDefaultToolButton(StdToolBar, TmpToolBar);
- KeepDefaultToolButton(ListToolBar, TmpToolBar);
- KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
-
MakeDefaultINIFile();
//\83c\81[\83\8b\83{\83^\83\93\93Ç\82Ý\8d\9e\82Ý
- ReadToolBarSetting(ActionList, StdToolBar);
- ReadToolBarSetting(ActionList, ListToolBar);
- try
- for i := ListToolBar.ControlCount - 1 downto 0 do
- begin
- if ListToolBar.Controls[ i ].Action = SelectItemAction then
- begin
- // \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;
- // \83X\83\8c\83b\83h\8di\8d\9e\83t\83B\81[\83\8b\83h\82ð\91}\93ü
- SelectComboBox.Parent := ListToolBar;
- SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
- SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
- // \83X\83\8c\83b\83h\8di\8d\9e\97p\93Æ\8e©\83Z\83p\83\8c\81[\83^\82ð\91}\93ü
- SelectComboBoxSplitter.Parent := ListToolBar;
- SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
-
- break;
- end;
- end;
- except
- end;
- ReadToolBarSetting(ActionList, BrowserToolBar);
+ ReadToolBarSetting(GikoDM.GikoFormActionList, StdToolBar);
+ ReadToolBarSetting(GikoDM.GikoFormActionList, ListToolBar);
+ ReadToolBarSetting(GikoDM.GikoFormActionList, BrowserToolBar);
SetToolBarPopup;
- // \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;
+ //ListToolBar\82É\82¢\82é\82©\82à\82µ\82ê\82È\82¢\8di\8d\9e\82ÝComboBox\82ð\94z\92u
+ SetSelectComboBox();
//\83A\83h\83\8c\83X\83o\81[
AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
+ //\83\8a\83\93\83N\83o\81[
+ SetLinkBar;
//\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;
- // \8bN\93®\8e\9e\82É\95Û\91¶\82³\82ê\82Ä\82µ\82Ü\82¤\91Î\8dô 3
- FIsIgnoreResize := rtResizing;
-
-
//\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;
-// SetStdToolBar;
-// SetLinkBar;
- s := GikoSys.FAbon.NGwordname;
- StatusBar.Panels[2].Text := s;
- StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
+ GikoDM.RepaintStatusBar;
StatusBarResize(Sender);
dummy1.Caption := ItemReservPMenu.Caption;
// \83}\83E\83X\83W\83F\83X\83`\83\83\81[
MouseGesture := TMouseGesture.Create;
GikoSys.Setting.Gestures.LoadGesture(
- GikoSys.Setting.GetGestureFileName, ActionList );
+ GikoSys.Setting.GetGestureFileName, GikoDM.GikoFormActionList );
MouseGesture.Margin := GikoSys.Setting.Gestures.Margin;
MouseGesture.OnGestureStart := OnGestureStart;
MouseGesture.OnGestureMove := OnGestureMove;
if GikoSys.Setting.GestureEnabled then
MouseGesture.SetHook( Handle );
- //2ch\8c¾\8cê\93Ç\82Ý\8fo\82µ
- GikoSys.Setting.SetMessages;
- {
//2ch\8c¾\8cê\93Ç\82Ý\8fo\82µ
- if GikoSys.Setting.GengoSupport then begin
- if GikoSys.Setting.Gengo = nil then
- GikoSys.Setting.Gengo := TStringList.Create;
- if FileExists(GikoSys.GetConfigDir + 'language.ini') then
- GikoSys.Setting.Gengo.LoadFromFile(GikoSys.GetConfigDir + 'language.ini')
- else
- GikoSys.Setting.GengoSupport := false;
- end;
- }
+ GikoSys.SetGikoMessage;
+
//\83I\81[\83g\83\8d\83O\83C\83\93
if GikoSys.Setting.AutoLogin then
- LoginAction.Execute;
+ GikoDM.LoginAction.Execute;
- MuteAction.Checked := GikoSys.Setting.Mute;
+ GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
- GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
-// LockWindowUpdate(0);
+ //\83L\83\83\83v\83V\83\87\83\93\82ª\8fã\8f\91\82«\82³\82ê\82Ä\82µ\82Ü\82¤\82Ì\82Å\81A\82±\82±\82Å\8dÄ\90Ý\92è
+ FavoriteAddToolButton.Caption := '\92Ç\89Á...';
+ AntiIndivAbonMenuItem.Caption := '\8cÂ\95Ê\82 \82Ú\81`\82ñ\89ð\8f\9c';
+
+ //\93ü\97Í\83A\83V\83X\83g\8b@\8d\\82Ì\8f\89\8aú\89»
+ InputAssistDM.Init(GikoSys.GetInputAssistFileName);
end;
// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91¶
BrowserCoolBar.Bands.BeginUpdate;
try
// for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
- for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
+ for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
CoolSet := GikoSys.Setting.BrowserCoolSet[i];
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
FIsIgnoreResize := rtNone;
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;
+ //\8fd\97v\81@\82±\82ê\82ª\82È\82¢\82Æ\83c\81[\83\8b\83{\83^\83\93\82Ì\8dX\90V\82ª\82¨\82©\82µ\82\82È\82é
+// ResetBandInfo( ListCoolBar, ListToolBar );
FIsIgnoreResize := rtNone;
- //TabAutoLoad
//FormCrete\82©\82ç\88Ú\93®\81B
if GikoSys.Setting.TabAutoLoadSave then begin
- TabAutoLoadAction.Execute;
+ GikoDM.TabAutoLoadAction.Execute;
end;
- //\82É\82¿\82á\82ñ\8cê\88Ä\93à\83T\83|\81[\83g\8b@\94\
- if GikoSys.Setting.GengoSupport then begin
- //\97\\92è\92n
- //Test\8cü\82¯
- end;
+
+ //ActionList\82ÌGroupIndex\82ð\8c³\82É\96ß\82·
+ SetGroupIndex(GikoDM.GikoFormActionList);
+
FStartUp := false;
end;
end;
begin
// if GikoForm.WindowState <> wsMinimized then
// SaveCoolBarSettings;
+ CanClose := True;
if ( GikoSys.Setting.ShowDialogForEnd ) and
(MessageDlg('\83M\83R\83i\83r\82ð\8fI\97¹\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82·\82©\81H', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
CanClose := false;
Exit;
- end else begin
- CanClose := True;
- if GikoSys.Setting.TabAutoLoadSave then begin
- TabAutoSaveAction.Execute;
+ end;
+
+ if GikoSys.Setting.TabAutoLoadSave then begin
+ GikoDM.TabAutoSaveAction.Execute;
+ end;
+
+ if (SearchDialog <> nil) then begin
+ if (SearchDialog.Visible) then begin
+ SearchDialog.Close;
+ try
+ SearchDialog.Release;
+ except
+ end;
+ SearchDialog := nil;
end;
end;
- { //2ch\8c¾\8cȩ̂²ÙFree
+ { //2ch\8c¾\8cȩ̂²ÙFree
if GikoSys.Setting.Gengo <> nil then begin
GikoSys.Setting.Gengo.Free;
end;
- }
- //Application.HookMainWindow(Hook);
+ }
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;
// 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
+ //BoardGroups[i].Clear;
+ BoardGroups[i].Free;
+ end;
+
try
for i := Length( BBSs ) - 1 downto 0 do begin
if BBSs[ i ] <> nil then
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
i : Integer;
tmpBool: Boolean;
begin
+ LockWindowUpdate(Self.Handle);
+
//\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;
+ //\8f\84\89ñ\83\8a\83X\83g\95Û\91¶
+ try
+ RoundList.SaveRoundFile;
+ except
+ end;
+ //\8f\84\89ñ\83\8a\83X\83g\82ð\94j\8aü
+ try
+ RoundList.Clear;
+ except
+ end;
+
+ //\97\9a\97ð\82Ì\95Û\91¶\82Æ\94j\8aü
+ try
+ SaveHistory;
+ ClearHistory;
+ except
+ end;
+
+ //\82¨\8bC\82É\93ü\82è\82Ì\95Û\91¶\82Æ\94j\8aü
+ try
+ FavoriteDM.WriteFavorite;
+ FavoriteDM.Clear;
+ except
+ end;
+
+ //\94Â\81E\83X\83\8c\81EPLUGIN\82Ì\94j\8aü
+ for i := Length(BoardGroups) - 1 downto 0 do begin
+ try
+ BoardGroups[i].Free;
+ except
+ end;
+ end;
//BBS\94j\8aü
try
for i := Length( BBSs ) - 1 downto 0 do begin
ActiveList := nil;
FTreeType := gttNone;
- GikoSys.FBoardURLList.Clear;
+
+ //============\82±\82±\82©\82ç\89º\82Å\81A\8dÄ\90¶================================//
+
+ // \8aO\95\94\94Â\83v\83\89\83O\83C\83\93\82ð\83\8d\81[\83h(ReadBoardFile, LoadHistory \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
+ InitializeBoardPlugIns;
+
GikoSys.ListBoardFile; //\83{\81[\83h\83t\83@\83C\83\8b\93Ç\8d\9e
+ // \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
+ GikoSys.ReadBoardFile(BBSs[i]);
+ end;
+
// BBS \83\81\83j\83\85\81[\82Ì\8dX\90V
SetBBSMenu;
ShowBBSTree( BBSs[ 0 ] );
// \97\9a\97ð\93Ç\82Ý\8d\9e\82Ý
- SaveHistory;
- ClearHistory;
LoadHistory;
//\82¨\8bC\82É\93ü\82è\93Ç\82Ý\8d\9e\82Ý
- FavoriteDM.WriteFavorite;
- FavoriteDM.Clear;
FavoriteDM.ReadFavorite;
SetLinkBar;
+ //\8f\84\89ñ\82Ì\93Ç\82Ý\8d\9e\82Ý
+ RoundList.LoadRoundBoardFile;
+ RoundList.LoadRoundThreadFile;
+
+ LockWindowUpdate(0);
//
- TabsOpenAction.Execute;
+ GikoDM.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;
- try
- if not inBBS.IsBoardFileRead then
- GikoSys.ReadBoardFile( inBBS );
- try
- if SplashWindow <> nil then
- SplashWindow.ProgressBar.Max := inBBS.Count;
- 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;
- end;
- Board.EndUpdate;
- end;
-
- CategoryNode.Expanded := Category.NodeExpand;
+ p: TPoint;
+ s: string;
+ tmp2: string;
+ URL: string;
+ ATitle: Boolean;
- if SplashWindow <> nil then begin
- SplashWindow.ProgressBar.StepIt;
- Application.ProcessMessages;
- end;
- end;
- finally
- TreeView.Items.EndUpdate;
- end;
-end;
+ threadItem : TThreadItem;
+ board : TBoard;
+ Protocol, Host, Path, Document, Port, Bookmark: string;
-function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
-var
- TitleColumn : TListColumn;
- ListColumn : TListColumn;
- i, id, idx : Integer;
-begin
- ListView.Items.BeginUpdate;
+ 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
- Screen.Cursor := crHourGlass;
-
- 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 ];
+ 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;
- TitleColumn.Index := idx;
-
- 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;
end;
-end;
-
-function TGikoForm.SetBoardListItem(Category: TCategory): 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 := 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 ];
- end;
- end;
- end;
- TitleColumn.Index := idx;
+ StatusBar.Panels[1].Text := Text2;
- ListView.Items.Count := 0;
- ListView.Items.Clear;
- ListView.Items.Count := Category.Count;
-
-// UpFolderAction.Enabled := True;
-// AllItemAction.Enabled := False;
-// LogItemAction.Enabled := False;
-// NewItemAction.Enabled := False;
-// SelectItemAction.Enabled := False;
-// ListDownloadToolButton.Enabled := False;
-// BoardReservToolButton.Enabled := False;
-// ListThreadDownloadToolButton.Enabled := False;
-
- ListNameLabel.Caption := Category.Title;
- FolderImage.Picture := nil;
- ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
-
- 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;
-
- Result := Category.Count;
- finally
- Screen.Cursor := crDefault;
- ListView.Items.EndUpdate;
+ if FHint <> nil then begin
+ FHint.ReleaseHandle;
+ FHint.ClearAllRes;
end;
-end;
-
-function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
-var
- TitleColumn : TListColumn;
- ListColumn : TListColumn;
- i, id, idx : Integer;
-begin
- ListView.Items.BeginUpdate;
- try
- Screen.Cursor := crHourGlass;
+ if FPreviewBrowser <> nil then
+ ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
-{*
- // \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 ];
- end;
- end;
- end;
- TitleColumn.Index := idx;
- end;
+ if not GikoSys.Setting.UnActivePopup then
+ if not GikoForm.Active then
+ Exit;
- ListView.Items.Count := 0;
- ListView.Items.Clear;
+//file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
+//file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
- 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;
-
- 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 ] );
- end;
-
- Result := Board.Count;
- finally
- Screen.Cursor := crDefault;
- ListView.Items.EndUpdate;
- end;
-end;
-
-procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
-var
-// FileName: string;
-// DateTime: TDateTime;
- BoardCnt: Integer;
- BBS: TBBS;
- Category: TCategory;
- Board: TBoard;
- ThreadItem: TThreadItem;
- RepStr: string;
- ActivListObj : TObject;
- i, idx : Integer;
-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
- 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.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;
- //if Item = nil then Exit;
- //if Item.Index > BoardCnt then Exit;
- //if ListView.Items.Count = 0 then Exit;
-
-// if not (Board.Items[Item.Index] is TThreadItem) then Exit;
-
- 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;
-
-// if ListNumberVisibleAction.Checked then
-// RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
-// else
- //RepStr := ThreadItem.Title;
- 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;
+ 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 := Text;
+ FPreviewURL := Text2;
PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
PreviewTimer.Enabled := True;
- end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
- if Pos('mailto:', Text) = 1 then begin
- s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
+ end else if (Pos('about:blank', Text2) = 1) or (Pos('http://', Text2) = 1) or (Pos('mailto:', Text2) = 1) then begin
+ if Pos('mailto:', Text2) = 1 then begin
+ s := StringReplace(Text2, 'mailto:', '', [rfIgnoreCase]);
//\83M\83R\83i\83r\83X\83\8c \83p\81[\83g3\82Ì466\8e\81\82É\8a´\8eÓ
GetCursorPos(p);
p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
tmp2 := ZenToHan(e.Get_outerText);
if (GikoSys.IsNumeric(tmp2)) then begin
//\82\93\82Í\83\8c\83X\94Ô\8d\86\82Á\82Û\82¢\82Á\82·\81B
- wkIntSt := StrToInt(tmp2);
- wkIntTo := StrToInt(tmp2);
+ wkIntSt := StrToInt64(tmp2);
+ wkIntTo := StrToInt64(tmp2);
//s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
FHint.PopupType := gptThread;
- SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
+ HTMLCreater.SetResPopupText(FHint, GetActiveContent, wkIntSt, wkIntTo, False, False);
end else begin
FHint.PopupType := gptRaw;
FHint.Caption := s;
end;
end else begin
threadItem := GetActiveContent;
- URL := GetRespopupURL(Text, threadItem.URL);
+ URL := THTMLCreate.GetRespopupURL(Text2, threadItem.URL);
PathRec := Gikosys.Parse2chURL2(URL);
if (PathRec.FNoParam) then begin
PathRec.FSt := 1;
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 );
+ HTMLCreater.SetResPopupText(FHint, 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;
procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
var
SysMenu: HMenu;
- //SysMenuApp: HMenu;
begin
FEnabledCloseButton := Enabled;
SysMenu := GetSystemMenu(Handle, False);
- //SysMenuApp := GetSystemMenu(Application.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);
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 Application.Terminated then
- Exit;
- 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;
- if FPreviewBrowser <> nil then
- ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
-
-end;
-
procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
const ARect: TRect; var DefaultDraw: Boolean);
var
end else if TObject(TreeView.Items[i].Data) is TBoard then begin
IsBoardNode := True;
Board := TBoard(TreeView.Items[i].Data);
+
Cnt := Board.UnRead;
if Cnt <= 0 then
continue;
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);
- if GetActiveList = Item.Board then begin
+ 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;
Item.ThreadItem.NewArrival := True;
- if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
- boardPlugIn := Item.ThreadItem.BoardPlugIn;
- Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
+ //if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
+ if (Item.ThreadItem.ParentBoard.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
+ //boardPlugIn := Item.ThreadItem.BoardPlugIn;
+ boardPlugIn := Item.ThreadItem.ParentBoard.BoardPlugIn;
+ 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 := GikoSys.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);
+ InsertBrowserTab(Item.ThreadItem);
end;
- Application.ProcessMessages;
+ Application.ProcessMessages;
if Item.State = gdsComplete then begin
PlaySound('New');
- AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureSyutoku)), nil, gmiOK);
- //Add by Genyakun
- DiffComp := True;
+ 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);
- //Add by Genyakun
- DiffComp := True;
+ AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmSureDiff), nil, gmiOK);
+ //Add by Genyakun
+ DiffComp := True;
end;
//\8f\84\89ñ\82 \82è\82Ì\8fê\8d\87\81\95\82P\82O\82O\82O\92´\82Í\8f\84\89ñ\8dí\8f\9c
if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
Item.ThreadItem.Round := False;
- Item.ThreadItem.RoundName := '';
+ //Item.ThreadItem.RoundName := '';
AddMessageList('\81\9a1000\94\8c¾\82ð\92´\82¦\82½\82Ì\82Å\8f\84\89ñ\82ð\8dí\8f\9c\82µ\82Ü\82µ\82½ - [' + Item.ThreadItem.Title + ']', nil, gmiOK);
end;
-
TreeView.Refresh;
+ //ListView\82Å\82±\82Ì\83X\83\8c\82ª\8aÜ\82Ü\82ê\82é\94Â\82ð\95\\8e¦\82µ\82Ä\82¢\82é\82Æ\82«\82Ì\8dX\90V\8f\88\97\9d
+ if (ActiveList <> nil) and (ActiveList is TBoard) then begin
+ TBoard(ActiveList).LogThreadCount := TBoard(ActiveList).GetLogThreadCount;
+ TBoard(ActiveList).NewThreadCount := TBoard(ActiveList).GetNewThreadCount;
+ TBoard(ActiveList).UserThreadCount:= TBoard(ActiveList).GetUserThreadCount;
+ //ListView\82Ì\83A\83C\83e\83\80\82Ì\8cÂ\90\94\82à\8dX\90V
+ case GikoForm.ViewType of
+ 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;
-// HtmlName: string;
- doc: Variant;
+ doc: Variant;
s: string;
-// OldCursor: TCursor;
i: Integer;
idx: Integer;
ThreadItem: TThreadItem;
Thread: TBrowserRecord;
ThreadTitle, ThreadPTitle: string;
- ThreadScrollTop: Integer;
- ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean;
+ ThreadIsLog, {ThreadUnRead,} ThreadNewArraical: boolean;
begin
-// AddMessageList('SetContent', nil, gmiWhat);
Thread := inThread;
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);
- //Application.ProcessMessages;
FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop;
- //if FActiveContent.Browser <> BrowserNullTab.Browser then
- // TOleControl(FActiveContent.Browser).Visible := false;
except
on E: Exception do
MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
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;
FBrowsers.Move(BROWSER_COUNT - 1, 0);
end;
- //MoveWindow(Thread.FBrowser.Handle, 0, 0, BrowserPanel.Width, BrowserPanel.Height, false);
-
ThreadTitle := Thread.Thread.Title;
ThreadPTitle := Thread.Thread.ParentBoard.Title;
- ThreadScrollTop := Thread.Thread.ScrollTop;
+ //ThreadScrollTop := Thread.Thread.ScrollTop;
ThreadIsLog := Thread.Thread.IsLogFile;
ThreadItem := Thread.Thread;
ThreadNewArraical := Thread.Thread.NewArrival;
- ThreadUnRead := Thread.Thread.UnRead;
+ //ThreadUnRead := Thread.Thread.UnRead;
BBSID := ThreadItem.ParentBoard.BBSID;
FileName := ThreadItem.FileName;
try
- {
- if ThreadItem.UnRead then begin
- ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
- if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
- TreeView.Refresh;
- end;
- }
-
if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin
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;
- FActiveContent := Thread;
while (Thread.Browser.ReadyState <> READYSTATE_COMPLETE) and
(Thread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
Application.ProcessMessages;
Exit;
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.LastSize := ThreadItem.Size;
Thread.Repaint := false;
Thread.Browser.OnStatusTextChange := nil;
- doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
-
- GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
+ LockWindowUpdate(Thread.Browser.ParentWindow);
+ HTMLCreater.CreateHTML2(Thread.Browser, ThreadItem, sTitle);
Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( Thread.Browser ), 0 );
- if ThreadItem = nil then begin
- FActiveContent := nil;
- BrowserTab.Repaint;
- Exit;
- end;
end;
- ListView.Refresh;
end;
- if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin
- //FActiveContent := Thread;
-
- 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 else begin
- FActiveContent := nil;
- end;
+ RefreshListView(ThreadItem);
finally
Screen.Cursor := crDefault;
end;
function TGikoForm.GetActiveContent: TThreadItem;
begin
try
- if( Assigned(FActiveContent) ) and (Assigned(FActiveContent.Thread))
- and (FActiveContent <> nil) and (FActiveContent.Thread <> nil) then
+ if FActiveContent <> nil then
Result := FActiveContent.Thread
- else begin
- FActiveContent := nil;
+ else
Result := nil;
- end;
except
- FActiveContent := nil;
Result := nil;
end;
+
end;
procedure TGikoForm.SetActiveList(Obj: TObject);
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
ViewType := AViewType;
if ActiveList is TBoard then begin
Board := TBoard(ActiveList);
+ case ViewType of
+ //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';
Item.Board := Board;
Item.DownType := gdtBoard;
Item.ForceDownload := ForceDownload;
-// AbortToolButton.Enabled := True;
-// Animate.Active := True;
-// FDownload.Add(Item);
FControlThread.AddItem(Item);
-// Animate.Active := False;
-// AbortToolButton.Enabled := False;
if FWorkCount = 0 then begin
try
Animate.Active := True;
Item.ThreadItem := ThreadItem;
Item.DownType := gdtThread;
Item.ForceDownload := ForceDownload;
-// AbortToolButton.Enabled := True;
-// Animate.Active := True;
-// FDownload.Add(Item);
FControlThread.AddItem(Item);
-// Animate.Active := False;
-// AbortToolButton.Enabled := False;
if FWorkCount = 0 then begin
try
Animate.Active := True;
else
FHistoryList.Add( favItem );
// SetContent(ThreadItem);
- while GikoSys.Setting.AddressHistoryCount < FHistoryList.Count do begin
+// while GikoSys.Setting.AddressHistoryCount < FHistoryList.Count do begin
+ while GikoSys.Setting.MaxRecordCount < FHistoryList.Count do begin
i := FHistoryList.Count - 1;
TObject( FHistoryList.Items[ i ] ).Free;
FHistoryList.Delete( i );
Node.ImageIndex := ITEM_ICON_THREADLOG1;
Node.SelectedIndex := ITEM_ICON_THREADLOG2;
Node.Data := favItem;
- while GikoSys.Setting.AddressHistoryCount < TreeView.Items.Count do begin
+ //while GikoSys.Setting.AddressHistoryCount < TreeView.Items.Count do begin
+ while GikoSys.Setting.MaxRecordCount < TreeView.Items.Count do begin
i := TreeView.Items.Count - 1;
TreeView.Items.Item[ i ].Delete;
end;
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;
end;
mbLeft:
begin
- //\82±\82±\82ÅDblClick\8fE\82í\82È\82¢\82Æ\81AClick\83C\83x\83\93\83g\82ª\97D\90æ\82µ\82Ä\8bN\82«\82Ä\82µ\82Ü\82¤\82Ì\82Å
+ //\82±\82±\82ÅDblClick\8fE\82í\82È\82¢\82Æ\81AClick\83C\83x\83\93\83g\82ª\97D\90æ\82µ\82Ä\8bN\82«\82Ä\82µ\82Ü\82¤\82Ì\82Å
if (ssDouble in Shift) then
ListDoubleClick(Shift)
else
ListPopupMenu.Popup( pos.X, pos.Y );
end;
end;
-{ if ssDouble in Shift then begin
- DoubleClickOccurred[Button] := True;
- end else begin
- DoubleClickOccurred[Button] := False;
- t := GetTickCount+GetDoubleClickTime;
- while GetTickCount < t do begin
- Application.ProcessMessages;
- if DoubleClickOccurred[Button] then
- Exit;
- end;
- end;
- if ssDouble in Shift then begin
- case Button of
- mbLeft: ListDoubleClick;
-// mbMiddle: ;
-// mbRight: ;
- end;
- end else begin
- case Button of
- mbLeft: ListClick;
-// mbMiddle: ;
-// mbRight: ;
- end;
- end;}
end;
procedure TGikoForm.ListClick;
ThreadItem := TThreadItem(ListItem.Data);
if ThreadItem.IsLogFile then begin
-// if AddHistory(ThreadItem) then
-// SetContent(ThreadItem);
InsertBrowserTab(ThreadItem);
ListView.UpdateItems(ListItem.Index, ListItem.Index);
end else begin
-// SetContent(ThreadItem);
InsertBrowserTab(ThreadItem);
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;
var
ThreadItem: TThreadItem;
shiftDown: Boolean;
- cNode : TTreeNode;
- bNode : TTreeNode;
begin
shiftDown := (ssShift in Shift);
if TObject(ListView.Selected.Data) is TCategory then begin
SelectTreeNode(ListView.Selected.Data, True);
-// TreeView.Selected.Expanded := True;
-// TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
- //TreeViewChange(nil, TreeView.Selected);
end else if TObject(ListView.Selected.Data) is TBoard then begin
- if TBoard(ListView.Selected.Data).Multiplicity = 0 then
- SelectTreeNode(ListView.Selected.Data, True)
- else begin
- cNode := TreeView.Selected;
- if TObject(cNode.Data) is TCategory then begin
- bNode := cNode.getFirstChild;
- while bNode <> nil do begin
- if TObject(bNode.Data) is TBoard then begin
- if TBoard(bNode.Data) = TBoard(ListView.Selected.Data) then begin
- bNode.Selected := true;
- TreeClick(bNode);
- break;
- end;
- end;
- bNode := bNode.getNextSibling;
- end;
- end;
- end;
-// TreeView.Selected.Expanded := True;
-// TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
- //TreeViewChange(nil, TreeView.Selected);
+ SelectTreeNode(ListView.Selected.Data, True)
end else if TObject(ListView.Selected.Data) is TThreadItem then begin
- //if TObject(ListView.Selected.Data) is TThreadItem then begin
- Application.ProcessMessages;
- ThreadItem := TThreadItem(ListView.Selected.Data);
- DownloadContent(ThreadItem, shiftDown);
- //end;
-
+ Application.ProcessMessages;
+ ThreadItem := TThreadItem(ListView.Selected.Data);
+ DownloadContent(ThreadItem, shiftDown);
+
if GikoSys.Setting.BrowserAutoMaximize = gbmDoubleClick then begin
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if GikoSys.Setting.ListWidthState = glsMin then begin
-// BrowserMaxAndFocusAction.Execute;
- BrowserMaxAction.Execute;
- SetFocusForBrowserAction.Execute;
+ GikoDM.BrowserMaxAction.Execute;
+ GikoDM.SetFocusForBrowserAction.Execute;
end;
end else begin
if GikoSys.Setting.ListHeightState = glsMin then begin
-// BrowserMaxAndFocusAction.Execute;
- 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
-// OleVariant(Browser.Document).parentWindow.location.hash := AName;
-
- 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
-// OleVariant(Browser.Document).parentWindow.location.hash := AName;
- {
- while (Browser.ReadyState <> READYSTATE_COMPLETE) and
- (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
- Application.ProcessMessages;
- end;
- }
// 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
-// TmpTreeNode: TTreeNode;
TmpListItem: TListItem;
begin
List.Clear;
+ List.Capacity := 0;
TmpListItem := ListView.Selected;
while TmpListItem <> nil do begin
List.Add(TmpListItem.Data);
TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
end;
-
-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;
-// StdToolBar.Visible := StdToolBarVisibleAction.Checked;
-// AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
+ MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
+ MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
- //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
- StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
-end;
+ if GikoSys.Setting.ListOrientation = gloHorizontal then begin
+ if GikoSys.Setting.ListWidthState = glsMin then begin
+ // \8dÅ\8f¬\95\\8e¦\82É\82·\82é
+ ViewPanel.Width := ThreadMainPanel.Width - 80;
+ end;
+ end else begin
+ if GikoSys.Setting.ListHeightState = glsMin then begin
+ // \8dÅ\8f¬\95\\8e¦\82É\82·\82é
+ ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
+ end;
+ end;
-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;
- //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
- AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
-end;
+ FIsIgnoreResize := rtResizing;
+ PostMessage( Handle, USER_RESIZED, 0, 0 );
-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;
- //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
- LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
-end;
-procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
-var
- CoolBand: TCoolBand;
-begin
- CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
- if CoolBand = nil then
- Exit;
- CoolBand.Visible := ListToolBarVisibleAction.Checked;
-// ListToolBar.Visible := ListToolBarVisibleAction.Checked;
-// AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
- GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
end;
-procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
+procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
var
- CoolBand: TCoolBand;
+ i, j, idx: Integer;
+ doc: Variant;
begin
- CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
- if CoolBand = nil then
- Exit;
- CoolBand.Visible := ListNameBarVisibleAction.Checked;
- GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
+ idx := BrowserTab.TabIndex;
+ FTabHintIndex := -1;
+ for i := 0 to BrowserTab.Tabs.Count - 1 do begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
+ try
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
+ doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
+ end;
+ except
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
+ end;
+ if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
+ FActiveContent := nil;
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
+ j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
+ if j <> -1 then
+ FBrowsers.Move(j, BROWSER_COUNT - 1);
+ end;
+ BrowserTab.Tabs.BeginUpdate;
+ try
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
+ if ( BrowserTab.Tabs.Count - 1 = i ) and
+ ( BrowserTab.TabRect(i).Left
+ <= BrowserTab.DisplayRect.Left ) then begin
+ BrowserTab.ScrollTabs(-1);
+ end;
+ BrowserTab.Tabs.Delete(i);
+ if idx > i then begin
+ BrowserTab.TabIndex := idx - 1;
+ end else begin
+ if BrowserTab.Tabs.Count -1 >= idx then
+ BrowserTab.TabIndex := idx
+ else
+ BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
+ end;
+ finally
+ BrowserTab.Tabs.EndUpdate;
+ end;
+ if BrowserTab.Tabs.Count = 0 then begin
+ BrowserNullTab.Thread := nil;
+ end;
+ if(BrowserTab.TabIndex <> -1) and
+ ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
+ for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
+ if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
+ = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
+ begin
+ ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
+ break;
+ end;
+ end;
+ TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
+ := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
+ TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
+ FBrowsers.Move(BROWSER_COUNT - 1, 0);
+ end;
+ if( FActiveContent = nil) then
+ BrowserTab.OnChange(nil);
+ Exit;
+ end;
+ end;
end;
-
-procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
+procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
var
- CoolBand: TCoolBand;
-begin
- CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
- if CoolBand = nil then
- Exit;
- CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
-// BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
- GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
-end;
-
-procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
-var
- CoolBand: TCoolBand;
-begin
- CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
- if CoolBand = nil then
- Exit;
- CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
- GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
-end;
-
-procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
-begin
- MessageSplitter.Visible := MsgBarVisibleAction.Checked;
- MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
- MessageSplitter.Top := MessagePanel.Top + 1;
- MessagePanel.Visible := MsgBarVisibleAction.Checked;
- GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
-end;
-
-procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
-begin
- StatusBar.Visible := StatusBarVisibleAction.Checked;
- GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
-end;
-
-procedure TGikoForm.IconStyleExecute(Sender: TObject);
-begin
- case ListView.ViewStyle of
- vsIcon: SmallIconAction.Execute;
- vsSmallIcon: ListIconAction.Execute;
- vsList: DetailIconAction.Execute;
- vsReport: LargeIconAction.Execute;
- end;
-end;
-
-procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
-begin
- ListView.ViewStyle := vsIcon;
- LargeIconAction.Checked := True;
-end;
-
-procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
-begin
- ListView.ViewStyle := vsSmallIcon;
- SmallIconAction.Checked := True;
-end;
-
-procedure TGikoForm.ListIconActionExecute(Sender: TObject);
-begin
- ListView.ViewStyle := vsList;
- ListIconAction.Checked := True;
-end;
-
-procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
-begin
- ListView.ViewStyle := vsReport;
- DetailIconAction.Checked := True;
-end;
-
-procedure TGikoForm.SearchActionExecute(Sender: TObject);
-var
- chk: TObject;
-begin
-
- if FSearchDialog = nil then begin
- if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
- chk := GikoForm.GetActiveList
- else
- chk := nil;
-
- FSearchDialog := TSearchDialog.Create(Self, chk);
- FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
- end;
-
- try
- FSearchDialog.Show;
- except
- end;
-
-end;
-
-procedure TGikoForm.OptionActionExecute(Sender: TObject);
-var
- Dlg: TOptionDialog;
-begin
- Dlg := TOptionDialog.Create(Self);
- try
- Dlg.ShowModal;
- finally
- Dlg.Release;
- end;
-end;
-
-procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
-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/';
-begin
- GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
-end;
-
-procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
-const
- URL_2ch: string = 'http://www.2ch.net/';
-begin
- GikoSys.OpenBrowser(URL_2ch, gbtAuto);
-end;
-
-procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
-begin
-// GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
- GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
-end;
-
-procedure TGikoForm.AboutActionExecute(Sender: TObject);
-var
- Dlg: TAboutDialog;
-begin
- Dlg := TAboutDialog.Create(Self);
- try
- Dlg.ShowModal;
- finally
- Dlg.Release;
- end;
-end;
-
-procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
-begin
- ShowHistoryTree;
-end;
-
-procedure TGikoForm.CabinetVisible( isVisible : Boolean );
-begin
- TreeSplitter.Visible := isVisible;
- CabinetPanel.Visible := isVisible;
- CabinetVisibleAction.Checked := isVisible;
-end;
-
-procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
-begin
- case FTreeType of
- gttHistory: CabinetHistoryAction.Execute;
- gttFavorite: CabinetFavoriteAction.Execute;
- else
- CabinetBBSAction.Execute;
- end;
-end;
-
-procedure TGikoForm.AllItemActionExecute(Sender: TObject);
-begin
- try
- if ViewType <> gvtAll then
- SetListViewType(gvtAll);
- GikoSys.Setting.ThreadRange := gtrAll;
- AllItemAction.Checked := True;
- // SelectComboBox \82Ì\97\9a\97ð\82ð\8dX\90V\82µ\82Ä\82¨\82
- ModifySelectList;
- // SelectComboBox \82Ì\92l\82ð\83N\83\8a\83A
- if SelectComboBox.Parent <> nil then begin
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
- ListView.SetFocus;
- end;
- except
- end;
-end;
-
-procedure TGikoForm.LogItemActionExecute(Sender: TObject);
-begin
- try
- if ViewType <> gvtLog then
- SetListViewType(gvtLog);
- GikoSys.Setting.ThreadRange := gtrLog;
- LogItemAction.Checked := True;
- // SelectComboBox \82Ì\97\9a\97ð\82ð\8dX\90V\82µ\82Ä\82¨\82
- ModifySelectList;
- // SelectComboBox \82Ì\92l\82ð\83N\83\8a\83A
- if SelectComboBox.Parent <> nil then begin
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
- ListView.SetFocus;
- end;
- except
- end;
-end;
-
-procedure TGikoForm.NewItemActionExecute(Sender: TObject);
-begin
- try
-
- if ViewType <> gvtNew then
- SetListViewType(gvtNew);
- GikoSys.Setting.ThreadRange := gtrNew;
- NewItemAction.Checked := True;
- // SelectComboBox \82Ì\97\9a\97ð\82ð\8dX\90V\82µ\82Ä\82¨\82
- ModifySelectList;
- // SelectComboBox \82Ì\92l\82ð\83N\83\8a\83A
- if SelectComboBox.Parent <> nil then begin
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
- ListView.SetFocus;
- end;
- except
- end;
-end;
-
-procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
-var
- idx: Integer;
- Dlg: TListSelectDialog;
-begin
- try
- if SelectComboBox.Parent <> nil then begin
- if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
- // SelectComboBox \82ª\82 \82é\8fê\8d\87\82Í\83t\83H\81[\83J\83X\82ð\88Ú\82·
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- if GikoSys.Setting.ListWidthState = glsMax then
- BrowserMinAction.Execute;
- end else begin
- if GikoSys.Setting.ListHeightState = glsMax then
- BrowserMinAction.Execute;
- end;
- SelectComboBox.SetFocus;
- exit;
- end;
- end;
- except
- end;
-
- if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
- SelectComboBox.Text := '';
- SelectComboBox.Color := clWindow;
- end;
-
- AllItemAction.Checked := False;
- LogItemAction.Checked := False;
- NewItemAction.Checked := False;
- //SelectItemAction.Checked := True;
- ModifySelectList;
- Dlg := TListSelectDialog.Create(Self);
- try
- Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
- Dlg.SelectComboBox.Text := SelectComboBox.Text;
- Dlg.ShowModal;
- if Dlg.ModalResult = mrCancel then begin
- if Length( SelectComboBox.Text ) = 0 then begin
- AllItemAction.Checked := True;
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
- end;
-
- if GetActiveList is TBoard then
- SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
- end else begin
- idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
- if idx <> -1 then
- GikoSys.Setting.SelectTextList.Delete(idx);
- GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
- while Dlg.SelectComboBox.Items.Count > 100 do begin
- Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
- end;
-
- if Length( Dlg.SelectComboBox.Text ) = 0 then begin
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
- end else begin
- SelectComboBox.Text := Dlg.SelectComboBox.Text;
- SelectComboBox.Color := clWindow;
- end;
- SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
- end;
- finally
- Dlg.Release;
- end;
-end;
-
-procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
-begin
- GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
- ListView.Refresh;
-end;
-
-procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
-begin
- if GetActiveList is TBoard then begin
-//// if FTreeType = gtt2ch then
-// SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
-// //SetActiveList(TBoard(GetActiveList).ParentCategory);
- if TreeView.Selected <> nil then begin
- if TObject(TreeView.Selected.Parent.Data) is TCategory then
- SelectTreeNode(TCategory(TreeView.Selected.Parent.Data), True);
- end;
- end else if GetActiveList is TCategory then begin
-// if FTreeType = gtt2ch then
- SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
- //SetActiveList(TCategory(GetActiveList).ParenTBBS);
- end;
-// if TreeView.Selected = nil then Exit;
-// if TreeView.Selected.Level = 0 then Exit;
-// TreeView.Selected.Parent.Selected := True;
-end;
-
-procedure TGikoForm.RoundActionExecute(Sender: TObject);
-var
- Dlg: TRoundDialog;
-begin
- Dlg := TRoundDialog.Create(Self);
- try
- Dlg.ShowModal;
- finally
- Dlg.Release;
- end;
-end;
-
-procedure TGikoForm.StopActionExecute(Sender: TObject);
-begin
- FControlThread.DownloadAbort;
- if FWorkCount <> 0 then FWorkCount := 0;
- try
- Animate.Active := False;
- except
- end;
- Screen.Cursor := crDefault;
-end;
-
-procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
-begin
-// MessagePanel.Visible := False;
-// MessageSplitter.Visible := False;
-// MsgBarVisibleAction.Checked := False;
- MsgBarVisibleAction.Execute;
-end;
-
-procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
-begin
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- case GikoSys.Setting.ListWidthState of
- glsMax: begin
- //\92Ê\8fí\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- ViewPanel.Width := FBrowserSizeWidth;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
- GikoSys.Setting.ListWidthState := glsNormal;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- end;
- glsMin, glsNormal: begin
- //\8dÅ\91å\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- if GikoSys.Setting.ListWidthState = glsNormal then
- FBrowserSizeWidth := ViewPanel.Width;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- ViewPanel.Width := 1;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
- GikoSys.Setting.ListWidthState := glsMax;
- end;
- end;
- end else begin
- case GikoSys.Setting.ListHeightState of
- glsMax: begin
- //\92Ê\8fí\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- ViewPanel.Height := FBrowserSizeHeight;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
- GikoSys.Setting.ListHeightState := glsNormal;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- end;
- glsMin, glsNormal: begin
- //\8dÅ\91å\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- if GikoSys.Setting.ListHeightState = glsNormal then
- FBrowserSizeHeight := ViewPanel.Height;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- ViewPanel.Height := 1;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
- GikoSys.Setting.ListHeightState := glsMax;
- end;
- end;
- end;
-// Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
-// System.Round(BrowserToolBar.ButtonWidth div 2),
-// System.Round(BrowserToolBar.ButtonHeight div 2)));
- //BrowserTab.OnChange(nil);
-end;
-
-procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
-begin
-
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- case GikoSys.Setting.ListWidthState of
- glsMax, glsNormal: begin
- //\8dÅ\8f¬\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- if GikoSys.Setting.ListWidthState = glsNormal then
- FBrowserSizeWidth := ViewPanel.Width;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- ViewPanel.Width := ThreadMainPanel.Width - 80;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
- GikoSys.Setting.ListWidthState := glsMin;
- end;
- glsMin: begin
- //\92Ê\8fí\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- ViewPanel.Width := FBrowserSizeWidth;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
- GikoSys.Setting.ListWidthState := glsNormal;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- end;
- end;
- end else begin
- case GikoSys.Setting.ListHeightState of
- glsMax, glsNormal: begin
- //\8dÅ\8f¬\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- if GikoSys.Setting.ListHeightState = glsNormal then
- FBrowserSizeHeight := ViewPanel.Height;
- ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
- GikoSys.Setting.ListHeightState := glsMin;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- end;
- glsMin: begin
- //\92Ê\8fí\95\\8e¦\82É\82·\82é
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
- ViewPanel.Height := FBrowserSizeHeight;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
- GikoSys.Setting.ListHeightState := glsNormal;
- if FActiveContent <> nil then
- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
- end;
- end;
- end;
-end;
-
-procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
-begin
- BrowserMovement('top');
-end;
-
-procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
-begin
- BrowserMovement('bottom');
-end;
-
-procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
-begin
- BrowserMovement('new');
-end;
-
-procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
-begin
- BrowserMovement('koko');
-end;
-
-procedure TGikoForm.EditorActionExecute(Sender: TObject);
-var
- Editor: TEditorForm;
- Item: TThreadItem;
-begin
- Item := GetActiveContent;
- if Item = nil then Exit;
- Editor := TEditorForm.Create(Application.MainForm);
- Editor.SetThreadItem(Item);
- GikoSys.LoadEditorKeySetting(Editor.ActionList);
- Editor.Show;
- Editor.BodyEdit.SetFocus;
-end;
-
-procedure TGikoForm.IEActionExecute(Sender: TObject);
-begin
- ShowThreadAction.Execute;
-end;
-
-procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
-begin
- ThreadItem := GetActiveContent;
- if ThreadItem = nil then Exit;
- GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
-end;
-
-procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
-begin
- ThreadItem := GetActiveContent;
- if ThreadItem = nil then Exit;
- GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
-end;
-
-//(Thread)URL\82ð\83R\83s\81[
-procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
-var
- s: string;
-begin
- s := '';
- if TObject(GetActiveContent) is TBoard then
- s := s + TBoard(GetActiveContent).URL + #13#10
- else if TObject(GetActiveContent) is TThreadItem then
- s := s + TThreadItem(GetActiveContent).URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
-end;
-
-//(Thread)\83X\83\8c\83b\83h\96¼\82ð\83R\83s\81[
-procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
-var
- s: string;
-begin
- s := '';
- if TObject(GetActiveContent) is TBoard then
- s := s + TBoard(GetActiveContent).Title + #13#10
- else if TObject(GetActiveContent) is TThreadItem then
- s := s + TThreadItem(GetActiveContent).Title + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
-end;
-
-//(Thread)\83X\83\8c\83b\83h\96¼\82ÆURL\82ð\83R\83s\81[
-procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
-var
- s: string;
-begin
- s := '';
- if TObject(GetActiveContent) is TBoard then
- s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
- else if TObject(GetActiveContent) is TThreadItem then
- s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
-end;
-
-procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
- shiftDown: Boolean;
-begin
- ThreadItem := GetActiveContent;
- shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
- if ThreadItem <> nil then
- DownloadContent(ThreadItem, shiftDown);
-end;
-
-procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
-var
- i: Integer;
- List: TList;
- msg: string;
- shiftDown: Boolean;
-begin
- shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
- if GetActiveList is TCategory then begin
- List := TList.Create;
- try
- SelectListItem(List);
- if List.Count > 5 then begin
- msg := '5\8cÂ\88È\8fã\82Í\8ew\92è\82Å\82«\82Ü\82¹\82ñ' + #13#10
- + '\82Q\82¿\82á\82ñ\82Ë\82é\95\89\89×\8cy\8c¸\82É\82²\8b¦\97Í\82\82¾\82³\82¢';
- MsgBox(Handle, msg, '\8cx\8d\90', MB_ICONEXCLAMATION);
- Exit;
- end;
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TBoard then
- DownloadList(TBoard(List[i]), shiftDown);
- end;
- finally
- List.Free;
- end;
- end else if GetActiveList is TBoard then begin
- DownloadList(TBoard(GetActiveList), shiftDown);
- end;
-end;
-
-procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
- msg: string;
- shiftDown: Boolean;
-begin
- shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
- List := TList.Create;
- try
- SelectListItem(List);
- if List.Count > 10 then begin
- msg := '10\8cÂ\88È\8fã\82Í\8ew\92è\82Å\82«\82Ü\82¹\82ñ' + #13#10
- + '\82Q\82¿\82á\82ñ\82Ë\82é\95\89\89×\8cy\8c¸\82É\82²\8b¦\97Í\82\82¾\82³\82¢';
- MsgBox(Handle, msg, '\8cx\8d\90', MB_ICONEXCLAMATION);
- Exit;
- end;
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TThreadItem then
- DownloadContent(TThreadItem(List[i]), shiftDown);
- end;
- finally
- List.Free;
- end;
-end;
-
-procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
-begin
- if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
- SelectListReloadAction.Enabled := True
- else if GetActiveList is TBoard then
- SelectListReloadAction.Enabled := True
- else
- SelectListReloadAction.Enabled := False;
-end;
-
-procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
-begin
- if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
- SelectThreadReloadAction.Enabled := True
- else
- SelectThreadReloadAction.Enabled := False;
-end;
-
-procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
-begin
- AllItemAction.Enabled := (GetActiveList is TBoard);
-end;
-
-procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
-begin
- LogItemAction.Enabled := (GetActiveList is TBoard);
-end;
-
-procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
-begin
- NewItemAction.Enabled := (GetActiveList is TBoard);
-end;
-
-procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
-begin
- SelectItemAction.Enabled := (GetActiveList is TBoard);
-end;
-
-procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
-begin
- UpFolderAction.Enabled := not (GetActiveList is TBBS);
-end;
-
-procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
-begin
- ThreadEditorAction.Enabled := (GetActiveList is TBoard);
-end;
-
-procedure TGikoForm.FormResize(Sender: TObject);
-begin
-
- MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
- MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
-
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- if GikoSys.Setting.ListWidthState = glsMin then begin
- // \8dÅ\8f¬\95\\8e¦\82É\82·\82é
- ViewPanel.Width := ThreadMainPanel.Width - 80;
- end;
- end else begin
- if GikoSys.Setting.ListHeightState = glsMin then begin
- // \8dÅ\8f¬\95\\8e¦\82É\82·\82é
- ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
- end;
- end;
-
- FIsIgnoreResize := rtResizing;
- PostMessage( Handle, USER_RESIZED, 0, 0 );
-
-
-end;
-
-procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
-begin
- ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
-end;
-
-procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
-begin
- ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
-end;
-
-procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
-begin
- ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
-end;
-
-procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
-begin
- ScrollKokoAction.Enabled := (GetActiveContent <> nil)
- and (GetActiveContent.IsLogFile)
- and (GetActiveContent.Kokomade <> -1);
-
-end;
-
-procedure TGikoForm.EditorActionUpdate(Sender: TObject);
-begin
- EditorAction.Enabled := GetActiveContent <> nil;
-end;
-
-procedure TGikoForm.IEActionUpdate(Sender: TObject);
-begin
- IEAction.Enabled := GetActiveContent <> nil;
-end;
-
-procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
-begin
- ShowThreadAction.Enabled := GetActiveContent <> nil;
-end;
-
-procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
-begin
- ShowBoardAction.Enabled := GetActiveContent <> nil;
-end;
-
-procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
-begin
- ItemReloadAction.Enabled := GetActiveContent <> nil;
-end;
-
-procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
-begin
- URLCopyAction.Enabled := GetActiveContent <> nil;
-end;
-
-procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
-begin
- NameCopyAction.Enabled := GetActiveContent <> nil;
-end;
-
-procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
-begin
- NameURLCopyAction.Enabled := GetActiveContent <> nil;
-end;
-
-procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
-begin
- BrowserTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
-end;
-
-procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
-begin
- NotSelectTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 1);
-end;
-
-procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
-begin
- AllTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
-end;
-
-procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
-begin
- ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
-end;
-
-procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
-const
- DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_SAME_MSG = '\82±\82ê\82ç ^0 \8cÂ\82Ì\83X\83\8c\83b\83h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_TITLE = '\8dí\8f\9c\8am\94F';
-var
- ThreadItem: TThreadItem;
- TmpListItem: TListItem;
- List: TList;
- i: Integer;
-begin
- List := TList.Create;
- try
- TmpListItem := ListView.Selected;
- while TmpListItem <> nil do begin
- if TObject(TmpListItem.Data) is TThreadItem then begin
- ThreadItem := TThreadItem(TmpListItem.Data);
- if ThreadItem.IsLogFile then
- List.Add(ThreadItem);
- end;
- TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
- end;
-
- if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
- if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
- if List.Count = 1 then begin
- if MsgBox(Handle, StringReplace( DEL_MSG, '^0', TThreadItem( List[ 0 ] ).Title, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
- Exit;
- end else begin
- if MsgBox(Handle, StringReplace( DEL_SAME_MSG, '^0', IntToStr( List.Count ), [rfReplaceAll] ), DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> IDYES then
- Exit;
- end;
- end;
- end;
-
- for i := 0 to List.Count - 1 do begin
- ThreadItem := TThreadItem(List[i]);
- DeleteHistory(ThreadItem);
- DeleteTab(ThreadItem);
- ThreadItem.DeleteLogFile;
-
- TreeView.Refresh; // UnRead \82Ì\95\\8e¦\82ð\8dX\90V
- end;
- ListView.Refresh;
- finally
- List.Free;
- end;
-end;
-procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
-var
- i, j, idx: Integer;
- doc: Variant;
-begin
- idx := BrowserTab.TabIndex;
- FTabHintIndex := -1;
- for i := 0 to BrowserTab.Tabs.Count - 1 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
- BrowserTab.Tabs.BeginUpdate;
- try
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
- doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
- end;
- except
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
- end;
- if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
- FActiveContent := nil;
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
- j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
- if j <> -1 then
- FBrowsers.Move(j, BROWSER_COUNT - 1);
- end;
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
- BrowserTab.Tabs.Delete(i);
- if idx > i then begin
- BrowserTab.TabIndex := idx - 1;
- end else begin
- if BrowserTab.Tabs.Count -1 >= idx then
- BrowserTab.TabIndex := idx
- else
- BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
- end;
- if BrowserTab.Tabs.Count = 0 then begin
- BrowserNullTab.Thread := nil;
- end;
- if(BrowserTab.TabIndex <> -1) and
- ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
- for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
- = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
- begin
- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
- break;
- end;
- end;
- TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
- := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
- TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
- FBrowsers.Move(BROWSER_COUNT - 1, 0);
- end;
- BrowserTab.Tabs.EndUpdate;
- if( FActiveContent = nil) then
- BrowserTab.OnChange(nil);
- Exit;
- end;
- end;
-end;
-procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
-var
- i, j, idx: Integer;
- doc: Variant;
+ i, j, idx: Integer;
+ doc: Variant;
begin
idx := BrowserTab.TabIndex;
FTabHintIndex := -1;
for i := 0 to BrowserTab.Tabs.Count - 1 do begin
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
- BrowserTab.Tabs.BeginUpdate;
try
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
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.TabIndex <> -1) and
- ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
- for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
- = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
- begin
- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
- break;
- end;
- end;
- TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
- := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
- TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
- FBrowsers.Move(BROWSER_COUNT - 1, 0);
- end;
-
- BrowserTab.Tabs.EndUpdate;
- if( FActiveContent = nil) then
- BrowserTab.OnChange(nil);
- Exit;
- end;
- end;
-end;
-procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
-var
- No: Integer;
- ThreadItem: TThreadItem;
-begin
- No := KokoPopupMenu.Tag;
- if No = 0 then Exit;
- ThreadItem := GetActiveContent;
- if ThreadItem = nil then Exit;
- ThreadItem.Kokomade := No;
- FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
- FActiveContent.FRepaint := true;
- InsertBrowserTab(FActiveContent.Thread, true);
- Application.ProcessMessages;
-end;
-
-procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
-begin
- ThreadItem := GetActiveContent;
- if ThreadItem = nil then Exit;
- ThreadItem.Kokomade := -1;
- FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
- FActiveContent.FRepaint := true;
- InsertBrowserTab(FActiveContent.Thread, true);
- Application.ProcessMessages;
-end;
-
-function TGikoForm.Hook(var Message: TMessage): Boolean;
-begin
- Result := False;
- case Message.Msg of
- CM_APPKEYDOWN:
- Result := True;
- end;
-end;
-
-procedure TGikoForm.KokoResActionExecute(Sender: TObject);
-var
- Editor: TEditorForm;
- Item: TThreadItem;
- Number: Integer;
-begin
- Number := KokoPopupMenu.Tag;
- if Number = 0 then Exit;
- Item := GetActiveContent;
- if Item = nil then Exit;
-
- Editor := TEditorForm.Create(Self);
- Editor.SetThreadItem(Item);
- GikoSys.LoadEditorKeySetting(Editor.ActionList);
- Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
- Editor.Show;
- Editor.BodyEdit.SetFocus;
-end;
-
-procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
-begin
- ItemRoundPMenu.Visible := (GetActiveList is TBoard);
- 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);
-end;
-
-procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
-var
- URL: string;
-begin
- if GetActiveList is TBoard then begin
- URL := TBoard(GetActiveList).URL;
- GikoSys.OpenBrowser(URL, gbtAuto);
- end;
-end;
-
-procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
- s: string;
-begin
- s := '';
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TBoard then
- s := s + TBoard(List[i]).URL + #13#10
- else if TObject(List[i]) is TThreadItem then
- s := s + TThreadItem(List[i]).URL + #13#10;
- end;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- List.Free;
- end;
-end;
-
-procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
- s: string;
-begin
- s := '';
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TBoard then
- s := s + TBoard(List[i]).Title + #13#10
- else if TObject(List[i]) is TThreadItem then
- s := s + TThreadItem(List[i]).Title + #13#10;
- end;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- List.Free;
- end;
-end;
-
-procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
- s: string;
-begin
- s := '';
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TBoard then
- s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
- else if TObject(List[i]) is TThreadItem then
- s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
- end;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- List.Free;
- end;
-end;
-
-procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
-begin
- if GetActiveList is TBoard then
- BoardIEAction.Enabled := True
- else
- BoardIEAction.Enabled := False;
-end;
-
-procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
-begin
- if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
- SelectItemURLCopyAction.Enabled := True
- else
- SelectItemURLCopyAction.Enabled := False;
-end;
-
-procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
-begin
- if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
- SelectItemNameCopyAction.Enabled := True
- else
- SelectItemNameCopyAction.Enabled := False;
-end;
-
-procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
-begin
- if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
- SelectItemNameURLCopyAction.Enabled := True
- else
- SelectItemNameURLCopyAction.Enabled := False;
-end;
-
-procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
-begin
- if ListView.SelCount > 0 then
- AllSelectAction.Enabled := True
- else
- AllSelectAction.Enabled := False;
-end;
-
-procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
-begin
- if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
- LogDeleteAction.Enabled := True
- else
- LogDeleteAction.Enabled := False;
-end;
-
-procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
-var
- idx: Integer;
-// ThreadItem: TThreadItem;
-begin
- idx := BrowserTab.TabIndex;
- if idx <> -1 then begin
- if BrowserTab.Tabs.Objects[idx] <> nil then begin
- //ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
- DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
- end;
- end;
-end;
+ FActiveContent := nil;
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
+ j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
+ if j <> -1 then
+ FBrowsers.Move(j, BROWSER_COUNT - 1);
+ end;
+ BrowserTab.Tabs.BeginUpdate;
+ try
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
+ if ( BrowserTab.Tabs.Count - 1 = i ) and
+ ( BrowserTab.TabRect(i).Left
+ <= BrowserTab.DisplayRect.Left ) then begin
+ BrowserTab.ScrollTabs(-1);
+ end;
+ BrowserTab.Tabs.Delete(i);
+ if idx > i then begin
+ BrowserTab.TabIndex := idx - 1;
+ end else begin
+ if BrowserTab.Tabs.Count -1 >= idx then
+ BrowserTab.TabIndex := idx
+ else
+ BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
+ end;
+ finally
+ BrowserTab.Tabs.EndUpdate;
+ end;
+ if(BrowserTab.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.NotSelectTabCloseActionExecute(Sender: TObject);
-var
- i: Integer;
- idx: Integer;
-begin
- idx := BrowserTab.TabIndex;
- if idx = -1 then Exit;
- BrowserTab.Tabs.BeginUpdate;
- for i := BrowserTab.Tabs.Count - 1 downto BrowserTab.TabIndex + 1 do begin
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
- BrowserTab.Tabs.Delete(i);
- end;
- if idx > 0 then begin
- for i := BrowserTab.TabIndex - 1 downto 0 do begin
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
- BrowserTab.Tabs.Delete(i);
+ if( FActiveContent = nil) then
+ BrowserTab.OnChange(nil);
+ Exit;
end;
end;
- BrowserTab.Tabs.EndUpdate;
end;
-
-procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
-var
- i: Integer;
+function TGikoForm.Hook(var Message: TMessage): Boolean;
begin
- if GikoSys.Setting.ShowDialogForAllTabClose then
- if(MessageDlg('\91S\82Ä\82Ì\83^\83u\82ð\95Â\82¶\82Ä\82æ\82ë\82µ\82¢\82Å\82·\82©\81H', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then
- Exit;
-
- FActiveContent := nil;
- BrowserNullTab.Thread := nil;
- BrowserTab.OnChange := nil;
- BrowserTab.Tabs.BeginUpdate;
- for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
+ //\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;
- BrowserTab.Tabs.Clear;
- BrowserTab.Tabs.EndUpdate;
- BrowserTab.OnChange := BrowserTabChange;
- SetContent(BrowserNullTab);
- Self.Caption := CAPTION_NAME ;
-end;
-
-procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
-var
- Board: TBoard;
- TmpTreeNode: TTreeNode;
-begin
- TmpTreeNode := FClickNode;
- TreeView.Selected := FClickNode;
- Board := nil;
-
- if TObject(TmpTreeNode.Data) is TBoard then
- Board := TBoard(TmpTreeNode.Data)
- else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then
- Board := TFavoriteBoardItem(TmpTreeNode.Data).Item;
-
- if Board <> nil then
- DownloadList(Board);
-end;
-
-procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
- TmpTreeNode: TTreeNode;
-begin
- TmpTreeNode := FClickNode;
- TreeView.Selected := FClickNode;
- ThreadItem := nil;
-
- if TObject(TmpTreeNode.Data) is TThreadItem then
- ThreadItem := TThreadItem(TmpTreeNode.Data)
- else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then
- ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item;
-
- if ThreadItem <> nil then
- DownloadContent(ThreadItem);
end;
-procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
-var
- TmpTreeNode: TTreeNode;
- s: string;
+procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
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;
+ 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);
-procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
-var
- TmpTreeNode: TTreeNode;
- s: string;
-begin
- TmpTreeNode := FClickNode;
- TreeView.Selected := FClickNode;
- if TObject(TmpTreeNode.Data) is TBoard then begin
- s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
- end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
- s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
- end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
- s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
- end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
- s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
- end;
- Clipboard.AsText := s;
+ AddRoundNameMenu(ItemReservPMenu);
+ AddRoundNameMenu(ListReservPMenu);
end;
procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
idx: Integer;
wkIntSt: Integer;
wkIntTo: Integer;
- document: IHTMLDocument2;
BNum, BRes: string;
threadItem: TThreadItem;
begin
if(AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1)
or (AnsiPos('\81\84\81\84', Text) = 1) or (AnsiPos('\81\84', Text) = 1) then begin
if GikoSys.Setting.ResAnchorJamp then begin
- Text := ZenToHan(Text);
+ Text := ZenToHan(Trim(Text));
if(AnsiPos('>>', Text) = 1) then begin
- Text := Copy(Text, 3, Length(Text) - 2);
+ //Text := Copy(Text, 3, Length(Text) - 2);
+ Delete(Text, 1, 2);
end else begin
- Text := Copy(Text, 2, Length(Text) - 1);
+ //Text := Copy(Text, 2, Length(Text) - 1);
+ Delete(Text, 1, 1);
end;
+
if AnsiPos('-', Text) <> 0 then begin
wkIntSt := StrToIntDef(Copy(Text, 1, AnsiPos('-', Text) - 1), 0);
Text := Copy(Text, AnsiPos('-', Text) + 1, Length(Text));
wkIntTo := StrToIntDef(Text, 0);
if wkIntTo < wkIntSt then
wkIntSt := wkIntTo;
- end else
+ end else begin
wkIntSt := StrToIntDef(Text, 0);
+ end;
if wkIntSt <> 0 then begin
- document := FActiveContent.Browser.Document as IHTMLDocument2;
- IDAnchorPopup('');
+ FActiveContent.IDAnchorPopup('');
BrowserMovement(IntToStr(wkIntSt));
end;
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));
+ 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'
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if ViewPanel.Width < 2 then begin
ViewPanel.Width := 1;
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
GikoSys.Setting.ListWidthState := glsMax;
end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
GikoSys.Setting.ListWidthState := glsMin;
end else begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
GikoSys.Setting.ListWidthState := glsNormal;
end;
end else begin
if ViewPanel.Height < 2 then begin
ViewPanel.Height := 1;
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
GikoSys.Setting.ListHeightState := glsMax;
end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
GikoSys.Setting.ListHeightState := glsMin;
end else begin
- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
+ GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
+ GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
GikoSys.Setting.ListHeightState := glsNormal;
end;
end;
i, j: Integer;
idx: Integer;
begin
+ BrowserTab.Tabs.BeginUpdate;
+ try
+ if not BrowserTab.Dragging then begin
+ FTabHintIndex := -1;
+ BrowserTab.Hint := '';
+ idx := BrowserTab.TabIndex;
+ if idx = -1 then begin
+ SetContent(BrowserNullTab);
+
+ end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
+ j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
+ if j <> -1 then
+ FBrowsers.Move(j ,0);
+ end else begin
+ if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
+ (FActiveContent.Browser <> BrowserNullTab.Browser) and
+ (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
+ FBrowsers.Move(BROWSER_COUNT - 1, 0);
-// if NewTab = -1 then
-// ThreadItem := nil;
- if not BrowserTab.Dragging then begin
- FTabHintIndex := -1;
- BrowserTab.Hint := '';
- idx := BrowserTab.TabIndex;
- if idx = -1 then begin
- BrowserNullTab.Thread := nil;
- SetContent(BrowserNullTab);
-
- end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
- j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
- if j <> -1 then
- FBrowsers.Move(j ,0);
- end else begin
- if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
- (FActiveContent.Browser <> BrowserNullTab.Browser) and
- (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
- FBrowsers.Move(BROWSER_COUNT - 1, 0);
-
- for i := 0 to BrowserTab.Tabs.Count - 1 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
- break;
+ for i := 0 to BrowserTab.Tabs.Count - 1 do begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
+ ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
+ break;
+ end;
end;
+ TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
+ TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
+ FBrowsers.Move(BROWSER_COUNT - 1, 0);
end;
- TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
- TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
- FBrowsers.Move(BROWSER_COUNT - 1, 0);
- end;
- MoveWindow(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser.Handle, 0, 0, BrowserPanel.Width, BrowserPanel.Height, false);
- TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
-// GikoSys.OnlyAHundredRes := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
-// OnlyAHundredRes.Checked := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
- SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
+ MoveWindow(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser.Handle, 0, 0, BrowserPanel.Width, BrowserPanel.Height, false);
+ TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
+ SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
- if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
- AddressComboBox.Text := GetActiveContent.URL;
-
- if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
- (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
- then
- else
- SetFocusForBrowserAction.Execute;
+ if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
+ AddressComboBox.Text := GetActiveContent.URL;
+ if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
+ (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
+ then
+ else
+ GikoDM.SetFocusForBrowserAction.Execute;
+ end;
end;
-
+ finally
+ BrowserTab.Tabs.EndUpdate;
end;
-
end;
idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
if idx <> -1 then
DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
- //end else if Button = mbRight then begin
- //PopupMenu\82ÅBrowserTabPoupMenu\82ð\8ew\92è\82µ\82Ä\82¢\82é\82Ì\82Å\82±\82±\82Å\82í\82´\82í\82´\8cÄ\82Ñ\8fo\82·\82Æ\82Q\8fd\82É\82È\82é
- //OnContextPopup\82Å\82à\82µ\82àActive\82ÈTab\88È\8aO\82Å\8cÄ\82Ñ\8fo\82³\82ê\82½\82çTab\82ð\90Ø\82è\91Ö\82¦\82é\82æ\82¤\82É\82µ\82½\81B
-{ // \83}\83E\83X\89E\83{\83^\83\93
- GetCursorPos(p);
- p2 := p;
-// GetCursorPos(p2);
- p := BrowserTab.ScreenToClient(p);
-// idx := BrowserTab.ItemAtPos(p);
- idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
- if idx <> -1 then begin
- OldIndex := BrowserTab.TabIndex;
- BrowserTab.TabIndex := idx;
- if OldIndex <> idx then
- BrowserTab.OnChange(nil);
- BrowserTabPopupMenu.Tag := idx;
- BrowserTabPopupMenu.Popup(p2.X, p2.Y);
- end;
-}
- end else if BUtton = mbLeft then begin
+ end else if Button = mbLeft then begin
FDragWFirst := true;
FMouseDownPos.X := X;
FMouseDownPos.Y := Y;
procedure TGikoForm.SetBrowserTabState;
var
-// i: Integer;
CoolBand: TCoolBand;
begin
BrowserBottomPanel.AutoSize := False;
if GikoSys.Setting.BrowserTabVisible then begin
- if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
- BrowserTab.Style := tsTabs;
- if GikoSys.Setting.BrowserTabPosition = gtpTop then
- BrowserTab.TabPosition := tpTop
- else
- BrowserTab.TabPosition := tpBottom;
- end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
- BrowserTab.TabPosition := tpTop;
- BrowserTab.Style := tsButtons;
- end else begin
- BrowserTab.TabPosition := tpTop;
- BrowserTab.Style := tsFlatButtons
- end;
-
- if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
- BrowserTab.Parent := BrowserTabToolBar;
- BrowserBottomPanel.Hide;
- CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
- if CoolBand <> nil then
- CoolBand.Visible := True;
-// BrowserTab.Parent := BrowserTopPanel;
-// BrowserTab.Parent := BrowserCoolBar;
-// BrowserTab.Top := 26;
-// BrowserTopPanel.Height := 44;
+ BrowserTab.Hide;
+ BrowserTab.Tabs.BeginUpdate;
+ try
+ if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
+ BrowserTab.Style := tsTabs;
+ if GikoSys.Setting.BrowserTabPosition = gtpTop then
+ BrowserTab.TabPosition := tpTop
+ else
+ BrowserTab.TabPosition := tpBottom;
+ end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
+ BrowserTab.TabPosition := tpTop;
+ BrowserTab.Style := tsButtons;
+ end else begin
+ BrowserTab.TabPosition := tpTop;
+ BrowserTab.Style := tsFlatButtons
+ end;
- end else begin
- BrowserTab.Parent := BrowserBottomPanel;
- BrowserTab.Top := 0;
- BrowserTab.Left := 0;
- BrowserBottomPanel.Show;
- CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
- if CoolBand <> nil then
- CoolBand.Visible := False;
-// BrowserTopPanel.Height := 26;
- end;
- BrowserTab.Show;
+ if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
+ BrowserTab.Parent := BrowserTabToolBar;
+ BrowserBottomPanel.Hide;
+ CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
+ if CoolBand <> nil then
+ CoolBand.Visible := True;
+ end else begin
+ BrowserTab.Parent := BrowserBottomPanel;
+ BrowserTab.Top := 0;
+ BrowserTab.Left := 0;
+ BrowserBottomPanel.Show;
+ CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
+ if CoolBand <> nil then
+ CoolBand.Visible := False;
+ end;
+ finally
+ BrowserTab.Tabs.EndUpdate;
+ BrowserTab.Show;
+ end;
end else begin
CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
if CoolBand <> nil then
CoolBand.Visible := False;
BrowserBottomPanel.Visible := False;
-// BrowserTab.Visible := False;
-// BrowserTopPanel.Height := 26;
- AllTabCloseAction.Execute;
+ GikoDM.AllTabCloseAction.Execute;
end;
end;
doc : Variant;
threadItem : TThreadItem;
begin
-// AddMessageList('DocumentComplete', nil, gmiWhat);
if TObject(Sender) is TWebBrowser then begin
BrowserRecord := nil;
if TWebBrowser(Sender) <> Browser then begin
end;
end;
if BrowserRecord <> nil then begin
- if BrowserRecord.FEvent <> nil then
- BrowserRecord.FEvent.Free;
+ if BrowserRecord.Event <> nil then
+ BrowserRecord.Event.Free;
FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
- BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
- BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
- BrowserRecord.FEvent.OnClick := WebBrowserClick; //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
+ BrowserRecord.Event := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
+ BrowserRecord.Event.OnContextMenu := OnDocumentContextMenu;
+ BrowserRecord.Event.OnClick := WebBrowserClick; //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
end;
end else begin
if GetActiveContent <> nil then begin
FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
FEvent.OnContextMenu := OnDocumentContextMenu;
FEvent.OnClick := WebBrowserClick; //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
+ end else begin
+ if FEvent <> nil then begin
+ FEvent.Free;
+ FEvent := nil;
+ end;
end;
+
end;
if (BrowserRecord <> nil) and
Assigned( BrowserRecord.Thread ) then begin
threadItem := BrowserRecord.Thread;
- if (BrowserRecord <> nil) and (Length( BrowserRecord.Movement ) > 0) then begin
+ if (threadItem.JumpAddress > 0) then begin
if threadItem.UnRead then begin
threadItem.UnRead := False;
- threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
- if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
TreeView.Refresh;
- ListView.Refresh;
+ RefreshListView(threadItem);
+ end;
+ // \83X\83N\83\8d\81[\83\8b\90æ\82ª\8eæ\93¾\8aO\82Ì\83\8c\83X\82Ì\8e\9e\82Í\8fI\92[\82É\88Ú\93®
+ //if (StrToIntDef(BrowserRecord.Movement, 0) <= BrowserRecord.Thread.Count) then begin
+ if (threadItem.JumpAddress <= BrowserRecord.Thread.Count) then begin
+ BrowserRecord.Move(IntToStr(threadItem.JumpAddress));
+ threadItem.JumpAddress := 0;
+ end else begin
+ BrowserRecord.Move(IntToStr(BrowserRecord.Thread.Count));
end;
- BrowserMovement( BrowserRecord.Movement, BrowserRecord );
- BrowserRecord.Movement := '';
+
end else if threadItem.UnRead then begin
threadItem.UnRead := False;
- threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
- if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
TreeView.Refresh;
- BrowserMovement( 'new', BrowserRecord );
- ListView.Refresh;
+ BrowserRecord.Move('new');
+ RefreshListView(threadItem);
end else if threadItem.ScrollTop <> 0 then begin
try
doc := Idispatch( OleVariant( BrowserRecord.Browser.ControlInterface ).Document ) as IHTMLDocument2;
end;
end;
end;
-end;
-
-procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
-var
- i: Integer;
- List: TList;
-begin
- if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TThreadItem then begin
- if TThreadItem(List[i]).IsLogFile then begin
- SelectReservAction.Enabled := True;
- Exit;
- end;
- end;
- end;
- SelectReservAction.Enabled := False;
- finally
- List.Free;
- end;
- end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
- SelectReservAction.Enabled := True
- else
- SelectReservAction.Enabled := False;
+ LockWindowUpdate(0);
end;
procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
MenuItem.Clear;
Item := TMenuItem.Create(Self);
Item.Caption := '\90V\82µ\82¢\96¼\91O\82Å\8f\84\89ñ\97\\96ñ(&N)...';
- Item.OnClick := SelectNewRoundNameExecute;
+ Item.OnClick := GikoDM.SelectNewRoundNameExecute;
MenuItem.Add(Item);
Item := TMenuItem.Create(Self);
Item.Caption := '\8f\84\89ñ\83\8a\83X\83g\82©\82ç\8dí\8f\9c(&D)';
- Item.OnClick := SelectDeleteRoundExecute;
+ Item.OnClick := GikoDM.SelectDeleteRoundExecute;
MenuItem.Add(Item);
Item := TMenuItem.Create(Self);
Item.Caption := '-';
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
- //\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);
- RoundList.RoundNameList.Add(s);
- SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
- ListView.Refresh;
- end;
- finally
- Dlg.Free;
- end;
-end;
-procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
-var
- threadItem : TThreadItem;
-begin
- if ParentName <> 'dummy1' then begin
- SetSelectItemRound(RoundFlag, RoundName);
- end else begin
- threadItem := GetActiveContent;
- if threadItem <> nil then begin
- threadItem.RoundName := RoundName;
- threadItem.Round := RoundFlag;
- end;
- end;
-end;
-
-procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
-var
- i: 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;
- 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;
- TThreadItem(List[i]).Round := RoundFlag;
- end;
- end;
- end;
- finally
- List.Free;
- end;
-end;
-
-procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
-begin
- SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name);
- 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;
+ Item.OnClick := SetSelectRoundName;
+ MenuItem.Add(Item);
end;
end;
-procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
+procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
var
- Dlg: TKeySettingForm;
-begin
- Dlg := TKeySettingForm.Create(Self);
- try
- if Dlg.ShowModal = mrOk then begin
- GikoSys.SaveKeySetting(ActionList);
- GikoSys.Setting.Gestures.SaveGesture( GikoSys.Setting.GetGestureFileName );
- end;
- GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
- finally
- Dlg.Release;
- MouseGesture.UnHook;
- MouseGesture.OnGestureStart := OnGestureStart;
- MouseGesture.OnGestureMove := OnGestureMove;
- MouseGesture.OnGestureEnd := OnGestureEnd;
- if GikoSys.Setting.GestureEnabled then
- MouseGesture.SetHook( Handle );
- end;
-end;
-
-procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
+ threadItem : TThreadItem;
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;
+ if ParentName <> 'dummy1' then begin
+ SetSelectItemRound(RoundFlag, RoundName);
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;
+ 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.PaneInitActionExecute(Sender: TObject);
+procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
+var
+ i{, idx}: Integer;
+ List: TList;
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;
+ 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.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';
+procedure TGikoForm.SetSelectRoundName(Sender: TObject);
var
- idx: Integer;
- ThreadItem: TThreadItem;
+ MenuItem: TMenuItem;
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;
+ if Sender is TMenuItem then begin
+ MenuItem := TMenuItem(Sender);
+ SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
+ ListView.Refresh;
end;
end;
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;
-
-procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
-begin
- LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
-end;
-
-procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
-begin
- LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
-end;
-
-procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
-begin
- RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
-end;
-
-procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
-begin
- RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
-end;
-
procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
begin
SetMenuFont;
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);
+ if FavoriteDM.Modified then begin
+ FavoriteMenu.Clear;
- CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
+ //\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á
+ NewMenu := TMenuItem.Create(MainMenu);
+ NewMenu.Action := GikoDM.FavoriteAddAction;
+ FavoriteMenu.Add(NewMenu);
+ //\82¨\8bC\82É\93ü\82è\82Ì\90®\97\9d
+ NewMenu := TMenuItem.Create(FavoriteMenu);
+ NewMenu.Action := GikoDM.FavoriteArrangeAction;
+ FavoriteMenu.Add(NewMenu);
+ //\83Z\83p\83\8c\81[\83^
+ FavoriteMenu.InsertNewLineAfter(NewMenu);
+ CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
+ FavoriteDM.Modified := false;
+ end;
end;
procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
var
i: Integer;
- NewMenu: TMenuItem;
+ NewMenu: array of TMenuItem;
begin
- for i := 0 to Node.Count - 1 do begin
- NewMenu := TFavoriteMenuItem.Create(Self);
- NewMenu.AutoHotkeys := maAutomatic;
- NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
- TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
- MenuItem.Add(NewMenu);
+ SetLength(NewMenu, Node.Count);
+ Node := Node.getFirstChild;
+ i := 0;
+ while ( Node <> nil ) do begin
+ NewMenu[i] := TFavoriteMenuItem.Create(nil);
+ NewMenu[i].AutoHotkeys := maAutomatic;
+ NewMenu[i].Caption := CustomStringReplace(Node.Text, '&', '&&');
+ TFavoriteMenuItem(NewMenu[i]).Data := Node.Data;
- if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
- NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
- CreateFavMenu(Node.Item[i], NewMenu);
- end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
- NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
- NewMenu.OnClick := FavoriteClick;
- end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
- NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
- NewMenu.OnClick := FavoriteClick;
+ if TObject(Node.Data) is TFavoriteFolder then begin
+ NewMenu[i].ImageIndex := GikoDataModule.TOOL_ICON_FAV_FOLDER;
+ CreateFavMenu(Node, NewMenu[i]);
+ end else if TObject(Node.Data) is TFavoriteBoardItem then begin
+ NewMenu[i].ImageIndex := GikoDataModule.TOOL_ICON_FAV_BOARD;
+ NewMenu[i].OnClick := FavoriteClick;
+ end else if TObject(Node.Data) is TFavoriteThreadItem then begin
+ NewMenu[i].ImageIndex := GikoDataModule.TOOL_ICON_FAV_THREAD;
+ NewMenu[i].OnClick := FavoriteClick;
end;
+ Inc(i);
+ Node := Node.getNextSibling;
end;
+ MenuItem.Add(NewMenu);
end;
procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
+const
+ MsgAdd : String = '\8aù\82É\82¨\8bC\82É\93ü\82è\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81B\82»\82ê\82Å\82à\92Ç\89Á\82µ\82Ü\82·\82©\81H';
+ TitleAdd: String = '\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á';
var
Dlg : TFavoriteAddDialog;
ItemURL : string;
Data := Node.Data;
if TObject( Data ) is TFavoriteBoardItem then begin
if ItemURL = TFavoriteBoardItem( Data ).URL then begin
- if Application.MessageBox( '\8aù\82É\82¨\8bC\82É\93ü\82è\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81B\82»\82ê\82Å\82à\92Ç\89Á\82µ\82Ü\82·\82©\81H', '\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á', MB_YESNO ) = IDNO then
+ if Application.MessageBox(PChar(MsgAdd) , PChar(TitleAdd), MB_YESNO ) = IDNO then
Exit;
Break;
end;
Data := Node.Data;
if TObject( Data ) is TFavoriteThreadItem then begin
if ItemURL = TFavoriteThreadItem( Data ).URL then begin
- if Application.MessageBox( '\8aù\82É\82¨\8bC\82É\93ü\82è\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81B\82»\82ê\82Å\82à\92Ç\89Á\82µ\82Ü\82·\82©\81H', '\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á', MB_YESNO ) = IDNO then
+ if Application.MessageBox( PChar(MsgAdd), PChar(TitleAdd), MB_YESNO ) = IDNO then
Exit;
Break;
end;
SetLinkBar;
end;
-procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
-begin
- ShowFavoriteAddDialog(GetActiveContent);
-end;
-
procedure TGikoForm.FavoriteClick(Sender: TObject);
begin
-
FavoriteClick( Sender, True );
-
end;
procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if GikoSys.Setting.ListWidthState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
+ GikoDM.BrowserMaxAndFocusAction.Execute;
end;
end else begin
if GikoSys.Setting.ListHeightState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
+ GikoDM.BrowserMaxAndFocusAction.Execute;
end;
end;
end;
end;
-procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
-begin
- FavoriteAddAction.Enabled := (GetActiveContent <> nil);
-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.ThreadFavoriteAddActionUpdate(Sender: TObject);
-begin
- ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
-end;
-
-procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
-begin
- ShowFavoriteAddDialog(TObject(FClickNode.Data));
-end;
-
-procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
-var
- Dlg: TFavoriteArrangeDialog;
-begin
- Dlg := TFavoriteArrangeDialog.Create(Self);
- try
- Dlg.ShowModal;
- finally
- Dlg.Release;
- end;
- PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
-end;
-
procedure TGikoForm.BBSMenuItemOnClick(
Sender : TObject
);
TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
end;
-
-procedure TGikoForm.MoveToActionExecute(Sender: TObject);
+//! \8ew\92è\82³\82ê\82½\83X\83\8c\83b\83h\82ð\8aJ\82(\83\8d\83O\82ª\96³\82¢\82Æ\82« or \8ew\92èJUMP\82Ü\82Å\91«\82è\82È\82¢\82Æ\82«\82ÍDL\82·\82é)
+procedure TGikoForm.OpenThreadItem(Thread: TThreadItem; URL: String);
var
- URL: string;
- idx: Integer;
+ stRes, edRes : Int64;
+ browserRec : TBrowserRecord;
+ threadNumber : String;
+ doc : Variant;
begin
- URL := Trim(AddressComboBox.Text);
- MoveToURL(URL);
-
- idx := AddressComboBox.Items.IndexOf(URL);
- if idx = -1 then begin
- AddressComboBox.Items.Insert(0, URL);
- if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
- AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
- end else begin
- AddressComboBox.Items.Delete(idx);
- AddressComboBox.Items.Insert(0, URL);
+ stRes := 0;
+ edRes := 0;
+ Thread.JumpAddress := 0;
+ // \83^\83u\82ð\90¶\90¬
+ browserRec := InsertBrowserTab(Thread);
+ if (browserRec <> nil) then begin
+ // JUMP\82·\82×\82«\83\8c\83X\94Ô\8d\86\82ª\82 \82é\82©\83`\83F\83b\83N\82·\82é
+ threadNumber := ChangeFileExt(Thread.FileName, '');
+ GikoSys.GetPopupResNumber( URL, stRes, edRes );
+ // \83X\83\8c\82Ì\94Ô\8d\86\82ð\83\8c\83X\94Ô\82Æ\8cë\82Á\82Ä\94F\8e¯\82µ\82Ä\82¢\82é\82Ì\82ð\83N\83\8a\83A
+ if (StrToInt64(threadNumber) = stRes) then begin
+ if not (AnsiEndsText(threadNumber + '/' + threadNumber, URL))
+ and (Pos('&st=' + threadNumber , URL) = 0) then begin
+ stRes := 0;
+ end;
+ end;
+ if ( stRes > 0 ) then begin
+ Thread.JumpAddress := stRes;
+ end;
+ // \83\8d\83O\82ð\8e\9d\82Á\82Ä\82¢\82È\82¢\82© JUMP\82·\82×\82«\83\8c\83X\94Ô\8d\86\82Ü\82Å\8eæ\93¾\82µ\82Ä\82¢\82È\82¢\82Æ\82«\82ÍDL\82·\82é
+ if (not Thread.IsLogFile) or (stRes > Thread.Count) then begin
+ DownloadContent(Thread);
+ end else if (not browserRec.Repaint) and (stRes > 0) then begin
+ browserRec.Move(IntToStr(stRes));
+ Thread.JumpAddress := 0;
+ try
+ doc := Idispatch( OleVariant( browserRec.Browser.ControlInterface ).Document ) as IHTMLDocument2;
+ Thread.ScrollTop := doc.Body.ScrollTop;
+ except
+ end;
+ end;
end;
end;
URL, protocol2, host2, path2, document2, port2, bookmark2 : string;
tmp1, tmp2: string;
BBSID, BBSKey: string;
- tmpBoard, Board: TBoard;
+ {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 );
//===== \83v\83\89\83O\83C\83\93
try
//\8dì\8bÆ\92\86//
- bi := High( BoardPlugIns );
- for i := Low( BoardPlugIns ) to bi do begin
- if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
- case BoardPlugIns[ i ].AcceptURL( inURL ) of
+ 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
- tmpThread := TThreadItem.Create( BoardPlugIns[ i ], inURL );
- boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
- Board := BBSsFindBoardFromURL( boardURL );
+ boardURL := BoardGroups[i].BoardPlugIn.ExtractBoardURL( inURL );
+ Board := BBSsFindBoardFromURL( boardURL );
+
+
if Board = nil then begin
- //break;
+ //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;
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;
+ OpenThreadItem(ThreadItem, inURL);
+ Exit;
end;
end;
atBoard:
begin
- tmpBoard := TBoard.Create(BoardPlugIns[ i ], inURL);
- Board := BBSsFindBoardFromURL( tmpBoard.URL );
- tmpBoard.Free;
+ Board := BBSsFindBoardFromURL(
+ BoardGroups[i].BoardPlugIn.ExtractBoardURL( inURL )
+ );
if Board <> nil then begin
if FActiveBBS <> Board.ParentCategory.ParenTBBS then
ShowBBSTree( Board.ParentCategory.ParenTBBS );
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 );
-
- 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( Copy(BBSID, 1 , Length(BBSID) - 1) );
- end;
if Board = nil then begin
// \93ü\82é\82×\82«\94Â\82ª\8c©\82Â\82©\82ç\82È\82©\82Á\82½\82Ì\82Å\81A\95\81\92Ê\82Ì\83u\83\89\83E\83U\82Å\8aJ\82
GikoSys.OpenBrowser(inURL, gbtUserApp);
if ThreadItem = nil then begin
ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
end;
- if ThreadItem = nil then begin
- //shift -> \90Ý\92è\83u\83\89\83E\83U\81i\96³\82¯\82ê\82ÎIE\81j
- //ctrl -> IE
- {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
- ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
- if shiftDown then
- GikoSys.OpenBrowser(URL1, gbtUserApp)
- else if ctrlDown then
- GikoSys.OpenBrowser(URL1, gbtIE)
- else begin
- }
- ThreadItem := TThreadItem.Create( nil, URL );
- ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
- if AnsiPos(Host, Board.URL) = 0 then
- ThreadItem.DownloadHost := Host
- else
- ThreadItem.DownloadHost := '';
- Board.Insert(0, ThreadItem);
- if ActiveList is TBoard then begin
- if TBoard(ActiveList) = Board then
- ListView.Items.Count := ListView.Items.Count + 1;
- end;
- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
- browserRec := InsertBrowserTab(ThreadItem);
- if (browserRec <> nil) and (stRes > 0) then
- browserRec.Movement := IntToStr( stRes );
- DownloadContent(ThreadItem);
- {end;}
- end else begin
- if ThreadItem.IsLogFile then begin
- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
- browserRec := InsertBrowserTab(ThreadItem);
- if (browserRec <> nil) and (stRes > 0) then
- browserRec.Movement := IntToStr( stRes );
- end else begin
+ try
+ // \83X\83\8c\83b\83h\83A\83C\83e\83\80\82ª\82È\82¢\82È\82ç\90¶\90¬\82·\82é\81B
+ if ThreadItem = nil then begin
+ ThreadItem := TThreadItem.Create( nil, Board, URL );
+ ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
+ Board.Insert(0, ThreadItem);
+ if ActiveList is TBoard then begin
+ if TBoard(ActiveList) = Board then
+ ListView.Items.Count := ListView.Items.Count + 1;
+ end;
+ end;
+ // \83\8d\83O\82È\82µ\83X\83\8c\83b\83h\82Ì\82Æ\82«\82Í\81A\83z\83X\83g\96¼\82Ì\83`\83F\83b\83N\82ð\82·\82é
+ if (not ThreadItem.IsLogFile) then begin
if AnsiPos(Host, Board.URL) = 0 then
ThreadItem.DownloadHost := Host
else
ThreadItem.DownloadHost := '';
- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
- browserRec := InsertBrowserTab(ThreadItem);
- if (browserRec <> nil) and (stRes > 0) then
- browserRec.Movement := IntToStr( stRes );
- DownloadContent(ThreadItem);
end;
+ OpenThreadItem(ThreadItem, inURL);
+ except
end;
end else begin
Board := BBSsFindBoardFromURL( inURL );
- if Board = nil then begin
+ 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 else begin
+ if FActiveBBS <> Board.ParentCategory.ParenTBBS then
+ ShowBBSTree( Board.ParentCategory.ParenTBBS );
+ SelectTreeNode( Board, True );
+ end;
end;
end;
Shift: TShiftState);
begin
if Key = VK_RETURN then
- MoveToAction.Execute;
+ GikoDM.MoveToAction.Execute;
end;
procedure TGikoForm.BrowserEnter(Sender: TObject);
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;
- 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);
-// SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
- Handled := True;
- end;
- 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;
+ if (Message.WParam <> 0) and
+ (TObject(Message.WParam) is TWebBrowser) then begin
+ senderBrowser := TWebBrowser( Message.WParam );
+ BrowserDocumentComplete( senderBrowser, senderBrowser.Parent, url );
+ end;
+ end;
-procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
-begin
- BrowserTabTabStyleAction.Checked := False;
- BrowserTabFlatStyleAction.Checked := False;
- BrowserTabButtonStyleAction.Checked := True;
- GikoSys.Setting.BrowserTabStyle := gtsButton;
- SetBrowserTabState;
+ inherited;
+ except
+ end;
end;
-procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
+procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
+var
+ handle: THandle;
begin
- BrowserTabFlatStyleAction.Checked := True;
- BrowserTabTabStyleAction.Checked := False;
- BrowserTabButtonStyleAction.Checked := False;
- GikoSys.Setting.BrowserTabStyle := gtsFlat;
- SetBrowserTabState;
+ 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;
+ 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.PreviewTimerTimer(Sender: TObject);
SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
-
+ FPreviewBrowserRect := ARect;
// Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
// SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
end;
procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
+var
+ Pos : TPoint;
begin
+
if PreviewTimer.Enabled then
PreviewTimer.Enabled := False;
if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
FHint.ReleaseHandle;
FHint.ClearAllRes;
end;
- if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
- ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
+
+ if (FPreviewBrowser <> nil)
+ and (IsWindowVisible(FPreviewBrowser.Handle)) then begin
+ //\82±\82±\82Å\8fÁ\82³\82ê\82é\82Ì\82ª\96â\91è
+ //\82½\82Ô\82ñ\82±\82ê\82Å\95\\8e¦\94Í\88Í\94»\92è\82Å\82«\82Ä\82¢\82é\82Í\82¸
+ Pos := Mouse.CursorPos;
+ Pos.X := Pos.X + Left;
+ Pos.Y := Pos.Y + Top;
+ if (FPreviewBrowserRect.Left > Pos.X) or
+ (FPreviewBrowserRect.Right < Pos.X) or
+ (FPreviewBrowserRect.Top > Pos.Y) or
+ (FPreviewBrowserRect.Bottom < Pos.Y) then begin
+ ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
+ end;
+ end;
+
Message.Result := 1;
inherited;
end;
-
procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
begin
- MsgBarCloseAction.Execute;
+ GikoDM.MsgBarCloseAction.Execute;
end;
function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
ThreadItem: TThreadItem;
begin
Result := False;
- IDAnchorPopup('');
- Doc := FactiveContent.FBrowser.Document as IHtmlDocument2;
+ FactiveContent.IDAnchorPopup('');
+ Doc := FactiveContent.Browser.Document as IHtmlDocument2;
if Assigned(Doc) then begin
Range := Doc.selection.createRange as IHTMLTxtRange;
s := CustomStringReplace(Range.text, '\81@', ' ');//\91S\8ap\8bó\94\92\82ð\94¼\8ap\8bó\94\92\82É
ThreadItem := GetActiveContent;
if ThreadItem <> nil then begin
- Num := StrToInt(s);
+ Num := StrToInt64(s);
FHint.PopupType := gptThread;
- SetResPopupText(ThreadItem, Num, Num, False, False);
+ HTMLCreater.SetResPopupText(FHint, ThreadItem, Num, Num, False, False);
if FHint.ResCount <> 0 then
ShowTextPopup;
Result := False;
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
- //===== \83v\83\89\83O\83C\83\93\82É\82æ\82é\95\\8e¦
- boardPlugIn := ThreadItem.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 := GikoSys.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 := 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 := GikoSys.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 := 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 := ''; //\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;
end;
end;
-procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
-var
- FileName: string;
-begin
- FileName := GikoSys.GetAppDir + 'batahlp.chm';
- if not FileExists(FileName) then begin
- MsgBox(
- Handle,
- '\83w\83\8b\83v\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\82Å\82µ\82½' + #13#10 +
- '\83w\83\8b\83v\83t\83@\83C\83\8b\82ð\83M\83R\83i\83r\82Ì\83t\83H\83\8b\83_\82É\92u\82¢\82Ä\82\82¾\82³\82¢' + #13#10 +
- '\83w\83\8b\83v\82Í\83M\83R\83i\83r\82Ì\83T\83C\83g\82É\92u\82¢\82Ä\82 \82è\82Ü\82·',
- '\83G\83\89\81[',
- MB_ICONSTOP);
- Exit;
- end;
- ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
-end;
-
-procedure TGikoForm.ToolButton18Click(Sender: TObject);
+procedure TGikoForm.HistoryAllClearToolButtonClick(Sender: TObject);
const
- DEL_MSG = '\97\9a\97ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+ 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
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;
LinkBarPopupMenu.Items.Clear;
for i := LinkToolBar.ButtonCount - 1 downto 0 do
//LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
- LinkToolBar.Buttons[i].Free;
+ 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
CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
LinkBarPopupMenu.Items.Add(MenuItem);
ToolButton.MenuItem := MenuItem;
- ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
+ ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_FOLDER;
end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
- ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
+ ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_BOARD;
ToolButton.OnClick := FavoriteClick;
end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
- ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
+ ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_THREAD;
ToolButton.OnClick := FavoriteClick;
end;
ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
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);
if ToolBar.Width < bw then begin
w := 0;
for i := 0 to ToolBar.ButtonCount - 1 do begin
- w := w + ToolBar.Buttons[i].Width;
+ if ToolBar.Buttons[i].Visible then
+ w := w + ToolBar.Buttons[i].Width;
if ToolBar.Width <= w then begin
- Case ToolBar.Buttons[i].Tag of
- 0:
- begin
- Item := TMenuItem.Create(Self);
- if ToolBar.Buttons[i].Style = tbsSeparator then
- Item.Caption := '-'
- else 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;
- //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;
+ //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;
- else
- // \8f«\97\88\82Ì\82½\82ß\82Ì\97\\96ñ
end;
end;
end;
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;
-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 ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
- Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
-
- if Component = MainCoolBar then
- Dlg.ToolBarComboBox.ItemIndex := 0
- else if Component = ListCoolBar then
- Dlg.ToolBarComboBox.ItemIndex := 1
- else if Component = BrowserCoolBar then
- Dlg.ToolBarComboBox.ItemIndex := 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);
- for i := ListToolBar.ControlCount - 1 downto 0 do
- begin
- if ListToolBar.Controls[ i ].Action = SelectItemAction then
- begin
- // \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;
- // \83X\83\8c\83b\83h\8di\8d\9e\83t\83B\81[\83\8b\83h\82ð\91}\93ü
- SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
- SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
- SelectComboBox.Parent := ListToolBar;
- // \83X\83\8c\83b\83h\8di\8d\9e\97p\93Æ\8e©\83Z\83p\83\8c\81[\83^\82ð\91}\93ü
- SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
- SelectComboBoxSplitter.Parent := ListToolBar;
-
- break;
- end;
- end;
- ResetBandInfo( ListCoolBar, ListToolBar );
- SaveToolBarSetting(BrowserToolBar);
- end;
- finally
- Dlg.Release;
- FToolBarSettingSender := tssNone;
- end;
-end;
-
function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
var
i : Integer;
begin
-
+ Result := nil;
for i := bar.ButtonCount - 1 downto 0 do begin
if bar.Buttons[ i ].Action = action then begin
Result := bar.Buttons[ i ];
- Exit;
+ Break;
end;
end;
-
- Result := nil;
-
end;
procedure TGikoForm.SetToolBarPopup;
for i := 0 to StdToolBar.ButtonCount - 1 do begin
end;
for i := 0 to ListToolBar.ButtonCount - 1 do begin
- if ListToolBar.Buttons[i].Action = IconStyle then
+ if ListToolBar.Buttons[i].Action = GikoDM.IconStyle then
ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
- if ListToolBar.Buttons[i].Action = SelectReservAction then
+ if ListToolBar.Buttons[i].Action = GikoDM.SelectReservAction then
ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
end;
- aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
+ aIEButton := FindToolBarButton( BrowserToolBar, GikoDM.IEAction );
if aIEButton <> nil then
aIEButton.DropdownMenu := BrowserPopupMenu;
- aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
+ aCabinetBBSButton := FindToolBarButton( StdToolBar, GikoDM.CabinetBBSAction );
if aCabinetBBSButton <> nil then
aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
- aResRangeButton := FindToolBarButton( BrowserToolBar, ResRangeAction );
+ aResRangeButton := FindToolBarButton( BrowserToolBar, GikoDM.ResRangeAction );
if aResRangeButton <> nil then
aResRangeButton.DropdownMenu := ResRangePopupMenu;
- aThreadRangeButton:= FindToolBarButton( ListToolBar, ThreadRangeAction );
+ aThreadRangeButton:= FindToolBarButton( ListToolBar, GikoDM.ThreadRangeAction );
if aThreadRangeButton <> nil then
aThreadRangeButton.DropdownMenu := ThreadRangePopupMenu;
end;
procedure TGikoForm.SetSelectWord( const text : string );
begin
+ // \83X\83\8c\88ê\97\97\82Ì\94Í\88Í\8ew\92è\82ð\89ð\8f\9c
+ ClearThreadRengeAction;
if Length( text ) = 0 then
begin
- AllItemAction.Checked := True;
- LogItemAction.Checked := False;
- NewItemAction.Checked := False;
- end else begin
- // \83`\83\89\82Â\82\82Æ\8c\99\82¾\82©\82ç\81A\88ê\89\9e\89\9f\82µ\82Ä\82 \82é\82Æ\82«\82¾\82¯\8f\88\97\9d\82·\82é
- if AllItemAction.Checked then
- AllItemAction.Checked := False;
- if LogItemAction.Checked then
- LogItemAction.Checked := False;
- if NewItemAction.Checked then
- NewItemaction.Checked := False;
- end;
-
- if Length( text ) = 0 then
+ GikoDM.AllItemAction.Checked := True;
SetListViewType( gvtAll )
- else
+ end else begin
SetListViewType( gvtUser, text, false );
-
+ end;
end;
procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
end else
Str := SelectComboBox.Text + Str;
- SetSelectWord(Str);
+ if (Length(Str) > 0) then begin
+ SetSelectWord(Str);
+ end;
end;
end else if Length( SelectComboBox.Text ) = 0 then
begin
* \81i\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢\81j
*}
end else begin
- // \83`\83\89\82Â\82\82Æ\8c\99\82¾\82©\82ç\81A\88ê\89\9e\89\9f\82µ\82Ä\82 \82é\82Æ\82«\82¾\82¯\8f\88\97\9d\82·\82é
- if AllItemAction.Checked then
- AllItemAction.Checked := False;
- if LogItemAction.Checked then
- LogItemAction.Checked := False;
- if NewItemAction.Checked then
- NewItemaction.Checked := False;
+ // \83X\83\8c\88ê\97\97\82Ì\94Í\88Í\8ew\92è\82ð\89ð\8f\9c
+ ClearThreadRengeAction;
end;
end;
+//! \83X\83\8c\83b\83h\88ê\97\97\82Ì\95\\8e¦\94Í\88Í\90Ý\92è\83`\83F\83b\83N\83N\83\8a\83A
+procedure TGikoForm.ClearThreadRengeAction;
+begin
+ // \83`\83\89\82Â\82\82Æ\8c\99\82¾\82©\82ç\81A\88ê\89\9e\89\9f\82µ\82Ä\82 \82é\82Æ\82«\82¾\82¯\8f\88\97\9d\82·\82é
+ if GikoDM.AllItemAction.Checked then
+ GikoDM.AllItemAction.Checked := False;
+ if GikoDM.LogItemAction.Checked then
+ GikoDM.LogItemAction.Checked := False;
+ if GikoDM.NewItemAction.Checked then
+ GikoDM.NewItemaction.Checked := False;
+ if GikoDM.LiveItemAction.Checked then
+ GikoDM.LiveItemAction.Checked := False;
+ if GikoDM.ArchiveItemAction.Checked then
+ GikoDM.ArchiveItemAction.Checked := False;
+
+end;
procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
begin
if Length( SelectComboBox.Text ) = 0 then
begin
- SelectComboBox.Text := SELECTCOMBOBOX_NAME;
- SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
+ SelectComboBox.Text := GikoDataModule.SELECTCOMBOBOX_NAME;
+ SelectComboBox.Color := GikoDataModule.SELECTCOMBOBOX_COLOR;
end;
end;
begin
try
- if SelectComboBox.Parent = nil then
+ if not SelectComboBoxPanel.Visible then
exit;
if Length( SelectComboBox.Text ) > 0 then
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
- 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;
-
-procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
-begin
- SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
-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.AllResActionUpdate(Sender: TObject);
-begin
-// AllResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
-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 (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then 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 := 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
End;
// \83`\83\89\82Â\82«\8cy\8c¸\82Ì\88×
- If SelectComboBox.Width <> w Then Begin
- SelectComboBox.Width := w;
+ //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;
ResetBandInfo( ListCoolBar, ListToolBar );
End;
End;
+
end;
procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
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;
+ StatusBar.Panels[0].Width -
+ StatusBar.Panels[THREADSIZE_PANEL].Width -
+ StatusBar.Panels[NGWORDNAME_PANEL].Width;
end;
procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
begin
if (Length( SelectComboBox.Text ) = 0) or
- (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
+ (SelectComboBox.Text = GikoDataModule.SELECTCOMBOBOX_NAME) then
begin
SelectComboBox.Text := '';
SelectComboBox.Color := clWindow;
end;
-//\94Â\96¼\8c\9f\8dõ
-procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
-var
- s : String;
- msg : String;
- CurItem : TTreeNode;
- next : boolean;
-begin
- if InputQuery('\94Â\96¼\8c\9f\8dõ','\94Â\96¼\82Ì\93ü\97Í',s) then begin
- next := true;
- while next do begin
- if TreeView.Selected = nil then
- CurItem := TreeView.Items.GetFirstNode
- else begin
- CurItem := TreeView.Selected.GetNext;
- if CurItem = nil then
- CurItem := TreeView.Items.GetFirstNode;
- end;
- while CurItem <> nil do begin
- if (CurItem.ImageIndex <> 2) and (VaguePos(s,CurItem.Text) <> 0) then begin
- break;
- end;
- CurItem := CurItem.GetNext;
- end;
- try
- if CurItem = nil then begin
- msg := '\90æ\93ª\82É\96ß\82è\82Ü\82·\82©\81H';
- if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
- CurItem := TreeView.Items.GetFirstNode;
- end else begin
- Exit;
- end;
- TreeView.Select(CurItem);
- TreeView.SetFocus;
- end else begin
- TreeView.Select(CurItem);
- TreeView.SetFocus;
- msg := '\8e\9f\82É\8ds\82«\82Ü\82·\82©\81H';
- if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
- next := true;
- end else begin
- next := false;
- end;
- end;
-
- except
- Exit;
- end;
- end;
- end;
-end;
-
-procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
-var
- i, b : Integer;
- item : TMenuItem;
-begin
-
- if CabinetPanel.Visible then begin
- if FTreeType = gttFavorite then begin
- CabinetVisible( False );
- CabinetFavoriteAction.Checked := False;
- end else begin
- CabinetFavoriteAction.Checked := True;
- end;
- end else begin
- CabinetVisible( True );
- CabinetFavoriteAction.Checked := True;
- end;
-
- // BBS...BBS, History, Favorite
- GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
-
- b := CabinetSelectPopupMenu.Items.Count - 1;
- for i := 0 to b do begin
- item := CabinetSelectPopupMenu.Items[ i ];
- if item is TBBSMenuItem then begin
- item.Checked := False;
- // CabinetMenu \82Í CabinetSelectPopupMenu \82Æ\93¯\82¶\82Æ\8c\88\82ß\82¤\82¿\82µ\82¿\82á\82¤
- CabinetMenu.Items[ i ].Checked := False;
- end;
- end;
-
- // \83L\83\83\83r\83l\83b\83g\83c\81[\83\8b\83o\81[\8by\82Ñ\83L\83\83\83r\83l\83b\83g\82Ì\95\\8e¦\90Ø\91Ö
- HistoryToolBar.Hide;
- FavoriteToolBar.Show;
- TreeView.Visible := False;
- FavoriteTreeView.Visible := True;
-
- CabinetSelectToolButton.Caption := '\82¨\8bC\82É\93ü\82è';
- FTreeType := gttFavorite;
-
- // \83\81\83j\83\85\81[\8by\82Ñ\83{\83^\83\93\82Ì\83`\83F\83b\83N\82ð\90Ý\92è
- CabinetBBSAction.Checked := False;
- CabinetHistoryAction.Checked := False;
-
- // \82¨\8bC\82É\93ü\82è\82Ì\83c\83\8a\81[\82ð\93W\8aJ
- FavoriteTreeView.Items.GetFirstNode.Expanded := True;
-
-end;
-
procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
begin
Node.ImageIndex := 16;
Node.SelectedIndex := 16;
end else if Source is TBrowserRecord then begin
- ThreadItem := TBrowserRecord( Source ).FThread;
+ ThreadItem := TBrowserRecord( Source ).Thread;
FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
Node.ImageIndex := 16;
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;
-
- SetLinkBar;
-
end;
procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
FavoriteDragDrop( SenderNode, Source );
end;
- if FDropSpaceNode <> nil then begin
- FDropSpaceNode.Free;
- FDropSpaceNode := nil;
- 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;
+ //\8dX\90V\82µ\82½\82±\82Æ\82ð\8b³\82¦\82é
+ FavoriteDM.Modified := true;
+
+ SetLinkBar;
end;
procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
Node: TTreeNode; var S: String);
begin
+ //\8dX\90V\82µ\82½\82±\82Æ\82ð\8b³\82¦\82é
+ FavoriteDM.Modified := true;
FavoriteTreeView.ReadOnly := True;
SetLinkBar;
VK_F2:
begin
FClickNode := FavoriteTreeView.Selected;
- FavoriteTreeViewRenameActionExecute( Sender );
+ GikoDM.FavoriteTreeViewRenameActionExecute( Sender );
end;
VK_DELETE:
begin
FClickNode := FavoriteTreeView.Selected;
- FavoriteTreeViewDeleteActionExecute( Sender );
+ GikoDM.FavoriteTreeViewDeleteActionExecute( Sender );
end;
VK_RETURN:
begin
FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
end;
VK_SPACE:
- FavoriteTreeViewDblClick( Sender );
+ begin
+ FClickNode := FavoriteTreeView.Selected;
+ GikoDM.FavoriteTreeViewReloadActionExecute( Sender );
+ end;
+ end;
+ end else begin
+ //\95Ò\8fW\92\86\82ÉESC\82ð\89\9f\82µ\82½\82ç\81A\95Ò\8fW\82ð\8fI\97¹\82µ\82Ä\81A\8c³\82Ì\95¶\8e\9a\97ñ\82É\96ß\82·
+ 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;
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;
+ FavoriteTreeItemNameCopyPopupMenu.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;
+ 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;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
FavoriteTreeURLCopyPopupMenu.Visible := False;
- FavoriteTreeNameCopyPopupMenu.Visible := True;
+ FavoriteTreeNameCopyPopupMenu.Visible := False;
FavoriteTreeNameURLCopyPopupMenu.Visible := False;
FavoriteTreeReloadPopupMenu.Visible := False;
FavoriteTreeLogDeletePopupMenu.Visible := False;
+ FavoriteTreeItemNameCopyPopupMenu.Visible := True;
end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
FavoriteTreeBrowseFolderPopupMenu.Visible := True;
FavoriteTreeDeletePopupMenu.Visible := True;
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;
+ 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;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
- //FavoriteTreeBrowseThreadPopupMenu.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;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
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;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
FavoriteTreeURLCopyPopupMenu.Visible := False;
FavoriteTreeNameCopyPopupMenu.Visible := False;
FavoriteTreeNameURLCopyPopupMenu.Visible := False;
FavoriteTreeReloadPopupMenu.Visible := False;
FavoriteTreeLogDeletePopupMenu.Visible := False;
+ FavoriteTreeItemNameCopyPopupMenu.Visible := False;
end;
end;
-procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
-const
- DEL_LINK_MSG = '\81g\83\8a\83\93\83N\81h\82Í\83\8a\83\93\83N\83o\81[\97p\83t\83H\83\8b\83_\82Å\82·\81B\8dí\8f\9c\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_MSG = '\81g^0\81h\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_TITLE = '\8dí\8f\9c\8am\94F';
-begin
-
- if FClickNode = nil then
- Exit;
- if FClickNode.IsFirstNode then
- Exit;
- if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
- if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
- if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
- Exit;
- end else begin
- if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
- Exit;
- end;
- end;
-
- //FDeleteList.Add(FClickNode.Data);
- //SetDeleteItemList(FClickNode);
-
- FClickNode.Delete;
-
- SetLinkBar;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
-var
- node : TTreeNode;
-begin
-
- if FClickNode = nil then
- Exit;
- if FClickNode.IsFirstNode then
- Exit;
- if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
- Exit;
- FavoriteTreeView.ReadOnly := False;
- if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
- node := FClickNode.Parent;
- while node <> nil do begin
- node.Expanded := True;
- node := node.Parent;
- end;
- FClickNode.EditText;
- end else begin
- FClickNode.Text := InputBox( '\96¼\91O\82Ì\95Ï\8dX', '\82¨\8bC\82É\93ü\82è\82Ì\90V\82µ\82¢\96¼\91O\82ð\93ü\97Í\82µ\82Ä\82\82¾\82³\82¢', FClickNode.Text );
- end;
-
- SetLinkBar;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
- Sender: TObject);
-var
- NewFavFolder: TFavoriteFolder;
- Node: TTreeNode;
-begin
-
- if FClickNode = nil then
- Exit;
-
- try
- if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
- FavoriteTreeView.Selected := FClickNode.Parent;
- FClickNode := FClickNode.Parent;
- end;
-
- NewFavFolder := TFavoriteFolder.Create;
- Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '\90V\82µ\82¢\83t\83H\83\8b\83_', NewFavFolder);
- Node.ImageIndex := 14;
- Node.SelectedIndex := 14;
- // FClickNode.Selected.Expanded := True;
- FavoriteTreeView.Selected := Node;
- FClickNode := Node;
- FavoriteTreeViewRenameAction.Execute;
- finally
- end;
-
-end;
-
-procedure TGikoForm.ToolButton19Click(Sender: TObject);
-begin
-
- FavoriteArrangeActionExecute( nil );
-
-end;
-
procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
var
i: Integer;
end;
end;
-
-procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
- Sender: TObject);
-begin
-
- FavoriteBrowseFolder( FClickNode );
- //BrowserTab.OnChange(nil);
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
-begin
-
- FClickNode := FavoriteTreeView.Selected;
- FavoriteTreeViewReloadActionExecute( Sender );
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
- Sender: TObject);
-const
- DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_TITLE = '\8dí\8f\9c\8am\94F';
-var
- ThreadItem: TThreadItem;
- FavThread: TFavoriteThreadItem;
-begin
-
- if FClickNode = nil then Exit;
- if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
-
- FavThread := TFavoriteThreadItem( FClickNode.Data );
- ThreadItem := FavThread.Item;
-
- try
- if GikoSys.Setting.DeleteMsg then begin
- if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
- if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
- Exit;
- end;
-
- DeleteHistory(ThreadItem);
- DeleteTab(ThreadItem);
- ThreadItem.DeleteLogFile;
-
- ListView.Refresh;
- finally
- end;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
- FavThread: TFavoriteThreadItem;
- Board: TBoard;
- FavBoard: TFavoriteBoardItem;
- shiftDown: Boolean;
-begin
-
- if FClickNode = nil then Exit;
-
- shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
-
- if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
- FavThread := TFavoriteThreadItem( FClickNode.Data );
- ThreadItem := FavThread.Item;
- if ThreadItem <> nil then
- DownloadContent(ThreadItem, shiftDown);
- end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
- FavBoard := TFavoriteBoardItem( FClickNode.Data );
- Board := FavBoard.Item;
- DownloadList(Board, shiftDown);
- end;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
-var
- FavThread : TFavoriteThreadItem;
- FavBoard : TFavoriteBoardItem;
- s : string;
-begin
-
- if FClickNode = nil then Exit;
-
- if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
-
- FavThread := TFavoriteThreadItem( FClickNode.Data );
- s := FavThread.URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
-
- end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
-
- FavBoard := TFavoriteBoardItem( FClickNode.Data );
- s := FavBoard.URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
-
- end;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
-var
- ThreadItem: TThreadItem;
- FavThread: TFavoriteThreadItem;
- Board: TBoard;
- FavBoard: TFavoriteBoardItem;
- s: string;
-begin
-
- if FClickNode = nil then Exit;
-
- if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
-
- FavThread := TFavoriteThreadItem( FClickNode.Data );
- ThreadItem := FavThread.Item;
-
- try
- s := ThreadItem.Title + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- end;
-
- end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
-
- FavBoard := TFavoriteBoardItem( FClickNode.Data );
- Board := FavBoard.Item;
- if Board <> nil then
- if not Board.IsThreadDatRead then
- GikoSys.ReadSubjectFile(Board);
-
- try
- s := Board.Title + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- end;
-
- end;
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
- Sender: TObject);
-var
- ThreadItem: TThreadItem;
- FavThread: TFavoriteThreadItem;
- Board: TBoard;
- FavBoard: TFavoriteBoardItem;
- s: string;
-begin
-
- if FClickNode = nil then Exit;
-
- if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
-
- FavThread := TFavoriteThreadItem( FClickNode.Data );
- ThreadItem := FavThread.Item;
-
- try
- s := ThreadItem.Title + #13#10 + ThreadItem.URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- end;
-
- end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
-
- FavBoard := TFavoriteBoardItem( FClickNode.Data );
- Board := FavBoard.Item;
- if Board <> nil then
- if not Board.IsThreadDatRead then
- GikoSys.ReadSubjectFile(Board);
-
- try
- s := Board.Title + #13#10 + Board.URL + #13#10;
- if s <> '' then
- Clipboard.AsText := s;
- finally
- end;
-
- end;
-
-end;
-
function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
var
Found: TTreeNode;
Break;
end;
end;
-
+ SenderNode.Selected := False;
+
FavoriteDragDrop( SenderNode, Source );
+ SetLinkBar;
end;
procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
//*)
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if GikoSys.Setting.ListWidthState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
+ GikoDM.BrowserMaxAndFocusAction.Execute;
end;
end else begin
if GikoSys.Setting.ListHeightState = glsMin then begin
- BrowserMaxAndFocusAction.Execute;
+ GikoDM.BrowserMaxAndFocusAction.Execute;
end;
end;
end;
end;
-procedure TGikoForm.ResRangeActionExecute(Sender: TObject);
-begin
- case FResRangeMenuSelect of
- Ord( grrAll ): AllResAction.Execute;
- Ord( grrKoko ): OnlyKokoResAction.Execute;
- Ord( grrNew ): OnlyNewResAction.Execute;
- 100: OnlyAHundredResAction.Execute;
- end;
-end;
-
procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
Y: Integer);
begin
if FDropSpaceNode <> nil then begin
- FDropSpaceNode.Free;
- FDropSpaceNode := nil;
+ try
+ FDropSpaceNode.Delete;
+ finally
+ FDropSpaceNode := nil;
+ end;
+ //\8dX\90V\82µ\82½\82±\82Æ\82ð\8b³\82¦\82é
+ FavoriteDM.Modified := true;
SetLinkBar;
end;
MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
end;
-procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
-begin
-
- if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
- ShowMessage('\83t\83@\83C\83\8b\82ð\8fo\97Í\82µ\82Ü\82µ\82½');
- end else begin
- ShowMessage('\83t\83@\83C\83\8b\82Ì\8fo\97Í\82É\8e¸\94s\82µ\82Ü\82µ\82½');
- end;
-end;
procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
begin
if FListViewBackGroundColor <> value then begin
ListView.Color := FListViewBackGroundColor;
end;
end;
-procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
-begin
- ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
-end;
-
-procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
-begin
-
- if CabinetPanel.Visible then begin
- if FTreeType = gtt2ch then begin
- CabinetVisible( False );
-
- CabinetBBSAction.Checked := False;
- end else begin
- CabinetBBSAction.Checked := True;
- end;
- end else begin
- CabinetVisible( True );
- CabinetBBSAction.Checked := True;
- end;
-
- if FActiveBBS = nil then
- ShowBBSTree( BBSs[ 0 ] )
- else
- ShowBBSTree( FActiveBBS );
-
-end;
-
-procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
- Sender: TObject);
-var
- threadItem : TThreadItem;
-begin
-
- if FClickNode = nil then Exit;
-
- if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
-
- threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
- if threadItem = nil then
- Exit;
- GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
-
- end;
-
-end;
-
procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
var
threadItem : TThreadItem;
end;
-procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
-begin
-
- SelectTreeNode( GetActiveContent.ParentBoard, True );
-
-end;
-
-procedure TGikoForm.UpBoardActionUpdate(Sender: TObject);
-begin
-
- UpBoardAction.Enabled := GetActiveContent <> nil;
-
-end;
-
procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
MousePos: TPoint; var Handled: Boolean);
var
BrowserTab.TabIndex := idx;
BrowserTab.OnChange(nil);
end;
-
end;
-procedure TGikoForm.KoreCopyExecute(Sender: TObject);
-begin
- KonoresCopy(KokoPopupMenu.Tag, true);
-end;
procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
var
ThreadItem: TThreadItem;
ThreadItem := GetActiveContent;
if ThreadItem <> nil then begin
- if ThreadItem.IsBoardPlugInAvailable 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.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é
tmp := GikoSys.ReadThreadFile(FileName, Number);
end;
if tmp <> '' then begin
- Res := GikoSys.DivideStrLine(tmp);
+ 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.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
end;
Body := CustomStringReplace(Body, '</a>', '',true);
- Body := GikoSys.DeleteLink(Body);
+ Body := HTMLCreater.DeleteLink(Body);
if ReplaceTag then begin
Body := CustomStringReplace(Body, '<', '<');
Body := CustomStringReplace(Body, '>', '>');
FavoriteClick( Node );
Exit;
end;
+ //\8c»\8dÝ\95\\8e¦\82µ\82Ä\82¢\82é\82Ì\82Æ\93¯\82¶\82È\82ç\8dÄ\95`\89æ\82µ\82È\82¢
+ if ActiveList = Node.Data then
+ Exit;
ActiveListColumnSave;
if not TBoard(Node.Data).IsThreadDatRead then begin
Screen.Cursor := crHourGlass;
try
- if not TBoard(Node.Data).IsThreadDatRead then
+ if not TBoard(Node.Data).IsThreadDatRead then
GikoSys.ReadSubjectFile(Node.Data);
finally
Screen.Cursor := crDefault;
end;
end;
+ Sort.SetSortDate(Now());
SetActiveList(Node.data);
end;
if TObject( Node.Data ) is TBoard then begin // not TCategory
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if GikoSys.Setting.ListWidthState = glsMax then begin
- BrowserMinAction.Execute;
+ GikoDM.BrowserMinAction.Execute;
if GikoForm.Visible then
ListView.SetFocus;
end;
end else begin
if GikoSys.Setting.ListHeightState = glsMax then begin
- BrowserMinAction.Execute;
+ GikoDM.BrowserMinAction.Execute;
if GikoForm.Visible then
ListView.SetFocus;
end;
end;
end;
-
-procedure TGikoForm.TreeViewClick(Sender: TObject);
-begin
- TreeClick( TreeView.Selected );
-end;
-
+// *************************************************************************
+//! \83c\83\8a\81[\83r\83\85\81[\82ÌKeyDown\83C\83x\83\93\83g
+// *************************************************************************
procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
end;
end;
-
-
-// \83M\83R\83i\83r\82Ì\83\81\83b\83Z\81[\83W\83\8b\81[\83v\82ð\89¡\8eæ\82è\82µ\82Ü\82·
-procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
-//var
-// key : Word;
-begin
- case Msg.message of
- {WM_KEYDOWN:
- if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
- if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
- key := Msg.wParam;
- Handled := BrowserKeyDown( Msg, key, KeyDataToShiftState( Msg.lParam ) );
- end;
- end;}
-
- WM_XBUTTONDOWN:
- case Msg.wParam shr 16 of
- XBUTTON1:
- begin
- if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
- if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
- UpBoardAction.Execute;
- Handled := True;
- end;
- end;
- if not Handled then begin
- if IsDialogMessage( ListView.Handle, Msg ) then begin
- UpFolderAction.Execute;
- Handled := True;
- end;
- end;
- end;
- XBUTTON2:
- end;
- end;
-end;
-
+//! \82¨\8bC\82É\93ü\82è\82ÌMouseDown\83C\83x\83\93\83g
procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
favItem : TTreeNode;
favThreadItem : TFavoriteThreadItem;
+ rect: TRect;
begin
-
case Button of
mbLeft:
begin
- FMouseDownPos.X := X;
- FMouseDownPos.Y := Y;
+ if not (ssAlt in Shift) and (FavoriteTreeView.Selected <> nil) and
+ (FavoriteTreeView.Selected = FavoriteTreeView.GetNodeAt(X, Y)) then begin
+ //\83}\83E\83X\82ªnode\82Ì\8fã\82É\82¢\82é\82©
+ rect := FavoriteTreeView.Selected.DisplayRect(true);
+ // \83A\83C\83R\83\93\95ª\8d¶\82É\82¸\82ç\82·
+ if ((rect.Left - FavoriteTreeView.Indent <= X) and (rect.Right >= X)) and
+ ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin
+ if ssDouble in Shift then begin
+ FClickNode := FavoriteTreeView.Selected;
+ GikoDM.FavoriteTreeViewReloadActionExecute(Sender);
+ FClickNode := nil;
+ end else begin
+ FavoriteClick(
+ TObject(FavoriteTreeView.Selected));
+ end;
+ end;
+ end;
end;
mbMiddle:
begin
end;
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.TreeSelectNameCopyExecute(Sender: TObject);
-var
- s: string;
-begin
- TreeView.Selected := FClickNode;
- s := FClickNode.Text;
- Clipboard.AsText := s;
-end;
-
-procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
- Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-begin
-
- if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
- (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
- FavoriteClick( TObject( FavoriteTreeView.Selected ) );
- end;
-
-end;
-
-destructor TBrowserRecord.Destroy;
-var
- doc :OleVariant;
-begin
- if Self.FEvent <> nil then
- Self.FEvent.Free;
- if Self.FBrowser <> nil then begin
- if Self.Thread <> nil then begin
- //\83^\83u\82Ì\95\9c\8c³\82Å\95\9c\8c³\82³\82ê\82½\83X\83\8c\82Í\81A\95`\89æ\82³\82ê\82Ä\82¢\82È\82¢\82Æ\82«\82ª\82 \82é\82Ì\82Å
- //\82»\82Ì\82Æ\82«\82Ì\83X\83N\83\8d\81[\83\8b\97Ê\82ð\95Û\91¶\82µ\82Ä\82µ\82Ü\82¤\82Æ\83g\83b\83v\82É\96ß\82Á\82Ä\82µ\82Ü\82¤\81B
- if Self.FBrowser.OleObject.Document.documentElement.innerText <> '' then begin
- doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
- Self.Thread.ScrollTop := doc.Body.ScrollTop;
- end;
- end;
- //TOleControl(Self.FBrowser).Visible := false;
- ShowWindow(Self.FBrowser.Handle, SW_HIDE);
- end;
-
-end;
-
-procedure TGikoForm.ResRangeActionUpdate(Sender: TObject);
-begin
-// ResRangeAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
-end;
-
-function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
-var
- p : TPoint;
- e: IHTMLElement;
- AID: string;
- stlist : TStringList;
- i, count, rc : Integer;
- body : String;
- limited : 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;
-
-
-procedure TGikoForm.SetFocusForBrowserActionExecute(Sender: TObject);
-begin
- FActiveContent.FBrowser.SetFocus;
-end;
-
-procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);
-begin
- if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
- (FActiveContent.Browser <> BrowserNullTab.Browser) then
- SetFocusForBrowserAction.Enabled := true
- else
- SetFocusForBrowserAction.Enabled := false;
-end;
-
-procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);
-var
- rct: TRect;
-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é
- else if ListView.Items.Count > 0 then begin
- ListView.Scroll(-ListView.ClientWidth, -ListView.ClientHeight);
- rct := ListView.ItemFocused.DisplayRect(drBounds);
- ListView.Scroll(0, 2 * rct.Top - rct.Bottom);
- if ListView.ViewStyle <> vsReport then begin
- ListView.Scroll(rct.Left, 0);
- end;
- end;
-end;
-
-procedure TGikoForm.SetFocusForCabinetActionExecute(Sender: TObject);
-begin
- if FActiveContent <> nil then
- WebBrowserClick(FActiveContent.Browser); //\88ê\89ñBrowser\82É\93\96\82Ä\82È\82¢\82Æ\93®\82©\82È\82¢\82Æ\82«\82ª\82 \82é
- if TreeView.Visible then begin
- TreeView.SetFocus;
- if(TreeView.Items.Count > 0) and ( TreeView.Selected = nil ) then
- TreeView.Items.Item[0].Selected := true;
- end else if FavoriteTreeView.Visible then begin
- FavoriteTreeView.SetFocus;
- if(FavoriteTreeView.Items.Count > 0) and (FavoriteTreeView.Selected = nil) then
- FavoriteTreeView.Items.Item[0].Selected := true;
- end;
-end;
-procedure TGikoForm.SetFocusForCabinetActionUpdate(Sender: TObject);
-begin
- SetFocusForCabinetAction.Enabled := CabinetPanel.Visible;
-end;
-
-//\83u\83\89\83E\83U\82ð\8dÅ\91å\89»\82µ\82Ä\83t\83H\81[\83J\83X\82ð\93\96\82Ä\82é\81B
-procedure TGikoForm.BrowserMaxAndFocusActionExecute(Sender: TObject);
-begin
- BrowserMaxAction.Execute;
- SetFocusForBrowserAction.Execute;
-end;
-
-procedure TGikoForm.BrowserMaxAndFocusActionUpdate(Sender: TObject);
-begin
- if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
- (FActiveContent.Browser <> BrowserNullTab.Browser) then
- BrowserMaxAndFocusAction.Enabled := true
- else
- BrowserMaxAndFocusAction.Enabled := false;
-end;
-//\83X\83\8c\83b\83h\88ê\97\97\82ð\8dÅ\91å\89»\82µ\82Ä\83t\83H\81[\83J\83X\82ð\93\96\82Ä\82é
-procedure TGikoForm.ThreadlistMaxAndFocusActionExecute(Sender: TObject);
-begin
- BrowserMinAction.Execute;
- SetFocusForThreadListAction.Execute;
-end;
-
-procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem;
- Selected: Boolean);
-begin
-
- if not (GikoSys.Setting.BrowserTabVisible) and (Item <> nil) then
- if (TObject( Item.Data ) is TThreadItem) then begin
- SelectTimer.Interval := GikoSys.Setting.SelectInterval;
- end else
- SelectTimer.Interval := 0
- else
- SelectTimer.Interval := 0;
-
-end;
-
-procedure TGikoForm.SelectTimerTimer(Sender: TObject);
-begin
- if not (ListView.Selected = nil) then
- if( FActiveContent = nil) or
- (GetActiveContent <> TThreadItem(ListView.Selected.Data) ) then begin
- SelectTimer.Interval := 0;
- ListClick;
- end;
-end;
-
-procedure TGikoForm.SelectItemSaveForDatExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
-begin
- List := TList.Create;
- try
- Screen.Cursor := crHourGlass;
- SelectListItem(List);
- if ((GikoSys.Setting.ListOrientation = gloVertical) and
- (GikoSys.Setting.ListHeightState = glsMax)) or
- ((GikoSys.Setting.ListOrientation = gloHorizontal) and
- (GikoSys.Setting.ListWidthState = glsMax)) then
- ShowMessage('\83X\83\8c\83b\83h\88ê\97\97\82ð\95\\8e¦\82µ\82Ä\82\82¾\82³\82¢')
- else if(List.Count = 0) then
- ShowMessage('\83X\83\8c\83b\83h\82ð\91I\91ð\82µ\82Ä\82\82¾\82³\82¢')
- else begin
- FileSaveAs1.Dialog.Title := '\91I\91ð\83X\83\8c\83b\83h\82ðdat\82Ì\82Ü\82Ü\95Û\91¶';
- FileSaveAs1.Dialog.Filter := 'DAT\83t\83@\83C\83\8b(*.dat)|*.dat';
- for i := 0 to List.Count - 1 do begin
- if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
- FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).FileName;
- if FileSaveAs1.Execute then begin
- //\82È\82º\82©\83L\83\83\83\93\83Z\83\8b\82Å\82à\82±\82Á\82¿\82É\93ü\82Á\82Ä\82\82é
- if ExtractFilePath(FileSaveAs1.Dialog.FileName) <> '' then begin
- CopyFile(PChar(TThreadItem(List[i]).FilePath),
- PChar(FileSaveAs1.Dialog.FileName), true);
- end;
- end;
- end;
- end;
- end;
- finally
- Screen.Cursor := crDefault;
- List.Free;
- end;
-
-end;
-
-procedure TGikoForm.SelectItemSaveForHTMLExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
- html: TStringList;
- title: string;
-begin
- List := TList.Create;
- try
- Screen.Cursor := crHourGlass;
- SelectListItem(List);
- if ((GikoSys.Setting.ListOrientation = gloVertical) and
- (GikoSys.Setting.ListHeightState = glsMax)) or
- ((GikoSys.Setting.ListOrientation = gloHorizontal) and
- (GikoSys.Setting.ListWidthState = glsMax)) then
- ShowMessage('\83X\83\8c\83b\83h\88ê\97\97\82ð\95\\8e¦\82µ\82Ä\82\82¾\82³\82¢')
- else if(List.Count = 0) then
- ShowMessage('\83X\83\8c\83b\83h\82ð\91I\91ð\82µ\82Ä\82\82¾\82³\82¢')
- else begin
- FileSaveAs1.Dialog.Title := '\91I\91ð\83X\83\8c\83b\83h\82ðHTML\89»\82µ\82Ä\95Û\91¶';
- FileSaveAs1.Dialog.Filter := 'HTML\83t\83@\83C\83\8b(*.html)|*.html';
- for i := 0 to List.Count - 1 do begin
- if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
- FileSaveAs1.Dialog.FileName := ReplaseNoValidateChar(TThreadItem(List[i]).Title) + '.html';
- if FileSaveAs1.Execute then begin
- //\82È\82º\82©\83L\83\83\83\93\83Z\83\8b\82Å\82à\82±\82Á\82¿\82É\93ü\82Á\82Ä\82\82é
- if ExtractFilePath(FileSaveAs1.Dialog.FileName) <> '' then begin
- html := TStringList.Create;
- title := TThreadItem(List[i]).Title;
- try
- GikoSys.CreateHTML3(html, TThreadItem(List[i]), title);
- html.SaveToFile(FileSaveAs1.Dialog.FileName);
- SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName));
- finally
- html.Free;
- end;
- end;
- end;
- end;
- end;
- end;
- finally
- Screen.Cursor := crDefault;
- List.Free;
- end;
-end;
-procedure TGikoForm.SkinorCSSFilesCopy(path: string);
-var
- tmp, tmpD, tmpF: string;
- current: string;
- dirs: TStringList;
- files: TStringList;
- i, j: Integer;
-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;
- 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;
- end;
- finally
- dirs.Free;
- end;
-
-
-end;
-procedure TGikoForm.KidokuActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
-begin
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TThreadItem then begin
- if (TThreadItem(List[i]).UnRead) then begin
- TThreadItem(List[i]).UnRead := false;
- TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
- end;
- end;
- end;
- if TreeView.Visible then
- TreeView.Refresh;
- if ListView.Visible then
- ListView.Refresh;
- finally
- List.Free;
- end;
-end;
-
-procedure TGikoForm.MidokuActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
-begin
- List := TList.Create;
- try
- SelectListItem(List);
- for i := 0 to List.Count - 1 do begin
- if TObject(List[i]) is TThreadItem then begin
- if (TThreadItem(List[i]).IsLogFile) and (not TThreadItem(List[i]).UnRead) then begin
- TThreadItem(List[i]).UnRead := true;
- TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
- end;
+ 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;
- if TreeView.Visible then
- TreeView.Refresh;
- if ListView.Visible then
- ListView.Refresh;
- finally
- List.Free;
end;
-end;
-procedure TGikoForm.LogFolderOpenActionExecute(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
- List: TList;
+ p : TPoint;
+ e: IHTMLElement;
+ AID: string;
+ stlist : TStringList;
+ i, count, rc : Integer;
+ body : String;
+ limited : boolean;
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;
+ result := true;
+ try
+ if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then
+ FActiveContent.Browser.SetFocus;
try
- SelectListItem(List);
- GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(List[0]).FilePath) + '"');
- 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
- GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(GetActiveList).FilePath) + '"');
- end;
-
+ except
+ end;
end;
-procedure TGikoForm.LogFolderOpenActionUpdate(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
- if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
- LogFolderOpenAction.Enabled := True
- else if GetActiveList is TBoard then
- LogFolderOpenAction.Enabled := True
- else
- LogFolderOpenAction.Enabled := False;
+ SelectTimer.Interval := 0;
+ if not (ListView.Selected = nil) then
+ if( FActiveContent = nil) or
+ (GetActiveContent <> TThreadItem(ListView.Selected.Data) ) then begin
+ ListClick;
+ end;
end;
function TGikoForm.GetTabURLs(AStringList: TStringList) : Boolean;
rec : TBrowserRecord;
i, bound : Integer;
begin
- bound := BrowserTab.Tabs.Count -1;
+ bound := BrowserTab.Tabs.Count -1;
if bound = -1 then begin
Result := False;
Exit; //for\82É\94ò\82Î\82È\82¢\82Å\91\80\8dì\82ð\94²\82¯\82é
- end;
-
- for i := 0 to bound do begin
- rec := TBrowserRecord( BrowserTab.Tabs.Objects[ i ] );
- if( rec <> nil) and (rec.Thread <> nil) then
- AStringList.Add( rec.Thread.URL );
- end;
- Result := True;
-end;
-
-procedure TGikoForm.TabsSaveActionExecute(Sender: TObject);
-begin
+ end;
- if not SaveTabURLs then begin
- if TabsSaveAction.Tag = 0 then
- ShowMessage('\95Û\91¶\82·\82é\83^\83u\82ª\82 \82è\82Ü\82¹\82ñ')
- else if TabsSaveAction.Tag = 1 then
- GikoForm.TabsOpenAction.Tag := -1;
+ for i := 0 to bound do begin
+ try
+ rec := TBrowserRecord( BrowserTab.Tabs.Objects[ i ] );
+ if( rec <> nil) and (rec.Thread <> nil) then
+ AStringList.Add( rec.Thread.URL );
+ except
+ end;
end;
+ Result := True;
end;
function TGikoForm.SaveTabURLs : Boolean;
SaveStringList := TStringList.Create;
try
if GetTabURLs(SaveStringList) then begin
- if FileExists( GikoSys.GetAppDir + Filename) then begin
- if FileExists( GikoSys.GetAppDir + bFilename) then
- DeleteFile(GikoSys.GetAppDir + bFilename);
+ try
+ if FileExists( GikoSys.GetAppDir + Filename) then begin
+ if FileExists( GikoSys.GetAppDir + bFilename) then
+ DeleteFile(GikoSys.GetAppDir + bFilename);
- //\83o\83b\83N\83A\83b\83v\82ð\8dì\82é\81B
- RenameFile(GikoSys.GetAppDir + Filename, GikoSys.GetAppDir + bFilename);
+ //\83o\83b\83N\83A\83b\83v\82ð\8dì\82é\81B
+ RenameFile(GikoSys.GetAppDir + Filename, GikoSys.GetAppDir + bFilename);
+ end;
+ except
end;
SaveStringList.SaveToFile(GikoSys.GetAppDir + Filename);
Result := true;
end;
end;
-procedure TGikoForm.TabsOpenActionExecute(Sender: TObject);
-begin
- if TabsOpenAction.Tag <> -1 then begin
- if not LoadTabURLs then begin
- if TabsOpenAction.Tag = 0 then
- ShowMessage('\95\\8e¦\82·\82é\83^\83u\82ª\82 \82è\82Ü\82¹\82ñ\81B');
- end;
- end;
-end;
-
function TGikoForm.LoadTabURLs : Boolean;
+const
+ TABFILE = 'tab.sav';
var
i, bound : Integer;
item : TThreadItem;
fileName : string;
begin
- fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
+ fileName := ExtractFilePath(Application.ExeName) + TABFILE;
URLs := TStringList.Create();
GikoTab := GikoSys.Setting.BrowserTabAppend;
try
if item <> nil then
InsertBrowserTab( item, false );
end;
+ //\8dÅ\8f\89\82Ì\82P\96\87\82É\90Ý\92è \83A\83h\83\8c\83X\82Ì\90Ý\92è\82Ì\82½\82ß\82Ì\83J\83\89\8cÄ\82Ñ
+ if BrowserTab.Tabs.Count > 0 then begin
+ BrowserTab.OnChange(nil);
+ end;
end else
Result := False;
end else
end;
-procedure TGikoForm.OnlyAHundredResActionExecute(Sender: TObject);
-var
- FilterList : TStringList;
-begin
- if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
- and (FActiveContent.FBrowser.Busy) then Exit;
-
- FResRangeMenuSelect := 100;
- OnlyAHundredResAction.Checked := True;
-
- if GikoSys.ResRange <> 100 then begin
- GikoSys.ResRange := 100;
-
- // \83t\83B\83\8b\83^\95¶\8e\9a\97ñ\82ð\8bó\82É\82·\82é
- FilterList := TStringList.Create;
- try
- GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
- GikoSys.FSelectResFilter.Reverse := False;
- finally
- FilterList.Destroy;
- end;
-
- FSelectResWord := '';
- RepaintAllTabsBrowser();
- end;
-end;
-
-procedure TGikoForm.OnlyKokoResActionExecute(Sender: TObject);
-var
- FilterList : TStringList;
-begin
- if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
- and (FActiveContent.FBrowser.Busy) then Exit;
-
- FResRangeMenuSelect := Ord( grrKoko );
- OnlyKokoResAction.Checked := True;
-
- if GikoSys.ResRange <> Ord( grrKoko ) then begin
- GikoSys.ResRange := Ord( grrKoko );
-
- // \83t\83B\83\8b\83^\95¶\8e\9a\97ñ\82ð\8bó\82É\82·\82é
- FilterList := TStringList.Create;
- try
- GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
- GikoSys.FSelectResFilter.Reverse := False;
- finally
- FilterList.Destroy;
- end;
-
- FSelectResWord := '';
- RepaintAllTabsBrowser();
- end;
-end;
-
-procedure TGikoForm.OnlyNewResActionExecute(Sender: TObject);
-var
- FilterList : TStringList;
-begin
- if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
- and (FActiveContent.FBrowser.Busy) then Exit;
-
- FResRangeMenuSelect := Ord( grrNew );
- OnlyNewResAction.Checked := True;
-
- if GikoSys.ResRange <> Ord( grrNew ) then begin
- GikoSys.ResRange := Ord( grrNew );
-
- // \83t\83B\83\8b\83^\95¶\8e\9a\97ñ\82ð\8bó\82É\82·\82é
- FilterList := TStringList.Create;
- try
- GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
- GikoSys.FSelectResFilter.Reverse := False;
- finally
- FilterList.Destroy;
- end;
-
- FSelectResWord := '';
- RepaintAllTabsBrowser();
- end;
-end;
-
-procedure TGikoForm.BrowsBoradHeadActionExecute(Sender: TObject);
-var
- RefURL, URL : string;
- List : TList;
-begin
- RefURL := '';
- if GetActiveList is TCategory then begin
- List := TList.Create;
- try
- SelectListItem(List);
- RefURL := TBoard(List[0]).URL;
- finally
- List.Free;
- end;
- end else if GetActiveList is TBoard then begin
- RefURL := TBoard(GetActiveList).URL
- end;
- if RefURL <> '' then begin
- if RefURL[Length(RefURL)] <> '/' then
- URL := RefURL + '/' + 'head.txt'
- else
- URL := RefURL + 'head.txt';
-
- MoveToURL(URL);
- end else begin
- ShowMessage('\94Â\82ð\93Á\92è\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½\81B');
- end;
-
-end;
-
-procedure TGikoForm.BrowsBoradHeadActionUpdate(Sender: TObject);
-begin
- if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
- BrowsBoradHeadAction.Enabled := True
- else if GetActiveList is TBoard then
- BrowsBoradHeadAction.Enabled := True
- else
- BrowsBoradHeadAction.Enabled := False;
-
-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.ThreadRangeActionUpdate(Sender: TObject);
-begin
- ThreadRangeAction.Enabled := (GetActiveList is TBoard);
-end;
-
-procedure TGikoForm.ThreadRangeActionExecute(Sender: TObject);
-begin
- case GikoSys.Setting.ThreadRange of
- gtrAll: AllItemAction.Execute;
- gtrLog: LogItemAction.Execute;
- gtrNew: NewItemAction.Execute;
- end;
-end;
-
-procedure TGikoForm.TabAutoSaveActionExecute(Sender: TObject);
-begin
- SaveTabURLs;
-end;
-
-procedure TGikoForm.TabAutoLoadActionExecute(Sender: TObject);
-begin
- LoadTabURLs;
-end;
/// ListView \82Ì\83J\83\89\83\80\95\9d\82¨\82æ\82Ñ\88Ê\92u\82Ì\95Û\91¶
procedure TGikoForm.ActiveListColumnSave;
BoardOrder := TGikoBoardColumnList.Create;
try
for i := 0 to ListView.Columns.Count - 1 do begin
- // \8f\87\8f\98\82Ì\8eæ\93¾
+ // \8f\87\8f\98\82Ì\8eæ\93¾
idx := ListView.Column[ i ].Tag;
id := Ord( GikoSys.Setting.BoardColumnOrder[ idx ] );
BoardOrder.Add( TGikoBoardColumnID( id ) );
BoardOrder.Free;
end;
end;
-
+
end;
procedure TGikoForm.ListViewColumnRightClick(Sender: TObject;
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.JumpToNumOfResActionUpdate(Sender: TObject);
-begin
- JumpToNumOfResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
-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
s: string;
Action: TAction;
ActStr: string;
- Comp : TComponent;
P : TPoint;
begin
- //\83}\83E\83X\88Ê\92u\82Ì\8eæ\93¾
- GetCursorPos(P);
- //\83R\83\93\83|\81[\83l\83\93\83g\96¼\8eæ\93¾
- //\83M\83R\83i\83r\82Ì\83t\83H\81[\83\80\8aO\81A\82à\82µ\82\82Í\81A\83R\83\93\83e\83L\83X\83g\83\81\83j\83\85\81[\8fã\82¾\82Ænil\82ª\95Ô\82é
- Comp := FindDragTarget(P, True);
- if (Comp <> nil) then begin
- s := MouseGesture.GetGestureStr;
- ActStr := '';
- Action := GikoSys.Setting.Gestures.GetGestureAction(s);
- if Action <> nil then
- ActStr := '\81i' + Action.Caption + '\81j';
- s := '\83W\83F\83X\83`\83\83\81[: ' + s + ActStr;
- StatusBar.Panels[1].Text := s;
- end;
+ //\83}\83E\83X\88Ê\92u\82Ì\8eæ\93¾
+ GetCursorPos(P);
+ //\83R\83\93\83|\81[\83l\83\93\83g\96¼\8eæ\93¾
+ s := MouseGesture.GetGestureStr;
+ ActStr := '';
+ Action := GikoSys.Setting.Gestures.GetGestureAction(s);
+ if Action <> nil then
+ ActStr := '\81i' + Action.Caption + '\81j';
+ s := '\83W\83F\83X\83`\83\83\81[: ' + s + ActStr;
+ StatusBar.Panels[1].Text := s;
end;
procedure TGikoForm.OnGestureEnd(Sender: TObject);
var
s: string;
Action: TAction;
- Comp : TComponent;
- P : TPoint;
begin
- //\83}\83E\83X\88Ê\92u\82Ì\8eæ\93¾
- GetCursorPos(P);
- //\83R\83\93\83|\81[\83l\83\93\83g\96¼\8eæ\93¾
- //\83M\83R\83i\83r\82Ì\83t\83H\81[\83\80\8aO\81A\82à\82µ\82\82Í\81A\83R\83\93\83e\83L\83X\83g\83\81\83j\83\85\81[\8fã\82¾\82Ænil\82ª\95Ô\82é
- Comp := FindDragTarget(P, True);
- if (Comp <> nil) then begin
- s := MouseGesture.GetGestureStr;
- Action := GikoSys.Setting.Gestures.GetGestureAction(s);
- if Action <> nil then
- Action.Execute;
- StatusBar.Panels[1].Text := '';
- end;
+ s := MouseGesture.GetGestureStr;
+ Action := GikoSys.Setting.Gestures.GetGestureAction(s);
+ if Action <> nil then
+ Action.Execute;
+ StatusBar.Panels[1].Text := '';
end;
procedure TGikoForm.ListViewCustomDrawItem(Sender: TCustomListView;
var
ThreadItem: TThreadItem;
begin
- DefaultDraw := true;
+ DefaultDraw := true;
if TObject(Item.Data) is TThreadItem then begin
ThreadItem := TThreadItem(Item.Data);
if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
ListView.Canvas.Brush.Color := FOddColor;
+ //\91I\91ð\82³\82ê\82Ä\82¢\82é\82¯\82Ç\81A\83t\83H\81[\83J\83X\82ª\82È\82¢\82Æ\81A\83O\83\8c\83C\82É\82È\82é\82Ì\82Å\81A\91¾\8e\9a\82É\95Ï\8dX
+ if (GikoSys.Setting.UnFocusedBold) and
+ (Item.Selected) and (not ListView.Focused) then begin
+ ListView.Canvas.Font.Style := [fsBold];
+ end;
end else begin
ListView.Canvas.Brush.Color := FListViewBackGroundColor;
end;
-// if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
+
if ThreadItem.UnRead then
ListView.Canvas.Font.Style := [fsBold];
end;
procedure TGikoForm.FormActivate(Sender: TObject);
begin
- MouseGesture.UnHook;
if GikoSys.Setting.GestureEnabled then begin
+ GikoSys.Setting.Gestures.ClearGesture;
+ GikoSys.Setting.Gestures.LoadGesture(
+ GikoSys.Setting.GetGestureFileName, GikoDM.GikoFormActionList );
+ MouseGesture.UnHook;
MouseGesture.OnGestureStart := OnGestureStart;
MouseGesture.OnGestureMove := OnGestureMove;
MouseGesture.OnGestureEnd := OnGestureEnd;
MouseGesture.SetHook(Handle);
end else begin
+ //MouseGesture.UnHook;
MouseGesture.OnGestureStart := nil;
MouseGesture.OnGestureMove := nil;
MouseGesture.OnGestureEnd := nil;
GikoSys.Setting.ListCoolSet[ affectedBand.ID ] := coolSet;
end;
end else if CoolBar = BrowserCoolBar then begin
- coolSet := GikoSYs.Setting.BrowserCoolSet[ band.ID ];
+ coolSet := GikoSys.Setting.BrowserCoolSet[ band.ID ];
coolSet.FCoolWidth := toolbar.Width + 25;
GikoSys.Setting.BrowserCoolSet[ band.ID ] := coolSet;
if affectedBand <> nil then begin
begin
CoolBarResized( Sender, MainCoolBar );
end;
-
-procedure TGikoForm.ListToolBarResize(Sender: TObject);
-begin
- CoolBarResized( Sender, ListCoolBar );
-end;
-
-procedure TGikoForm.BrowserToolBarResize(Sender: TObject);
-begin
- 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;
-
-procedure TGikoForm.RightTabCloseActionUpdate(Sender: TObject);
-begin
- RightTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 1);
-end;
-
-procedure TGikoForm.LeftTabCloseActionExecute(Sender: TObject);
-var
- i: Integer;
- idx: Integer;
-begin
- idx := BrowserTab.TabIndex;
- if idx = -1 then Exit;
- BrowserTab.Tabs.BeginUpdate;
- if idx > 0 then begin
- for i := idx - 1 downto 0 do begin
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
- BrowserTab.Tabs.Delete(i);
- end;
- end;
- BrowserTab.Tabs.EndUpdate;
-end;
-
-procedure TGikoForm.LeftTabCloseActionUpdate(Sender: TObject);
-begin
- LeftTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 1);
-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);
+
+procedure TGikoForm.ListToolBarResize(Sender: TObject);
begin
- IndividualAbon(KokoPopupMenu.Tag, 1);
+ CoolBarResized( Sender, ListCoolBar );
end;
-//\82±\82Ì\83\8c\83X\93§\96¾\82 \82Ú\81`\82ñ
-procedure TGikoForm.IndividualAbon0ActionExecute(Sender: TObject);
+
+procedure TGikoForm.BrowserToolBarResize(Sender: TObject);
begin
- IndividualAbon(KokoPopupMenu.Tag, 0);
+ CoolBarResized( Sender, BrowserCoolBar );
end;
//\82±\82Ì\83\8c\83X\82 \82Ú\81`\82ñ
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;
- i : Integer;
-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
end;
-procedure TGikoForm.MuteActionExecute(Sender: TObject);
+procedure TGikoForm.RepaintAllTabsBrowser();
+var
+ i : Integer;
+ ThreadItem: TThreadItem;
begin
- GikoSys.Setting.Mute := not GikoSys.Setting.Mute;
+ for i := BrowserTab.Tabs.Count - 1 downto 0 do
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
+
+ ThreadItem := GetActiveContent;
+ if ThreadItem <> nil then
+ InsertBrowserTab( ThreadItem, True );
+
end;
-procedure TGikoForm.SortActiveColumnActionExecute(Sender: TObject);
-var
- i : Integer;
+//ListView\82Ì\91I\91ð\8fó\91Ô\82ð\89ð\8f\9c\82·\82é
+procedure TGikoForm.ListViewKeyUp(Sender: TObject; var Key: Word;
+ Shift: TShiftState);
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;
+ //\83u\83\89\83E\83U\83^\83u\96³\82µ\82Å\81A\83L\81[\88Ú\93®\82Å\93Ç\82Ý\94ò\82Î\82µ\82ð\89Â\94\\82É\82·\82é\82½\82ß\82Ì
+ //\96³\8cø\8e\9e\8aÔ\82ÌTimer\82Ì\8f\88\97\9d
+ //\82Æ\82è\82 \82¦\82¸\81A\83^\83C\83}\81[\82ð\92â\8e~\82·\82é\81B
+ SelectTimer.Interval := 0;
+ if not (GikoSys.Setting.BrowserTabVisible) then begin
+ if (GetActiveList is TBoard) then begin
+ //Shift Alt Ctrl\82ª\98b\82³\82ê\82½\82Æ\82«\82Í\81A\95û\8cü\83L\81[\82ð\97£\82µ\82Ä\82¢\82Ä\82à\96³\8e\8b
+ if not ((ssShift in Shift) or (ssAlt in Shift) or (ssCtrl in Shift)) and
+ (( Key = VK_LEFT) or (Key = VK_RIGHT) or
+ (Key = VK_UP) or (Key = VK_DOWN)) then
+ SelectTimer.Interval := GikoSys.Setting.SelectInterval;
end;
end;
end;
-
-procedure TGikoForm.SortNextColumnActionExecute(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
+ 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;
+// *************************************************************************
+//! \83X\83N\83\8a\81[\83\93\8fã\82ÉEditorForm\82ª\82¢\82é\82©
+// *************************************************************************
+function TGikoForm.EditorFormExists(): boolean;
var
- i, id : Integer;
+ 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
- id := i + 1;
- if id > ListView.Columns.Count - 1 then
- id := 0;
- FSortOrder := id = 0;
- ListViewSort( nil, ListView.Column[ id ] );
- break;
+ Result := false;
+ //\83X\83N\83\8a\81[\83\93\8fã\82Ì\91S\82Ä\82Ì\83t\83H\81[\83\80\82©\82ç\81AEditorForm\82ð\92T\82·
+ for i := 0 to Screen.CustomFormCount - 1 do begin
+ if TObject(Screen.CustomForms[i]) is TEditorForm then begin
+ Result := true;
+ Break;
end;
end;
-
end;
-procedure TGikoForm.SortPrevColumnActionExecute(Sender: TObject);
+// *************************************************************************
+//! \83X\83N\83\8a\81[\83\93\8fã\82É\82¢\82é\82·\82×\82Ä\82ÌEditorForm\82©\82ç\96¼\91O\82Ì\97\9a\97ð\82ð\8dí\8f\9c\82·\82é
+// *************************************************************************
+procedure TGikoForm.AllEditroFormNameTextClearClear();
var
- i, id : Integer;
+ 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
- id := i - 1;
- if id < 0 then
- id := ListView.Columns.Count - 1;
- FSortOrder := id = 0;
- ListViewSort( nil, ListView.Column[ id ] );
- break;
- end;
+ 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.RepaintAllTabsBrowser();
+// *************************************************************************
+//! \83X\83N\83\8a\81[\83\93\8fã\82É\82¢\82é\82·\82×\82Ä\82ÌEditorForm\82©\82ç\83\81\81[\83\8b\97\9a\97ð\82ð\8dí\8f\9c\82·\82é
+// *************************************************************************
+procedure TGikoForm.AllEditroFormMailTextClearClear();
var
i : Integer;
- ThreadItem: TThreadItem;
begin
- for i := BrowserTab.Tabs.Count - 1 downto 0 do
- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
-
- ThreadItem := GetActiveContent;
- if ThreadItem <> nil then
- InsertBrowserTab( ThreadItem, True );
-
+ 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.MessageListViewAdvancedCustomDrawItem(
- Sender: TCustomListView; Item: TListItem; State: TCustomDrawState;
- Stage: TCustomDrawStage; var DefaultDraw: Boolean);
+// *************************************************************************
+//! \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
- //if DiffComp then begin
- //if Odd(Item.Index) then Sender.Canvas.Brush.Color := clBlue;
- //DiffComp := False;
-// end;
+ //Action\82Å\90Ý\92è\82·\82é\82Æ\83L\83\83\83v\83V\83\87\83\93\82ª\8fÁ\82¹\82È\82¢\82Ì\82Å\81AOnClick\83C\83x\83\93\83g\82Å\82Ì
+ //\8cÄ\82Ñ\8fo\82µ\82É\82µ\82½\81@by \82à\82¶\82ã
+ if GikoDM.CabinetVisibleAction.Enabled then begin
+ GikoDM.CabinetVisibleAction.Execute;
+ end;
end;
-
-procedure TGikoForm.BeLogInOutActionExecute(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
- GikoSys.Setting.BeLogin := not GikoSys.Setting.BeLogin;
+ if GikoDM.FavoriteArrangeAction.Enabled then begin
+ GikoDM.FavoriteArrangeAction.Execute;
+ end;
end;
-
-procedure TGikoForm.BeLogInOutActionUpdate(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
+ //GikoForm\82ª\83A\83N\83e\83B\83u\82È\82Æ\82«\82¾\82¯\8eó\82¯\8eæ\82é \91¼\82Ì\83t\83H\81[\83\80\82Ì\82ð\89¡\8eæ\82è\82µ\82È\82¢\82½\82ß
+ if Self.Active then begin
+ case Msg.message of
+ //\83L\81[\93ü\97Í\82·\82×\82Ä
+ WM_KEYFIRST..WM_KEYLAST :
+ begin
+ //\83L\81[\83A\83b\83v\82Í\96³\8e\8b\82·\82é\81@KeyDown\82Æ\8d\87\82í\82¹\82Ä\82Q\89ñ\8cÄ\82Î\82ê\82é\82©\82ç
+ if (Msg.message <> WM_KEYUP) and (Msg.message <> WM_CHAR) then begin
+ wmMsg.Msg := Msg.message;
+ wmMsg.CharCode := Word(Msg.wParam);
+ wmMsg.KeyData := Msg.lParam;
+ //\83t\83H\81[\83\80\82Ì\83V\83\87\81[\83g\83J\83b\83g\82Ì\8f\88\97\9d\82É\93]\91\97
+ Self.OnShortCut(wmMsg, Handled);
+ end;
+ end;
+ end;
+ end;
+end;
+// *************************************************************************
+//! \83A\83v\83\8a\83P\81[\83V\83\87\83\93\82ª\83A\83N\83e\83B\83u\82Å\82È\82\82È\82Á\82½\82Æ\82«\82Ì\83C\83x\83\93\83g
+// *************************************************************************
+procedure TGikoForm.GikoApplicationEventsDeactivate(Sender: TObject);
begin
- 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;
+ 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;
-//\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;
+// *************************************************************************
+//! \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
- wkInt: Integer;
+ s : String;
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;
+ if (Sender <> nil) then begin
+ s := ' [' + Sender.ClassName + ']' + #13#10;
+ end else begin
+ s := ' [ Sender is nil ] ' + #13#10;
+ end;
+ 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;
initialization
OleInitialize(nil);