procedure SortActiveColumnActionExecute(Sender: TObject);
procedure SortNextColumnActionExecute(Sender: TObject);
procedure SortPrevColumnActionExecute(Sender: TObject);
- procedure MessageListViewAdvancedCustomDrawItem(
- Sender: TCustomListView; Item: TListItem; State: TCustomDrawState;
- Stage: TCustomDrawStage; var DefaultDraw: Boolean);
procedure BeLogInOutActionExecute(Sender: TObject);
procedure BeLogInOutActionUpdate(Sender: TObject);
procedure UnSelectedListViewActionExecute(Sender: TObject);
{ Private \90é\8c¾ }
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
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©
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 SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
procedure SetSelectRoundName(Sender: TObject);
function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
-
procedure SetMenuFont;
procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
function OnDocumentContextMenu(Sender: TObject): WordBool;
- procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
procedure ShowTextPopup;
procedure SetLinkBar;
function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
/// \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 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 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;
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure WndProc(var Message: TMessage); override;
LastRoundTime: TDateTime;
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);
//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
+ //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
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_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
+ //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
SELECTTIME_INTERBAL = 110;
BROWSER_COUNT = 5; //\83u\83\89\83E\83U\82Ì\90\94
+
+ URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
+ URL_MONAZILLA: string = 'http://www.monazilla.org/';
+ URL_2ch: string = 'http://www.2ch.net/';
+ URL_Wiki: string = 'http://gikowiki.dyndns.info/index.php?FAQ';
+
{$R *.DFM}
procedure TGikoForm.CreateParams(var Params: TCreateParams);
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;
except
end;
- {
- try
- for i := Length( BoardPlugIns ) - 1 downto 0 do begin
- if BoardPlugIns[ i ] <> nil then
- BoardPlugIns[ i ].Free;
- BoardPlugIns[ i ] := nil;
- end;
- except
- end;
- }
try
if FEvent <> nil then
FEvent.Free;
ActiveFileName: string;
e: IHTMLElement;
Ext: string;
-// buf, buf2: string;
PathRec: TPathRec;
begin
if not( TObject(Sender) is TWebBrowser )then
wkIntTo := StrToInt(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(Text, threadItem.URL);
PathRec := Gikosys.Parse2chURL2(URL);
if (PathRec.FNoParam) then begin
PathRec.FSt := 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;
begin
- idx := ActiveListTrueColumn( Column ).Tag;
+ idx := TListViewUtils.ActiveListTrueColumn( Column ).Tag;
if TObject( FActiveList ) is TBBS then
orderList := GikoSys.Setting.BBSColumnOrder
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;
//Action\82Å\8b¤\92Ê
procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
- TAction(Sender).Enabled := True
- else if GetActiveList is TBoard then
- TAction(Sender).Enabled := True
- else
- TAction(Sender).Enabled := False;
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
+ if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
+ TAction(Sender).Enabled := True
+ else if GetActiveList is TBoard then
+ TAction(Sender).Enabled := True
+ else
+ TAction(Sender).Enabled := False;
end;
//ActiveList\82ªTBoard\82Å\83X\83\8c\88ê\97\97\82Å\82P\82Â\88È\8fã\91I\91ð\82µ\82Ä\82¢\82é\82Æ\97L\8cø\82É\82È\82éAction\82Å\8b¤\92Ê
procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
+ TAction(Sender).Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
end;
procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
//\83u\83\89\83E\83U\83^\83u\82ª\82P\82Â\88È\8fã\82Å\97L\8cø\82É\82È\82éAction\82Å\8b¤\92Ê\89»
procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0);
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
+ TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0);
end;
procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
//ActiveList\82ªTBoard\82©TCategory\82Å\83X\83\8c\88ê\97\97\82Å\82P\82Â\88È\8fã\91I\91ð\82µ\82Ä\82¢\82é\82Æ\97L\8cø\82É\82È\82éActionde\8b¤\92Ê
procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
- TAction(Sender).Enabled := True
- else
- TAction(Sender).Enabled := False;
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
-
+ if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
+ TAction(Sender).Enabled := True
+ else
+ TAction(Sender).Enabled := False;
end;
procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
//\83u\83\89\83E\83U\83^\83u\82ª\82P\82Â\88È\8fã\82Å\8d¶\92[\82Å\82È\82¢Action\82Å\8b¤\92Ê
procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> 0);
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
+ TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> 0);
end;
//\83u\83\89\83E\83U\83^\83u\82ª\82P\82Â\88È\8fã\82Å\89E\92[\82Å\82È\82¢Action\82Å\8b¤\92Ê
procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1);
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
+ TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1);
end;
procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
if ThreadItem <> nil then begin
Num := StrToInt(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
- if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
- //===== \83v\83\89\83O\83C\83\93\82É\82æ\82é\95\\8e¦
- //boardPlugIn := ThreadItem.BoardPlugIn;
- boardPlugIn := ThreadItem.ParentBoard.BoardPlugIn;
-
- // \83t\83H\83\93\83g\82â\83T\83C\83Y\82Ì\90Ý\92è
- // \95¶\8e\9a\83R\81[\83h\82Í\83v\83\89\83O\83C\83\93\82É\94C\82¹\82é
- for i := StNum to ToNum do begin
- Line := i;
- //\82±\82±\82Å\82Q\82¿\82á\82ñ\82Ë\82é\82Ìdat\82Ì\8c`\8e®\82Å\82P\8ds\93Ç\82Ý\8d\9e\82ß\82ê\82Î¥¥¥\81B\81«\93Ç\82ß\82é\82æ\82¤\82É\82È\82Á\82½
- tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
- if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
- Res := DivideStrLine(tmp);
- if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
- Header := IntToStr(Line) + ' \96¼\91O\81F ' + Res.FName + ' \93\8a\8de\93ú\81F ' + Res.FDateTime
- else
- Header := IntToStr(Line) + ' \96¼\91O\81F ' + Res.FName + ' [' + res.FMailTo + '] \93\8a\8de\93ú\81F ' + Res.FDateTime;
- Header := DeleteFontTag(Header);
- Header := CustomStringReplace(Header, '<br>', '',true);
-
- Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
- Body := CustomStringReplace(Body, '<br>', #10,true);
- Body := CustomStringReplace(Body, '</a>', '',true);
- Body := GikoSys.DeleteLink(Body);
- Body := CustomStringReplace(Body, '<', '<');
- Body := CustomStringReplace(Body, '>', '>');
- Body := CustomStringReplace(Body, '"', '"');
- Body := CustomStringReplace(Body, '&', '&');
- Body := CustomStringReplace(Body, ' ', ' ');
-
- FHint.Add(Header, Body);
- //FHint.Title := '';
- end;
- end;
- end else begin
- for i := StNum to ToNum do begin
- Line := i;
- FileName := ThreadItem.FilePath;
- tmp := GikoSys.ReadThreadFile(FileName, Line);
- if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
- Res := DivideStrLine(tmp);
- if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
- Header := IntToStr(Line) + ' \96¼\91O\81F ' + Res.FName + ' \93\8a\8de\93ú\81F ' + Res.FDateTime
- else
- Header := IntToStr(Line) + ' \96¼\91O\81F ' + Res.FName + ' [' + res.FMailTo + '] \93\8a\8de\93ú\81F ' + Res.FDateTime;
-
- Body := DeleteFontTag(Res.FBody);
- Body := CustomStringReplace(Body, '<br> ', #10,true);
- Body := CustomStringReplace(Body, '<br>', #10,true);
- Body := CustomStringReplace(Body, '</a>', '',true);
- Body := GikoSys.DeleteLink(Body);
- Body := CustomStringReplace(Body, '<', '<');
- Body := CustomStringReplace(Body, '>', '>');
- Body := CustomStringReplace(Body, '"', '"');
- Body := CustomStringReplace(Body, '&', '&');
- Body := CustomStringReplace(Body, ' ', ' ');
- FHint.Add(Header, Body);
- //FHint.Title := ''; //\82½\82Ô\82ñ\82±\82ê\82Í\82¢\82ç\82È\82¢\82ñ\82¾\82¯\82Ç\82Ë\81B\82à\82¶\82ã \82â\82Á\82Ï\82è\82¢\82ç\82È\82©\82Á\82½\81i2004/01/13\81j
- end;
- end;
- end;
- end;
- finally
- end;
-end;
-
procedure TGikoForm.ShowTextPopup;
var
p: TPoint;
SenderNode := FDropSpaceNode;
if Source = FavoriteTreeView then begin
-
SourceNode := FavoriteTreeView.Selected;
FavoriteMoveTo( SenderNode, SourceNode );
-
end else if Source is TLinkToolButton then begin
-
LinkToolButton := TLinkToolButton( Source );
- //ShowMessage(LinkToolButton.Text);
SourceNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
FavoriteMoveTo( SenderNode, SourceNode );
-
end else if Source = BrowserTab then begin
-
idx := BrowserTab.TabIndex;
FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
end else if Source = ListView then begin
-
FavoriteAddTo( SenderNode, ListView.Selected.Data );
-
end else if Source = TreeView then begin
-
FavoriteAddTo( SenderNode, TreeView.Selected.Data );
-
end;
-
-
-
end;
procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
FavoriteTreeDeletePopupMenu.Visible := False;
FavoriteTreeRenamePopupMenu.Visible := False;
FavoriteTreeNewFolderPopupMenu.Visible := False;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
FavoriteTreeURLCopyPopupMenu.Visible := False;
FavoriteTreeNameCopyPopupMenu.Visible := False;
FavoriteTreeNameURLCopyPopupMenu.Visible := False;
FavoriteTreeDeletePopupMenu.Visible := False;
FavoriteTreeRenamePopupMenu.Visible := False;
FavoriteTreeNewFolderPopupMenu.Visible := True;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
FavoriteTreeURLCopyPopupMenu.Visible := False;
FavoriteTreeNameCopyPopupMenu.Visible := True;
FavoriteTreeNameURLCopyPopupMenu.Visible := False;
FavoriteTreeDeletePopupMenu.Visible := True;
FavoriteTreeRenamePopupMenu.Visible := False;
FavoriteTreeNewFolderPopupMenu.Visible := True;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
FavoriteTreeURLCopyPopupMenu.Visible := False;
FavoriteTreeNameCopyPopupMenu.Visible := True;
FavoriteTreeNameURLCopyPopupMenu.Visible := False;
FavoriteTreeDeletePopupMenu.Visible := True;
FavoriteTreeRenamePopupMenu.Visible := True;
FavoriteTreeNewFolderPopupMenu.Visible := True;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
FavoriteTreeURLCopyPopupMenu.Visible := False;
FavoriteTreeNameCopyPopupMenu.Visible := True;
FavoriteTreeNameURLCopyPopupMenu.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;
FavoriteTreeDeletePopupMenu.Visible := True;
FavoriteTreeRenamePopupMenu.Visible := True;
FavoriteTreeNewFolderPopupMenu.Visible := True;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
FavoriteTreeURLCopyPopupMenu.Visible := True;
FavoriteTreeNameCopyPopupMenu.Visible := True;
FavoriteTreeNameURLCopyPopupMenu.Visible := True;
FavoriteTreeDeletePopupMenu.Visible := False;
FavoriteTreeRenamePopupMenu.Visible := False;
FavoriteTreeNewFolderPopupMenu.Visible := False;
- //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
- //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
FavoriteTreeURLCopyPopupMenu.Visible := False;
FavoriteTreeNameCopyPopupMenu.Visible := False;
FavoriteTreeNameURLCopyPopupMenu.Visible := False;
procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
Sender: TObject);
begin
-
FavoriteBrowseFolder( FClickNode );
- //BrowserTab.OnChange(nil);
-
end;
procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
begin
-
SelectTreeNode( GetActiveContent.ParentBoard, True );
-
end;
procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
BrowserTab.TabIndex := idx;
BrowserTab.OnChange(nil);
end;
-
end;
procedure TGikoForm.KoreCopyExecute(Sender: TObject);
//\83u\83\89\83E\83U\82ª\82 \82Á\82Ä\81ANULL\83^\83u\97p\82Ì\82È\82¯\82ê\82Î\97L\8cø\82É\82È\82éAction\82Å\8b¤\92Ê
procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
- (FActiveContent.Browser <> BrowserNullTab.Browser) then
- TAction(Sender).Enabled := true
- else
- TAction(Sender).Enabled := false;
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
+ if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
+ (FActiveContent.Browser <> BrowserNullTab.Browser) then
+ TAction(Sender).Enabled := true
+ else
+ TAction(Sender).Enabled := false;
end;
procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);
try
HTMLCreater.CreateHTML3(html, TThreadItem(List[i]), title);
html.SaveToFile(FileSaveAs1.Dialog.FileName);
- SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName));
+ THTMLCreate.SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName));
finally
html.Free;
end;
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;
//\83u\83\89\83E\83U\83^\83u\82ª\82Q\82Â\88È\8fã\82 \82ê\82Î\97L\8cø\82É\82È\82é\83A\83N\83V\83\87\83\93\82Å\8b¤\92Ê\89»
procedure TGikoForm.RightTabCloseActionUpdate(Sender: TObject);
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 1);
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
+ TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 1);
end;
procedure TGikoForm.LeftTabCloseActionExecute(Sender: TObject);
end;
-procedure TGikoForm.MessageListViewAdvancedCustomDrawItem(
- Sender: TCustomListView; Item: TListItem; State: TCustomDrawState;
- Stage: TCustomDrawStage; var DefaultDraw: Boolean);
-begin
- //if DiffComp then begin
- //if Odd(Item.Index) then Sender.Canvas.Brush.Color := clBlue;
- //DiffComp := False;
-// end;
-end;
-
procedure TGikoForm.BeLogInOutActionExecute(Sender: TObject);
begin
GikoSys.Setting.BeLogin := not GikoSys.Setting.BeLogin;
BeLogInOutAction.Enabled := false;
end;
-//\83\8a\83\93\83N\82Ì\95¶\8e\9a\97ñ\82©\82ç\83\8c\83X\83|\83b\83v\83A\83b\83v\97p\82ÌURL\82É\95Ï\8a·\82·\82é
-function TGikoForm.GetRespopupURL(AText, AThreadURL : string): string;
-var
- wkInt: Integer;
-begin
- Result := '';
- if Pos('about:blank..', AText) = 1 then begin
- wkInt := LastDelimiter( '/', AThreadURL );
- if Pos( '?', Copy( AThreadURL, wkInt, MaxInt ) ) = 0 then begin
- // Thread.URL \82Í PATH_INFO \93n\82µ
- Result := Copy( AThreadURL, 1, LastDelimiter( '/', AThreadURL ) );
- wkInt := LastDelimiter( '/', AText );
- if Pos( '?', Copy( AText, wkInt, MaxInt ) ) = 0 then
- // Text \82à PATH_INFO \93n\82µ
- Result := Result + Copy( AText, LastDelimiter( '/', AText ) + 1, MaxInt )
- else
- // Text \82Í QUERY_STRING \93n\82µ
- Result := Result + Copy( AText, LastDelimiter( '?', AText ) + 1, MaxInt );
- end else begin
- // Thread.URL \82Í QUERY_STRING \93n\82µ
- Result := Copy( AThreadURL, 1, LastDelimiter( '?', AThreadURL ) );
- wkInt := LastDelimiter( '/', AText );
- if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then begin
- // Text \82Í PATH_INFO \93n\82µ
- // URL \82É\94Â\82Æ\83L\81[\82ª\91«\82ç\82È\82¢\82Ì\82Å Text \82©\82ç\92¸\91Õ\82·\82é
- wkInt := LastDelimiter( '/', Copy( AText, 1, wkInt - 1 ) );
- wkInt := LastDelimiter( '/', Copy( AText, 1, wkInt - 1 ) );
- Result := Copy( Result, 1, Length( Result ) - 1 ) + Copy( AText, wkInt, MaxInt );
- end else begin
- // Text \82à QUERY_STRING \93n\82µ
- Result := Result + Copy( Text, LastDelimiter( '?', AText ) + 1, MaxInt )
- end;
- end;
- end else if Pos('about:blank/bbs/', AText) = 1 then begin
- //\82µ\82½\82ç\82ÎJBBS\82Ì\8ed\95Ï\82Ì\8bz\8eû
- AText := CustomStringReplace(AText, 'about:blank/bbs/', 'about:blank../../bbs/');
- Result := GetRespopupURL(AText, AThreadURL);
- end else begin
- Result := AText;
- end;
-
-end;
//ListView\82Ì\91I\91ð\8fó\91Ô\82ð\89ð\8f\9c\82·\82é
procedure TGikoForm.UnSelectedListViewActionExecute(Sender: TObject);
begin
//TAction\82ÅGetActiveContent\82ªnil\88È\8aO\82Å\97L\8cø\82É\82È\82é
procedure TGikoForm.DependActiveCntentActionUpdate(Sender: TObject);
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (GetActiveContent <> nil);
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
+ TAction(Sender).Enabled := (GetActiveContent <> nil);
end;
//TAction\82ÅGetActiveContent\82ªnil\88È\8aO\82©\82Â\83\8d\83O\82ð\8e\9d\82Á\82Ä\82¢\82é
procedure TGikoForm.DependActiveCntentLogActionUpdate(Sender: TObject);
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
+ TAction(Sender).Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
end;
//TAction\82ÅActiveList\82ªTBoard\82Å\97L\8cø\82É\82È\82é
procedure TGikoForm.DependActiveListTBoardActionUpdate(Sender: TObject);
begin
-{$IFDEF ACTCHK}
- //\96³\82\82Ä\82à\82¢\82¢IF\95¶\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82\82Ä\82à\81c
- if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
- TAction(Sender).Enabled := (GetActiveList is TBoard);
-{$IFDEF ACTCHK}
- end;
-{$ENDIF}
+ TAction(Sender).Enabled := (GetActiveList is TBoard);
end;
procedure TGikoForm.FavoriteTreeViewEditing(Sender: TObject;
end;
procedure TGikoForm.WikiFAQWebPageActionExecute(Sender: TObject);
-const
- URL_Wiki: string = 'http://gikowiki.dyndns.info/index.php?FAQ';
begin
GikoSys.OpenBrowser(URL_Wiki, gbtAuto);
end;
{HttpApp,} YofUtils, {URLMon,} BoardGroup, {gzip,} {Dolib,}
{bmRegExp,} AbonUnit, MojuUtils, Setting,
ExternalBoardManager, ExternalBoardPlugInMain{,}
- {Sort,} ,GikoBayesian;
+ {Sort,} ,GikoBayesian, HintWindow;
type
THTMLCreate = class(TObject)
// function ConvRes(const Body, Bbs, Key, ParamBBS, ParamKey, ParamStart, ParamTo, ParamNoFirst, ParamTrue, FullURL : string): string; overload;
procedure CreateHTML2(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
procedure CreateHTML3(var html: TStringList; ThreadItem: TThreadItem; var sTitle: string);
+ //\83\8c\83X\83|\83b\83v\83A\83b\83v\82Ì\8dì\90¬
+ procedure SetResPopupText(Hint :TResPopup; threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
+ //\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é
+ class function GetRespopupURL(AText, AThreadURL : string): string;
+ //\8ew\92è\82µ\82½\83p\83X\82É\83X\83L\83\93\82à\82µ\82\82ÍCSS\82Ì\83t\83@\83C\83\8b\82Ì\83R\83s\81[\82ð\8dì\82é
+ class procedure SkinorCSSFilesCopy(path: string);
end;
var
end;
end;
+procedure THTMLCreate.SetResPopupText(Hint : TResPopup; 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
+ Hint.Title := ThreadItem.Title;
+
+ if ThreadItem <> nil then begin
+ //if ThreadItem.IsBoardPlugInAvailable then begin
+ if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
+ //===== \83v\83\89\83O\83C\83\93\82É\82æ\82é\95\\8e¦
+ //boardPlugIn := ThreadItem.BoardPlugIn;
+ boardPlugIn := ThreadItem.ParentBoard.BoardPlugIn;
+
+ // \83t\83H\83\93\83g\82â\83T\83C\83Y\82Ì\90Ý\92è
+ // \95¶\8e\9a\83R\81[\83h\82Í\83v\83\89\83O\83C\83\93\82É\94C\82¹\82é
+ for i := StNum to ToNum do begin
+ Line := i;
+ //\82±\82±\82Å\82Q\82¿\82á\82ñ\82Ë\82é\82Ìdat\82Ì\8c`\8e®\82Å\82P\8ds\93Ç\82Ý\8d\9e\82ß\82ê\82Î¥¥¥\81B\81«\93Ç\82ß\82é\82æ\82¤\82É\82È\82Á\82½
+ tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
+ if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
+ Res := DivideStrLine(tmp);
+ if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
+ Header := IntToStr(Line) + ' \96¼\91O\81F ' + Res.FName + ' \93\8a\8de\93ú\81F ' + Res.FDateTime
+ else
+ Header := IntToStr(Line) + ' \96¼\91O\81F ' + Res.FName + ' [' + res.FMailTo + '] \93\8a\8de\93ú\81F ' + Res.FDateTime;
+ Header := DeleteFontTag(Header);
+ Header := CustomStringReplace(Header, '<br>', '',true);
+
+ Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
+ Body := CustomStringReplace(Body, '<br>', #10,true);
+ Body := CustomStringReplace(Body, '</a>', '',true);
+ Body := GikoSys.DeleteLink(Body);
+ Body := CustomStringReplace(Body, '<', '<');
+ Body := CustomStringReplace(Body, '>', '>');
+ Body := CustomStringReplace(Body, '"', '"');
+ Body := CustomStringReplace(Body, '&', '&');
+ Body := CustomStringReplace(Body, ' ', ' ');
+
+ Hint.Add(Header, Body);
+ end;
+ end;
+ end else begin
+ for i := StNum to ToNum do begin
+ Line := i;
+ FileName := ThreadItem.FilePath;
+ tmp := GikoSys.ReadThreadFile(FileName, Line);
+ if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
+ Res := DivideStrLine(tmp);
+ if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
+ Header := IntToStr(Line) + ' \96¼\91O\81F ' + Res.FName + ' \93\8a\8de\93ú\81F ' + Res.FDateTime
+ else
+ Header := IntToStr(Line) + ' \96¼\91O\81F ' + Res.FName + ' [' + res.FMailTo + '] \93\8a\8de\93ú\81F ' + Res.FDateTime;
+
+ Body := DeleteFontTag(Res.FBody);
+ Body := CustomStringReplace(Body, '<br> ', #10,true);
+ Body := CustomStringReplace(Body, '<br>', #10,true);
+ Body := CustomStringReplace(Body, '</a>', '',true);
+ Body := GikoSys.DeleteLink(Body);
+ Body := CustomStringReplace(Body, '<', '<');
+ Body := CustomStringReplace(Body, '>', '>');
+ Body := CustomStringReplace(Body, '"', '"');
+ Body := CustomStringReplace(Body, '&', '&');
+ Body := CustomStringReplace(Body, ' ', ' ');
+ Hint.Add(Header, Body);
+ end;
+ end;
+ end;
+ end;
+ finally
+ 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é
+class function THTMLCreate.GetRespopupURL(AText, AThreadURL : string): string;
+var
+ wkInt: Integer;
+begin
+ Result := '';
+ if Pos('about:blank..', AText) = 1 then begin
+ wkInt := LastDelimiter( '/', AThreadURL );
+ if Pos( '?', Copy( AThreadURL, wkInt, MaxInt ) ) = 0 then begin
+ // Thread.URL \82Í PATH_INFO \93n\82µ
+ Result := Copy( AThreadURL, 1, LastDelimiter( '/', AThreadURL ) );
+ wkInt := LastDelimiter( '/', AText );
+ if Pos( '?', Copy( AText, wkInt, MaxInt ) ) = 0 then
+ // Text \82à PATH_INFO \93n\82µ
+ Result := Result + Copy( AText, LastDelimiter( '/', AText ) + 1, MaxInt )
+ else
+ // Text \82Í QUERY_STRING \93n\82µ
+ Result := Result + Copy( AText, LastDelimiter( '?', AText ) + 1, MaxInt );
+ end else begin
+ // Thread.URL \82Í QUERY_STRING \93n\82µ
+ Result := Copy( AThreadURL, 1, LastDelimiter( '?', AThreadURL ) );
+ wkInt := LastDelimiter( '/', AText );
+ if Pos( '?', Copy( AText, 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( AText, LastDelimiter( '?', AText ) + 1, MaxInt )
+ end;
+ end;
+ end else if Pos('about:blank/bbs/', AText) = 1 then begin
+ //\82µ\82½\82ç\82ÎJBBS\82Ì\8ed\95Ï\82Ì\8bz\8eû
+ AText := CustomStringReplace(AText, 'about:blank/bbs/', 'about:blank../../bbs/');
+ Result := GetRespopupURL(AText, AThreadURL);
+ end else begin
+ Result := AText;
+ end;
+
+end;
+//\8ew\92è\82µ\82½\83p\83X\82É\83X\83L\83\93\82à\82µ\82\82ÍCSS\82Ì\83t\83@\83C\83\8b\82Ì\83R\83s\81[\82ð\8dì\82é
+class procedure THTMLCreate.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;
+
+
+
initialization
HTMLCreater := THTMLCreate.Create;