• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

ギコナビ


Commit MetaInfo

Revisionc4f79022b38cb55e104327f315dc94794a693744 (tree)
Time2007-07-03 00:01:47
Authorh677 <h677>
Commiterh677

Log Message

ファイルパス関連の整理中

Change Summary

Incremental Difference

--- a/ExternalThreadItem.pas
+++ b/ExternalThreadItem.pas
@@ -316,13 +316,13 @@ begin
316316 if inIsNew then
317317 Result := CreateResultString( HTMLCreater.SkinedRes(
318318 HTMLCreater.LoadFromSkin(
319- GikoSys.Setting.GetSkinNewResFileName, threadItem, threadItem.Size
319+ GikoSys.GetSkinNewResFileName, threadItem, threadItem.Size
320320 ), @res, no
321321 ) )
322322 else
323323 Result := CreateResultString( HTMLCreater.SkinedRes(
324324 HTMLCreater.LoadFromSkin(
325- GikoSys.Setting.GetSkinResFileName, threadItem, threadItem.Size
325+ GikoSys.GetSkinResFileName, threadItem, threadItem.Size
326326 ), @res, no
327327 ) );
328328 end else if GikoSys.Setting.UseCSS then begin
@@ -395,7 +395,7 @@ begin
395395 try
396396 if GikoSys.Setting.UseSkin then begin
397397 // ƒXƒLƒ“
398- skinHeader := HTMLCreater.LoadFromSkin( GikoSys.Setting.GetSkinHeaderFileName, threadItem, threadItem.Size );
398+ skinHeader := HTMLCreater.LoadFromSkin( GikoSys.GetSkinHeaderFileName, threadItem, threadItem.Size );
399399 if Length( optionalHeader ) > 0 then
400400 skinHeader :=
401401 StringReplace( skinHeader, '</head>', optionalHeader + '</head><a name="top"></a>', [] );
@@ -451,7 +451,7 @@ begin
451451 try
452452 if GikoSys.Setting.UseSkin then begin
453453 // ƒXƒLƒ“
454- skinFooter := HTMLCreater.LoadFromSkin( GikoSys.Setting.GetSkinFooterFileName, threadItem, threadItem.Size );
454+ skinFooter := HTMLCreater.LoadFromSkin( GikoSys.GetSkinFooterFileName, threadItem, threadItem.Size );
455455 if Length( optionalFooter ) > 0 then
456456 skinFooter :=
457457 StringReplace( skinFooter, '</body>', optionalFooter + '</body>', [] );
--- a/GikoSystem.pas
+++ b/GikoSystem.pas
@@ -276,7 +276,7 @@ implementation
276276
277277 uses
278278 Giko, RoundData, Favorite, Registry, HTMLCreate, MojuUtils, Sort, YofUtils,
279- IniFiles, DateUtils;
279+ IniFiles, DateUtils, SkinFiles;
280280
281281 const
282282 FOLDER_INDEX_VERSION = '1.01';
@@ -480,37 +480,37 @@ end;
480480 //! Skin:ƒwƒbƒ_‚̃tƒ@ƒCƒ‹–¼
481481 function TGikoSys.GetSkinHeaderFileName: string;
482482 begin
483- Result := Setting.GetSkinHeaderFileName;
483+ Result := Setting.SkinFiles.GetSkinHeaderFileName;
484484 end;
485485
486486 //! Skin:ƒtƒbƒ^‚̃tƒ@ƒCƒ‹–¼
487487 function TGikoSys.GetSkinFooterFileName: string;
488488 begin
489- Result := Setting.GetSkinFooterFileName;
489+ Result := Setting.SkinFiles.GetSkinFooterFileName;
490490 end;
491491
492492 //! Skin:V’…ƒŒƒX‚̃tƒ@ƒCƒ‹–¼
493493 function TGikoSys.GetSkinNewResFileName: string;
494494 begin
495- Result := Setting.GetSkinNewResFileName;
495+ Result := Setting.SkinFiles.GetSkinNewResFileName;
496496 end;
497497
498498 //! Skin:”ñV’…ƒŒƒX‚̃tƒ@ƒCƒ‹–¼
499499 function TGikoSys.GetSkinResFileName: string;
500500 begin
501- Result := Setting.GetSkinResFileName;
501+ Result := Setting.SkinFiles.GetSkinResFileName;
502502 end;
503503
504504 //! Skin:‚µ‚¨‚è(‚±‚±‚Ü‚Å“Ç‚ñ‚¾)‚̃tƒ@ƒCƒ‹–¼
505505 function TGikoSys.GetSkinBookmarkFileName: string;
506506 begin
507- Result := Setting.GetSkinBookmarkFileName;
507+ Result := Setting.SkinFiles.GetSkinBookmarkFileName;
508508 end;
509509
510510 //! Skin:‚µ‚¨‚è(V’…ƒŒƒX)‚̃tƒ@ƒCƒ‹–¼
511511 function TGikoSys.GetSkinNewmarkFileName: string;
512512 begin
513- Result := Setting.GetSkinNewmarkFileName;
513+ Result := Setting.SkinFiles.GetSkinNewmarkFileName;
514514 end;
515515
516516 //! UserAgentŽæ“¾
--- a/Setting.pas
+++ b/Setting.pas
@@ -5,7 +5,7 @@ interface
55
66 uses
77 SysUtils, Classes, Graphics, Forms, {Math, IniFiles, UCryptAuto, UBase64,}
8- ComCtrls, GestureModel, IniFiles;
8+ ComCtrls, GestureModel, IniFiles, SkinFiles;
99
1010 const
1111 MAIN_COOLBAND_COUNT = 4; //ƒƒCƒ“CoolBand‚̐”
@@ -232,8 +232,6 @@ type
232232 FListViewNo: Boolean;
233233 //CSS•\Ž¦
234234 FUseCSS: Boolean;
235- //CSSƒtƒ@ƒCƒ‹–¼
236- FCSSFileName: string;
237235 // ƒXƒLƒ“•\Ž¦(ˆêŽž“I‚È‚à‚Ì‚Å ini ‚É•Û‘¶‚Í‚³‚ê‚È‚¢)
238236 FUseSkin: Boolean;
239237 //‚©‚¿‚ã`‚µ‚á—p‚ÌSkin‚ð—˜—p‚·‚é‚©
@@ -450,6 +448,8 @@ type
450448 FSentIniFileSize: Integer;
451449 //! ƒŠƒ“ƒNURLŽæ“¾‚̑Ώۊg’£Žq
452450 FExtList: String;
451+ //! SkinŠÖ˜A
452+ FSkinFiles: TSkinFiles;
453453 function GetMainCoolSet(Index: Integer): TCoolSet;
454454 function GetBoardCoolSet(Index: Integer): TCoolSet;
455455 function GetBrowserCoolSet(Index: Integer): TCoolSet;
@@ -475,6 +475,7 @@ type
475475
476476 procedure SetUseCSS( value: Boolean );
477477 procedure SetCSSFileName( fileName: string );
478+ function GetCSSFileName: string;
478479 //! ƒvƒƒLƒVÝ’è“ǂݍž‚Ý
479480 procedure ReadProxySettings(memIni: TMemIniFile);
480481 //! ŠeŽíƒEƒBƒ“ƒhƒEÝ’è“ǂݍž‚Ý
@@ -511,12 +512,6 @@ type
511512 function GetSentFileName: string;
512513 function GetConfigDir: string;
513514 function GetSkinDir: string;
514- function GetSkinHeaderFileName: string;
515- function GetSkinFooterFileName: string;
516- function GetSkinResFileName: string;
517- function GetSkinNewResFileName: string;
518- function GetSkinBookmarkFileName: string;
519- function GetSkinNewmarkFileName: string;
520515 function GetStyleSheetDir: string;
521516 function GetOutBoxFileName: string;
522517 function GetNGWordsDir: string;
@@ -645,7 +640,7 @@ type
645640
646641 property ListViewNo: Boolean read FListViewNo write FListViewNo;
647642 property UseCSS: Boolean read FUseCSS write SetUseCSS;
648- property CSSFileName: string read FCSSFileName write SetCSSFileName;
643+ property CSSFileName: string read GetCSSFileName write SetCSSFileName;
649644 property UseKatjushaType : Boolean read FUseKatjushaType write FUseKatjushaType;
650645 property UseSkin: Boolean read FUseSkin;
651646
@@ -810,6 +805,8 @@ type
810805 property SentIniFileSize: Integer read FSentIniFileSize write FSentIniFileSize;
811806 //! ƒŠƒ“ƒNURLŽæ“¾‚̑Ώۊg’£Žq
812807 property ExtList: String read FExtList write FExtList;
808+ //! Skinƒtƒ@ƒCƒ‹ŠÇ—
809+ property SkinFiles: TSkinFiles read FSkinFiles;
813810
814811 end;
815812
@@ -830,12 +827,6 @@ const
830827 CONFIG_DIR_NAME = 'config';
831828 CSS_DIR_NAME = 'css';
832829 SKIN_DIR_NAME = 'skin';
833- SKIN_HEADER_FILE_NAME = 'Header.html';
834- SKIN_FOOTER_FILE_NAME = 'Footer.html';
835- SKIN_NEWRES_FILE_NAME = 'NewRes.html';
836- SKIN_RES_FILE_NAME = 'Res.html';
837- SKIN_BOOKMARK_FILE_NAME = 'Bookmark.html';
838- SKIN_NEWMARK_FILE_NAME = 'Newmark.html';
839830 NGWORDs_DIR_NAME : String = 'NGwords';
840831 BOARD_PLUGIN_DIR_NAME = 'BoardPlugin';
841832 SAMBATIME_FILE_NAME : String = 'Samba.ini';
@@ -969,6 +960,7 @@ begin
969960 FCategoryColumnOrder := TGikoCategoryColumnList.Create;
970961 FBoardColumnOrder := TGikoBoardColumnList.Create;
971962 FGestures := TGestureModel.Create;
963+ FSkinFiles := TSkinFiles.Create;
972964 FNameList.Duplicates := dupIgnore;
973965 FMailList.Duplicates := dupIgnore;
974966 FBoardURLs.Duplicates := dupIgnore;
@@ -1482,7 +1474,7 @@ begin
14821474 //‚©‚µ‚ã`‚µ‚á‚̃XƒLƒ“‚ðŽg‚¤‚©
14831475 ini.WriteBool('CSS', 'UseKatjushaType', FUseKatjushaType);
14841476 //CSSƒtƒ@ƒCƒ‹–¼
1485- ini.WriteString('CSS', 'FileName', FCSSFileName);
1477+ ini.WriteString('CSS', 'FileName', FSkinFiles.FileName);
14861478 //Mail—“•\Ž¦
14871479 ini.WriteBool('Thread', 'ShowMail', FShowMail);
14881480 // ƒŒƒX•\Ž¦”͈Í
@@ -2051,48 +2043,6 @@ begin
20512043 Result := IncludeTrailingPathDelimiter(GetConfigDir + SKIN_DIR_NAME);
20522044 end;
20532045 (*************************************************************************
2054- *skinƒwƒbƒ_ƒtƒ@ƒCƒ‹–¼Žæ“¾
2055- *************************************************************************)
2056-function TSetting.GetSkinHeaderFileName: string;
2057-begin
2058- Result := CSSFileName + SKIN_HEADER_FILE_NAME;
2059-end;
2060-(*************************************************************************
2061- *skinƒtƒbƒ^ƒtƒ@ƒCƒ‹–¼Žæ“¾
2062- *************************************************************************)
2063-function TSetting.GetSkinFooterFileName: string;
2064-begin
2065- Result := CSSFileName + SKIN_FOOTER_FILE_NAME;
2066-end;
2067-(*************************************************************************
2068- *skinVƒŒƒXƒtƒ@ƒCƒ‹–¼Žæ“¾
2069- *************************************************************************)
2070-function TSetting.GetSkinNewResFileName: string;
2071-begin
2072- Result := CSSFileName + SKIN_NEWRES_FILE_NAME;
2073-end;
2074-(*************************************************************************
2075- *skinƒŒƒXƒtƒ@ƒCƒ‹–¼Žæ“¾
2076- *************************************************************************)
2077-function TSetting.GetSkinResFileName: string;
2078-begin
2079- Result := CSSFileName + SKIN_RES_FILE_NAME;
2080-end;
2081-(*************************************************************************
2082- *skinƒuƒbƒNƒ}[ƒNƒtƒ@ƒCƒ‹–¼Žæ“¾
2083- *************************************************************************)
2084-function TSetting.GetSkinBookmarkFileName: string;
2085-begin
2086- Result := CSSFileName + SKIN_BOOKMARK_FILE_NAME;
2087-end;
2088-(*************************************************************************
2089- *skinV’…ƒtƒ@ƒCƒ‹–¼Žæ“¾
2090- *************************************************************************)
2091-function TSetting.GetSkinNewmarkFileName: string;
2092-begin
2093- Result := CSSFileName + SKIN_NEWMARK_FILE_NAME;
2094-end;
2095-(*************************************************************************
20962046 *NGƒ[ƒhƒfƒBƒŒƒNƒgƒŠŽæ“¾(\‚ŏI‚í‚é)
20972047 *************************************************************************)
20982048 function TSetting.GetNGWordsDir: string;
@@ -2115,21 +2065,20 @@ begin
21152065 // ƒRƒR‚Å‚Ì”»’è‚Å‚à‘啶Žš¬•¶Žš‚̈Ⴂ‚Í–³Ž‹‚·‚éB
21162066 FUseSkin :=
21172067 UseCSS and
2118- (Pos( AnsiLowerCase(GetSkinDir), AnsiLowerCase(CSSFileName) ) > 0) and
2119- FileExists( GetSkinHeaderFileName );
2068+ (Pos( AnsiLowerCase(GetSkinDir), AnsiLowerCase(FSkinFiles.FileName) ) > 0) and
2069+ FileExists( FSkinFiles.GetSkinHeaderFileName );
21202070
21212071 end;
21222072
21232073 procedure TSetting.SetCSSFileName( fileName: string );
21242074 begin
2125-
2126- FCSSFileName := fileName;
2075+ FSkinFiles.FileName := fileName;
21272076 // Windows“I‚Ƀtƒ@ƒCƒ‹ƒpƒX‚̑啶Žš¬•¶Žš‚̈Ⴂ‚Í–³Ž‹‚³‚ê‚é‚̂ŁA
21282077 // ƒRƒR‚Å‚Ì”»’è‚Å‚à‘啶Žš¬•¶Žš‚̈Ⴂ‚Í–³Ž‹‚·‚éB
21292078 FUseSkin :=
21302079 UseCSS and
2131- (Pos( AnsiLowerCase(GetSkinDir), AnsiLowerCase(CSSFileName) ) > 0) and
2132- FileExists( GetSkinHeaderFileName );
2080+ (Pos( AnsiLowerCase(GetSkinDir), AnsiLowerCase(FSkinFiles.FileName) ) > 0) and
2081+ FileExists( FSkinFiles.GetSkinHeaderFileName );
21332082
21342083 end;
21352084 (*************************************************************************
@@ -2415,5 +2364,11 @@ begin
24152364 end;
24162365 end;
24172366 end;
2367+
2368+function TSetting.GetCSSFileName: string;
2369+begin
2370+ Result := FSkinFiles.FileName;
2371+end;
2372+
24182373 end.
24192374
--- /dev/null
+++ b/SkinFiles.pas
@@ -0,0 +1,86 @@
1+unit SkinFiles;
2+
3+interface
4+
5+uses
6+ SysUtils, Classes, ComCtrls;
7+
8+type
9+ TSkinFiles = class(TObject)
10+ private
11+ FFileName: String;
12+ procedure SetFileName(AFileName: string);
13+ public
14+ //! ƒXƒLƒ“ƒtƒ@ƒCƒ‹ƒpƒX
15+ property FileName:String read FFileName write SetFileName;
16+ //! ƒwƒbƒ_‚̃tƒ@ƒCƒ‹–¼
17+ function GetSkinHeaderFileName: string;
18+ //! ƒtƒbƒ^‚̃tƒ@ƒCƒ‹–¼
19+ function GetSkinFooterFileName: string;
20+ //! V’…ƒŒƒX‚̃tƒ@ƒCƒ‹–¼
21+ function GetSkinNewResFileName: string;
22+ //! ”ñV’…ƒŒƒX‚̃tƒ@ƒCƒ‹–¼
23+ function GetSkinResFileName: string;
24+ //! ‚µ‚¨‚è(‚±‚±‚Ü‚Å“Ç‚ñ‚¾)‚̃tƒ@ƒCƒ‹–¼
25+ function GetSkinBookmarkFileName: string;
26+ //! ‚µ‚¨‚è(V’…ƒŒƒX)‚̃tƒ@ƒCƒ‹–¼
27+ function GetSkinNewmarkFileName: string;
28+ end;
29+
30+implementation
31+
32+const
33+ SKIN_HEADER_FILE_NAME = 'Header.html';
34+ SKIN_FOOTER_FILE_NAME = 'Footer.html';
35+ SKIN_NEWRES_FILE_NAME = 'NewRes.html';
36+ SKIN_RES_FILE_NAME = 'Res.html';
37+ SKIN_BOOKMARK_FILE_NAME = 'Bookmark.html';
38+ SKIN_NEWMARK_FILE_NAME = 'Newmark.html';
39+
40+//! ƒXƒLƒ“ƒtƒ@ƒCƒ‹–¼Ý’è
41+procedure TSkinFiles.SetFileName(AFileName: string);
42+begin
43+ // ƒfƒBƒŒƒNƒgƒŠ‚̏ꍇÅŒã‚É\‚ŏI‚í‚ç‚·
44+ if DirectoryExists(AFileName) then begin
45+ // \ ‚ŏI‚í‚é‚悤‚É‚·‚é
46+ FFileName := IncludeTrailingPathDelimiter(AFileName);
47+ end else begin
48+ FFileName := AFileName;
49+ end;
50+end;
51+//! Skin:ƒwƒbƒ_‚̃tƒ@ƒCƒ‹–¼
52+function TSkinFiles.GetSkinHeaderFileName: string;
53+begin
54+ Result := FFileName + SKIN_HEADER_FILE_NAME;
55+end;
56+
57+//! Skin:ƒtƒbƒ^‚̃tƒ@ƒCƒ‹–¼
58+function TSkinFiles.GetSkinFooterFileName: string;
59+begin
60+ Result := FFileName + SKIN_FOOTER_FILE_NAME;
61+end;
62+
63+//! Skin:V’…ƒŒƒX‚̃tƒ@ƒCƒ‹–¼
64+function TSkinFiles.GetSkinNewResFileName: string;
65+begin
66+ Result := FFileName + SKIN_NEWRES_FILE_NAME;
67+end;
68+
69+//! Skin:”ñV’…ƒŒƒX‚̃tƒ@ƒCƒ‹–¼
70+function TSkinFiles.GetSkinResFileName: string;
71+begin
72+ Result := FFileName + SKIN_RES_FILE_NAME;
73+end;
74+
75+//! Skin:‚µ‚¨‚è(‚±‚±‚Ü‚Å“Ç‚ñ‚¾)‚̃tƒ@ƒCƒ‹–¼
76+function TSkinFiles.GetSkinBookmarkFileName: string;
77+begin
78+ Result := FFileName + SKIN_BOOKMARK_FILE_NAME;
79+end;
80+
81+//! Skin:‚µ‚¨‚è(V’…ƒŒƒX)‚̃tƒ@ƒCƒ‹–¼
82+function TSkinFiles.GetSkinNewmarkFileName: string;
83+begin
84+ Result := FFileName + SKIN_NEWMARK_FILE_NAME;
85+end;
86+end.
--- a/gikoNavi.dpr
+++ b/gikoNavi.dpr
@@ -77,7 +77,8 @@ uses
7777 SambaTimer in 'SambaTimer.pas',
7878 HistoryList in 'HistoryList.pas',
7979 ReplaceDataModule in 'ReplaceDataModule.pas' {ReplaceDM: TDataModule},
80- ResPopupBrowser in 'ResPopupBrowser.pas';
80+ ResPopupBrowser in 'ResPopupBrowser.pas',
81+ SkinFiles in 'SkinFiles.pas';
8182
8283 {$R *.RES}
8384 {$R gikoResource.res}
Binary files a/gikoNavi.res and b/gikoNavi.res differ