OSDN Git Service

・NGワードで特定の板限定、スレ限定ができるよう変更
[gikonavigoeson/gikonavi.git] / Setting.pas
index 7a98588..ecec20f 100644 (file)
@@ -248,6 +248,10 @@ type
                FUnActivePopup: Boolean;
                //\83\8c\83X\83|\83b\83v\83A\83b\83v\83w\83b\83_\81[\83{\81[\83\8b\83h
                FResPopupHeaderBold: Boolean;
+        // BE\83A\83C\83R\83\93\81EEmoticon\89æ\91\9c\95\\8e¦
+        FIconImageDisplay: Boolean;
+        // \83X\83\8c\83^\83C\93Á\92è\95\8e\9a\97ñ\8f\9c\8b\8e
+        FThreadTitleTrim: Boolean;
 
                //\83\8d\83O\83t\83H\83\8b\83_
                FLogFolder: string;
@@ -351,6 +355,14 @@ type
                FDeleteSyria : Boolean; //\83V\83\8a\83A\8cê\83u\83\89\83N\83\89\91Î\8dô
                FIgnoreKana     : Boolean;      //\91S\94¼\8ap\82Ð\82ç\83J\83i\82Ì\88á\82¢\82ð\96³\8e\8b\82·\82é\82©
 
+        //NG\83\8f\81[\83h\95Ò\8fW
+        FNGTextEditor: Boolean; //\95Ò\8fW\82É\83e\83L\83X\83g\83G\83f\83B\83^\82ð\8eg\97p\82·\82é\82©
+               FNGWindowTop: Integer;
+               FNGWindowLeft: Integer;
+               FNGWindowHeight: Integer;
+               FNGWindowWidth: Integer;
+               FNGWindowMax: Boolean;
+
                // \83X\83\8c\83b\83h\8di\8d\9e\83t\83B\81[\83\8b\83h\82Ì\95\9d
                FSelectComboBoxWidth : Integer;
 
@@ -414,7 +426,7 @@ type
                                //Be2ch
                 //\94F\8fØ\97p\83\86\81[\83UID\81E\83p\83X\83\8f\81[\83h
                FBeUserID: String;
-               FBeCode: String;
+               FBePassword: String;
                FBeAutoLogin: Boolean;
                FBeLogin: Boolean;
                //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\8c\8f\90\94
@@ -440,6 +452,8 @@ type
         FLoopBrowserTabs : Boolean;
         //! 100\83\8c\83X\95\\8e¦\82Ì\90æ\93ª\95\\8e¦\83\8c\83X\90\94
         FHeadResCount : Integer;
+        //! 100\83\8c\83X\95\\8e¦\90\94\81i\8ag\92£\97p\81j
+        FResRangeExCount: Integer;
         //! \8aÖ\98A\83L\81[\83\8f\81[\83h\92Ç\89Á\83t\83\89\83O
         FAddKeywordLink: Boolean;
         //! dat\92u\8a·\82ð\97L\8cø\82É\82·\82é
@@ -462,6 +476,29 @@ type
         FRespopupWait: Integer;
         //! \83\81\81[\83\8b\97\93\83\8c\83X\83|\83b\83v\83A\83b\83v
         FRespopupMailTo: Boolean;
+        //! \8cë\94\9a\83`\83F\83b\83N
+        FUseGobakuCheck: Boolean;
+        //! Unicode\94Å\83G\83f\83B\83^
+        FUseUnicode: Boolean;
+        //! \8dí\8f\9c\97v\90¿\94Â\82ð\93Á\95Ê\88µ\82¢
+        FSakuBoard: Boolean;
+
+               //! \83X\83\8c\83^\83C\8c\9f\8dõ\83E\83B\83\93\83h\83E
+               FThrdSrchTop: Integer;
+               FThrdSrchLeft: Integer;
+               FThrdSrchWidth: Integer;
+               FThrdSrchHeight: Integer;
+               FThrdSrchMax: Boolean;
+        FThrdSrchStay: Boolean;
+        FThrdSrchCol1W: Integer;
+        FThrdSrchCol2W: Integer;
+        FThrdSrchCol3W: Integer;
+        FThrdSrchCol4W: Integer;
+        FThrdSrchHistory: TStringList;
+
+        //! \96`\8c¯\82Ì\8f\91\97pCookie
+        FBoukenCookieList: TStringList;
+
                function GetMainCoolSet(Index: Integer): TCoolSet;
                function GetBoardCoolSet(Index: Integer): TCoolSet;
                function GetBrowserCoolSet(Index: Integer): TCoolSet;
@@ -512,6 +549,7 @@ type
                procedure WriteNameMailSettingFile;
                procedure WriteFolderSettingFile();
                procedure WriteBoardURLSettingFile;
+               procedure WriteBoukenSettingFile;
                function GetSoundCount: Integer;
                function FindSoundFileName(Name: string): string;
 
@@ -526,6 +564,7 @@ type
                function GetSkinDir: string;
                function GetStyleSheetDir: string;
                function GetOutBoxFileName: string;
+               function GetDefaultFilesFileName: string;
                function GetNGWordsDir: string;
                function GetBoardPlugInDir: string;
                function GetSambaFileName: string;
@@ -539,6 +578,9 @@ type
                function GetInputAssistFileName : String;
         function GetReplaceFileName: String;
         function GetExtprevieFileName: String;
+        function GetBoukenCookie(AHostName: String): String;
+        procedure SetBoukenCookie(ACookieValue, AHostName: String);
+        procedure GetBouken(AHostName: String; var Domain:String; var Cookie:String);
         {
         \brief  \83\8a\83\93\83N\97\9a\97ð\82Ì\95Û\8e\9d\83T\83C\83Y\82Ìsetter
         \param  AVal    \90Ý\92è\82·\82é\83T\83C\83Y( >0)
@@ -663,6 +705,8 @@ type
                property ThreadRange    : TGikoThreadRange read FThreadRange write FThreadRange;
                property UnActivePopup: Boolean read FUnActivePopup write FUnActivePopup;
                property ResPopupHeaderBold: Boolean read FResPopupHeaderBold write FResPopupHeaderBold;
+        property IconImageDisplay: Boolean read FIconImageDisplay write FIconImageDisplay;
+        property ThreadTitleTrim: Boolean read FThreadTitleTrim write FThreadTitleTrim;
 
                property LogFolder: string read FLogFolder write WriteLogFolder;
         property LogFolderP: string read FLogFolderP;
@@ -741,6 +785,15 @@ type
                property AddResAnchor : Boolean read FAddResAnchor write FAddResAnchor;
                property DeleteSyria : Boolean read FDeleteSyria write FDeleteSyria;
                property IgnoreKana : Boolean read FIgnoreKana write FIgnoreKana;
+
+        //NG\83\8f\81[\83h\95Ò\8fW
+        property NGTextEditor: Boolean read FNGTextEditor write FNGTextEditor;
+               property NGWindowTop: Integer read FNGWindowTop write FNGWindowTop;
+               property NGWindowLeft: Integer read FNGWindowLeft write FNGWindowLeft;
+               property NGWindowHeight: Integer read FNGWindowHeight write FNGWindowHeight;
+               property NGWindowWidth: Integer read FNGWindowWidth write FNGWindowWidth;
+               property NGWindowMax: Boolean read FNGWindowMax write FNGWindowMax;
+
                // \83X\83\8c\83b\83h\8di\8d\9e\83t\83B\81[\83\8b\83h\82Ì\95\9d
                property SelectComboBoxWidth : Integer read FSelectComboBoxWidth write FSelectComboBoxWidth;
 
@@ -788,7 +841,7 @@ type
                property UseUndecided: Boolean read FUseUndecided write FUseUndecided;
 
                property BeUserID: string read FBeUserID write FBeUserID;
-               property BeCode: string read FBeCode write FBeCode;
+               property BePassword: string read FBePassword write FBePassword;
                property BeAutoLogin: Boolean read FBeAutoLogin write FBeAutoLogin;
                property BeLogin: Boolean read FBeLogin write FBeLogin;
                property MaxRecordCount : Integer read FMaxRecordCount write FMaxRecordCount;
@@ -810,6 +863,8 @@ type
         property LoopBrowserTabs : Boolean read FLoopBrowserTabs write FLoopBrowserTabs;
         //! 100\83\8c\83X\95\\8e¦\82Ì\90æ\93ª\95\\8e¦\83\8c\83X\90\94
         property HeadResCount : Integer read FHeadResCount write FHeadResCount;
+        //! 100\83\8c\83X\95\\8e¦\90\94\81i\8ag\92£\97p\81j
+        property ResRangeExCount: Integer read FResRangeExCount write FResRangeExCount;
         //! \8aÖ\98A\83L\81[\83\8f\81[\83h\92Ç\89Á\83t\83\89\83O
         property AddKeywordLink: Boolean read FAddKeywordLink write FAddKeywordLink;
         //! dat\82Ì\92u\8a·\82ð\97L\8cø\82É\82·\82é\82©
@@ -830,6 +885,27 @@ type
         //! \83\8c\83X\83|\83b\83v\83A\83b\83v\83^\83C\83}\81[
         property RespopupWait: Integer read FRespopupWait write FRespopupWait;
         property RespopupMailTo: Boolean read FRespopupMailTo write FRespopupMailTo;
+        //! \8cë\94\9a\83`\83F\83b\83N
+        property UseGobakuCheck: Boolean read FUseGobakuCheck write FUseGobakuCheck;
+        //! Unicode\94Å\83G\83f\83B\83^
+        property UseUnicode: Boolean read FUseUnicode write FUseUnicode;
+        //! \8dí\8f\9c\97v\90¿\94Â\82ð\93Á\95Ê\88µ\82¢
+        property SakuBoard: Boolean read FSakuBoard write FSakuBoard;
+               //! \83X\83\8c\83^\83C\8c\9f\8dõ\83E\83B\83\93\83h\83E
+               //! \83X\83\8c\83^\83C\8c\9f\8dõ\83E\83B\83\93\83h\83E
+               property ThrdSrchTop: Integer read FThrdSrchTop write FThrdSrchTop;
+               property ThrdSrchLeft: Integer read FThrdSrchLeft write FThrdSrchLeft;
+               property ThrdSrchWidth: Integer read FThrdSrchWidth write FThrdSrchWidth;
+               property ThrdSrchHeight: Integer read FThrdSrchHeight write FThrdSrchHeight;
+               property ThrdSrchMax: Boolean read FThrdSrchMax write FThrdSrchMax;
+        property ThrdSrchStay: Boolean read FThrdSrchStay write FThrdSrchStay;
+        property ThrdSrchCol1W: Integer read FThrdSrchCol1W write FThrdSrchCol1W;
+        property ThrdSrchCol2W: Integer read FThrdSrchCol2W write FThrdSrchCol2W;
+        property ThrdSrchCol3W: Integer read FThrdSrchCol3W write FThrdSrchCol3W;
+        property ThrdSrchCol4W: Integer read FThrdSrchCol4W write FThrdSrchCol4W;
+        property ThrdSrchHistory: TStringList read FThrdSrchHistory write FThrdSrchHistory;
+        //! \96`\8c¯\82Ì\8f\91
+        property BoukenCookieList: TStringList read FBoukenCookieList write FBoukenCookieList; 
 end;
 
 
@@ -846,6 +922,7 @@ const
        TEMP_FOLDER                                                                             = 'Temp';
        OUTBOX_FILE_NAME                                                        = 'outbox.ini';
        SENT_FILE_NAME                                                          = 'sent.ini';
+       DEFFILES_FILE_NAME                                                      = 'defaultFiles.ini';
        CONFIG_DIR_NAME                                                         = 'config';
        CSS_DIR_NAME                                                                    = 'css';
        SKIN_DIR_NAME                                                                   = 'skin';
@@ -859,7 +936,7 @@ const
        SPAMFILTER_FILE_NAME                                    = 'SpamFilter.ini';
                LANGUAGE_FILE_NAME    = 'language.ini';
        INPUTASSIST_FILE_NAME   = 'InputAssist.ini';
-    FIXED_COOKIE =           'hana=mogera';
+    FIXED_COOKIE =           '';
     REPLACE_FILE_NAME = 'replace.ini';
     EXT_PREVIEW_FILE_NAME = 'extpreview.ini';
 
@@ -988,6 +1065,8 @@ begin
        FMailList.Duplicates := dupIgnore;
        FBoardURLs.Duplicates := dupIgnore;
        FSelectTextList.Duplicates := dupIgnore;
+    FThrdSrchHistory := TStringList.Create;
+    FBoukenCookieList := TStringList.Create;
        ReadSettingFile();
        ReadBoardURLsFile();
 end;
@@ -995,6 +1074,8 @@ end;
 //\83f\83X\83g\83\89\83N\83^
 destructor TSetting.Destroy();
 begin
+    FThrdSrchHistory.Free;
+    FBoukenCookieList.Free;
        FBoardColumnOrder.Free;
        FCategoryColumnOrder.Free;
        FBBSColumnOrder.Free;
@@ -1025,9 +1106,11 @@ var
        ini: TMemIniFile;
        i: Integer;
        Exists: Boolean;
-       s: string;                                               
+       s: string;
        CoolSet: TCoolSet;
     msg: String;
+    hostList: TStringList;
+    Cnt: Integer;
 begin
        Exists := FileExists(GetFileName);
        ini := TMemIniFile.Create(GetFileName);
@@ -1127,12 +1210,17 @@ begin
                        FResRange := ini.ReadInteger( 'Thread', 'ResRange', Ord( grrAll ) );
                FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False );
         FHeadResCount := ini.ReadInteger('Thread', 'HeadResCount', 1);
+        FResRangeExCount:= ini.ReadInteger('Thread','ResRangeExCount', 100);
                // \83X\83\8c\83b\83h\88ê\97\97\95\\8e¦\94Í\88Í
                FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) );
                //\94ñ\83A\83N\83e\83B\83u\8e\9e\83\8c\83X\83|\83b\83v\83A\83b\83v\95\\8e¦
                FUnActivePopup := ini.ReadBool('Thread', 'UnActivePopup', False);
                //\83\8c\83X\83|\83b\83v\83A\83b\83v\83w\83b\83_\81[\83{\81[\83\8b\83h
                FResPopupHeaderBold := ini.ReadBool('Thread', 'ResPopupHeaderBold', True);
+        // BE\83A\83C\83R\83\93\81EEmoticon\89æ\91\9c\95\\8e¦
+        FIconImageDisplay := ini.ReadBool('Thread', 'IconImageDisplay', True);
+        // \83X\83\8c\83^\83C\93Á\92è\95\8e\9a\97ñ\8f\9c\8b\8e
+        FThreadTitleTrim := ini.ReadBool('Thread', 'ThreadTitleTrim', False);
                //\8dí\8f\9c\8am\94F
                FDeleteMsg := ini.ReadBool('Function', 'LogDeleteMessage', True);
                //\8fI\97¹\8am\94F
@@ -1216,13 +1304,17 @@ begin
 
                //\83T\83E\83\93\83h
                if Exists then begin
+            SetCurrentDir(ExtractFilePath(Application.ExeName));
                        for i := 0 to GetSoundCount - 1 do begin
                                SoundFileName[i] := ini.ReadString('Sound', SoundName[i], '');
-                               if not FileExists(SoundFileName[i]) then
-                                       SoundFileName[i] := '';
+                // \91\8a\91Î\8eQ\8fÆ\91Î\8dô
+                // \83t\83@\83C\83\8b\82Ì\91\8dÝ\83`\83F\83b\83N
+                if not FileExists(ExpandFileName(SoundFileName[i])) then begin
+                    SoundFileName[i] := '';
+                end;
                        end;
                end else begin
-                       s := GetAppDir + '\sound\';
+                       s := 'Sound\';
                        SoundFileName[0] := s + '\8eæ\93¾\90¬\8c÷.wav';
                        SoundFileName[1] := s + '\8eæ\93¾\90¬\8c÷(\8d·\95ª).wav';
                        SoundFileName[2] := s + '\96¢\8dX\90V.wav';
@@ -1260,9 +1352,19 @@ begin
                FDeleteSyria :=  ini.ReadBool('Abon','DeleteSyria',false);
                FIgnoreKana  :=  ini.ReadBool('Abon','IgnoreKana',false);
 
+        //NG\83\8f\81[\83h\95Ò\8fW
+        FNGTextEditor   := ini.ReadBool('NGWordEditor', 'NGTextEditor', False);
+               FNGWindowTop    := ini.ReadInteger('NGWordEditor', 'NGWindowTop', 100);
+               FNGWindowLeft   := ini.ReadInteger('NGWordEditor', 'NGWindowLeft', 100);
+               FNGWindowHeight := ini.ReadInteger('NGWordEditor', 'NGWindowHeight', 478);
+               FNGWindowWidth  := ini.ReadInteger('NGWordEditor', 'NGWindowWidth', 845);
+               FNGWindowMax    := ini.ReadBool('NGWordEditor', 'NGWindowMax', False);
+
                // \83G\83f\83B\83^
                FSpaceToNBSP    := ini.ReadBool( 'Editor', 'SpaceToNBSP', False );
                FAmpToCharRef   := ini.ReadBool( 'Editor', 'AmpToCharRef', False );
+        FUseGobakuCheck := ini.ReadBool( 'Editor', 'UseGobakuCheck', True );
+        FUseUnicode     := ini.ReadBool( 'Editor', 'UseUnicode', False );
 
                //Tab\8e©\93®\95Û\91\81A\93Ç\82Ý\8d\9e\82Ý
                FTabAutoLoadSave    := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False);
@@ -1289,17 +1391,40 @@ begin
         //Be2ch
                //\94F\8fØ\97p\83\86\81[\83UID\81E\94F\8fØ\83R\81[\83h
                FBeUserID := ini.ReadString('Be', 'UserID', '');
-               FBeCode := Decrypt(ini.ReadString('Be', 'Code', ''));
+               FBePassword := Decrypt(ini.ReadString('Be', 'Password', ''));
                FBeAutoLogin := ini.ReadBool('Be', 'AutoLogin', False);
                //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\8c\8f\90\94
                FMaxRecordCount := Max(ini.ReadInteger('Recode', 'Max', 100), 1);
 
+        //! \8dí\8f\9c\97v\90¿\94Â\82ð\93Á\95Ê\88µ\82¢
+        FSakuBoard := ini.ReadBool('NewBoard', 'SakuSpecial', True);
+
                // \93ü\97Í\83A\83V\83X\83g
                FInputAssistFormTop := ini.ReadInteger('IAtWindowsSize', 'Top', 0);
                FInputAssistFormLeft := ini.ReadInteger('IAtWindowsSize', 'Left', 0);
                FInputAssistFormWidth := ini.ReadInteger('IAtWindowsSize', 'Width', 400);
                FInputAssistFormHeight := ini.ReadInteger('IAtWindowsSize', 'Height', 460);
 
+               //! \83X\83\8c\83^\83C\8c\9f\8dõ\83E\83B\83\93\83h\83E
+               FThrdSrchTop    := ini.ReadInteger('ThreadSearch', 'Top',    0);
+               FThrdSrchLeft   := ini.ReadInteger('ThreadSearch', 'Left',   0);
+               FThrdSrchWidth  := ini.ReadInteger('ThreadSearch', 'Width',  526);
+               FThrdSrchHeight := ini.ReadInteger('ThreadSearch', 'Height', 550);
+               FThrdSrchMax    := ini.ReadBool(   'ThreadSearch', 'Max',    False);
+        FThrdSrchStay   := ini.ReadBool(   'ThreadSearch', 'Stay',   False);
+        FThrdSrchCol1W  := ini.ReadInteger('ThreadSearch', 'Col1W',  80);
+        FThrdSrchCol2W  := ini.ReadInteger('ThreadSearch', 'Col2W',  350);
+        FThrdSrchCol3W  := ini.ReadInteger('ThreadSearch', 'Col3W',  40);
+        FThrdSrchCol4W  := ini.ReadInteger('ThreadSearch', 'Col4W',  500);
+        Cnt := ini.ReadInteger('ThreadSearch', 'HistoryCount',  0);
+        if (Cnt > 0) then begin
+            for i := 1 to Cnt do begin
+                s := ini.ReadString('ThreadSearch', 'History' + IntToStr(i), '');
+                if (s <> '') then
+                    FThrdSrchHistory.Add(s);
+            end;
+        end;
+
                // Cookie\82É\95t\89Á\82·\82é\8cÅ\92è\83R\81[\83h
                FFixedCookie := ini.ReadString('Cookie', 'fixedString', FIXED_COOKIE);
 
@@ -1325,6 +1450,24 @@ begin
 
         FCheckDatFile := ini.ReadBool('ThreadList', 'CheckDatFile', True);
         FLimitResCountMessage := ini.ReadBool('Thread', 'LimitResCountMessage', True);
+
+        // \96`\8c¯\82Ì\8f\91Cookie\93Ç\82Ý\8d\9e\82Ý
+        hostList := TStringList.Create;
+        ini.ReadSection('Bouken', hostList);
+        for i := 0 to hostList.Count - 1 do begin
+            FBoukenCookieList.Add( hostList[i] + '=' +
+                ini.ReadString('Bouken', hostList[i], '') );
+        end;
+        hostList.Free;
+
+        // \83M\83R\83i\83r\8dX\90V\82Å\97\98\97p\82µ\82½\83C\83\93\83X\83g\81[\83\89\82Ì\8dí\8f\9c
+        s := ini.ReadString('Update', 'Remove0', '');
+        if (FileExists(s)) then begin
+            SysUtils.DeleteFile(s);
+            // \8dí\8f\9c\82É\8e¸\94s\82µ\82Ä\82à\96³\8e\8b\82·\82é
+            ini.DeleteKey('Update', 'Remove0');
+        end;
+
                ini.UpdateFile;
        finally
                ini.Free;
@@ -1514,6 +1657,7 @@ begin
                ini.WriteInteger('Thread', 'ResRange', FResRange);
                ini.WriteBool('Thread', 'ResRangeHold', FResRangeHold);
         ini.WriteInteger('Thread', 'HeadResCount', FHeadResCount);
+        ini.WriteInteger('Thread','ResRangeExCount', FResRangeExCount);
                // \83X\83\8c\83b\83h\88ê\97\97\95\\8e¦\94Í\88Í
                ini.WriteInteger('ThreadList', 'ThreadRange', Ord( FThreadRange ));
                //\83\8d\83O\8dí\8f\9c\8am\94F
@@ -1531,6 +1675,10 @@ begin
                ini.WriteBool('Thread', 'UnActivePopup', FUnActivePopup);
                //\83\8c\83X\83|\83b\83v\83A\83b\83v\83w\83b\83_\81[\83{\81[\83\8b\83h
                ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold);
+        // BE\83A\83C\83R\83\93\81EEmoticon\89æ\91\9c\95\\8e¦
+        ini.WriteBool('Thread', 'IconImageDisplay', FIconImageDisplay);
+        // \83X\83\8c\83^\83C\93Á\92è\95\8e\9a\97ñ\8f\9c\8b\8e
+        ini.WriteBool('Thread', 'ThreadTitleTrim', FThreadTitleTrim);
                //ini.WriteString('BoardURL', '2ch', FBoardURL2ch);
 
                //\94F\8fØ\97p\83\86\81[\83UID\81E\83p\83X\83\8f\81[\83h
@@ -1666,13 +1814,26 @@ begin
                ini.WriteBool('Abon','DeleteSyria',FDeleteSyria);
                ini.WriteBool('Abon','IgnoreKana', FIgnoreKana);
 
+        //NG\83\8f\81[\83h\95Ò\8fW
+        ini.WriteBool('NGWordEditor', 'NGTextEditor', FNGTextEditor);
+               ini.WriteInteger('NGWordEditor', 'NGWindowTop', FNGWindowTop);
+               ini.WriteInteger('NGWordEditor', 'NGWindowLeft', FNGWindowLeft);
+               ini.WriteInteger('NGWordEditor', 'NGWindowHeight', FNGWindowHeight);
+               ini.WriteInteger('NGWordEditor', 'NGWindowWidth', FNGWindowWidth);
+               ini.WriteBool('NGWordEditor', 'NGWindowMax', FNGWindowMax);
+
                // \83G\83f\83B\83^
                ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP );
                ini.WriteBool( 'Editor', 'AmpToCharRef', FAmpToCharRef );
+        ini.WriteBool( 'Editor', 'UseGobakuCheck', FUseGobakuCheck );
+        ini.WriteBool( 'Editor', 'UseUnicode', FUseUnicode );
+
+        //! \8dí\8f\9c\97v\90¿\94Â\82ð\93Á\95Ê\88µ\82¢
+        ini.WriteBool('NewBoard', 'SakuSpecial', FSakuBoard);
 
                 //\83^\83u\8e©\93®\95Û\91
                ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave);
-        ini.WriteString('Thread', 'LastCloseTabURL', FLastCloseTabURL); 
+        ini.WriteString('Thread', 'LastCloseTabURL', FLastCloseTabURL);
                 //\8fÚ\8d×\90Ý\92è
                ini.WriteInteger('OptionDialog', 'KuroutTabIndex', FKuroutSettingTabIndex);
 
@@ -1694,7 +1855,7 @@ begin
 
                //\94F\8fØ\97p\83\86\81[\83UID\81E\83p\83X\83\8f\81[\83h
                ini.WriteString('Be', 'UserID', FBeUserID);
-               ini.WriteString('Be', 'Code', Encrypt(FBeCode));
+               ini.WriteString('Be', 'Password', Encrypt(FBePassword));
                ini.WriteBool('Be', 'AutoLogin', FBeAutoLogin);
 
                //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\8c\8f\90\94
@@ -1713,6 +1874,44 @@ begin
         ini.WriteString('Function', 'ExtList', FExtList);
         ini.WriteBool('ThreadList', 'CheckDatFile', FCheckDatFile);
         ini.WriteBool('Thread', 'LimitResCountMessage', FLimitResCountMessage);
+
+               //! \83X\83\8c\83^\83C\8c\9f\8dõ\83E\83B\83\93\83h\83E
+               ini.WriteInteger('ThreadSearch', 'Top',    FThrdSrchTop);
+               ini.WriteInteger('ThreadSearch', 'Left',   FThrdSrchLeft);
+               ini.WriteInteger('ThreadSearch', 'Width',  FThrdSrchWidth);
+               ini.WriteInteger('ThreadSearch', 'Height', FThrdSrchHeight);
+               ini.WriteBool(   'ThreadSearch', 'Max',    FThrdSrchMax);
+        ini.WriteBool(   'ThreadSearch', 'Stay',   FThrdSrchStay);
+        ini.WriteInteger('ThreadSearch', 'Col1W',  FThrdSrchCol1W);
+        ini.WriteInteger('ThreadSearch', 'Col2W',  FThrdSrchCol2W);
+        ini.WriteInteger('ThreadSearch', 'Col3W',  FThrdSrchCol3W);
+        ini.WriteInteger('ThreadSearch', 'Col4W',  FThrdSrchCol4W);
+        ini.WriteInteger('ThreadSearch', 'HistoryCount', FThrdSrchHistory.Count);
+        if (FThrdSrchHistory.Count > 0) then begin
+            for i := 1 to FThrdSrchHistory.Count do begin
+                ini.WriteString('ThreadSearch', 'History' + IntToStr(i), FThrdSrchHistory.Strings[i-1]);
+            end;
+        end;
+
+
+               ini.UpdateFile;
+       finally
+               ini.Free;
+       end;
+end;
+//\90Ý\92è\83t\83@\83C\83\8b\95Û\91¶(\96`\8c¯\82Ì\8f\91)
+procedure TSetting.WriteBoukenSettingFile;
+var
+       i: Integer;
+       ini: TMemIniFile;
+begin
+       ini := TMemIniFile.Create(GetFileName());
+       try
+               ini.EraseSection('Bouken');
+        // \96`\8c¯\82Ì\8f\91Cookie\8f\91\82«\8d\9e\82Ý
+        for i := 0 to FBoukenCookieList.Count - 1 do begin
+            ini.WriteString('Bouken', FBoukenCookieList.Names[i], FBoukenCookieList.Values[FBoukenCookieList.Names[i]]);
+        end;
                ini.UpdateFile;
        finally
                ini.Free;
@@ -1871,7 +2070,8 @@ var
 begin
        for i := 0 to GetSoundCount - 1 do begin
                if SoundName[i] = Name then begin
-                       Result := SoundFileName[i];
+            SysUtils.SetCurrentDir(GetAppDir);
+                       Result := ExpandFileName(SoundFileName[i]);
                        Exit;
                end;
        end;
@@ -2060,6 +2260,14 @@ begin
 end;
 
 (*************************************************************************
+ *defaultFiles.ini\83t\83@\83C\83\8b\96¼\8eæ\93¾\81i\83p\83X\81{\83t\83@\83C\83\8b\96¼\81j
+ *************************************************************************)
+function TSetting.GetDefaultFilesFileName: string;
+begin
+       Result := GetAppDir + DEFFILES_FILE_NAME;
+end;
+
+(*************************************************************************
  *Config\83t\83H\83\8b\83_\8eæ\93¾(\\82Å\8fI\82í\82é)
  *************************************************************************)
 function TSetting.GetConfigDir: string;
@@ -2411,6 +2619,44 @@ function TSetting.GetCSSFileName: string;
 begin
     Result := FSkinFiles.FileName;
 end;
+function TSetting.GetBoukenCookie(AHostName: String): String;
+var
+    i : Integer;
+begin
+    for i := 0 to FBoukenCookieList.Count - 1 do begin
+        if ( AnsiPos(FBoukenCookieList.Names[i], AHostName) > 0 ) then begin
+            Result := FBoukenCookieList.Values[FBoukenCookieList.Names[i]];
+            Break;
+        end;
+    end;
+end;
+procedure TSetting.SetBoukenCookie(ACookieValue, AHostName: String);
+var
+    i : Integer;
+begin
+    for i := 0 to FBoukenCookieList.Count - 1 do begin
+        if ( FBoukenCookieList.Names[i] = AHostName ) then begin
+            FBoukenCookieList[i] := AHostName + '=' + ACookieValue;
+            Break;
+        end;
+    end;
+    if ( i = FBoukenCookieList.Count ) then begin
+        FBoukenCookieList.Add(AHostName + '=' + ACookieValue);
+    end;
+end;
+procedure TSetting.GetBouken(AHostName: String; var Domain:String; var Cookie:String);
+var
+    i : Integer;
+begin
+    Cookie := '';
+    for i := 0 to FBoukenCookieList.Count - 1 do begin
+        if ( AnsiPos(FBoukenCookieList.Names[i], AHostName) > 0 ) then begin
+            Domain := FBoukenCookieList.Names[i];
+            Cookie := FBoukenCookieList.Values[FBoukenCookieList.Names[i]];
+            Break;
+        end;
+    end;
+end;
 
 end.