• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ギコナビ


Commit MetaInfo

Revisione52dfad8a157d6e66c2d3a28f9b8ea15eab883c7 (tree)
Time2005-12-28 02:12:58
Authorcvs2git <cvs2git>
Commitercvs2git

Log Message

This commit was manufactured by cvs2svn to create tag 'v1_51_0_625'.

Change Summary

Incremental Difference

--- a/AbonUnit.pas
+++ b/AbonUnit.pas
@@ -374,6 +374,7 @@ var
374374 pos : Integer;
375375 buftoken : String;
376376 begin
377+ pos := 0;
377378 bufstl := TStringList.Create;
378379 try
379380 if Length(argline) > 0 then begin
--- a/BoardGroup.pas
+++ b/BoardGroup.pas
@@ -90,7 +90,6 @@ type
9090 property NodeExpand: Boolean read FExpand write FExpand;
9191 end;
9292
93-
9493 // ”Â(ƒXƒŒƒbƒh URL ‚̃ŠƒXƒg)
9594 // TBoard = class(THashedStringList)
9695 TBoard = class(TStringList)
@@ -459,11 +458,10 @@ function BBSsFindThreadFromURL(
459458 ) : TThreadItem;
460459 var
461460 board : TBoard;
462- tmpThread : TThreadItem;
463461 boardURL : string;
464462 protocol, host, path, document, port, bookmark : string;
465463 BBSID, BBSKey : string;
466- i, bi : Integer;
464+// i : Integer;
467465 begin
468466
469467 boardURL := GikoSys.GetThreadURL2BoardURL( inURL );
@@ -477,26 +475,6 @@ begin
477475 GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark );
478476 GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey );
479477 Result := board.FindThreadFromFileName(BBSKey + '.dat');
480- end else if (Result = nil) and not (board.Is2ch) then begin
481- //ƒvƒ‰ƒOƒCƒ“Œn‚Ì’TõiŽå‚ÉURL‚ª“r’†‚ŕύX‚É‚È‚Á‚½—Þ)
482- try
483- bi := Length(BoardGroups) - 1;
484- for i := 1 to bi do begin
485- if (BoardGroups[i].BoardPlugIn <> nil) and (Assigned(Pointer(BoardGroups[i].BoardPlugIn.Module))) then begin
486- if BoardGroups[i].BoardPlugIn.AcceptURL( inURL ) = atThread then begin
487- tmpThread := TThreadItem.Create( BoardGroups[i].BoardPlugIn, Board, inURL );
488- if not board.IsThreadDatRead then begin
489- GikoSys.ReadSubjectFile( board );
490- end;
491- Result := Board.FindThreadFromFileName( tmpThread.FileName );
492- tmpThread.Free;
493- Break;
494- end;
495- end;
496- end;
497- except
498- Result := nil;
499- end;
500478 end;
501479 end;
502480
@@ -1905,14 +1883,8 @@ procedure TThreadItem.SetUnRead(b: Boolean);
19051883 begin
19061884 if FUnRead = b then Exit;
19071885 FUnRead := b;
1908- if FUpdate and (ParentBoard <> nil) then begin
1886+ if FUpdate and (ParentBoard <> nil) then
19091887 ParentBoard.FModified := True;
1910- if FUnRead then begin
1911- ParentBoard.UnRead := ParentBoard.UnRead + 1;
1912- end else begin
1913- ParentBoard.UnRead := ParentBoard.UnRead - 1;
1914- end;
1915- end;
19161888 end;
19171889
19181890 procedure TThreadItem.SetScrollTop(i: Integer);
--- a/Editor.dfm
+++ b/Editor.dfm
@@ -106,7 +106,7 @@ object EditorForm: TEditorForm
106106 Width = 149
107107 Height = 20
108108 DropDownCount = 20
109- ItemHeight = 12
109+ ItemHeight = 0
110110 TabOrder = 0
111111 end
112112 object MailComboBox: TComboBox
@@ -115,7 +115,7 @@ object EditorForm: TEditorForm
115115 Width = 149
116116 Height = 20
117117 DropDownCount = 20
118- ItemHeight = 12
118+ ItemHeight = 0
119119 TabOrder = 1
120120 OnChange = MailComboBoxChange
121121 end
@@ -358,12 +358,6 @@ object EditorForm: TEditorForm
358358 object N01: TMenuItem
359359 Caption = '-'
360360 end
361- object Samba241: TMenuItem
362- Action = UpdateSambaAction
363- end
364- object N7: TMenuItem
365- Caption = '-'
366- end
367361 object CloseMenu: TMenuItem
368362 Action = CloseAction
369363 end
@@ -1726,13 +1720,6 @@ object EditorForm: TEditorForm
17261720 OnExecute = BeLogInOutEActionExecute
17271721 OnUpdate = BeLogInOutEActionUpdate
17281722 end
1729- object UpdateSambaAction: TAction
1730- Category = #12501#12449#12452#12523
1731- Caption = 'Samba24'#12398#35373#23450#20516#12434#26356#26032#12377#12427
1732- Hint = 'Samba24'#12398#35373#23450#20516#12434#26356#26032#12377#12427
1733- OnExecute = UpdateSambaActionExecute
1734- OnUpdate = UpdateSambaActionUpdate
1735- end
17361723 end
17371724 object IdLogDebug: TIdLogDebug
17381725 OnReceive = IdLogDebugReceive
--- a/Editor.pas
+++ b/Editor.pas
@@ -124,9 +124,6 @@ type
124124 SaveNameMailAction: TAction;
125125 ToolButton7: TToolButton;
126126 BeLogInOutEAction: TAction;
127- UpdateSambaAction: TAction;
128- Samba241: TMenuItem;
129- N7: TMenuItem;
130127
131128 procedure EditorPageChange(Sender: TObject);
132129 procedure FormCreate(Sender: TObject);
@@ -179,8 +176,6 @@ type
179176 procedure SaveNameMailActionExecute(Sender: TObject);
180177 procedure BeLogInOutEActionExecute(Sender: TObject);
181178 procedure BeLogInOutEActionUpdate(Sender: TObject);
182- procedure UpdateSambaActionUpdate(Sender: TObject);
183- procedure UpdateSambaActionExecute(Sender: TObject);
184179 private
185180 FThreadItem: TThreadItem;
186181 FBoard: TBoard;
@@ -210,18 +205,24 @@ type
210205 procedure SaveSendFile;
211206 procedure SetContent(Content: string; ABrowser: TWebBrowser);
212207 function GetResultType(ResponseText: string): TGikoResultType;
208+
209+ procedure ReadSambaTime(const AHost: string); overload;
210+ procedure WriteSambaTime(const AHost: string; ATime: TDateTime); overload;
211+ function ReadSettingTime(const AHost: string): Integer; overload;
212+ function CheckSambaTime(const AHost: string; ATime: TDateTime): Boolean; overload;
213+ procedure SetSamba24(AURL: string); overload;
214+
213215 //Samba‚ÌŽžŠÔ‚ð“ǂݍž‚Þ
214- procedure ReadSambaTime(const AHost: string);
216+ procedure ReadSambaTime(); overload;
215217 //Samba‚ÉŽžŠÔ‚ð‘‚«ž‚Þ
216- procedure WriteSambaTime(const AHost: string; ATime: TDateTime);
218+ procedure WriteSambaTime(ATime: TDateTime); overload;
217219 //Samba‚̐ݒè’l‚ð“ǂݍž‚Þ
218- function ReadSettingTime(const AHost: string): Integer;
220+ function ReadSettingTime(): Integer ; overload;
219221 //Samba‚Ɉø‚Á‚©‚©‚é‚©ŒŸ¸‚·‚é
220- function CheckSambaTime(const AHost: string; ATime: TDateTime): Boolean;
222+ function CheckSambaTime(ATime: TDateTime): Boolean; overload;
221223 //Samba‚̐ݒè’l‚ð‘‚«ž‚Þ
222- procedure SetSamba24(AURL: string);
223- //Samba‚̐ݒè’l‚ðXV‚·‚é
224- procedure UpdateSamba(const AHost: String; value: Integer);
224+ procedure SetSamba24(); overload;
225+
225226 /// ˆø—p•„‚̎擾
226227 function GetOEIndentChar : string;
227228 /// –{•¶‚̎擾
@@ -258,7 +259,7 @@ type
258259 implementation
259260
260261 uses
261- Giko, ItemDownload, MojuUtils, IdGlobal, GikoMessage;
262+ Giko, ItemDownload, MojuUtils, IdGlobal;
262263 const
263264 CAPTION_NAME_NEW: string = 'ƒMƒRƒiƒr ƒXƒŒ—§‚ăGƒfƒBƒ^';
264265 CAPTION_NAME_RES: string = 'ƒMƒRƒiƒr ƒŒƒXƒGƒfƒBƒ^';
@@ -967,7 +968,7 @@ begin
967968 if MsgResult = IDNO then begin
968969 Board.SPID := '';
969970 Board.PON := '';
970- FWork := false;
971+ FWork := false;
971972 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
972973 DrawMenuBar(Handle);
973974 Exit;
@@ -976,7 +977,7 @@ begin
976977 end;
977978
978979 if ResultType = grtOK then begin
979- if (GikoSys.Setting.UseSamba) and (Timer1.Enabled) then
980+ if GikoSys.Setting.UseSamba then
980981 WriteSambaTime(FHost, Now());
981982 State := gdsComplete;
982983 end else if ResultType = grtCookie then begin
@@ -1045,8 +1046,8 @@ begin
10451046 Exit;
10461047 end;
10471048 end else begin
1048- if (GikoSys.Setting.UseSamba) and (Timer1.Enabled) then
1049- WriteSambaTime(FHost, Now());
1049+ if GikoSys.Setting.UseSamba then
1050+ WriteSambaTime(FHost, Now());
10501051 State := gdsError;
10511052 raise Exception.Create('');
10521053 end;
@@ -1097,9 +1098,9 @@ begin
10971098 GikoForm.PlaySound('ResEnd');
10981099 SaveSendFile;
10991100 if FThreadItem = nil then
1100- GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.GetGikoMessage(gmNewSure), nil, gmiOK)
1101+ GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmNewSure)), nil, gmiOK)
11011102 else
1102- GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmNewRes), nil, gmiOK);
1103+ GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmNewRes)), nil, gmiOK);
11031104 Close;
11041105 Exit;
11051106 end;
@@ -1107,20 +1108,20 @@ begin
11071108 GikoForm.PlaySound('ResEnd');
11081109 SaveSendFile;
11091110 if FThreadItem = nil then
1110- GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.GetGikoMessage(gmNewSure), nil, gmiOK)
1111+ GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmNewSure)), nil, gmiOK)
11111112 else
1112- GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmNewRes), nil, gmiOK);
1113+ GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmNewRes)), nil, gmiOK);
11131114 Close;
11141115 end else if State = gdsError then begin
11151116 if FThreadItem = nil then
1116- GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.GetGikoMessage(gmNewSure), nil, gmiOK)
1117+ GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmNewSure)), nil, gmiOK)
11171118 else
1118- GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmNewRes), nil, gmiOK);
1119+ GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmNewRes)), nil, gmiOK);
11191120
11201121 EditorPage.ActivePage := PreviewTab;
11211122 SetContent(ResponseText, Browser);
11221123 end else if State = gdsAbort then begin
1123- GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmAbort), nil, gmiSAD);
1124+ GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmAbort)), nil, gmiSAD);
11241125 end;
11251126 end;
11261127
@@ -1279,13 +1280,13 @@ begin
12791280 if state = gdsComplete then begin
12801281 GikoForm.PlaySound('ResEnd');
12811282 SaveSendFile;
1282- GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.GetGikoMessage(gmNewSure), nil, gmiOK);
1283+ GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmNewSure)), nil, gmiOK);
12831284 FWork := False;
12841285 Close;
12851286 end else if State = gdsError then begin
1286- GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.GetGikoMessage(gmSureError), nil, gmiNG);
1287+ GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureError)), nil, gmiNG);
12871288 end else if State = gdsAbort then begin
1288- GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.GetGikoMessage(gmAbort), nil, gmiNG);
1289+ GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmAbort)), nil, gmiNG);
12891290 end;
12901291 end else begin
12911292 // ƒŒƒX
@@ -1295,13 +1296,13 @@ begin
12951296 if state = gdsComplete then begin
12961297 GikoForm.PlaySound('ResEnd');
12971298 SaveSendFile;
1298- GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmNewRes), nil, gmiOK);
1299- FWork := False;
1299+ GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmNewRes)), nil, gmiOK);
1300+ FWork := False;
13001301 Close;
13011302 end else if State = gdsError then begin
1302- GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmResError), nil, gmiOK);
1303+ GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmResError)), nil, gmiOK);
13031304 end else if State = gdsAbort then begin
1304- GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmAbort), nil, gmiOK);
1305+ GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.Setting.GetMessage(Ord(gmAbort)), nil, gmiOK);
13051306 end;
13061307 end;
13071308 end else begin
@@ -1596,8 +1597,6 @@ begin
15961597 ini.WriteInteger('Setting', AHost, 0);
15971598 ini.UpdateFile;
15981599 end;
1599- //StatusBar‚É‚±‚ÌŽI‚Ì‹K’è’l‚ð•\Ž¦‚·‚é
1600- StatusBar.Panels[2].Text := 'Samba24‹K’è’l' + IntToStr(Result);
16011600 finally
16021601 ini.Free;
16031602 end;
@@ -1633,7 +1632,8 @@ begin
16331632 Host := Copy(Host, 1, AnsiPos('.', Host) - 1);
16341633 FHost := Host; //FHost=ŽI–¼
16351634 ReadSambaTime(FHost); //ˆÈ‘O‚̏‘‚«ž‚ÝŽžŠÔ‚ð“ǂݍž‚Þ
1636- ReadSettingTime(FHost); //Samba‚̐ݒè‚ð“ǂݍž‚Þ
1635+ //StatusBar‚É‚±‚ÌŽI‚Ì‹K’è’l‚ð•\Ž¦‚·‚é
1636+ StatusBar.Panels[2].Text := 'Samba24‹K’è’l' + IntToStr(ReadSettingTime(FHost));
16371637 end;
16381638 end;
16391639 procedure TEditorForm.FormCloseQuery(Sender: TObject;
@@ -2098,8 +2098,8 @@ begin
20982098
20992099 if ABoard = nil then Exit;
21002100
2101- URL := ABoard.GETHEADTXTFileName;
2102- GikoSys.OpenBrowser(URL, gbtAuto);
2101+ URL := ABoard.GETHEADTXTFileName;
2102+ GikoSys.OpenBrowser(URL, gbtAuto);
21032103 end;
21042104
21052105 procedure TEditorForm.SaveNameMailActionExecute(Sender: TObject);
@@ -2112,8 +2112,8 @@ function TEditorForm.LFusianaGet(s: String): Boolean;
21122112 var
21132113 i: Integer;
21142114 begin
2115- i := AnsiPos('fusianasan', s);
2116- if (i > 0) then Result := True else Result := False;
2115+ i := AnsiPos('fusianasan', s);
2116+ if (i > 0) then Result := True else Result := False;
21172117 end;
21182118
21192119 procedure TEditorForm.BeLogInOutEActionExecute(Sender: TObject);
@@ -2166,49 +2166,101 @@ begin
21662166 end;
21672167 end;
21682168
2169-//! Samba‚̐ݒè’l‚ðXV‚·‚é
2170-procedure TEditorForm.UpdateSamba(const AHost: String; value: Integer);
2169+//Samba‚ÌŽžŠÔ‚ð“ǂݍž‚Þ
2170+procedure TEditorForm.ReadSambaTime();
21712171 var
21722172 ini :TMemIniFile;
2173+ skey: String;
2174+ board: TBoard;
2175+ tmp: string;
21732176 begin
2177+ Timer1.Enabled := false; //Œo‰ß•b”•\Ž¦Timer‚ðOff‚É‚·‚éi‚±‚ꂪON‚Ì‚Æ‚«Samba24‘΍ôOnj
21742178 ini := TMemIniFile.Create(GikoSys.GetSambaFileName);
21752179 try
2176- ini.WriteInteger('Setting', AHost, value);
2177- ini.UpdateFile;
2180+ //•¶Žš—ñ‚Å“Ç‚ÝŽæ‚Á‚āA•ÏŠ·ŠÖ”‚ÅTDateTime‚Ö
2181+ if( FThreadItem <> nil ) then
2182+ board := FThreadItem.ParentBoard
2183+ else
2184+ board := FBoard;
2185+
2186+ if (board <> nil) then begin
2187+ //BBSID‚ƃzƒXƒg–¼‚ªˆê’v‚µ‚Ä‚¢‚½‚ç BBSID@ƒzƒXƒg–¼
2188+ if( board.BBSID = FHost ) then
2189+ skey := board.BBSID + '@' + FHost
2190+ else
2191+ skey := board.BBSID;
2192+
2193+ tmp := ini.ReadString('Send', skey, DateTimeToStr(ZERO_DATE));
2194+
2195+ //BBSID‚̃L[‚ª–³‚¢‚È‚çFHost‚ɐ؂è‘Ö‚¦‚Ä‚Ý‚é
2196+ if (tmp = DateTimeToStr(ZERO_DATE)) then begin
2197+ tmp := ini.ReadString('Send', FHost, DateTimeToStr(ZERO_DATE));
2198+ end;
2199+ FSambaTime := ConvertDateTimeString(tmp);
2200+ end;
21782201 finally
21792202 ini.Free;
21802203 end;
2204+ FNow := Now(); //Œ»ÝŽžŠÔ‚ðŽæ“¾iTimer•\Ž¦—p‚ŁACheck‚·‚é‚Æ‚«‚͍ĂÑNow()‚ðŒÄ‚ԁj
2205+ Timer1.Enabled := true; //Œo‰ß•b”•\Ž¦Timer‚ðOn‚É‚·‚éi‚±‚ꂪON‚Ì‚Æ‚«Samba24‘΍ôOnj
21812206 end;
21822207
2183-//! ƒTƒ“ƒoXV‚̃AƒNƒVƒ‡ƒ“‚ÌUpdateƒCƒxƒ“ƒg@ŠÈ’P‚Ì‚½‚߃^ƒCƒ}[‚Æ“¯‚¶‚É‚µ‚Ä‚¨‚­
2184-procedure TEditorForm.UpdateSambaActionUpdate(Sender: TObject);
2208+//Samba‚ÉŽžŠÔ‚ð‘‚«ž‚Þ
2209+procedure TEditorForm.WriteSambaTime(ATime: TDateTime);
2210+var
2211+ ini :TMemIniFile;
21852212 begin
2186- UpdateSambaAction.Enabled := Timer1.Enabled;
2213+ ini := TMemIniFile.Create(GikoSys.GetSambaFileName);
2214+ try
2215+// ini.WriteDateTime('Send', AHost, ATime);
2216+ ini.UpdateFile;
2217+ finally
2218+ ini.Free;
2219+ end;
21872220 end;
2188-
2189-//! ƒTƒ“ƒoXVƒAƒNƒVƒ‡ƒ“
2190-procedure TEditorForm.UpdateSambaActionExecute(Sender: TObject);
2221+//Samba‚̐ݒè’l‚ð“ǂݍž‚Þ
2222+function TEditorForm.ReadSettingTime(): Integer ;
21912223 var
2192- input : String;
2193- i : Integer;
2194-begin
2195- if InputQuery('Samba24Ý’è’lXV', 'V‚µ‚¢Ý’è’l‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢', input) then begin
2196- input := ZenToHan(input);
2197- if GikoSys.IsNumeric(input) then begin
2198- UpdateSamba(FHost, StrToInt(input));
2199- //‘S‚ẴtƒH[ƒ€‚©‚çA“¯‚¶ƒzƒXƒg‚̃GƒfƒBƒ^‚ɓǂݍž‚ÝŽwŽ¦
2200- for i := 0 to Screen.FormCount - 1 do begin
2201- if Screen.Forms[i] is TEditorForm then begin
2202- if FHost = TEditorForm(Screen.Forms[i]).FHost then begin
2203- TEditorForm(Screen.Forms[i]).ReadSettingTime(FHost);
2204- end;
2205- end;
2224+ ini :TMemIniFile;
2225+ skey: String;
2226+ board: TBoard;
2227+begin
2228+ ini := TMemIniFile.Create(GikoSys.GetSambaFileName);
2229+ try
2230+ if( FThreadItem <> nil ) then
2231+ board := FThreadItem.ParentBoard
2232+ else
2233+ board := FBoard;
2234+
2235+ if (board <> nil) then begin
2236+ //BBSID‚ƃzƒXƒg–¼‚ªˆê’v‚µ‚Ä‚¢‚½‚ç BBSID@ƒzƒXƒg–¼
2237+ if( board.BBSID = FHost ) then
2238+ skey := board.BBSID + '@' + FHost
2239+ else
2240+ skey := board.BBSID;
2241+
2242+ Result := ini.ReadInteger('Setting', skey, -1);
2243+ //BBSID‚̃L[‚ª–³‚¢‚È‚çFHost‚ðŽg‚¤
2244+ if( Result = -1 ) then
2245+ Result := ini.ReadInteger('Setting', FHost, -1);
2246+
2247+ //‹K’è’l‚ªÝ’肳‚ê‚Ä‚¢‚È‚¢‚Æ‚«‚́Aƒtƒ@ƒCƒ‹‚ɏ‘‚«‚½‚·B
2248+ if Result = -1 then begin
2249+ ini.WriteInteger('Setting', FHost, 0);
2250+ ini.UpdateFile;
22062251 end;
2207- end else begin
2208- ShowMessage('”’l‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢');
2209- UpdateSambaActionExecute(Sender);
2210- end;
2252+ end;
2253+ finally
2254+ ini.Free;
22112255 end;
22122256 end;
2257+//Samba‚Ɉø‚Á‚©‚©‚é‚©ŒŸ¸‚·‚é
2258+function TEditorForm.CheckSambaTime(ATime: TDateTime): Boolean;
2259+begin
2260+end;
2261+//Samba‚̐ݒè’l‚ð‘‚«ž‚Þ
2262+procedure TEditorForm.SetSamba24();
2263+begin
2264+end;
22132265
22142266 end.
--- a/ExternalThreadItem.pas
+++ b/ExternalThreadItem.pas
@@ -290,25 +290,22 @@ var
290290 threadItem : TThreadItem;
291291 res : TResRec;
292292 no : string;
293- resLink : TResLinkRec;
294293 begin
295294
296295 threadItem := TThreadItem( inInstance );
297296 // ˆø”‚𕪉ð
298- THTMLCreate.DivideStrLine( string( inDatRes ) , @res);
299- if AnsiCompareStr( string( inDatRes ) , '' ) <> 0 then begin
300- res.FBody := THTMLCreate.DeleteLink(res.FBody);
301- resLink.FBbs := threadItem.ParentBoard.BBSID;
302- resLink.FKey := ChangeFileExt( threadItem.FileName, '' );
297+ DivideStrLine( string( inDatRes ) , @res);
298+ if AnsiCompareStr( string( inDatRes ) , '' ) <> 0 then begin
299+ res.FBody := GikoSys.DeleteLink(res.FBody);
303300 HTMLCreater.AddAnchorTag( @res );
304- HTMLCreater.ConvRes( @res, @resLink );
301+ HTMLCreater.ConvRes( @res, threadItem.ParentBoard.BBSID, ChangeFileExt( threadItem.FileName, '' ));
305302
306- no := IntToStr( inResNo );
303+ no := IntToStr( inResNo );
307304
308- try
309- if GikoSys.Setting.UseSkin then begin
310- // ƒXƒLƒ“
311- if inIsNew then
305+ try
306+ if GikoSys.Setting.UseSkin then begin
307+ // ƒXƒLƒ“
308+ if inIsNew then
312309 Result := CreateResultString( HTMLCreater.SkinedRes(
313310 HTMLCreater.LoadFromSkin(
314311 GikoSys.Setting.GetSkinNewResFileName, threadItem, threadItem.Size
--- a/Favorite.pas
+++ b/Favorite.pas
@@ -4,44 +4,42 @@ interface
44
55 uses
66 Messages, SysUtils, Classes, Contnrs, ComCtrls, {HttpApp,} YofUtils,
7- GikoSystem{, XMLIntf, XMLDoc}, GikoXMLDoc, BoardGroup, windows;
7+ GikoSystem{, XMLIntf, XMLDoc}, GikoXMLDoc, BoardGroup, windows,
8+ MojuUtils;
89 {SAX, SAXHelpers, SAXComps, SAXKW;}
910
1011 type
1112 TFavoriteFolder = class
1213 end;
1314
14- TFavoriteItem = class(TObject)
15+ TFavoriteBoardItem = class
1516 private
17+ FItem : TBoard;
1618 FURL : string;
1719 FTitle : string;
18- public
19- function GetItemTitle : string; virtual;abstract;
20- property URL : string read FURL write FURL; // Item ‚ªŽæ“¾‚Å‚«‚È‚­‚Ä‚à URL ‚͏í‚É•ÛŽ‚³‚ê‚é
21- property Title : string read FTitle write FTitle;
22- end;
23- TFavoriteBoardItem = class(TFavoriteItem)
24- private
25- FItem : TBoard;
2620 function GetItem : TBoard;
2721 public
2822 constructor Create( inURL : string; inTitle : string = ''; inItem : TBoard = nil );
2923 constructor CreateWithItem( inItem : TBoard );
30- destructor Destory;
31- function GetItemTitle : string; override;
24+ destructor Destory;
3225 property Item : TBoard read GetItem write FItem;
26+ property URL : string read FURL write FURL; // Item ‚ªŽæ“¾‚Å‚«‚È‚­‚Ä‚à URL ‚͏í‚É•ÛŽ‚³‚ê‚é
27+ property Title : string read FTitle write FTitle;
3328 end;
3429
35- TFavoriteThreadItem = class(TFavoriteItem)
30+ TFavoriteThreadItem = class
3631 private
3732 FItem : TThreadItem;
33+ FURL : string;
34+ FTitle : string;
3835 function GetItem : TThreadItem;
3936 public
4037 constructor Create( inURL : string; inTitle : string = ''; inItem : TThreadItem = nil );
4138 constructor CreateWithItem( inItem : TThreadItem );
42- destructor Destory;
43- function GetItemTitle : string; override;
39+ destructor Destory;
4440 property Item : TThreadItem read GetItem write FItem;
41+ property URL : string read FURL write FURL; // Item ‚ªŽæ“¾‚Å‚«‚È‚­‚Ä‚à URL ‚͏í‚É•ÛŽ‚³‚ê‚é
42+ property Title : string read FTitle write FTitle;
4543 end;
4644
4745 TFavoriteDM = class(TDataModule)
@@ -50,7 +48,7 @@ type
5048 { Private éŒ¾ }
5149 FStack: TStack;
5250 FTreeView: TTreeView;
53- FModified: boolean;
51+
5452 procedure ReadNode(Node: IXMLNode);
5553 procedure AddSaveString(Node: TTreeNode; SaveList: TStringList);
5654 // procedure AddSaveString(Node: TTreeNode; XMLNode: IXMLNode);
@@ -61,15 +59,14 @@ type
6159 // procedure SAXCharacters(Sender: TObject; const PCh: SAXString);
6260 public
6361 { Public éŒ¾ }
64- procedure Clear;
65- function GetFavoriteFilePath() : String;
66- function SaveFavoriteFile(FileName: String) : Boolean;
62+ procedure Clear;
63+ function GetFavoriteFilePath() : String;
64+ function SaveFavoriteFile(FileName: String) : Boolean;
6765 procedure SetFavTreeView(TreeView: TTreeView);
6866 procedure ReadFavorite;
6967 procedure WriteFavorite;
70- procedure URLReplace(oldURLs: TStringList; newURLs: TStringList);
68+ procedure URLReplace(oldURLs: TStringList; newURLs: TStringList);
7169 property TreeView: TTreeView read FTreeView;
72- property Modified: boolean read FModified write FModified;
7370 end;
7471
7572 var
@@ -79,7 +76,7 @@ const
7976
8077 implementation
8178
82-uses ExternalBoardManager, ExternalBoardPlugInMain, MojuUtils;
79+uses ExternalBoardManager, ExternalBoardPlugInMain;
8380
8481 const
8582 FAVORITE_ROOT_NAME = '‚¨‹C‚É“ü‚è';
@@ -116,30 +113,15 @@ begin
116113 FItem.Free;
117114 inherited;
118115 end;
119-//! •ÛŽ‚µ‚Ä‚¢‚锂̃^ƒCƒgƒ‹‚ð•Ô‚·
120-function TFavoriteBoardItem.GetItemTitle : string;
121-begin
122- Result := '';
123- //ˆê“x‚à”‚ðŠJ‚¢‚Ä‚¢‚È‚¢‚Æ‚«i‹N“®Žž‚ɃLƒƒƒrƒlƒbƒg‚ð‚¨‹C‚É“ü‚è‚Æ‚©j
124- //‚Ì‚Æ‚«‚ÉFItem‚ªnil‚È‚Ì‚Å‚»‚Ì‚Æ‚«‚ׂ͂Á‚ÆŒŸõ
125- if FItem = nil then begin
126- FItem := BBSsFindBoardFromURL(URL);
127- end;
128- if FItem <> nil then begin
129- try
130- if not FItem.IsThreadDatRead then begin
131- GikoSys.ReadSubjectFile(FItem);
132- end;
133- except
134- end;
135- Result := FItem.Title;
136- end;
137-end;
138116 function TFavoriteBoardItem.GetItem : TBoard;
139117 var
140118 protocol, host, path, document, port, bookmark : string;
141- BBSID : string;
142- tmpURL : string;
119+ BBSID{, BBSKey} : string;
120+ tmpURL{, boardURL} : string;
121+// category : TCategory;
122+ {i, bi: Integer;}
123+ {tmpThread: TThreadItem;}
124+ {tmpBoard: TBoard;}
143125 begin
144126
145127 if FItem = nil then begin
@@ -194,17 +176,6 @@ begin
194176 FItem.Free;
195177 inherited;
196178 end;
197-//! •ÛŽ‚µ‚Ä‚¢‚éƒXƒŒ‚̃^ƒCƒgƒ‹‚ð•Ô‚·
198-function TFavoriteThreadItem.GetItemTitle : string;
199-begin
200- Result := '';
201- if FItem = nil then begin
202- FItem := BBSsFindThreadFromURL(URL);
203- end;
204- if FItem <> nil then begin
205- Result := FItem.Title;
206- end;
207-end;
208179
209180 function TFavoriteThreadItem.GetItem : TThreadItem;
210181 var
@@ -288,8 +259,7 @@ begin
288259 end;
289260 TreeView.Items.Clear;
290261 TreeView.Items.EndUpdate;
291-
292- FavoriteDM.Modified := true;
262+ //TreeView.Free;
293263 end;
294264
295265 procedure TFavoriteDM.SetFavTreeView(TreeView: TTreeView);
@@ -307,7 +277,7 @@ var
307277 FavFolder: TFavoriteFolder;
308278 LinkExists: Boolean;
309279 begin
310- FavoriteDM.Modified := true;
280+
311281 FileName := GikoSys.GetConfigDir + FAVORITE_FILE_NAME;
312282
313283 FavFolder := TFavoriteFolder.Create;
@@ -479,7 +449,6 @@ var
479449 SaveList: TStringList;
480450
481451 begin
482- FavoriteDM.Modified := true;
483452 FileName := GikoSys.GetConfigDir + FAVORITE_FILE_NAME;
484453 if FileExists(FileName) then begin
485454 tmpFileName := GikoSys.GetConfigDir + '~' + FAVORITE_FILE_NAME;
@@ -491,10 +460,7 @@ begin
491460 try
492461 SaveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
493462 SaveList.Add('<favorite>');
494- try
495- AddSaveString(TreeView.Items.GetFirstNode.getFirstChild, SaveList);
496- except
497- end;
463+ AddSaveString(TreeView.Items.GetFirstNode.getFirstChild, SaveList);
498464 SaveList.Add('</favorite>');
499465 SaveList.SaveToFile(FileName);
500466 finally
--- a/Gesture.pas
+++ b/Gesture.pas
@@ -130,6 +130,10 @@ begin
130130 FLastTime := GetTickCount;
131131 FLastPoint := Point(x, y);
132132 end;
133+ //ƒ}ƒEƒX‚ðÄÝ’è
134+ if (hwnd <> 0) and (hwnd <> FHandle) then
135+ SetCapture(hwnd);
136+
133137 Result := True;
134138 end;
135139 end;
@@ -139,7 +143,7 @@ begin
139143 FLastTime := 0;
140144 FLastPoint := Point(x, y);
141145 FStartPoint := Point(x, y);
142- Result := True;
146+ CheckAction := True;
143147 SetCapture(FHandle);
144148 end;
145149 end;
--- a/Giko.dfm
+++ b/Giko.dfm
@@ -1,6 +1,6 @@
11 object GikoForm: TGikoForm
2- Left = 363
3- Top = 92
2+ Left = 332
3+ Top = 101
44 HorzScrollBar.Visible = False
55 VertScrollBar.Visible = False
66 AutoScroll = False
@@ -39,9 +39,6 @@ object GikoForm: TGikoForm
3939 Width = 500
4040 end
4141 item
42- Width = 80
43- end
44- item
4542 Width = 50
4643 end>
4744 SimplePanel = False
@@ -98,6 +95,7 @@ object GikoForm: TGikoForm
9895 Height = 167
9996 BorderStyle = bsNone
10097 ChangeDelay = 50
98+ DragMode = dmAutomatic
10199 HideSelection = False
102100 Images = ItemIcon16
103101 Indent = 19
@@ -106,12 +104,16 @@ object GikoForm: TGikoForm
106104 RightClickSelect = True
107105 ShowRoot = False
108106 TabOrder = 0
107+ OnClick = TreeViewClick
109108 OnCollapsed = TreeViewCollapsed
109+ OnCollapsing = TreeViewCollapsing
110110 OnCustomDraw = TreeViewCustomDraw
111111 OnCustomDrawItem = TreeViewCustomDrawItem
112+ OnDblClick = TreeViewDblClick
113+ OnExpanding = TreeViewExpanding
112114 OnExpanded = TreeViewExpanded
113115 OnKeyDown = TreeViewKeyDown
114- OnMouseDown = TreeViewMouseDown
116+ OnMouseUp = TreeViewMouseUp
115117 end
116118 object Panel3: TPanel
117119 Left = 0
@@ -226,13 +228,18 @@ object GikoForm: TGikoForm
226228 RightClickSelect = True
227229 ShowRoot = False
228230 TabOrder = 3
231+ OnClick = FavoriteTreeViewClick
232+ OnCollapsing = FavoriteTreeViewCollapsing
233+ OnDblClick = FavoriteTreeViewDblClick
229234 OnDragDrop = FavoriteTreeViewDragDrop
230235 OnDragOver = FavoriteTreeViewDragOver
231236 OnEdited = FavoriteTreeViewEdited
232237 OnEditing = FavoriteTreeViewEditing
233238 OnEndDrag = FavoriteTreeViewEndDrag
239+ OnExpanding = FavoriteTreeViewExpanding
234240 OnKeyDown = FavoriteTreeViewKeyDown
235241 OnMouseDown = FavoriteTreeViewMouseDown
242+ OnMouseUp = FavoriteTreeViewMouseUp
236243 end
237244 object FavoriteToolBar: TToolBar
238245 Left = 0
--- a/Giko.pas
+++ b/Giko.pas
@@ -20,10 +20,6 @@ uses
2020 ExternalBoardPlugInMain, StdActns, Variants, ExtActns,IdTCPConnection,
2121 IdBaseComponent, IdTCPClient, AppEvnts, BrowserRecord;
2222
23-const
24- NGWORDNAME_PANEL = 3;
25- THREADSIZE_PANEL = 2;
26-
2723 type
2824 TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
2925 TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser);
@@ -358,7 +354,7 @@ type
358354 N63: TMenuItem;
359355 N64: TMenuItem;
360356 dummy1: TMenuItem;
361- TreeSelectLogDeletePopupMenu: TMenuItem;
357+ TreeSelectLogDeletePopupMenu: TMenuItem;
362358 N65: TMenuItem;
363359 BBSSelectPopupMenu: TPopupMenu;
364360 PlugInMenu: TMenuItem;
@@ -378,7 +374,7 @@ type
378374 ResRangeKokoPMenuItem: TMenuItem;
379375 ResRangeNewPMenuItem: TMenuItem;
380376 ResRangeAllPMenuItem: TMenuItem;
381- BrowsBoradHeadAction1: TMenuItem;
377+ BrowsBoradHeadAction1: TMenuItem;
382378 ThreadRangePopupMenu: TPopupMenu;
383379 A15: TMenuItem;
384380 L8: TMenuItem;
@@ -398,7 +394,7 @@ type
398394 N73: TMenuItem;
399395 SelectComboBoxPanel: TPanel;
400396 SelectComboBoxSplitter: TImage;
401- ToolButton1: TToolButton;
397+ ToolButton1: TToolButton;
402398 N74: TMenuItem;
403399 WikiFAQ: TMenuItem;
404400 GikoApplicationEvents: TApplicationEvents;
@@ -423,6 +419,7 @@ type
423419 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
424420 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
425421 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
422+ procedure TreeViewDblClick(Sender: TObject);
426423 procedure ListViewCustomDraw(Sender: TCustomListView;
427424 const ARect: TRect; var DefaultDraw: Boolean);
428425 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
@@ -494,6 +491,7 @@ type
494491 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
495492 Shift: TShiftState);
496493 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
494+ procedure FavoriteTreeViewDblClick(Sender: TObject);
497495 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
498496 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
499497 Shift: TShiftState; X, Y: Integer);
@@ -512,12 +510,15 @@ type
512510 var Handled: Boolean);
513511 procedure BrowserTabPopupMenuPopup(Sender: TObject);
514512 procedure BrowserTabResize(Sender: TObject);
513+ procedure TreeViewClick(Sender: TObject);
515514 procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
516515 Shift: TShiftState);
517516 procedure FavoriteTreeViewMouseDown(Sender: TObject;
518517 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
519518 procedure MessagePanelResize(Sender: TObject);
520519 procedure OnResized;
520+ procedure FavoriteTreeViewMouseUp(Sender: TObject;
521+ Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
521522 procedure SelectTimerTimer(Sender: TObject);
522523 procedure ListViewColumnRightClick(Sender: TObject;
523524 Column: TListColumn; Point: TPoint);
@@ -533,16 +534,27 @@ type
533534 Shift: TShiftState);
534535 procedure FavoriteTreeViewEditing(Sender: TObject; Node: TTreeNode;
535536 var AllowEdit: Boolean);
536- procedure CabinetCloseSpeedButtonClick(Sender: TObject);
537+ procedure CabinetCloseSpeedButtonClick(Sender: TObject);
537538 procedure FavoriteArrangeToolButtonClick(Sender: TObject);
538539 procedure GikoApplicationEventsMessage(var Msg: tagMSG;
539540 var Handled: Boolean);
540541 procedure GikoApplicationEventsDeactivate(Sender: TObject);
541542 procedure GikoApplicationEventsException(Sender: TObject; E: Exception);
542- procedure TreeViewMouseDown(Sender: TObject; Button: TMouseButton;
543+ procedure FavoriteTreeViewClick(Sender: TObject);
544+ procedure FavoriteTreeViewCollapsing(Sender: TObject; Node: TTreeNode;
545+ var AllowCollapse: Boolean);
546+ procedure FavoriteTreeViewExpanding(Sender: TObject; Node: TTreeNode;
547+ var AllowExpansion: Boolean);
548+ procedure TreeViewCollapsing(Sender: TObject; Node: TTreeNode;
549+ var AllowCollapse: Boolean);
550+ procedure TreeViewExpanding(Sender: TObject; Node: TTreeNode;
551+ var AllowExpansion: Boolean);
552+ procedure TreeViewMouseUp(Sender: TObject; Button: TMouseButton;
543553 Shift: TShiftState; X, Y: Integer);
544554 private
545555 { Private éŒ¾ }
556+ FSortIndex: Integer;
557+ FSortOrder: Boolean;
546558 FEnabledCloseButton: Boolean;
547559 FClickNode: TTreeNode;
548560 FHttpState: Boolean;
@@ -588,7 +600,6 @@ type
588600 FIsHandledWheel : Boolean; ///< Šù‚Ɏ󂯎æ‚Á‚½ WM_MOUSEWHEEL ‚©‚Ç‚¤‚©
589601 DiffComp: Boolean; //Add by Genyakun ƒXƒŒ‚ªXV‚³‚ꂽ‚Æ‚«‚ÉTrue‚É‚È‚é
590602 FOrigenCaption: String; //‚¨‹C‚É“ü‚èƒcƒŠ[‚̃AƒCƒeƒ€•ÒWŽž‚̕ҏW‘O‚Ì•¶Žš—ñ
591- FPreviewBrowserRect: TRect; ///< ƒvƒŒƒrƒ…[‚Ì•\Ž¦ˆÊ’u‚ð‹L‰¯‚·‚é
592603 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
593604 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
594605 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
@@ -689,6 +700,8 @@ type
689700 property ToolBarSettingSender : TToolBarSettingSenderType
690701 read FToolBarSettingSender write FToolBarSettingSender;
691702 property ScreenCursor : TCursor read GetScreenCursor write SetScreenCursor;
703+ property SortIndex: Integer read FSortIndex write FSortIndex;
704+ property SortOrder: Boolean read FSortOrder write FSortOrder;
692705 property ActiveBBS : TBBS read FActiveBBS write FActiveBBS;
693706 property WorkCount: Integer read FWorkCount write FWorkCount;
694707 procedure SetContent(inThread: TBrowserRecord);
@@ -820,17 +833,31 @@ uses
820833 FavoriteArrange, AddressHistory, Preview, Gesture,
821834 About, Option, Round, Splash, Sort, ListSelect, Imm,
822835 NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter,
823- HTMLCreate, ListViewUtils, GikoDataModule, GikoMessage;
836+ HTMLCreate, ListViewUtils, GikoDataModule;
824837
825838 const
839+ CAPTION_NAME: string = 'ƒMƒRƒiƒr';
826840 BLANK_HTML: string = 'about:blank';
827841 BROWSER_COUNT = 5; //ƒuƒ‰ƒEƒU‚̐”
828842 //D&D臒l
829843 DandD_THRESHOLD = 5; //D&D‚Ì臒lipixcel)
830844 //ƒvƒŒƒrƒ…[ƒtƒ@ƒCƒ‹–¼
831845 HTML_FILE_NAME = 'temp_preview.html';
846+ //ƒXƒŒƒbƒhiž‚݃{ƒbƒNƒX
847+ SELECTCOMBOBOX_NAME: string = ''; // 'ƒXƒŒƒbƒhižŒŸõ';
848+ SELECTCOMBOBOX_COLOR: TColor = clWindow;
849+ //ƒc[ƒ‹ƒo[ƒAƒCƒRƒ“
850+ TOOL_ICON_HEIGHT_MAX = 16; //‚‚³Å‘åƒAƒCƒRƒ“
851+ TOOL_ICON_HEIGHT_MIN = 17; //‚‚³Å¬ƒAƒCƒRƒ“
852+ TOOL_ICON_HEIGHT_NORMAL = 18; //‚‚³•W€ƒAƒCƒRƒ“
853+ TOOL_ICON_WIDTH_MAX = 19; //•Å‘åƒAƒCƒRƒ“
854+ TOOL_ICON_WIDTH_MIN = 20; //•Å¬ƒAƒCƒRƒ“
855+ TOOL_ICON_WIDTH_NORMAL = 21; //••W€ƒAƒCƒRƒ“
832856 ITEM_ICON_THREADLOG1 = 6; //ƒXƒŒƒAƒCƒRƒ“iƒƒO‚ ‚èj
833857 ITEM_ICON_THREADLOG2 = 7; //ƒXƒŒƒAƒCƒRƒ“iƒƒO‚ ‚èj
858+ TOOL_ICON_FAV_FOLDER = 30; //‚¨‹C‚É“ü‚èƒtƒHƒ‹ƒ_ƒAƒCƒRƒ“
859+ TOOL_ICON_FAV_BOARD = 31; //‚¨‹C‚É“ü‚蔃AƒCƒRƒ“
860+ TOOL_ICON_FAV_THREAD = 32; //‚¨‹C‚É“ü‚èƒXƒŒƒAƒCƒRƒ“
834861 //ƒƒbƒZ[ƒWID
835862 USER_TREECLICK = WM_USER + 2000;
836863 USER_RESIZED = WM_USER + 2001;
@@ -859,6 +886,7 @@ var
859886 msg: string;
860887 i: Integer;
861888 wp: TWindowPlacement;
889+ s: string;
862890 begin
863891 {$IFDEF DEBUG}
864892 AllocConsole;
@@ -885,6 +913,7 @@ begin
885913 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
886914
887915 //ƒAƒhƒŒƒX—š—ð“ǂݍž‚Ý
916+ //AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
888917 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
889918
890919 EnabledCloseButton := True;
@@ -1047,36 +1076,36 @@ begin
10471076 case GikoSys.Setting.ListWidthState of
10481077 glsMax: begin
10491078 ViewPanel.Width := 1;
1050- GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
1051- GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
1079+ GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1080+ GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
10521081 end;
10531082 glsMin: begin
10541083 ViewPanel.Width := GikoSys.Setting.ListWidth;
1055- GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
1056- GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
1084+ GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1085+ GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
10571086 end;
10581087 else begin
10591088 ViewPanel.Width := GikoSys.Setting.ListWidth;
1060- GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
1061- GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
1089+ GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1090+ GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
10621091 end;
10631092 end;
10641093 end else begin
10651094 case GikoSys.Setting.ListHeightState of
10661095 glsMax: begin
10671096 ViewPanel.Height := 1;
1068- GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
1069- GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
1097+ GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1098+ GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
10701099 end;
10711100 glsMin: begin
10721101 ViewPanel.Height := GikoSys.Setting.ListHeight;
1073- GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
1074- GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
1102+ GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1103+ GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
10751104 end;
10761105 else begin
10771106 ViewPanel.Height := GikoSys.Setting.ListHeight;
1078- GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
1079- GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
1107+ GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1108+ GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
10801109 end;
10811110 end;
10821111 end;
@@ -1127,7 +1156,7 @@ begin
11271156 end;
11281157
11291158 //ƒL[Ý’è“ǂݍž‚Ý
1130- GikoSys.LoadKeySetting(GikoDM.GikoFormActionList, GikoSys.GetMainKeyFileName);
1159+ GikoSys.LoadKeySetting(GikoDM.GikoFormActionList);
11311160
11321161 //ÅI„‰ñŽžŠÔ
11331162 // FLastRoundTime := 0;
@@ -1162,7 +1191,9 @@ begin
11621191 MoveToURL(ParamStr(i));
11631192 end;
11641193
1165- GikoDM.RepaintStatusBar;
1194+ s := GikoSys.FAbon.NGwordname;
1195+ StatusBar.Panels[2].Text := s;
1196+ StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
11661197 StatusBarResize(Sender);
11671198
11681199 dummy1.Caption := ItemReservPMenu.Caption;
@@ -1188,7 +1219,7 @@ begin
11881219 MouseGesture.SetHook( Handle );
11891220
11901221 //2chŒ¾Œê“ǂݏo‚µ
1191- GikoSys.SetGikoMessage;
1222+ GikoSys.Setting.SetMessages;
11921223
11931224 //ƒI[ƒgƒƒOƒCƒ“
11941225 if GikoSys.Setting.AutoLogin then
@@ -1200,7 +1231,6 @@ begin
12001231 FavoriteAddToolButton.Caption := '’ljÁ...';
12011232 AntiIndivAbonMenuItem.Caption := 'ŒÂ•Ê‚ ‚ځ`‚ñ‰ðœ';
12021233
1203-
12041234 end;
12051235
12061236 // CoolBar ‚̐ݒè‚ð•Ï”‚É•Û‘¶
@@ -1521,6 +1551,7 @@ begin
15211551 //ƒAƒhƒŒƒX—š—ð•Û‘¶
15221552 try
15231553 //AddressHistoryDM‚ÍŽ©“®¶¬ƒtƒH[ƒ€‚Ȃ̂ŁA‰ð•ú‚ÍŽ©“®“I‚É‚³‚ê‚éB
1554+ //AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
15241555 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
15251556 except
15261557 end;
@@ -1655,6 +1686,7 @@ begin
16551686 GikoSys.Setting.ShowDialogForAllTabClose := false;
16561687 GikoDM.AllTabCloseAction.Execute;
16571688 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1689+
16581690 SetContent(BrowserNullTab);
16591691 //TreeViewƒNƒŠƒAiBBS2ch.Free‚ÌŒã‚ɃNƒŠƒA‚·‚é‚ÆXPƒXƒ^ƒCƒ‹Žž‚ɃGƒ‰[o‚éj
16601692 TreeView.Items.Clear;
@@ -1985,35 +2017,27 @@ procedure TGikoForm.ListViewColumnClick(Sender: TObject;
19852017 var
19862018 id, idx : Integer;
19872019 orderList : TList;
1988- vSortIndex : Integer;
1989- vSortOrder : Boolean;
19902020 begin
19912021 idx := TListViewUtils.ActiveListTrueColumn( Column ).Tag;
1992- if TObject( FActiveList ) is TBBS then begin
1993- orderList := GikoSys.Setting.BBSColumnOrder;
1994- vSortIndex := GikoSys.Setting.BBSSortIndex;
1995- vSortOrder := GikoSys.Setting.BBSSortOrder;
1996- end else if TObject( FActiveList ) is TCategory then begin
1997- orderList := GikoSys.Setting.CategoryColumnOrder;
1998- vSortIndex := GikoSys.Setting.CategorySortIndex;
1999- vSortOrder := GikoSys.Setting.CategorySortOrder;
2000- end else if TObject( FActiveList ) is TBoard then begin
2001- orderList := GikoSys.Setting.BoardColumnOrder;
2002- vSortIndex := GikoSys.Setting.BoardSortIndex;
2003- vSortOrder := GikoSys.Setting.BoardSortOrder;
2004- end else
2022+
2023+ if TObject( FActiveList ) is TBBS then
2024+ orderList := GikoSys.Setting.BBSColumnOrder
2025+ else if TObject( FActiveList ) is TCategory then
2026+ orderList := GikoSys.Setting.CategoryColumnOrder
2027+ else if TObject( FActiveList ) is TBoard then
2028+ orderList := GikoSys.Setting.BoardColumnOrder
2029+ else
20052030 Exit;
20062031
20072032 id := Integer( orderList[ idx ] );
20082033
2009-
2010- if vSortIndex = id then
2011- vSortOrder := not vSortOrder
2034+ if FSortIndex = id then
2035+ FSortOrder := not FSortOrder
20122036 else begin
2013- vSortOrder := id = 0;
2037+ FSortOrder := id = 0;
20142038 end;
20152039
2016- TListViewUtils.ListViewSort(Sender, ListView, Column, GikoDM.ListNumberVisibleAction.Checked, vSortOrder);
2040+ TListViewUtils.ListViewSort(Sender, ListView, Column, GikoDM.ListNumberVisibleAction.Checked, FSortOrder, FSortIndex );
20172041 end;
20182042
20192043 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
@@ -2212,13 +2236,31 @@ begin
22122236 ListView.SetFocus;
22132237 ListView.SelectAll;
22142238 end;
2239+// *************************************************************************
2240+//! ƒcƒŠ[ƒrƒ…[‚̃_ƒuƒ‹ƒNƒŠƒbƒNƒCƒxƒ“ƒg
2241+// *************************************************************************
2242+procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2243+var
2244+ pos : TPoint;
2245+ rect: TRect;
2246+begin
2247+ pos := FMouseDownPos;
2248+ if (FClickNode <> nil) and (FClickNode = TreeView.GetNodeAt(pos.X, pos.Y)) then begin
2249+ //ƒ}ƒEƒX‚ªnode‚̏ã‚É‚¢‚é‚©
2250+ rect := FClickNode.DisplayRect(true);
2251+ if ((rect.Left <= pos.X) and (rect.Right >= pos.X)) and
2252+ ((rect.Bottom >= pos.Y) and (rect.Top <= pos.Y)) then begin
2253+ TreeDoubleClick( FClickNode );
2254+ FClickNode := nil;
2255+ end;
2256+ end;
2257+end;
2258+
22152259 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
22162260 begin
22172261 AddMessageList(Msg, nil, Icon);
22182262 end;
2219-// *************************************************************************
2220-//! ƒ_ƒEƒ“ƒ[ƒh‚ªŠ®—¹‚µ‚½‚Æ‚«‚É”­¶‚·‚éƒCƒxƒ“ƒg
2221-// *************************************************************************
2263+
22222264 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
22232265 var
22242266 ATitle: string;
@@ -2234,21 +2276,16 @@ begin
22342276 else
22352277 ATitle := Item.ThreadItem.Title;
22362278 if ATitle = '' then
2237- ATitle := GikoSys.GetGikoMessage(gmUnKnown);
2279+ ATitle := GikoSys.Setting.GetMessage(Ord(gmUnKnown));
22382280
22392281 if Item.State in [gdsComplete, gdsDiffComplete] then begin
22402282 //³íI—¹
22412283 if Item.DownType = gdtBoard then begin
22422284 //”Â
22432285 Item.SaveListFile;
2244- AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmSureItiran), nil, gmiOK);
2286+ AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureItiran)), nil, gmiOK);
22452287 if GetActiveList = Item.Board then begin
22462288 FActiveList := nil;
2247- //Ž©“®ƒ\[ƒg‚̏ꍇ”ˆꗗ‚̃\[ƒg‡‚ðƒNƒŠƒA‚·‚é
2248- if (GikoSys.Setting.AutoSortThreadList) then begin
2249- GikoSys.Setting.BoardSortIndex := 0;
2250- GikoSys.Setting.BoardSortOrder := True;
2251- end;
22522289 SetActiveList(Item.Board);
22532290 end;
22542291 Item.Board.Modified := True;
@@ -2262,11 +2299,11 @@ begin
22622299 if (Item.ThreadItem.ParentBoard.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
22632300 //boardPlugIn := Item.ThreadItem.BoardPlugIn;
22642301 boardPlugIn := Item.ThreadItem.ParentBoard.BoardPlugIn;
2265- THTMLCreate.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 ), @Res);
2302+ DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 ), @Res);
22662303 Item.ThreadItem.Title := Res.FTitle;
22672304 ATitle := Item.ThreadItem.Title;
22682305 end else if ATitle = 'i–¼Ì•s–¾j' then begin
2269- THTMLCreate.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1), @Res);
2306+ DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1), @Res);
22702307 ATitle := Res.FTitle;
22712308 end;
22722309 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
@@ -2295,12 +2332,12 @@ begin
22952332
22962333 if Item.State = gdsComplete then begin
22972334 PlaySound('New');
2298- AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmSureSyutoku), nil, gmiOK);
2335+ AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureSyutoku)), nil, gmiOK);
22992336 //Add by Genyakun
23002337 DiffComp := True;
23012338 end else begin
23022339 PlaySound('NewDiff');
2303- AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmSureDiff), nil, gmiOK);
2340+ AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureDiff)), nil, gmiOK);
23042341 //Add by Genyakun
23052342 DiffComp := True;
23062343 end;
@@ -2333,18 +2370,18 @@ begin
23332370 //SetContent(Item.ThreadItem);
23342371 InsertBrowserTab(Item.ThreadItem);
23352372 end;}
2336- AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmNotMod), nil, gmiSAD);
2373+ AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmNotMod)), nil, gmiSAD);
23372374 PlaySound('NoChange');
23382375 Screen.Cursor := crDefault;
23392376 end else if Item.State = gdsAbort then begin
23402377 //’†’f
2341- AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmAbort), nil, gmiOK);
2378+ AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmAbort)), nil, gmiOK);
23422379 end else if Item.State = gdsError then begin
23432380 //ƒGƒ‰[
23442381 s := Item.ErrText;
23452382 if s <> '' then
23462383 s := ':' + s;
2347- AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmError) + ' (' + IntToStr(Item.ResponseCode) + ')' + s, nil, gmiNG);
2384+ AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmError)) + ' (' + IntToStr(Item.ResponseCode) + ')' + s, nil, gmiNG);
23482385 // if Item.ResponseCode = 302 then
23492386 // AddMessageList('”‚ªˆÚ“]‚µ‚½‚©‚à‚µ‚ê‚È‚¢‚̂ŔXV‚ðs‚Á‚Ä‚­‚¾‚³‚¢B', nil, gmiNG);
23502387 PlaySound('Error');
@@ -2524,9 +2561,6 @@ begin
25242561 BrowserNullTab := TBrowserRecord.Create;
25252562 BrowserNullTab.Browser := Browser;
25262563 end;
2527- if BrowserNullTab.thread <> ThreadItem then begin
2528- BrowserNullTab.Movement := '';
2529- end;
25302564 BrowserNullTab.thread := ThreadItem;
25312565 Result := BrowserNullTab;
25322566 BrowserTab.TabIndex := -1;
@@ -2556,7 +2590,6 @@ begin
25562590 idx := BrowserTab.TabIndex;
25572591 if (FActiveContent <> nil) and
25582592 (FActiveContent.Thread <> Thread.Thread) and
2559- (FActiveContent.Browser <> nil) and
25602593 (Assigned(FActiveContent.Browser.Document)) then begin
25612594 try
25622595 try
@@ -2575,7 +2608,7 @@ begin
25752608 ItemBoardImage.Picture := nil;
25762609 BrowserNameLabel.Caption := '';
25772610 ItemImage.Picture := nil;
2578- BrowserNullTab.Thread := nil;
2611+ BrowserNullTab.Thread := nil;
25792612 //TOleControl(BrowserNullTab.Browser).Visible := true;
25802613 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
25812614 FActiveContent := nil;
@@ -2631,9 +2664,7 @@ begin
26312664 FActiveContent := Thread;
26322665
26332666 if not ThreadIsLog then begin
2634- Self.Caption := GikoDataModule.CAPTION_NAME ;
2635- //ƒXƒe[ƒ^ƒXƒo[‚É•\Ž¦‚µ‚Ä‚¢‚éƒXƒŒ‚Ì—e—Ê‚ðÁ‹Ž
2636- StatusBar.Panels[THREADSIZE_PANEL].Text := '';
2667+ Self.Caption := CAPTION_NAME ;
26372668 try
26382669 s := '<HTML><BODY><CENTER>‚±‚̃XƒŒƒbƒh‚͎擾‚µ‚Ä‚¢‚Ü‚¹‚ñ</CENTER></BODY></HTML>';
26392670 doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
@@ -2644,11 +2675,7 @@ begin
26442675 finally
26452676 end;
26462677 end else begin
2647- Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + ThreadTitle + ']';
2648- //ƒXƒe[ƒ^ƒXƒo[‚É•\Ž¦‚µ‚Ä‚¢‚éƒXƒŒ‚Ì—e—Ê‚ð•\Ž¦
2649- StatusBar.Panels[THREADSIZE_PANEL].Text := Format('%6.2f kB', [ThreadItem.Size / 1024]);
2650- StatusBar.Panels[THREADSIZE_PANEL].Width :=
2651- Max(StatusBar.Canvas.TextWidth(StatusBar.Panels[THREADSIZE_PANEL].Text), 70);
2678+ Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']';
26522679 //Thread.Repaint‚́AƒXƒLƒ““™‚̐ݒè‚ð•ÏX‚µ‚½‚Æ‚«AThread‚ðƒ_ƒEƒ“ƒ[ƒh‚µ‚½‚Æ‚«
26532680 //V‹K‚ÉThread‚ðŠJ‚¢‚½‚Æ‚«‚ɐ^‚É‚È‚Á‚Ä‚¢‚éB
26542681 if Thread.Repaint then begin
@@ -2660,7 +2687,7 @@ begin
26602687 //GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
26612688 HTMLCreater.CreateHTML2(doc, ThreadItem, sTitle);
26622689 Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
2663-
2690+
26642691 if ThreadItem = nil then begin
26652692 FActiveContent := nil;
26662693 BrowserTab.Repaint;
@@ -2728,20 +2755,10 @@ begin
27282755 ListView.Selected := nil;
27292756 // ListView.Columns.Clear;
27302757 if (FActiveContent <> nil) and (FActiveContent.Thread <> nil)
2731- and (FActiveContent.Thread.IsLogFile) then begin
2732- try
2733- Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + FActiveContent.Thread.Title + ']'
2734- except
2735- on E: Exception do begin
2736- //ƒXƒŒˆê——DLŒã‚È‚Ç‚ÉFActiveContent‚ÌŽ‚ÂThread‚ª
2737- //íœ‚³‚ê‚Ä‚¢‚éê‡‚ª‚ ‚é‚Ì‚Å‚±‚±‚ďˆ—‚·‚é
2738- ReleaseBrowser(FActiveContent);
2739- FActiveContent.Thread := nil;
2740- Self.Caption := GikoDataModule.CAPTION_NAME;
2741- end;
2742- end;
2743- end else
2744- Self.Caption := GikoDataModule.CAPTION_NAME;
2758+ and (FActiveContent.Thread.IsLogFile) then
2759+ Self.Caption := CAPTION_NAME + ' - [' + FActiveContent.Thread.Title + ']'
2760+ else
2761+ Self.Caption := CAPTION_NAME;
27452762 //Application.Title := CAPTION_NAME;
27462763
27472764 // ActiveListColumnSave;
@@ -2749,11 +2766,14 @@ begin
27492766 Screen.Cursor := crHourGlass;
27502767 try
27512768 if Obj is TBBS then begin
2752- TListViewUtils.SetCategoryListItem(TBBS(obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
2769+ TListViewUtils.SetCategoryListItem(TBBS(obj), ListView, GikoDM.ListNumberVisibleAction.Checked,
2770+ FSortIndex, FSortOrder);
27532771 end else if Obj is TCategory then begin
2754- TListViewUtils.SetBoardListItem(TCategory(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
2772+ TListViewUtils.SetBoardListItem(TCategory(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked,
2773+ FSortIndex, FSortOrder);
27552774 end else if Obj is TBoard then begin
2756- TListViewUtils.SetThreadListItem(TBoard(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
2775+ TListViewUtils.SetThreadListItem(TBoard(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked,
2776+ FSortIndex, FSortOrder);
27572777 end;
27582778 finally
27592779 Screen.Cursor := crDefault;
@@ -3497,9 +3517,6 @@ begin
34973517 end else if TObject(Node.Data) is TBoard then begin
34983518 TBoard(Node.Data).NodeExpand := False;
34993519 end;
3500- if (TreeView.Selected <> nil) and (TreeView.Selected = Node) then begin
3501- TreeClick(TreeView.Selected);
3502- end;
35033520 end;
35043521
35053522 procedure TGikoForm.MessageListViewResize(Sender: TObject);
@@ -3706,6 +3723,8 @@ begin
37063723 AddRoundNameMenu(ListReservPMenu);
37073724 end;
37083725
3726+
3727+//ActiveList‚ªTBoard‚©TCategory‚ŃXƒŒˆê——‚Å‚P‚ˆȏã‘I‘ð‚µ‚Ä‚¢‚é‚Æ—LŒø‚É‚È‚éActionde‹¤’Ê
37093728 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
37103729 begin
37113730 FClickNode := TreeView.Selected;
@@ -3801,6 +3820,7 @@ var
38013820 idx: Integer;
38023821 wkIntSt: Integer;
38033822 wkIntTo: Integer;
3823+ document: IHTMLDocument2;
38043824 BNum, BRes: string;
38053825 threadItem: TThreadItem;
38063826 begin
@@ -3888,31 +3908,31 @@ begin
38883908 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
38893909 if ViewPanel.Width < 2 then begin
38903910 ViewPanel.Width := 1;
3891- GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
3892- GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
3911+ GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
3912+ GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
38933913 GikoSys.Setting.ListWidthState := glsMax;
38943914 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
3895- GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
3896- GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
3915+ GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
3916+ GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
38973917 GikoSys.Setting.ListWidthState := glsMin;
38983918 end else begin
3899- GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
3900- GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
3919+ GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
3920+ GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
39013921 GikoSys.Setting.ListWidthState := glsNormal;
39023922 end;
39033923 end else begin
39043924 if ViewPanel.Height < 2 then begin
39053925 ViewPanel.Height := 1;
3906- GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
3907- GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
3926+ GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
3927+ GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
39083928 GikoSys.Setting.ListHeightState := glsMax;
39093929 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
3910- GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
3911- GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
3930+ GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
3931+ GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
39123932 GikoSys.Setting.ListHeightState := glsMin;
39133933 end else begin
3914- GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
3915- GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
3934+ GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
3935+ GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
39163936 GikoSys.Setting.ListHeightState := glsNormal;
39173937 end;
39183938 end;
@@ -3928,11 +3948,14 @@ var
39283948 idx: Integer;
39293949 begin
39303950
3951+// if NewTab = -1 then
3952+// ThreadItem := nil;
39313953 if not BrowserTab.Dragging then begin
39323954 FTabHintIndex := -1;
39333955 BrowserTab.Hint := '';
39343956 idx := BrowserTab.TabIndex;
39353957 if idx = -1 then begin
3958+ BrowserNullTab.Thread := nil;
39363959 SetContent(BrowserNullTab);
39373960
39383961 end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
@@ -3958,6 +3981,8 @@ begin
39583981 end;
39593982 MoveWindow(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser.Handle, 0, 0, BrowserPanel.Width, BrowserPanel.Height, false);
39603983 TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
3984+// GikoSys.OnlyAHundredRes := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
3985+// OnlyAHundredRes.Checked := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
39613986 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
39623987
39633988 if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
@@ -4144,11 +4169,6 @@ begin
41444169 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
41454170 FEvent.OnContextMenu := OnDocumentContextMenu;
41464171 FEvent.OnClick := WebBrowserClick; //’ljÁ‚µ‚½OnClickƒCƒxƒ“ƒg
4147- end else begin
4148- if FEvent <> nil then begin
4149- FEvent.Free;
4150- FEvent := nil;
4151- end;
41524172 end;
41534173
41544174 end;
@@ -4160,19 +4180,17 @@ begin
41604180 if (BrowserRecord <> nil) and (Length( BrowserRecord.Movement ) > 0) then begin
41614181 if threadItem.UnRead then begin
41624182 threadItem.UnRead := False;
4183+ threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
4184+ if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
41634185 TreeView.Refresh;
41644186 ListView.Refresh;
41654187 end;
4166- // ƒXƒNƒ[ƒ‹æ‚ªŽæ“¾ŠO‚̃ŒƒX‚ÌŽž‚͏I’[‚Ɉړ®
4167- if (StrToIntDef(BrowserRecord.Movement, 0) <= BrowserRecord.Thread.Count) then begin
4168- BrowserRecord.Move(BrowserRecord.Movement);
4169- BrowserRecord.Movement := '';
4170- end else begin
4171- BrowserRecord.Move(IntToStr(BrowserRecord.Thread.Count));
4172- end;
4173-
4188+ BrowserRecord.Move(BrowserRecord.Movement);
4189+ BrowserRecord.Movement := '';
41744190 end else if threadItem.UnRead then begin
41754191 threadItem.UnRead := False;
4192+ threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
4193+ if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
41764194 TreeView.Refresh;
41774195 BrowserRecord.Move('new');
41784196 ListView.Refresh;
@@ -4322,52 +4340,47 @@ procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
43224340 var
43234341 NewMenu: TMenuItem;
43244342 begin
4325- if FavoriteDM.Modified then begin
4326- FavoriteMenu.Clear;
4343+ FavoriteMenu.Clear;
43274344
4328- //‚¨‹C‚É“ü‚è‚̒ljÁ
4329- NewMenu := TMenuItem.Create(MainMenu);
4330- NewMenu.Action := GikoDM.FavoriteAddAction;
4331- FavoriteMenu.Add(NewMenu);
4332- //‚¨‹C‚É“ü‚è‚̐®—
4333- NewMenu := TMenuItem.Create(FavoriteMenu);
4334- NewMenu.Action := GikoDM.FavoriteArrangeAction;
4335- FavoriteMenu.Add(NewMenu);
4336- //ƒZƒpƒŒ[ƒ^
4337- FavoriteMenu.InsertNewLineAfter(NewMenu);
4338- CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
4339- FavoriteDM.Modified := false;
4340- end;
4345+ //‚¨‹C‚É“ü‚è‚̒ljÁ
4346+ NewMenu := TMenuItem.Create(MainMenu);
4347+ NewMenu.Action := GikoDM.FavoriteAddAction;
4348+ FavoriteMenu.Add(NewMenu);
4349+ //‚¨‹C‚É“ü‚è‚̐®—
4350+ NewMenu := TMenuItem.Create(FavoriteMenu);
4351+ NewMenu.Action := GikoDM.FavoriteArrangeAction;
4352+ FavoriteMenu.Add(NewMenu);
4353+ //ƒZƒpƒŒ[ƒ^
4354+ NewMenu := TMenuItem.Create(FavoriteMenu);
4355+ NewMenu.Caption := '-';
4356+ FavoriteMenu.Add(NewMenu);
4357+
4358+ CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
43414359 end;
43424360
43434361 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
43444362 var
43454363 i: Integer;
4346- NewMenu: array of TMenuItem;
4364+ NewMenu: TMenuItem;
43474365 begin
4348- SetLength(NewMenu, Node.Count);
4349- Node := Node.getFirstChild;
4350- i := 0;
4351- while ( Node <> nil ) do begin
4352- NewMenu[i] := TFavoriteMenuItem.Create(nil);
4353- NewMenu[i].AutoHotkeys := maAutomatic;
4354- NewMenu[i].Caption := CustomStringReplace(Node.Text, '&', '&&');
4355- TFavoriteMenuItem(NewMenu[i]).Data := Node.Data;
4366+ for i := 0 to Node.Count - 1 do begin
4367+ NewMenu := TFavoriteMenuItem.Create(Self);
4368+ NewMenu.AutoHotkeys := maAutomatic;
4369+ NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
4370+ TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
4371+ MenuItem.Add(NewMenu);
43564372
4357- if TObject(Node.Data) is TFavoriteFolder then begin
4358- NewMenu[i].ImageIndex := GikoDataModule.TOOL_ICON_FAV_FOLDER;
4359- CreateFavMenu(Node, NewMenu[i]);
4360- end else if TObject(Node.Data) is TFavoriteBoardItem then begin
4361- NewMenu[i].ImageIndex := GikoDataModule.TOOL_ICON_FAV_BOARD;
4362- NewMenu[i].OnClick := FavoriteClick;
4363- end else if TObject(Node.Data) is TFavoriteThreadItem then begin
4364- NewMenu[i].ImageIndex := GikoDataModule.TOOL_ICON_FAV_THREAD;
4365- NewMenu[i].OnClick := FavoriteClick;
4373+ if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
4374+ NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
4375+ CreateFavMenu(Node.Item[i], NewMenu);
4376+ end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
4377+ NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
4378+ NewMenu.OnClick := FavoriteClick;
4379+ end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
4380+ NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
4381+ NewMenu.OnClick := FavoriteClick;
43664382 end;
4367- Inc(i);
4368- Node := Node.getNextSibling;
43694383 end;
4370- MenuItem.Add(NewMenu);
43714384 end;
43724385
43734386 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
@@ -4431,7 +4444,9 @@ end;
44314444
44324445 procedure TGikoForm.FavoriteClick(Sender: TObject);
44334446 begin
4447+
44344448 FavoriteClick( Sender, True );
4449+
44354450 end;
44364451
44374452 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
@@ -4533,8 +4548,11 @@ begin
45334548 //===== ƒvƒ‰ƒOƒCƒ“
45344549 try
45354550 //ì‹Æ’†//
4551+ //bi := High( BoardPlugIns );
45364552 bi := Length(BoardGroups) - 1;
4553+ //for i := Low( BoardPlugIns ) to bi do begin
45374554 for i := 1 to bi do begin
4555+ //if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
45384556 if (BoardGroups[i].BoardPlugIn <> nil) and (Assigned(Pointer(BoardGroups[i].BoardPlugIn.Module))) then begin
45394557 case BoardGroups[i].BoardPlugIn.AcceptURL( inURL ) of
45404558 atThread:
@@ -4580,12 +4598,8 @@ begin
45804598 GikoSys.GetPopupResNumber( inURL, stRes, edRes );
45814599 browserRec := InsertBrowserTab( ThreadItem );
45824600 if ThreadItem.IsLogFile then begin
4583- if (browserRec <> nil) and (stRes > 0) then begin
4584- browserRec.Movement := IntToStr( stRes );
4585- if (stRes > ThreadItem.Count) then begin
4586- DownloadContent( ThreadItem );
4587- end;
4588- end;
4601+ if (browserRec <> nil) and (stRes > 0) then
4602+ browserRec.Move(IntToStr( stRes ));
45894603 end else begin
45904604 if (browserRec <> nil) and (stRes > 0) then
45914605 browserRec.Movement := IntToStr( stRes );
@@ -4684,12 +4698,8 @@ begin
46844698 if ThreadItem.IsLogFile then begin
46854699 GikoSys.GetPopupResNumber( inURL, stRes, edRes );
46864700 browserRec := InsertBrowserTab(ThreadItem);
4687- if (browserRec <> nil) and (stRes > 0) then begin
4701+ if (browserRec <> nil) and (stRes > 0) then
46884702 browserRec.Movement := IntToStr( stRes );
4689- if (stRes > ThreadItem.Count) then begin
4690- DownloadContent(ThreadItem);
4691- end;
4692- end;
46934703 end else begin
46944704 if AnsiPos(Host, Board.URL) = 0 then
46954705 ThreadItem.DownloadHost := Host
@@ -4950,42 +4960,26 @@ begin
49504960
49514961 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
49524962 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
4953- FPreviewBrowserRect := ARect;
4963+
49544964 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
49554965 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
49564966
49574967 end;
49584968
49594969 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
4960-var
4961- Pos : TPoint;
49624970 begin
4963-
49644971 if PreviewTimer.Enabled then
49654972 PreviewTimer.Enabled := False;
49664973 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
49674974 FHint.ReleaseHandle;
49684975 FHint.ClearAllRes;
49694976 end;
4970-
4971- if (FPreviewBrowser <> nil)
4972- and (IsWindowVisible(FPreviewBrowser.Handle)) then begin
4973- //‚±‚±‚ŏÁ‚³‚ê‚é‚Ì‚ª–â‘è
4974- //‚½‚Ô‚ñ‚±‚ê‚Å•\Ž¦”͈͔»’è‚Å‚«‚Ä‚¢‚é‚Í‚¸
4975- Pos := Mouse.CursorPos;
4976- Pos.X := Pos.X + Left;
4977- Pos.Y := Pos.Y + Top;
4978- if (FPreviewBrowserRect.Left > Pos.X) or
4979- (FPreviewBrowserRect.Right < Pos.X) or
4980- (FPreviewBrowserRect.Top > Pos.Y) or
4981- (FPreviewBrowserRect.Bottom < Pos.Y) then begin
4982- ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
4983- end;
4984- end;
4985-
4977+ if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
4978+ ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
49864979 Message.Result := 1;
49874980 inherited;
49884981 end;
4982+
49894983 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
49904984 begin
49914985 GikoDM.MsgBarCloseAction.Execute;
@@ -5105,12 +5099,12 @@ begin
51055099 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
51065100 LinkBarPopupMenu.Items.Add(MenuItem);
51075101 ToolButton.MenuItem := MenuItem;
5108- ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_FOLDER;
5102+ ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
51095103 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
5110- ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_BOARD;
5104+ ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
51115105 ToolButton.OnClick := FavoriteClick;
51125106 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
5113- ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_THREAD;
5107+ ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
51145108 ToolButton.OnClick := FavoriteClick;
51155109 end;
51165110 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
@@ -5658,13 +5652,16 @@ function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TTool
56585652 var
56595653 i : Integer;
56605654 begin
5661- Result := nil;
5655+
56625656 for i := bar.ButtonCount - 1 downto 0 do begin
56635657 if bar.Buttons[ i ].Action = action then begin
56645658 Result := bar.Buttons[ i ];
5665- Break;
5659+ Exit;
56665660 end;
56675661 end;
5662+
5663+ Result := nil;
5664+
56685665 end;
56695666
56705667 procedure TGikoForm.SetToolBarPopup;
@@ -5818,8 +5815,8 @@ begin
58185815
58195816 if Length( SelectComboBox.Text ) = 0 then
58205817 begin
5821- SelectComboBox.Text := GikoDataModule.SELECTCOMBOBOX_NAME;
5822- SelectComboBox.Color := GikoDataModule.SELECTCOMBOBOX_COLOR;
5818+ SelectComboBox.Text := SELECTCOMBOBOX_NAME;
5819+ SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
58235820 end;
58245821
58255822 end;
@@ -5854,6 +5851,7 @@ begin
58545851 end;
58555852
58565853
5854+// ‘S‚ẴŒƒX‚ð•\Ž¦
58575855 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
58585856 Shift: TShiftState; X, Y: Integer);
58595857 var
@@ -5913,15 +5911,14 @@ end;
59135911 procedure TGikoForm.StatusBarResize(Sender: TObject);
59145912 begin
59155913 StatusBar.Panels[1].Width := StatusBar.Width -
5916- StatusBar.Panels[0].Width -
5917- StatusBar.Panels[THREADSIZE_PANEL].Width -
5918- StatusBar.Panels[NGWORDNAME_PANEL].Width;
5914+ StatusBar.Panels[0].Width -
5915+ StatusBar.Panels[2].Width;
59195916 end;
59205917 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
59215918 begin
59225919
59235920 if (Length( SelectComboBox.Text ) = 0) or
5924- (SelectComboBox.Text = GikoDataModule.SELECTCOMBOBOX_NAME) then
5921+ (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
59255922 begin
59265923 SelectComboBox.Text := '';
59275924 SelectComboBox.Color := clWindow;
@@ -5929,6 +5926,7 @@ begin
59295926
59305927 end;
59315928
5929+//”–¼ŒŸõ
59325930 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
59335931 begin
59345932
@@ -6053,8 +6051,6 @@ begin
60536051 FDropSpaceNode := nil;
60546052 end;
60556053 end;
6056- //XV‚µ‚½‚±‚Æ‚ð‹³‚¦‚é
6057- FavoriteDM.Modified := true;
60586054
60596055 SetLinkBar;
60606056
@@ -6063,8 +6059,6 @@ end;
60636059 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
60646060 Node: TTreeNode; var S: String);
60656061 begin
6066- //XV‚µ‚½‚±‚Æ‚ð‹³‚¦‚é
6067- FavoriteDM.Modified := true;
60686062
60696063 FavoriteTreeView.ReadOnly := True;
60706064 SetLinkBar;
@@ -6092,10 +6086,7 @@ begin
60926086 FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
60936087 end;
60946088 VK_SPACE:
6095- begin
6096- FClickNode := FavoriteTreeView.Selected;
6097- GikoDM.FavoriteTreeViewReloadActionExecute( Sender );
6098- end;
6089+ FavoriteTreeViewDblClick( Sender );
60996090 end;
61006091 end else begin
61016092 //•ÒW’†‚ÉESC‚ð‰Ÿ‚µ‚½‚çA•ÒW‚ðI—¹‚µ‚āAŒ³‚Ì•¶Žš—ñ‚É–ß‚·
@@ -6228,6 +6219,27 @@ begin
62286219 end;
62296220
62306221 end;
6222+// *************************************************************************
6223+//! ‚¨‹C‚É“ü‚èƒcƒŠ[‚̃_ƒuƒ‹ƒNƒŠƒbƒNƒCƒxƒ“ƒg
6224+// *************************************************************************
6225+procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
6226+var
6227+ pos : TPoint;
6228+ rect: TRect;
6229+begin
6230+ //ƒNƒŠƒbƒNŽž‚Ì‘I‘ðƒCƒxƒ“ƒg‚Æ“¯‚¶‚È‚çƒ_ƒuƒ‹ƒNƒŠƒbƒNŽÀs
6231+ pos := FMouseDownPos;
6232+ if (FClickNode <> nil) and (FClickNode = FavoriteTreeView.GetNodeAt(pos.X, pos.Y)) then begin
6233+ //ƒ}ƒEƒX‚ªnode‚̏ã‚É‚¢‚é‚©
6234+ rect := FClickNode.DisplayRect(true);
6235+ if ((rect.Left <= pos.X) and (rect.Right >= pos.X)) and
6236+ ((rect.Bottom >= pos.Y) and (rect.Top <= pos.Y)) then begin
6237+ GikoDM.FavoriteTreeViewReloadActionExecute( Sender );
6238+ FClickNode := nil;
6239+ end;
6240+ end;
6241+end;
6242+
62316243 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
62326244 var
62336245 Found: TTreeNode;
@@ -6313,8 +6325,6 @@ begin
63136325 finally
63146326 FDropSpaceNode := nil;
63156327 end;
6316- //XV‚µ‚½‚±‚Æ‚ð‹³‚¦‚é
6317- FavoriteDM.Modified := true;
63186328 SetLinkBar;
63196329 end;
63206330
@@ -6423,7 +6433,7 @@ begin
64236433 tmp := GikoSys.ReadThreadFile(FileName, Number);
64246434 end;
64256435 if tmp <> '' then begin
6426- THTMLCreate.DivideStrLine(tmp, @Res);
6436+ DivideStrLine(tmp, @Res);
64276437
64286438 Header := IntToStr(Number) + ' F' + Res.FName + ' F' + Res.FDateTime + #13#10;
64296439 if ReplaceTag then begin
@@ -6445,7 +6455,7 @@ begin
64456455 end;
64466456 Body := CustomStringReplace(Body, '</a>', '',true);
64476457
6448- Body := HTMLCreater.DeleteLink(Body);
6458+ Body := GikoSys.DeleteLink(Body);
64496459 if ReplaceTag then begin
64506460 Body := CustomStringReplace(Body, '&lt;', '<');
64516461 Body := CustomStringReplace(Body, '&gt;', '>');
@@ -6658,8 +6668,13 @@ begin
66586668
66596669 end;
66606670 // *************************************************************************
6661-//! ƒcƒŠ[ƒrƒ…[‚ÌKeyDownƒCƒxƒ“ƒg
6671+//! ƒcƒŠ[ƒrƒ…[‚̃NƒŠƒbƒNƒCƒxƒ“ƒg
66626672 // *************************************************************************
6673+procedure TGikoForm.TreeViewClick(Sender: TObject);
6674+begin
6675+ FClickNode := TreeView.Selected;
6676+ FMouseDownPos := TreeView.ScreenToClient(Mouse.CursorPos);
6677+end;
66636678 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
66646679 Shift: TShiftState);
66656680 begin
@@ -6672,35 +6687,21 @@ begin
66726687 TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
66736688 end;
66746689 end;
6675-//! ‚¨‹C‚É“ü‚è‚ÌMouseDownƒCƒxƒ“ƒg
6690+
66766691 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
66776692 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
66786693 var
66796694 favItem : TTreeNode;
66806695 favThreadItem : TFavoriteThreadItem;
6681- rect: TRect;
66826696 begin
6697+
66836698 case Button of
6684- mbLeft:
6699+{ mbLeft:
66856700 begin
6686- if not (ssAlt in Shift) and (FavoriteTreeView.Selected <> nil) and
6687- (FavoriteTreeView.Selected = FavoriteTreeView.GetNodeAt(X, Y)) then begin
6688- //ƒ}ƒEƒX‚ªnode‚̏ã‚É‚¢‚é‚©
6689- rect := FavoriteTreeView.Selected.DisplayRect(true);
6690- if ((rect.Left <= X) and (rect.Right >= X)) and
6691- ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin
6692- if ssDouble in Shift then begin
6693- FClickNode := FavoriteTreeView.Selected;
6694- GikoDM.FavoriteTreeViewReloadActionExecute(Sender);
6695- FClickNode := nil;
6696- end else begin
6697- FavoriteClick(
6698- TObject(FavoriteTreeView.Selected));
6699- end;
6700- end;
6701- end;
6701+ FMouseDownPos.X := X;
6702+ FMouseDownPos.Y := Y;
67026703 end;
6703- mbMiddle:
6704+} mbMiddle:
67046705 begin
67056706 favItem := FavoriteTreeView.GetNodeAt( X, Y );
67066707 if favItem = nil then Exit;
@@ -6760,6 +6761,16 @@ end;
67606761 // *************************************************************************
67616762 //! ‚¨‹C‚É“ü‚èƒcƒŠ[‚̃}ƒEƒXƒAƒbƒvƒCƒxƒ“ƒg
67626763 // *************************************************************************
6764+procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
6765+ Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6766+begin
6767+ if (Button = mbLeft) and not (ssDouble in Shift) then begin
6768+ if (FClickNode <> nil) and (FClickNode = FavoriteTreeView.GetNodeAt(X, Y)) then begin
6769+ FavoriteClick( TObject( FClickNode ) );
6770+ end;
6771+ end;
6772+end;
6773+
67636774 function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
67646775 var
67656776 p : TPoint;
@@ -6838,21 +6849,18 @@ var
68386849 rec : TBrowserRecord;
68396850 i, bound : Integer;
68406851 begin
6841- bound := BrowserTab.Tabs.Count -1;
6852+ bound := BrowserTab.Tabs.Count -1;
68426853 if bound = -1 then begin
68436854 Result := False;
68446855 Exit; //for‚É”ò‚΂Ȃ¢‚Å‘€ì‚𔲂¯‚é
6845- end;
6856+ end;
68466857
6847- for i := 0 to bound do begin
6848- try
6849- rec := TBrowserRecord( BrowserTab.Tabs.Objects[ i ] );
6850- if( rec <> nil) and (rec.Thread <> nil) then
6851- AStringList.Add( rec.Thread.URL );
6852- except
6853- end;
6854- end;
6855- Result := True;
6858+ for i := 0 to bound do begin
6859+ rec := TBrowserRecord( BrowserTab.Tabs.Objects[ i ] );
6860+ if( rec <> nil) and (rec.Thread <> nil) then
6861+ AStringList.Add( rec.Thread.URL );
6862+ end;
6863+ Result := True;
68566864 end;
68576865
68586866 function TGikoForm.SaveTabURLs : Boolean;
@@ -6867,15 +6875,12 @@ begin
68676875 SaveStringList := TStringList.Create;
68686876 try
68696877 if GetTabURLs(SaveStringList) then begin
6870- try
6871- if FileExists( GikoSys.GetAppDir + Filename) then begin
6872- if FileExists( GikoSys.GetAppDir + bFilename) then
6873- DeleteFile(GikoSys.GetAppDir + bFilename);
6878+ if FileExists( GikoSys.GetAppDir + Filename) then begin
6879+ if FileExists( GikoSys.GetAppDir + bFilename) then
6880+ DeleteFile(GikoSys.GetAppDir + bFilename);
68746881
6875- //ƒoƒbƒNƒAƒbƒv‚ðì‚éB
6876- RenameFile(GikoSys.GetAppDir + Filename, GikoSys.GetAppDir + bFilename);
6877- end;
6878- except
6882+ //ƒoƒbƒNƒAƒbƒv‚ðì‚éB
6883+ RenameFile(GikoSys.GetAppDir + Filename, GikoSys.GetAppDir + bFilename);
68796884 end;
68806885 SaveStringList.SaveToFile(GikoSys.GetAppDir + Filename);
68816886 Result := true;
@@ -6886,8 +6891,6 @@ begin
68866891 end;
68876892
68886893 function TGikoForm.LoadTabURLs : Boolean;
6889-const
6890- TABFILE = 'tab.sav';
68916894 var
68926895 i, bound : Integer;
68936896 item : TThreadItem;
@@ -6896,7 +6899,7 @@ var
68966899 fileName : string;
68976900 begin
68986901
6899- fileName := ExtractFilePath(Application.ExeName) + TABFILE;
6902+ fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
69006903 URLs := TStringList.Create();
69016904 GikoTab := GikoSys.Setting.BrowserTabAppend;
69026905 try
@@ -6912,10 +6915,6 @@ begin
69126915 if item <> nil then
69136916 InsertBrowserTab( item, false );
69146917 end;
6915- //Å‰‚Ì‚P–‡‚ÉÝ’è ƒAƒhƒŒƒX‚̐ݒè‚Ì‚½‚߂̃Jƒ‰ŒÄ‚Ñ
6916- if BrowserTab.Tabs.Count > 0 then begin
6917- BrowserTab.OnChange(nil);
6918- end;
69196918 end else
69206919 Result := False;
69216920 end else
@@ -7635,6 +7634,61 @@ begin
76357634 end;
76367635 end;
76377636 // *************************************************************************
7637+//! ‚¨‹C‚É“ü‚èƒcƒŠ[‚̃NƒŠƒbƒNƒCƒxƒ“ƒg
7638+// *************************************************************************
7639+procedure TGikoForm.FavoriteTreeViewClick(Sender: TObject);
7640+begin
7641+ //Œ»Ý‘I‘ð‚³‚ê‚Ä‚¢‚éƒAƒCƒeƒ€‚ð•Û‘¶
7642+ FClickNode := FavoriteTreeView.Selected;
7643+ FMouseDownPos := FavoriteTreeView.ScreenToClient(Mouse.CursorPos);
7644+end;
7645+// *************************************************************************
7646+//! ‚¨‹C‚É“ü‚èƒcƒŠ[‚̃AƒCƒeƒ€‚̏k¬ŽžƒCƒxƒ“ƒg
7647+// *************************************************************************
7648+procedure TGikoForm.FavoriteTreeViewCollapsing(Sender: TObject;
7649+ Node: TTreeNode; var AllowCollapse: Boolean);
7650+begin
7651+ //k¬‚³‚ꂽ‚ç•Û‘¶‚³‚ê‚Ä‚¢‚éƒNƒŠƒbƒNŽž‘I‘ðƒAƒCƒeƒ€‚ðƒNƒŠƒA
7652+ FClickNode := nil;
7653+end;
7654+// *************************************************************************
7655+//! ‚¨‹C‚É“ü‚èƒcƒŠ[‚̃AƒCƒeƒ€‚Ì“WŠJŽžƒCƒxƒ“ƒg
7656+// *************************************************************************
7657+procedure TGikoForm.FavoriteTreeViewExpanding(Sender: TObject;
7658+ Node: TTreeNode; var AllowExpansion: Boolean);
7659+begin
7660+ //“WŠJ‚³‚ꂽ‚ç•Û‘¶‚³‚ê‚Ä‚¢‚éƒNƒŠƒbƒNŽž‘I‘ðƒAƒCƒeƒ€‚ðƒNƒŠƒA
7661+ FClickNode := nil;
7662+end;
7663+// *************************************************************************
7664+//! ƒcƒŠ[ƒrƒ…[‚̃AƒCƒeƒ€‚̏k¬ŽžƒCƒxƒ“ƒg
7665+// *************************************************************************
7666+procedure TGikoForm.TreeViewCollapsing(Sender: TObject; Node: TTreeNode;
7667+ var AllowCollapse: Boolean);
7668+begin
7669+ FClickNode := nil;
7670+end;
7671+// *************************************************************************
7672+//! ƒcƒŠ[ƒrƒ…[‚̃AƒCƒeƒ€‚Ì“WŠJŽžƒCƒxƒ“ƒg
7673+// *************************************************************************
7674+procedure TGikoForm.TreeViewExpanding(Sender: TObject; Node: TTreeNode;
7675+ var AllowExpansion: Boolean);
7676+begin
7677+ FClickNode := nil;
7678+end;
7679+// *************************************************************************
7680+//! ƒcƒŠ[ƒrƒ…[‚̃}ƒEƒXƒAƒbƒvƒCƒxƒ“ƒg
7681+// *************************************************************************
7682+procedure TGikoForm.TreeViewMouseUp(Sender: TObject; Button: TMouseButton;
7683+ Shift: TShiftState; X, Y: Integer);
7684+begin
7685+ if (Button = mbLeft) and not (ssDouble in Shift) then begin
7686+ if (FClickNode <> nil) and (FClickNode = TreeView.GetNodeAt(X, Y)) then begin
7687+ TreeClick(FClickNode);
7688+ end;
7689+ end;
7690+end;
7691+// *************************************************************************
76387692 //! ƒ_ƒEƒ“ƒ[ƒhƒRƒ“ƒgƒ[ƒ‹ƒXƒŒƒbƒh‚̐¶¬
76397693 // *************************************************************************
76407694 procedure TGikoForm.CreateControlThread();
@@ -7742,32 +7796,6 @@ begin
77427796 except
77437797 end;
77447798 end;
7745-//! ƒLƒƒƒrƒlƒbƒg‚̃}ƒEƒXƒ_ƒEƒ“ƒCƒxƒ“ƒg
7746-procedure TGikoForm.TreeViewMouseDown(Sender: TObject;
7747- Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7748-var
7749- rect : TRect;
7750-begin
7751- case Button of
7752- mbLeft:
7753- begin
7754- if (TreeView.Selected <> nil) and
7755- (TreeView.Selected = TreeView.GetNodeAt(X, Y)) then begin
7756- //ƒ}ƒEƒX‚ªnode‚̏ã‚É‚¢‚é‚©
7757- rect := TreeView.Selected.DisplayRect(true);
7758- if ((rect.Left <= X) and (rect.Right >= X)) and
7759- ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin
7760- // ƒNƒŠƒbƒN‚ƃ_ƒuƒ‹ƒNƒŠƒbƒN‚ðƒRƒR‚Å”»’è
7761- if ssDouble in Shift then begin
7762- TreeDoubleClick( TreeView.Selected );
7763- end else begin
7764- TreeClick(TreeView.Selected);
7765- end;
7766- end;
7767- end;
7768- end;
7769- end;
7770-end;
77717799
77727800 initialization
77737801 OleInitialize(nil);
--- a/GikoDataModule.dfm
+++ b/GikoDataModule.dfm
@@ -1030,6 +1030,13 @@ object GikoDM: TGikoDM
10301030 ImageIndex = 44
10311031 OnExecute = SelectItemSaveForDatExecute
10321032 end
1033+ object FileSaveAs1: TFileSaveAs
1034+ Tag = -1
1035+ Category = #12501#12449#12452#12523
1036+ Caption = #21517#21069#12434#20184#12369#12390#20445#23384'(&A)...'
1037+ Hint = #21029#21517#12391#20445#23384'|'#29694#22312#12398#12501#12449#12452#12523#12395#26032#12375#12356#21517#21069#12434#12388#12369#12390#20445#23384
1038+ ImageIndex = 44
1039+ end
10331040 object LogFolderOpenAction: TAction
10341041 Category = #26495
10351042 Caption = 'Explorer'#12391'Log'#12501#12457#12523#12480#12434#38283#12367
@@ -1195,12 +1202,6 @@ object GikoDM: TGikoDM
11951202 Hint = #12462#12467#12490#12499'Wiki'#12398'FAQ'#12434#34920#31034#12377#12427
11961203 OnExecute = WikiFAQWebPageActionExecute
11971204 end
1198- object ThreadSizeCalcForFileAction: TAction
1199- Category = #12484#12540#12523
1200- Caption = #12473#12524#12483#12489#12398#23481#37327#12434#12501#12449#12452#12523#12363#12425#20877#35336#31639#12377#12427
1201- Hint = #12473#12524#12483#12489#12398#23481#37327#12434#12501#12449#12452#12523#12363#12425#20877#35336#31639#12377#12427
1202- OnExecute = ThreadSizeCalcForFileActionExecute
1203- end
12041205 end
12051206 object ToobarImageList: TImageList
12061207 Left = 44
@@ -3193,8 +3194,4 @@ object GikoDM: TGikoDM
31933194 F81FE0FFE007FFFFF83FFFFFF81FFFFF00000000000000000000000000000000
31943195 000000000000}
31953196 end
3196- object SaveDialog: TSaveDialog
3197- Left = 48
3198- Top = 128
3199- end
32003197 end
--- a/GikoDataModule.pas
+++ b/GikoDataModule.pas
@@ -11,38 +11,7 @@ uses
1111 SHDocVw_TLB,
1212 MSHTML_TLB,
1313 {$IFEND}
14- ComCtrls, BrowserRecord, Graphics, Messages, Setting, Dialogs;
15-
16-const
17- CAPTION_NAME: string = 'ƒMƒRƒiƒr';
18- USER_SETLINKBAR = WM_USER + 2003;
19-
20- ITEM_ICON_SORT1 = 12; //!< ƒ\[ƒgƒAƒCƒRƒ“
21- ITEM_ICON_SORT2 = 13; //!< ƒ\[ƒgƒAƒCƒRƒ“
22-
23- //ƒc[ƒ‹ƒo[ƒAƒCƒRƒ“
24- TOOL_ICON_HEIGHT_MAX = 16; //!< ‚‚³Å‘åƒAƒCƒRƒ“
25- TOOL_ICON_HEIGHT_MIN = 17; //!< ‚‚³Å¬ƒAƒCƒRƒ“
26- TOOL_ICON_HEIGHT_NORMAL = 18; //!< ‚‚³•W€ƒAƒCƒRƒ“
27- TOOL_ICON_WIDTH_MAX = 19; //!< •Å‘åƒAƒCƒRƒ“
28- TOOL_ICON_WIDTH_MIN = 20; //!< •Å¬ƒAƒCƒRƒ“
29- TOOL_ICON_WIDTH_NORMAL = 21; //!< ••W€ƒAƒCƒRƒ“
30-
31- TOOL_ICON_FAV_FOLDER = 30; //!< ‚¨‹C‚É“ü‚èƒtƒHƒ‹ƒ_ƒAƒCƒRƒ“
32- TOOL_ICON_FAV_BOARD = 31; //!< ‚¨‹C‚É“ü‚蔃AƒCƒRƒ“
33- TOOL_ICON_FAV_THREAD = 32; //!< ‚¨‹C‚É“ü‚èƒXƒŒƒAƒCƒRƒ“
34-
35- //! ƒMƒRƒiƒrƒTƒCƒg‚ÌURL
36- URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
37- //! MonazillaƒTƒCƒg‚ÌURL
38- URL_MONAZILLA: string = 'http://www.monazilla.org/';
39- //! 2‚¿‚á‚ñ‚Ë‚é‚ÌURL
40- URL_2ch: string = 'http://www.2ch.net/';
41- //! ƒMƒRƒiƒrWiki‚ÌURL
42- URL_Wiki: string = 'http://gikowiki.dyndns.info/index.php?FAQ';
43-
44- SELECTCOMBOBOX_NAME: string = ''; // 'ƒXƒŒƒbƒhižŒŸõ';
45- SELECTCOMBOBOX_COLOR: TColor = clWindow;
14+ ComCtrls, BrowserRecord;
4615
4716
4817 type
@@ -185,6 +154,7 @@ type
185154 BrowserMaxAndFocusAction: TAction;
186155 SelectItemSaveForHTML: TAction;
187156 SelectItemSaveForDat: TAction;
157+ FileSaveAs1: TFileSaveAs;
188158 LogFolderOpenAction: TAction;
189159 TabsSaveAction: TAction;
190160 TabsOpenAction: TAction;
@@ -210,8 +180,6 @@ type
210180 UnSelectedListViewAction: TAction;
211181 WikiFAQWebPageAction: TAction;
212182 ToobarImageList: TImageList;
213- SaveDialog: TSaveDialog;
214- ThreadSizeCalcForFileAction: TAction;
215183 procedure EditNGActionExecute(Sender: TObject);
216184 procedure ReloadActionExecute(Sender: TObject);
217185 procedure GoFowardActionExecute(Sender: TObject);
@@ -393,22 +361,10 @@ type
393361 procedure MidokuActionExecute(Sender: TObject);
394362 procedure AllSelectActionExecute(Sender: TObject);
395363 procedure AllSelectActionUpdate(Sender: TObject);
396- procedure ThreadSizeCalcForFileActionExecute(Sender: TObject);
397364 private
398365 { Private éŒ¾ }
399- procedure ClearResFilter;
400- procedure SetResRange(range: Integer);
401- procedure SetThreadAreaHorNormal;
402- procedure SetThreadAreaHorizontal(gls : TGikoListState);
403- procedure SetThreadAreaVerNormal;
404- procedure SetThreadAreaVertical(gls : TGikoListState);
405- procedure SetThreadReadProperty(read: Boolean);
406- procedure SelectThreadSaveToFile(dat: Boolean);
407- function GetSortProperties(List: TObject;var vSortOrder: Boolean): Boolean;
408- procedure RecalcThreadSize(limit : Integer);
409366 public
410367 { Public éŒ¾ }
411- procedure RepaintStatusBar;
412368 published
413369 { Published éŒ¾ }
414370 //! TAction‚ÅGetActiveContent‚ªnilˆÈŠO‚Å—LŒø‚É‚È‚é
@@ -426,16 +382,46 @@ var
426382 implementation
427383
428384 uses
429- Windows, Math, Clipbrd,
385+ Windows, Math, Messages, Dialogs, Clipbrd,
430386 Giko, GikoSystem, GikoUtil, BoardGroup,
431- FavoriteArrange, Favorite, MojuUtils,
387+ FavoriteArrange, Favorite, Setting, MojuUtils,
432388 Editor, ListSelect, Search, Option, Round,
433389 KeySetting, Gesture, Kotehan, ToolBarSetting,
434390 ToolBarUtil, NewBoard, HTMLCreate, IndividualAbon,
435- GikoBayesian, About, ShellAPI,
391+ GikoBayesian, About, ShellAPI, Graphics,
436392 RoundName, RoundData, Menus, ListViewUtils,
437- ThreadControl, GikoMessage;
393+ ThreadControl;
438394
395+const
396+ CAPTION_NAME: string = 'ƒMƒRƒiƒr';
397+ USER_SETLINKBAR = WM_USER + 2003;
398+
399+ ITEM_ICON_SORT1 = 12; //!< ƒ\[ƒgƒAƒCƒRƒ“
400+ ITEM_ICON_SORT2 = 13; //!< ƒ\[ƒgƒAƒCƒRƒ“
401+
402+ //ƒc[ƒ‹ƒo[ƒAƒCƒRƒ“
403+ TOOL_ICON_HEIGHT_MAX = 16; //!< ‚‚³Å‘åƒAƒCƒRƒ“
404+ TOOL_ICON_HEIGHT_MIN = 17; //!< ‚‚³Å¬ƒAƒCƒRƒ“
405+ TOOL_ICON_HEIGHT_NORMAL = 18; //!< ‚‚³•W€ƒAƒCƒRƒ“
406+ TOOL_ICON_WIDTH_MAX = 19; //!< •Å‘åƒAƒCƒRƒ“
407+ TOOL_ICON_WIDTH_MIN = 20; //!< •Å¬ƒAƒCƒRƒ“
408+ TOOL_ICON_WIDTH_NORMAL = 21; //!< ••W€ƒAƒCƒRƒ“
409+
410+ TOOL_ICON_FAV_FOLDER = 30; //!< ‚¨‹C‚É“ü‚èƒtƒHƒ‹ƒ_ƒAƒCƒRƒ“
411+ TOOL_ICON_FAV_BOARD = 31; //!< ‚¨‹C‚É“ü‚蔃AƒCƒRƒ“
412+ TOOL_ICON_FAV_THREAD = 32; //!< ‚¨‹C‚É“ü‚èƒXƒŒƒAƒCƒRƒ“
413+
414+ //! ƒMƒRƒiƒrƒTƒCƒg‚ÌURL
415+ URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
416+ //! MonazillaƒTƒCƒg‚ÌURL
417+ URL_MONAZILLA: string = 'http://www.monazilla.org/';
418+ //! 2‚¿‚á‚ñ‚Ë‚é‚ÌURL
419+ URL_2ch: string = 'http://www.2ch.net/';
420+ //! ƒMƒRƒiƒrWiki‚ÌURL
421+ URL_Wiki: string = 'http://gikowiki.dyndns.info/index.php?FAQ';
422+
423+ SELECTCOMBOBOX_NAME: string = ''; // 'ƒXƒŒƒbƒhižŒŸõ';
424+ SELECTCOMBOBOX_COLOR: TColor = clWindow;
439425
440426 {$R *.dfm}
441427 // *************************************************************************
@@ -485,13 +471,19 @@ end;
485471 //! NGƒ[ƒh“ǂݍž‚݁iˆê‚ÂŒã‚ëj
486472 // *************************************************************************
487473 procedure TGikoDM.GoFowardActionExecute(Sender: TObject);
474+var
475+ s: string;
488476 begin
489477 //ˆê‚ÂŒã‚ë‚̓ǂݍž‚݁@Ž¸”s‚µ‚½‚烁ƒbƒZ[ƒWo—Í
490478 if GikoSys.FAbon.GoBack =false then begin
491479 MsgBox(GikoForm.Handle, 'ˆê‚ÂŒã‚ë‚ÌNGƒ[ƒhƒtƒ@ƒCƒ‹‚̓ǂݍž‚Ý‚ÉŽ¸”s‚µ‚Ü‚µ‚½', 'ƒGƒ‰[', MB_OK or MB_ICONEXCLAMATION);
492480 end else begin
493481 //ƒXƒe[ƒ^ƒX‚É•\Ž¦‚³‚ê‚éNGƒ[ƒhƒtƒ@ƒCƒ‹–¼‚ðXV
494- RepaintStatusBar;
482+ s := GikoSys.FAbon.NGwordname;
483+ GikoForm.StatusBar.Panels.Items[2].Text := s;
484+ //ƒXƒe[ƒ^ƒX‚Ì•\Ž¦ƒTƒCƒY‚̃ŠƒTƒCƒY
485+ GikoForm.StatusBar.Panels[2].Width := Max(GikoForm.StatusBar.Canvas.TextWidth(s), 100);
486+ GikoForm.StatusBarResize(Sender);
495487 //‘S‚Ẵ^ƒu‚ɍĕ`‰æ‚ðÝ’è
496488 GikoForm.RepaintAllTabsBrowser();
497489 end;
@@ -500,33 +492,24 @@ end;
500492 //! NGƒ[ƒh“ǂݍž‚݁iˆê‚‘Oj
501493 // *************************************************************************
502494 procedure TGikoDM.GoBackActionExecute(Sender: TObject);
495+var
496+ s: string;
503497 begin
504498 //ˆê‚ÂŒã‚ë‚̓ǂݍž‚݁@Ž¸”s‚µ‚½‚烁ƒbƒZ[ƒWo—Í
505499 if GikoSys.FAbon.GoForward =false then begin
506500 MsgBox(GikoForm.Handle, 'ˆê‚‘O‚ÌNGƒ[ƒhƒtƒ@ƒCƒ‹‚̓ǂݍž‚Ý‚ÉŽ¸”s‚µ‚Ü‚µ‚½', 'ƒGƒ‰[', MB_OK or MB_ICONEXCLAMATION);
507501 end else begin
508- //ƒXƒe[ƒ^ƒX‚É•\Ž¦‚³‚ê‚éNGƒ[ƒhƒtƒ@ƒCƒ‹–¼‚ðXV
509- RepaintStatusBar;
510- //‘S‚Ẵ^ƒu‚ɍĕ`‰æ‚ðÝ’è
502+ //ƒXƒe[ƒ^ƒX‚É•\Ž¦‚³‚ê‚éNGƒ[ƒhƒtƒ@ƒCƒ‹–¼‚ðXV
503+ s := GikoSys.FAbon.NGwordname;
504+ GikoForm.StatusBar.Panels.Items[2].Text := s;
505+ //ƒXƒe[ƒ^ƒX‚Ì•\Ž¦ƒTƒCƒY‚̃ŠƒTƒCƒY
506+ GikoForm.StatusBar.Panels[2].Width := Max(GikoForm.StatusBar.Canvas.TextWidth(s), 100);
507+ GikoForm.StatusBarResize(Sender);
508+ //‘S‚Ẵ^ƒu‚ɍĕ`‰æ‚ðÝ’è
511509 GikoForm.RepaintAllTabsBrowser();
512510 end;
513511 end;
514512 // *************************************************************************
515-//! NGƒ[ƒh‚ð•ÏX‚µ‚½Œã‚̃Xƒe[ƒ^ƒXƒo[‚̍XVˆ—
516-// *************************************************************************
517-procedure TGikoDM.RepaintStatusBar;
518-var
519- s : String;
520-begin
521- //ƒXƒe[ƒ^ƒX‚É•\Ž¦‚³‚ê‚éNGƒ[ƒhƒtƒ@ƒCƒ‹–¼‚ðXV
522- s := GikoSys.FAbon.NGwordname;
523- GikoForm.StatusBar.Panels.Items[GiKo.NGWORDNAME_PANEL].Text := s;
524- //ƒXƒe[ƒ^ƒX‚Ì•\Ž¦ƒTƒCƒY‚̃ŠƒTƒCƒY
525- GikoForm.StatusBar.Panels[GiKo.NGWORDNAME_PANEL].Width
526- := Max(GikoForm.StatusBar.Canvas.TextWidth(s), 100);
527- GikoForm.StatusBarResize(nil);
528-end;
529-// *************************************************************************
530513 //! ƒAƒhƒŒƒXƒo[‚É•\Ž¦‚µ‚Ä‚¢‚éƒAƒhƒŒƒX‚ÖˆÚ“®‚·‚é
531514 // *************************************************************************
532515 procedure TGikoDM.MoveToActionExecute(Sender: TObject);
@@ -615,8 +598,7 @@ begin
615598 end else begin
616599 GikoForm.ClickNode.Text := InputBox( '–¼‘O‚̕ύX', '‚¨‹C‚É“ü‚è‚̐V‚µ‚¢–¼‘O‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢', GikoForm.ClickNode.Text );
617600 end;
618- //XV‚µ‚½‚±‚Æ‚ð‹³‚¦‚é
619- FavoriteDM.Modified := true;
601+
620602 GikoForm.SetLinkBar;
621603 end;
622604 // *************************************************************************
@@ -644,8 +626,6 @@ begin
644626 // FClickNode.Selected.Expanded := True;
645627 GikoForm.FavoriteTreeView.Selected := Node;
646628 GikoForm.ClickNode := Node;
647- //XV‚µ‚½‚±‚Æ‚ð‹³‚¦‚é
648- FavoriteDM.Modified := true;
649629 FavoriteTreeViewRenameAction.Execute;
650630 finally
651631 end;
@@ -676,8 +656,6 @@ begin
676656 end;
677657
678658 GikoForm.ClickNode.Delete;
679- //XV‚µ‚½‚±‚Æ‚ð‹³‚¦‚é
680- FavoriteDM.Modified := true;
681659
682660 GikoForm.SetLinkBar;
683661
@@ -695,21 +673,26 @@ end;
695673 // *************************************************************************
696674 procedure TGikoDM.FavoriteTreeViewReloadActionExecute(Sender: TObject);
697675 var
676+ ThreadItem: TThreadItem;
698677 FavThread: TFavoriteThreadItem;
678+ Board: TBoard;
699679 FavBoard: TFavoriteBoardItem;
700680 shiftDown: Boolean;
701681 begin
702- if (GikoForm.ClickNode = nil) then Exit;
682+
683+ if GikoForm.ClickNode = nil then Exit;
703684
704685 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
705686
706687 if TObject( GikoForm.ClickNode.Data ) is TFavoriteThreadItem then begin
707688 FavThread := TFavoriteThreadItem( GikoForm.ClickNode.Data );
708- if FavThread.Item <> nil then
709- GikoForm.DownloadContent(FavThread.Item, shiftDown);
689+ ThreadItem := FavThread.Item;
690+ if ThreadItem <> nil then
691+ GikoForm.DownloadContent(ThreadItem, shiftDown);
710692 end else if TObject( GikoForm.ClickNode.Data ) is TFavoriteBoardItem then begin
711693 FavBoard := TFavoriteBoardItem( GikoForm.ClickNode.Data );
712- GikoForm.DownloadList(FavBoard.Item, shiftDown);
694+ Board := FavBoard.Item;
695+ GikoForm.DownloadList(Board, shiftDown);
713696 end;
714697
715698 end;
@@ -717,26 +700,73 @@ end;
717700 //! ‘I‘ð‚³‚ê‚Ä‚¢‚éƒXƒŒƒbƒh‚ÌURL‚ðƒRƒs[‚·‚é
718701 // *************************************************************************
719702 procedure TGikoDM.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
703+var
704+ FavThread : TFavoriteThreadItem;
705+ FavBoard : TFavoriteBoardItem;
706+ s : string;
720707 begin
721708
722709 if GikoForm.ClickNode = nil then Exit;
723710
724- if (TObject(GikoForm.ClickNode.Data) is TFavoriteItem) then begin
725- Clipboard.AsText := TFavoriteItem( GikoForm.ClickNode.Data ).URL + #13#10;
711+ if (TObject(GikoForm.ClickNode.Data) is TFavoriteThreadItem) then begin
712+
713+ FavThread := TFavoriteThreadItem( GikoForm.ClickNode.Data );
714+ s := FavThread.URL + #13#10;
715+ if s <> '' then
716+ Clipboard.AsText := s;
717+
718+ end else if (TObject(GikoForm.ClickNode.Data) is TFavoriteBoardItem) then begin
719+
720+ FavBoard := TFavoriteBoardItem( GikoForm.ClickNode.Data );
721+ s := FavBoard.URL + #13#10;
722+ if s <> '' then
723+ Clipboard.AsText := s;
724+
726725 end;
727726 end;
728727 // *************************************************************************
729728 //! ‘I‘ð‚³‚ê‚Ä‚¢‚锂̖¼‘O‚ðƒRƒs[‚·‚é
730729 // *************************************************************************
731730 procedure TGikoDM.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
731+var
732+ ThreadItem: TThreadItem;
733+ FavThread: TFavoriteThreadItem;
734+ Board: TBoard;
735+ FavBoard: TFavoriteBoardItem;
736+ s: string;
732737 begin
733738
734739 if GikoForm.ClickNode = nil then Exit;
735740
736- if (TObject(GikoForm.ClickNode.Data) is TFavoriteItem) then begin
737- Clipboard.AsText :=
738- TFavoriteItem(GikoForm.ClickNode.Data).GetItemTitle + #13#10;
741+ if (TObject(GikoForm.ClickNode.Data) is TFavoriteThreadItem) then begin
742+
743+ FavThread := TFavoriteThreadItem( GikoForm.ClickNode.Data );
744+ ThreadItem := FavThread.Item;
745+
746+ try
747+ s := ThreadItem.Title + #13#10;
748+ if s <> '' then
749+ Clipboard.AsText := s;
750+ finally
751+ end;
752+
753+ end else if (TObject(GikoForm.ClickNode.Data) is TFavoriteBoardItem) then begin
754+
755+ FavBoard := TFavoriteBoardItem( GikoForm.ClickNode.Data );
756+ Board := FavBoard.Item;
757+ if Board <> nil then
758+ if not Board.IsThreadDatRead then
759+ GikoSys.ReadSubjectFile(Board);
760+
761+ try
762+ s := Board.Title + #13#10;
763+ if s <> '' then
764+ Clipboard.AsText := s;
765+ finally
766+ end;
767+
739768 end;
769+
740770 end;
741771 // *************************************************************************
742772 //! ‘I‘ð‚³‚ê‚Ä‚¢‚éƒXƒŒƒbƒh‚Ì–¼‘O‚ÆURL‚ðƒRƒs[‚·‚é
@@ -744,15 +774,42 @@ end;
744774 procedure TGikoDM.FavoriteTreeViewNameURLCopyActionExecute(
745775 Sender: TObject);
746776 var
747- favItem : TFavoriteItem;
777+ ThreadItem: TThreadItem;
778+ FavThread: TFavoriteThreadItem;
779+ Board: TBoard;
780+ FavBoard: TFavoriteBoardItem;
781+ s: string;
748782 begin
749783
750784 if GikoForm.ClickNode = nil then Exit;
751785
752- if (TObject(GikoForm.ClickNode.Data) is TFavoriteItem) then begin
753- favItem := TFavoriteItem(GikoForm.ClickNode.Data);
754- Clipboard.AsText := favItem.GetItemTitle + #13#10 +
755- favItem.URL + #13#10;
786+ if (TObject(GikoForm.ClickNode.Data) is TFavoriteThreadItem) then begin
787+
788+ FavThread := TFavoriteThreadItem( GikoForm.ClickNode.Data );
789+ ThreadItem := FavThread.Item;
790+
791+ try
792+ s := ThreadItem.Title + #13#10 + ThreadItem.URL + #13#10;
793+ if s <> '' then
794+ Clipboard.AsText := s;
795+ finally
796+ end;
797+
798+ end else if (TObject(GikoForm.ClickNode.Data) is TFavoriteBoardItem) then begin
799+
800+ FavBoard := TFavoriteBoardItem( GikoForm.ClickNode.Data );
801+ Board := FavBoard.Item;
802+ if Board <> nil then
803+ if not Board.IsThreadDatRead then
804+ GikoSys.ReadSubjectFile(Board);
805+
806+ try
807+ s := Board.Title + #13#10 + Board.URL + #13#10;
808+ if s <> '' then
809+ Clipboard.AsText := s;
810+ finally
811+ end;
812+
756813 end;
757814
758815 end;
@@ -810,50 +867,41 @@ begin
810867
811868 end;
812869 end;
813-//! ƒŒƒX‚̍iž‚݃tƒBƒ‹ƒ^[‚ð‹ó‚É‚·‚é
814-procedure TGikoDM.ClearResFilter;
815-var
816- FilterList : TStringList;
817-begin
818- // ƒtƒBƒ‹ƒ^•¶Žš—ñ‚ð‹ó‚É‚·‚é
819- FilterList := TStringList.Create;
820- try
821- GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
822- GikoSys.FSelectResFilter.Reverse := False;
823- finally
824- FilterList.Free;
825- end;
826- GikoForm.SelectResWord := '';
827-end;
828-// *************************************************************************
829-//! ƒŒƒX‚Ì•\Ž¦”͈͂ðÝ’è‚·‚é
830-// *************************************************************************
831-procedure TGikoDM.SetResRange(range: Integer);
832-begin
833- if GikoSys.ResRange <> range then begin
834- GikoSys.ResRange := range;
835- // ƒtƒBƒ‹ƒ^•¶Žš—ñ‚ð‹ó‚É‚·‚é
836- ClearResFilter;
837- GikoForm.RepaintAllTabsBrowser();
838- end;
839-end;
840870 // *************************************************************************
841871 //! ÅV100ƒŒƒX‚Ì‚Ý•\Ž¦
842872 // *************************************************************************
843873 procedure TGikoDM.OnlyAHundredResActionExecute(Sender: TObject);
874+var
875+ FilterList : TStringList;
844876 begin
845877 if (GikoForm.ActiveContent <> nil) and (GikoForm.ActiveContent.Browser <> nil)
846878 and (GikoForm.ActiveContent.Browser.Busy) then Exit;
847879
848880 GikoForm.ResRangeMenuSelect := 100;
849881 OnlyAHundredResAction.Checked := True;
850- //@•\Ž¦”͈͂ðÝ’è‚·‚é
851- SetResRange(100);
882+
883+ if GikoSys.ResRange <> 100 then begin
884+ GikoSys.ResRange := 100;
885+
886+ // ƒtƒBƒ‹ƒ^•¶Žš—ñ‚ð‹ó‚É‚·‚é
887+ FilterList := TStringList.Create;
888+ try
889+ GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
890+ GikoSys.FSelectResFilter.Reverse := False;
891+ finally
892+ FilterList.Free;
893+ end;
894+
895+ GikoForm.SelectResWord := '';
896+ GikoForm.RepaintAllTabsBrowser();
897+ end;
852898 end;
853899 // *************************************************************************
854900 //! –¢“ǃŒƒX‚Ì‚Ý•\Ž¦
855901 // *************************************************************************
856902 procedure TGikoDM.OnlyKokoResActionExecute(Sender: TObject);
903+var
904+ FilterList : TStringList;
857905 begin
858906 if (GikoForm.ActiveContent <> nil) and (GikoForm.ActiveContent.Browser <> nil)
859907 and (GikoForm.ActiveContent.Browser.Busy) then Exit;
@@ -861,13 +909,28 @@ begin
861909 GikoForm.ResRangeMenuSelect := Ord( grrKoko );
862910 OnlyKokoResAction.Checked := True;
863911
864- //@•\Ž¦”͈͂ðÝ’è‚·‚é
865- SetResRange(Ord( grrKoko ));
912+ if GikoSys.ResRange <> Ord( grrKoko ) then begin
913+ GikoSys.ResRange := Ord( grrKoko );
914+
915+ // ƒtƒBƒ‹ƒ^•¶Žš—ñ‚ð‹ó‚É‚·‚é
916+ FilterList := TStringList.Create;
917+ try
918+ GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
919+ GikoSys.FSelectResFilter.Reverse := False;
920+ finally
921+ FilterList.Free;
922+ end;
923+
924+ GikoForm.SelectResWord := '';
925+ GikoForm.RepaintAllTabsBrowser();
926+ end;
866927 end;
867928 // *************************************************************************
868929 //! V’…ƒŒƒX‚Ì‚Ý•\Ž¦
869930 // *************************************************************************
870931 procedure TGikoDM.OnlyNewResActionExecute(Sender: TObject);
932+var
933+ FilterList : TStringList;
871934 begin
872935 if (GikoForm.ActiveContent <> nil) and (GikoForm.ActiveContent.Browser <> nil)
873936 and (GikoForm.ActiveContent.Browser.Busy) then Exit;
@@ -875,85 +938,21 @@ begin
875938 GikoForm.ResRangeMenuSelect := Ord( grrNew );
876939 OnlyNewResAction.Checked := True;
877940
878- //@•\Ž¦”͈͂ðÝ’è‚·‚é
879- SetResRange(Ord( grrNew ));
880-end;
881-// *************************************************************************
882-//! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒA’ʏí•\Ž¦‚É‚·‚é ’)ListOrientation = gloHorizontal@
883-// *************************************************************************
884-procedure TGikoDM.SetThreadAreaHorNormal;
885-begin
886- //’ʏí•\Ž¦‚É‚·‚é
887- if GikoForm.ActiveContent <> nil then
888- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
889- GikoForm.ViewPanel.Width := GikoForm.BrowserSizeWidth;
890- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
891- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
892- GikoSys.Setting.ListWidthState := glsNormal;
893- if GikoForm.ActiveContent <> nil then
894- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
895-end;
896-// *************************************************************************
897-//! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒAÅ‘å/Å¬•\Ž¦‚É‚·‚é ’)ListOrientation = gloHorizontal@
898-// *************************************************************************
899-procedure TGikoDM.SetThreadAreaHorizontal(gls : TGikoListState);
900-begin
901- if GikoForm.ActiveContent <> nil then
902- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
903- if GikoSys.Setting.ListWidthState = glsNormal then
904- GikoForm.BrowserSizeWidth := GikoForm.ViewPanel.Width;
905- //Å‘å•\Ž¦
906- if (gls = glsMax) then begin
907- GikoForm.ViewPanel.Width := 1;
908- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
909- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
910- GikoSys.Setting.ListWidthState := glsMax;
911- end else if (gls = glsMin) then begin
912- GikoForm.ViewPanel.Width := GikoForm.ThreadMainPanel.Width - 80;
913- BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
914- BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
915- GikoSys.Setting.ListWidthState := glsMin;
916- end;
917- if GikoForm.ActiveContent <> nil then
918- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
919-end;
920-// *************************************************************************
921-//! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒA’ʏí•\Ž¦‚É‚·‚é ’)ListOrientation = gloVertical
922-// *************************************************************************
923-procedure TGikoDM.SetThreadAreaVerNormal;
924-begin
925- //’ʏí•\Ž¦‚É‚·‚é
926- if GikoForm.ActiveContent <> nil then
927- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
928- GikoForm.ViewPanel.Height := GikoForm.BrowserSizeHeight;
929- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
930- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
931- GikoSys.Setting.ListHeightState := glsNormal;
932- if GikoForm.ActiveContent <> nil then
933- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
934-end;
935-// *************************************************************************
936-//! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒAÅ‘å/Å¬•\Ž¦‚É‚·‚é ’)ListOrientation = gloVertical
937-// *************************************************************************
938-procedure TGikoDM.SetThreadAreaVertical(gls : TGikoListState);
939-begin
940- if GikoForm.ActiveContent <> nil then
941- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
942- if GikoSys.Setting.ListHeightState = glsNormal then
943- GikoForm.BrowserSizeHeight := GikoForm.ViewPanel.Height;
944- if (gls = glsMin) then begin
945- GikoForm.ViewPanel.Height := GikoForm.ThreadMainPanel.Height - GikoForm.BrowserCoolBar.Height - 7;
946- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
947- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
948- GikoSys.Setting.ListHeightState := glsMin;
949- end else if (gls = glsMax) then begin
950- GikoForm.ViewPanel.Height := 1;
951- BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
952- BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
953- GikoSys.Setting.ListHeightState := glsMax;
941+ if GikoSys.ResRange <> Ord( grrNew ) then begin
942+ GikoSys.ResRange := Ord( grrNew );
943+
944+ // ƒtƒBƒ‹ƒ^•¶Žš—ñ‚ð‹ó‚É‚·‚é
945+ FilterList := TStringList.Create;
946+ try
947+ GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
948+ GikoSys.FSelectResFilter.Reverse := False;
949+ finally
950+ FilterList.Free;
951+ end;
952+
953+ GikoForm.SelectResWord := '';
954+ GikoForm.RepaintAllTabsBrowser();
954955 end;
955- if GikoForm.ActiveContent <> nil then
956- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
957956 end;
958957 // *************************************************************************
959958 //! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒA‚ð‘å‚«‚­•\Ž¦‚·‚é
@@ -964,22 +963,54 @@ begin
964963 case GikoSys.Setting.ListWidthState of
965964 glsMax: begin
966965 //’ʏí•\Ž¦‚É‚·‚é
967- SetThreadAreaHorNormal;
966+ if GikoForm.ActiveContent <> nil then
967+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
968+ GikoForm.ViewPanel.Width := GikoForm.BrowserSizeWidth;
969+ BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
970+ BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
971+ GikoSys.Setting.ListWidthState := glsNormal;
972+ if GikoForm.ActiveContent <> nil then
973+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
968974 end;
969975 glsMin, glsNormal: begin
970976 //Å‘å•\Ž¦‚É‚·‚é
971- SetThreadAreaHorizontal(glsMax);
977+ if GikoForm.ActiveContent <> nil then
978+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
979+ if GikoSys.Setting.ListWidthState = glsNormal then
980+ GikoForm.BrowserSizeWidth := GikoForm.ViewPanel.Width;
981+ if GikoForm.ActiveContent <> nil then
982+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
983+ GikoForm.ViewPanel.Width := 1;
984+ BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
985+ BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
986+ GikoSys.Setting.ListWidthState := glsMax;
972987 end;
973988 end;
974989 end else begin
975990 case GikoSys.Setting.ListHeightState of
976991 glsMax: begin
977992 //’ʏí•\Ž¦‚É‚·‚é
978- SetThreadAreaVerNormal;
993+ if GikoForm.ActiveContent <> nil then
994+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
995+ GikoForm.ViewPanel.Height := GikoForm.BrowserSizeHeight;
996+ BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
997+ BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
998+ GikoSys.Setting.ListHeightState := glsNormal;
999+ if GikoForm.ActiveContent <> nil then
1000+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
9791001 end;
9801002 glsMin, glsNormal: begin
9811003 //Å‘å•\Ž¦‚É‚·‚é
982- SetThreadAreaVertical(glsMax);
1004+ if GikoForm.ActiveContent <> nil then
1005+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
1006+ if GikoSys.Setting.ListHeightState = glsNormal then
1007+ GikoForm.BrowserSizeHeight := GikoForm.ViewPanel.Height;
1008+ if GikoForm.ActiveContent <> nil then
1009+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
1010+ GikoForm.ViewPanel.Height := 1;
1011+ BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1012+ BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1013+ GikoSys.Setting.ListHeightState := glsMax;
9831014 end;
9841015 end;
9851016 end;
@@ -993,22 +1024,54 @@ begin
9931024 case GikoSys.Setting.ListWidthState of
9941025 glsMax, glsNormal: begin
9951026 //Å¬•\Ž¦‚É‚·‚é
996- SetThreadAreaHorizontal(glsMin);
1027+ if GikoForm.ActiveContent <> nil then
1028+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
1029+ if GikoSys.Setting.ListWidthState = glsNormal then
1030+ GikoForm.BrowserSizeWidth := GikoForm.ViewPanel.Width;
1031+ if GikoForm.ActiveContent <> nil then
1032+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
1033+ GikoForm.ViewPanel.Width := GikoForm.ThreadMainPanel.Width - 80;
1034+ BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1035+ BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1036+ GikoSys.Setting.ListWidthState := glsMin;
9971037 end;
9981038 glsMin: begin
9991039 //’ʏí•\Ž¦‚É‚·‚é
1000- SetThreadAreaHorNormal;
1040+ if GikoForm.ActiveContent <> nil then
1041+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
1042+ GikoForm.ViewPanel.Width := GikoForm.BrowserSizeWidth;
1043+ BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1044+ BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1045+ GikoSys.Setting.ListWidthState := glsNormal;
1046+ if GikoForm.ActiveContent <> nil then
1047+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
10011048 end;
10021049 end;
10031050 end else begin
10041051 case GikoSys.Setting.ListHeightState of
10051052 glsMax, glsNormal: begin
10061053 //Å¬•\Ž¦‚É‚·‚é
1007- SetThreadAreaVertical(glsMin);
1054+ if GikoForm.ActiveContent <> nil then
1055+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
1056+ if GikoSys.Setting.ListHeightState = glsNormal then
1057+ GikoForm.BrowserSizeHeight := GikoForm.ViewPanel.Height;
1058+ GikoForm.ViewPanel.Height := GikoForm.ThreadMainPanel.Height - GikoForm.BrowserCoolBar.Height - 7;
1059+ BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1060+ BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1061+ GikoSys.Setting.ListHeightState := glsMin;
1062+ if GikoForm.ActiveContent <> nil then
1063+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
10081064 end;
10091065 glsMin: begin
10101066 //’ʏí•\Ž¦‚É‚·‚é
1011- SetThreadAreaVerNormal;
1067+ if GikoForm.ActiveContent <> nil then
1068+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
1069+ GikoForm.ViewPanel.Height := GikoForm.BrowserSizeHeight;
1070+ BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1071+ BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1072+ GikoSys.Setting.ListHeightState := glsNormal;
1073+ if GikoForm.ActiveContent <> nil then
1074+ SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
10121075 end;
10131076 end;
10141077 end;
@@ -1062,7 +1125,7 @@ begin
10621125 if Item = nil then Exit;
10631126 Editor := TEditorForm.Create(GikoForm.GetMainForm);
10641127 Editor.SetThreadItem(Item);
1065- GikoSys.LoadKeySetting(Editor.ActionList, GikoSys.GetEditorKeyFileName);
1128+ GikoSys.LoadEditorKeySetting(Editor.ActionList);
10661129 Editor.Show;
10671130 Editor.BodyEdit.SetFocus;
10681131 end;
@@ -1403,6 +1466,8 @@ end;
14031466 //! ‘S‚ẴŒƒX‚ð•\Ž¦‚·‚é
14041467 // *************************************************************************
14051468 procedure TGikoDM.AllResActionExecute(Sender: TObject);
1469+var
1470+ FilterList : TStringList;
14061471 begin
14071472 if(GikoForm.ActiveContent <> nil) and (GikoForm.ActiveContent.Browser <> nil )
14081473 and (GikoForm.ActiveContent.Browser.Busy) then Exit;
@@ -1410,8 +1475,22 @@ begin
14101475 GikoForm.ResRangeMenuSelect := Ord( grrAll );
14111476 AllResAction.Checked := True;
14121477
1413- //@•\Ž¦”͈͂ðÝ’è‚·‚é
1414- SetResRange(Ord( grrAll ));
1478+ if GikoSys.ResRange <> Ord( grrAll ) then begin
1479+ GikoSys.ResRange := Ord( grrAll );
1480+
1481+ // ƒtƒBƒ‹ƒ^•¶Žš—ñ‚ð‹ó‚É‚·‚é
1482+ FilterList := TStringList.Create;
1483+ try
1484+ GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
1485+ GikoSys.FSelectResFilter.Reverse := False;
1486+ finally
1487+ FilterList.Free;
1488+ end;
1489+
1490+ GikoForm.SelectResWord := '';
1491+
1492+ GikoForm.RepaintAllTabsBrowser();
1493+ end;
14151494 end;
14161495 // *************************************************************************
14171496 //! ƒŒƒX‚Ì•\Ž¦”͈͂ðÝ’è
@@ -1562,8 +1641,8 @@ begin
15621641 Dlg := TKeySettingForm.Create(GikoForm);
15631642 try
15641643 if Dlg.ShowModal = mrOk then begin
1565- GikoSys.SaveKeySetting(GikoFormActionList, Setting.KEY_SETTING_FILE_NAME);
1566- GikoSys.SaveKeySetting(Dlg.EditorForm.ActionList, Setting.KEY_SETTING_FILE_NAME);
1644+ GikoSys.SaveKeySetting(GikoFormActionList);
1645+ GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
15671646 GikoSys.Setting.Gestures.SaveGesture( GikoSys.Setting.GetGestureFileName );
15681647 end;
15691648
@@ -1822,7 +1901,7 @@ begin
18221901 //ƒƒOƒAƒEƒg
18231902 GikoSys.Dolib.Disconnect;
18241903 LoginAction.Checked := False;
1825- GikoForm.AddMessageList(GikoSys.GetGikoMessage(gmLogout), nil, gmiOK);
1904+ GikoForm.AddMessageList(GikoSys.Setting.GetMessage(Ord(gmLogout)), nil, gmiOK);
18261905 LoginAction.Caption := 'ƒƒOƒCƒ“(&L)';
18271906 end else begin
18281907 TmpCursor := GikoForm.ScreenCursor;
@@ -1842,7 +1921,7 @@ begin
18421921 end;
18431922 if GikoSys.Dolib.Connect then begin
18441923 LoginAction.Checked := True;
1845- GikoForm.AddMessageList(GikoSys.GetGikoMessage(gmLogin) + GikoSys.Setting.UserID, nil, gmiOK);
1924+ GikoForm.AddMessageList(GikoSys.Setting.GetMessage(Ord(gmLogin)) + GikoSys.Setting.UserID, nil, gmiOK);
18461925 LoginAction.Caption := 'ƒƒOƒAƒEƒg(&L)';
18471926 //LoginToolButton.Style := tbsCheck;
18481927 end else begin
@@ -1872,7 +1951,7 @@ begin
18721951 GikoSys.Dolib.ForcedConnect;
18731952 if GikoSys.Dolib.Connect then begin
18741953 LoginAction.Checked := True;
1875- GikoForm.AddMessageList(GikoSys.GetGikoMessage(gmForceLogin) + GikoSys.Setting.UserID, nil, gmiOK);
1954+ GikoForm.AddMessageList(GikoSys.Setting.GetMessage(Ord(gmForceLogin)) + GikoSys.Setting.UserID, nil, gmiOK);
18761955 LoginAction.Caption := 'ƒƒOƒAƒEƒg(&L)';
18771956 //LoginToolButton.Style := tbsCheck;
18781957 end else begin
@@ -2043,9 +2122,9 @@ begin
20432122 end;
20442123 end;
20452124 // *************************************************************************
2046-//! ‘I‘ðƒXƒŒƒbƒh‚ðƒtƒ@ƒCƒ‹‚É•Û‘¶‚·‚é
2125+//! ‘I‘ðƒXƒŒƒbƒh‚ðHTML‰»‚µ‚Ä•Û‘¶
20472126 // *************************************************************************
2048-procedure TGikoDM.SelectThreadSaveToFile(dat: Boolean);
2127+procedure TGikoDM.SelectItemSaveForHTMLExecute(Sender: TObject);
20492128 var
20502129 List: TList;
20512130 i: Integer;
@@ -2064,34 +2143,20 @@ begin
20642143 else if(List.Count = 0) then
20652144 ShowMessage('ƒXƒŒƒbƒh‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢')
20662145 else begin
2067- if dat then begin
2068- SaveDialog.Title := '‘I‘ðƒXƒŒƒbƒh‚ðdat‚Ì‚Ü‚Ü•Û‘¶';
2069- SaveDialog.Filter := 'DATƒtƒ@ƒCƒ‹(*.dat)|*.dat';
2070- end else begin
2071- SaveDialog.Title := '‘I‘ðƒXƒŒƒbƒh‚ðHTML‰»‚µ‚Ä•Û‘¶';
2072- SaveDialog.Filter := 'HTMLƒtƒ@ƒCƒ‹(*.html)|*.html';
2073- end;
2146+ FileSaveAs1.Dialog.Title := '‘I‘ðƒXƒŒƒbƒh‚ðHTML‰»‚µ‚Ä•Û‘¶';
2147+ FileSaveAs1.Dialog.Filter := 'HTMLƒtƒ@ƒCƒ‹(*.html)|*.html';
20742148 for i := 0 to List.Count - 1 do begin
20752149 if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
2076- if dat then begin
2077- SaveDialog.FileName := TThreadItem(List[i]).FileName;
2078- end else begin
2079- SaveDialog.FileName := ReplaseNoValidateChar(TThreadItem(List[i]).Title) + '.html';
2080- end;
2081- if SaveDialog.Execute then begin
2082- if dat then begin
2083- CopyFile(PChar(TThreadItem(List[i]).FilePath),
2084- PChar(SaveDialog.FileName), true);
2085- end else begin
2086- html := TStringList.Create;
2087- title := TThreadItem(List[i]).Title;
2088- try
2089- HTMLCreater.CreateHTML3(html, TThreadItem(List[i]), title);
2090- html.SaveToFile(SaveDialog.FileName);
2091- THTMLCreate.SkinorCSSFilesCopy(ExtractFilePath(SaveDialog.FileName));
2092- finally
2093- html.Free;
2094- end;
2150+ FileSaveAs1.Dialog.FileName := ReplaseNoValidateChar(TThreadItem(List[i]).Title) + '.html';
2151+ if FileSaveAs1.Dialog.Execute then begin
2152+ html := TStringList.Create;
2153+ title := TThreadItem(List[i]).Title;
2154+ try
2155+ HTMLCreater.CreateHTML3(html, TThreadItem(List[i]), title);
2156+ html.SaveToFile(FileSaveAs1.Dialog.FileName);
2157+ THTMLCreate.SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName));
2158+ finally
2159+ html.Free;
20952160 end;
20962161 end;
20972162 end;
@@ -2103,18 +2168,42 @@ begin
21032168 end;
21042169 end;
21052170 // *************************************************************************
2106-//! ‘I‘ðƒXƒŒƒbƒh‚ðHTML‰»‚µ‚Ä•Û‘¶
2107-// *************************************************************************
2108-procedure TGikoDM.SelectItemSaveForHTMLExecute(Sender: TObject);
2109-begin
2110- SelectThreadSaveToFile(false);
2111-end;
2112-// *************************************************************************
21132171 //! ‘I‘ðƒXƒŒƒbƒh‚ðDATŒ`Ž®‚Ì‚Ü‚Ü•Û‘¶
21142172 // *************************************************************************
21152173 procedure TGikoDM.SelectItemSaveForDatExecute(Sender: TObject);
2174+var
2175+ List: TList;
2176+ i: Integer;
21162177 begin
2117- SelectThreadSaveToFile(true);
2178+ List := TList.Create;
2179+ try
2180+ GikoForm.ScreenCursor := crHourGlass;
2181+ GikoForm.SelectListItem(List);
2182+ if ((GikoSys.Setting.ListOrientation = gloVertical) and
2183+ (GikoSys.Setting.ListHeightState = glsMax)) or
2184+ ((GikoSys.Setting.ListOrientation = gloHorizontal) and
2185+ (GikoSys.Setting.ListWidthState = glsMax)) then
2186+ ShowMessage('ƒXƒŒƒbƒhˆê——‚ð•\Ž¦‚µ‚Ä‚­‚¾‚³‚¢')
2187+ else if(List.Count = 0) then
2188+ ShowMessage('ƒXƒŒƒbƒh‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢')
2189+ else begin
2190+ FileSaveAs1.Dialog.Title := '‘I‘ðƒXƒŒƒbƒh‚ðdat‚Ì‚Ü‚Ü•Û‘¶';
2191+ FileSaveAs1.Dialog.Filter := 'DATƒtƒ@ƒCƒ‹(*.dat)|*.dat';
2192+ for i := 0 to List.Count - 1 do begin
2193+ if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
2194+ FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).FileName;
2195+ if FileSaveAs1.Dialog.Execute then begin
2196+ CopyFile(PChar(TThreadItem(List[i]).FilePath),
2197+ PChar(FileSaveAs1.Dialog.FileName), true);
2198+ end;
2199+ end;
2200+ end;
2201+ end;
2202+ finally
2203+ GikoForm.ScreenCursor := crDefault;
2204+ List.Free;
2205+ end;
2206+
21182207 end;
21192208 // *************************************************************************
21202209 //! ƒ^ƒu‚̏‡”Ô‚ð•Û‘¶
@@ -2227,7 +2316,7 @@ begin
22272316
22282317 Editor := TEditorForm.Create(GikoForm);
22292318 Editor.SetThreadItem(Item);
2230- GikoSys.LoadKeySetting(Editor.ActionList, GikoSys.GetEditorKeyFileName);
2319+ GikoSys.LoadEditorKeySetting(Editor.ActionList);
22312320 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
22322321 Editor.Show;
22332322 Editor.BodyEdit.SetFocus;
@@ -3048,44 +3137,26 @@ begin
30483137
30493138 end;
30503139 // *************************************************************************
3051-//! ƒXƒŒˆê——‚Ì•\Ž¦‚µ‚Ä‚¢‚é“à—e‚É‚µ‚½‚ª‚Á‚āAƒ\[ƒgƒJƒ‰ƒ€‚̈ʒu‚Æ•ûŒü‚ðŽæ“¾‚·‚é
3052-// *************************************************************************
3053-function TGikoDM.GetSortProperties(List: TObject;
3054- var vSortOrder: Boolean): Boolean;
3055-begin
3056- Result := True;
3057- if (List <> nil) then begin
3058- if (List is TBBS) then begin
3059- vSortOrder := GikoSys.Setting.BBSSortOrder;
3060- end else if (List is TCategory) then begin
3061- vSortOrder := GikoSys.Setting.CategorySortOrder;
3062- end else if (List is TBoard) then begin
3063- vSortOrder := GikoSys.Setting.BoardSortOrder;
3064- end else begin
3065- Result := False;
3066- end;
3067- end else begin
3068- Result := False;
3069- end;
3070-end;
3071-// *************************************************************************
30723140 //! Œ»Ý‚̃Jƒ‰ƒ€‚ðƒ\[ƒg‚·‚é
30733141 // *************************************************************************
30743142 procedure TGikoDM.SortActiveColumnActionExecute(Sender: TObject);
30753143 var
30763144 i : Integer;
30773145 so : boolean;
3146+ si : Integer;
30783147 begin
3079- if GetSortProperties(GikoForm.GetActiveList, so) then begin
3080- for i := 0 to GikoForm.ListView.Columns.Count - 1 do begin
3081- if (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or
3082- (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT2) then begin
3083- so := not so;
3084- TListViewUtils.ListViewSort(nil, GikoForm.ListView,
3085- GikoForm.ListView.Column[ i ], ListNumberVisibleAction.Checked,
3086- so);
3087- break;
3088- end;
3148+ for i := 0 to GikoForm.ListView.Columns.Count - 1 do begin
3149+ if (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or
3150+ (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT2) then begin
3151+ GikoForm.SortOrder := not GikoForm.SortOrder;
3152+ so := GikoForm.SortOrder;
3153+ si := GikoForm.SortIndex;
3154+ TListViewUtils.ListViewSort(nil, GikoForm.ListView,
3155+ GikoForm.ListView.Column[ i ], ListNumberVisibleAction.Checked,
3156+ so, si );
3157+ GikoForm.SortIndex := si;
3158+ GikoForm.SortOrder := so;
3159+ break;
30893160 end;
30903161 end;
30913162 end;
@@ -3095,6 +3166,8 @@ end;
30953166 procedure TGikoDM.SortNextColumnActionExecute(Sender: TObject);
30963167 var
30973168 i, id : Integer;
3169+ so : boolean;
3170+ si : Integer;
30983171 begin
30993172 for i := 0 to GikoForm.ListView.Columns.Count - 1 do begin
31003173 if (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or
@@ -3102,9 +3175,14 @@ begin
31023175 id := i + 1;
31033176 if id > GikoForm.ListView.Columns.Count - 1 then
31043177 id := 0;
3178+ GikoForm.SortOrder := id = 0;
3179+ so := GikoForm.SortOrder;
3180+ si := GikoForm.SortIndex;
31053181 TListViewUtils.ListViewSort( nil, GikoForm.ListView,
31063182 GikoForm.ListView.Column[ id ], ListNumberVisibleAction.Checked,
3107- id = 0);
3183+ so, si );
3184+ GikoForm.SortIndex := si;
3185+ GikoForm.SortOrder := so;
31083186 break;
31093187 end;
31103188 end;
@@ -3115,6 +3193,8 @@ end;
31153193 procedure TGikoDM.SortPrevColumnActionExecute(Sender: TObject);
31163194 var
31173195 i, id : Integer;
3196+ so : boolean;
3197+ si : Integer;
31183198 begin
31193199 for i := 0 to GikoForm.ListView.Columns.Count - 1 do begin
31203200 if (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or
@@ -3122,9 +3202,14 @@ begin
31223202 id := i - 1;
31233203 if id < 0 then
31243204 id := GikoForm.ListView.Columns.Count - 1;
3205+ GikoForm.SortOrder := id = 0;
3206+ so := GikoForm.SortOrder;
3207+ si := GikoForm.SortIndex;
31253208 TListViewUtils.ListViewSort( nil, GikoForm.ListView,
31263209 GikoForm.ListView.Column[ id ], ListNumberVisibleAction.Checked,
3127- id = 0);
3210+ so, si );
3211+ GikoForm.SortIndex := si;
3212+ GikoForm.SortOrder := so;
31283213 break;
31293214 end;
31303215 end;
@@ -3649,20 +3734,33 @@ end;
36493734 //! ‘I‘ð‚³‚ê‚Ä‚¢‚éƒXƒŒƒbƒh‚ðŠù“Ç‚É‚·‚é
36503735 // *************************************************************************
36513736 procedure TGikoDM.KidokuActionExecute(Sender: TObject);
3737+var
3738+ List: TList;
3739+ i: Integer;
36523740 begin
3653- SetThreadReadProperty(true);
3741+ List := TList.Create;
3742+ try
3743+ GikoForm.SelectListItem(List);
3744+ for i := 0 to List.Count - 1 do begin
3745+ if TObject(List[i]) is TThreadItem then begin
3746+ if (TThreadItem(List[i]).UnRead) then begin
3747+ TThreadItem(List[i]).UnRead := false;
3748+ TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
3749+ end;
3750+ end;
3751+ end;
3752+ if GikoForm.TreeView.Visible then
3753+ GikoForm.TreeView.Refresh;
3754+ if GikoForm.ListView.Visible then
3755+ GikoForm.ListView.Refresh;
3756+ finally
3757+ List.Free;
3758+ end;
36543759 end;
36553760 // *************************************************************************
36563761 //! ‘I‘ð‚³‚ê‚Ä‚¢‚éƒXƒŒƒbƒh‚𖢓ǂɂ·‚é
36573762 // *************************************************************************
36583763 procedure TGikoDM.MidokuActionExecute(Sender: TObject);
3659-begin
3660- SetThreadReadProperty(false);
3661-end;
3662-// *************************************************************************
3663-//! ‘I‘ð‚³‚ê‚Ä‚¢‚éƒXƒŒƒbƒh‚Ì–¢“ǁEŠù“Ç‚ðÝ’è‚·‚é true : Šù“Ç false : –¢“Ç
3664-// *************************************************************************
3665-procedure TGikoDM.SetThreadReadProperty(read: Boolean);
36663764 var
36673765 List: TList;
36683766 i: Integer;
@@ -3672,8 +3770,9 @@ begin
36723770 GikoForm.SelectListItem(List);
36733771 for i := 0 to List.Count - 1 do begin
36743772 if TObject(List[i]) is TThreadItem then begin
3675- if (TThreadItem(List[i]).IsLogFile) then begin
3676- TThreadItem(List[i]).UnRead := not read;
3773+ if (TThreadItem(List[i]).IsLogFile) and (not TThreadItem(List[i]).UnRead) then begin
3774+ TThreadItem(List[i]).UnRead := true;
3775+ TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
36773776 end;
36783777 end;
36793778 end;
@@ -3700,88 +3799,5 @@ begin
37003799 AllSelectAction.Enabled := GikoForm.ListView.SelCount > 0;
37013800 end;
37023801 ////////////////////////////////•ÒW‚Ü‚Å‚¨‚µ‚Ü‚¢/////////////////////
3703-//! ƒXƒŒƒbƒh‚̃TƒCƒY‚ðÄŒvŽZ‚·‚é
3704-procedure TGikoDM.ThreadSizeCalcForFileActionExecute(Sender: TObject);
3705-const
3706- RECALC_MES : String = 'ƒXƒŒƒbƒh‚Ì—e—Ê‚ðƒtƒ@ƒCƒ‹‚©‚çÄŒvŽZ‚µ‚Ü‚·B'#13#10 +
3707- '‚±‚Ì‘€ì’†AƒMƒRƒiƒr‚Ì‘¼‚Ì‘€ì‚ð‚·‚é‚ƃf[ƒ^‚ª”j‰ó‚³‚ê‚é‹°‚ꂪ‚ ‚è‚Ü‚·B' +
3708- '‚Ü‚½‚±‚Ì‘€ì‚́A”ñí‚ÉŽžŠÔ‚ª‚©‚©‚éê‡‚ª‚ ‚è‚Ü‚·‚ªA‚æ‚낵‚¢‚Å‚·‚©H';
3709- RECALC_TITLE : String = 'ƒXƒŒƒbƒh‚Ì—e—Ê‚ðƒtƒ@ƒCƒ‹‚©‚çÄŒvŽZ';
3710- LIMIT_SIZE = 1024;
3711-var
3712- limitSize : Integer;
3713- limitStr : String;
3714-begin
3715-{ ‚Ü‚¸AŽžŠÔ‚ª‚©‚©‚邱‚Æ‚ðŒx‚·‚郁ƒbƒZ[ƒW‚ðo—Í
3716- ÄŒvŽZ‚·‚éƒXƒŒƒbƒh‚̃TƒCƒY‚Ì臒liƒfƒtƒHƒ‹ƒg1024B)‚ðŠm”F
3717- ƒvƒ‰ƒOƒCƒ“‚ð—˜—p‚µ‚È‚¢‚Æ‚±‚ë‚Å‘S‚ẴƒO—L‚èƒXƒŒƒbƒh‚ðŒŸõ
3718- 臒lˆÈ‰º‚̃TƒCƒY‚̏ꍇADAT‚̃tƒ@ƒCƒ‹ƒTƒCƒY‚Æ”äŠrA‚¸‚ê‚Ä‚¢‚ê‚΁A
3719- DAT‚̃tƒ@ƒCƒ‹ƒTƒCƒY‚ōXV‚·‚é
3720-}
3721- if MsgBox(GikoForm.Handle, RECALC_MES,
3722- RECALC_TITLE, MB_YESNO or MB_ICONWARNING) = ID_YES then begin
3723- //臒l‚ÌŠm”F
3724- limitSize := LIMIT_SIZE;
3725- limitStr := IntToStr(limitSize);
3726- if InputQuery('臒l“ü—Í', 'Žw’肵‚½”’l BˆÈ‰º‚Ì—e—ʂ̃XƒŒƒbƒh‚̂ݍČvŽZ‚µ‚Ü‚·', limitStr) then begin
3727- limitSize := StrToInt(MojuUtils.ZenToHan(limitStr));
3728- if (limitSize < 0) then begin
3729- ShowMessage('臒l‚É•‰‚ÍŽw’è‚Å‚«‚Ü‚¹‚ñI');
3730- ThreadSizeCalcForFileActionExecute(nil);
3731- end else begin
3732- RecalcThreadSize(limitSize);
3733- end;
3734- end;
3735- end;
3736-end;
3737-//! limit‚æ‚è‚àƒTƒCƒY‚̏¬‚³‚¢ƒXƒŒƒbƒh‚Ì—e—Ê‚ðDATƒtƒ@ƒCƒ‹‚©‚çŒvŽZ
3738-procedure TGikoDM.RecalcThreadSize(limit : Integer);
3739-var
3740- i, j, tmpSize : Integer;
3741- Obj : TObject;
3742- Board : TBoard;
3743- Thread: TThreadItem;
3744- dat : TStringList;
3745-begin
3746- // ÄŒvŽZƒXƒ^[ƒg@ƒvƒ‰ƒOƒCƒ“‚ð—˜—p‚µ‚È‚¢‚Æ‚±‚ë‚ð‘S•”Œ©‚éI
3747- GikoForm.ScreenCursor := crHourGlass;
3748- try
3749- GikoForm.ProgressBar.Max := BoardGroups[0].Count;
3750- for i := 0 to BoardGroups[0].Count - 1 do begin
3751- Obj := BoardGroups[0].Objects[i];
3752- if (Obj <> nil) then begin
3753- Board := TBoard(Obj);
3754- if not Board.IsThreadDatRead then begin
3755- GikoSys.ReadSubjectFile(Board);
3756- end;
3757- for j := 0 to Board.Count - 1 do begin
3758- Thread := Board.Items[j];
3759- if (Thread <> nil) and (Thread.IsLogFile)
3760- and (Thread.Size <= limit) then begin
3761- dat := TStringList.Create;
3762- try
3763- tmpSize := Thread.Size;
3764- try
3765- dat.LoadFromFile(Thread.GetThreadFileName);
3766- tmpSize := Length(dat.Text);
3767- tmpSize := tmpSize - dat.Count;
3768- except
3769- end;
3770- Thread.Size := tmpSize;
3771- finally
3772- dat.Free;
3773- end;
3774- end;
3775- end;
3776- end;
3777- GikoForm.ProgressBar.StepBy(1);
3778- end;
3779- finally
3780- GikoForm.ScreenCursor := crDefault;
3781- end;
3782- GikoForm.ProgressBar.Position := 0;
3783- ShowMessage('ŒvŽZI—¹‚µ‚Ü‚µ‚½B');
3784-end;
3785-
37863802 end.
37873803
--- a/GikoMessage.pas
+++ /dev/null
@@ -1,68 +0,0 @@
1-unit GikoMessage;
2-
3-interface
4-
5-uses
6- Classes, IniFiles;
7-
8-type
9- //! MessageList
10- TGikoMessageListType = (gmLogout, gmLogin, gmForceLogin, gmSureItiran,
11- gmUnKnown, gmSureSyutoku, gmSureDiff, gmNotMod, gmAbort, gmError,
12- gmNewRes, gmNewSure, gmResError, gmSureError);
13-
14- TGikoMessage = class(THashedStringList)
15- private
16- public
17- constructor Create;
18- function GetMessage(MesType: TGikoMessageListType): String;
19- end;
20-
21-implementation
22-
23-const
24- DEF_MESSAGES : array[0..13] of string = ( 'ƒƒOƒAƒEƒg‚µ‚Ü‚µ‚½',
25- 'ƒƒOƒCƒ“‚µ‚Ü‚µ‚½ - ',
26- '‹­§ƒƒOƒCƒ“‚µ‚Ü‚µ‚½ - ',
27- '[ƒXƒŒˆê——Žæ“¾Š®—¹]',
28- '(–¼Ì•s–¾j',
29- '[ƒXƒŒŽæ“¾Š®—¹]',
30- '[ƒXƒŒ·•ªŽæ“¾Š®—¹]',
31- '[–¢XV]',
32- '[’†’f]',
33- '[ƒGƒ‰[]',
34- '[ƒŒƒX‘—MI—¹]',
35- '[VƒXƒŒ‘—MI—¹]',
36- '[ƒŒƒX‘—MŽ¸”s]',
37- '[VƒXƒŒ‘—MŽ¸”s]');
38-
39- MESSAGE_KEYS : array[0..13] of String = ( 'Logout', 'Login',
40- 'ForceLogin', 'SureItiran',
41- 'UnKnown', 'SureSyutoku',
42- 'SureDiff', 'NotMod',
43- 'Abort', 'Error',
44- 'NewRes', 'NewSure',
45- 'ResError', 'SureError');
46-
47-constructor TGikoMessage.Create;
48-begin
49- inherited Create;
50- Self.Sorted := true;
51- Self.Duplicates := dupIgnore;
52-end;
53-//! MesType‚ÅŽw’肳‚ꂽƒƒbƒZ[ƒW•¶Žš—ñ‚ðŽæ“¾‚·‚é
54-function TGikoMessage.GetMessage(MesType: TGikoMessageListType): String;
55-begin
56- Result := '';
57- if MesType in [gmLogout..gmSureError] then begin
58- //Key‚ÅŒŸõ‚µ‚ÄŒ©‚‚©‚ê‚΂»‚ê‚ð•Ô‚·
59- Result := Self.Values[MESSAGE_KEYS[Ord(MesType)]];
60- if Result = '' then begin
61- //Œ©‚‚©‚ç‚È‚¢‚̂ŁAƒfƒtƒHƒ‹ƒg‚Å•Ô‚·
62- Result := DEF_MESSAGES[Ord(MesType)];
63- end;
64- end;
65-end;
66-
67-end.
68-
\ No newline at end of file
--- a/GikoSystem.pas
+++ b/GikoSystem.pas
@@ -4,7 +4,7 @@ interface
44
55 uses
66 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7- ComCtrls, {IniFiles,} ShellAPI, ActnList, Math,
7+ ComCtrls, IniFiles, ShellAPI, ActnList, Math,
88 {$IF Defined(DELPRO) }
99 SHDocVw,
1010 MSHTML,
@@ -12,10 +12,10 @@ uses
1212 SHDocVw_TLB,
1313 MSHTML_TLB,
1414 {$IFEND}
15- {HttpApp,} URLMon, IdGlobal, IdURI, {Masks,}
15+ {HttpApp,} YofUtils, URLMon, IdGlobal, IdURI, {Masks,}
1616 Setting, BoardGroup, gzip, Dolib, bmRegExp, AbonUnit,
1717 ExternalBoardManager, ExternalBoardPlugInMain,
18- GikoBayesian, GikoMessage;
18+ Sort, GikoBayesian;
1919
2020 type
2121 TVerResourceKey = (
@@ -102,6 +102,11 @@ type
102102 FNoParam: Boolean; //!< ƒŒƒX”Ôƒpƒ‰ƒ[ƒ^‚È‚µ
103103 end;
104104
105+ //! MessageList
106+ TGikoMessageListType = (gmLogout, gmLogin, gmForceLogin, gmSureItiran,
107+ gmUnKnown, gmSureSyutoku, gmSureDiff, gmNotMod, gmAbort, gmError,
108+ gmNewRes, gmNewSure, gmResError, gmSureError);
109+
105110 TGikoSys = class(TObject)
106111 private
107112 { Private éŒ¾ }
@@ -111,7 +116,8 @@ type
111116 FResRange : Longint;
112117 FBayesian : TGikoBayesian; //!< ƒxƒCƒWƒAƒ“ƒtƒBƒ‹ƒ^
113118 FVersion : String; //!< ƒtƒ@ƒCƒ‹ƒo[ƒWƒ‡ƒ“
114- FGikoMessage: TGikoMessage;
119+// FExitWrite: TStringList;
120+// function StrToFloatDef(s: string; Default: Double): Double;
115121 public
116122 { Public éŒ¾ }
117123 FAbon : TAbon;
@@ -150,8 +156,6 @@ type
150156 function GetUserAgent: string;
151157 function GetSambaFileName : string;
152158
153- function GetMainKeyFileName : String;
154- function GetEditorKeyFileName: String;
155159 procedure ReadSubjectFile(Board: TBoard);
156160 procedure CreateThreadDat(Board: TBoard);
157161 procedure WriteThreadDat(Board: TBoard);
@@ -172,6 +176,7 @@ type
172176
173177 function GetFileSize(FileName : string) : longint;
174178 function GetFileLineCount(FileName : string): longint;
179+ function Get2chDate(aDate: TDateTime): string;
175180 function IntToDateTime(val: Int64): TDateTime;
176181 function DateTimeToInt(ADate: TDateTime): Int64;
177182
@@ -181,13 +186,17 @@ type
181186
182187 function RemoveToken(var s:string; const delimiter:string):string;
183188 function GetTokenIndex(s: string; delimiter: string; index: Integer): string;
189+ function DeleteLink(const s: string): string;
184190
185191 function GetShortName(const LongName: string; ALength: integer): string;
186192 function BoolToInt(b: Boolean): Integer;
187193 function IntToBool(i: Integer): Boolean;
188194 function GzipDecompress(ResStream: TStream; ContentEncoding: string): string;
189- procedure LoadKeySetting(ActionList: TActionList; FileName: String);
190- procedure SaveKeySetting(ActionList: TActionList; FileName: String);
195+ procedure LoadKeySetting(ActionList: TActionList);
196+ procedure SaveKeySetting(ActionList: TActionList);
197+ procedure LoadEditorKeySetting(ActionList: TActionList);
198+ procedure SaveEditorKeySetting(ActionList: TActionList);
199+
191200 procedure CreateProcess(const AppPath: string; const Param: string);
192201 procedure OpenBrowser(URL: string; BrowserType: TGikoBrowserType);
193202 function HTMLDecode(const AStr: String): String;
@@ -241,10 +250,6 @@ type
241250 //! IE‚̃o[ƒWƒ‡ƒ“î•ñ‚̎擾
242251 function GetIEVersion: string;
243252 function SetUserOptionalStyle(): string;
244- //! ƒMƒRƒiƒr‚̃ƒbƒZ[ƒW‚ðÝ’è‚·‚é
245- procedure SetGikoMessage;
246- //! ƒMƒRƒiƒr‚̃ƒbƒZ[ƒW‚ðŽæ“¾‚·‚é
247- function GetGikoMessage(MesType: TGikoMessageListType): String;
248253 end;
249254
250255 var
@@ -263,8 +268,7 @@ const
263268 implementation
264269
265270 uses
266- Giko, RoundData, Favorite, Registry, HTMLCreate, MojuUtils, Sort, YofUtils,
267- IniFiles;
271+ Giko, RoundData, Favorite, Registry, HTMLCreate, MojuUtils;
268272
269273 const
270274 FOLDER_INDEX_VERSION = '1.01';
@@ -321,8 +325,6 @@ begin
321325 FVersion := Trim(GetVersionInfo(vrFileVersion));
322326 FBayesian := TGikoBayesian.Create;
323327 //FBoardURLList := TStringList.Create;
324- //ƒƒbƒZ[ƒW‚̍쐬
325- FGikoMessage := TGikoMessage.Create;
326328 end;
327329
328330 // *************************************************************************
@@ -343,7 +345,6 @@ begin
343345 FDolib.Free;
344346 FAbon.Free;
345347 FSelectResFilter.Free;
346- FGikoMessage.Free;
347348 //FBoardURLList.Free;
348349 //ƒeƒ“ƒ|ƒ‰ƒŠHTML‚ðíœ
349350 FileList := TStringList.Create;
@@ -525,6 +526,19 @@ begin
525526 end;
526527
527528 {!
529+\brief ‚Q‚¿‚á‚ñ‚Ë‚é•ûŽ®ŽžŽæ“¾
530+\param •ÏŠ·‚·‚鎞
531+\return 2‚¿‚á‚ñ‚Ë‚é•ûŽ®‚ÅŽž‚ð•\‚µ‚½•¶Žš—ñ
532+}
533+function TGikoSys.Get2chDate(aDate: TDateTime): string;
534+var
535+ d2: TDateTime;
536+begin
537+ d2 := aDate - EncodeTime(9, 0, 0, 0);
538+ Result := FloatToStr(Trunc((d2 - ZERO_DATE) * 86400));
539+end;
540+
541+{!
528542 \brief Œo‰ß•b‚ð TDateTime ‚É•ÏŠ·
529543 \param val 1970/1/1/ 00:00:00 ‚©‚ç‚ÌŒo‰ß•b
530544 \return val ‚ðŽ¦‚· TDateTime
@@ -699,13 +713,13 @@ begin
699713 Board.BoardPlugIn,
700714 Board,
701715 Board.BoardPlugIn.FileName2ThreadURL( DWORD( Board ), FileList[i] ) );
702- THTMLCreate.DivideStrLine(Board.BoardPlugIn.GetDat( DWORD( ThreadItem ), 1 ), @ResRec);
716+ DivideStrLine(Board.BoardPlugIn.GetDat( DWORD( ThreadItem ), 1 ), @ResRec);
703717 end else begin
704718 ThreadItem := TThreadItem.Create(
705719 nil,
706720 Board,
707721 Get2chBoard2ThreadURL( Board, ChangeFileExt( FileList[i], '' ) ) );
708- THTMLCreate.DivideStrLine(ReadThreadFile(FileName, 1), @ResRec);
722+ DivideStrLine(ReadThreadFile(FileName, 1), @ResRec);
709723 end;
710724
711725 ThreadItem.BeginUpdate;
@@ -720,7 +734,7 @@ begin
720734 ThreadItem.RoundDate := ZERO_DATE;
721735 ThreadItem.LastModified := ZERO_DATE;
722736 ThreadItem.Kokomade := -1;
723- ThreadItem.NewReceive := 0;
737+ ThreadItem.NewReceive := ThreadItem.Count;
724738 ThreadItem.ParentBoard := Board;
725739 ThreadItem.IsLogFile := True;
726740 ThreadItem.Round := False;
@@ -1405,6 +1419,39 @@ begin
14051419 Result := RemoveToken(s, delimiter);
14061420 end;
14071421
1422+{!
1423+\brief HTML ‚©‚çƒAƒ“ƒJ[ƒ^ƒO‚ðíœ
1424+\param s Œ³‚É‚È‚é HTML
1425+\return ƒAƒ“ƒJ[ƒ^ƒO‚ªíœ‚³‚ꂽ HTML
1426+}
1427+function TGikoSys.DeleteLink(const s: string): string;
1428+var
1429+ s1: string;
1430+ s2: string;
1431+ idx: Integer;
1432+ i: Integer;
1433+begin
1434+ i := 0;
1435+ Result := '';
1436+ while True do begin
1437+ s1 := GetTokenIndex(s, '<a href="', i);
1438+ s2 := GetTokenIndex(s, '<a href="', i + 1);
1439+
1440+ idx := Pos('">', s1);
1441+ if idx <> 0 then
1442+ Delete(s1, 1, idx + 1);
1443+ idx := Pos('">', s2);
1444+ if idx <> 0 then
1445+ Delete(s2, 1, idx + 1);
1446+
1447+ Result := Result + s1 + s2;
1448+
1449+ if s2 = '' then
1450+ Break;
1451+
1452+ inc(i, 2);
1453+ end;
1454+end;
14081455
14091456 //ƒCƒ“ƒfƒbƒNƒX–¢XVƒoƒbƒtƒ@‚ðƒtƒ‰ƒbƒVƒ…I
14101457 {procedure TGikoSys.FlashExitWrite;
@@ -1554,9 +1601,11 @@ end;
15541601 {!
15551602 \brief ƒAƒNƒVƒ‡ƒ“‚ɃVƒ‡[ƒgƒJƒbƒgƒL[‚ðÝ’è
15561603 \param ActionList Ý’è‚·‚éƒAƒNƒVƒ‡ƒ“ˆê——
1557-\param FileName Iniƒtƒ@ƒCƒ‹‚Ì–¼‘O
1604+\todo STD_SEC ‚ð GetXXXFileName() ‚É’Ç‚¢o‚¹
1605+
1606+KeySetting.ini ‚É•Û‘¶‚³‚ê‚Ä‚¢‚éƒVƒ‡[ƒgƒJƒbƒgƒL[‚ð ActionList ‚ɐݒ肵‚Ü‚·B
15581607 }
1559-procedure TGikoSys.LoadKeySetting(ActionList: TActionList; FileName: String);
1608+procedure TGikoSys.LoadKeySetting(ActionList: TActionList);
15601609 const
15611610 STD_SEC = 'KeySetting';
15621611 var
@@ -1567,10 +1616,10 @@ var
15671616 SecList: TStringList;
15681617 Component: TComponent;
15691618 begin
1570- if not FileExists(fileName) then
1619+ if not FileExists(GetConfigDir + KEY_SETTING_FILE_NAME) then
15711620 Exit;
15721621 SecList := TStringList.Create;
1573- ini := TMemIniFile.Create(fileName);
1622+ ini := TMemIniFile.Create(GetConfigDir + KEY_SETTING_FILE_NAME);
15741623 try
15751624 ini.ReadSection(STD_SEC, SecList);
15761625 for i := 0 to SecList.Count - 1 do begin
@@ -1592,18 +1641,18 @@ end;
15921641 {!
15931642 \brief ƒAƒNƒVƒ‡ƒ“‚ɐݒ肳‚ê‚Ä‚¢‚éƒVƒ‡[ƒgƒJƒbƒgƒL[‚ðƒtƒ@ƒCƒ‹‚É•Û‘¶
15941643 \param ActionList •Û‘¶‚·‚éƒAƒNƒVƒ‡ƒ“ˆê——
1595-\param FileName Iniƒtƒ@ƒCƒ‹–¼
1644+\todo STD_SEC ‚ð GetXXXFileName() ‚É’Ç‚¢o‚¹
15961645
1597-ActionList ‚ɐݒ肳‚ê‚Ä‚¢‚éƒVƒ‡[ƒgƒJƒbƒgƒL[‚ð FileName ‚É•Û‘¶‚µ‚Ü‚·B
1646+ActionList ‚ɐݒ肳‚ê‚Ä‚¢‚éƒVƒ‡[ƒgƒJƒbƒgƒL[‚ð KeySetting.ini ‚É•Û‘¶‚µ‚Ü‚·B
15981647 }
1599-procedure TGikoSys.SaveKeySetting(ActionList: TActionList; FileName: String);
1648+procedure TGikoSys.SaveKeySetting(ActionList: TActionList);
16001649 const
16011650 STD_SEC = 'KeySetting';
16021651 var
16031652 i: Integer;
16041653 ini: TMemIniFile;
16051654 begin
1606- ini := TMemIniFile.Create(GetConfigDir + FileName);
1655+ ini := TMemIniFile.Create(GetConfigDir + KEY_SETTING_FILE_NAME);
16071656 try
16081657 for i := 0 to ActionList.ActionCount - 1 do begin
16091658 if ActionList.Actions[i].Tag = -1 then
@@ -1616,6 +1665,74 @@ begin
16161665 end;
16171666 end;
16181667
1668+{!
1669+\brief ƒŒƒXƒGƒfƒBƒ^‚̃AƒNƒVƒ‡ƒ“‚ɃVƒ‡[ƒgƒJƒbƒg‚ðÝ’è
1670+\param ActionList Ý’è‚·‚éƒAƒNƒVƒ‡ƒ“ˆê——
1671+\todo STD_SEC, EKEY_SETTING_FILE_NAME ‚ð GetXXXFileName() ‚É’Ç‚¢o‚¹
1672+\todo LoadKeySetting ‚Æ“‡‚¹‚æ
1673+
1674+ƒtƒ@ƒCƒ‹‚É•Û‘¶‚³‚ê‚Ä‚¢‚éƒVƒ‡[ƒgƒJƒbƒgƒL[‚ð ActionList ‚ɐݒ肵‚Ü‚·B
1675+}
1676+procedure TGikoSys.LoadEditorKeySetting(ActionList: TActionList);
1677+const
1678+ STD_SEC = 'KeySetting';
1679+var
1680+ i: Integer;
1681+ ini: TMemIniFile;
1682+ ActionName: string;
1683+ ActionKey: Integer;
1684+ SecList: TStringList;
1685+ Component: TComponent;
1686+begin
1687+ if not FileExists(GetConfigDir + EKEY_SETTING_FILE_NAME) then
1688+ Exit;
1689+ SecList := TStringList.Create;
1690+ ini := TMemIniFile.Create(GetConfigDir + EKEY_SETTING_FILE_NAME);
1691+ try
1692+ ini.ReadSection(STD_SEC, SecList);
1693+ for i := 0 to SecList.Count - 1 do begin
1694+ ActionName := SecList[i];
1695+ ActionKey := ini.ReadInteger(STD_SEC, ActionName, -1);
1696+ if ActionKey <> -1 then begin
1697+ Component := ActionList.Owner.FindComponent(ActionName);
1698+ if TObject(Component) is TAction then begin
1699+ TAction(Component).ShortCut := ActionKey;
1700+ end;
1701+ end;
1702+ end;
1703+ finally
1704+ ini.Free;
1705+ SecList.Free;
1706+ end;
1707+end;
1708+
1709+{!
1710+\brief ƒŒƒXƒGƒfƒBƒ^‚ɐݒ肳‚ê‚Ä‚¢‚éƒVƒ‡[ƒgƒJƒbƒgƒL[‚ðƒtƒ@ƒCƒ‹‚É•Û‘¶
1711+\param ActionList •Û‘¶‚·‚éƒAƒNƒVƒ‡ƒ“ˆê——
1712+\todo STD_SEC, EKEY_SETTING_FILE_NAME ‚ð GetXXXFileName() ‚É’Ç‚¢o‚¹
1713+\todo LoadKeySetting ‚Æ“‡‚¹‚æ
1714+
1715+ActionList ‚ɐݒ肳‚ê‚Ä‚¢‚éƒVƒ‡[ƒgƒJƒbƒgƒL[‚ðƒtƒ@ƒCƒ‹‚É•Û‘¶‚µ‚Ü‚·B
1716+}
1717+procedure TGikoSys.SaveEditorKeySetting(ActionList: TActionList);
1718+const
1719+ STD_SEC = 'KeySetting';
1720+var
1721+ i: Integer;
1722+ ini: TMemIniFile;
1723+begin
1724+ ini := TMemIniFile.Create(GetConfigDir + EKEY_SETTING_FILE_NAME);
1725+ try
1726+ for i := 0 to ActionList.ActionCount - 1 do begin
1727+ if ActionList.Actions[i].Tag = -1 then
1728+ Continue;
1729+ ini.WriteInteger(STD_SEC, ActionList.Actions[i].Name, TAction(ActionList.Actions[i]).ShortCut);
1730+ end;
1731+ ini.UpdateFile;
1732+ finally
1733+ ini.Free;
1734+ end;
1735+end;
16191736
16201737 {!
16211738 \brief ƒvƒƒZƒX‚̐¶¬
@@ -2836,7 +2953,7 @@ begin
28362953
28372954 for i := 0 to threadItem.Count - 1 do begin
28382955 // ƒŒƒX
2839- THTMLCreate.DivideStrLine(boardPlugIn.GetDat(DWORD( threadItem ), i + 1), @Res);
2956+ DivideStrLine(boardPlugIn.GetDat(DWORD( threadItem ), i + 1), @Res);
28402957 if(AnsiPos(AID, Res.FDateTime) > 0) then begin
28412958 body.Add(IntToStr(i+1));
28422959 end;
@@ -2846,7 +2963,7 @@ begin
28462963 try
28472964 ReadList.LoadFromFile(ThreadItem.GetThreadFileName);
28482965 for i := 0 to ReadList.Count - 1 do begin
2849- THTMLCreate.DivideStrLine(ReadList[i], @Res);
2966+ DivideStrLine(ReadList[i], @Res);
28502967 if AnsiPos(AID, Res.FDateTime) > 0 then begin
28512968 body.Add(IntToStr(i+1));
28522969 end;
@@ -2917,9 +3034,9 @@ begin
29173034 //===== ƒvƒ‰ƒOƒCƒ“‚É‚æ‚é•\Ž¦
29183035 //boardPlugIn := ThreadItem.BoardPlugIn;
29193036 boardPlugIn := ThreadItem.ParentBoard.BoardPlugIn;
2920- THTMLCreate.DivideStrLine(boardPlugIn.GetDat(DWORD( threadItem ), AIDNum), @Res);
3037+ DivideStrLine(boardPlugIn.GetDat(DWORD( threadItem ), AIDNum), @Res);
29213038 end else begin
2922- THTMLCreate.DivideStrLine( ReadThreadFile(ThreadItem.GetThreadFileName, AIDNum), @Res);
3039+ DivideStrLine( ReadThreadFile(ThreadItem.GetThreadFileName, AIDNum), @Res);
29233040 end;
29243041 AID := Res.FDateTime;
29253042 if AnsiPos('id', AnsiLowerCase(AID)) > 0 then begin
@@ -3238,44 +3355,7 @@ begin
32383355 R.Free;
32393356 end;
32403357 end;
3241-//! mainƒtƒH[ƒ€‚̃Vƒ‡[ƒgƒJƒbƒgƒL[‚ÌIniƒtƒ@ƒCƒ‹–¼
3242-function TGikoSys.GetMainKeyFileName : String;
3243-begin
3244- Result := Setting.GetMainKeyFileName;
3245-end;
3246-//! EditorƒtƒH[ƒ€‚̃Vƒ‡[ƒgƒJƒbƒgƒL[‚ÌIniƒtƒ@ƒCƒ‹–¼
3247-function TGikoSys.GetEditorKeyFileName: String;
3248-begin
3249- Result := Setting.GetEditorKeyFileName;
3250-end;
32513358
3252-//! ƒMƒRƒiƒr‚̃ƒbƒZ[ƒW‚ðÝ’è‚·‚é
3253-procedure TGikoSys.SetGikoMessage;
3254-begin
3255- if FGikoMessage = nil then begin
3256- FGikoMessage := TGikoMessage.Create;
3257- end else begin
3258- FGikoMessage.Clear;
3259- end;
3260-
3261- if (Setting.GengoSupport) then begin
3262- try
3263- if (FileExists(Setting.GetLanguageFileName)) then begin
3264- FGikoMessage.LoadFromFile(Setting.GetLanguageFileName);
3265- end;
3266- except
3267- FGikoMessage.Clear;
3268- end;
3269- end;
3270-end;
3271-//! ƒMƒRƒiƒr‚̃ƒbƒZ[ƒW‚ðŽæ“¾‚·‚é
3272-function TGikoSys.GetGikoMessage(MesType: TGikoMessageListType): String;
3273-begin
3274- Result := '';
3275- if FGikoMessage <> nil then begin
3276- Result := FGikoMessage.GetMessage(MesType);
3277- end;
3278-end;
32793359
32803360 initialization
32813361 GikoSys := TGikoSys.Create;
--- a/HTMLCreate.pas
+++ b/HTMLCreate.pas
@@ -18,13 +18,6 @@ uses
1818 {Sort,} ,GikoBayesian, HintWindow;
1919
2020 type
21-
22- PResLinkRec = ^TResLinkRec;
23- TResLinkRec = record
24- FBbs: string;
25- FKey : string;
26- end;
27-
2821 THTMLCreate = class(TObject)
2922 private
3023 { Private éŒ¾ }
@@ -44,15 +37,12 @@ type
4437 procedure CreateDefaultHTML (doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
4538 procedure ConvertResAnchor(PRes: PResRec);
4639 procedure separateNumber(var st: String; var et: String; const Text, Separator: String);
47- function checkComma(const s : String; var j : Integer; var No : String) : boolean;
48- function addResAnchor(PAddRes: PResRec; PResLink : PResLinkRec; dat : boolean;
49- var s : String; j : Integer; const No: String) : string;
5040 public
5141 { Public éŒ¾ }
5242 procedure AddAnchorTag(PRes: PResRec);
5343 function LoadFromSkin(fileName: string; ThreadItem: TThreadItem; SizeByte: Integer): string;
5444 function SkinedRes(const skin: string; PRes: PResRec; const No: string): string;
55- procedure ConvRes( PRes : PResRec; PResLink : PResLinkRec; DatToHTML: boolean = false); overload;
45+ procedure ConvRes( PRes : PResRec;const Bbs: string; const Key: string; DatToHTML: boolean = false); overload;
5646 function ConvRes(const Body, Bbs, Key, ParamBBS, ParamKey, ParamStart, ParamTo, ParamNoFirst, ParamTrue : string; DatToHTML: boolean = false): string; overload;
5747 procedure CreateHTML2(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
5848 procedure CreateHTML3(var html: TStringList; ThreadItem: TThreadItem; var sTitle: string);
@@ -62,10 +52,6 @@ type
6252 class function GetRespopupURL(AText, AThreadURL : string): string;
6353 //Žw’肵‚½ƒpƒX‚ɃXƒLƒ“‚à‚µ‚­‚ÍCSS‚̃tƒ@ƒCƒ‹‚̃Rƒs[‚ðì‚é
6454 class procedure SkinorCSSFilesCopy(path: string);
65- //dat‚Ps‚ðƒŒƒX‚É•ª‰ð‚·‚é
66- class procedure DivideStrLine(Line: string; PRes: PResRec);
67- //HTML‚©‚烊ƒ“ƒNƒ^ƒO‚ðíœ‚·‚é
68- class function DeleteLink(const s: string): string;
6955 end;
7056
7157 var
@@ -243,13 +229,11 @@ var
243229 pos : PChar;
244230 pp, pe : PChar;
245231 s : String;
246- len : Integer;
247232 begin
248233 s := PRes.FBody;
249234 PRes.FBody := '';
250235
251- //while True do begin
252- repeat
236+ while True do begin
253237 idx := MaxInt;
254238 idx2 := MaxInt;
255239 pp := PChar(s);
@@ -266,62 +250,56 @@ begin
266250
267251 if idx = MaxInt then begin
268252 //ƒŠƒ“ƒN‚ª–³‚¢‚æB
269- len := Length(PRes.FBody);
270- SetLength(PRes.FBody, Length(s) + len);
271- Move(pp^, PRes.FBody[len + 1], Length(s));
272- end else begin
273- if (idx > anchorLen) and
274- (AnsiStrPosEx(pp + idx - 1 - anchorLen, pp + idx, pANCHORs, pANCHORe) <> nil) then begin
275- //Šù‚ɃŠƒ“ƒNƒ^ƒO‚ª‚‚¢‚Ä‚¢‚é‚Á‚Û‚¢‚Æ‚«‚̓€ƒV
276- //</a></A>‚ð’T‚·A¬•¶Žš‚ÅŒ©‚‚©‚ç‚È‚¯‚ê‚Α啶Žš‚ÅŒŸõ
277- pos := AnsiStrPosEx(pp + idx, pe, pCTAGLs, pCTAGLe);
278- if pos = nil then
279- pos := AnsiStrPosEx(pp + idx, pe, pCTAGUs, pCTAGUe);
280- if pos = nil then
281- b := Length(REF_MARK[idx2])
282- else
283- b := pos - pp + 1;
253+ PRes.FBody := PRes.FBody + s;
254+ Break;
255+ end;
284256
285- len := Length(PRes.FBody);
286- SetLength(PRes.FBody, len + idx + b);
287- Move(pp^, PRes.FBody[len + 1], idx + b);
288- Delete(s, 1, idx + b);
289- end else begin
290- pp := PChar(s);
291- len := Length(PRes.FBody);
292- SetLength(PRes.FBody, len + idx - 1);
293- Move(pp^, PRes.FBody[len + 1], idx - 1);
294-
295- Delete(s, 1, idx - 1);
296- b := Length( s ) + 1;
297- pp := PChar(s);
298- for i := 1 to b do begin
299- //‚PƒoƒCƒg•¶Žš‚ÅURL‚ÉŽg‚¦‚È‚¢•¶Žš‚È‚ç
300- if (AnsiStrPosEx(pURLCHARs, pURLCHARe, pp, pp + 1) = nil) then begin
301- url := Copy(s, 1, i - 1);
302- Delete(s, 1, i - 1);
303- href := Format('%s%s', [_HEAD[idx2], url]);
304- PRes.FBody
305- := Format('%s<a href="%s" target="_blank">%s</a>', [PRes.FBody, href, url]);
306- Break;
307- end;
308- //ˆê•¶Žši‚ß‚éB
309- Inc(pp);
310- end;
257+ if (idx > 1) and (idx > anchorLen) and
258+ (AnsiStrPosEx(pp + idx - 1 - anchorLen, pp + idx, pANCHORs, pANCHORe) <> nil) then begin
259+ //Šù‚ɃŠƒ“ƒNƒ^ƒO‚ª‚‚¢‚Ä‚¢‚é‚Á‚Û‚¢‚Æ‚«‚̓€ƒV
260+ //</a></A>‚ð’T‚·A¬•¶Žš‚ÅŒ©‚‚©‚ç‚È‚¯‚ê‚Α啶Žš‚ÅŒŸõ
261+ pos := AnsiStrPosEx(pp + idx, pe, pCTAGLs, pCTAGLe);
262+ if pos = nil then
263+ pos := AnsiStrPosEx(pp + idx, pe, pCTAGUs, pCTAGUe);
264+ if pos = nil then
265+ b := Length(REF_MARK[idx2])
266+ else
267+ b := pos - pp + 1;
268+
269+ PRes.FBody := PRes.FBody + Copy(s, 1, idx + b);
270+ Delete(s, 1, idx + b);
271+ Continue;
272+ end;
273+
274+ PRes.FBody := PRes.FBody + Copy(s, 1, idx - 1);
275+ Delete(s, 1, idx - 1);
276+ b := Length( s ) + 1;
277+ pp := PChar(s);
278+ for i := 1 to b do begin
279+ pe := AnsiStrPosEx(pURLCHARs, pURLCHARe, pp, pp + 1);
280+
281+ if pe = nil then begin
282+ //URL‚¶‚á‚È‚¢•¶Žš”­Œ©I‚Æ‚©A•¶Žš‚ª‚È‚­‚È‚Á‚½B
283+ url := Copy(s, 1, i - 1);
284+ href := Format('%s%s', [_HEAD[idx2], url]);
285+ PRes.FBody
286+ := Format('%s<a href="%s" target="_blank">%s</a>', [PRes.FBody, href, url]);
287+ Delete(s, 1, i - 1);
288+ Break;
311289 end;
290+ //ˆê•¶Žši‚ß‚éB
291+ Inc(pp);
312292 end;
313- until idx = MaxInt;
293+ end;
314294 end;
315295
316296 //ˆø”AAIDF‘ΏۂƂȂé“ú•tID•¶Žš—ñAANum:ƒŒƒX”Ô AURLF‚»‚̃XƒŒƒbƒh‚ÌURL
317297 function THTMLCreate.AddBeProfileLink(AID : string; ANum: Integer):string ;
318-const
319- BE_MARK : string = 'BE:';
320298 var
321299 p : integer;
322300 BNum, BMark : string;
323301 begin
324- p := AnsiPos(BE_MARK, AnsiUpperCase(AID));
302+ p := AnsiPos('BE:', AnsiUpperCase(AID));
325303 if p > 0 then begin
326304 BNum := Copy(AID, p, Length(AID));
327305 AID := Copy(AID, 1, p - 1);
@@ -336,7 +314,7 @@ begin
336314 end else
337315 Result := AID;
338316 end;
339-procedure THTMLCreate.separateNumber(var st: String; var et: String; const Text:String; const Separator: String);
317+procedure THTMLCreate.separateNumber(var st: String; var et: String; const Text, Separator: String);
340318 var
341319 p : Integer;
342320 begin
@@ -349,10 +327,12 @@ begin
349327 et := Text;
350328 end;
351329 end;
352-procedure THTMLCreate.ConvRes( PRes : PResRec; PResLink : PResLinkRec; DatToHTML: boolean = false);
330+procedure THTMLCreate.ConvRes( PRes : PResRec; const Bbs: string; const Key : string; DatToHTML: boolean = false);
353331 const
354332 GT = '&gt;';
355333 SN = '0123456789';
334+ FORMAT_LINK = '<a href="../test/read.cgi?bbs=%s&key=%s&st=%s&to=%s&nofirst=true" target="_blank">';
335+
356336 //ŒŸõ‘Ώۂ̕¶Žš—ñŒS
357337 TOKEN : array[0..5] of string = (GT+GT, GT, '„„', '„', '<a ', '<A ');
358338 var
@@ -368,6 +348,32 @@ var
368348 db : boolean;
369349 len : integer;
370350 rink : string;
351+ function addResAnchor(const Left :string) : string;
352+ var
353+ st,et : string;
354+ begin
355+ //I’[‚܂ōs‚Á‚Ă̏I—¹‚©ƒ`ƒFƒbƒN
356+ if j <= len then begin
357+ if db then j := j - 2
358+ else j := j - 1;
359+ end;
360+ //‰½‚à”Žš‚ªŒ©‚‚©‚ç‚È‚¢‚Æ‚«
361+ if No = '' then begin
362+ Result := Left + Copy(s, 1, j - 1);
363+ end else begin
364+ separateNumber(st, et, No, '-');
365+
366+ if not DatToHTML then begin
367+ Result := Left + Format(FORMAT_LINK,
368+ [Bbs, Key, st, et]);
369+ //[ParamBBS, Bbs, ParamKey, Key, ParamStart, st, ParamTo, et, ParamNoFirst, ParamTrue]);
370+ end else begin
371+ Result := Left + Format('<a href="#%s">', [st]);
372+ end;
373+ Result := Result + Copy(s, 1, j - 1) + '</a>';
374+ end;
375+ Delete(s, 1, j - 1);
376+ end;
371377
372378 procedure getNumberString;
373379 begin
@@ -397,6 +403,21 @@ var
397403 end;
398404 end;
399405
406+ function checkComma : boolean;
407+ begin
408+ j := 1;
409+ len := Length(s);
410+ if ((len > 0) and (s[j] = ',')) or ((len > 1) and (ZenToHan(Copy(s, j ,2)) = ',')) then begin
411+ Result := true;
412+ if (ByteType(s, j) = mbSingleByte) then
413+ Inc(j)
414+ else
415+ Inc(j, 2);
416+ No := '';
417+ end else begin
418+ Result := false;
419+ end;
420+ end;
400421 begin
401422 //s ‚É–{•¶‚ð‘S•”“ü‚ê‚é
402423 s := PRes.FBody;
@@ -456,9 +477,7 @@ begin
456477 // ƒŒƒXƒAƒ“ƒJ[‚ªŠÜ‚Ü‚ê‚Ä‚¢‚½‚ç,‚ª‘±‚­ŒÀ‚èƒAƒ“ƒJ[‚Æ‚µ‚Ĉµ‚¤
457478 if i <= 3 then begin
458479 No := '';
459- j := 1;
460- len := Length(s);
461- cm := checkComma(s, j, No);
480+ cm := checkComma;
462481 len := Length(s);
463482 while cm do begin
464483 oc := '';
@@ -466,15 +485,8 @@ begin
466485 sw := false;
467486 db := false;
468487 getNumberString;
469- //I’[‚܂ōs‚Á‚Ă̏I—¹‚©ƒ`ƒFƒbƒN
470- if j <= len then begin
471- if db then j := j - 2
472- else j := j - 1;
473- end;
474- addResAnchor(PRes, PResLink, DatToHTML, s, j, No);
475- j := 1;
476- len := Length(s);
477- cm := checkComma(s, j, No);
488+ PRes.FBody := addResAnchor(PRes.FBody);
489+ cm := checkComma;
478490 end;
479491 end;
480492 end else begin
@@ -486,64 +498,10 @@ begin
486498 db := false;
487499 len := Length(s);
488500 getNumberString;
489- //I’[‚܂ōs‚Á‚Ă̏I—¹‚©ƒ`ƒFƒbƒN
490- if j <= len then begin
491- if db then j := j - 2
492- else j := j - 1;
493- end;
494- addResAnchor(PRes, PResLink, DatToHTML, s, j, No);
495- end;
496- end;
497- if Length(s) > 0 then begin
498- PRes.FBody := PRes.FBody + s;
499- end;
500-end;
501-function THTMLCreate.checkComma(
502- const s : String;
503- var j : Integer;
504- var No : String
505-) : boolean;
506-var
507- bType : TMbcsByteType;
508-begin
509- Result := false;
510- if (Length(s) > 0) then begin
511- bType := ByteType(s, j);
512- if ((bType = mbSingleByte) and (s[j] = ',') or
513- ((bType = mbLeadByte) and (ZenToHan(Copy(s, j ,2)) = ','))) then begin
514- Result := true;
515- if (bType = mbSingleByte) then
516- Inc(j)
517- else
518- Inc(j, 2);
519- No := '';
501+ PRes.FBody := addResAnchor(PRes.FBody);
520502 end;
521503 end;
522-end;
523-function THTMLCreate.addResAnchor(
524- PAddRes: PResRec; PResLink : PResLinkRec; dat : boolean;
525- var s : String; j : Integer; const No: String) : string;
526-const
527- FORMAT_LINK = '<a href="../test/read.cgi?bbs=%s&key=%s&st=%s&to=%s&nofirst=true" target="_blank">';
528-var
529- st,et : string;
530-begin
531-
532- //‰½‚à”Žš‚ªŒ©‚‚©‚ç‚È‚¢‚Æ‚«
533- if No = '' then begin
534- PAddRes.FBody := PAddRes.FBody + Copy(s, 1, j - 1);
535- end else begin
536- separateNumber(st, et, No, '-');
537-
538- if not dat then begin
539- PAddRes.FBody := PAddRes.FBody +
540- Format(FORMAT_LINK, [PResLink.FBbs, PResLink.FKey, st, et]);
541- end else begin
542- PAddRes.FBody := PAddRes.FBody + Format('<a href="#%s">', [st]);
543- end;
544- PAddRes.FBody := PAddRes.FBody + Copy(s, 1, j - 1) + '</a>';
545- end;
546- Delete(s, 1, j - 1);
504+ PRes.FBody := PRes.FBody + s;
547505 end;
548506
549507 (*************************************************************************
@@ -881,15 +839,12 @@ var
881839 SkinNewRes: string;
882840 SkinRes: string;
883841 ThreadName : string;
884- ResLink :TResLinkRec;
885842 begin
886843 NewReceiveNo := ThreadItem.NewReceive;
887844 // ƒtƒHƒ“ƒg‚âƒTƒCƒY‚̐ݒè
888845 UserOptionalStyle := GikoSys.SetUserOptionalStyle;
889846 ThreadName := ChangeFileExt(ThreadItem.FileName, '');
890- ResLink.FBbs := ThreadItem.ParentBoard.BBSID;
891- ResLink.FKey := ThreadName;
892- //,
847+
893848 doc.open;
894849 try
895850 doc.charset := 'Shift_JIS';
@@ -937,7 +892,7 @@ begin
937892 if (Trim(ReadList[i]) <> '') then begin
938893 DivideStrLine(ReadList[i], @Res);
939894 AddAnchorTag(@Res);
940- ConvRes(@Res, @ResLink);
895+ ConvRes(@Res, ThreadItem.ParentBoard.BBSID, ThreadName);
941896 Res.FDateTime := AddBeProfileLink(Res.FDateTime, i + 1);
942897
943898 if NewReceiveNo <= (i + 1) then
@@ -990,15 +945,12 @@ var
990945 Res: TResRec;
991946 UserOptionalStyle: string;
992947 ThreadName :String;
993- ResLink :TResLinkRec;
994948 begin
995949 doc.open;
996950 try
997951 doc.charset := 'Shift_JIS';
998952 NewReceiveNo := ThreadItem.NewReceive;
999953 ThreadName := ChangeFileExt(ThreadItem.FileName, '');
1000- ResLink.FBbs := ThreadItem.ParentBoard.BBSID;
1001- ResLink.FKey := ThreadName;
1002954 // ƒtƒHƒ“ƒg‚âƒTƒCƒY‚̐ݒè
1003955 UserOptionalStyle := GikoSys.SetUserOptionalStyle;
1004956 CSSFileName := GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName;
@@ -1038,7 +990,7 @@ begin
1038990 No := IntToStr(i + 1);
1039991 DivideStrLine(ReadList[i], @Res);
1040992 AddAnchorTag(@Res);
1041- ConvRes(@Res, @ResLink);
993+ ConvRes(@Res, ThreadItem.ParentBoard.BBSID, ThreadName);
1042994 Res.FDateTime := AddBeProfileLink(Res.FDateTime, i + 1);
1043995 if Res.FMailTo = '' then
1044996 doc.Write(Format(FORMAT_NOMAIL, [No, No, No, Res.FName, Res.FDateTime, Res.FBody]))
@@ -1070,15 +1022,12 @@ var
10701022 NewReceiveNo: Integer;
10711023 Res: TResRec;
10721024 ThreadName: String;
1073- ResLink : TResLinkRec;
10741025 begin
10751026 doc.open;
10761027 try
10771028 doc.charset := 'Shift_JIS';
10781029 NewReceiveNo := ThreadItem.NewReceive;
10791030 ThreadName := ChangeFileExt(ThreadItem.FileName, '');
1080- ResLink.FBbs := ThreadItem.ParentBoard.BBSID;
1081- ResLink.FKey := ThreadName;
10821031 doc.Write('<html><head>'#13#10);
10831032 doc.Write('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">'#13#10);
10841033 doc.Write('<title>' + sTitle + '</title></head>'#13#10);
@@ -1115,7 +1064,7 @@ begin
11151064 No := IntToStr(i + 1);
11161065 DivideStrLine(ReadList[i], @Res);
11171066 AddAnchorTag(@Res);
1118- ConvRes(@Res, @ResLink);
1067+ ConvRes(@Res, ThreadItem.ParentBoard.BBSID, ThreadName);
11191068 Res.FDateTime := AddBeProfileLink(Res.FDateTime, i + 1);
11201069 if Res.FMailTo = '' then
11211070 doc.Write('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> –¼‘OF<font color="forestgreen"><b> ' + Res.FName + ' </b></font> “Še“úF <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>'#13#10)
@@ -1217,7 +1166,6 @@ var
12171166 SkinRes: string;
12181167 tmp, tmp1: string;
12191168 ThreadName: String;
1220- ResLink : TResLinkRec;
12211169 function LoadSkin( fileName: string ): string;
12221170 begin
12231171 Result := LoadFromSkin( fileName, ThreadItem, ThreadItem.Size );
@@ -1231,8 +1179,6 @@ begin
12311179 if ThreadItem <> nil then begin
12321180 CSSFileName := GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName;
12331181 ThreadName := ChangeFileExt(ThreadItem.FileName, '');
1234- ResLink.FBbs := ThreadItem.ParentBoard.BBSID;
1235- ResLink.FKey := ThreadName;
12361182 html.Clear;
12371183 html.BeginUpdate;
12381184 //if ThreadItem.IsBoardPlugInAvailable then begin
@@ -1326,7 +1272,7 @@ begin
13261272
13271273 DivideStrLine(ReadList[i], @Res);
13281274 AddAnchorTag(@Res);
1329- ConvRes(@Res, @ResLink, true);
1275+ ConvRes(@Res, ThreadItem.ParentBoard.BBSID, ThreadName, true);
13301276 ConvertResAnchor(@Res);
13311277
13321278 try
@@ -1365,7 +1311,7 @@ begin
13651311 No := IntToStr(i + 1);
13661312 DivideStrLine(ReadList[i], @Res);
13671313 AddAnchorTag(@Res);
1368- ConvRes(@Res, @ResLink, true);
1314+ ConvRes(@Res, ThreadItem.ParentBoard.BBSID, ThreadName, true);
13691315 ConvertResAnchor(@Res);
13701316 if Res.FMailTo = '' then
13711317 html.Append('<a name="' + No + '"></a>'
@@ -1412,7 +1358,7 @@ begin
14121358 No := IntToStr(i + 1);
14131359 DivideStrLine(ReadList[i], @Res);
14141360 AddAnchorTag(@Res);
1415- ConvRes(@Res, @ResLink, true);
1361+ ConvRes(@Res, ThreadItem.ParentBoard.BBSID, ThreadName, true);
14161362 ConvertResAnchor(@Res);
14171363 if Res.FMailTo = '' then
14181364 html.Append('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> –¼‘OF<font color="forestgreen"><b> ' + Res.FName + ' </b></font> “Še“úF ' + Res.FDateTime+ '<br><dd>' + Res.Fbody + ' <br><br><br>')
@@ -1491,7 +1437,7 @@ begin
14911437 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
14921438 Body := CustomStringReplace(Body, '<br>', #10,true);
14931439 Body := CustomStringReplace(Body, '</a>', '',true);
1494- Body := THTMLCreate.DeleteLink(Body);
1440+ Body := GikoSys.DeleteLink(Body);
14951441 Body := CustomStringReplace(Body, '&lt;', '<');
14961442 Body := CustomStringReplace(Body, '&gt;', '>');
14971443 Body := CustomStringReplace(Body, '&quot;', '"');
@@ -1517,7 +1463,7 @@ begin
15171463 Body := CustomStringReplace(Body, '<br> ', #10,true);
15181464 Body := CustomStringReplace(Body, '<br>', #10,true);
15191465 Body := CustomStringReplace(Body, '</a>', '',true);
1520- Body := THTMLCreate.DeleteLink(Body);
1466+ Body := GikoSys.DeleteLink(Body);
15211467 Body := CustomStringReplace(Body, '&lt;', '<');
15221468 Body := CustomStringReplace(Body, '&gt;', '>');
15231469 Body := CustomStringReplace(Body, '&quot;', '"');
@@ -1598,9 +1544,9 @@ begin
15981544 for i := 0 to dirs.Count - 1 do begin
15991545 files := TStringList.Create;
16001546 try
1601- files.BeginUpdate;
1547+ files.BeginUpdate;
16021548 gikoSys.GetFileList(dirs[i], '*.*', files, true);
1603- files.EndUpdate;
1549+ files.EndUpdate;
16041550 tmpD := CustomStringReplace(dirs[i], GikoSys.GetConfigDir, path);
16051551 if (AnsiPos(dirs[i], tmp) <> 0) and not (DirectoryExists(tmpD)) then
16061552 ForceDirectories(tmpD);
@@ -1631,80 +1577,6 @@ begin
16311577 finally
16321578 dirs.Free;
16331579 end;
1634-end;{!
1635-\brief datƒtƒ@ƒCƒ‹‚̈ꃉƒCƒ“‚𕪉ð
1636-\param Line datƒtƒ@ƒCƒ‹‚ð\¬‚·‚é 1 s
1637-\return ƒŒƒXî•ñ
1638-}
1639-class procedure THTMLCreate.DivideStrLine(Line: string; PRes: PResRec);
1640-const
1641- delimiter = '<>';
1642-var
1643- pds, pde : PChar;
1644- pss, pse : PChar;
1645- ppos : PChar;
1646-begin
1647- //΁Տ
1648- PRes.FType := glt2chNew;
1649-
1650- pss := PChar(Line);
1651- pse := pss + Length(Line);
1652- pds := PChar(delimiter);
1653- pde := pds + Length(delimiter);
1654-
1655- ppos := AnsiStrPosEx(pss, pse, pds, pde);
1656- if (ppos = nil) then begin
1657- Line := CustomStringReplace(Line, '<>', '&lt;&gt;');
1658- Line := CustomStringReplace(Line, ',', '<>');
1659- Line := CustomStringReplace(Line, '—M', ',');
1660- end;
1661- //Trim‚µ‚Ä‚Í‚¢‚¯‚È‚¢‹C‚ª‚·‚é@by‚à‚¶‚ã
1662- PRes.FName := RemoveToken(Line, delimiter);
1663- PRes.FMailTo := RemoveToken(Line, delimiter);
1664- PRes.FDateTime := RemoveToken(Line, delimiter);
1665- PRes.FBody := RemoveToken(Line, delimiter);
1666- //‚Q‚¿‚á‚ñ‚Ë‚é‚Æ‚©‚¾‚ƁA–{•¶‚̐擪‚É‚P‚”¼Šp‹ó”’‚ª“ü‚Á‚Ä‚¢‚é‚̂ō폜‚·‚é
1667- //‘¼‚ÌŒfŽ¦”‚ŁAƒŒƒXŽ©‘Ì‚Ì‹ó”’‚©‚à‚µ‚ê‚È‚¢‚¯‚Ç‚»‚ê‚Í’ú‚ß‚é
1668- PRes.FBody := TrimLeft(PRes.FBody);
1669- //‹ó‚¾‚Æ–â‘肪‹N‚«‚é‚©‚çA‹ó”’‚ðÝ’è‚·‚é
1670- if PRes.FBody = '' then
1671- PRes.FBody := '&nbsp;';
1672-
1673- PRes.FTitle := RemoveToken(Line, delimiter);
1674-end;
1675-
1676-{!
1677-\brief HTML ‚©‚çƒAƒ“ƒJ[ƒ^ƒO‚ðíœ
1678-\param s Œ³‚É‚È‚é HTML
1679-\return ƒAƒ“ƒJ[ƒ^ƒO‚ªíœ‚³‚ꂽ HTML
1680-}
1681-class function THTMLCreate.DeleteLink(const s: string): string;
1682-var
1683- s1: string;
1684- s2: string;
1685- idx: Integer;
1686- i: Integer;
1687-begin
1688- i := 0;
1689- Result := '';
1690- while True do begin
1691- s1 := GikoSys.GetTokenIndex(s, '<a href="', i);
1692- s2 := GikoSys.GetTokenIndex(s, '<a href="', i + 1);
1693-
1694- idx := Pos('">', s1);
1695- if idx <> 0 then
1696- Delete(s1, 1, idx + 1);
1697- idx := Pos('">', s2);
1698- if idx <> 0 then
1699- Delete(s2, 1, idx + 1);
1700-
1701- Result := Result + s1 + s2;
1702-
1703- if s2 = '' then
1704- Break;
1705-
1706- inc(i, 2);
1707- end;
17081580 end;
17091581
17101582
--- a/ItemDownload.pas
+++ b/ItemDownload.pas
@@ -53,9 +53,7 @@ type
5353 function ParseCgiStatus(Content: string): TCgiStatus;
5454 function CgiDownload(ItemType: TGikoDownloadType; URL: string; Modified: TDateTime): Boolean;
5555 function DatDownload(ItemType: TGikoDownloadType; URL: string; Modified: TDateTime; RangeStart: Integer; AdjustLen: Integer): Boolean;
56- procedure DeleteStatusLine(Item: TDownloadItem);
57- procedure InitHttpClient(client: TIdHttp);
58- procedure ClearHttpClient(client: TIdHttp);
56+ function DeleteStatusLine(Content: string): string;
5957 protected
6058 procedure Execute; override;
6159 public
@@ -106,7 +104,7 @@ type
106104 implementation
107105
108106 uses
109- Y_TextConverter, MojuUtils, HTMLCreate;
107+ Y_TextConverter, MojuUtils;
110108
111109 constructor TDownloadThread.Create(CreateSuspended: Boolean);
112110 begin
@@ -120,7 +118,13 @@ end;
120118
121119 destructor TDownloadThread.Destroy;
122120 begin
123- ClearHttpClient(FIndy);
121+ FIndy.Request.CustomHeaders.Clear;
122+ FIndy.Request.RawHeaders.Clear;
123+ FIndy.Request.Clear;
124+ FIndy.Response.CustomHeaders.Clear;
125+ FIndy.Response.RawHeaders.Clear;
126+ FIndy.Response.Clear;
127+ FIndy.ProxyParams.Clear;
124128 FIndy.Free;
125129 inherited;
126130 end;
@@ -142,65 +146,7 @@ begin
142146 [Day, Copy(StrMonth, 1 + 3 * (Month - 1), 3),
143147 Year, Hour, Min, Sec]);
144148 end;
145-// ******************************************************************
146-// HTTPClient‚̏‰Šú‰»
147-// ******************************************************************
148-procedure TDownloadThread.InitHttpClient(client: TIdHttp);
149-begin
150- ClearHttpClient(client);
151- client.Disconnect;
152- client.Request.UserAgent := GikoSys.GetUserAgent;
153- client.RecvBufferSize := Gikosys.Setting.RecvBufferSize;
154- client.ProxyParams.BasicAuthentication := False;
155- client.ReadTimeout := GikoSys.Setting.ReadTimeOut;
156- {$IFDEF DEBUG}
157- Writeln('------------------------------------------------------------');
158- {$ENDIF}
159- //FIndy.AllowCookies := False;
160- if GikoSys.Setting.ReadProxy then begin
161- if GikoSys.Setting.ProxyProtocol then
162- client.ProtocolVersion := pv1_1
163- else
164- client.ProtocolVersion := pv1_0;
165- client.ProxyParams.ProxyServer := GikoSys.Setting.ReadProxyAddress;
166- client.ProxyParams.ProxyPort := GikoSys.Setting.ReadProxyPort;
167- client.ProxyParams.ProxyUsername := GikoSys.Setting.ReadProxyUserID;
168- client.ProxyParams.ProxyPassword := GikoSys.Setting.ReadProxyPassword;
169- if GikoSys.Setting.ReadProxyUserID <> '' then
170- client.ProxyParams.BasicAuthentication := True;
171- {$IFDEF DEBUG}
172- Writeln('ƒvƒƒLƒVÝ’è‚ ‚è');
173- Writeln('ƒzƒXƒg: ' + GikoSys.Setting.ReadProxyAddress);
174- Writeln('ƒ|[ƒg: ' + IntToStr(GikoSys.Setting.ReadProxyPort));
175- {$ENDIF}
176- end else begin
177- if GikoSys.Setting.Protocol then
178- client.ProtocolVersion := pv1_1
179- else
180- client.ProtocolVersion := pv1_0;
181- client.ProxyParams.ProxyServer := '';
182- client.ProxyParams.ProxyPort := 80;
183- client.ProxyParams.ProxyUsername := '';
184- client.ProxyParams.ProxyPassword := '';
185- {$IFDEF DEBUG}
186- Writeln('ƒvƒƒLƒVÝ’è‚È‚µ');
187- {$ENDIF}
188- end;
189-end;
190-// ******************************************************************
191-// HTTPClient‚̃ŠƒNƒGƒXƒg‚ƃŒƒXƒ|ƒ“ƒX‚̃f[ƒ^‚̏Á‹Ž
192-// ******************************************************************
193-procedure TDownloadThread.ClearHttpClient(client: TIdHttp);
194-begin
195- client.Request.CustomHeaders.Clear;
196- client.Request.RawHeaders.Clear;
197- client.Request.Clear;
198- client.Response.CustomHeaders.Clear;
199- client.Response.RawHeaders.Clear;
200- client.Response.Clear;
201-
202- client.ProxyParams.Clear;
203-end;
149+
204150 procedure TDownloadThread.Execute;
205151 var
206152 ResStream: TMemoryStream;
@@ -244,11 +190,11 @@ begin
244190 begin
245191 FDownloadTitle := FItem.FThreadItem.Title;
246192 if FItem.FThreadItem <> nil then begin
247- if FItem.FThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
248- boardPlugIn := FItem.FThreadItem.ParentBoard.BoardPlugIn;
249- Item.State := TGikoDownloadState( boardPlugIn.DownloadThread( DWORD( FItem.FThreadItem ) ) );
250- end;
251- //if FItem.FThreadItem.IsBoardPlugInAvailable then begin
193+ if FItem.FThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
194+ boardPlugIn := FItem.FThreadItem.ParentBoard.BoardPlugIn;
195+ Item.State := TGikoDownloadState( boardPlugIn.DownloadThread( DWORD( FItem.FThreadItem ) ) );
196+ end;
197+ //if FItem.FThreadItem.IsBoardPlugInAvailable then begin
252198 // boardPlugIn := FItem.FThreadItem.BoardPlugIn;
253199 // Item.State := TGikoDownloadState( boardPlugIn.DownloadThread( DWORD( FItem.FThreadItem ) ) );
254200 //end;
@@ -271,9 +217,51 @@ begin
271217 Continue;
272218 end;
273219
274- FAbort := False;
275220 //===== ƒvƒ‰ƒOƒCƒ“‚ðŽg—p‚µ‚È‚¢ê‡
276- InitHttpClient(FIndy);
221+ FAbort := False;
222+ FIndy.Request.CustomHeaders.Clear;
223+ FIndy.Response.Clear;
224+ FIndy.Request.Clear;
225+ FIndy.ProxyParams.Clear;
226+ FIndy.Disconnect;
227+ FIndy.Request.UserAgent := GikoSys.GetUserAgent;
228+ FIndy.RecvBufferSize := Gikosys.Setting.RecvBufferSize;
229+ FIndy.ProxyParams.BasicAuthentication := False;
230+ FIndy.ReadTimeout := GikoSys.Setting.ReadTimeOut;
231+ {$IFDEF DEBUG}
232+ Writeln('------------------------------------------------------------');
233+ {$ENDIF}
234+ //FIndy.AllowCookies := False;
235+ if GikoSys.Setting.ReadProxy then begin
236+ if GikoSys.Setting.ProxyProtocol then
237+ FIndy.ProtocolVersion := pv1_1
238+ else
239+ FIndy.ProtocolVersion := pv1_0;
240+ FIndy.ProxyParams.ProxyServer := GikoSys.Setting.ReadProxyAddress;
241+ FIndy.ProxyParams.ProxyPort := GikoSys.Setting.ReadProxyPort;
242+ FIndy.ProxyParams.ProxyUsername := GikoSys.Setting.ReadProxyUserID;
243+ FIndy.ProxyParams.ProxyPassword := GikoSys.Setting.ReadProxyPassword;
244+ if GikoSys.Setting.ReadProxyUserID <> '' then
245+ FIndy.ProxyParams.BasicAuthentication := True;
246+ {$IFDEF DEBUG}
247+ Writeln('ƒvƒƒLƒVÝ’è‚ ‚è');
248+ Writeln('ƒzƒXƒg: ' + GikoSys.Setting.ReadProxyAddress);
249+ Writeln('ƒ|[ƒg: ' + IntToStr(GikoSys.Setting.ReadProxyPort));
250+ {$ENDIF}
251+ end else begin
252+ if GikoSys.Setting.Protocol then
253+ FIndy.ProtocolVersion := pv1_1
254+ else
255+ FIndy.ProtocolVersion := pv1_0;
256+ FIndy.ProxyParams.ProxyServer := '';
257+ FIndy.ProxyParams.ProxyPort := 80;
258+ FIndy.ProxyParams.ProxyUsername := '';
259+ FIndy.ProxyParams.ProxyPassword := '';
260+ {$IFDEF DEBUG}
261+ Writeln('ƒvƒƒLƒVÝ’è‚È‚µ');
262+ {$ENDIF}
263+ end;
264+
277265 adjustMargin := 0;
278266 if Item.DownType = gdtThread then begin
279267 if FileExists( Item.ThreadItem.GetThreadFileName ) then begin
@@ -532,7 +520,8 @@ begin
532520 Writeln('CGIStatus: OK');
533521 {$ENDIF}
534522 Item.ResponseCode := 200;
535- DeleteStatusLine(Item);
523+ Item.Content := DeleteStatusLine(Item.Content);
524+ Item.ContentLength := CgiStatus.FSize;
536525 end;
537526 gcsINCR: begin
538527 //¡‚Í‚ ‚肦‚È‚¢
@@ -540,7 +529,8 @@ begin
540529 Writeln('CGIStatus: 206');
541530 {$ENDIF}
542531 Item.ResponseCode := 206;
543- DeleteStatusLine(Item);
532+ Item.Content := DeleteStatusLine(Item.Content);
533+ Item.ContentLength := CgiStatus.FSize;
544534 end;
545535 gcsERR: begin
546536 {$IFDEF DEBUG}
@@ -605,9 +595,68 @@ begin
605595 else
606596 Item.State := gdsError;
607597 end;
598+{
599+ //–³‚¢‚ÆŽv‚¤‚¯‚ǁBBB
600+ if (Item.ResponseCode in [200, 206]) and (Item.Content = '') then
601+ Item.State := gdsError;
602+ Item.LastModified := FIndy.Response.LastModified;
603+ //·•ªŽæ“¾‚Å‚PƒoƒCƒg‘O‚©‚ç‚Æ‚Á‚Ä‚«‚½‚Æ‚«‚̓}ƒCƒiƒX‚·‚é
604+ Item.ContentLength := FIndy.Response.ContentLength + AdjustLen;
605+ try
606+ ResStream.Clear;
607+ FIndy.Get(URL, ResStream);
608+ Item.Content := GikoSys.GzipDecompress(ResStream, FIndy.Response.ContentEncoding);
609+ if (Item.DownType = gdtThread) and (AdjustLen = -1) and (Item.Content[1] <> #10) then begin
610+ //·•ªŽæ“¾‚©‚‚PƒoƒCƒg–Ú‚ªLF‚Å‚È‚¢ê‡‚́u‚ ‚ځ[‚ñv‚³‚ê‚Ä‚¢‚é‚©‚à‚µ‚ê‚ñ‚̂ōĎ擾
611+ //‚±‚±‚сƒbƒZ[ƒW•\Ž¦ƒCƒxƒ“ƒg
612+ //event
613+ FMsg := 'u‚ ‚ځ[‚ñv‚ðŒŸo‚µ‚½‚̂ōĎ擾‚ðs‚¢‚Ü‚·';
614+ if Assigned(OnDownloadMsg) then
615+ Synchronize(FireDownloadMsg);
616+ FIndy.Request.ContentRangeStart := 0;
617+ FIndy.Request.ContentRangeEnd := 0;
618+ AdjustLen := 0;
619+ ResStream.Clear;
620+ FIndy.Get(URL, ResStream);
621+ Item.Content := GikoSys.GzipDecompress(ResStream, FIndy.Response.ContentEncoding);
622+ end else if (Item.DownType = gdtThread) and (AdjustLen = -1) and (Item.Content[1] = #10) then begin
623+ //·•ªŽæ“¾‚©‚‚PƒoƒCƒg–Ú‚ªLF‚̏ꍇi³íŽæ“¾j‚Í“ª‚ÌLF‚ðíœ
624+ Item.Content := Copy(Item.Content, 2, Length(Item.Content));
625+ end;
626+ except
627+ Item.State := gdsError;
628+ end;
629+ Item.ResponseCode := FIndy.ResponseCode;
630+}
631+{
632+ try
633+ ResStream.Clear;
634+ FIndy.Get(URL, ResStream);
635+ Item.Content := GikoSys.GzipDecompress(ResStream, FIndy.Response.ContentEncoding);
636+ except
637+ Item.State := gdsError;
638+ end;
639+
640+ CgiStatus := ParseCgiStatus(Item.Content);
641+ if CgiStatus.FStatus = gcsOK then begin
642+ if CgiStatus.FSize = 0 then
643+ Item.State := gdsNotModify
644+ else if Item.DownType = gdtBoard then
645+ Item.State := gdsComplete
646+ else
647+ Item.State := gdsDiffComplete;
648+ end else if CgiStatus.FStatus = gcsINCR then begin
649+ Item.State := gdsComplete;
650+ end else if CgiStatus.FStatus = gcsERR then begin
651+ Item.State := gdsError;
652+ Item.ErrText := CgiStatus.FErrText;
653+ end;
654+ Item.ContentLength := CgiStatus.FSize;
655+ }
608656 except
609657 Item.State := gdsError;
610658 end;
659+ //Item.ResponseCode := FIndy.ResponseCode;
611660 if FAbort then
612661 Item.State := gdsAbort;
613662 finally
@@ -616,7 +665,13 @@ begin
616665 ResStream.Free;
617666 end;
618667
619- ClearHttpClient(FIndy);
668+ FIndy.Request.CustomHeaders.Clear;
669+ FIndy.Request.RawHeaders.Clear;
670+ FIndy.Request.Clear;
671+ FIndy.Response.CustomHeaders.Clear;
672+ FIndy.Response.RawHeaders.Clear;
673+ FIndy.Response.Clear;
674+ FIndy.ProxyParams.Clear;
620675
621676 if Terminated then Break;
622677 Suspend;
@@ -708,6 +763,8 @@ var
708763 begin
709764 ResponseCode := -1;
710765 if (ItemType = gdtThread) and (RangeStart > 0) then begin
766+// if (ItemType = gdtThread) and (Item.ThreadItem.Size > 0) then begin
767+// FIndy.Request.ContentRangeStart := Item.ThreadItem.Size + AdjustLen;
711768 FIndy.Request.ContentRangeStart := RangeStart + AdjustLen;
712769 FIndy.Request.ContentRangeEnd := 0;
713770 end else begin
@@ -720,7 +777,9 @@ begin
720777 FIndy.Request.CustomHeaders.Add('Pragma: no-cache');
721778 if (Modified <> 0) and (Modified <> ZERO_DATE) then begin
722779 FIndy.Request.LastModified := modified - OffsetFromUTC;
780+ //FIndy.Request.CustomHeaders.Add('If-Modified-Since: ' + RFC1123_Date(modified - OffsetFromUTC) + ' GMT');
723781 end;
782+// FIndy.Request.AcceptEncoding := 'gzip';
724783 if RangeStart = 0 then
725784 FIndy.Request.AcceptEncoding := 'gzip'
726785 else
@@ -889,20 +948,17 @@ begin
889948 end;
890949 end;
891950
892-//‚Ps–Ú‚ðÁ‚µ‚āAƒRƒ“ƒeƒ“ƒcƒTƒCƒY‚ðÝ’è‚·‚é
893-procedure TDownloadThread.DeleteStatusLine(Item: TDownloadItem);
951+//Žè”²‚«‚ȏˆ—‚Å1s–Ú‚ðÁ‚·
952+function TDownloadThread.DeleteStatusLine(Content: string): string;
894953 var
895954 SList: TStringList;
896955 begin
897956 SList := TStringList.Create;
898957 try
899- SList.Text := Item.Content;
900- //1s–Ú‚ðíœ
958+ SList.Text := Content;
901959 if SList.Count > 1 then
902960 SList.Delete(0);
903- Item.Content := SList.Text;
904- //‰üsƒR[ƒh‚ðCRLF -> LF‚ƍl‚¦‚āAs”•ª‚¾‚¯ƒ}ƒCƒiƒX
905- Item.ContentLength := Length(SList.Text) - SList.Count;
961+ Result := SList.Text;
906962 finally
907963 SList.Free;
908964 end;
@@ -1194,6 +1250,11 @@ var
11941250 NewRes: Integer;
11951251 finish : Boolean;
11961252 loopCnt : Integer;
1253+// KokoTxt : string;
1254+// KokoIdx : Integer;
1255+// NewTxt : string;
1256+// NewIdx : Integer;
1257+// LastTxt : string;
11971258 LastIdx : Integer;
11981259 begin
11991260 FileName := ThreadItem.GetThreadFileName;
@@ -1292,7 +1353,7 @@ begin
12921353 Body.SaveToFile(FileName);
12931354
12941355 if ThreadItem.Title = '' then begin
1295- THTMLCreate.DivideStrLine(Body[0], @Res);
1356+ DivideStrLine(Body[0], @Res);
12961357 ThreadItem.Title := Res.FTitle;
12971358 end;
12981359 ThreadItem.Size := 0;
@@ -1314,6 +1375,7 @@ begin
13141375 ThreadItem.RoundDate := Now;
13151376 if not ThreadItem.UnRead then begin
13161377 ThreadItem.UnRead := True;
1378+ ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1;
13171379 end;
13181380 // if ThreadItem.RoundNo = 6 then
13191381 // ThreadItem.RoundNo := 0;
--- a/KeySetting.pas
+++ b/KeySetting.pas
@@ -4,8 +4,8 @@ interface
44
55 uses
66 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7- Dialogs, ComCtrls, StdCtrls, ExtCtrls, ActnList, Menus,
8- Editor;
7+ Dialogs, ComCtrls, StdCtrls, ExtCtrls, ActnList, Menus, GikoSystem, GikoUtil,
8+ Editor;
99
1010 type
1111 TKeySettingItem = class(TObject)
@@ -64,7 +64,7 @@ type
6464 { Private éŒ¾ }
6565 public
6666 { Public éŒ¾ }
67- EditorForm: TEditorForm;
67+ EditorForm: TEditorForm;
6868 end;
6969
7070 //var
@@ -72,8 +72,7 @@ type
7272
7373 implementation
7474
75-uses
76- Giko, GikoUtil, Gesture, GikoDataModule, GikoSystem;
75+uses Giko, Gesture, GikoDataModule;
7776
7877 const
7978 GUESTURE_NOTHING = '‚È‚µ';
@@ -111,7 +110,7 @@ begin
111110 if ListView.Items.Count > 0 then
112111 ListView.Selected := ListView.Items[0];
113112 EditorForm := TEditorForm.Create(Self);
114- GikoSys.LoadKeySetting(EditorForm.ActionList, GikoSys.GetEditorKeyFileName);
113+ GikoSys.LoadEditorKeySetting(EditorForm.ActionList);
115114 try
116115 for i := 0 to EditorForm.ActionList.ActionCount - 1 do begin
117116 if EditorForm.ActionList.Actions[i] is TAction then begin
--- a/KuroutSetting.pas
+++ b/KuroutSetting.pas
@@ -136,7 +136,7 @@ begin
136136 GikoSys.Setting.TimeAdjust := PutPostTimeRadioButton.Checked;
137137 //2chŒ¾ŒêƒTƒ|[ƒg
138138 GikoSys.Setting.GengoSupport := GengoSupport.Checked;
139- GikoSys.SetGikoMessage;
139+ GikoSys.Setting.SetMessages;
140140 //ƒ[ƒJƒ‹EƒŠƒ‚[ƒg̼±ÅŒx
141141 GikoSys.Setting.LocalTrapAtt := LocalTrapAtt.Checked;
142142 GikoSys.Setting.RemoteTrapAtt := RemoteTrapAtt.Checked;
--- a/ListViewUtils.pas
+++ b/ListViewUtils.pas
@@ -10,24 +10,20 @@ type
1010 TListViewUtils = class(TObject)
1111 private
1212 {Private éŒ¾}
13- class procedure DrawCategoryItem(BBS: TBBS; Item: TListItem; ListView: TListView);
14- class procedure DrawBoardItem(Category: TCategory; Item: TListItem; ListView: TListView);
15- class procedure DrawThreadItem(Board: TBoard; Item: TListItem; ListView: TListView);
16- class procedure DrawItemLogThread(Thread: TThreadItem; Item: TListItem; ColumnCount: Integer);
17- class procedure DrawItemNoLogThread(Thread: TThreadItem; Item: TListItem; ColumnCount: Integer);
1813 public
1914 {Public éŒ¾}
2015 class procedure SetBoardTreeNode(inBBS : TBBS; treeView: TTreeView);
2116 class function SetCategoryListItem(ABBS2ch: TBBS; ListView: TListView;
22- NumberVisible: Boolean): Integer;
17+ NumberVisible: Boolean; var vSortIndex: Integer; var vSortOrder: Boolean): Integer;
2318 class procedure ListViewSort(Sender: TObject; ListView: TListView; Column: TListColumn;
24- NumberVisible: Boolean; vSortOrder: Boolean);
19+ NumberVisible: Boolean; var vSortOrder: Boolean; var vSortIndex: Integer);
2520 class function ActiveListTrueColumn( column : TListColumn ) : TListColumn;
2621 class function SetBoardListItem(Category: TCategory; ListView: TListView;
27- NumberVisible: Boolean): Integer;
22+ NumberVisible: Boolean; var vSortIndex: Integer; var vSortOrder: Boolean): Integer;
2823 class function SetThreadListItem(Board: TBoard; ListView: TListView;
29- NumberVisible: Boolean): Integer;
24+ NumberVisible: Boolean; var vSortIndex: Integer; var vSortOrder: Boolean): Integer;
3025 class procedure ListViewData(Sender: TObject; Item: TListItem);
26+
3127 end;
3228
3329
@@ -141,7 +137,9 @@ end;
141137 class function TListViewUtils.SetCategoryListItem(
142138 ABBS2ch: TBBS;
143139 ListView: TListView;
144- NumberVisible: Boolean
140+ NumberVisible: Boolean;
141+ var vSortIndex: Integer;
142+ var vSortOrder: Boolean
145143 ): Integer;
146144 var
147145 TitleColumn : TListColumn;
@@ -181,13 +179,12 @@ begin
181179 GikoForm.FolderImage.Picture := nil;
182180 GikoForm.ItemIcon16.GetBitmap(1, GikoForm.FolderImage.Picture.Bitmap);
183181
182+ vSortIndex := GikoSys.Setting.BBSSortIndex;
183+ vSortOrder := GikoSys.Setting.BBSSortOrder;
184184 for i := ListView.Columns.Count - 1 downto 0 do begin
185- if (GikoSys.Setting.BBSSortIndex
186- = Integer(GikoSys.Setting.BBSColumnOrder[ ListView.Column[ i ].Tag ])) then begin
187- ListViewSort( nil, ListView, ListView.Column[ i ],
188- NumberVisible, GikoSys.Setting.BBSSortOrder);
189- Break;
190- end;
185+ idx := ListView.Column[ i ].Tag;
186+ if vSortIndex = Ord( GikoSys.Setting.BBSColumnOrder[ idx ] ) then
187+ ListViewSort( nil, ListView, ListView.Column[ i ], NumberVisible, vSortOrder, vSortIndex );
191188 end;
192189
193190 Result := ABBS2ch.Count;
@@ -201,10 +198,11 @@ class procedure TListViewUtils.ListViewSort(
201198 ListView: TListView;
202199 Column: TListColumn;
203200 NumberVisible: Boolean;
204- vSortOrder: Boolean
201+ var vSortOrder: Boolean;
202+ var vSortIndex: Integer
205203 );
206204 var
207- i, idx : Integer;
205+ i, id, idx : Integer;
208206 orderList : TList;
209207 wkBBS: TBBS;
210208 wkCategory: TCategory;
@@ -215,41 +213,53 @@ begin
215213 for i := 0 to ListView.Columns.Count - 1 do begin
216214 ListView.Column[i].ImageIndex := -1;
217215 end;
218- if vSortOrder then
216+
217+ if SortOrder then
219218 ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT1
220219 else
221220 ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT2;
222221
223-
224222 Sort.SortNoFlag := NumberVisible;
225223
224+ //if TObject(TreeView.Selected.Data) is TBBS then begin
226225 if TObject( GikoForm.ActiveList ) is TBBS then begin
226+ //wkBBS := TBBS(TreeView.Selected.Data);
227227 wkBBS := TBBS( GikoForm.ActiveList );
228228 orderList := GikoSys.Setting.BBSColumnOrder;
229+ id := Integer( orderList[ idx ] );
229230 Sort.SortOrder := vSortOrder;
230- Sort.SortIndex := Integer( orderList[ idx ] );
231- GikoSys.Setting.BBSSortIndex := Sort.SortIndex;
232- GikoSys.Setting.BBSSortOrder := Sort.SortOrder;
231+ Sort.SortIndex := id;
232+ GikoSys.Setting.BBSSortIndex := id;
233+ GikoSys.Setting.BBSSortOrder := vSortOrder;
233234 wkBBS.Sort(Sort.CategorySortProc);
235+ //end else if TObject(TreeView.Selected.Data) is TCategory then begin
234236 end else if TObject( GikoForm.ActiveList ) is TCategory then begin
237+ //wkCategory := TCategory(TreeView.Selected.Data);
235238 wkCategory := TCategory( GikoForm.ActiveList );
236239 orderList := GikoSys.Setting.CategoryColumnOrder;
240+ id := Integer( orderList[ idx ] );
237241 Sort.SortOrder := vSortOrder;
238- Sort.SortIndex := Integer( orderList[ idx ] );
239- GikoSys.Setting.CategorySortIndex := Sort.SortIndex;
240- GikoSys.Setting.CategorySortOrder := Sort.SortOrder;
242+ Sort.SortIndex := id;
243+ GikoSys.Setting.CategorySortIndex := id;
244+ GikoSys.Setting.CategorySortOrder := vSortOrder;
241245 wkCategory.CustomSort(BoardSortProc);
246+ //end else if TObject(TreeView.Selected.Data) is TBoard then begin
242247 end else if TObject( GikoForm.ActiveList ) is TBoard then begin
248+ //wkBoard := TBoard(TreeView.Selected.Data);
243249 wkBoard := TBoard( GikoForm.ActiveList );
244250 orderList := GikoSys.Setting.BoardColumnOrder;
251+ id := Integer( orderList[ idx ] );
245252 Sort.SortOrder := vSortOrder;
246- Sort.SortIndex := Integer( orderList[ idx ] );
247- GikoSys.Setting.BoardSortIndex := Sort.SortIndex;
248- GikoSys.Setting.BoardSortOrder := Sort.SortOrder;
253+ Sort.SortIndex := id;
254+ GikoSys.Setting.BoardSortIndex := id;
255+ GikoSys.Setting.BoardSortOrder := vSortOrder;
249256 wkBoard.CustomSort(ThreadItemSortProc);
257+ end else begin
258+ id := 0;
250259 end;
251260
252261 ListView.Refresh;
262+ vSortIndex := id;
253263 end;
254264
255265 {!
@@ -259,16 +269,49 @@ Delphi 6 Personal
259269 ³‚µ‚¢ƒJƒ‰ƒ€‚ª“n‚³‚ê‚È‚¢‚½‚߁A³‚µ‚¢ƒJƒ‰ƒ€‚É•ÏŠ·‚µ‚Ü‚·B
260270 }
261271 class function TListViewUtils.ActiveListTrueColumn( column : TListColumn ) : TListColumn;
272+{*
273+var
274+ i, idx : Integer;
275+ orderList : TList;
276+*}
262277 begin
278+
263279 // ³‚µ‚­•ÏŠ·‚·‚é•û–@‚ª•ª‚©‚ç‚È‚¢‚Ì‚Å•Û—¯
264280 Result := column;
265281 Exit;
282+{*
283+ Result := column;
284+
285+ if TObject( FActiveList ) is TBBS then
286+ orderList := GikoSys.Setting.BBSColumnOrder
287+ else if TObject( FActiveList ) is TCategory then
288+ orderList := GikoSys.Setting.CategoryColumnOrder
289+ else if TObject( FActiveList ) is TBoard then
290+ orderList := GikoSys.Setting.BoardColumnOrder
291+ else
292+ Exit;
293+
294+ idx := column.Tag;
295+
296+ for i := 0 to ListView.Columns.Count - 1 do begin
297+ if Integer( orderList[ ListView.Column[ i ].Tag ] ) = 0 then begin
298+ if idx = 0 then
299+ Result := ListView.Column[ i ]
300+ else if idx <= i then
301+ Result := ListView.Column[ idx - 1 ];
302+ Exit;
303+ end;
304+ end;
305+*}
306+
266307 end;
267308 //ListView‚ÉBoardItem‚ðÝ’è‚·‚é
268309 class function TListViewUtils.SetBoardListItem(
269310 Category: TCategory;
270311 ListView: TListView;
271- NumberVisible: Boolean
312+ NumberVisible: Boolean;
313+ var vSortIndex: Integer;
314+ var vSortOrder: Boolean
272315 ): Integer;
273316 var
274317 TitleColumn : TListColumn;
@@ -323,13 +366,12 @@ begin
323366 GikoForm.FolderImage.Picture := nil;
324367 GikoForm.ItemIcon16.GetBitmap(3, GikoForm.FolderImage.Picture.Bitmap);
325368
369+ vSortIndex := GikoSys.Setting.CategorySortIndex;
370+ vSortOrder := GikoSys.Setting.CategorySortOrder;
326371 for i := ListView.Columns.Count - 1 downto 0 do begin
327- if (GikoSys.Setting.CategorySortIndex =
328- Integer( GikoSys.Setting.CategoryColumnOrder[ ListView.Columns[i].Tag ] )) then begin
329- ListViewSort( nil, ListView, ListView.Column[ i ],
330- NumberVisible, GikoSys.Setting.CategorySortOrder);
331- Break;
332- end;
372+ idx := ListView.Column[ i ].Tag;
373+ if vSortIndex = Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] ) then
374+ ListViewSort( nil, ListView, ListView.Column[ i ], NumberVisible, vSortOrder, vSortIndex );
333375 end;
334376
335377 Result := Category.Count;
@@ -341,7 +383,9 @@ end;
341383 class function TListViewUtils.SetThreadListItem(
342384 Board: TBoard;
343385 ListView: TListView;
344- NumberVisible: Boolean
386+ NumberVisible: Boolean;
387+ var vSortIndex: Integer;
388+ var vSortOrder: Boolean
345389 ): Integer;
346390 var
347391 TitleColumn : TListColumn;
@@ -416,13 +460,12 @@ begin
416460 GikoForm.FolderImage.Picture := nil;
417461 GikoForm.ItemIcon16.GetBitmap(5, GikoForm.FolderImage.Picture.Bitmap);
418462
463+ vSortIndex := GikoSys.Setting.BoardSortIndex;
464+ vSortOrder := GikoSys.Setting.BoardSortOrder;
419465 for i := ListView.Columns.Count - 1 downto 0 do begin
420- if (GikoSys.Setting.BoardSortIndex
421- = Integer( GikoSys.Setting.BoardColumnOrder[ ListView.Columns[ i ].Tag ] )) then begin
422- ListViewSort( nil, ListView, ListView.Column[ i ],
423- NumberVisible, GikoSys.Setting.BoardSortOrder);
424- Break;
425- end;
466+ idx := ListView.Column[ i ].Tag;
467+ if vSortIndex = Ord( GikoSys.Setting.BoardColumnOrder[ idx ] ) then
468+ ListViewSort( nil, ListView, ListView.Column[ i ], NumberVisible, vSortOrder, vSortIndex );
426469 end;
427470
428471 Result := Board.Count;
@@ -433,268 +476,285 @@ end;
433476
434477 class procedure TListViewUtils.ListViewData(Sender: TObject; Item: TListItem);
435478 var
436- ActivListObj : TObject;
479+// FileName: string;
480+// DateTime: TDateTime;
481+ BoardCnt: Integer;
482+ BBS: TBBS;
483+ Category: TCategory;
484+ Board: TBoard;
485+ ThreadItem: TThreadItem;
486+ RepStr: string;
487+ ActivListObj : TObject;
488+ i, idx : Integer;
437489 ListView : TListView;
438490 begin
439491 if (Sender <> nil) and (Sender is TListView) then begin
440- ListView := TListView(Sender);
441- ActivListObj := GikoForm.ActiveList;
442- if ActivListObj is TBBS then begin
443- DrawCategoryItem(TBBS(ActivListObj), Item, ListView);
444- end else if ActivListObj is TCategory then begin
445- DrawBoardItem(TCategory(ActivListObj), Item, ListView);
446- end else if ActivListObj is TBoard then begin
447- DrawThreadItem(TBoard(ActivListObj), Item, ListView);
448- end;
492+ ListView := TListView(Sender)
493+ end else begin
494+ Exit;
449495 end;
450-end;
451-//! ƒŠƒXƒgƒrƒ…[‚̃AƒCƒeƒ€‚ð•`‰æ‚·‚éiƒJƒeƒSƒŠ[—pj
452-class procedure TListViewUtils.DrawCategoryItem(
453- BBS: TBBS; Item: TListItem; ListView: TListView
454-);
455-var
456- Category : TCategory;
457-begin
458496
459- //===== ƒJƒeƒSƒŠƒŠƒXƒg =====
460- ListView.StateImages := nil;
497+ ActivListObj := GikoForm.ActiveList;
498+ if ActivListObj is TBBS then begin
499+ //===== ƒJƒeƒSƒŠƒŠƒXƒg =====
500+ BBS := TBBS(ActivListObj);
461501
462- if (BBS = nil) or (BBS.Count <= 0) or (Item = nil)
463- or (Item.Index >= BBS.Count) or (ListView.Items.Count = 0)
464- or (not (BBS.Items[Item.index] is TCategory)) then Exit;
502+ GikoForm.ListView.StateImages := nil;
465503
466- Category := TCategory(BBS.Items[Item.index]);
504+ if (BBS = nil) or (BBS.Count <= 0) or (Item = nil)
505+ or (Item.Index >= BBS.Count) or (ListView.Items.Count = 0)
506+ or (not (BBS.Items[Item.index] is TCategory)) then Exit;
507+ //if BBS.Count <= 0 then Exit;
508+ //if Item = nil then Exit;
509+ //if Item.Index >= BBS.Count then Exit;
510+ //if ListView.Items.Count = 0 then Exit;
467511
468- if (Category = nil) then Exit;
512+ //if not (BBS.Items[Item.index] is TCategory) then Exit;
513+ Category := TCategory(BBS.Items[Item.index]);
469514
470- if GikoDM.ListNumberVisibleAction.Checked then
471- Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
472- else
473- Item.Caption := Category.Title;
515+ if Category = nil then Exit;
474516
475- Item.ImageIndex := ITEM_ICON_CATEGORY1;
476- Item.Data := Category;
477-end;
478-//! ƒŠƒXƒgƒrƒ…[‚̃AƒCƒeƒ€‚ð•`‰æ‚·‚éi”—pj
479-class procedure TListViewUtils.DrawBoardItem(
480- Category: TCategory; Item: TListItem; ListView: TListView
481-);
482-var
483- Board: TBoard;
484- i, idx : Integer;
485-begin
486- //===== ”ƒŠƒXƒg =====
487- ListView.StateImages := nil;
517+ if GikoDM.ListNumberVisibleAction.Checked then
518+ Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
519+ else
520+ Item.Caption := Category.Title;
488521
489- if (Category = nil) or (Category.Count <= 0) or (Item = nil)
490- or (Item.Index >= Category.Count) or (ListView.Items.Count = 0)
491- or (not (Category.Items[Item.Index] is TBoard)) then Exit;
522+ Item.ImageIndex := ITEM_ICON_CATEGORY1;
523+ Item.Data := Category;
492524
493- Board := TBoard(Category.Items[Item.Index]);
525+ end else if ActivListObj is TCategory then begin
494526
495- if (Board = nil) then Exit;
527+ //===== ”ƒŠƒXƒg =====
528+ Category := TCategory(ActivListObj);
496529
497- if GikoDM.ListNumberVisibleAction.Checked then
498- Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
499- else
500- Item.Caption := Board.Title;
530+ ListView.StateImages := nil;
501531
502- if Item.SubItems.Count <> ListView.Columns.Count then begin
503- Item.SubItems.Clear;
504- Item.SubItems.Capacity := GikoSys.Setting.CategoryColumnOrder.Count;
505- for i := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 1 do
506- Item.SubItems.Add('');
507- end;
532+ if (Category = nil) or (Category.Count <= 0) or (Item = nil)
533+ or (Item.Index >= Category.Count) or (ListView.Items.Count = 0)
534+ or (not (Category.Items[Item.Index] is TBoard)) then Exit;
535+ //if Category.Count <= 0 then Exit;
536+ //if Item = nil then Exit;
537+ //if Item.Index >= Category.Count then Exit;
538+ //if ListView.Items.Count = 0 then Exit;
508539
509- Item.ImageIndex := ITEM_ICON_BOARD1;
510- idx := 0;
511- for i := 0 to ListView.Columns.Count - 1 do begin
512- if GikoSys.Setting.CategoryColumnOrder.Count <= i then
513- Break;
514- case GikoSys.Setting.CategoryColumnOrder[ i ] of
515- gccTitle:
516- // Item.Caption ‚Í SubItems ‚ÉŠÜ‚Ü‚ê–³‚¢‚Ì‚Å
517- Dec( idx );
518-
519- gccRoundName:
520- if Board.Round then
521- Item.SubItems[ idx ] := Board.RoundName // '—\–ñ'
522- else
523- Item.SubItems[ idx ] := '';
540+ //if not (Category.Items[Item.Index] is TBoard) then Exit;
541+ Board := TBoard(Category.Items[Item.Index]);
524542
525- gccLastModified:
526- if Board.RoundDate = ZERO_DATE then begin
527- Item.SubItems[ idx ] := '';
528- end else
529- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
530- end;
531- Inc( idx );
532- end;
543+ if Board = nil then Exit;
533544
534- Item.Data := Board;
545+ if GikoDM.ListNumberVisibleAction.Checked then
546+ Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
547+ //Item.Caption := IntToStr(Item.Index + 1) + ': ' + Board.Title
548+ else
549+ Item.Caption := Board.Title;
535550
536-end;
537-//! ƒŠƒXƒgƒrƒ…[‚̃AƒCƒeƒ€‚ð•`‰æ‚·‚éiƒXƒŒƒbƒh—pj
538-class procedure TListViewUtils.DrawThreadItem(
539- Board: TBoard; Item: TListItem;ListView : TListView
540-);
541-var
542- ThreadItem: TThreadItem;
543- BoardCnt: Integer;
544- RepStr: String;
545- i: Integer;
546-begin
547- //===== ƒXƒŒƒŠƒXƒg =====
548- if GikoSys.Setting.ListIconVisible then
549- ListView.StateImages := GikoForm.StateIconImageList
550- else
551- ListView.StateImages := nil;
551+ if Item.SubItems.Count <> ListView.Columns.Count then begin
552+ Item.SubItems.Clear;
553+ Item.SubItems.Capacity := GikoSys.Setting.CategoryColumnOrder.Count;
554+ for i := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 1 do
555+ Item.SubItems.Add('');
556+ end;
552557
558+ Item.ImageIndex := ITEM_ICON_BOARD1;
559+ idx := 0;
560+ for i := 0 to ListView.Columns.Count - 1 do begin
561+ if GikoSys.Setting.CategoryColumnOrder.Count <= i then
562+ Break;
563+// case TGikoCategoryColumnID( ListView.Column[ i ].Tag ) of
564+ case GikoSys.Setting.CategoryColumnOrder[ i ] of
565+ gccTitle:
566+ // Item.Caption ‚Í SubItems ‚ÉŠÜ‚Ü‚ê–³‚¢‚Ì‚Å
567+ Dec( idx );
568+
569+ gccRoundName:
570+ if Board.Round then
571+ Item.SubItems[ idx ] := Board.RoundName // '—\–ñ'
572+ else
573+ Item.SubItems[ idx ] := '';
574+
575+ gccLastModified:
576+ if Board.RoundDate = ZERO_DATE then begin
577+ Item.SubItems[ idx ] := '';
578+ end else
579+ Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
580+ end;
581+ Inc( idx );
582+ end;
553583
554- case GikoForm.ViewType of
555- gvtAll: BoardCnt := Board.Count;
556- gvtLog: BoardCnt := Board.LogThreadCount;
557- gvtNew: BoardCnt := Board.NewThreadCount;
558- gvtUser: BoardCnt := Board.UserThreadCount;
559- else
560- BoardCnt := 0;
561- end;
584+ Item.Data := Board;
562585
563- if (BoardCnt <= 0) or (Item = nil) or (Item.Index > BoardCnt)
564- or (ListView.Items.Count = 0) or (not (Board.Items[Item.Index] is TThreadItem)) then Exit;
565-
566- //‰ü‘P‚·‚ׂ«ƒuƒƒbƒN/////////////////////////////////////////////////////
567- ThreadItem := nil;
568- case GikoForm.ViewType of
569- gvtAll: if Item.Index >= Board.Count then Exit else
570- ThreadItem := TThreadItem(Board.Items[Item.Index]);
571- gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
572- gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
573- gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
574- end;
575- //////////////////////////////////////////////////////////////////////////
576-
577- if (ThreadItem = nil) then Exit;
578-
579- RepStr := CustomStringReplace(ThreadItem.Title, '&lt;', '<' );
580- RepStr := CustomStringReplace(RepStr, '&gt;', '>' );
581- RepStr := CustomStringReplace(RepStr, '&quot;', '"' );
582- RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
583- //RepStr := StringReplace(RepStr, '—M', ',', [rfReplaceAll]);
584- if Item.SubItems.Count <> ListView.Columns.Count then begin
585- Item.SubItems.Clear;
586- Item.SubItems.Capacity := GikoSys.Setting.BoardColumnOrder.Count;
587- for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do
588- Item.SubItems.Add('');
589- end;
586+ end else if ActivListObj is TBoard then begin
590587
591- if GikoDM.ListNumberVisibleAction.Checked then
592- Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
593- else
594- Item.Caption := RepStr;
588+ //===== ƒXƒŒƒŠƒXƒg =====
589+ Board := TBoard(ActivListObj);
595590
596- case ThreadItem.AgeSage of
597- gasNone: Item.StateIndex := -1;
598- gasNew: Item.StateIndex := 0;
599- gasAge: Item.StateIndex := 1;
600- gasSage: Item.StateIndex := 2;
601- end;
591+ if GikoSys.Setting.ListIconVisible then
592+ ListView.StateImages := GikoForm.StateIconImageList
593+ else
594+ ListView.StateImages := nil;
602595
603- if ThreadItem.IsLogFile then begin
604- DrawItemLogThread(ThreadItem, Item, ListView.Columns.Count);
605- end else begin
606- DrawItemNoLogThread(ThreadItem, Item, GikoSys.Setting.BoardColumnOrder.Count);
607- end;
608596
609- Item.Data := ThreadItem;
610-end;
611-//! ƒƒO—L‚èƒXƒŒƒbƒh‚ð•`‰æ‚·‚é
612-class procedure TListViewUtils.DrawItemLogThread(Thread: TThreadItem; Item: TListItem; ColumnCount: Integer);
613-var
614- i, idx : Integer;
615-begin
616- idx := 0;
617- for i := 0 to ColumnCount - 1 do begin
618- if GikoSys.Setting.BoardColumnOrder.Count <= i then
619- Break;
620-
621- case GikoSys.Setting.BoardColumnOrder[ i ] of
622- gbcTitle:
623- // Item.Caption ‚Í SubItems ‚ÉŠÜ‚Ü‚ê–³‚¢‚Ì‚Å
624- Dec( idx );
625- gbcAllCount:
626- Item.SubItems[ idx ] := IntToStr(Thread.AllResCount);
627- gbcLocalCount:
628- Item.SubItems[ idx ] := IntToStr(Thread.Count);
629- gbcNonAcqCount:
630- Item.SubItems[ idx ] := IntToStr(Thread.AllResCount - Thread.Count);
631- gbcNewCount:
632- if Thread.NewResCount = 0 then
633- Item.SubItems[ idx ] := ''
597+ case GikoForm.ViewType of
598+ gvtAll: BoardCnt := Board.Count;
599+ gvtLog: BoardCnt := Board.LogThreadCount;
600+ gvtNew: BoardCnt := Board.NewThreadCount;
601+ gvtUser: BoardCnt := Board.UserThreadCount;
634602 else
635- Item.SubItems[ idx ] := IntToStr(Thread.NewResCount);
636- gbcUnReadCount:
637- Item.SubItems[ idx ] := '';
638- gbcRoundName:
639- if Thread.Round then
640- Item.SubItems[ idx ] := Thread.RoundName
603+ BoardCnt := 0;
604+ end;
605+ {
606+ case GikoForm.ViewType of
607+ gvtAll: BoardCnt := Board.Count;
608+ gvtLog: BoardCnt := Board.GetLogThreadCount;
609+ gvtNew: BoardCnt := Board.GetNewThreadCount;
610+ gvtUser: BoardCnt := Board.GetUserThreadCount;
641611 else
642- Item.SubItems[ idx ] := '';
643- gbcRoundDate://gbcLastModified:
644- if (Thread.RoundDate = ZERO_DATE) then begin
645- Item.SubItems[ idx ] := '';
646- end else
647- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Thread.RoundDate);
648- gbcCreated:
649- if Thread.CreateDate = ZERO_DATE then begin
650- Item.SubItems[ idx ] := '';
651- end else
652- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Thread.CreateDate);
653- gbcLastModified:
654- if (Thread.LastModified = ZERO_DATE) then begin
655- Item.SubItems[ idx ] := '';
656- end else
657- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Thread.LastModified);
612+ BoardCnt := 0;
658613 end;
659- Inc( idx );
660- end;
614+ }
615+// if Board = nil then Exit;
616+ if (BoardCnt <= 0) or (Item = nil) or (Item.Index > BoardCnt)
617+ or (ListView.Items.Count = 0) or (not (Board.Items[Item.Index] is TThreadItem)) then Exit;
661618
662- if Thread.NewArrival then
663- Item.ImageIndex := ITEM_ICON_THREADNEW1
664- else
665- Item.ImageIndex := ITEM_ICON_THREADLOG1;
666-end;
667-//! ƒƒO‚È‚µƒXƒŒƒbƒh‚ð•`‰æ‚·‚é
668-class procedure TListViewUtils.DrawItemNoLogThread(Thread: TThreadItem; Item: TListItem; ColumnCount: Integer);
669-var
670- i, idx: Integer;
671-begin
672- idx := 0;
673- for i := 0 to ColumnCount - 1do begin
674- case GikoSys.Setting.BoardColumnOrder[ i ] of
675- gbcTitle:
676- // Item.Caption ‚Í SubItems ‚ÉŠÜ‚Ü‚ê–³‚¢‚Ì‚Å
677- Dec( idx );
678- gbcAllCount:
679- Item.SubItems[ idx ] := IntToStr(Thread.AllResCount);
680- gbcRoundDate://gbcLastModified:
681- Item.SubItems[ idx ] := '';
682- gbcCreated:
683- if Thread.CreateDate = ZERO_DATE then begin
684- Item.SubItems[ idx ] := '';
685- end else
686- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Thread.CreateDate);
687- gbcLastModified:
688- Item.SubItems[ idx ] := '';
619+ //‰ü‘P‚·‚ׂ«ƒuƒƒbƒN/////////////////////////////////////////////////////
620+ ThreadItem := nil;
621+ case GikoForm.ViewType of
622+ gvtAll: if Item.Index >= Board.Count then Exit else
623+ ThreadItem := TThreadItem(Board.Items[Item.Index]);
624+ gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
625+ gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
626+ gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
627+ end;
628+ //////////////////////////////////////////////////////////////////////////
629+
630+ if ThreadItem = nil then Exit;
631+
632+ RepStr := CustomStringReplace(ThreadItem.Title, '&lt;', '<' );
633+ RepStr := CustomStringReplace(RepStr, '&gt;', '>' );
634+ RepStr := CustomStringReplace(RepStr, '&quot;', '"' );
635+ RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
636+ //RepStr := StringReplace(RepStr, '—M', ',', [rfReplaceAll]);
637+ if Item.SubItems.Count <> ListView.Columns.Count then begin
638+ Item.SubItems.Clear;
639+ Item.SubItems.Capacity := GikoSys.Setting.BoardColumnOrder.Count;
640+ for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do
641+ Item.SubItems.Add('');
642+ end;
643+
644+ if GikoDM.ListNumberVisibleAction.Checked then
645+ Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
689646 else
690- Item.SubItems[ idx ] := '';
647+ Item.Caption := RepStr;
648+
649+ case ThreadItem.AgeSage of
650+ gasNone: Item.StateIndex := -1;
651+ gasNew: Item.StateIndex := 0;
652+ gasAge: Item.StateIndex := 1;
653+ gasSage: Item.StateIndex := 2;
654+ end;
655+
656+ if ThreadItem.IsLogFile then begin
657+ idx := 0;
658+ for i := 0 to ListView.Columns.Count - 1 do begin
659+ if GikoSys.Setting.BoardColumnOrder.Count <= i then
660+ Break;
661+// case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
662+ case GikoSys.Setting.BoardColumnOrder[ i ] of
663+ gbcTitle:
664+ // Item.Caption ‚Í SubItems ‚ÉŠÜ‚Ü‚ê–³‚¢‚Ì‚Å
665+ Dec( idx );
666+
667+ gbcAllCount:
668+ Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
669+
670+ gbcLocalCount:
671+ Item.SubItems[ idx ] := IntToStr(ThreadItem.Count);
672+
673+ gbcNonAcqCount:
674+ Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count);
675+
676+ gbcNewCount:
677+ if ThreadItem.NewResCount = 0 then
678+ Item.SubItems[ idx ] := ''
679+ else
680+ Item.SubItems[ idx ] := IntToStr(ThreadItem.NewResCount);
681+
682+ gbcUnReadCount:
683+ Item.SubItems[ idx ] := '';
684+
685+ gbcRoundName:
686+ if ThreadItem.Round then
687+ Item.SubItems[ idx ] := ThreadItem.RoundName
688+ else
689+ Item.SubItems[ idx ] := '';
690+
691+ gbcRoundDate://gbcLastModified:
692+ if (ThreadItem.RoundDate = ZERO_DATE) then begin
693+ Item.SubItems[ idx ] := '';
694+ end else
695+ Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
696+
697+ gbcCreated:
698+ if ThreadItem.CreateDate = ZERO_DATE then begin
699+ Item.SubItems[ idx ] := '';
700+ end else
701+ Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
702+
703+ gbcLastModified:
704+ if (ThreadItem.LastModified = ZERO_DATE) then begin
705+ Item.SubItems[ idx ] := '';
706+ end else
707+ Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.LastModified);
708+
709+
710+ end;
711+ Inc( idx );
712+ end;
713+
714+ if ThreadItem.NewArrival then
715+ Item.ImageIndex := ITEM_ICON_THREADNEW1
716+ else
717+ Item.ImageIndex := ITEM_ICON_THREADLOG1;
718+
719+
720+ end else begin
721+ idx := 0;
722+ for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
723+// case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
724+ case GikoSys.Setting.BoardColumnOrder[ i ] of
725+ gbcTitle:
726+ // Item.Caption ‚Í SubItems ‚ÉŠÜ‚Ü‚ê–³‚¢‚Ì‚Å
727+ Dec( idx );
728+
729+ gbcAllCount:
730+ Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
731+
732+ gbcRoundDate://gbcLastModified:
733+ Item.SubItems[ idx ] := '';
734+
735+ gbcCreated:
736+ if ThreadItem.CreateDate = ZERO_DATE then begin
737+ Item.SubItems[ idx ] := '';
738+ end else
739+ Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
740+
741+ gbcLastModified:
742+ Item.SubItems[ idx ] := '';
743+
744+ else
745+ Item.SubItems[ idx ] := '';
746+ end;
747+ Inc( idx );
748+ end;
749+ if ThreadItem.NewArrival then
750+ Item.ImageIndex := ITEM_ICON_THREADNEW1
751+ else
752+ Item.ImageIndex := ITEM_ICON_THREAD1;
691753 end;
692- Inc( idx );
754+
755+ Item.Data := ThreadItem;
756+
693757 end;
694- if Thread.NewArrival then
695- Item.ImageIndex := ITEM_ICON_THREADNEW1
696- else
697- Item.ImageIndex := ITEM_ICON_THREAD1;
698758 end;
699759
700760 end.
--- a/MojuUtils.pas
+++ b/MojuUtils.pas
@@ -14,23 +14,24 @@ unit MojuUtils;
1414 interface
1515
1616 uses
17- Windows, Classes, SysUtils;
17+ Windows, Classes, SysUtils, GikoSystem;
1818
1919 function StrPosEx(StrStart, StrEnd, SubstrStart, SubstrEnd: PChar): PChar;
2020 function AnsiStrPosEx(StrStart, StrEnd, SubstrStart, SubstrEnd: PChar): PChar;
21- function ReplaceString(const S: String; const OldPattern: String; const NewPattern: string): String;
22- function IgnoCaseReplaceString(const S: String; const OldPattern:String; const NewPattern: string): String;
21+ function ReplaceString(const S: String; const OldPattern: String; const NewPattern: string): string;
22+ function IgnoCaseReplaceString(const S: String; const OldPattern:String; const NewPattern: string): string;
2323
2424 function CustomStringReplace(const S: String; const OldPattern: String; const NewPattern: string; IgnoreCase : Boolean = False): String; overload;
2525 procedure CustomStringReplace(var S : TStringList;const OldPattern: String;const NewPattern: string; IgnoreCase : Boolean = False); overload;
2626
2727 function ZenToHan(const s: string): string;
28- function VaguePos(const Substr: String; const S: string): Integer;
28+ function VaguePos(const Substr, S: string): Integer;
2929
3030 function ReplaseNoValidateChar( inVal : String): String;
3131 function IsNoValidID( inID :String): Boolean;
3232 //<font>ƒ^ƒO‚ð‘S‚č폜‚·‚é
33- function DeleteFontTag( inSource : string) : string;
33+ function DeleteFontTag( inSource : string) : string;
34+ procedure DivideStrLine(Line: string; PRes: PResRec);
3435 function RemoveToken(var s: string;const delimiter: string): string;
3536
3637 implementation
@@ -110,33 +111,32 @@ begin
110111 Result := nil;
111112 end;
112113
114+{$R-}
113115 //‚‘¬•¶Žš—ñ’uŠ·ŠÖ”i‘啶Žš¬•¶Žš‚̈Ⴂ‚𖳎‹‚µ‚È‚¢j
114-function ReplaceString(const S: String; const OldPattern: String; const NewPattern: string): String;
116+function ReplaceString(const S: String; const OldPattern: String; const NewPattern: string): string;
115117 var
116- ReplaceCount: Integer;
117- DestIndex: Integer;
118- i, l: Integer;
119- p, e, ps, pe: PChar;
120- Count: Integer;
121- olen: Integer;
118+ ReplaceCount: Integer;
119+ DestIndex: Integer;
120+ i, l: Integer;
121+ p, e, ps, pe: PChar;
122+ Count: Integer;
122123 begin
123124 Result := S;
124- olen := Length(OldPattern);
125- if olen = 0 then Exit;
125+ if OldPattern = '' then Exit;
126126 p := PChar(S);
127127 e := p + Length(S);
128128 ps := PChar(OldPattern);
129- pe := ps + olen;
129+ pe := ps + Length(OldPattern);
130130 ReplaceCount := 0;
131131 while p < e do begin
132132 p := AnsiStrPosEx(p, e, ps, pe);
133133 if p = nil then Break;
134134 Inc(ReplaceCount);
135- Inc(p, olen);
135+ Inc(p, Length(OldPattern));
136136 end;
137137 if ReplaceCount = 0 then Exit;
138138 SetString(Result, nil, Length(S) +
139- (Length(NewPattern) - olen) * ReplaceCount);
139+ (Length(NewPattern) - Length(OldPattern)) * ReplaceCount);
140140 p := PChar(S);
141141 DestIndex := 1;
142142 l := Length( NewPattern );
@@ -146,13 +146,13 @@ begin
146146 Inc(p, Count);//p := pp;
147147 Inc(DestIndex, Count);
148148 Move(NewPattern[1], Result[DestIndex], l);
149- Inc(p, olen);
149+ Inc(p, Length(OldPattern));
150150 Inc(DestIndex, l);
151- end;
152- Move(p^, Result[DestIndex], e - p);
151+ end;
152+ Move(p^, Result[DestIndex], e - p);
153153 end;
154154 //‚‘¬•¶Žš—ñ’uŠ·ŠÖ”i‘啶Žš¬•¶Žš‚̈Ⴂ‚𖳎‹‚·‚éj
155-function IgnoCaseReplaceString(const S: String;const OldPattern:String;const NewPattern: string): String;
155+function IgnoCaseReplaceString(const S: String;const OldPattern:String;const NewPattern: string): string;
156156 var
157157 ReplaceCount: Integer;
158158 DestIndex: Integer;
@@ -203,6 +203,10 @@ begin
203203 end;
204204 Move(p^, Result[DestIndex], e - p);
205205 end;
206+{$IFDEF DEBUG}
207+{$R+}
208+{$ENDIF}
209+
206210 //‚‘¬•¶Žš—ñ’uŠ·ŠÖ”i”Ä—p”Å‚Pj
207211 function CustomStringReplace(
208212 const S :String;
@@ -211,6 +215,7 @@ function CustomStringReplace(
211215 IgnoreCase : Boolean
212216 ): String;
213217 begin
218+ Result := '';
214219 if not IgnoreCase then begin
215220 Result := ReplaceString(S,OldPattern,NewPattern);
216221 end else begin
@@ -265,7 +270,7 @@ end;
265270 (*************************************************************************
266271 * ‘SŠp”¼Šp‚Ђ炪‚È‚©‚½‚©‚È‚ð‹æ•Ê‚µ‚È‚¢¦‚¢Pos
267272 *************************************************************************)
268-function VaguePos(const Substr:String; const S: string): Integer;
273+function VaguePos(const Substr, S: string): Integer;
269274 begin
270275 Result := AnsiPos(ZenToHan(Substr), ZenToHan(S));
271276 end;
@@ -331,6 +336,47 @@ begin
331336 end;
332337 // *************************************************************************
333338
339+{!
340+\brief datƒtƒ@ƒCƒ‹‚̈ꃉƒCƒ“‚𕪉ð
341+\param Line datƒtƒ@ƒCƒ‹‚ð\¬‚·‚é 1 s
342+\return ƒŒƒXî•ñ
343+}
344+procedure DivideStrLine(Line: string; PRes: PResRec);
345+const
346+ delimiter = '<>';
347+var
348+ pds, pde : PChar;
349+ pss, pse : PChar;
350+ ppos : PChar;
351+begin
352+ //΁Տ
353+ PRes.FType := glt2chNew;
354+
355+ pss := PChar(Line);
356+ pse := pss + Length(Line);
357+ pds := PChar(delimiter);
358+ pde := pds + Length(delimiter);
359+
360+ ppos := AnsiStrPosEx(pss, pse, pds, pde);
361+ if (ppos = nil) then begin
362+ Line := CustomStringReplace(Line, '<>', '&lt;&gt;');
363+ Line := CustomStringReplace(Line, ',', '<>');
364+ Line := CustomStringReplace(Line, '—M', ',');
365+ end;
366+ //Trim‚µ‚Ä‚Í‚¢‚¯‚È‚¢‹C‚ª‚·‚é@by‚à‚¶‚ã
367+ PRes.FName := RemoveToken(Line, delimiter);
368+ PRes.FMailTo := RemoveToken(Line, delimiter);
369+ PRes.FDateTime := RemoveToken(Line, delimiter);
370+ PRes.FBody := RemoveToken(Line, delimiter);
371+ //‚Q‚¿‚á‚ñ‚Ë‚é‚Æ‚©‚¾‚ƁA–{•¶‚̐擪‚É‚P‚”¼Šp‹ó”’‚ª“ü‚Á‚Ä‚¢‚é‚̂ō폜‚·‚é
372+ //‘¼‚ÌŒfŽ¦”‚ŁAƒŒƒXŽ©‘Ì‚Ì‹ó”’‚©‚à‚µ‚ê‚È‚¢‚¯‚Ç‚»‚ê‚Í’ú‚ß‚é
373+ PRes.FBody := TrimLeft(PRes.FBody);
374+ //‹ó‚¾‚Æ–â‘肪‹N‚«‚é‚©‚çA‹ó”’‚ðÝ’è‚·‚é
375+ if PRes.FBody = '' then
376+ PRes.FBody := '&nbsp;';
377+
378+ PRes.FTitle := RemoveToken(Line, delimiter);
379+end;
334380
335381 (*************************************************************************
336382 *
--- a/NewBoard.pas
+++ b/NewBoard.pas
@@ -36,9 +36,8 @@ type
3636 { Private éŒ¾ }
3737 IgnoreLists : TStringList;
3838 FAbort: Boolean;
39- function BoardDownload(const URL: String): TNewBoardItem;
40- function BoardLoardFromFile(const FilePath: String): String;
41- function UpdateURL(s: string): boolean;
39+ function BoardDownload: TNewBoardItem;
40+ procedure UpdateURL(s: string);
4241 procedure SetIgnoreCategory(b: boolean);
4342 procedure EditIgnoreList(Sender: TObject);
4443 procedure UpdateIgnoreList(Sender: TObject);
@@ -59,24 +58,15 @@ uses Giko, IdHeaderList, MojuUtils, GikoDataModule;
5958 procedure TNewBoardDialog.UpdateButtonClick(Sender: TObject);
6059 var
6160 Item: TNewBoardItem;
62- URL : String;
63- protocol, host, path, document, port, bookmark: String;
6461 begin
6562 try
66- MessageMemo.Clear;
6763 GikoSys.Setting.BoardURLSelected := BoardURLComboBox.ItemIndex + 1;
6864 FAbort := False;
6965 UpdateButton.Enabled := False;
7066 StopButton.Enabled := True;
7167 CloseButton.Enabled := False;
7268 EditIgnoreListsButton.Enabled := False;
73- URL := BoardURLComboBox.Text;
74- GikoSys.ParseURI(URL, protocol, host, path, document, port, bookmark);
75- if (protocol = '') then begin
76- Item.FContent := BoardLoardFromFile(URL);
77- end else if (AnsiPos('http', protocol) > 0) then begin
78- Item := BoardDownload(URL);
79- end;
69+ Item := BoardDownload;
8070 StopButton.Enabled := False;
8171 if FAbort then
8272 Exit;
@@ -84,9 +74,8 @@ begin
8474 GikoDM.TabsSaveAction.Tag := 1;
8575 GikoDM.TabsOpenAction.Tag := 1;
8676 GikoDM.TabsSaveAction.Execute;
87- if (UpdateURL(Item.FContent)) then begin
88- GikoForm.ReloadBBS;
89- end;
77+ UpdateURL(Item.FContent);
78+ GikoForm.ReloadBBS;
9079 GikoDM.TabsSaveAction.Tag := 0;
9180 GikoDM.TabsOpenAction.Tag := 0;
9281 end else
@@ -110,12 +99,14 @@ begin
11099 Close;
111100 end;
112101
113-function TNewBoardDialog.BoardDownload(const URL: String): TNewBoardItem;
102+function TNewBoardDialog.BoardDownload: TNewBoardItem;
114103 var
104+ URL: string;
115105 Stream: TMemoryStream;
116106 s: string;
117107 i: Integer;
118108 begin
109+ MessageMemo.Clear;
119110 Indy.Request.Clear;
120111 Indy.RecvBufferSize := Gikosys.Setting.RecvBufferSize;
121112 Indy.ProxyParams.BasicAuthentication := False;
@@ -141,7 +132,7 @@ begin
141132 Indy.ProxyParams.ProxyPassword := '';
142133 end;
143134 //URL := GikoSys.Setting.BoardURL2ch;
144- //URL := BoardURLComboBox.Text;
135+ URL := BoardURLComboBox.Text;
145136 Indy.Request.UserAgent := GikoSys.GetUserAgent;
146137 Indy.Request.Referer := '';
147138 Indy.Request.AcceptEncoding := 'gzip';
@@ -196,9 +187,10 @@ begin
196187 end;
197188 end;
198189
199-function TNewBoardDialog.UpdateURL(s: string): boolean;
190+procedure TNewBoardDialog.UpdateURL(s: string);
200191 var
201192 i: Integer;
193+// j: Integer;
202194 idx: Integer;
203195 idx1: Integer;
204196 idx2: Integer;
@@ -334,7 +326,6 @@ begin
334326 oldURLs.Free;
335327 newURLs.Free;
336328 end;
337- Result := Change;
338329 end;
339330
340331 procedure TNewBoardDialog.FormCreate(Sender: TObject);
@@ -413,21 +404,5 @@ procedure TNewBoardDialog.FormClose(Sender: TObject;
413404 begin
414405 IgnoreLists.Free;
415406 end;
416-//! ƒ[ƒJƒ‹ƒtƒ@ƒCƒ‹‚ðƒ[ƒh‚·‚é
417-function TNewBoardDialog.BoardLoardFromFile(const FilePath: String): String;
418-var
419- html : TStringList;
420-begin
421- Result := '';
422- // ƒtƒ@ƒCƒ‹‚ª‘¶Ý‚µ‚Ä‚¢‚é‚©ƒ`ƒFƒbƒN
423- if (FileExists(FilePath)) then begin
424- html := TStringList.Create();
425- try
426- html.LoadFromFile(FilePath);
427- Result := html.Text;
428- finally
429- html.Free;
430- end;
431- end;
432-end;
407+
433408 end.
--- a/Option.dfm
+++ b/Option.dfm
@@ -61,9 +61,9 @@ object OptionDialog: TOptionDialog
6161 Top = 4
6262 Width = 509
6363 Height = 389
64- ActivePage = TabSheet3
64+ ActivePage = CSSTabSheet
6565 MultiLine = True
66- TabIndex = 3
66+ TabIndex = 2
6767 TabOrder = 3
6868 OnChange = OptionTabChange
6969 object ConnectSheet: TTabSheet
@@ -687,7 +687,7 @@ object OptionDialog: TOptionDialog
687687 Left = 12
688688 Top = 52
689689 Width = 477
690- Height = 45
690+ Height = 64
691691 Caption = #12473#12524#20316#25104#26085#26178#34920#31034#35373#23450
692692 TabOrder = 1
693693 object CreationTimeLogsCheckBox: TCheckBox
@@ -699,8 +699,8 @@ object OptionDialog: TOptionDialog
699699 TabOrder = 0
700700 end
701701 object FutureThreadCheckBox: TCheckBox
702- Left = 204
703- Top = 16
702+ Left = 12
703+ Top = 40
704704 Width = 265
705705 Height = 17
706706 Caption = #26085#20184#12364#26410#26469#12398#12418#12398#12399#34920#31034#12375#12394#12356#65288'492'#12473#12524#31995#65289
@@ -709,7 +709,7 @@ object OptionDialog: TOptionDialog
709709 end
710710 object GroupBox5: TGroupBox
711711 Left = 12
712- Top = 105
712+ Top = 121
713713 Width = 477
714714 Height = 86
715715 Caption = #12502#12521#12454#12470#12398#26368#22823#21270
@@ -737,35 +737,35 @@ object OptionDialog: TOptionDialog
737737 end
738738 object GroupBox17: TGroupBox
739739 Left = 12
740- Top = 196
740+ Top = 212
741741 Width = 477
742- Height = 45
742+ Height = 63
743743 Caption = #12502#12521#12454#12470#12479#12502#38750#34920#31034#26178#35373#23450
744744 TabOrder = 3
745745 object SelectIntervalLabel: TLabel
746- Left = 10
747- Top = 20
746+ Left = 13
747+ Top = 24
748748 Width = 199
749749 Height = 12
750750 Caption = #12459#12540#12477#12523#12461#12540#12391#12398#31227#21205#26178#12398#28961#21453#24540#26178#38291
751751 end
752752 object Label4: TLabel
753- Left = 271
754- Top = 20
753+ Left = 292
754+ Top = 24
755755 Width = 29
756756 Height = 12
757757 Caption = #12511#12522#31186
758758 end
759759 object Label6: TLabel
760- Left = 305
761- Top = 20
760+ Left = 14
761+ Top = 40
762762 Width = 164
763763 Height = 12
764764 Caption = #65288'55'#12511#12522#31186#20197#19978#12395#35373#23450#12375#12390#19979#12373#12356#65289
765765 end
766766 object SelectIntervalEdit: TEdit
767- Left = 214
768- Top = 16
767+ Left = 235
768+ Top = 20
769769 Width = 49
770770 Height = 20
771771 ImeMode = imClose
@@ -775,7 +775,7 @@ object OptionDialog: TOptionDialog
775775 end
776776 object GroupBox18: TGroupBox
777777 Left = 12
778- Top = 246
778+ Top = 278
779779 Width = 477
780780 Height = 43
781781 Caption = 'dat'#33853#12385#12473#12524#12477#12540#12488#38918
@@ -800,29 +800,6 @@ object OptionDialog: TOptionDialog
800800 #12473#12524#26368#32066#26356#26032#26085#26178#65288#38477#38918#65289)
801801 end
802802 end
803- object GroupBox20: TGroupBox
804- Left = 12
805- Top = 291
806- Width = 477
807- Height = 41
808- Caption = #12473#12524#12483#12489#19968#35239#12480#12454#12531#12525#12540#12489#24460#12398#21205#20316
809- TabOrder = 5
810- object Label24: TLabel
811- Left = 219
812- Top = 18
813- Width = 142
814- Height = 12
815- Caption = #65288#12481#12455#12483#12463#12375#12394#12356#22580#21512#28961#20966#29702#65289
816- end
817- object AutoSortCheckBox: TCheckBox
818- Left = 10
819- Top = 16
820- Width = 207
821- Height = 17
822- Caption = #33258#21205#12391#12473#12524#12483#12489#21517#12391#26119#38918#12477#12540#12488#12377#12427
823- TabOrder = 0
824- end
825- end
826803 end
827804 object ThreadSheet: TTabSheet
828805 Caption = #12473#12524#12483#12489#65297
--- a/Option.pas
+++ b/Option.pas
@@ -202,9 +202,6 @@ type
202202 UnFocusedBoldCheckBox: TCheckBox;
203203 IgnoreKanaCheckBox: TCheckBox;
204204 UseKatjuTypeSkinCheckBox: TCheckBox;
205- GroupBox20: TGroupBox;
206- AutoSortCheckBox: TCheckBox;
207- Label24: TLabel;
208205 procedure FormCreate(Sender: TObject);
209206 procedure FormDestroy(Sender: TObject);
210207 procedure ApplyButtonClick(Sender: TObject);
@@ -356,7 +353,7 @@ begin
356353 FClose := False;
357354 Exit;
358355 end;
359- SetAbonpropertys;
356+ SetAbonpropertys;
360357 SaveSetting;
361358 SettingApply;
362359
@@ -824,8 +821,7 @@ begin
824821 else
825822 DatOchiSortCombo.ItemIndex := 0;
826823 end;
827- AutoSortCheckBox.Checked := GikoSys.Setting.AutoSortThreadList;
828-
824+
829825 //‚ ‚ځ`‚ñ
830826 RloCheckBox.Checked := GikoSys.Setting.AbonDeleterlo;
831827 ReplaceulCheckBox.Checked := GikoSys.Setting.AbonReplaceul;
@@ -1102,7 +1098,6 @@ begin
11021098 GikoSys.Setting.DatOchiSortIndex := Ord( gbcLastModified );{gbcLastModified}
11031099 end;
11041100 end;
1105- GikoSys.Setting.AutoSortThreadList := AutoSortCheckBox.Checked;
11061101
11071102 GikoSys.Setting.WriteSystemSettingFile;
11081103 GikoSys.Setting.WriteBoardURLSettingFile;
--- a/Setting.pas
+++ b/Setting.pas
@@ -1,10 +1,9 @@
11 unit Setting;
22
3-
43 interface
54
65 uses
7- SysUtils, Classes, Graphics, Forms, {Math, IniFiles, UCryptAuto, UBase64,}
6+ SysUtils, Classes, Graphics, Forms, Math, IniFiles, UCryptAuto, UBase64,
87 ComCtrls, GestureModel;
98
109 const
@@ -12,7 +11,33 @@ const
1211 LIST_COOLBAND_COUNT = 2; //”ÂCoolBand‚̐”
1312 BROWSER_COOLBAND_COUNT = 3; //ƒuƒ‰ƒEƒUCoolBand‚̐”
1413
15-
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+ GESTURE_FILE_NAME = 'Gestures.ini';
38+ SPAMFILTER_FILE_NAME = 'SpamFilter.ini';
39+ LANGUAGE_FILE_NAME = 'language.ini';
40+
1641 type
1742 TGikoTabPosition = (gtpTop, gtpBottom); // ƒ^ƒuˆÊ’u
1843 TGikoTabAppend = (gtaFirst, gtpLast); // ƒ^ƒu’ljÁˆÊ’u
@@ -399,6 +424,9 @@ type
399424 //! ƒ}ƒEƒXƒWƒFƒXƒ`ƒƒ[‚ðŽg—p‚·‚é‚©‚Ç‚¤‚©
400425 FGestureEnabled : Boolean;
401426
427+ //2chŒ¾ŒêÝ’è
428+ //F2chLanguage : TStringList;
429+
402430 //ƒtƒVƒAƒiƒgƒ‰ƒbƒvÝ’è
403431 FLocalTrapAtt : Boolean;
404432 FRemoteTrapAtt : Boolean;
@@ -410,6 +438,8 @@ type
410438 FMute: Boolean;
411439 //ƒXƒŒiž‚Ý‚Å–¢Šm’蕶Žš‚à—LŒø‚É‚·‚é‚©
412440 FUseUndecided: Boolean;
441+ //MessageList‚ɏo—Í‚³‚ê‚郁ƒbƒZ[ƒW
442+ FMessageList : array[0..13] of string;
413443
414444 //Be2ch
415445 //”FØ—pƒ†[ƒUIDEƒpƒXƒ[ƒh
@@ -420,8 +450,6 @@ type
420450 //—š—ð‚̍őå•Û‘¶Œ”
421451 FMaxRecordCount : Integer;
422452
423- //ƒXƒŒƒbƒhˆê——‚ðƒ_ƒEƒ“ƒ[ƒhŒã‚Ƀ\[ƒg‚·‚é‚©
424- FAutoSortThreadList : Boolean;
425453 function GetMainCoolSet(Index: Integer): TCoolSet;
426454 function GetBoardCoolSet(Index: Integer): TCoolSet;
427455 function GetBrowserCoolSet(Index: Integer): TCoolSet;
@@ -487,9 +515,9 @@ type
487515 function GetIgnoreFileName: string;
488516 function GetGestureFileName : string;
489517 function GetSpamFilterFileName : string;
490- function GetLanguageFileName: string;
491- function GetMainKeyFileName: String;
492- function GetEditorKeyFileName: String;
518+ function GetLanguageFileName: string;
519+ procedure SetMessages;
520+ function GetMessage(AType :Integer): string;
493521 procedure WriteLogFolder(AVal : String);
494522
495523 //ŽóMƒoƒbƒtƒ@ƒTƒCƒY
@@ -737,50 +765,13 @@ type
737765 property BeAutoLogin: Boolean read FBeAutoLogin write FBeAutoLogin;
738766 property BeLogin: Boolean read FBeLogin write FBeLogin;
739767 property MaxRecordCount : Integer read FMaxRecordCount write FMaxRecordCount;
740- //! ƒXƒŒƒbƒhˆê——ƒ_ƒEƒ“ƒ[ƒhŒã‚ɃXƒŒƒbƒh–¼‚ŏ¸‡ƒ\[ƒg‚·‚é‚©
741- property AutoSortThreadList : Boolean read FAutoSortThreadList write FAutoSortThreadList;
742-end;
743768
744-
745-const
746-// MAIN_COOLBAND_COUNT = 4; //ƒƒCƒ“CoolBand‚̐”
747-// LIST_COOLBAND_COUNT = 2; //”ÂCoolBand‚̐”
748-// BROWSER_COOLBAND_COUNT = 3; //ƒuƒ‰ƒEƒUCoolBand‚̐”
749-
750- BOARD_FILE_NAME = 'board.2ch';
751- CUSTOMBOARD_FILE_NAME = 'custom.2ch';
752- BOARD_DIR_NAME = 'Board';
753- KEY_SETTING_FILE_NAME = 'key.ini';
754- EKEY_SETTING_FILE_NAME = 'Ekey.ini';
755- TEMP_FOLDER = 'Temp';
756- OUTBOX_FILE_NAME = 'outbox.ini';
757- SENT_FILE_NAME = 'sent.ini';
758- CONFIG_DIR_NAME = 'config';
759- CSS_DIR_NAME = 'css';
760- SKIN_DIR_NAME = 'skin';
761- SKIN_HEADER_FILE_NAME = 'Header.html';
762- SKIN_FOOTER_FILE_NAME = 'Footer.html';
763- SKIN_NEWRES_FILE_NAME = 'NewRes.html';
764- SKIN_RES_FILE_NAME = 'Res.html';
765- SKIN_BOOKMARK_FILE_NAME = 'Bookmark.html';
766- SKIN_NEWMARK_FILE_NAME = 'Newmark.html';
767- NGWORDs_DIR_NAME : String = 'NGwords';
768- BOARD_PLUGIN_DIR_NAME = 'BoardPlugin';
769- SAMBATIME_FILE_NAME : String = 'Samba.ini';
770- IGNORE_FILE_NAME : String = 'Ignore.txt';
771-// DOLIB_LOGIN_URL = '/~tora3n2c/futen.cgi';
772- MAX_POPUP_RES : Integer = 10;
773- GESTURE_FILE_NAME = 'Gestures.ini';
774- SPAMFILTER_FILE_NAME = 'SpamFilter.ini';
775- LANGUAGE_FILE_NAME = 'language.ini';
769+end;
776770
777771
778772
779773 implementation
780774
781-uses
782- Math, IniFiles, UCryptAuto, UBase64;
783-
784775 type
785776 TSoundName = record
786777 Name: string;
@@ -798,8 +789,26 @@ const
798789 DEFAULT_TAB_FONT_NAME: string = '‚l‚r ‚oƒSƒVƒbƒN';
799790 DEFAULT_TAB_FONT_SIZE: Integer = 9;
800791 DEFAULT_2CH_BOARD_URL1: string = 'http://menu.2ch.net/bbsmenu.html';
792+ //OCN‚ðíœ‚µ‚Ü‚µ‚½
793+ //DEFAULT_2CH_BOARD_URL2: string = 'http://menu.2ch.net/bbsmenu.html';
794+ //2005/10/1‚Éiij4u‚Ì•û‚͏Á–Å //'http://www.2ch.net/newbbsmenu.html';
801795 GIKO_ENCRYPT_TEXT: string = 'gikoNaviEncryptText';
802796
797+ DEF_MESSAGES : array[0..13] of string = ( 'ƒƒOƒAƒEƒg‚µ‚Ü‚µ‚½',
798+ 'ƒƒOƒCƒ“‚µ‚Ü‚µ‚½ - ',
799+ '‹­§ƒƒOƒCƒ“‚µ‚Ü‚µ‚½ - ',
800+ '[ƒXƒŒˆê——Žæ“¾Š®—¹]',
801+ '(–¼Ì•s–¾j',
802+ '[ƒXƒŒŽæ“¾Š®—¹]',
803+ '[ƒXƒŒ·•ªŽæ“¾Š®—¹]',
804+ '[–¢XV]',
805+ '[’†’f]',
806+ '[ƒGƒ‰[]',
807+ '[ƒŒƒX‘—MI—¹]',
808+ '[VƒXƒŒ‘—MI—¹]',
809+ '[ƒŒƒX‘—MŽ¸”s]',
810+ '[VƒXƒŒ‘—MŽ¸”s]');
811+
803812 var
804813 SOUND_NAME: array[0..4] of TSoundName = (
805814 (Name: 'New'; ViewName: 'Žæ“¾¬Œ÷'; FileName: ''),
@@ -1256,8 +1265,6 @@ begin
12561265 FCategorySortOrder := ini.ReadBool('ThreadList', 'CategorySortOrder', True);
12571266 FBoardSortIndex := ini.ReadInteger('ThreadList', 'BoardSortIndex', 0);
12581267 FBoardSortOrder := ini.ReadBool('ThreadList', 'BoardSortOrder', True);
1259- // DLŒã‚ÌŽ©“®ƒ\[ƒg
1260- FAutoSortThreadList := ini.ReadBool('ThreadList', 'AutoSort', True);
12611268 //Dat—Ž‚¿ƒXƒŒƒ\[ƒg‡
12621269 FDatOchiSortIndex := ini.ReadInteger('ThreadList', 'DatOchiSortIndex', -1);
12631270 FDatOchiSortOrder := ini.ReadBool('ThreadList', 'DatOchiSortOrder', False);
@@ -1592,8 +1599,6 @@ begin
15921599 ini.WriteBool('ThreadList', 'BoardSortOrder', FBoardSortOrder);
15931600 ini.WriteInteger('ThreadList', 'DatOchiSortIndex', FDatOchiSortIndex);
15941601 ini.WriteBool('ThreadList', 'DatOchiSortOrder', FDatOchiSortOrder);
1595- // DLŒã‚ÌŽ©“®ƒ\[ƒg
1596- ini.WriteBool('ThreadList', 'AutoSort', FAutoSortThreadList);
15971602
15981603 //‘‚«ž‚ÝŽžƒ}ƒVƒ“ŽžŽg—pÝ’è
15991604 ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime);
@@ -2164,19 +2169,68 @@ function TSetting.GetLanguageFileName: string;
21642169 begin
21652170 Result := GetConfigDir + LANGUAGE_FILE_NAME;
21662171 end;
2172+//Messagelist‚ɏo—Í‚³‚ê‚郁ƒbƒZ[ƒW‚̐ݒè
2173+procedure TSetting.SetMessages;
2174+var
2175+ i :Integer;
2176+ ini : TMemIniFile;
2177+begin
2178+ //2chŒ¾Œê“ǂݏo‚µ
2179+ if (GengoSupport) and (FileExists(GetLanguageFileName)) then begin
2180+ ini := TmemIniFile.Create(GetLanguageFileName);
2181+ try
2182+ {
2183+ 'ƒƒOƒAƒEƒg‚µ‚Ü‚µ‚½',
2184+ 'ƒƒOƒCƒ“‚µ‚Ü‚µ‚½ - ',
2185+ '‹­§ƒƒOƒCƒ“‚µ‚Ü‚µ‚½ - ',
2186+ '[ƒXƒŒˆê——Žæ“¾Š®—¹]',
2187+ '(–¼Ì•s–¾j',
2188+ '[ƒXƒŒŽæ“¾Š®—¹]',
2189+ '[ƒXƒŒ·•ªŽæ“¾Š®—¹]',
2190+ '[–¢XV]',
2191+ '[’†’f]',
2192+ '[ƒGƒ‰[]',
2193+ '[ƒŒƒX‘—MI—¹]',
2194+ '[VƒXƒŒ‘—MI—¹]',
2195+ '[ƒŒƒX‘—MŽ¸”s]',
2196+ '[VƒXƒŒ‘—MŽ¸”s]'); }
2197+ FMessageList[0] := ini.ReadString('Language', 'Logout', DEF_MESSAGES[0]);
2198+ FMessageList[1] := ini.ReadString('Language', 'Login', DEF_MESSAGES[1]);
2199+ FMessageList[2] := ini.ReadString('Language', 'ForceLogin', DEF_MESSAGES[2]);
2200+ FMessageList[3] := ini.ReadString('Language', 'ThreadList', DEF_MESSAGES[3]);
2201+ FMessageList[4] := ini.ReadString('Language', 'UnKnown', DEF_MESSAGES[4]);
2202+ FMessageList[5] := ini.ReadString('Language', 'ThreadGet', DEF_MESSAGES[5]);
2203+ FMessageList[6] := ini.ReadString('Language', 'ThreadDiffGet', DEF_MESSAGES[6]);
2204+ FMessageList[7] := ini.ReadString('Language', 'NotMod', DEF_MESSAGES[7]);
2205+ FMessageList[8] := ini.ReadString('Language', 'Abort', DEF_MESSAGES[8]);
2206+ FMessageList[9] := ini.ReadString('Language', 'Error', DEF_MESSAGES[9]);
2207+ FMessageList[10] := ini.ReadString('Language', 'NewReply', DEF_MESSAGES[10]);
2208+ FMessageList[11] := ini.ReadString('Language', 'NewThread', DEF_MESSAGES[11]);
2209+ FMessageList[12] := ini.ReadString('Language', 'ReplyError', DEF_MESSAGES[12]);
2210+ FMessageList[13] := ini.ReadString('Language', 'ThreadError', DEF_MESSAGES[13]);
2211+ finally
2212+ ini.Free;
2213+ end;
2214+
2215+ end else begin
2216+ for i := 0 to 13 do begin
2217+ FMessageList[i] := DEF_MESSAGES[i];
2218+ end;
2219+ end;
2220+end;
2221+function TSetting.GetMessage(AType :Integer): string;
2222+begin
2223+ if (AType >= 0) and (AType <= Length(FMessageList)) then
2224+ Result := FMessageList[AType]
2225+ else
2226+ Result := '';
2227+end;
21672228 procedure TSetting.WriteLogFolder(AVal : String);
21682229 begin
21692230 FLogFolder := AVal;
21702231 FLogFolderP := IncludeTrailingPathDelimiter(LogFolder);
21712232 end;
2172-function TSetting.GetMainKeyFileName: String;
2173-begin
2174- Result := GetConfigDir + KEY_SETTING_FILE_NAME;
2175-end;
2176-function TSetting.GetEditorKeyFileName: String;
2177-begin
2178- Result := GetConfigDir + EKEY_SETTING_FILE_NAME;
2179-end;
2233+
21802234 end.
21812235
21822236
--- a/gikoNavi.dpr
+++ b/gikoNavi.dpr
@@ -70,8 +70,7 @@ uses
7070 HTMLCreate in 'HTMLCreate.pas',
7171 ListViewUtils in 'ListViewUtils.pas',
7272 GikoDataModule in 'GikoDataModule.pas' {GikoDM: TDataModule},
73- BrowserRecord in 'BrowserRecord.pas',
74- GikoMessage in 'GikoMessage.pas';
73+ BrowserRecord in 'BrowserRecord.pas';
7574
7675 {$R *.RES}
7776 {$R gikoResource.res}
Binary files a/gikoNavi.res and b/gikoNavi.res differ
--- a/readme/language.ini
+++ /dev/null
@@ -1,15 +0,0 @@
1-[Language]
2-Logout=ƒƒOƒAƒEƒg‚µ‚Ü‚·‚½
3-Login=ƒƒOƒCƒ“‚µ‚Ü‚·‚½ -
4-ForceLogin=‹­§ƒƒOƒCƒ“‚µ‚Ü‚·‚½ -
5-SureItiran=[ƒXƒŒˆê——Žæ“¾‚µ‚Ü‚·‚½]
6-Unknown=i–¼Ì•s–¾‚łj
7-SureSyutoku=[ƒXƒŒŽæ“¾Š®—¹‚µ‚Ü‚·‚½]
8-SureDiff=[ƒXƒŒ·•ªŽæ“¾Š®—¹‚µ‚Ü‚·‚½]
9-NotMod=[–¢XV@‚à‚¿‚¯‚Â]
10-Abort=[’†’f¥¥¥Q|P|›]
11-Error=[ƒGƒ‰[”­¶·À„ª(߁Íß)„ª!!]
12-NewRes=[VƒŒƒX‘—MI—¹‚µ‚Ü‚·‚½(M¥ƒÖ¥L)]
13-NewSure=[VƒXƒŒ‘—MI—¹‚µ‚Ü‚·‚½(M¥ƒÖ¥L)]
14-ResError=[ƒŒƒX‘—MŽ¸”s(L¥ƒÖ¥`)]
15-SureError= [VƒXƒŒ‘—MŽ¸”s(L¥ƒÖ¥`)]
--- a/readme/readme.txt
+++ b/readme/readme.txt
@@ -109,19 +109,6 @@ LICENSE
109109 ------------------------------
110110 200X/XX/XX
111111 Version ÊÞÀ51
112-@ƒXƒŒƒbƒh•`‰æˆ—‚̍œK‰»
113-@ƒŒƒX”ÔŽw’èURL‚ðƒNƒŠƒbƒN‚µ‚½‚Æ‚«‚Ì“®ì‚ŁAŽæ“¾Ï‚ÝŠO‚̃ŒƒX”Ԃ̏ꍇŽ©“®‚ÅDL‚·‚é‚悤‚ɕύX
114-@ƒŒƒXƒGƒfƒBƒ^‚©‚çSamba‚̐ݒè’l‚ð•ÏX‚Å‚«‚é‚悤‚ɕύX
115-@ƒLƒƒƒrƒlƒbƒgã‚ŃNƒŠƒbƒNEƒ_ƒuƒ‹ƒNƒŠƒbƒNƒCƒxƒ“ƒg‚ª‰ßè‚É”­¶‚·‚é•s‹ï‡‚̏C³
116-@ƒ}ƒEƒXƒWƒFƒXƒ`ƒƒ[—LŒøŽž‚ɃvƒŒƒrƒ…[ã‚ʼnEƒNƒŠƒbƒN‚Å‚«‚È‚¢•s‹ï‡‚̏C³
117-@ƒƒCƒ“ƒtƒH[ƒ€ã‚ł̃Vƒ‡[ƒgƒJƒbƒgƒL[‚Ì—Dæ‡ˆÊ‚ªƒMƒRƒiƒrŽ©‘Ì‚ªÅãˆÊ‚ɕύX
118-@ƒƒCƒ“ƒƒjƒ…[‚Ì‚¨‹C‚É“ü‚è‚Ì•`‰æ‚̍‚‘¬‰»
119-@ƒXƒe[ƒ^ƒXƒo[‚ÉŒ»Ý•\Ž¦‚µ‚Ä‚¢‚éƒXƒŒƒbƒh‚Ì—e—Ê‚ð•\Ž¦‚·‚é‚悤‚É‚µ‚½
120-@DAT—Ž‚¿‚µ‚½ƒXƒŒ‚Ì—e—Ê‚ðŽæ“¾‚Å‚«‚È‚¢•s‹ï‡‚̏C³
121-@”XV‚э[ƒJƒ‹ƒtƒ@ƒCƒ‹‚ðŽw’è‚Å‚«‚é‚悤‚ɕύX
122-@ƒXƒŒƒbƒhˆê——ƒ_ƒEƒ“ƒ[ƒhŒã‚̃\[ƒg‚ðƒIƒvƒVƒ‡ƒ“‰»
123-@NGƒ[ƒh‚É‘S”¼Šp‚Ђ炪‚ȃJƒ^ƒJƒi‚̈Ⴂ‚𓯈ꎋ‚·‚éƒIƒvƒVƒ‡ƒ“‚̒ljÁ
124-@ƒŒƒX‚̍iž‚Ý‚Å‘S”¼Šp‚Ђ炪‚ȃJƒ^ƒJƒ^‚̈Ⴂ‚𖳎‹‚·‚é‚悤‚ɕύX
125112
126113 2005/10/10
127114 Version ÊÞÀ50 ƒŠƒŠ[ƒX3