OSDN Git Service

GikoFormの整理
authorh677 <h677>
Mon, 14 Nov 2005 16:19:19 +0000 (16:19 +0000)
committerh677 <h677>
Mon, 14 Nov 2005 16:19:19 +0000 (16:19 +0000)
Giko.dfm
Giko.pas
HTMLCreate.pas

index a513b74..d68f4e2 100644 (file)
--- a/Giko.dfm
+++ b/Giko.dfm
@@ -1,6 +1,6 @@
 object GikoForm: TGikoForm
-  Left = 69
-  Top = 85
+  Left = 604
+  Top = 5
   HorzScrollBar.Visible = False
   VertScrollBar.Visible = False
   AutoScroll = False
@@ -810,7 +810,6 @@ object GikoForm: TGikoForm
         SmallImages = MessageImageList
         TabOrder = 1
         ViewStyle = vsReport
-        OnAdvancedCustomDrawItem = MessageListViewAdvancedCustomDrawItem
         OnResize = MessageListViewResize
       end
     end
index 5ca4bb1..9b18eac 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -868,9 +868,6 @@ type
     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);
@@ -883,20 +880,14 @@ type
                { 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
@@ -909,30 +900,20 @@ type
                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©
@@ -950,8 +931,6 @@ type
                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;
@@ -965,7 +944,6 @@ type
                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;
@@ -973,7 +951,6 @@ type
                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;
@@ -1019,7 +996,6 @@ type
                /// \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
@@ -1028,8 +1004,6 @@ type
                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·
@@ -1044,8 +1018,6 @@ type
                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;
@@ -1058,10 +1030,7 @@ type
                 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);
@@ -1182,23 +1151,21 @@ const
        //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
@@ -1227,6 +1194,12 @@ const
        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);
@@ -1922,7 +1895,6 @@ begin
                                GikoSys.Setting.Gengo.Free;
         end;
     }
-       //Application.HookMainWindow(Hook);
        Application.UnhookMainWindow(Hook);
        Application.Terminate;
 end;
@@ -1934,8 +1906,6 @@ var
        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;
@@ -2096,16 +2066,6 @@ begin
        except
        end;
 
-       {
-       try
-               for i := Length( BoardPlugIns ) - 1 downto  0 do begin
-                       if BoardPlugIns[ i ] <> nil then
-                               BoardPlugIns[ i ].Free;
-                       BoardPlugIns[ i ] := nil;
-               end;
-       except
-       end;
-    }
        try
                if FEvent <> nil then
                        FEvent.Free;
@@ -2286,7 +2246,6 @@ var
        ActiveFileName: string;
        e: IHTMLElement;
        Ext: string;
-//     buf, buf2: string;
        PathRec: TPathRec;
 begin
        if not( TObject(Sender) is TWebBrowser )then
@@ -2360,7 +2319,7 @@ begin
                                        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;
@@ -2368,7 +2327,7 @@ begin
                        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;
@@ -2420,13 +2379,11 @@ begin
                                                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;
@@ -2440,22 +2397,17 @@ end;
 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;
@@ -2515,57 +2467,13 @@ begin
        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
@@ -4335,29 +4243,22 @@ begin
 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;
 
@@ -4862,31 +4763,17 @@ 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);
@@ -4929,14 +4816,7 @@ end;
 //\83u\83\89\83E\83U\83^\83u\82ª\82P\82Â\88È\8fã\82Å\97L\8cø\82É\82È\82éAction\82Å\8b¤\92Ê\89»
 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
 begin
-{$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);
@@ -5272,18 +5152,10 @@ end;
 //ActiveList\82ªTBoard\82©TCategory\82Å\83X\83\8c\88ê\97\97\82Å\82P\82Â\88È\8fã\91I\91ð\82µ\82Ä\82¢\82é\82Æ\97L\8cø\82É\82È\82éActionde\8b¤\92Ê
 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
 begin
-{$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);
@@ -6455,26 +6327,12 @@ end;
 //\83u\83\89\83E\83U\83^\83u\82ª\82P\82Â\88È\8fã\82Å\8d\92[\82Å\82È\82¢Action\82Å\8b¤\92Ê
 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
 begin
-{$IFDEF ACTCHK}
-       //\96³\82­\82Ä\82à\82¢\82¢IF\95\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82­\82Ä\82à\81c
-       if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
-               TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> 0);
-{$IFDEF ACTCHK}
-       end;
-{$ENDIF}
+       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);
@@ -7280,7 +7138,7 @@ begin
                        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;
@@ -7292,104 +7150,6 @@ begin
        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, '&lt;', '<');
-                        Body := CustomStringReplace(Body, '&gt;', '>');
-                        Body := CustomStringReplace(Body, '&quot;', '"');
-                        Body := CustomStringReplace(Body, '&amp;', '&');
-                        Body := CustomStringReplace(Body, '&nbsp;', ' ');
-
-                        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, '&lt;', '<');
-                        Body := CustomStringReplace(Body, '&gt;', '>');
-                        Body := CustomStringReplace(Body, '&quot;', '"');
-                        Body := CustomStringReplace(Body, '&amp;', '&');
-                         Body := CustomStringReplace(Body, '&nbsp;', ' ');
-                        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;
@@ -8757,33 +8517,20 @@ begin
                        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,
@@ -8887,8 +8634,6 @@ begin
                FavoriteTreeDeletePopupMenu.Visible := False;
                FavoriteTreeRenamePopupMenu.Visible := False;
                FavoriteTreeNewFolderPopupMenu.Visible := False;
-               //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
-               //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
                FavoriteTreeURLCopyPopupMenu.Visible := False;
                FavoriteTreeNameCopyPopupMenu.Visible := False;
                FavoriteTreeNameURLCopyPopupMenu.Visible := False;
@@ -8899,8 +8644,6 @@ begin
                FavoriteTreeDeletePopupMenu.Visible := False;
                FavoriteTreeRenamePopupMenu.Visible := False;
                FavoriteTreeNewFolderPopupMenu.Visible := True;
-               //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
-               //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
                FavoriteTreeURLCopyPopupMenu.Visible := False;
                FavoriteTreeNameCopyPopupMenu.Visible := True;
                FavoriteTreeNameURLCopyPopupMenu.Visible := False;
@@ -8911,8 +8654,6 @@ begin
                FavoriteTreeDeletePopupMenu.Visible := True;
                FavoriteTreeRenamePopupMenu.Visible := False;
                FavoriteTreeNewFolderPopupMenu.Visible := True;
-               //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
-               //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
                FavoriteTreeURLCopyPopupMenu.Visible := False;
                FavoriteTreeNameCopyPopupMenu.Visible := True;
                FavoriteTreeNameURLCopyPopupMenu.Visible := False;
@@ -8923,8 +8664,6 @@ begin
                FavoriteTreeDeletePopupMenu.Visible := True;
                FavoriteTreeRenamePopupMenu.Visible := True;
                FavoriteTreeNewFolderPopupMenu.Visible := True;
-               //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
-               //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
                FavoriteTreeURLCopyPopupMenu.Visible := False;
                FavoriteTreeNameCopyPopupMenu.Visible := True;
                FavoriteTreeNameURLCopyPopupMenu.Visible := False;
@@ -8935,8 +8674,6 @@ begin
                FavoriteTreeDeletePopupMenu.Visible := True;
                FavoriteTreeRenamePopupMenu.Visible := True;
                FavoriteTreeNewFolderPopupMenu.Visible := True;
-               //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
-               //FavoriteTreeBrowseThreadPopupMenu.Visible := True;
                FavoriteTreeURLCopyPopupMenu.Visible := True;
                FavoriteTreeNameCopyPopupMenu.Visible := True;
                FavoriteTreeNameURLCopyPopupMenu.Visible := True;
@@ -8947,8 +8684,6 @@ begin
                FavoriteTreeDeletePopupMenu.Visible := True;
                FavoriteTreeRenamePopupMenu.Visible := True;
                FavoriteTreeNewFolderPopupMenu.Visible := True;
-               //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
-               //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
                FavoriteTreeURLCopyPopupMenu.Visible := True;
                FavoriteTreeNameCopyPopupMenu.Visible := True;
                FavoriteTreeNameURLCopyPopupMenu.Visible := True;
@@ -8959,8 +8694,6 @@ begin
                FavoriteTreeDeletePopupMenu.Visible := False;
                FavoriteTreeRenamePopupMenu.Visible := False;
                FavoriteTreeNewFolderPopupMenu.Visible := False;
-               //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
-               //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
                FavoriteTreeURLCopyPopupMenu.Visible := False;
                FavoriteTreeNameCopyPopupMenu.Visible := False;
                FavoriteTreeNameURLCopyPopupMenu.Visible := False;
@@ -9077,10 +8810,7 @@ end;
 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
        Sender: TObject);
 begin
-
        FavoriteBrowseFolder( FClickNode );
-       //BrowserTab.OnChange(nil);
-
 end;
 
 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
@@ -9497,9 +9227,7 @@ end;
 
 procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
 begin
-
        SelectTreeNode( GetActiveContent.ParentBoard, True );
-
 end;
 
 procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
@@ -9512,7 +9240,6 @@ begin
                BrowserTab.TabIndex := idx;
                        BrowserTab.OnChange(nil);
                end;
-
 end;
 
 procedure TGikoForm.KoreCopyExecute(Sender: TObject);
@@ -10028,18 +9755,11 @@ end;
 //\83u\83\89\83E\83U\82ª\82 \82Á\82Ä\81ANULL\83^\83u\97p\82Ì\82È\82¯\82ê\82Î\97L\8cø\82É\82È\82éAction\82Å\8b¤\92Ê
 procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);
 begin
-{$IFDEF ACTCHK}
-       //\96³\82­\82Ä\82à\82¢\82¢IF\95\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82­\82Ä\82à\81c
-       if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
-               if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
-                       (FActiveContent.Browser <> BrowserNullTab.Browser) then
-                       TAction(Sender).Enabled := true
-               else
-                       TAction(Sender).Enabled := false;
-{$IFDEF ACTCHK}
-       end;
-{$ENDIF}
+       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);
@@ -10166,7 +9886,7 @@ begin
                                                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;
@@ -10179,65 +9899,6 @@ begin
                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;
@@ -10997,14 +10658,7 @@ end;
 //\83u\83\89\83E\83U\83^\83u\82ª\82Q\82Â\88È\8fã\82 \82ê\82Î\97L\8cø\82É\82È\82é\83A\83N\83V\83\87\83\93\82Å\8b¤\92Ê\89»
 procedure TGikoForm.RightTabCloseActionUpdate(Sender: TObject);
 begin
-{$IFDEF ACTCHK}
-       //\96³\82­\82Ä\82à\82¢\82¢IF\95\81@\83R\81[\83h\82©\82ç\96³\97\9d\82â\82è\8cÄ\82Î\82È\82¢\82È\82ç\83`\83F\83b\83N\82µ\82È\82­\82Ä\82à\81c
-       if (Sender <> nil) and (Sender is TAction) then begin
-{$ENDIF}
-               TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 1);
-{$IFDEF ACTCHK}
-       end;
-{$ENDIF}
+       TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 1);
 end;
 
 procedure TGikoForm.LeftTabCloseActionExecute(Sender: TObject);
@@ -11352,16 +11006,6 @@ begin
 
 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;
@@ -11377,48 +11021,6 @@ begin
                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
@@ -11448,38 +11050,17 @@ end;
 //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;
@@ -11503,8 +11084,6 @@ begin
 end;
 
 procedure TGikoForm.WikiFAQWebPageActionExecute(Sender: TObject);
-const
-       URL_Wiki: string = 'http://gikowiki.dyndns.info/index.php?FAQ';
 begin
        GikoSys.OpenBrowser(URL_Wiki, gbtAuto);
 end;
index c8787a6..e87f768 100644 (file)
@@ -15,7 +15,7 @@ uses
        {HttpApp,} YofUtils, {URLMon,} BoardGroup, {gzip,} {Dolib,}
        {bmRegExp,} AbonUnit,   MojuUtils, Setting,
        ExternalBoardManager, ExternalBoardPlugInMain{,}
-       {Sort,} ,GikoBayesian;
+       {Sort,} ,GikoBayesian, HintWindow;
 
 type
        THTMLCreate = class(TObject)
@@ -46,6 +46,12 @@ type
 //             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
@@ -1218,6 +1224,205 @@ begin
        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, '&lt;', '<');
+                        Body := CustomStringReplace(Body, '&gt;', '>');
+                        Body := CustomStringReplace(Body, '&quot;', '"');
+                        Body := CustomStringReplace(Body, '&amp;', '&');
+                        Body := CustomStringReplace(Body, '&nbsp;', ' ');
+
+                                               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, '&lt;', '<');
+                                               Body := CustomStringReplace(Body, '&gt;', '>');
+                                               Body := CustomStringReplace(Body, '&quot;', '"');
+                                               Body := CustomStringReplace(Body, '&amp;', '&');
+                                                Body := CustomStringReplace(Body, '&nbsp;', ' ');
+                                               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;