X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=Setting.pas;h=0a7ea21ce710d01b30a5346802e9bc75ea1bcfe1;hb=d970b3d0b0bf549b213837b5c85cbb79c2a9ae45;hp=ce342aef3757551c3d6cff69443b3ae7a9fbbcd8;hpb=ec31f4f9b3264b3422588a297caaf448edb5489a;p=gikonavigoeson%2Fgikonavi.git diff --git a/Setting.pas b/Setting.pas index ce342ae..0a7ea21 100644 --- a/Setting.pas +++ b/Setting.pas @@ -1,50 +1,28 @@ unit Setting; + interface uses - SysUtils, Classes, Graphics, Forms, Math, IniFiles, UCryptAuto, UBase64, - ComCtrls, GestureModel; + SysUtils, Classes, Graphics, Forms, {Math, IniFiles, UCryptAuto, UBase64,} + ComCtrls, GestureModel, IniFiles, SkinFiles; const MAIN_COOLBAND_COUNT = 4; //ƒƒCƒ“CoolBand‚̐” LIST_COOLBAND_COUNT = 2; //”ÂCoolBand‚̐” BROWSER_COOLBAND_COUNT = 3; //ƒuƒ‰ƒEƒUCoolBand‚̐” - BOARD_FILE_NAME = 'board.2ch'; - CUSTOMBOARD_FILE_NAME = 'custom.2ch'; - BOARD_DIR_NAME = 'Board'; - KEY_SETTING_FILE_NAME = 'key.ini'; - EKEY_SETTING_FILE_NAME = 'Ekey.ini'; - TEMP_FOLDER = 'Temp'; - OUTBOX_FILE_NAME = 'outbox.ini'; - SENT_FILE_NAME = 'sent.ini'; - CONFIG_DIR_NAME = 'config'; - CSS_DIR_NAME = 'css'; - SKIN_DIR_NAME = 'skin'; - SKIN_HEADER_FILE_NAME = 'Header.html'; - SKIN_FOOTER_FILE_NAME = 'Footer.html'; - SKIN_NEWRES_FILE_NAME = 'NewRes.html'; - SKIN_RES_FILE_NAME = 'Res.html'; - SKIN_BOOKMARK_FILE_NAME = 'Bookmark.html'; - SKIN_NEWMARK_FILE_NAME = 'Newmark.html'; - NGWORDs_DIR_NAME : String = 'NGwords'; - BOARD_PLUGIN_DIR_NAME = 'BoardPlugin'; - SAMBATIME_FILE_NAME : String = 'Samba.ini'; - IGNORE_FILE_NAME : String = 'Ignore.txt'; -// DOLIB_LOGIN_URL = '/~tora3n2c/futen.cgi'; - MAX_POPUP_RES : Integer = 10; - GESTURE_FILE_NAME = 'Gestures.ini'; + type TGikoTabPosition = (gtpTop, gtpBottom); // ƒ^ƒuˆÊ’u - TGikoTabAppend = (gtaFirst, gtpLast); // ƒ^ƒu’ljÁˆÊ’u + TGikoTabAppend = (gtaFirst, gtaLast, gtaRight, gtaLeft); // ƒ^ƒu’ljÁˆÊ’u TGikoTabStyle = (gtsTab, gtsButton, gtsFlat); // ƒ^ƒuƒXƒ^ƒCƒ‹ TGikoListOrientation = (gloHorizontal, gloVertical); // ƒŠƒXƒg‚’¼E…•½ TGikoListState = (glsMax, glsNormal, glsMin); // ƒŠƒXƒgƒTƒCƒYó‘Ô // ƒ|ƒbƒvƒAƒbƒv•\Ž¦ˆÊ’u - TGikoPopupPosition = (gppRightTop, gppTop, gppLeftTop, - gppRight, gppCenter, gppLeft, - gppRightBottom, gppBottom, gppLeftBottom); + TGikoPopupPosition = (gppLeftTop = 0, gppTop, gppRightTop, + gppLeft, gppCenter, gppRight, + gppLeftBottom, gppBottom, gppRightBottom); //ƒvƒŒƒrƒ…[ƒTƒCƒY TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall); TGikoBrowserAutoMaximize = (gbmNone, gbmClick, gbmDoubleClick); @@ -54,7 +32,12 @@ type TGikoResRange = (grrAll, grrSelect, grrKoko, grrNew); /// ƒXƒŒƒbƒhˆê——•\Ž¦”ÍˆÍ - TGikoThreadRange = (gtrAll, gtrSelect, gtrLog, gtrNew); + TGikoThreadRange = (gtrAll, gtrSelect, gtrLog, gtrNew, gtrLive, gtrArch); + + //! ƒXƒpƒ€ƒtƒBƒ‹ƒ^[ƒAƒ‹ƒSƒŠƒYƒ€ + TGikoSpamFilterAlgorithm = ( + gsfaNone, gsfaPaulGraham, gsfaGaryRobinson, gsfaGaryRobinsonFisher); + /// ƒJƒeƒSƒŠƒŠƒXƒg‚̃Jƒ‰ƒ€ ID type TGikoBBSColumnID = (gbbscTitle); @@ -90,15 +73,15 @@ type end; /// ƒXƒŒƒŠƒXƒg‚̃Jƒ‰ƒ€ ID type TGikoBoardColumnID = (gbcTitle, gbcAllCount, gbcLocalCount, gbcNonAcqCount, - gbcNewCount, gbcUnReadCount, gbcRoundName, gbcRoundDate, gbcCreated, gbcLastModified );{gbcLastModified,} + gbcNewCount, gbcUnReadCount, gbcRoundName, gbcRoundDate, gbcCreated, gbcLastModified, gbcVigor );{gbcLastModified,} /// ƒXƒŒƒŠƒXƒg‚̃Jƒ‰ƒ€–¼ - const GikoBoardColumnCaption : array[0..9] of string = + const GikoBoardColumnCaption : array[0..10] of string = ( 'ƒXƒŒƒbƒh–¼', 'ƒJƒEƒ“ƒg', 'Žæ“¾', '–¢Žæ“¾', 'V’…', - '–¢“Ç', '„‰ñ—\–ñ', 'Žæ“¾“úŽž', 'ƒXƒŒì¬“úŽž', 'ÅIXV“úŽž' ); - const GikoBoardColumnAlignment : array[0..9] of TAlignment = ( + '–¢“Ç', '„‰ñ—\–ñ', 'Žæ“¾“úŽž', 'ƒXƒŒì¬“úŽž', 'ÅIXV“úŽž', '¨‚¢' ); + const GikoBoardColumnAlignment : array[0..10] of TAlignment = ( taLeftJustify, taRightJustify, taRightJustify, taRightJustify, taRightJustify, taRightJustify, taLeftJustify, taLeftJustify, - taLeftJustify, taLeftJustify); + taLeftJustify, taLeftJustify, taRightJustify); /// ƒXƒŒƒŠƒXƒgƒJƒ‰ƒ€”z—ñ type TGikoBoardColumnList = class( TList ) private @@ -242,17 +225,17 @@ type FEditWindowHeight: Integer; FEditWindowWidth: Integer; FEditWindowMax: Boolean; - FEditWindowStay: Boolean; - FEditWindowTranslucent: Boolean; + FEditWindowStay: Boolean; + FEditWindowTranslucent: Boolean; //ƒŠƒXƒg”ԍ†•\Ž¦ FListViewNo: Boolean; //CSS•\Ž¦ FUseCSS: Boolean; - //CSSƒtƒ@ƒCƒ‹–¼ - FCSSFileName: string; // ƒXƒLƒ“•\Ž¦(ˆêŽž“I‚È‚à‚Ì‚Å ini ‚É•Û‘¶‚Í‚³‚ê‚È‚¢) FUseSkin: Boolean; + //‚©‚¿‚ã`‚µ‚á—p‚ÌSkin‚ð—˜—p‚·‚é‚© + FUseKatjushaType : Boolean; //mail—“•\Ž¦ FShowMail: Boolean; /// ƒŒƒX•\Ž¦”ÍˆÍ @@ -268,12 +251,13 @@ type //ƒƒOƒtƒHƒ‹ƒ_ FLogFolder: string; + FLogFolderP: string; //ƒpƒX–¼‚ªƒpƒX‹æØ‚è‹L†‚ŏI‚í‚Á‚Ä‚¢‚éB FNewLogFolder: string; //ƒŠƒXƒgƒJƒ‰ƒ€ƒwƒbƒ_[ƒTƒCƒY FBBSColumnWidth: array[0..0] of Integer; FCategoryColumnWidth: array[0..2] of Integer; - FBoardColumnWidth: array[0..9] of Integer; + FBoardColumnWidth: array[0..10] of Integer; /// ƒJƒeƒSƒŠƒŠƒXƒgƒJƒ‰ƒ€‡˜ FBBSColumnOrder : TGikoBBSColumnList; @@ -306,7 +290,7 @@ type FUserID: string; FPassword: string; FAutoLogin: Boolean; - FForcedLogin: Boolean; + FForcedLogin: Boolean; FDolibURL: string; //URLƒNƒŠƒbƒNŽž‹N“®ƒAƒvƒŠ @@ -348,9 +332,9 @@ type //ƒXƒŒƒbƒhˆê——XVƒAƒCƒRƒ“•\Ž¦ FListIconVisible: Boolean; - //ƒXƒŒƒbƒhˆê——‚ÅLog‚Ì‚ ‚éƒXƒŒƒbƒh‚̂݃XƒŒì¬“ú‚ð•\Ž¦‚·‚é‚© - FCreationTimeLogs: Boolean; - //ƒXƒŒƒbƒhˆê——‚̃XƒŒ¶¬“ú‚Å–¢—ˆ‚̃XƒŒ‚̐¶¬“ú‚ð•\Ž¦‚µ‚È‚¢ + //ƒXƒŒƒbƒhˆê——‚ÅLog‚Ì‚ ‚éƒXƒŒƒbƒh‚̂݃XƒŒì¬“ú‚ð•\Ž¦‚·‚é‚© + FCreationTimeLogs: Boolean; + //ƒXƒŒƒbƒhˆê——‚̃XƒŒ¶¬“ú‚Å–¢—ˆ‚̃XƒŒ‚̐¶¬“ú‚ð•\Ž¦‚µ‚È‚¢ FFutureThread: Boolean; //‘‚«ž‚ÝŽžƒ}ƒVƒ“ŽžŠÔŽg—pÝ’è @@ -364,7 +348,8 @@ type FPopUpAbon : Boolean; //ƒŒƒXƒ|ƒbƒvƒAƒbƒvŽž‚Ì‚ ‚ځ`‚ñ—LŒø FShowNGLinesNum : Boolean; //ŠY“–‚µ‚½‚m‚fƒ[ƒhƒtƒ@ƒCƒ‹‚̍s”‚ð•\Ž¦ FAddResAnchor : Boolean; //NGƒŒƒX‚ւ̃ŒƒXƒAƒ“ƒJ[‚ð’ljÁ‚·‚é - FDeleteSyria : Boolean; //ƒVƒŠƒAŒêƒuƒ‰ƒNƒ‰‘΍ô + FDeleteSyria : Boolean; //ƒVƒŠƒAŒêƒuƒ‰ƒNƒ‰‘΍ô + FIgnoreKana : Boolean; //‘S”¼Šp‚ЂçƒJƒi‚̈Ⴂ‚𖳎‹‚·‚é‚© // ƒXƒŒƒbƒhižƒtƒB[ƒ‹ƒh‚Ì• FSelectComboBoxWidth : Integer; @@ -382,16 +367,19 @@ type //Žæ“¾ƒŒƒX”‚ƃXƒŒƒbƒh‚̃ŒƒX”‚ªˆÙ‚È‚Á‚½‚Æ‚«‚ɒʏí”wŒiF‚ƈá‚Á‚½F‚Ì”wŒiF‚ðŽg—p‚·‚é‚© FUseOddColorOddResNum: Boolean; FOddColor: TColor; + //ƒŒƒX”‘Œ¸‹­’²Žž‚ɁA‘I‘ðƒAƒCƒeƒ€‚ɃtƒH[ƒJƒX‚ª–³‚¢‚Æ‚«‚É‘¾Žš‚É‚·‚é‚© + FUnFocusedBold : Boolean; - //Samba24‘΍ô‹@”\‚ðŽg‚¤‚© - FUseSamba: Boolean; + //Samba24‘΍ô‹@”\‚ðŽg‚¤‚© + FUseSamba: Boolean; //ƒŒƒXƒAƒ“ƒJ[‚ðƒNƒŠƒbƒN‚µ‚ăWƒƒƒ“ƒv‚·‚é‚© FResAnchorJamp: Boolean; //TabŽ©“®•Û‘¶ FTabAutoLoadSave : Boolean; - + //ÅŒã‚ÉŠJ‚¢‚Ä‚¢‚½ƒXƒŒƒbƒh‚ÌURL + FLastCloseTabURL: String; //‚É‚¿‚á‚ñŒêˆÄ“àƒTƒ|[ƒg‹@”\ F2chSupport : Boolean; @@ -409,7 +397,71 @@ type FGestures : TGestureModel; //! ƒ}ƒEƒXƒWƒFƒXƒ`ƒƒ[‚ðŽg—p‚·‚é‚©‚Ç‚¤‚© FGestureEnabled : Boolean; - + //! ƒ}ƒEƒXƒWƒFƒXƒ`ƒƒ[‚ðƒRƒ“ƒeƒLƒXƒg“™‚̏ã‚Å–³Œø + FGestureIgnoreContext : Boolean; + //ƒtƒVƒAƒiƒgƒ‰ƒbƒvÝ’è + FLocalTrapAtt : Boolean; + FRemoteTrapAtt : Boolean; + FReadTimeOut: Integer; + + //! Žg—p‚·‚éƒXƒpƒ€ƒtƒBƒ‹ƒ^[ + FSpamFilterAlgorithm : TGikoSpamFilterAlgorithm; + //ƒ~ƒ…[ƒg‚µ‚Ä‚é‚© + FMute: Boolean; + //ƒXƒŒiž‚Ý‚Å–¢Šm’蕶Žš‚à—LŒø‚É‚·‚é‚© + FUseUndecided: Boolean; + + //Be2ch + //”FØ—pƒ†[ƒUIDEƒpƒXƒ[ƒh + FBeUserID: String; + FBeCode: String; + FBeAutoLogin: Boolean; + FBeLogin: Boolean; + //—š—ð‚̍őå•Û‘¶Œ” + FMaxRecordCount : Integer; + + //ƒXƒŒƒbƒhˆê——‚ðƒ_ƒEƒ“ƒ[ƒhŒã‚Ƀ\[ƒg‚·‚é‚© + FAutoSortThreadList : Boolean; + + //InputAssistƒtƒH[ƒ€‚̈ʒu + FInputAssistFormLeft :Integer; + FInputAssistFormTop :Integer; + //InputAssistƒtƒH[ƒ€‚̃TƒCƒY + FInputAssistFormWidth: Integer; + FInputAssistFormHeight: Integer; + + //! Cookie‚É•t‰Á‚·‚éŒÅ’èƒR[ƒh + FFixedCookie: String; + //! ƒŠƒ“ƒNˆÚ“®—š—ð‚Ì•ÛŽ” + FMoveHistorySize : Integer; + //! Å¬‰»‚µ‚½‚Æ‚«‚Ƀ^ƒXƒNƒgƒŒƒC‚ÉŠi”[‚·‚é‚© + FStoredTaskTray : Boolean; + //! ƒ^ƒu‚̈ړ®‚Ń‹[ƒv‚ð‹–‰Â‚·‚é + FLoopBrowserTabs : Boolean; + //! 100ƒŒƒX•\Ž¦‚̐擪•\Ž¦ƒŒƒX” + FHeadResCount : Integer; + //! ŠÖ˜AƒL[ƒ[ƒh’ljÁƒtƒ‰ƒO + FAddKeywordLink: Boolean; + //! dat’uŠ·‚ð—LŒø‚É‚·‚é + FReplaceDat: Boolean; + //! sent.iniƒtƒ@ƒCƒ‹‚̃TƒCƒYi’PˆÊMBj + FSentIniFileSize: Integer; + //! ƒŠƒ“ƒNURLŽæ“¾‚̑Ώۊg’£Žq + FExtList: String; + //! SkinŠÖ˜A + FSkinFiles: TSkinFiles; + //! indexƒtƒ@ƒCƒ‹‚ð“Ç‚ÝŽž‚Édat‚ðŒŸõ‚·‚é + FCheckDatFile: Boolean; + //! “¯IDƒŒƒXƒAƒ“ƒJ[•\Ž¦ + FLimitResCountMessage: Boolean; + //! ƒŒƒXƒ|ƒbƒvƒAƒbƒv•\Ž¦ˆÊ’udeltaX + FRespopupDeltaX: Integer; + //! ƒŒƒXƒ|ƒbƒvƒAƒbƒv•\Ž¦ˆÊ’udeltaY + FRespopupDeltaY: Integer; + //! ƒŒƒXƒ|ƒbƒvƒAƒbƒvƒ^ƒCƒ}[ + FRespopupWait: Integer; + //! ƒ[ƒ‹—“ƒŒƒXƒ|ƒbƒvƒAƒbƒv + FRespopupMailTo: Boolean; function GetMainCoolSet(Index: Integer): TCoolSet; function GetBoardCoolSet(Index: Integer): TCoolSet; function GetBrowserCoolSet(Index: Integer): TCoolSet; @@ -435,6 +487,17 @@ type procedure SetUseCSS( value: Boolean ); procedure SetCSSFileName( fileName: string ); + function GetCSSFileName: string; + //! ƒvƒƒLƒVÝ’è“ǂݍž‚Ý + procedure ReadProxySettings(memIni: TMemIniFile); + //! ŠeŽíƒEƒBƒ“ƒhƒEÝ’è“ǂݍž‚Ý + procedure ReadWindowSettings(memIni: TMemIniFile); + //! “ü—Í—š—ð“ǂݍž‚݁iŒŸõ{ƒ[ƒ‹—“{–¼‘Oj + procedure ReadInputHisotrys(memIni: TMemIniFile); + //! ƒŠƒXƒgƒJƒ‰ƒ€•“ǂݍž‚Ý + procedure ReadListColumnWidth(memIni: TMemIniFile); + //! ƒJƒeƒSƒŠƒŠƒXƒgƒJƒ‰ƒ€‡˜“ǂݍž‚Ý + procedure ReadOrdColumn(memIni: TMemIniFile); protected public @@ -461,12 +524,6 @@ type function GetSentFileName: string; function GetConfigDir: string; function GetSkinDir: string; - function GetSkinHeaderFileName: string; - function GetSkinFooterFileName: string; - function GetSkinResFileName: string; - function GetSkinNewResFileName: string; - function GetSkinBookmarkFileName: string; - function GetSkinNewmarkFileName: string; function GetStyleSheetDir: string; function GetOutBoxFileName: string; function GetNGWordsDir: string; @@ -474,7 +531,19 @@ type function GetSambaFileName: string; function GetIgnoreFileName: string; function GetGestureFileName : string; - + function GetSpamFilterFileName : string; + function GetLanguageFileName: string; + function GetMainKeyFileName: String; + function GetEditorKeyFileName: String; + procedure WriteLogFolder(AVal : String); + function GetInputAssistFileName : String; + function GetReplaceFileName: String; + function GetExtprevieFileName: String; + { + \brief ƒŠƒ“ƒN—š—ð‚Ì•ÛŽƒTƒCƒY‚Ìsetter + \param AVal Ý’è‚·‚éƒTƒCƒY( >0) + } + procedure SetMoveHistorySize(AVal : Integer); //ŽóMƒoƒbƒtƒ@ƒTƒCƒY property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize; //HTTP1.1Žg—p @@ -584,7 +653,8 @@ type property ListViewNo: Boolean read FListViewNo write FListViewNo; property UseCSS: Boolean read FUseCSS write SetUseCSS; - property CSSFileName: string read FCSSFileName write SetCSSFileName; + property CSSFileName: string read GetCSSFileName write SetCSSFileName; + property UseKatjushaType : Boolean read FUseKatjushaType write FUseKatjushaType; property UseSkin: Boolean read FUseSkin; property ShowMail: Boolean read FShowMail write FShowMail; @@ -594,7 +664,8 @@ type property UnActivePopup: Boolean read FUnActivePopup write FUnActivePopup; property ResPopupHeaderBold: Boolean read FResPopupHeaderBold write FResPopupHeaderBold; - property LogFolder: string read FLogFolder write FLogFolder; + property LogFolder: string read FLogFolder write WriteLogFolder; + property LogFolderP: string read FLogFolderP; property NewLogFolder: string read FNewLogFolder write FNewLogFolder; property BBSColumnWidth[index: Integer]: Integer read GetBBSColumnWidth write SetBBSColumnWidth; @@ -669,6 +740,7 @@ type property ShowNGLinesNum : Boolean read FShowNGLinesNum write FShowNGLinesNum; property AddResAnchor : Boolean read FAddResAnchor write FAddResAnchor; property DeleteSyria : Boolean read FDeleteSyria write FDeleteSyria; + property IgnoreKana : Boolean read FIgnoreKana write FIgnoreKana; // ƒXƒŒƒbƒhižƒtƒB[ƒ‹ƒh‚Ì• property SelectComboBoxWidth : Integer read FSelectComboBoxWidth write FSelectComboBoxWidth; @@ -684,8 +756,9 @@ type //Žæ“¾ƒŒƒX”‚ƃXƒŒƒbƒh‚̃ŒƒX”‚ªˆÙ‚È‚Á‚½‚Æ‚«‚ɒʏí”wŒiF‚ƈá‚Á‚½F‚Ì”wŒiF‚ðŽg—p‚·‚é‚© property UseOddColorOddResNum: Boolean read FUseOddColorOddResNum write FUseOddColorOddResNum; property OddColor: TColor read FOddColor write FOddColor; + property UnFocusedBold : Boolean read FUnFocusedBold write FUnFocusedBold; property UseSamba: Boolean read FUseSamba write FUseSamba; - property ResAnchorJamp: Boolean read FResAnchorJamp write FResAnchorJamp; + property ResAnchorJamp: Boolean read FResAnchorJamp write FResAnchorJamp; // ƒGƒfƒBƒ^ property SpaceToNBSP : Boolean read FSpaceToNBSP write FSpaceToNBSP; @@ -694,18 +767,107 @@ type property SelectInterval : Integer read FSelectInterval write FSelectInterval; //Tab•Û‘¶ property TabAutoLoadSave: Boolean read FTabAutoLoadSave write FTabAutoLoadSave; - property GengoSupport : Boolean read F2chSupport write F2chSupport; + //ƒ^ƒu‚Ì•œŒ³‚Æ‚©—p + property LastCloseTabURL: String read FLastCloseTabURL write FLastCloseTabURL; + //property Gengo: TStringList read F2chLanguage write F2chLanguage; + property GengoSupport : Boolean read F2chSupport write F2chSupport; property KuroutSettingTabIndex: Integer read FKuroutSettingTabIndex write FKuroutSettingTabIndex; //! ƒ}ƒEƒXƒWƒFƒXƒ`ƒƒ[ property Gestures : TGestureModel read FGestures write FGestures; //! ƒ}ƒEƒXƒWƒFƒXƒ`ƒƒ[‚ðŽg—p‚·‚é‚©‚Ç‚¤‚© property GestureEnabled : Boolean read FGestureEnabled write FGestureEnabled; + property GestureIgnoreContext : Boolean read FGestureIgnoreContext write FGestureIgnoreContext; + //ƒtƒVƒAƒiƒgƒ‰ƒbƒvÝ’è + property LocalTrapAtt : Boolean read FLocalTrapAtt write FLocalTrapAtt; + property RemoteTrapAtt : Boolean read FRemoteTrapAtt write FRemoteTrapAtt; + property ReadTimeOut: Integer read FReadTimeOut write FReadTimeOut; + //! Žg—p‚·‚éƒXƒpƒ€ƒtƒBƒ‹ƒ^ + property SpamFilterAlgorithm : TGikoSpamFilterAlgorithm + read FSpamFilterAlgorithm write FSpamFilterAlgorithm; + property Mute: Boolean read FMute write FMute; + property UseUndecided: Boolean read FUseUndecided write FUseUndecided; + + property BeUserID: string read FBeUserID write FBeUserID; + property BeCode: string read FBeCode write FBeCode; + property BeAutoLogin: Boolean read FBeAutoLogin write FBeAutoLogin; + property BeLogin: Boolean read FBeLogin write FBeLogin; + property MaxRecordCount : Integer read FMaxRecordCount write FMaxRecordCount; + //! ƒXƒŒƒbƒhˆê——ƒ_ƒEƒ“ƒ[ƒhŒã‚ɃXƒŒƒbƒh–¼‚ŏ¸‡ƒ\[ƒg‚·‚é‚© + property AutoSortThreadList : Boolean read FAutoSortThreadList write FAutoSortThreadList; + //! InputAssistƒtƒH[ƒ€‚̈ʒu + property InputAssistFormLeft :Integer read FInputAssistFormLeft write FInputAssistFormLeft; + property InputAssistFormTop :Integer read FInputAssistFormTop write FInputAssistFormTop; + //! InputAssistƒtƒH[ƒ€‚̃TƒCƒY + property InputAssistFormWidth: Integer read FInputAssistFormWidth write FInputAssistFormWidth; + property InputAssistFormHeight: Integer read FInputAssistFormHeight write FInputAssistFormHeight; + //! Cookie‚É•t‰Á‚·‚éŒÅ’èƒR[ƒh + property FixedCookie: String read FFixedCookie write FFixedCookie; + //! ƒŠƒ“ƒNˆÚ“®—š—ð‚Ì•ÛŽ” + property MoveHistorySize : Integer read FMoveHistorySize write SetMoveHistorySize; + //! Å¬‰»Žž‚Ƀ^ƒXƒNƒgƒŒƒC‚ÉŠi”[‚·‚é‚© + property StoredTaskTray : Boolean read FStoredTaskTray write FStoredTaskTray; + //! ƒuƒ‰ƒEƒUƒ^ƒu‚̃‹[ƒv‚ð‹–‰Â‚·‚é + property LoopBrowserTabs : Boolean read FLoopBrowserTabs write FLoopBrowserTabs; + //! 100ƒŒƒX•\Ž¦‚̐擪•\Ž¦ƒŒƒX” + property HeadResCount : Integer read FHeadResCount write FHeadResCount; + //! ŠÖ˜AƒL[ƒ[ƒh’ljÁƒtƒ‰ƒO + property AddKeywordLink: Boolean read FAddKeywordLink write FAddKeywordLink; + //! dat‚Ì’uŠ·‚ð—LŒø‚É‚·‚é‚© + property ReplaceDat: Boolean read FReplaceDat write FReplaceDat; + //! sent.iniƒtƒ@ƒCƒ‹‚̃TƒCƒYi’PˆÊMBj + property SentIniFileSize: Integer read FSentIniFileSize write FSentIniFileSize; + //! ƒŠƒ“ƒNURLŽæ“¾‚̑Ώۊg’£Žq + property ExtList: String read FExtList write FExtList; + //! Skinƒtƒ@ƒCƒ‹ŠÇ— + property SkinFiles: TSkinFiles read FSkinFiles; + //! ƒCƒ“ƒfƒbƒNƒX“ǂݍž‚ÝŽždatƒtƒ@ƒCƒ‹ƒ`ƒFƒbƒN + property CheckDatFile: Boolean read FCheckDatFile write FCheckDatFile; + property LimitResCountMessage: Boolean read FLimitResCountMessage write FLimitResCountMessage; + //! ƒŒƒXƒ|ƒbƒvƒAƒbƒv•\Ž¦ˆÊ’udeltaX + property RespopupDeltaX: Integer read FRespopupDeltaX write FRespopupDeltaX; + //! ƒŒƒXƒ|ƒbƒvƒAƒbƒv•\Ž¦ˆÊ’udeltaY + property RespopupDeltaY: Integer read FRespopupDeltaY write FRespopupDeltaY; + //! ƒŒƒXƒ|ƒbƒvƒAƒbƒvƒ^ƒCƒ}[ + property RespopupWait: Integer read FRespopupWait write FRespopupWait; + property RespopupMailTo: Boolean read FRespopupMailTo write FRespopupMailTo; end; +const +// MAIN_COOLBAND_COUNT = 4; //ƒƒCƒ“CoolBand‚̐” +// LIST_COOLBAND_COUNT = 2; //”ÂCoolBand‚̐” +// BROWSER_COOLBAND_COUNT = 3; //ƒuƒ‰ƒEƒUCoolBand‚̐” + + BOARD_FILE_NAME = 'board.2ch'; + CUSTOMBOARD_FILE_NAME = 'custom.2ch'; + BOARD_DIR_NAME = 'Board'; + KEY_SETTING_FILE_NAME = 'key.ini'; + EKEY_SETTING_FILE_NAME = 'Ekey.ini'; + TEMP_FOLDER = 'Temp'; + OUTBOX_FILE_NAME = 'outbox.ini'; + SENT_FILE_NAME = 'sent.ini'; + CONFIG_DIR_NAME = 'config'; + CSS_DIR_NAME = 'css'; + SKIN_DIR_NAME = 'skin'; + NGWORDs_DIR_NAME : String = 'NGwords'; + BOARD_PLUGIN_DIR_NAME = 'BoardPlugin'; + SAMBATIME_FILE_NAME : String = 'Samba.ini'; + IGNORE_FILE_NAME : String = 'Ignore.txt'; +// DOLIB_LOGIN_URL = '/~tora3n2c/futen.cgi'; + MAX_POPUP_RES : Integer = 10; + GESTURE_FILE_NAME = 'Gestures.ini'; + SPAMFILTER_FILE_NAME = 'SpamFilter.ini'; + LANGUAGE_FILE_NAME = 'language.ini'; + INPUTASSIST_FILE_NAME = 'InputAssist.ini'; + FIXED_COOKIE = ''; + REPLACE_FILE_NAME = 'replace.ini'; + EXT_PREVIEW_FILE_NAME = 'extpreview.ini'; implementation +uses + Math, UCryptAuto, UBase64, Windows,GikoUtil; + type TSoundName = record Name: string; @@ -722,10 +884,7 @@ const DEFAULT_WINDOW_COLOR: string = 'clWindow'; DEFAULT_TAB_FONT_NAME: string = '‚l‚r ‚oƒSƒVƒbƒN'; DEFAULT_TAB_FONT_SIZE: Integer = 9; - DEFAULT_2CH_BOARD_URL1: string = 'http://www6.ocn.ne.jp/~mirv/2chmenu.html'; - DEFAULT_2CH_BOARD_URL2: string = 'http://www.ff.iij4u.or.jp/~ch2/bbsmenu.html'; - //http://menu.2ch.net/bbsmenu.html //‚à‚¤‚·‚®‚±‚ꂪ³Ž®‚Ȕˆꗗ‚É‚È‚é‚悤 - //'http://www.2ch.net/newbbsmenu.html'; + DEFAULT_2CH_BOARD_URL1: string = 'http://menu.2ch.net/bbsmenu.html'; GIKO_ENCRYPT_TEXT: string = 'gikoNaviEncryptText'; var @@ -824,6 +983,7 @@ begin FCategoryColumnOrder := TGikoCategoryColumnList.Create; FBoardColumnOrder := TGikoBoardColumnList.Create; FGestures := TGestureModel.Create; + FSkinFiles := TSkinFiles.Create; FNameList.Duplicates := dupIgnore; FMailList.Duplicates := dupIgnore; FBoardURLs.Duplicates := dupIgnore; @@ -835,46 +995,39 @@ end; //ƒfƒXƒgƒ‰ƒNƒ^ destructor TSetting.Destroy(); begin + FBoardColumnOrder.Free; + FCategoryColumnOrder.Free; + FBBSColumnOrder.Free; + FSelectTextList.Free; + FBoardURLs.Free; + FMailList.Free; + FNameList.Free; + FGestures.Free; + FSkinFiles.Free; inherited; - FBoardColumnOrder.Free; - FCategoryColumnOrder.Free; - FBBSColumnOrder.Free; - FSelectTextList.Free; - FBoardURLs.Free; - FMailList.Free; - FNameList.Free; - FGestures.Free; end; //‰Šú‰»ƒtƒ@ƒCƒ‹–¼Žæ“¾iƒpƒX{ƒtƒ@ƒCƒ‹–¼j function TSetting.GetFileName(): string; begin - Result := ExtractFilePath(Application.ExeName) + INI_FILE_NAME; + Result := GetAppDir + INI_FILE_NAME; end; //”XV—pURLÝ’èƒtƒ@ƒCƒ‹–¼iƒpƒX{ƒtƒ@ƒCƒ‹–¼j function TSetting.GetBoardURLFileName(): string; begin - Result := ExtractFilePath(Application.ExeName) + BOARD_URL_INI_FILE_NAME; + Result := GetAppDir + BOARD_URL_INI_FILE_NAME; end; //Ý’èƒtƒ@ƒCƒ‹“Ǎž procedure TSetting.ReadSettingFile(); -const - DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140); - DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130); - DEFAULT_BOARD_WIDTH: array[0..9] of Integer = (350, 60, 60, 60, 60, 60, 80, 130, 130, 130); - MAX_WIDTH: Integer = 2000; var ini: TMemIniFile; i: Integer; - id, code : Integer; - wkList: TStringList; - wkStr: string; Exists: Boolean; s: string; -// id: Integer; CoolSet: TCoolSet; + msg: String; begin Exists := FileExists(GetFileName); ini := TMemIniFile.Create(GetFileName); @@ -886,59 +1039,11 @@ begin //ƒvƒƒLƒVÚ‘±HTTP1.1Žg—p FProxyProtocol := ini.ReadBool('HTTP', 'ProxyProtocol', False); - FReadProxy := ini.ReadBool('ReadProxy', 'Proxy', false); - FReadProxyAddress := ini.ReadString('ReadProxy', 'Address', ''); - FReadProxyPort := ini.ReadInteger('ReadProxy', 'Port', 0); - FReadProxyUserID := ini.ReadString('ReadProxy', 'UserID', ''); - FReadProxyPassword := ini.ReadString('ReadProxy', 'Password', ''); - - FWriteProxy := ini.ReadBool('WriteProxy', 'Proxy', false); - FWriteProxyAddress := ini.ReadString('WriteProxy', 'Address', ''); - FWriteProxyPort := ini.ReadInteger('WriteProxy', 'Port', 0); - FWriteProxyUserID := ini.ReadString('WriteProxy', 'UserID', ''); - FWriteProxyPassword := ini.ReadString('WriteProxy', 'Password', ''); - - FBrowserFontName := ini.ReadString('Window', 'BrowserFontName', ''); - FBrowserFontSize := ini.ReadInteger('Window', 'BrowserFontSize', 0); - FBrowserFontBold := ini.ReadInteger('Window', 'BrowserFontBold', 0); - FBrowserFontItalic := ini.ReadInteger('Window', 'BrowserFontItalic', 0); - FBrowserFontColor := ini.ReadInteger('Window', 'BrowserFontColor', -1); - FBrowserBackColor := ini.ReadInteger('Window', 'BrowserBackColor', -1); - - FCabinetFontName := ini.ReadString('Window', 'CabinetFontName', DEFAULT_FONT_NAME); - FCabinetFontSize := ini.ReadInteger('Window', 'CabinetFontSize', DEFAULT_FONT_SIZE); - FCabinetFontBold := ini.ReadBool('Window', 'CabinetFontBold', False); - FCabinetFontItalic := ini.ReadBool('Window', 'CabinetFontItalic', False); - FCabinetFontColor := StringToColor(ini.ReadString('Window', 'CabinetFontColor', DEFAULT_FONT_COLOR)); - FCabinetBackColor := StringToColor(ini.ReadString('Window', 'CabinetBackColor', DEFAULT_WINDOW_COLOR)); - - FListFontName := ini.ReadString('Window', 'ListFontName', DEFAULT_FONT_NAME); - FListFontSize := ini.ReadInteger('Window', 'ListFontSize', DEFAULT_FONT_SIZE); - FListFontBold := ini.ReadBool('Window', 'ListFontBold', False); - FListFontItalic := ini.ReadBool('Window', 'ListFontItalic', False); - FListFontColor := StringToColor(ini.ReadString('Window', 'ListFontColor', DEFAULT_FONT_COLOR)); - FListBackColor := StringToColor(ini.ReadString('Window', 'ListBackColor', DEFAULT_WINDOW_COLOR)); - FUseOddColorOddResNum := ini.ReadBool('Window','UseOddColor', False); - FOddColor := StringToColor(ini.ReadString('Window', 'OddColor', DEFAULT_WINDOW_COLOR)); - - FEditorFontName := ini.ReadString('Window', 'EditorFontName', DEFAULT_FONT_NAME); - FEditorFontSize := ini.ReadInteger('Window', 'EditorFontSize', DEFAULT_FONT_SIZE); - FEditorFontBold := ini.ReadBool('Window', 'EditorFontBold', False); - FEditorFontItalic := ini.ReadBool('Window', 'EditorFontItalic', False); - FEditorFontColor := StringToColor(ini.ReadString('Window', 'EditorFontColor', DEFAULT_FONT_COLOR)); - FEditorBackColor := StringToColor(ini.ReadString('Window', 'EditorBackColor', DEFAULT_WINDOW_COLOR)); - - FBrowserTabFontName := ini.ReadString('Window', 'BrowserTabFontName', DEFAULT_TAB_FONT_NAME); - FBrowserTabFontSize := ini.ReadInteger('Window', 'BrowserTabFontSize', DEFAULT_TAB_FONT_SIZE); - FBrowserTabFontBold := ini.ReadBool('Window', 'BrowserTabFontBold', False); - FBrowserTabFontItalic := ini.ReadBool('Window', 'BrowserTabFontItalic', False); - - FHintFontName := ini.ReadString('Window', 'HintFontName', Screen.HintFont.Name); - FHintFontSize := ini.ReadInteger('Window', 'HintFontSize', Screen.HintFont.Size); - //FHintFontBold := ini.ReadBool('Window', 'HintFontBold', False); - //FHintFontItalic := ini.ReadBool('Window', 'HintFontItalic', False); - FHintFontColor := StringToColor(ini.ReadString('Window', 'HintFontColor', DEFAULT_FONT_COLOR)); - FHintBackColor := StringToColor(ini.ReadString('Window', 'HintBackColor', 'clInfoBk')); + // ƒvƒƒLƒVÝ’è“ǂݍž‚Ý + ReadProxySettings( ini ); + + // ŠeŽíƒEƒBƒ“ƒhƒE‚̐ݒè“ǂݍž‚Ý + ReadWindowSettings( ini ); FWindowTop := ini.ReadInteger('WindowSize', 'Top', -1); FWindowLeft := ini.ReadInteger('WindowSize', 'Left', -1); @@ -995,108 +1100,14 @@ begin // FListHeightMax := ini.ReadBool('List', 'HeightMax', False); // FListWidthMax := ini.ReadBool('List', 'WidthMax', False); - wkList := TStringList.Create; - try - ini.ReadSection('Name', wkList); - for i := 0 to wkList.Count - 1 do begin - wkStr := ini.ReadString('Name', wkList[i], ''); - if (wkStr <> '') and (FNameList.IndexOf(wkStr) = -1) then - FNameList.Add(wkStr); - end; - ini.ReadSection('Mail', wkList); - for i := 0 to wkList.Count - 1 do begin - wkStr := ini.ReadString('Mail', wkList[i], ''); - if (wkStr <> '') and (FMailList.IndexOf(wkStr) = -1) then - FMailList.Add(wkStr); - end; - ini.ReadSection('SelectText', wkList); - for i := 0 to wkList.Count - 1 do begin - wkStr := ini.ReadString('SelectText', wkList[i], ''); - if (wkStr <> '') and (FSelectTextList.IndexOf(wkStr) = -1) then - FSelectTextList.Add(wkStr); - end; - finally - wkList.Free; - end; + // “ü—͍€–Ú‚Ì—š—ð‚ð“ǂݍž‚Þ + ReadInputHisotrys( ini ); // ƒŠƒXƒgƒJƒ‰ƒ€• - wkList := TStringList.Create; - try - ini.ReadSection('BBSColumnWidth', wkList); - if Length(FBBSColumnWidth) <> wkList.Count then begin - ini.EraseSection('BBSColumnWidth'); - end; - for i := 0 to Length(FBBSColumnWidth) - 1 do begin - BBSColumnWidth[i] := ini.ReadInteger('BBSColumnWidth', 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]); - if BBSColumnWidth[i] > MAX_WIDTH then - BBSColumnWidth[i] := DEFAULT_BBS_WIDTH[i]; - end; - ini.ReadSection('CategoryColumnWidth', wkList); - if Length(FCategoryColumnWidth) <> wkList.Count then begin - ini.EraseSection('CategoryColumnWidth'); - end; - for i := 0 to Length(FCategoryColumnWidth) - 1 do begin - CategoryColumnWidth[i] := ini.ReadInteger('CategoryColumnWidth', 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]); - if CategoryColumnWidth[i] > MAX_WIDTH then - CategoryColumnWidth[i] := DEFAULT_CATEGORY_WIDTH[i]; - end; - ini.ReadSection('BoardColumnWidth', wkList); - if Length(FBoardColumnWidth) <> wkList.Count then begin - ini.EraseSection('BoardColumnWidth'); - end; - for i := 0 to Length(FBoardColumnWidth) - 1 do begin - BoardColumnWidth[i] := ini.ReadInteger('BoardColumnWidth', 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]); - if BoardColumnWidth[i] > MAX_WIDTH then - BoardColumnWidth[i] := DEFAULT_BOARD_WIDTH[i]; - end; - finally - wkList.Free; - end; + ReadListColumnWidth( ini ); // ƒJƒeƒSƒŠƒŠƒXƒgƒJƒ‰ƒ€‡˜ - wkList := TStringList.Create; - try - ini.ReadSection( 'BBSColumnOrder', wkList ); - for i := 0 to wkList.Count - 1 do begin - wkStr := ini.ReadString( 'BBSColumnOrder', 'ID' + IntToStr( i ), '' ); - Val( wkStr, id, code ); - if code = 0 then - FBBSColumnOrder.Add( TGikoBBSColumnID( id ) ); - end; - if FBBSColumnOrder.Count = 0 then begin - // Ý’肪–³‚¢‚̂ō쐬 - for i := 0 to Integer( High( TGikoBBSColumnID ) ) do - FBBSColumnOrder.Add( TGikoBBSColumnID( i ) ); - end; - - ini.ReadSection( 'CategoryColumnOrder', wkList ); - for i := 0 to wkList.Count - 1 do begin - wkStr := ini.ReadString( 'CategoryColumnOrder', 'ID' + IntToStr( i ), '' ); - Val( wkStr, id, code ); - if code = 0 then - FCategoryColumnOrder.Add( TGikoCategoryColumnID( id ) ); - end; - if FCategoryColumnOrder.Count = 0 then begin - // Ý’肪–³‚¢‚̂ō쐬 - for i := 0 to Integer( High( TGikoCategoryColumnID ) ) do - FCategoryColumnOrder.Add( TGikoCategoryColumnID( i ) ); - end; - - ini.ReadSection( 'BoardColumnOrder', wkList ); - for i := 0 to wkList.Count - 1 do begin - wkStr := ini.ReadString( 'BoardColumnOrder', 'ID' + IntToStr( i ), '' ); - Val( wkStr, id, code ); - if code = 0 then - FBoardColumnOrder.Add( TGikoBoardColumnID( id ) ); - end; - if FBoardColumnOrder.Count = 0 then begin - // Ý’肪–³‚¢‚̂ō쐬 - for i := 0 to Integer( High( TGikoBoardColumnID ) ) do - FBoardColumnOrder.Add( TGikoBoardColumnID( i ) ); - end; - finally - wkList.Free; - end; + ReadOrdColumn( ini ); //ƒŠƒXƒg”ԍ† FListViewNo := ini.ReadBool('Function', 'ListViewNo', True); @@ -1104,6 +1115,8 @@ begin UseCSS := ini.ReadBool('CSS', 'UseCSS', True); //CSSƒtƒ@ƒCƒ‹–¼ CSSFileName := ini.ReadString('CSS', 'FileName', 'default.css'); + //‚©‚µ‚ã`‚µ‚á‚̃XƒLƒ“‚ðŽg‚¤‚© + FUseKatjushaType := ini.ReadBool('CSS', 'UseKatjushaType', false); //Mail—“•\Ž¦ FShowMail := ini.ReadBool('Thread', 'ShowMail', True); @@ -1113,6 +1126,7 @@ begin else FResRange := ini.ReadInteger( 'Thread', 'ResRange', Ord( grrAll ) ); FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False ); + FHeadResCount := ini.ReadInteger('Thread', 'HeadResCount', 1); // ƒXƒŒƒbƒhˆê——•\Ž¦”ÍˆÍ FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) ); //”ñƒAƒNƒeƒBƒuŽžƒŒƒXƒ|ƒbƒvƒAƒbƒv•\Ž¦ @@ -1130,7 +1144,7 @@ begin //ResAnchorjamp ResAnchorJamp := ini.ReadBool('Function', 'ResAnchoJamp', True); //ƒƒOƒtƒHƒ‹ƒ_ - FLogFolder := ini.ReadString('Folder', 'LogFolder', ExtractFilePath(Application.ExeName) + 'Log'); + LogFolder := ini.ReadString('Folder', 'LogFolder', GetAppDir + 'Log'); NewLogFolder := ''; //”ÂURL @@ -1152,7 +1166,15 @@ begin FOpenMailer := ini.ReadBool('Mailto', 'Open', True); //ƒ|ƒbƒvƒAƒbƒvˆÊ’u - FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppLeftBottom))); + FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppRightTop))); + // ƒoƒ^56ˆÈ‘O‚©‚ç‚̃Aƒbƒvƒf[ƒg‘΍ô + if (FPopupPosition = gppCenter) then begin + FPopupPosition := gppTop; + end; + FRespopupDeltaX := ini.ReadInteger('Browser', 'RespopupDelteX', 5); + FRespopupDeltaY := ini.ReadInteger('Browser', 'RespopupDelteY', 5); + FRespopupWait := ini.ReadInteger('Browser', 'RespopupWait', 1000); + FRespopupMailTo := ini.ReadBool('Browser', 'RespopupMailTo', true); //ƒAƒhƒŒƒXƒo[ FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False); @@ -1181,6 +1203,8 @@ begin FCategorySortOrder := ini.ReadBool('ThreadList', 'CategorySortOrder', True); FBoardSortIndex := ini.ReadInteger('ThreadList', 'BoardSortIndex', 0); FBoardSortOrder := ini.ReadBool('ThreadList', 'BoardSortOrder', True); + // DLŒã‚ÌŽ©“®ƒ\[ƒg + FAutoSortThreadList := ini.ReadBool('ThreadList', 'AutoSort', False); //Dat—Ž‚¿ƒXƒŒƒ\[ƒg‡ FDatOchiSortIndex := ini.ReadInteger('ThreadList', 'DatOchiSortIndex', -1); FDatOchiSortOrder := ini.ReadBool('ThreadList', 'DatOchiSortOrder', False); @@ -1194,11 +1218,19 @@ begin if Exists then begin for i := 0 to GetSoundCount - 1 do begin SoundFileName[i] := ini.ReadString('Sound', SoundName[i], ''); - if not FileExists(SoundFileName[i]) then - SoundFileName[i] := ''; + // ‘Š‘ÎŽQÆ‘΍ô + s := SoundFileName[i]; + if (AnsiPos('.\', SoundFileName[i]) = 1) then begin + s := GetAppDir + + Copy(SoundFileName[i], 2, Length(SoundFileName[i])); + end; + // ƒtƒ@ƒCƒ‹‚Ì‘¶Ýƒ`ƒFƒbƒN + if not FileExists(SoundFileName[i]) then begin + SoundFileName[i] := ''; + end; end; end else begin - s := ExtractFileDir(Application.ExeName) + '\sound\'; + s := GetAppDir + '\sound\'; SoundFileName[0] := s + 'Žæ“¾¬Œ÷.wav'; SoundFileName[1] := s + 'Žæ“¾¬Œ÷(·•ª).wav'; SoundFileName[2] := s + '–¢XV.wav'; @@ -1233,7 +1265,8 @@ begin FPopUpAbon := ini.ReadBool('Abon','Popup',false); FShowNGLinesNum := ini.ReadBool('Abon','ShowNGLines',false); FAddResAnchor := ini.ReadBool('Abon','AddResAnchor',false); - FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false); + FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false); + FIgnoreKana := ini.ReadBool('Abon','IgnoreKana',false); // ƒGƒfƒBƒ^ FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', False ); @@ -1241,11 +1274,66 @@ begin //TabŽ©“®•Û‘¶A“ǂݍž‚Ý FTabAutoLoadSave := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False); - + FLastCloseTabURL := ini.ReadString('Thread', 'LastCloseTabURL', ''); FKuroutSettingTabIndex := ini.ReadInteger('OptionDialog', 'KuroutTabIndex' , 0); // ƒ}ƒEƒXƒWƒFƒXƒ`ƒƒ[ FGestureEnabled := ini.ReadBool( 'Guesture', 'Enabled', False ); + FGestureIgnoreContext := ini.ReadBool( 'Guesture', 'IgnoreContext', False ); + //2chŒ¾ŒêƒTƒ| + F2chSupport := ini.ReadBool('2chSupport', 'Support', False); + + //FusianaTrap + FLocalTrapAtt := ini.ReadBool('Trap', 'LocalTrap', False); + FRemoteTrapAtt := ini.ReadBool('Trap', 'RemoteTrap', False); + FReadTimeOut := ini.ReadInteger('HTTP', 'ReadTimeOut', 10000); + + // Žg—p‚·‚éƒXƒpƒ€ƒtƒBƒ‹ƒ^ + FSpamFilterAlgorithm := TGikoSpamFilterAlgorithm( + ini.ReadInteger( 'Abon', 'SpamFilterAlgorithm', Ord( gsfaNone ) ) ); + FMute := ini.ReadBool('Function', 'Mute', false); + FUseUndecided := ini.ReadBool('ThreadList', 'UseUndecided', False); + + //Be2ch + //”FØ—pƒ†[ƒUIDE”FØƒR[ƒh + FBeUserID := ini.ReadString('Be', 'UserID', ''); + FBeCode := Decrypt(ini.ReadString('Be', 'Code', '')); + FBeAutoLogin := ini.ReadBool('Be', 'AutoLogin', False); + //—š—ð‚̍őå•Û‘¶Œ” + FMaxRecordCount := Max(ini.ReadInteger('Recode', 'Max', 100), 1); + + // “ü—̓AƒVƒXƒg + FInputAssistFormTop := ini.ReadInteger('IAtWindowsSize', 'Top', 0); + FInputAssistFormLeft := ini.ReadInteger('IAtWindowsSize', 'Left', 0); + FInputAssistFormWidth := ini.ReadInteger('IAtWindowsSize', 'Width', 400); + FInputAssistFormHeight := ini.ReadInteger('IAtWindowsSize', 'Height', 460); + + // Cookie‚É•t‰Á‚·‚éŒÅ’èƒR[ƒh + FFixedCookie := ini.ReadString('Cookie', 'fixedString', FIXED_COOKIE); + + // ƒŠƒ“ƒNˆÚ“®—š—ð‚̍őå•ÛŽ” + FMoveHistorySize := ini.ReadInteger('MoveHisotry', 'Max', 20); + + FStoredTaskTray := ini.ReadBool('Function', 'StroedTaskTray', false); + FLoopBrowserTabs := ini.ReadBool('Function', 'LoopBrowserTabs', false); + FAddKeywordLink := ini.ReadBool('Thread', 'AddKeywordLink', false); + if not (ini.ValueExists('Thread', 'ReplaceDat')) then begin + msg := 'ƒZƒLƒ…ƒŠƒeƒBƒ\ƒtƒg‚̌딽‰ž‘΍ô‚ð‚µ‚Ü‚·‚©H'+ #13#10 + + 'i„§:‚Í‚¢j'+ #13#10+'Ú×Ý’è‚©‚ç•ÏX‚Å‚«‚Ü‚·B'; + if MsgBox(Application.Handle, + msg, 'ƒMƒRƒiƒr', MB_YESNO or MB_ICONQUESTION) = IDYES then begin + FReplaceDat := True; + end; + end else begin + FReplaceDat := ini.ReadBool('Thread', 'ReplaceDat', False); + end; + + FSentIniFileSize := ini.ReadInteger('Function', 'SentIniFileSize', 3); + FExtList := ini.ReadString('Function', 'ExtList', '*.gif;*.jpg;*.jpeg;*.png;*.zip;*.rar'); + + FCheckDatFile := ini.ReadBool('ThreadList', 'CheckDatFile', True); + FLimitResCountMessage := ini.ReadBool('Thread', 'LimitResCountMessage', True); + ini.UpdateFile; finally ini.Free; end; @@ -1308,14 +1396,19 @@ begin ini.WriteString('Window', 'CabinetFontName', FCabinetFontName); ini.WriteInteger('Window', 'CabinetFontSize', FCabinetFontSize); ini.WriteString('Window', 'CabinetFontColor', ColorToString(FCabinetFontColor)); + ini.WriteBool('Window', 'CabinetFontBold', FCabinetFontBold); + ini.WriteBool('Window', 'CabinetFontItalic', FCabinetFontItalic); ini.WriteString('Window', 'CabinetBackColor', ColorToString(FCabinetBackColor)); ini.WriteString('Window', 'ListFontName', FListFontName); ini.WriteInteger('Window', 'ListFontSize', FListFontSize); ini.WriteString('Window', 'ListFontColor', ColorToString(FListFontColor)); ini.WriteString('Window', 'ListBackColor', ColorToString(FListBackColor)); - ini.WriteBool('Window','UseOddColor',FUseOddColorOddResNum); - ini.WriteString('Window', 'OddColor',ColorToString(FOddColor)); + ini.WriteBool('Window', 'ListFontBold', FListFontBold); + ini.WriteBool('Window', 'ListFontItalic', FListFontItalic); + ini.WriteBool('Window','UseOddColor',FUseOddColorOddResNum); + ini.WriteString('Window', 'OddColor',ColorToString(FOddColor)); + ini.WriteBool('Window','UnFocusedBold', FUnFocusedBold); ini.WriteString('Window', 'EditorFontName', FEditorFontName); ini.WriteInteger('Window', 'EditorFontSize', FEditorFontSize); @@ -1366,6 +1459,12 @@ begin ini.WriteInteger('OptionDialog', 'TabIndex', FOptionDialogTabIndex); + // “ü—̓AƒVƒXƒg + ini.WriteInteger('IAtWindowsSize', 'Top', FInputAssistFormTop); + ini.WriteInteger('IAtWindowsSize', 'Left', FInputAssistFormLeft); + ini.WriteInteger('IAtWindowsSize', 'Width', FInputAssistFormWidth); + ini.WriteInteger('IAtWindowsSize', 'Height', FInputAssistFormHeight); + //ƒc[ƒ‹ƒo[ ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible); ini.WriteBool('ToolBar', 'AddressVisible', FAddressBarVisible); @@ -1412,14 +1511,17 @@ begin ini.WriteBool('Function', 'ListViewNo', FListViewNo); //CSSŽg—p ini.WriteBool('CSS', 'UseCSS', FUseCSS); + //‚©‚µ‚ã`‚µ‚á‚̃XƒLƒ“‚ðŽg‚¤‚© + ini.WriteBool('CSS', 'UseKatjushaType', FUseKatjushaType); //CSSƒtƒ@ƒCƒ‹–¼ - ini.WriteString('CSS', 'FileName', FCSSFileName); + ini.WriteString('CSS', 'FileName', FSkinFiles.FileName); //Mail—“•\Ž¦ ini.WriteBool('Thread', 'ShowMail', FShowMail); // ƒŒƒX•\Ž¦”ÍˆÍ ini.DeleteKey( 'Thread', 'OnlyAHundredRes' ); // ŒÃ‚¢Ý’è‚̍폜 ini.WriteInteger('Thread', 'ResRange', FResRange); ini.WriteBool('Thread', 'ResRangeHold', FResRangeHold); + ini.WriteInteger('Thread', 'HeadResCount', FHeadResCount); // ƒXƒŒƒbƒhˆê——•\Ž¦”ÍˆÍ ini.WriteInteger('ThreadList', 'ThreadRange', Ord( FThreadRange )); //ƒƒOíœŠm”F @@ -1455,7 +1557,11 @@ begin //ƒ|ƒbƒvƒAƒbƒvˆÊ’u ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition)); - + ini.WriteInteger('Browser', 'RespopupDelteX', FRespopupDeltaX); + ini.WriteInteger('Browser', 'RespopupDelteY', FRespopupDeltaY); + ini.WriteInteger('Browser', 'RespopupWait', FRespopupWait); + ini.WriteBool('Browser', 'RespopupMailTo', FRespopupMailTo); + //ƒAƒhƒŒƒXƒo[ ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay); ini.WriteBool('AddressBar', 'TabStop', FAddressBarTabStop); @@ -1483,6 +1589,8 @@ begin ini.WriteBool('ThreadList', 'BoardSortOrder', FBoardSortOrder); ini.WriteInteger('ThreadList', 'DatOchiSortIndex', FDatOchiSortIndex); ini.WriteBool('ThreadList', 'DatOchiSortOrder', FDatOchiSortOrder); + // DLŒã‚ÌŽ©“®ƒ\[ƒg + ini.WriteBool('ThreadList', 'AutoSort', FAutoSortThreadList); //‘‚«ž‚ÝŽžƒ}ƒVƒ“ŽžŽg—pÝ’è ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime); @@ -1560,10 +1668,11 @@ begin //‚ ‚ځ`‚ñ ini.WriteBool('Abon','Deleterlo',FAbonDeleterlo); ini.WriteBool('Abon','Replaceul',FAbonReplaceul); - ini.WriteBool('Abon','Popup',FPopUpAbon); + ini.WriteBool('Abon','Popup',FPopUpAbon); ini.WriteBool('Abon','ShowNGLines',FShowNGLinesNum); ini.WriteBool('Abon','AddResAnchor',FAddResAnchor); - ini.WriteBool('Abon','DeleteSyria',FDeleteSyria); + ini.WriteBool('Abon','DeleteSyria',FDeleteSyria); + ini.WriteBool('Abon','IgnoreKana', FIgnoreKana); // ƒGƒfƒBƒ^ ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP ); @@ -1571,16 +1680,48 @@ begin //ƒ^ƒuŽ©“®•Û‘¶ ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave); + ini.WriteString('Thread', 'LastCloseTabURL', FLastCloseTabURL); //Ú×Ý’è ini.WriteInteger('OptionDialog', 'KuroutTabIndex', FKuroutSettingTabIndex); //‚É‚¿‚á‚ñŒêˆÄ“à‹@”\ - ini.WriteBool('2chSupport', 'Support', F2chSupport); + ini.WriteBool('2chSupport', 'Support', F2chSupport); // ƒ}ƒEƒXƒWƒFƒXƒ`ƒƒ[‚ðŽg—p‚·‚é‚©‚Ç‚¤‚© ini.WriteBool( 'Guesture', 'Enabled', FGestureEnabled ); + ini.WriteBool( 'Guesture', 'IgnoreContext', FGestureIgnoreContext ); + //FusianaTrap + ini.WriteBool('Trap', 'LocalTrap', FLocalTrapAtt); + ini.WriteBool('Trap', 'RemoteTrap', FRemoteTrapAtt); + ini.WriteInteger('HTTP', 'ReadTimeOut', FReadTimeOut); - ini.UpdateFile; + // Žg—p‚·‚éƒXƒpƒ€ƒtƒBƒ‹ƒ^ + ini.WriteInteger( 'Abon', 'SpamFilterAlgorithm', Ord( FSpamFilterAlgorithm ) ); + ini.WriteBool('Function', 'Mute', FMute); + ini.WriteBool('ThreadList', 'UseUndecided', FUseUndecided); + + //”FØ—pƒ†[ƒUIDEƒpƒXƒ[ƒh + ini.WriteString('Be', 'UserID', FBeUserID); + ini.WriteString('Be', 'Code', Encrypt(FBeCode)); + ini.WriteBool('Be', 'AutoLogin', FBeAutoLogin); + + //—š—ð‚̍őå•Û‘¶Œ” + ini.WriteInteger('Recode', 'Max', FMaxRecordCount); + // ŒÅ’è‚ÌCookie•¶Žš—ñ + ini.WriteString('Cookie', 'fixedString', FFixedCookie); + + // ƒŠƒ“ƒNˆÚ“®—š—ð‚̍őå•ÛŽ” + ini.WriteInteger('MoveHisotry', 'Max', FMoveHistorySize); + + ini.WriteBool('Function', 'StroedTaskTray', FStoredTaskTray); + ini.WriteBool('Function', 'LoopBrowserTabs', FLoopBrowserTabs); + ini.WriteBool('Thread', 'AddKeywordLink', FAddKeywordLink); + ini.WriteBool('Thread', 'ReplaceDat', FReplaceDat); + ini.WriteInteger('Function', 'SentIniFileSize', FSentIniFileSize); + ini.WriteString('Function', 'ExtList', FExtList); + ini.WriteBool('ThreadList', 'CheckDatFile', FCheckDatFile); + ini.WriteBool('Thread', 'LimitResCountMessage', FLimitResCountMessage); + ini.UpdateFile; finally ini.Free; end; @@ -1624,7 +1765,7 @@ var begin ini := TMemIniFile.Create(GetFileName()); try - if ExtractFilePath(Application.ExeName) + 'Log' = NewLogFolder then + if GetAppDir + 'Log' = NewLogFolder then ini.DeleteKey('Folder', 'LogFolder') else ini.WriteString('Folder', 'LogFolder', NewLogFolder); @@ -1739,6 +1880,11 @@ begin for i := 0 to GetSoundCount - 1 do begin if SoundName[i] = Name then begin Result := SoundFileName[i]; + // ‘Š‘΃pƒX‘΍ô + if (AnsiPos('.\', Result) = 1) then begin + Result := GetAppDir + + Copy(Result, 2, Length(Result)); + end; Exit; end; end; @@ -1848,10 +1994,13 @@ var begin ini := TMemIniFile.Create(GetBoardURLFileName()); try - ini.WriteInteger('URL','count',2); - ini.WriteInteger('URL','selected',2); + //XVURL‚̐” + ini.WriteInteger('URL','count',1); + //ƒfƒtƒHƒ‹ƒg‚ÅŽg—p‚·‚é‚t‚q‚k‚̃Cƒ“ƒfƒbƒNƒX + ini.WriteInteger('URL','selected',1); + //ˆÈ‰º•K—v‚Ȑ”‚¾‚¯AXV‚t‚q‚k‚ð’ljÁ ini.WriteString('URL','1',DEFAULT_2CH_BOARD_URL1); - ini.WriteString('URL','2',DEFAULT_2CH_BOARD_URL2); + //ini.WriteString('URL','2',DEFAULT_2CH_BOARD_URL2); ini.UpdateFile; finally ini.Free; @@ -1863,7 +2012,7 @@ end; *************************************************************************) function TSetting.GetBoardFileName: string; begin - Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_FILE_NAME; + Result := GetConfigDir + BOARD_FILE_NAME; end; (************************************************************************* @@ -1871,15 +2020,15 @@ end; *************************************************************************) function TSetting.GetCustomBoardFileName: string; begin - Result := GetAppDir + CONFIG_DIR_NAME + '\' + CUSTOMBOARD_FILE_NAME; + Result := GetConfigDir + CUSTOMBOARD_FILE_NAME; end; (************************************************************************* - *ƒ{[ƒhƒfƒBƒŒƒNƒgƒŠŽæ“¾ + *ƒ{[ƒhƒfƒBƒŒƒNƒgƒŠŽæ“¾(\‚ŏI‚í‚é) *************************************************************************) function TSetting.GetBoardDir: string; begin - Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_DIR_NAME + '\'; + Result := IncludeTrailingPathDelimiter(GetConfigDir + BOARD_DIR_NAME); end; (************************************************************************* @@ -1892,7 +2041,7 @@ end; (************************************************************************* - *ŽÀsƒtƒ@ƒCƒ‹ƒtƒHƒ‹ƒ_Žæ“¾ + *ŽÀsƒtƒ@ƒCƒ‹ƒtƒHƒ‹ƒ_Žæ“¾(ÅŒã‚É\‚ª‚ ‚é) *************************************************************************) function TSetting.GetAppDir: string; begin @@ -1924,58 +2073,36 @@ begin end; (************************************************************************* - *ConfigƒtƒHƒ‹ƒ_Žæ“¾ + *ConfigƒtƒHƒ‹ƒ_Žæ“¾(\‚ŏI‚í‚é) *************************************************************************) function TSetting.GetConfigDir: string; begin Result := IncludeTrailingPathDelimiter(GetAppDir + CONFIG_DIR_NAME); end; - +(************************************************************************* + *CSSƒtƒHƒ‹ƒ_Žæ“¾(\‚ŏI‚í‚é) + *************************************************************************) function TSetting.GetStyleSheetDir: string; begin Result := IncludeTrailingPathDelimiter(GetConfigDir + CSS_DIR_NAME); end; - +(************************************************************************* + *skinƒtƒHƒ‹ƒ_Žæ“¾(\‚ŏI‚í‚é) + *************************************************************************) function TSetting.GetSkinDir: string; begin Result := IncludeTrailingPathDelimiter(GetConfigDir + SKIN_DIR_NAME); end; - -function TSetting.GetSkinHeaderFileName: string; -begin - Result := CSSFileName + SKIN_HEADER_FILE_NAME; -end; - -function TSetting.GetSkinFooterFileName: string; -begin - Result := CSSFileName + SKIN_FOOTER_FILE_NAME; -end; - -function TSetting.GetSkinNewResFileName: string; -begin - Result := CSSFileName + SKIN_NEWRES_FILE_NAME; -end; - -function TSetting.GetSkinResFileName: string; -begin - Result := CSSFileName + SKIN_RES_FILE_NAME; -end; - -function TSetting.GetSkinBookmarkFileName: string; -begin - Result := CSSFileName + SKIN_BOOKMARK_FILE_NAME; -end; - -function TSetting.GetSkinNewmarkFileName: string; -begin - Result := CSSFileName + SKIN_NEWMARK_FILE_NAME; -end; - +(************************************************************************* + *NGƒ[ƒhƒfƒBƒŒƒNƒgƒŠŽæ“¾(\‚ŏI‚í‚é) + *************************************************************************) function TSetting.GetNGWordsDir: string; begin Result := IncludeTrailingPathDelimiter(GetConfigDir + NGWORDs_DIR_NAME); end; - +(************************************************************************* + *Boardƒvƒ‰ƒOƒCƒ“ƒfƒBƒŒƒNƒgƒŠŽæ“¾(\‚ŏI‚í‚é) + *************************************************************************) function TSetting.GetBoardPlugInDir: string; begin Result := IncludeTrailingPathDelimiter(GetConfigDir + BOARD_PLUGIN_DIR_NAME); @@ -1985,26 +2112,29 @@ procedure TSetting.SetUseCSS( value: Boolean ); begin FUseCSS := value; - + // Windows“I‚Ƀtƒ@ƒCƒ‹ƒpƒX‚̑啶Žš¬•¶Žš‚̈Ⴂ‚Í–³Ž‹‚³‚ê‚é‚̂ŁA + // ƒRƒR‚Å‚Ì”»’è‚Å‚à‘啶Žš¬•¶Žš‚̈Ⴂ‚Í–³Ž‹‚·‚éB FUseSkin := UseCSS and - (Pos( GetSkinDir, CSSFileName ) > 0) and - FileExists( GetSkinHeaderFileName ); + (Pos( AnsiLowerCase(GetSkinDir), AnsiLowerCase(FSkinFiles.FileName) ) > 0) and + FileExists( FSkinFiles.GetSkinHeaderFileName ); end; procedure TSetting.SetCSSFileName( fileName: string ); begin - - FCSSFileName := fileName; - + FSkinFiles.FileName := fileName; + // Windows“I‚Ƀtƒ@ƒCƒ‹ƒpƒX‚̑啶Žš¬•¶Žš‚̈Ⴂ‚Í–³Ž‹‚³‚ê‚é‚̂ŁA + // ƒRƒR‚Å‚Ì”»’è‚Å‚à‘啶Žš¬•¶Žš‚̈Ⴂ‚Í–³Ž‹‚·‚éB FUseSkin := UseCSS and - (Pos( GetSkinDir, CSSFileName ) > 0) and - FileExists( GetSkinHeaderFileName ); + (Pos( AnsiLowerCase(GetSkinDir), AnsiLowerCase(FSkinFiles.FileName) ) > 0) and + FileExists( FSkinFiles.GetSkinHeaderFileName ); end; - +(************************************************************************* + *sambaÝ’èƒtƒ@ƒCƒ‹–¼Žæ“¾ + *************************************************************************) function TSetting.GetSambaFileName: string; begin Result := GetAppDir + SAMBATIME_FILE_NAME; @@ -2021,6 +2151,279 @@ begin Result := GetConfigDir + GESTURE_FILE_NAME; end; -end. +//! ƒXƒpƒ€ƒtƒBƒ‹ƒ^ŠwK—š—ðƒtƒ@ƒCƒ‹ƒpƒX +function TSetting.GetSpamFilterFileName: string; +begin + Result := GetConfigDir + SPAMFILTER_FILE_NAME; +end; +function TSetting.GetLanguageFileName: string; +begin + Result := GetConfigDir + LANGUAGE_FILE_NAME; +end; +procedure TSetting.WriteLogFolder(AVal : String); +begin + FLogFolder := AVal; + FLogFolderP := IncludeTrailingPathDelimiter(LogFolder); +end; +function TSetting.GetMainKeyFileName: String; +begin + Result := GetConfigDir + KEY_SETTING_FILE_NAME; +end; +function TSetting.GetEditorKeyFileName: String; +begin + Result := GetConfigDir + EKEY_SETTING_FILE_NAME; +end; +function TSetting.GetInputAssistFileName : String; +begin + Result := GetConfigDir + INPUTASSIST_FILE_NAME; +end; +function TSetting.GetReplaceFileName: String; +begin + Result := GetConfigDir + REPLACE_FILE_NAME; +end; +function TSetting.GetExtprevieFileName: String; +begin + Result := GetConfigDir + EXT_PREVIEW_FILE_NAME; +end; +procedure TSetting.SetMoveHistorySize(AVal : Integer); +begin + if (AVal > 0) then begin + FMoveHistorySize := AVal; + end; +end; +{ +\brief ƒvƒƒLƒVÝ’è“ǂݍž‚Ý +\param memIni iniƒtƒ@ƒCƒ‹ +} +procedure TSetting.ReadProxySettings(memIni: TMemIniFile); +const + READ_SECTION = 'ReadProxy'; + WRITE_SECTION= 'WriteProxy'; + PROXY_KEY = 'Proxy'; + ADDRE_KEY = 'Address'; + PORT_KEY = 'Port'; + UID_KEY = 'UserID'; + PASS_KEY = 'Password'; +begin + if (memIni <> nil) then begin + FReadProxy := memIni.ReadBool(READ_SECTION, PROXY_KEY, false); + FReadProxyAddress := memIni.ReadString(READ_SECTION, ADDRE_KEY, ''); + FReadProxyPort := memIni.ReadInteger(READ_SECTION, PORT_KEY, 0); + FReadProxyUserID := memIni.ReadString(READ_SECTION, UID_KEY, ''); + FReadProxyPassword := memIni.ReadString(READ_SECTION, PASS_KEY, ''); + + FWriteProxy := memIni.ReadBool(WRITE_SECTION, PROXY_KEY, false); + FWriteProxyAddress := memIni.ReadString(WRITE_SECTION, ADDRE_KEY, ''); + FWriteProxyPort := memIni.ReadInteger(WRITE_SECTION, PORT_KEY, 0); + FWriteProxyUserID := memIni.ReadString(WRITE_SECTION, UID_KEY, ''); + FWriteProxyPassword := memIni.ReadString(WRITE_SECTION, PASS_KEY, ''); + end; +end; +{ +\brief ŠeŽíƒEƒBƒ“ƒhƒEÝ’è“ǂݍž‚Ý +\param menIni iniƒtƒ@ƒCƒ‹ +} +procedure TSetting.ReadWindowSettings(memIni: TMemIniFile); +const + WINDOW_SECTION = 'Window'; +begin + if (memIni <> nil) then begin + FBrowserFontName := memIni.ReadString(WINDOW_SECTION, 'BrowserFontName', ''); + FBrowserFontSize := memIni.ReadInteger(WINDOW_SECTION, 'BrowserFontSize', 0); + FBrowserFontBold := memIni.ReadInteger(WINDOW_SECTION, 'BrowserFontBold', 0); + FBrowserFontItalic := memIni.ReadInteger(WINDOW_SECTION, 'BrowserFontItalic', 0); + FBrowserFontColor := memIni.ReadInteger(WINDOW_SECTION, 'BrowserFontColor', -1); + FBrowserBackColor := memIni.ReadInteger(WINDOW_SECTION, 'BrowserBackColor', -1); + + FCabinetFontName := memIni.ReadString(WINDOW_SECTION, 'CabinetFontName', DEFAULT_FONT_NAME); + FCabinetFontSize := memIni.ReadInteger(WINDOW_SECTION, 'CabinetFontSize', DEFAULT_FONT_SIZE); + FCabinetFontBold := memIni.ReadBool(WINDOW_SECTION, 'CabinetFontBold', False); + FCabinetFontItalic := memIni.ReadBool(WINDOW_SECTION, 'CabinetFontItalic', False); + FCabinetFontColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'CabinetFontColor', DEFAULT_FONT_COLOR)); + FCabinetBackColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'CabinetBackColor', DEFAULT_WINDOW_COLOR)); + + FListFontName := memIni.ReadString(WINDOW_SECTION, 'ListFontName', DEFAULT_FONT_NAME); + FListFontSize := memIni.ReadInteger(WINDOW_SECTION, 'ListFontSize', DEFAULT_FONT_SIZE); + FListFontBold := memIni.ReadBool(WINDOW_SECTION, 'ListFontBold', False); + FListFontItalic := memIni.ReadBool(WINDOW_SECTION, 'ListFontItalic', False); + FListFontColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'ListFontColor', DEFAULT_FONT_COLOR)); + FListBackColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'ListBackColor', DEFAULT_WINDOW_COLOR)); + FUseOddColorOddResNum := memIni.ReadBool(WINDOW_SECTION,'UseOddColor', False); + FOddColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'OddColor', DEFAULT_WINDOW_COLOR)); + FUnFocusedBold := memIni.ReadBool(WINDOW_SECTION,'UnFocusedBold', False); + + FEditorFontName := memIni.ReadString(WINDOW_SECTION, 'EditorFontName', DEFAULT_FONT_NAME); + FEditorFontSize := memIni.ReadInteger(WINDOW_SECTION, 'EditorFontSize', DEFAULT_FONT_SIZE); + FEditorFontBold := memIni.ReadBool(WINDOW_SECTION, 'EditorFontBold', False); + FEditorFontItalic := memIni.ReadBool(WINDOW_SECTION, 'EditorFontItalic', False); + FEditorFontColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'EditorFontColor', DEFAULT_FONT_COLOR)); + FEditorBackColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'EditorBackColor', DEFAULT_WINDOW_COLOR)); + + FBrowserTabFontName := memIni.ReadString(WINDOW_SECTION, 'BrowserTabFontName', DEFAULT_TAB_FONT_NAME); + FBrowserTabFontSize := memIni.ReadInteger(WINDOW_SECTION, 'BrowserTabFontSize', DEFAULT_TAB_FONT_SIZE); + FBrowserTabFontBold := memIni.ReadBool(WINDOW_SECTION, 'BrowserTabFontBold', False); + FBrowserTabFontItalic := memIni.ReadBool(WINDOW_SECTION, 'BrowserTabFontItalic', False); + + FHintFontName := memIni.ReadString(WINDOW_SECTION, 'HintFontName', Screen.HintFont.Name); + FHintFontSize := memIni.ReadInteger(WINDOW_SECTION, 'HintFontSize', Screen.HintFont.Size); + //FHintFontBold := memIni.ReadBool(WINDOW_SECTION, 'HintFontBold', False); + //FHintFontItalic := memIni.ReadBool(WINDOW_SECTION, 'HintFontItalic', False); + FHintFontColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'HintFontColor', DEFAULT_FONT_COLOR)); + FHintBackColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'HintBackColor', 'clInfoBk')); + end; +end; +{ +\brief “ü—Í—š—ð“ǂݍž‚݁iŒŸõ{ƒ[ƒ‹—“{–¼‘Oj +\param memIni iniƒtƒ@ƒCƒ‹ +} +procedure TSetting.ReadInputHisotrys(memIni: TMemIniFile); +const + SECTIONS : array[0..2] of string = ('Name', 'Mail', 'SelectText'); +var + wkList : TStringList; + wkStr : string; + i, j : Integer; + listArray : array[0..2] of TStringList; +begin + if (memIni <> nil) then begin + listArray[0] := FNameList; + listArray[1] := FMailList; + listArray[2] := FSelectTextList; + wkList := TStringList.Create; + try + for i := 0 to High(listArray) do begin + memIni.ReadSection(SECTIONS[i], wkList); + for j := 0 to wkList.Count -1 do begin + wkStr := memIni.ReadString(SECTIONS[i], wkList[j], ''); + if (wkStr <> '') and + (listArray[i].IndexOf(wkStr) = -1) then begin + listArray[i].Add(wkStr); + end; + end; + end; + finally + wkList.Free; + end; + end; +end; +{ +\breif ƒŠƒXƒgƒJƒ‰ƒ€•“ǂݍž‚Ý +\param memIni iniƒtƒ@ƒCƒ‹ +} +procedure TSetting.ReadListColumnWidth(memIni: TMemIniFile); +const + SECTIONS : array[0..2] of string = + ('BBSColumnWidth', 'CategoryColumnWidth', 'BoardColumnWidth'); + DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140); + DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130); + DEFAULT_BOARD_WIDTH: array[0..10] of Integer = (350, 60, 60, 60, 60, 60, 80, 130, 130, 130, 60); + MAX_WIDTH: Integer = 2000; +var + wkList : TStringList; + i : Integer; +begin + if (memIni <> nil) then begin + // ƒŠƒXƒgƒJƒ‰ƒ€• + wkList := TStringList.Create; + try + memIni.ReadSection(SECTIONS[0], wkList); + if Length(FBBSColumnWidth) <> wkList.Count then begin + memIni.EraseSection(SECTIONS[0]); + end; + for i := 0 to High(FBBSColumnWidth) do begin + BBSColumnWidth[i] := memIni.ReadInteger(SECTIONS[0], + 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]); + if BBSColumnWidth[i] > MAX_WIDTH then + BBSColumnWidth[i] := DEFAULT_BBS_WIDTH[i]; + end; + memIni.ReadSection(SECTIONS[1], wkList); + if Length(FCategoryColumnWidth) <> wkList.Count then begin + memIni.EraseSection(SECTIONS[1]); + end; + for i := 0 to High(FCategoryColumnWidth) do begin + CategoryColumnWidth[i] := memIni.ReadInteger(SECTIONS[1], + 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]); + if CategoryColumnWidth[i] > MAX_WIDTH then + CategoryColumnWidth[i] := DEFAULT_CATEGORY_WIDTH[i]; + end; + memIni.ReadSection(SECTIONS[2], wkList); + if Length(FBoardColumnWidth) <> wkList.Count then begin + memIni.EraseSection(SECTIONS[2]); + end; + for i := 0 to High(FBoardColumnWidth) do begin + BoardColumnWidth[i] := memIni.ReadInteger(SECTIONS[2], + 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]); + if BoardColumnWidth[i] > MAX_WIDTH then + BoardColumnWidth[i] := DEFAULT_BOARD_WIDTH[i]; + end; + finally + wkList.Free; + end; + end; +end; +//! ƒJƒeƒSƒŠƒŠƒXƒgƒJƒ‰ƒ€‡˜“ǂݍž‚Ý +procedure TSetting.ReadOrdColumn(memIni: TMemIniFile); +var + wkList : TStringList; + wkStr : string; + i, id, code : Integer; +begin + if (memIni <> nil) then begin + wkList := TStringList.Create; + try + memIni.ReadSection( 'BBSColumnOrder', wkList ); + for i := 0 to wkList.Count - 1 do begin + wkStr := memIni.ReadString( 'BBSColumnOrder', 'ID' + IntToStr( i ), '' ); + Val( wkStr, id, code ); + if code = 0 then + FBBSColumnOrder.Add( TGikoBBSColumnID( id ) ); + end; + if FBBSColumnOrder.Count = 0 then begin + // Ý’肪–³‚¢‚̂ō쐬 + for i := 0 to Integer( High( TGikoBBSColumnID ) ) do + FBBSColumnOrder.Add( TGikoBBSColumnID( i ) ); + end; + + memIni.ReadSection( 'CategoryColumnOrder', wkList ); + for i := 0 to wkList.Count - 1 do begin + wkStr := memIni.ReadString( 'CategoryColumnOrder', 'ID' + IntToStr( i ), '' ); + Val( wkStr, id, code ); + if code = 0 then + FCategoryColumnOrder.Add( TGikoCategoryColumnID( id ) ); + end; + if FCategoryColumnOrder.Count = 0 then begin + // Ý’肪–³‚¢‚̂ō쐬 + for i := 0 to Integer( High( TGikoCategoryColumnID ) ) do + FCategoryColumnOrder.Add( TGikoCategoryColumnID( i ) ); + end; + + memIni.ReadSection( 'BoardColumnOrder', wkList ); + for i := 0 to wkList.Count - 1 do begin + wkStr := memIni.ReadString( 'BoardColumnOrder', 'ID' + IntToStr( i ), '' ); + Val( wkStr, id, code ); + if code = 0 then + FBoardColumnOrder.Add( TGikoBoardColumnID( id ) ); + end; + if FBoardColumnOrder.Count = 0 then begin + // Ý’肪–³‚¢‚̂ō쐬 + for i := 0 to Integer( High( TGikoBoardColumnID ) ) do begin + // ¨‚¢‚̃Jƒ‰ƒ€‚̓fƒtƒHƒ‹ƒg‚Å”ñ•\Ž¦‚É‚·‚é + if ( i <> Ord(gbcVigor) ) then begin + FBoardColumnOrder.Add( TGikoBoardColumnID( i ) ); + end; + end; + end; + finally + wkList.Free; + end; + end; +end; + +function TSetting.GetCSSFileName: string; +begin + Result := FSkinFiles.FileName; +end; + +end.