Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/Setting.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.13 by h677, Thu Oct 9 10:59:07 2003 UTC revision 1.13.2.2 by yoffy, Thu Sep 9 16:20:33 2004 UTC
# Line 11  const Line 11  const
11          LIST_COOLBAND_COUNT = 2;                //板CoolBandの数          LIST_COOLBAND_COUNT = 2;                //板CoolBandの数
12          BROWSER_COOLBAND_COUNT = 3;     //ブラウザCoolBandの数          BROWSER_COOLBAND_COUNT = 3;     //ブラウザCoolBandの数
13    
14            BOARD_FILE_NAME                                                         = 'board.2ch';
15            CUSTOMBOARD_FILE_NAME                                   = 'custom.2ch';
16            BOARD_DIR_NAME                                                          = 'Board';
17            KEY_SETTING_FILE_NAME                                   = 'key.ini';
18            EKEY_SETTING_FILE_NAME                          = 'Ekey.ini';
19            TEMP_FOLDER                                                                             = 'Temp';
20            OUTBOX_FILE_NAME                                                        = 'outbox.ini';
21            SENT_FILE_NAME                                                          = 'sent.ini';
22            CONFIG_DIR_NAME                                                         = 'config';
23            CSS_DIR_NAME                                                                    = 'css';
24            SKIN_DIR_NAME                                                                   = 'skin';
25            SKIN_HEADER_FILE_NAME                                   = 'Header.html';
26            SKIN_FOOTER_FILE_NAME                                   = 'Footer.html';
27            SKIN_NEWRES_FILE_NAME                                   = 'NewRes.html';
28            SKIN_RES_FILE_NAME                                              = 'Res.html';
29            SKIN_BOOKMARK_FILE_NAME                         = 'Bookmark.html';
30            SKIN_NEWMARK_FILE_NAME                          = 'Newmark.html';
31            NGWORDs_DIR_NAME : String               = 'NGwords';
32            BOARD_PLUGIN_DIR_NAME                                   = 'BoardPlugin';
33            SAMBATIME_FILE_NAME : String    = 'Samba.ini';
34            IGNORE_FILE_NAME : String               = 'Ignore.txt';
35    //      DOLIB_LOGIN_URL     = '/~tora3n2c/futen.cgi';
36            MAX_POPUP_RES : Integer = 10;
37  type  type
38          TGikoTabPosition = (gtpTop, gtpBottom);                                                         // タブ位置          TGikoTabPosition = (gtpTop, gtpBottom);                                                         // タブ位置
39          TGikoTabAppend = (gtaFirst, gtpLast);                                                                   // タブ追加位置          TGikoTabAppend = (gtaFirst, gtpLast);                                                                   // タブ追加位置
# Line 23  type Line 46  type
46                                                                                                  gppRightBottom, gppBottom, gppLeftBottom);                                                                                                  gppRightBottom, gppBottom, gppLeftBottom);
47                                                                                                                                                                                                                                  //プレビューサイズ                                                                                                                                                                                                                                  //プレビューサイズ
48          TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall);          TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall);
49            TGikoBrowserAutoMaximize        = (gbmNone, gbmClick, gbmDoubleClick);
50                                                                                                                                                                                                                                    // ブラウザを自動的に最大化する条件
51            /// レス表示範囲。10 〜 65535 は最新 n レス扱い。
52            /// 将来 201-300 のような範囲を持たせる可能性も考えて上位 2 byte は予約。
53            TGikoResRange = (grrAll, grrSelect, grrKoko, grrNew);
54    
55            /// スレッド一覧表示範囲
56            TGikoThreadRange = (gtrAll, gtrSelect, gtrLog, gtrNew);
57    
58          //CoolBar設定レコード          //CoolBar設定レコード
59          TCoolSet = record          TCoolSet = record
# Line 75  type Line 106  type
106                  FBrowserFontSize: Integer;              // 0...default                  FBrowserFontSize: Integer;              // 0...default
107                  FBrowserFontBold: Integer;              // 0...default, -1...False, 1...True                  FBrowserFontBold: Integer;              // 0...default, -1...False, 1...True
108                  FBrowserFontItalic: Integer;    // 上に同じ                  FBrowserFontItalic: Integer;    // 上に同じ
109                  FBrowserFontColor: Integer;     // -1...default                  FBrowserFontColor: Integer;             // -1...default
110                  FBrowserBackColor: Integer;     // 上に同じ                  FBrowserBackColor: Integer;             // 上に同じ
111    
112                  //エディタ                  //エディタ
113                  FEditorFontName: string;                  FEditorFontName: string;
# Line 100  type Line 131  type
131                  FHintFontColor: TColor;                  FHintFontColor: TColor;
132                  FHintBackColor: TColor;                  FHintBackColor: TColor;
133    
   
134                  //ウィンドウサイズ                  //ウィンドウサイズ
135                  FWindowTop: Integer;                  FWindowTop: Integer;
136                  FWindowLeft: Integer;                  FWindowLeft: Integer;
# Line 155  type Line 185  type
185                  FEditWindowHeight: Integer;                  FEditWindowHeight: Integer;
186                  FEditWindowWidth: Integer;                  FEditWindowWidth: Integer;
187                  FEditWindowMax: Boolean;                  FEditWindowMax: Boolean;
188            FEditWindowStay: Boolean;
189            FEditWindowTranslucent: Boolean;
190    
191                  //リスト番号表示                  //リスト番号表示
192                  FListViewNo: Boolean;                  FListViewNo: Boolean;
# Line 162  type Line 194  type
194                  FUseCSS: Boolean;                  FUseCSS: Boolean;
195                  //CSSファイル名                  //CSSファイル名
196                  FCSSFileName: string;                  FCSSFileName: string;
197                    // スキン表示(一時的なもので ini に保存はされない)
198                    FUseSkin: Boolean;
199                  //mail欄表示                  //mail欄表示
200                  FShowMail: Boolean;                  FShowMail: Boolean;
201          //起動時最新100レス表示                  /// レス表示範囲
202          FOnlyAHundredRes : Boolean;                  FResRange                       : Longint;
203                    /// 起動時レス表示範囲の固定
204                    FResRangeHold   : Boolean;
205                    /// スレッド一覧表示範囲
206                    FThreadRange    : TGikoThreadRange;
207                  //非アクティブ時レスポップアップ表示                  //非アクティブ時レスポップアップ表示
208                  FUnActivePopup: Boolean;                  FUnActivePopup: Boolean;
209                  //レスポップアップヘッダーボールド                  //レスポップアップヘッダーボールド
# Line 178  type Line 216  type
216                  //リストカラムヘッダーサイズ                  //リストカラムヘッダーサイズ
217                  FBBSColumnWidth: array[0..0] of Integer;                  FBBSColumnWidth: array[0..0] of Integer;
218                  FCategoryColumnWidth: array[0..3] of Integer;                  FCategoryColumnWidth: array[0..3] of Integer;
219                  FBoardColumnWidth: array[0..6] of Integer;                  FBoardColumnWidth: array[0..7] of Integer;
220    
221                    //ソート順
222                    FBBSSortIndex: Integer;
223                    FBBSSortOrder: Boolean;
224                    FCategorySortIndex: Integer;
225                    FCategorySortOrder: Boolean;
226                    FBoardSortIndex: Integer;
227                    FBoardSortOrder: Boolean;
228    
229                    //Dat落ちスレソート順
230                    FDatOchiSortIndex: Integer;
231                    FDatOchiSortOrder: Boolean;
232    
233                  //絞込み文字列                  //絞込み文字列
234                  FSelectTextList: TStringList;                  FSelectTextList: TStringList;
235    
236                  //板一覧URL                  //板一覧URL
237                  //FBoardURL2ch: string;                  //FBoardURL2ch: string;
238          FBoardURLs: TStringList;                  FBoardURLs: TStringList;
239          FBoardURLSelected: Integer;                  FBoardURLSelected: Integer;
240    
241                  //ユーザID・パスワード                  //ユーザID・パスワード
242                  FUserID: string;                  FUserID: string;
243                  FPassword: string;                  FPassword: string;
244                  FAutoLogin: Boolean;                  FAutoLogin: Boolean;
245            FForcedLogin: Boolean;
246                    FDolibURL: string;
247    
248                  //URLクリック時起動アプリ                  //URLクリック時起動アプリ
249                  FURLApp: Boolean;                  FURLApp: Boolean;
# Line 226  type Line 278  type
278                  FPreviewSize: TGikoPreviewSize;                  FPreviewSize: TGikoPreviewSize;
279                  FPreviewWait: Integer;                  FPreviewWait: Integer;
280    
281                    // ブラウザ
282                    FBrowserAutoMaximize: TGikoBrowserAutoMaximize;
283    
284                  //スレッド一覧更新アイコン表示                  //スレッド一覧更新アイコン表示
285                  FListIconVisible: Boolean;                  FListIconVisible: Boolean;
286                    //取得数ではなく未取得を表示する
287                    FNonAcquiredCount: Boolean;
288    
289                                    //スレッド一覧でLogのあるスレッドのみスレ作成日を表示するか
290                                    FCreationTimeLogs: Boolean;
291            //スレッド一覧のスレ生成日で未来のスレの生成日を表示しない
292                    FFutureThread: Boolean;
293    
294                  //書き込み時マシン時間使用設定                  //書き込み時マシン時間使用設定
295                  FUseMachineTime: Boolean;                  FUseMachineTime: Boolean;
# Line 237  type Line 299  type
299                  //あぼ〜ん                  //あぼ〜ん
300                  FAbonDeleterlo : Boolean; //&rlo;を削るか                  FAbonDeleterlo : Boolean; //&rlo;を削るか
301                  FAbonReplaceul : Boolean; //<ul>タグを<br>タグに置換するか                  FAbonReplaceul : Boolean; //<ul>タグを<br>タグに置換するか
302                  FPopUpAbon     : Boolean; //レスポップアップ時のあぼ〜ん有効                  FPopUpAbon               : Boolean; //レスポップアップ時のあぼ〜ん有効
303                  FShowNGLinesNum : Boolean; //該当したNGワードファイルの行数を表示                  FShowNGLinesNum : Boolean; //該当したNGワードファイルの行数を表示
304                  FAddResAnchor : Boolean; //NGレスへのレスアンカーを追加する                  FAddResAnchor : Boolean; //NGレスへのレスアンカーを追加する
305            FDeleteSyria : Boolean; //シリア語ブラクラ対策
306    
307                  // スレッド絞込フィールドの幅                  // スレッド絞込フィールドの幅
308                  FSelectComboBoxWidth : Integer;                  FSelectComboBoxWidth : Integer;
# Line 250  type Line 313  type
313                  // 最後に選択されたキャビネット                  // 最後に選択されたキャビネット
314                  FCabinetIndex: Integer;                  FCabinetIndex: Integer;
315    
316          //終了時に確認ダイアログを表示するか                  //終了時に確認ダイアログを表示するか
317          FShowDialogForEnd : Boolean;                  FShowDialogForEnd : Boolean;
318                    //全てのタブ閉じるのときに確認ダイアログを表示する
319                    FShowDialogForAllTabClose: Boolean;
320                    //取得レス数とスレッドのレス数が異なったときに通常背景色と違った色の背景色を使用するか
321                    FUseOddColorOddResNum: Boolean;
322                    FOddColor: TColor;
323    
324            //Samba24対策機能を使うか
325            FUseSamba: Boolean;
326    
327                    //レスアンカーをクリックしてジャンプするか
328                    FResAnchorJamp: Boolean;
329    
330                    //Tab自動保存
331                    FTabAutoLoadSave : Boolean;
332                    // エディタ
333                    FSpaceToNBSP    : Boolean;      ///< 半角スペース、Tab を &nbsp; に置換
334                    FAmpToCharRef   : Boolean;      ///< '&' を &amp; に置換
335    
336                    //ブラウザタブ非表示の時のスレ一覧でのカーソルキー移動の無反応時間
337                    FSelectInterval : Integer;
338                    
339                  function GetMainCoolSet(Index: Integer): TCoolSet;                  function GetMainCoolSet(Index: Integer): TCoolSet;
340                  function GetBoardCoolSet(Index: Integer): TCoolSet;                  function GetBoardCoolSet(Index: Integer): TCoolSet;
341                  function GetBrowserCoolSet(Index: Integer): TCoolSet;                  function GetBrowserCoolSet(Index: Integer): TCoolSet;
# Line 274  type Line 357  type
357                  function Encrypt(s: string): string;                  function Encrypt(s: string): string;
358                  function Decrypt(s: string): string;                  function Decrypt(s: string): string;
359    
360          procedure MakeURLIniFile();                  procedure MakeURLIniFile();
361    
362                    procedure SetUseCSS( value: Boolean );
363                    procedure SetCSSFileName( fileName: string );
364          protected          protected
365    
366          public          public
367                  constructor Create;                  constructor Create;
368                  destructor Destroy; override;                  destructor Destroy; override;
369                  function GetFileName: string;                  function GetFileName: string;
370          function GetBoardURLFileName: string;                  function GetBoardURLFileName: string;
371                  procedure ReadSettingFile;                  procedure ReadSettingFile;
372          procedure ReadBoardURLsFile;                  procedure ReadBoardURLsFile;
373                  procedure WriteSystemSettingFile;                  procedure WriteSystemSettingFile;
374                  procedure WriteWindowSettingFile;                  procedure WriteWindowSettingFile;
375                  procedure WriteNameMailSettingFile;                  procedure WriteNameMailSettingFile;
376                  procedure WriteFolderSettingFile();                  procedure WriteFolderSettingFile();
377          procedure WriteBoardURLSettingFile;                  procedure WriteBoardURLSettingFile;
378                  function GetSoundCount: Integer;                  function GetSoundCount: Integer;
379                  function FindSoundFileName(Name: string): string;                  function FindSoundFileName(Name: string): string;
380    
381                    function GetBoardFileName: string;
382                    function GetCustomBoardFileName: string;
383                    function GetBoardDir: string;
384                    function GetHtmlTempFileName: string;
385                    function GetAppDir: string;
386                    function GetTempFolder: string;
387                    function GetSentFileName: string;
388                    function GetConfigDir: string;
389                    function GetSkinDir: string;
390                    function GetSkinHeaderFileName: string;
391                    function GetSkinFooterFileName: string;
392                    function GetSkinResFileName: string;
393                    function GetSkinNewResFileName: string;
394                    function GetSkinBookmarkFileName: string;
395                    function GetSkinNewmarkFileName: string;
396                    function GetStyleSheetDir: string;
397                    function GetOutBoxFileName: string;
398                    function GetNGWordsDir: string;
399                    function GetBoardPlugInDir: string;
400                    function GetSambaFileName: string;
401                    function GetIgnoreFileName: string;
402    
403                  //受信バッファサイズ                  //受信バッファサイズ
404                  property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize;                  property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize;
405                  //HTTP1.1使用                  //HTTP1.1使用
# Line 396  type Line 504  type
504                  property EditWindowHeight: Integer read FEditWindowHeight write FEditWindowHeight;                  property EditWindowHeight: Integer read FEditWindowHeight write FEditWindowHeight;
505                  property EditWindowWidth: Integer read FEditWindowWidth write FEditWindowWidth;                  property EditWindowWidth: Integer read FEditWindowWidth write FEditWindowWidth;
506                  property EditWindowMax: Boolean read FEditWindowMax write FEditWindowMax;                  property EditWindowMax: Boolean read FEditWindowMax write FEditWindowMax;
507                    property EditWindowStay: Boolean read FEditWindowStay write FEditWindowStay;
508                    property EditWindowTranslucent: Boolean read FEditWindowTranslucent write FEditWindowTranslucent;
509    
510                  property ListViewNo: Boolean read FListViewNo write FListViewNo;                  property ListViewNo: Boolean read FListViewNo write FListViewNo;
511                  property UseCSS: Boolean read FUseCSS write FUseCSS;                  property UseCSS: Boolean read FUseCSS write SetUseCSS;
512                  property CSSFileName: string read FCSSFileName write FCSSFileName;                  property CSSFileName: string read FCSSFileName write SetCSSFileName;
513                    property UseSkin: Boolean read FUseSkin;
514    
515                  property ShowMail: Boolean read FShowMail write FShowMail;                  property ShowMail: Boolean read FShowMail write FShowMail;
516          property OnlyAHundredRes : Boolean read FOnlyAHundredRes write FOnlyAHundredRes;                  property ResRange : Longint read FResRange write FResRange;
517                    property ResRangeHold : Boolean read FResRangeHold write FResRangeHold;
518                    property ThreadRange    : TGikoThreadRange read FThreadRange write FThreadRange;
519                  property UnActivePopup: Boolean read FUnActivePopup write FUnActivePopup;                  property UnActivePopup: Boolean read FUnActivePopup write FUnActivePopup;
520                  property ResPopupHeaderBold: Boolean read FResPopupHeaderBold write FResPopupHeaderBold;                  property ResPopupHeaderBold: Boolean read FResPopupHeaderBold write FResPopupHeaderBold;
521    
# Line 417  type Line 530  type
530                  property SoundViewName[index: Integer]: string read GetSoundViewName;                  property SoundViewName[index: Integer]: string read GetSoundViewName;
531                  property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName;                  property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName;
532    
533                    property BBSSortIndex: Integer read FBBSSortIndex write FBBSSortIndex;
534                    property BBSSortOrder: Boolean read FBBSSortOrder write FBBSSortOrder;
535                    property CategorySortIndex: Integer read FCategorySortIndex write FCategorySortIndex;
536                    property CategorySortOrder: Boolean read FCategorySortOrder write FCategorySortOrder;
537                    property BoardSortIndex: Integer read FBoardSortIndex write FBoardSortIndex;
538                    property BoardSortOrder: Boolean read FBoardSortOrder write FBoardSortOrder;
539    
540                    property DatOchiSortIndex: Integer read FDatOchiSortIndex write FDatOchiSortIndex;
541                    property DatOchiSortOrder: Boolean read FDatOchiSortOrder write FDatOchiSortOrder;
542    
543                  //property BoardURL2ch: string read FBoardURL2ch write FBoardURL2ch;                  //property BoardURL2ch: string read FBoardURL2ch write FBoardURL2ch;
544                  property BoardURLs: TStringList read FBoardURLs write FBoardURLs;                  property BoardURLs: TStringList read FBoardURLs write FBoardURLs;
545          property BoardURLSelected: Integer read FBoardURLSelected write FBoardURLSelected;                  property BoardURLSelected: Integer read FBoardURLSelected write FBoardURLSelected;
546                  property UserID: string read FUserID write FUserID;                  property UserID: string read FUserID write FUserID;
547                  property Password: string read FPassword write FPassword;                  property Password: string read FPassword write FPassword;
548                  property AutoLogin: Boolean read FAutoLogin write FAutoLogin;                  property AutoLogin: Boolean read FAutoLogin write FAutoLogin;
549                    property ForcedLogin: Boolean read FForcedLogin write FForcedLogin;
550                    property DolibURL: string read FDolibURL write FDolibURL;
551    
552                  property URLApp: Boolean read FURLApp write FURLApp;                  property URLApp: Boolean read FURLApp write FURLApp;
553                  property URLAppFile: string read FURLAppFile write FURLAppFile;                  property URLAppFile: string read FURLAppFile write FURLAppFile;
# Line 448  type Line 573  type
573                  property PreviewVisible: Boolean read FPreviewVisible write FPreviewVisible;                  property PreviewVisible: Boolean read FPreviewVisible write FPreviewVisible;
574                  property PreviewSize: TGikoPreviewSize read FPreviewSize write FPreviewSize;                  property PreviewSize: TGikoPreviewSize read FPreviewSize write FPreviewSize;
575                  property PreviewWait: Integer read FPreviewWait write FPreviewWait;                  property PreviewWait: Integer read FPreviewWait write FPreviewWait;
576                    property BrowserAutoMaximize: TGikoBrowserAutoMaximize read FBrowserAutoMaximize write FBrowserAutoMaximize;
577    
578                  property ListIconVisible: Boolean read FListIconVisible write FListIconVisible;                  property ListIconVisible: Boolean read FListIconVisible write FListIconVisible;
579                    property NonAcquiredCount: Boolean read FNonAcquiredCount write FNonAcquiredCount;
580                    property CreationTimeLogs: Boolean read FCreationTimeLogs write FCreationTimeLogs;
581                    property FutureThread: Boolean read FFutureThread write FFutureThread;
582    
583                  property UseMachineTime: Boolean read FUseMachineTime write FUseMachineTime;                  property UseMachineTime: Boolean read FUseMachineTime write FUseMachineTime;
584                  property TimeAdjustSec: Integer read FTimeAdjustSec write FTimeAdjustSec;                  property TimeAdjustSec: Integer read FTimeAdjustSec write FTimeAdjustSec;
585                  property TimeAdjust: Boolean read FTimeAdjust write FTimeAdjust;                  property TimeAdjust: Boolean read FTimeAdjust write FTimeAdjust;
586    
587          //あぼ〜ん                  //あぼ〜ん
588      property AbonDeleterlo : Boolean read FAbonDeleterlo write FAbonDeleterlo;                  property AbonDeleterlo : Boolean read FAbonDeleterlo write FAbonDeleterlo;
589      property AbonReplaceul : Boolean read FAbonReplaceul write FAbonReplaceul;                  property AbonReplaceul : Boolean read FAbonReplaceul write FAbonReplaceul;
590      property PopUpAbon     : Boolean read FPopUpAbon write FPopUpAbon;                  property PopUpAbon               : Boolean read FPopUpAbon write FPopUpAbon;
591          property ShowNGLinesNum : Boolean read FShowNGLinesNum write FShowNGLinesNum;                  property ShowNGLinesNum : Boolean read FShowNGLinesNum write FShowNGLinesNum;
592          property AddResAnchor : Boolean read FAddResAnchor write FAddResAnchor;                  property AddResAnchor : Boolean read FAddResAnchor write FAddResAnchor;
593                    property DeleteSyria : Boolean read FDeleteSyria write FDeleteSyria;
594      // スレッド絞込フィールドの幅                  // スレッド絞込フィールドの幅
595      property SelectComboBoxWidth : Integer read FSelectComboBoxWidth write FSelectComboBoxWidth;                  property SelectComboBoxWidth : Integer read FSelectComboBoxWidth write FSelectComboBoxWidth;
   
     // 最後に選択されたオプションダイアログのタブ  
     property OptionDialogTabIndex : Integer read FOptionDialogTabIndex write FOptionDialogTabIndex;  
   
     // 最後に選択されたキャビネット  
     property CabinetIndex : Integer read FCabinetIndex write FCabinetIndex;  
596    
597      //終了時に確認ダイアログを表示するか                  // 最後に選択されたオプションダイアログのタブ
598      property ShowDialogForEnd : Boolean read FShowDialogForEnd write FShowDialogForEnd;                  property OptionDialogTabIndex : Integer read FOptionDialogTabIndex write FOptionDialogTabIndex;
599    
600                    // 最後に選択されたキャビネット
601                    property CabinetIndex : Integer read FCabinetIndex write FCabinetIndex;
602    
603          end;                  //終了時に確認ダイアログを表示するか
604                    property ShowDialogForEnd : Boolean read FShowDialogForEnd write FShowDialogForEnd;
605                    property ShowDialogForAllTabClose: Boolean read FShowDialogForAllTabClose write FShowDialogForAllTabClose;
606                    //取得レス数とスレッドのレス数が異なったときに通常背景色と違った色の背景色を使用するか
607                    property UseOddColorOddResNum: Boolean read FUseOddColorOddResNum write FUseOddColorOddResNum;
608                    property OddColor: TColor read FOddColor write FOddColor;
609                    property UseSamba: Boolean read FUseSamba write FUseSamba;
610                    property ResAnchorJamp: Boolean read FResAnchorJamp write FResAnchorJamp;
611    
612                    // エディタ
613                    property SpaceToNBSP    : Boolean       read FSpaceToNBSP               write FSpaceToNBSP;
614                    property AmpToCharRef   : Boolean       read FAmpToCharRef      write FAmpToCharRef;
615    
616                    property SelectInterval : Integer       read FSelectInterval    write FSelectInterval;
617                    //Tab保存
618                    property TabAutoLoadSave: Boolean           read FTabAutoLoadSave      write FTabAutoLoadSave;
619    end;
620    
621    
622    
# Line 489  type Line 630  type
630          end;          end;
631    
632  const  const
633          INI_FILE_NAME: string         = 'gikoNavi.ini';          INI_FILE_NAME: string                            = 'gikoNavi.ini';
634      BOARD_URL_INI_FILE_NAME: string = 'url.ini';          BOARD_URL_INI_FILE_NAME: string = 'url.ini';
635          DEFAULT_FONT_NAME: string     = 'MS Pゴシック';          DEFAULT_FONT_NAME: string                = 'MS Pゴシック';
636          DEFAULT_FONT_SIZE: Integer    = 9;          DEFAULT_FONT_SIZE: Integer              = 9;
637          DEFAULT_FONT_COLOR: string    = 'clWindowText';          DEFAULT_FONT_COLOR: string              = 'clWindowText';
638          DEFAULT_WINDOW_COLOR: string  = 'clWindow';          DEFAULT_WINDOW_COLOR: string    = 'clWindow';
639          DEFAULT_TAB_FONT_NAME: string     = 'MS Pゴシック';          DEFAULT_TAB_FONT_NAME: string            = 'MS Pゴシック';
640          DEFAULT_TAB_FONT_SIZE: Integer    = 9;          DEFAULT_TAB_FONT_SIZE: Integer          = 9;
641          DEFAULT_2CH_BOARD_URL1: string = 'http://www6.ocn.ne.jp/~mirv/2chmenu.html';          DEFAULT_2CH_BOARD_URL1: string = 'http://www6.ocn.ne.jp/~mirv/2chmenu.html';
642      DEFAULT_2CH_BOARD_URL2: string = 'http://www.ff.iij4u.or.jp/~ch2/bbstable.html';          DEFAULT_2CH_BOARD_URL2: string = 'http://www.ff.iij4u.or.jp/~ch2/bbsmenu.html';
643                                         //http://menu.2ch.net/bbsmenu.html //もうすぐこれが正式な板一覧になるよう
644                                                                                                                                  //'http://www.2ch.net/newbbsmenu.html';                                                                                                                                  //'http://www.2ch.net/newbbsmenu.html';
645          GIKO_ENCRYPT_TEXT: string     = 'gikoNaviEncryptText';          GIKO_ENCRYPT_TEXT: string                = 'gikoNaviEncryptText';
646    
647  var  var
648          SOUND_NAME: array[0..4] of TSoundName = (          SOUND_NAME: array[0..4] of TSoundName = (
649                  (Name: 'New';        ViewName: '取得成功';           FileName: ''),                  (Name: 'New';                           ViewName: '取得成功';                                    FileName: ''),
650                  (Name: 'NewDiff';    ViewName: '取得成功(差分)';     FileName: ''),                  (Name: 'NewDiff';               ViewName: '取得成功(差分)';              FileName: ''),
651                  (Name: 'NoChange';   ViewName: '未更新';             FileName: ''),                  (Name: 'NoChange';       ViewName: '未更新';                                             FileName: ''),
652  //              (Name: 'RoundEnd';   ViewName: '巡回終了(取得あり)'; FileName: ''),  //              (Name: 'RoundEnd';       ViewName: '巡回終了(取得あり)'; FileName: ''),
653  //              (Name: 'RoundNone';  ViewName: '巡回終了(取得なし)'; FileName: ''),  //              (Name: 'RoundNone';     ViewName: '巡回終了(取得なし)'; FileName: ''),
654                  (Name: 'ResEnd';     ViewName: 'レス送信完了';       FileName: ''),                  (Name: 'ResEnd';                 ViewName: 'レス送信完了';                       FileName: ''),
655                  (Name: 'Error';      ViewName: 'エラー';             FileName: ''));                  (Name: 'Error';                 ViewName: 'エラー';                                              FileName: ''));
656    
657  //コンストラクタ  //コンストラクタ
658  constructor TSetting.Create();  constructor TSetting.Create();
# Line 518  begin Line 660  begin
660          FNameList := TStringList.Create;          FNameList := TStringList.Create;
661          FMailList := TStringList.Create;          FMailList := TStringList.Create;
662          FSelectTextList := TStringList.Create;          FSelectTextList := TStringList.Create;
663      FBoardURLs := TStringList.Create;          FBoardURLs := TStringList.Create;
664          FNameList.Duplicates := dupIgnore;          FNameList.Duplicates := dupIgnore;
665          FMailList.Duplicates := dupIgnore;          FMailList.Duplicates := dupIgnore;
666      FBoardURLs.Duplicates := dupIgnore;          FBoardURLs.Duplicates := dupIgnore;
667          FSelectTextList.Duplicates := dupIgnore;          FSelectTextList.Duplicates := dupIgnore;
668          ReadSettingFile();          ReadSettingFile();
669      ReadBoardURLsFile();          ReadBoardURLsFile();
670  end;  end;
671    
672  //デストラクタ  //デストラクタ
# Line 532  destructor TSetting.Destroy(); Line 674  destructor TSetting.Destroy();
674  begin  begin
675          inherited;          inherited;
676          FSelectTextList.Free;          FSelectTextList.Free;
677      FBoardURLs.Free;          FBoardURLs.Free;
678          FMailList.Free;          FMailList.Free;
679          FNameList.Free;          FNameList.Free;
680  end;  end;
# Line 553  end; Line 695  end;
695  procedure TSetting.ReadSettingFile();  procedure TSetting.ReadSettingFile();
696  const  const
697          DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140);          DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140);
698          DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130);          DEFAULT_CATEGORY_WIDTH: array[0..3] of Integer = (150, 80, 130, 130);
699          DEFAULT_BOARD_WIDTH: array[0..6] of Integer = (350, 60, 60, 60, 60, 80, 130);          DEFAULT_BOARD_WIDTH: array[0..7] of Integer = (350, 60, 60, 60, 60, 80, 130, 130);
700            MAX_WIDTH: Integer = 2000;
701  var  var
702          ini: TMemIniFile;          ini: TMemIniFile;
703          i: Integer;          i: Integer;
# Line 607  begin Line 750  begin
750                  FListFontItalic := ini.ReadBool('Window', 'ListFontItalic', False);                  FListFontItalic := ini.ReadBool('Window', 'ListFontItalic', False);
751                  FListFontColor := StringToColor(ini.ReadString('Window', 'ListFontColor', DEFAULT_FONT_COLOR));                  FListFontColor := StringToColor(ini.ReadString('Window', 'ListFontColor', DEFAULT_FONT_COLOR));
752                  FListBackColor := StringToColor(ini.ReadString('Window', 'ListBackColor', DEFAULT_WINDOW_COLOR));                  FListBackColor := StringToColor(ini.ReadString('Window', 'ListBackColor', DEFAULT_WINDOW_COLOR));
753                    FUseOddColorOddResNum := ini.ReadBool('Window','UseOddColor', False);
754                    FOddColor := StringToColor(ini.ReadString('Window', 'OddColor', DEFAULT_WINDOW_COLOR));
755    
756                  FEditorFontName := ini.ReadString('Window', 'EditorFontName', DEFAULT_FONT_NAME);                  FEditorFontName := ini.ReadString('Window', 'EditorFontName', DEFAULT_FONT_NAME);
757                  FEditorFontSize := ini.ReadInteger('Window', 'EditorFontSize', DEFAULT_FONT_SIZE);                  FEditorFontSize := ini.ReadInteger('Window', 'EditorFontSize', DEFAULT_FONT_SIZE);
# Line 643  begin Line 788  begin
788                  FEditWindowHeight := ini.ReadInteger('EditorWindowSize', 'Height', -1);                  FEditWindowHeight := ini.ReadInteger('EditorWindowSize', 'Height', -1);
789                  FEditWindowWidth := ini.ReadInteger('EditorWindowSize', 'Width', -1);                  FEditWindowWidth := ini.ReadInteger('EditorWindowSize', 'Width', -1);
790                  FEditWindowMax := ini.ReadBool('EditorWindowSize', 'Max', False);                  FEditWindowMax := ini.ReadBool('EditorWindowSize', 'Max', False);
791                    FEditWindowStay := ini.ReadBool('EditorWindowSize', 'Stay', False);
792                    FEditWindowTranslucent := ini.ReadBool('EditorWindowSize', 'Translucent', False);
793    
794      FOptionDialogTabIndex := ini.ReadInteger('OptionDialog', 'TabIndex', 0);                  FOptionDialogTabIndex := ini.ReadInteger('OptionDialog', 'TabIndex', 0);
795    
796                  //ツールバー                  //ツールバー
797                  FStdToolBarVisible := ini.ReadBool('ToolBar', 'StdVisible', True);                  FStdToolBarVisible := ini.ReadBool('ToolBar', 'StdVisible', True);
# Line 670  begin Line 817  begin
817    
818                  FCabinetVisible := ini.ReadBool('Cabinet', 'Visible', True);                  FCabinetVisible := ini.ReadBool('Cabinet', 'Visible', True);
819                  FCabinetWidth := ini.ReadInteger('Cabinet', 'Width', 200);                  FCabinetWidth := ini.ReadInteger('Cabinet', 'Width', 200);
820      FCabinetIndex := ini.ReadInteger('Cabinet', 'Index', 0);                  FCabinetIndex := ini.ReadInteger('Cabinet', 'Index', 0);
821    
822                  FListOrientation := TGikoListOrientation(ini.ReadInteger('List', 'Orientation', Ord(gloHorizontal)));                  FListOrientation := TGikoListOrientation(ini.ReadInteger('List', 'Orientation', Ord(gloHorizontal)));
823                  FListHeight := ini.ReadInteger('List', 'Height', 180);                  FListHeight := ini.ReadInteger('List', 'Height', 180);
# Line 713  begin Line 860  begin
860                          end;                          end;
861                          for i := 0 to Length(FBBSColumnWidth) - 1 do begin                          for i := 0 to Length(FBBSColumnWidth) - 1 do begin
862                                  BBSColumnWidth[i] := ini.ReadInteger('BBSColumnWidth', 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]);                                  BBSColumnWidth[i] := ini.ReadInteger('BBSColumnWidth', 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]);
863                                    if BBSColumnWidth[i] > MAX_WIDTH then
864                                            BBSColumnWidth[i] := DEFAULT_BBS_WIDTH[i];
865                          end;                          end;
866                          ini.ReadSection('CategoryColumnWidth', wkList);                          ini.ReadSection('CategoryColumnWidth', wkList);
867                          if Length(FCategoryColumnWidth) <> wkList.Count then begin                          if Length(FCategoryColumnWidth) <> wkList.Count then begin
# Line 720  begin Line 869  begin
869                          end;                          end;
870                          for i := 0 to Length(FCategoryColumnWidth) - 1 do begin                          for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
871                                  CategoryColumnWidth[i] := ini.ReadInteger('CategoryColumnWidth', 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]);                                  CategoryColumnWidth[i] := ini.ReadInteger('CategoryColumnWidth', 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]);
872                                    if CategoryColumnWidth[i] > MAX_WIDTH then
873                                            CategoryColumnWidth[i] := DEFAULT_CATEGORY_WIDTH[i];
874                          end;                          end;
875                          ini.ReadSection('BoardColumnWidth', wkList);                          ini.ReadSection('BoardColumnWidth', wkList);
876                          if Length(FBoardColumnWidth) <> wkList.Count then begin                          if Length(FBoardColumnWidth) <> wkList.Count then begin
# Line 727  begin Line 878  begin
878                          end;                          end;
879                          for i := 0 to Length(FBoardColumnWidth) - 1 do begin                          for i := 0 to Length(FBoardColumnWidth) - 1 do begin
880                                  BoardColumnWidth[i] := ini.ReadInteger('BoardColumnWidth', 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]);                                  BoardColumnWidth[i] := ini.ReadInteger('BoardColumnWidth', 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]);
881                                    if BoardColumnWidth[i] > MAX_WIDTH then
882                                            BoardColumnWidth[i] := DEFAULT_BOARD_WIDTH[i];
883                          end;                          end;
884                  finally                  finally
885                          wkList.Free;                          wkList.Free;
886                  end;                  end;
887    
   
888                  //リスト番号                  //リスト番号
889                  FListViewNo := ini.ReadBool('Function', 'ListViewNo', True);                  FListViewNo := ini.ReadBool('Function', 'ListViewNo', True);
890                  //CSS                  //CSS
891                  FUseCSS := ini.ReadBool('CSS', 'UseCSS', True);                  UseCSS := ini.ReadBool('CSS', 'UseCSS', True);
892                  //CSSファイル名                  //CSSファイル名
893                  FCSSFileName := ini.ReadString('CSS', 'FileName', 'default.css');                  CSSFileName := ini.ReadString('CSS', 'FileName', 'default.css');
894    
895                  //Mail欄表示                  //Mail欄表示
896                  FShowMail := ini.ReadBool('Thread', 'ShowMail', True);                  FShowMail := ini.ReadBool('Thread', 'ShowMail', True);
897          //最新100レス表示                  // レス表示範囲
898          FOnlyAHundredRes := ini.ReadBool('Thread', 'OnlyAHundredRes',false);                  if ini.ReadBool('Thread', 'OnlyAHundredRes',false) then
899                            FResRange := 100        // 古い設定の互換用
900                    else
901                            FResRange := ini.ReadInteger( 'Thread', 'ResRange', Ord( grrAll ) );
902                    FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False );
903                    // スレッド一覧表示範囲
904                    FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) );
905                  //非アクティブ時レスポップアップ表示                  //非アクティブ時レスポップアップ表示
906                  FUnActivePopup := ini.ReadBool('Thread', 'UnActivePopup', False);                  FUnActivePopup := ini.ReadBool('Thread', 'UnActivePopup', False);
907                  //レスポップアップヘッダーボールド                  //レスポップアップヘッダーボールド
908                  FResPopupHeaderBold := ini.ReadBool('Thread', 'ResPopupHeaderBold', True);                  FResPopupHeaderBold := ini.ReadBool('Thread', 'ResPopupHeaderBold', True);
   
909                  //削除確認                  //削除確認
910                  FDeleteMsg := ini.ReadBool('Function', 'LogDeleteMessage', True);                  FDeleteMsg := ini.ReadBool('Function', 'LogDeleteMessage', True);
911          //終了確認                  //終了確認
912              FShowDialogForEnd := ini.ReadBool('Function','ShowDialogForEnd',false);                  FShowDialogForEnd := ini.ReadBool('Function','ShowDialogForEnd',false);
913                    //AllTabClose
914                    FShowDialogForAllTabClose := ini.ReadBool('Function','ShowDialogForAllTabClose',false);
915                    //Samba
916                    FUseSamba := ini.ReadBool('Function','UseSamba', True);
917                    //ResAnchorjamp
918                    ResAnchorJamp := ini.ReadBool('Function', 'ResAnchoJamp', True);
919                  //ログフォルダ                  //ログフォルダ
920                  FLogFolder := ini.ReadString('Folder', 'LogFolder', ExtractFilePath(Application.ExeName) + 'Log');                  FLogFolder := ini.ReadString('Folder', 'LogFolder', ExtractFilePath(Application.ExeName) + 'Log');
921                  NewLogFolder := '';                  NewLogFolder := '';
922    
923                  //板URL                  //板URL
924          //複数登録できるようにしてFBoardURLsにした 2003/10/05                  //複数登録できるようにしてFBoardURLsにした 2003/10/05
925                  //FBoardURL2ch := ini.ReadString('BoardURL', '2ch', DEFAULT_2CH_BOARD_URL);                  //FBoardURL2ch := ini.ReadString('BoardURL', '2ch', DEFAULT_2CH_BOARD_URL);
926    
927                  //認証用ユーザID・パスワード                  //認証用ユーザID・パスワード
928                  FUserID := ini.ReadString('Attestation', 'UserID', '');                  FUserID := ini.ReadString('Attestation', 'UserID', '');
929                  FPassword := Decrypt(ini.ReadString('Attestation', 'Password', ''));                  FPassword := Decrypt(ini.ReadString('Attestation', 'Password', ''));
930                  FAutoLogin := ini.ReadBool('Attestation', 'AutoLogin', False);                  FAutoLogin := ini.ReadBool('Attestation', 'AutoLogin', False);
931                    FForcedLogin := ini.ReadBool('Attestation', 'FForcedLogin', False);
932    //              FDolibURL       := ini.ReadString('Attestation', 'FDolibURL', DOLIB_LOGIN_URL);
933    
934                  //URLクリック時起動アプリ                  //URLクリック時起動アプリ
935                  FURLApp := ini.ReadBool('URLApp', 'Select', False);                  FURLApp := ini.ReadBool('URLApp', 'Select', False);
# Line 788  begin Line 952  begin
952                  FPreviewSize := TGikoPreviewSize(ini.ReadInteger('Browser', 'PreviewSize', Ord(gpsMedium)));                  FPreviewSize := TGikoPreviewSize(ini.ReadInteger('Browser', 'PreviewSize', Ord(gpsMedium)));
953                  FPreviewWait := ini.ReadInteger('Browser', 'PreviewWait', 500);                  FPreviewWait := ini.ReadInteger('Browser', 'PreviewWait', 500);
954    
955                    // ブラウザ
956                    FBrowserAutoMaximize := TGikoBrowserAutoMaximize(
957                            ini.ReadInteger('Window', 'BrowserAutoMaximize', Ord(gbmDoubleClick)) );
958    
959                  //スレッド一覧更新アイコン                  //スレッド一覧更新アイコン
960                  FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True);                  FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True);
961                    FNonAcquiredCount := ini.ReadBool('ThreadList', 'NonAcquiredCount', False);
962                    FCreationTimeLogs := ini.ReadBool('ThreadList', 'CreationTimeLogs', True);
963                    FFutureThread := ini.ReadBool('ThreadList', 'FutureThread', True);
964                    FSelectInterval := ini.ReadInteger('ThreadList', 'SelectInterval', 110);
965                    //ソート順
966                    FBBSSortIndex := ini.ReadInteger('ThreadList', 'BBSSortIndex', 0);
967                    FBBSSortOrder := ini.ReadBool('ThreadList', 'BBSSortOrder', True);
968                    FCategorySortIndex := ini.ReadInteger('ThreadList', 'CategorySortIndex', 0);
969                    FCategorySortOrder := ini.ReadBool('ThreadList', 'CategorySortOrder', True);
970                    FBoardSortIndex := ini.ReadInteger('ThreadList', 'BoardSortIndex', 0);
971                    FBoardSortOrder := ini.ReadBool('ThreadList', 'BoardSortOrder', True);
972                    //Dat落ちスレソート順
973                    FDatOchiSortIndex := ini.ReadInteger('ThreadList', 'DatOchiSortIndex', -1);
974                    FDatOchiSortOrder := ini.ReadBool('ThreadList', 'DatOchiSortOrder', False);
975    
976                  //書き込み時マシン時刻使用設定                  //書き込み時マシン時刻使用設定
977                  FUseMachineTime := ini.ReadBool('PostTime', 'UseMachineTime', False);                  FUseMachineTime := ini.ReadBool('PostTime', 'UseMachineTime', False);
# Line 819  begin Line 1001  begin
1001                          CoolSet.FCoolBreak := ini.ReadBool('MainCoolBar', 'Break' + IntToStr(i), False);                          CoolSet.FCoolBreak := ini.ReadBool('MainCoolBar', 'Break' + IntToStr(i), False);
1002                          MainCoolSet[i] := CoolSet;                          MainCoolSet[i] := CoolSet;
1003                  end;                  end;
1004      FSelectComboBoxWidth := ini.ReadInteger( 'ListCoolBar', 'SelectWidth', 127 );                  FSelectComboBoxWidth := ini.ReadInteger( 'ListCoolBar', 'SelectWidth', 127 );
1005                  for i := 0 to LIST_COOLBAND_COUNT - 1 do begin                  for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1006                          CoolSet.FCoolID := ini.ReadInteger('ListCoolBar', 'ID' + IntToStr(i), -1);                          CoolSet.FCoolID := ini.ReadInteger('ListCoolBar', 'ID' + IntToStr(i), -1);
1007                          CoolSet.FCoolWidth := ini.ReadInteger('ListCoolBar', 'Width' + IntToStr(i), -1);                          CoolSet.FCoolWidth := ini.ReadInteger('ListCoolBar', 'Width' + IntToStr(i), -1);
# Line 833  begin Line 1015  begin
1015                          BrowserCoolSet[i] := CoolSet;                          BrowserCoolSet[i] := CoolSet;
1016                  end;                  end;
1017    
1018      //あぼ〜ん                  //あぼ〜ん
1019      FAbonDeleterlo := ini.ReadBool('Abon','Deleterlo',false);                  FAbonDeleterlo := ini.ReadBool('Abon','Deleterlo',false);
1020      FAbonReplaceul := ini.ReadBool('Abon','Replaceul',false);                  FAbonReplaceul := ini.ReadBool('Abon','Replaceul',false);
1021      FPopUpAbon     := ini.ReadBool('Abon','Popup',false);                  FPopUpAbon               := ini.ReadBool('Abon','Popup',false);
1022      FShowNGLinesNum := ini.ReadBool('Abon','ShowNGLines',false);                  FShowNGLinesNum := ini.ReadBool('Abon','ShowNGLines',false);
1023      FAddResAnchor := ini.ReadBool('Abon','AddResAnchor',false);                  FAddResAnchor := ini.ReadBool('Abon','AddResAnchor',false);
1024                    FDeleteSyria :=  ini.ReadBool('Abon','DeleteSyria',false);
1025    
1026                    // エディタ
1027                    FSpaceToNBSP    := ini.ReadBool( 'Editor', 'SpaceToNBSP', True );
1028                    FAmpToCharRef   := ini.ReadBool( 'Editor', 'AmpToCharRef', False );
1029    
1030                    //Tab自動保存、読み込み
1031                    FTabAutoLoadSave    := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False);
1032    
1033    
1034          finally          finally
# Line 849  end; Line 1039  end;
1039  procedure TSetting.ReadBoardURLsFile();  procedure TSetting.ReadBoardURLsFile();
1040  var  var
1041          ini: TMemIniFile;          ini: TMemIniFile;
1042      urlNum: Integer;          urlNum: Integer;
1043      i : Integer;          i : Integer;
1044  begin  begin
1045      if not FileExists(GetBoardURLFileName()) then          if not FileExists(GetBoardURLFileName()) then
1046              MakeURLIniFile();          MakeURLIniFile();
1047          ini := TMemIniFile.Create(GetBoardURLFileName());          ini := TMemIniFile.Create(GetBoardURLFileName());
1048      try          try
1049          urlNum := ini.ReadInteger('URL','count',0);                  urlNum := ini.ReadInteger('URL','count',0);
1050          BoardURLSelected := ini.ReadInteger('URL','selected',0);                  BoardURLSelected := ini.ReadInteger('URL','selected',0);
1051          for i := 0 to urlNum - 1 do begin                  for i := 0 to urlNum - 1 do begin
1052                  FBoardURLs.Append(ini.ReadString('URL',IntToStr(i+1),''));                          FBoardURLs.Append(ini.ReadString('URL',IntToStr(i+1),''));
1053          end;                  end;
1054      finally          finally
1055          ini.Free;                  ini.Free;
1056      end;          end;
1057    
1058  end;  end;
1059  //設定ファイル保存(system)  //設定ファイル保存(system)
# Line 909  begin Line 1099  begin
1099                  ini.WriteInteger('Window', 'ListFontSize', FListFontSize);                  ini.WriteInteger('Window', 'ListFontSize', FListFontSize);
1100                  ini.WriteString('Window', 'ListFontColor', ColorToString(FListFontColor));                  ini.WriteString('Window', 'ListFontColor', ColorToString(FListFontColor));
1101                  ini.WriteString('Window', 'ListBackColor', ColorToString(FListBackColor));                  ini.WriteString('Window', 'ListBackColor', ColorToString(FListBackColor));
1102                    ini.WriteBool('Window','UseOddColor',FUseOddColorOddResNum);
1103                    ini.WriteString('Window', 'OddColor',ColorToString(FOddColor));
1104    
1105                  ini.WriteString('Window', 'EditorFontName', FEditorFontName);                  ini.WriteString('Window', 'EditorFontName', FEditorFontName);
1106                  ini.WriteInteger('Window', 'EditorFontSize', FEditorFontSize);                  ini.WriteInteger('Window', 'EditorFontSize', FEditorFontSize);
# Line 953  begin Line 1145  begin
1145                  ini.WriteInteger('EditorWindowSize', 'Height', EditWindowHeight);                  ini.WriteInteger('EditorWindowSize', 'Height', EditWindowHeight);
1146                  ini.WriteInteger('EditorWindowSize', 'Width', EditWindowWidth);                  ini.WriteInteger('EditorWindowSize', 'Width', EditWindowWidth);
1147                  ini.WriteBool('EditorWindowSize', 'Max', EditWindowMax);                  ini.WriteBool('EditorWindowSize', 'Max', EditWindowMax);
1148                    ini.WriteBool('EditorWindowSize', 'Stay', EditWindowStay);
1149                    ini.WriteBool('EditorWindowSize', 'Translucent', EditWindowTranslucent);
1150    
1151      ini.WriteInteger('OptionDialog', 'TabIndex', FOptionDialogTabIndex);                  ini.WriteInteger('OptionDialog', 'TabIndex', FOptionDialogTabIndex);
1152    
1153                  //ツールバー                  //ツールバー
1154                  ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible);                  ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible);
# Line 984  begin Line 1178  begin
1178                  //キャビネット                  //キャビネット
1179                  ini.WriteBool('Cabinet', 'Visible', FCabinetVisible);                  ini.WriteBool('Cabinet', 'Visible', FCabinetVisible);
1180                  ini.WriteInteger('Cabinet', 'Width', FCabinetWidth);                  ini.WriteInteger('Cabinet', 'Width', FCabinetWidth);
1181      ini.WriteInteger('Cabinet', 'Index', FCabinetIndex);                  ini.WriteInteger('Cabinet', 'Index', FCabinetIndex);
1182    
1183                  //リストのサイズと垂直水平                  //リストのサイズと垂直水平
1184                  ini.WriteInteger('List', 'Orientation', Ord(FListOrientation));                  ini.WriteInteger('List', 'Orientation', Ord(FListOrientation));
# Line 1006  begin Line 1200  begin
1200                  ini.WriteString('CSS', 'FileName', FCSSFileName);                  ini.WriteString('CSS', 'FileName', FCSSFileName);
1201                  //Mail欄表示                  //Mail欄表示
1202                  ini.WriteBool('Thread', 'ShowMail', FShowMail);                  ini.WriteBool('Thread', 'ShowMail', FShowMail);
1203          //最新100レス表示                  // レス表示範囲
1204          ini.WriteBool('Thread', 'OnlyAHundredRes', FOnlyAHundredRes);                  ini.DeleteKey( 'Thread', 'OnlyAHundredRes' );   // 古い設定の削除
1205                    ini.WriteInteger('Thread', 'ResRange', FResRange);
1206                    ini.WriteBool('Thread', 'ResRangeHold', FResRangeHold);
1207                    // スレッド一覧表示範囲
1208                    ini.WriteInteger('ThreadList', 'ThreadRange', Ord( FThreadRange ));
1209                  //ログ削除確認                  //ログ削除確認
1210                  ini.WriteBool('Function', 'LogDeleteMessage', FDeleteMsg);                  ini.WriteBool('Function', 'LogDeleteMessage', FDeleteMsg);
1211          //終了確認                  //終了確認
1212              ini.WriteBool('Function','ShowDialogForEnd',FShowDialogForEnd);                  ini.WriteBool('Function','ShowDialogForEnd',FShowDialogForEnd);
1213                    //AllTabClose
1214                    ini.WriteBool('Function','ShowDialogForAllTabClose', FShowDialogForAllTabClose);
1215                    //Samba
1216                    ini.WriteBool('Function','UseSamba', FUseSamba);
1217                    //ResAnchorjamp
1218                    ini.WriteBool('Function', 'ResAnchoJamp', ResAnchorJamp);
1219    
1220                  //非アクティブ時ポップアップ表示                  //非アクティブ時ポップアップ表示
1221                  ini.WriteBool('Thread', 'UnActivePopup', FUnActivePopup);                  ini.WriteBool('Thread', 'UnActivePopup', FUnActivePopup);
1222                  //レスポップアップヘッダーボールド                  //レスポップアップヘッダーボールド
1223                  ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold);                  ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold);
   
1224                  //ini.WriteString('BoardURL', '2ch', FBoardURL2ch);                  //ini.WriteString('BoardURL', '2ch', FBoardURL2ch);
1225    
1226                  //認証用ユーザID・パスワード                  //認証用ユーザID・パスワード
1227                  ini.WriteString('Attestation', 'UserID', FUserID);                  ini.WriteString('Attestation', 'UserID', FUserID);
1228                  ini.WriteString('Attestation', 'Password', Encrypt(FPassword));                  ini.WriteString('Attestation', 'Password', Encrypt(FPassword));
1229                  ini.WriteBool('Attestation', 'AutoLogin', FAutoLogin);                  ini.WriteBool('Attestation', 'AutoLogin', FAutoLogin);
1230                    ini.WriteBool('Attestation', 'FForcedLogin', FForcedLogin);
1231                    ini.WriteString('Attestation', 'FDolibURL', FDolibURL);
1232    
1233                  //URLクリック時起動アプリ                  //URLクリック時起動アプリ
1234                  ini.WriteBool('URLApp', 'Select', FURLApp);                  ini.WriteBool('URLApp', 'Select', FURLApp);
# Line 1044  begin Line 1250  begin
1250                  ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible);                  ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible);
1251                  ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize));                  ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize));
1252                  ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait);                  ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait);
1253                    ini.WriteInteger('Browser', 'AutoMaximize', Ord( FBrowserAutoMaximize ) );
1254    
1255                  //スレッド一覧更新アイコン                  //スレッド一覧更新アイコン
1256                  ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible);                  ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible);
1257                    ini.WriteBool('ThreadList', 'NonAcquiredCount', FNonAcquiredCount);
1258                    ini.WriteBool('ThreadList', 'CreationTimeLogs',FCreationTimeLogs);
1259                    ini.WriteBool('ThreadList', 'FutureThread', FFutureThread);
1260                    ini.WriteInteger('ThreadList', 'SelectInterval', FSelectInterval);
1261                    //ソート順
1262                    ini.WriteInteger('ThreadList', 'BBSSortIndex', FBBSSortIndex);
1263                    ini.WriteBool('ThreadList', 'BBSSortOrder', FBBSSortOrder);
1264                    ini.WriteInteger('ThreadList', 'CategorySortIndex', FCategorySortIndex);
1265                    ini.WriteBool('ThreadList', 'CategorySortOrder', FCategorySortOrder);
1266                    ini.WriteInteger('ThreadList', 'BoardSortIndex', FBoardSortIndex);
1267                    ini.WriteBool('ThreadList', 'BoardSortOrder', FBoardSortOrder);
1268                    ini.WriteInteger('ThreadList', 'DatOchiSortIndex', FDatOchiSortIndex);
1269                    ini.WriteBool('ThreadList', 'DatOchiSortOrder', FDatOchiSortOrder);
1270    
1271                  //書き込み時マシン時刻使用設定                  //書き込み時マシン時刻使用設定
1272                  ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime);                  ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime);
# Line 1080  begin Line 1300  begin
1300                          ini.WriteBool('MainCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);                          ini.WriteBool('MainCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1301                  end;                  end;
1302                  ini.EraseSection('ListCoolBar');                  ini.EraseSection('ListCoolBar');
1303      ini.WriteInteger( 'ListCoolBar', 'SelectWidth', FSelectComboBoxWidth );                  ini.WriteInteger( 'ListCoolBar', 'SelectWidth', FSelectComboBoxWidth );
1304                  for i := 0 to LIST_COOLBAND_COUNT - 1 do begin                  for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1305                          CoolSet := ListCoolSet[i];                          CoolSet := ListCoolSet[i];
1306                          ini.WriteInteger('ListCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);                          ini.WriteInteger('ListCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
# Line 1098  begin Line 1318  begin
1318                  //あぼ〜ん                  //あぼ〜ん
1319                  ini.WriteBool('Abon','Deleterlo',FAbonDeleterlo);                  ini.WriteBool('Abon','Deleterlo',FAbonDeleterlo);
1320                  ini.WriteBool('Abon','Replaceul',FAbonReplaceul);                  ini.WriteBool('Abon','Replaceul',FAbonReplaceul);
1321          ini.WriteBool('Abon','Popup',FPopUpAbon);                                  ini.WriteBool('Abon','Popup',FPopUpAbon);
1322                  ini.WriteBool('Abon','ShowNGLines',FShowNGLinesNum);                  ini.WriteBool('Abon','ShowNGLines',FShowNGLinesNum);
1323                  ini.WriteBool('Abon','AddResAnchor',FAddResAnchor);                  ini.WriteBool('Abon','AddResAnchor',FAddResAnchor);
1324                                    ini.WriteBool('Abon','DeleteSyria',FDeleteSyria);
1325    
1326                    // エディタ
1327                    ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP );
1328                    ini.WriteBool( 'Editor', 'AmpToCharRef', FAmpToCharRef );
1329    
1330                    ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave);
1331    
1332                  ini.UpdateFile;                  ini.UpdateFile;
1333          finally          finally
# Line 1159  end; Line 1386  end;
1386  procedure TSetting.WriteBoardURLSettingFile();  procedure TSetting.WriteBoardURLSettingFile();
1387  var  var
1388          ini: TMemIniFile;          ini: TMemIniFile;
1389      i : Integer;                  i : Integer;
1390      oldcount : Integer;                  oldcount : Integer;
1391  begin  begin
1392          ini := TMemIniFile.Create(GetBoardURLFileName());          ini := TMemIniFile.Create(GetBoardURLFileName());
1393          try          try
1394          oldcount := ini.ReadInteger('URL','count',FBoardURLs.Count);                  oldcount := ini.ReadInteger('URL','count',FBoardURLs.Count);
1395          ini.WriteInteger('URL','count',FBoardURLs.Count);                  ini.WriteInteger('URL','count',FBoardURLs.Count);
1396          ini.WriteInteger('URL','selected',BoardURLSelected);                  ini.WriteInteger('URL','selected',BoardURLSelected);
1397          for i := 0 to FBoardURLs.Count -1 do begin                  for i := 0 to FBoardURLs.Count -1 do begin
1398              ini.WriteString('URL',IntToStr(i+1),FBoardURLs.Strings[i]);                                          ini.WriteString('URL',IntToStr(i+1),FBoardURLs.Strings[i]);
1399          end;                  end;
1400          if oldcount > FBoardURLs.Count then begin                  if oldcount > FBoardURLs.Count then begin
1401                  for i := FBoardURLs.Count to oldcount do begin                          for i := FBoardURLs.Count to oldcount do begin
1402                  ini.DeleteKey('URL',IntToStr(i+1));                                  ini.DeleteKey('URL',IntToStr(i+1));
1403              end;                          end;
1404          end;                  end;
1405                  ini.UpdateFile;                  ini.UpdateFile;
1406          finally          finally
1407                  ini.Free;                  ini.Free;
1408          end;          end;
1409  end;  end;
1410    
1411    {$R-}
1412  //リストカラムヘッダー  //リストカラムヘッダー
1413  function TSetting.GetBBSColumnWidth(index: Integer): Integer;  function TSetting.GetBBSColumnWidth(index: Integer): Integer;
1414  begin  begin
# Line 1196  function TSetting.GetBoardColumnWidth(in Line 1424  function TSetting.GetBoardColumnWidth(in
1424  begin  begin
1425          Result := IfThen(index in [0..Length(FBoardColumnWidth) - 1], FBoardColumnWidth[index], 0);          Result := IfThen(index in [0..Length(FBoardColumnWidth) - 1], FBoardColumnWidth[index], 0);
1426  end;  end;
1427    {$IFDEF DEBUG}
1428    {$R+}
1429    {$ENDIF}
1430    
1431  procedure TSetting.SetBBSColumnWidth(index: Integer; value: Integer);  procedure TSetting.SetBBSColumnWidth(index: Integer; value: Integer);
1432  begin  begin
# Line 1366  var Line 1597  var
1597  begin  begin
1598          ini := TMemIniFile.Create(GetBoardURLFileName());          ini := TMemIniFile.Create(GetBoardURLFileName());
1599          try          try
1600          ini.WriteInteger('URL','count',2);                  ini.WriteInteger('URL','count',2);
1601          ini.WriteInteger('URL','selected',2);                  ini.WriteInteger('URL','selected',2);
1602          ini.WriteString('URL','1',DEFAULT_2CH_BOARD_URL1);                  ini.WriteString('URL','1',DEFAULT_2CH_BOARD_URL1);
1603          ini.WriteString('URL','2',DEFAULT_2CH_BOARD_URL2);                  ini.WriteString('URL','2',DEFAULT_2CH_BOARD_URL2);
1604                  ini.UpdateFile;                  ini.UpdateFile;
1605          finally          finally
1606                  ini.Free;                  ini.Free;
1607          end;          end;
1608  end;  end;
1609    
1610    (*************************************************************************
1611     *ボードファイル名取得(パス+ファイル名)
1612     *************************************************************************)
1613    function TSetting.GetBoardFileName: string;
1614    begin
1615            Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_FILE_NAME;
1616    end;
1617    
1618    (*************************************************************************
1619     *ボードファイル名取得(パス+ファイル名)
1620     *************************************************************************)
1621    function TSetting.GetCustomBoardFileName: string;
1622    begin
1623            Result := GetAppDir + CONFIG_DIR_NAME + '\' + CUSTOMBOARD_FILE_NAME;
1624    end;
1625    
1626    (*************************************************************************
1627     *ボードディレクトリ取得
1628     *************************************************************************)
1629    function TSetting.GetBoardDir: string;
1630    begin
1631            Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_DIR_NAME + '\';
1632    end;
1633    
1634    (*************************************************************************
1635     *テンポラリフォルダー名取得
1636     *************************************************************************)
1637    function TSetting.GetHtmlTempFileName: string;
1638    begin
1639            Result := TEMP_FOLDER;
1640    end;
1641    
1642    
1643    (*************************************************************************
1644     *実行ファイルフォルダ取得
1645     *************************************************************************)
1646    function TSetting.GetAppDir: string;
1647    begin
1648            Result := ExtractFilePath(Application.ExeName);
1649    end;
1650    
1651    (*************************************************************************
1652     *TempHtmlファイル名取得(パス+ファイル名)
1653     *************************************************************************)
1654    function TSetting.GetTempFolder: string;
1655    begin
1656            Result := GetAppDir + TEMP_FOLDER;
1657    end;
1658    
1659    (*************************************************************************
1660     *sent.iniファイル名取得(パス+ファイル名)
1661     *************************************************************************)
1662    function TSetting.GetSentFileName: string;
1663    begin
1664            Result := GetAppDir + SENT_FILE_NAME;
1665    end;
1666    
1667    (*************************************************************************
1668     *outbox.iniファイル名取得(パス+ファイル名)
1669     *************************************************************************)
1670    function TSetting.GetOutBoxFileName: string;
1671    begin
1672            Result := GetAppDir + OUTBOX_FILE_NAME;
1673    end;
1674    
1675    (*************************************************************************
1676     *Configフォルダ取得
1677     *************************************************************************)
1678    function TSetting.GetConfigDir: string;
1679    begin
1680            Result := IncludeTrailingPathDelimiter(GetAppDir + CONFIG_DIR_NAME);
1681    end;
1682    
1683    function TSetting.GetStyleSheetDir: string;
1684    begin
1685            Result := IncludeTrailingPathDelimiter(GetConfigDir + CSS_DIR_NAME);
1686    end;
1687    
1688    function TSetting.GetSkinDir: string;
1689    begin
1690            Result := IncludeTrailingPathDelimiter(GetConfigDir + SKIN_DIR_NAME);
1691    end;
1692    
1693    function TSetting.GetSkinHeaderFileName: string;
1694    begin
1695            Result := CSSFileName + SKIN_HEADER_FILE_NAME;
1696    end;
1697    
1698    function TSetting.GetSkinFooterFileName: string;
1699    begin
1700            Result := CSSFileName + SKIN_FOOTER_FILE_NAME;
1701    end;
1702    
1703    function TSetting.GetSkinNewResFileName: string;
1704    begin
1705            Result := CSSFileName + SKIN_NEWRES_FILE_NAME;
1706    end;
1707    
1708    function TSetting.GetSkinResFileName: string;
1709    begin
1710            Result := CSSFileName + SKIN_RES_FILE_NAME;
1711    end;
1712    
1713    function TSetting.GetSkinBookmarkFileName: string;
1714    begin
1715            Result := CSSFileName + SKIN_BOOKMARK_FILE_NAME;
1716    end;
1717    
1718    function TSetting.GetSkinNewmarkFileName: string;
1719    begin
1720            Result := CSSFileName + SKIN_NEWMARK_FILE_NAME;
1721    end;
1722    
1723    function TSetting.GetNGWordsDir: string;
1724    begin
1725            Result := IncludeTrailingPathDelimiter(GetConfigDir + NGWORDs_DIR_NAME);
1726    end;
1727    
1728    function TSetting.GetBoardPlugInDir: string;
1729    begin
1730            Result := IncludeTrailingPathDelimiter(GetConfigDir + BOARD_PLUGIN_DIR_NAME);
1731    end;
1732    
1733    procedure TSetting.SetUseCSS( value: Boolean );
1734    begin
1735    
1736            FUseCSS := value;
1737    
1738            FUseSkin :=
1739                    UseCSS and
1740                    (Pos( GetSkinDir, CSSFileName ) > 0) and
1741                    FileExists( GetSkinHeaderFileName );
1742    
1743    end;
1744    
1745    procedure TSetting.SetCSSFileName( fileName: string );
1746    begin
1747    
1748            FCSSFileName := fileName;
1749    
1750            FUseSkin :=
1751                    UseCSS and
1752                    (Pos( GetSkinDir, CSSFileName ) > 0) and
1753                    FileExists( GetSkinHeaderFileName );
1754    
1755    end;
1756    
1757    function TSetting.GetSambaFileName: string;
1758    begin
1759            Result := GetAppDir + SAMBATIME_FILE_NAME;
1760    end;
1761    //板更新除外カテゴリリスト保存ファイル
1762    function TSetting.GetIgnoreFileName: string;
1763    begin
1764            Result := GetConfigDir + IGNORE_FILE_NAME;
1765    end;
1766    
1767  end.  end.
1768    
1769    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.13.2.2

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26