Commit MetaInfo

修订版4956719239bdf2bba39639f79a1f3f4424daf6bd (tree)
时间2004-10-03 03:37:46
作者cvs2git <cvs2git>
Commitercvs2git

Log Message

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

更改概述

差异

--- a/AbonUnit.pas
+++ b/AbonUnit.pas
@@ -824,62 +824,58 @@ begin
824824 end;
825825 end;
826826 end;
827- Result := false;
827+ Result := false;
828828
829829 end;
830830 //シリア語ブラクラ対策
831831 function TAbon.TreatSyria(AString: string): string;
832832 var
833833 //count: Integer; //(&#1792~&#1871)
834- pos: Integer;
835- tmp: string;
834+ pos: Integer;
835+ tmp: string;
836836 begin
837- pos := AnsiPos('&#18', AString);
837+ pos := AnsiPos('&#18', AString);
838838 while pos <> 0 do begin
839- if StrToIntDef(Copy(AString, pos+4, 2), -1) > 0 then begin
840- if (AString[pos+6] = ';' ) or (AString[pos+6] = ' ') then begin
841- tmp := tmp + Copy(AString, 1, pos - 1);
842- Delete(AString, 1, pos+6);
843- end else if StrToIntDef(AString[pos+6], -1) = -1 then begin
844- tmp := tmp + Copy(AString, 1, pos - 1);
845- Delete(AString, 1, pos+5);
846- end else begin
847- tmp := tmp + Copy(AString, 1, pos + 5);
848- Delete(AString, 1, pos+5);
849- end;
850- end else begin
851- tmp := tmp + Copy(AString, 1, pos + 5);
852- Delete(AString, 1, pos+5);
853- end;
854- pos := AnsiPos('&#18', AString);
855- end;
856- if Length(AString) > 0 then
857- tmp := tmp + AString;
858- AString := tmp;
859- tmp := '';
839+ if AString[pos+6] = ';' then begin
840+ if StrToIntDef(Copy(AString, pos+4, 2), 0) <= 71 then begin
841+ tmp := tmp + Copy(AString, 1, pos - 1);
842+ Delete(AString, 1, pos+6);
843+ end else begin
844+ tmp := tmp + Copy(AString, 1, pos + 6);
845+ Delete(AString, 1, pos+6);
846+ end;
847+ end else begin
848+ tmp := tmp + Copy(AString, 1, pos + 3);
849+ Delete(AString, 1, pos+3);
850+ end;
851+ pos := AnsiPos('&#18', AString);
852+ end;
853+ if Length(AString) > 0 then
854+ tmp := tmp + AString;
855+ AString := tmp;
856+ tmp := '';
860857
861- pos := AnsiPos('&#179', AString);
858+ pos := AnsiPos('&#179', AString);
862859 while pos <> 0 do begin
863- if StrToIntDef(Copy(AString, pos+5, 1), 0) > 2 then begin
864- if (AString[pos+6] = ';') or (AString[pos+6] = ' ') then begin
865- tmp := tmp + Copy(AString, 1, pos - 1);
866- Delete(AString, 1, pos+6);
867- end else if StrToIntDef(AString[pos+6], -1) = -1 then begin
868- tmp := tmp + Copy(AString, 1, pos - 1);
869- Delete(AString, 1, pos+5);
870- end else begin
871- tmp := tmp + Copy(AString, 1, pos + 5);
872- Delete(AString, 1, pos+5);
873- end;
874- end else begin
875- tmp := tmp + Copy(AString, 1, pos + 5);
876- Delete(AString, 1, pos+5);
877- end;
878- pos := AnsiPos('&#179', AString);
879- end;
880- if Length(AString) > 0 then
881- tmp := tmp + AString;
882- Result := tmp;
860+ if AString[pos+6] = ';' then begin
861+ if StrToIntDef(Copy(AString, pos+5, 1), 0) > 2 then begin
862+ tmp := tmp + Copy(AString, 1, pos - 1);
863+ Delete(AString, 1, pos+6);
864+ end else begin
865+ tmp := tmp + Copy(AString, 1, pos + 6);
866+ Delete(AString, 1, pos+6);
867+ end;
868+ tmp := tmp + Copy(AString, 1, pos - 1);
869+ Delete(AString, 1, pos+6);
870+ end else begin
871+ tmp := tmp + Copy(AString, 1, pos + 4);
872+ Delete(AString, 1, pos+4);
873+ end;
874+ pos := AnsiPos('&#179', AString);
875+ end;
876+ if Length(AString) > 0 then
877+ tmp := tmp + AString;
878+ Result := tmp;
883879 end;
884880 end.
885881
--- a/BoardGroup.pas
+++ b/BoardGroup.pas
@@ -394,7 +394,7 @@ const
394394 SUBJECT_FILENAME: string = 'subject.txt';
395395 PATH_DELIM: string = '\';
396396 SETTINGTXT_FILENAME: string = 'SETTING.TXT';
397- HEADTXT_FILENAME: string = 'head.html';
397+ HEADTXT_FILENAME: string = 'head.txt';
398398 //DEFAULT_LIST_COUNT: Integer = 100;
399399
400400 // COLUMN_CATEGORY: array[0..0] of string = ('カテゴリ名');
@@ -1668,11 +1668,9 @@ procedure TThreadItem.DeleteLogFile;
16681668 begin
16691669 ParentBoard.BeginUpdate;
16701670
1671- if FUnRead then
1672- ParentBoard.UnRead := ParentBoard.UnRead - 1;
16731671 DeleteFile(GetThreadFileName);
1674- if FileExists(ChangeFileExt(GetThreadFileName,'.NG')) = true then
1675- DeleteFile(ChangeFileExt(GetThreadFileName,'.NG'));
1672+ if FileExists(ChangeFileExt(GetThreadFileName,'.NG')) = true then
1673+ DeleteFile(ChangeFileExt(GetThreadFileName,'.NG'));
16761674 FRoundDate := ZERO_DATE;
16771675 FLastModified := ZERO_DATE;
16781676 FSize := 0;
--- a/Editor.dfm
+++ b/Editor.dfm
@@ -383,9 +383,6 @@ object EditorForm: TEditorForm
383383 object SETTINGTXT2: TMenuItem
384384 Action = GetSETTINGTXTAction
385385 end
386- object HeadTXT1: TMenuItem
387- Action = GetHeadTXTAction
388- end
389386 object OP1: TMenuItem
390387 Action = GetTitlePictureAction
391388 end
@@ -1112,12 +1109,6 @@ object EditorForm: TEditorForm
11121109 OnExecute = GetTitlePictureActionExecute
11131110 OnUpdate = GetTitlePictureActionUpdate
11141111 end
1115- object GetHeadTXTAction: TAction
1116- Category = #26495#24773#22577
1117- Caption = 'HeadTXT'#12398#21462#24471
1118- HelpKeyword = 'HeadTXT'#12398#21462#24471
1119- OnExecute = GetHeadTXTActionExecute
1120- end
11211112 end
11221113 object IdLogDebug: TIdLogDebug
11231114 OnReceive = IdLogDebugReceive
--- a/Editor.pas
+++ b/Editor.pas
@@ -107,8 +107,6 @@ type
107107 SETTINGTXT2: TMenuItem;
108108 GetTitlePictureAction: TAction;
109109 OP1: TMenuItem;
110- GetHeadTXTAction: TAction;
111- HeadTXT1: TMenuItem;
112110
113111 procedure EditorPageChange(Sender: TObject);
114112 procedure FormCreate(Sender: TObject);
@@ -153,7 +151,6 @@ type
153151 procedure GetSETTINGTXTActionExecute(Sender: TObject);
154152 procedure GetTitlePictureActionUpdate(Sender: TObject);
155153 procedure GetTitlePictureActionExecute(Sender: TObject);
156- procedure GetHeadTXTActionExecute(Sender: TObject);
157154 private
158155 FThreadItem: TThreadItem;
159156 FBoard: TBoard;
@@ -390,7 +387,7 @@ begin
390387 MailComboBox.Text := FBoard.KotehanMail;
391388 SageCheckBox.Checked := AnsiPos('sage', MailComboBox.Text) <> 0;
392389 TitlePanel.Visible := True;
393- SetSamba24(FBoard.URL);
390+ SetSamba24('');
394391 ShowBoardInformation(FBoard, BoardInformationMemo);
395392 ShowTitlePicture();
396393 end;
@@ -410,11 +407,8 @@ end;
410407
411408 function TEditorForm.GetBody : string;
412409 var
413- body, tmp : string;
414- p, tail : PChar;
415- len : Integer;
416-const
417- TAB_LENGTH = 4;
410+ body : string;
411+ regexp : TAWKStr;
418412 begin
419413
420414 body := BodyEdit.Text;
@@ -422,65 +416,16 @@ begin
422416 // & の置換は一番最初にやること
423417 body := CustomStringReplace( body, '&', '&amp;' );
424418 if SpaceToNBSPAction.Checked then begin
425- p := PChar( body );
426- tail := p + Length( body );
427- len := 0;
428- while p < tail do begin
429- case p^ of
430- #09:
431- begin
432- Inc( p );
433- repeat
434- Inc( len );
435- tmp := tmp + '&nbsp;';
436- until (len mod TAB_LENGTH) = 0;
437- end;
438-
439- #10, #13:
440- begin
441- tmp := tmp + p^; Inc( p );
442- len := 0;
443- end;
444-
445- ' ':
446- begin
447- tmp := tmp + '&nbsp;';
448- Inc( p );
449- Inc( len );
450- end;
451-
452- '&':
453- // 実体参照は 1 文字分
454- begin
455- tmp := tmp + '&';
456- Inc( p );
457- Inc( len );
458- while p < tail do begin
459- if p^ in ['a'..'z', 'A'..'Z', '0'..'9', '#'] then begin
460- tmp := tmp + p^;
461- end else if p^ = ';' then begin
462- tmp := tmp + p^;
463- Inc( p );
464- Break;
465- end else begin
466- Break;
467- end;
468- Inc( p );
469- end;
470- end;
471-
472- else
473- if p^ in kYofKanji then begin
474- tmp := tmp + p^; Inc( p );
475- tmp := tmp + p^; Inc( p );
476- len := len + 2;
477- end else begin
478- tmp := tmp + p^; Inc( p );
479- Inc( len );
480- end;
481- end;
419+ body := CustomStringReplace( body, #09, '&nbsp;&nbsp;&nbsp;&nbsp;' );
420+ body := CustomStringReplace( body, ' ', '&nbsp;&nbsp;' );
421+ body := CustomStringReplace( body, '&nbsp; ', '&nbsp;&nbsp;' );
422+ regexp := TAWKStr.Create( nil );
423+ try
424+ regexp.RegExp := '^ ';
425+ regexp.GSub( '\&nbsp;', body );
426+ finally
427+ regexp.Free;
482428 end;
483- body := tmp;
484429 end;
485430
486431 Result := body;
@@ -1674,7 +1619,7 @@ begin
16741619 tmpBoard := FBoard
16751620 else
16761621 tmpBoard := FThreadItem.ParentBoard;
1677-
1622+
16781623 Indy.Request.Referer := tmpBoard.URL;
16791624 if tmpBoard.TitlePictureURL <> '' then begin
16801625 StatusBar.Panels[0].Text := '板トップ画像ダウンロード中';
@@ -1729,65 +1674,4 @@ begin
17291674 end;
17301675 end;
17311676
1732-procedure TEditorForm.GetHeadTXTActionExecute(Sender: TObject);
1733-var
1734- URL, RefURL: string;
1735- settingBody: TStringList;
1736- tmpBoard: TBoard;
1737-
1738-begin
1739- InitIdHTTP(Indy);
1740- if FThreadItem = nil then
1741- tmpBoard := FBoard
1742- else
1743- tmpBoard := FThreadItem.ParentBoard;
1744-
1745- if tmpBoard = nil then Exit;
1746-
1747- RefURL := tmpBoard.URL;
1748- if RefURL[Length(RefURL)] <> '/' then
1749- URL := RefURL + '/' + 'head.txt'
1750- else
1751- URL := RefURL + 'head.txt';
1752-
1753- if FileExists(tmpBoard.GETHEADTXTFileName) then
1754- Indy.Request.LastModified := tmpBoard.HEADTXTTime
1755- else
1756- Indy.Request.LastModified := ZERO_DATE;
1757-
1758- Indy.Request.Referer := RefURL;
1759- Screen.Cursor := crHourGlass;
1760- settingBody := TStringList.Create;
1761- try
1762- StatusBar.Panels[0].Text := 'head.txtダウンロード中';
1763- try
1764- settingBody.Text := Indy.Get(URL);
1765- if( Indy.ResponseCode = 200 ) then begin
1766- settingBody.Insert(0, '<HTML lang="ja"><HEAD>');
1767- settingBody.Insert(1, '<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">');
1768- settingBody.Insert(2, '<TITLE>' + tmpBoard.Title + '</TITLE>');
1769- settingBody.Insert(3, '<base href="' + RefURL + '"></HEAD><BODY>');
1770- settingBody.Add('</BODY></HTML>');
1771- settingBody.SaveToFile(tmpBoard.GETHEADTXTFileName);
1772- tmpBoard.HEADTXTTime := Indy.Response.LastModified;
1773- tmpBoard.IsHEADTXT := true;
1774- tmpBoard.Modified := true;
1775- StatusBar.Panels[0].Text := 'head.txt取得完了(' + IntToStr(Indy.ResponseCode) + ')';
1776- end;
1777- except
1778- on E: EIdException do begin
1779- if( AnsiPos('304', E.Message) > 0 ) then
1780- StatusBar.Panels[0].Text := 'head.txt更新無し(' + IntToStr(Indy.ResponseCode) + ')'
1781- else
1782- StatusBar.Panels[0].Text := 'head.txt取得エラー(' + IntToStr(Indy.ResponseCode) + ')';
1783- end;
1784- end;
1785- finally
1786- settingBody.Free;
1787- Screen.Cursor := crDefault;
1788- end;
1789- if tmpBoard.IsHEADTXT then
1790- GikoSys.OpenBrowser(tmpBoard.GETHEADTXTFileName, gbtUserApp);
1791-end;
1792-
17931677 end.
--- a/ExternalBoardPlugInMain.pas
+++ b/ExternalBoardPlugInMain.pas
@@ -229,8 +229,7 @@ var
229229 // httpSocket : TIdHTTP;
230230 resStream : TMemoryStream;
231231 content : string;
232-const
233- LIVEDOOR_URL = 'http://jbbs.livedoor.jp/';
232+
234233 begin
235234
236235 {$IFDEF DEBUG}
@@ -271,12 +270,7 @@ begin
271270 Result := socket.ResponseCode;
272271 if (Length( content ) = 0) and (Result = 206) then
273272 Result := 304;
274- //したらばJBBSはヘッダにエラー情報が載るらしいので、ここでチェック
275- if ( AnsiPos(LIVEDOOR_URL, inURL) > 0 ) and (Result = 200) then begin
276- if( AnsiPos('STORAGE IN', socket.Response.RawHeaders.Text) > 0 ) then begin
277- Result := 302;
278- end;
279- end;
273+
280274 outResultData := CreateResultString( content );
281275 except
282276 on E: EIdSocketError do begin
--- a/Favorite.pas
+++ b/Favorite.pas
@@ -117,50 +117,13 @@ function TFavoriteBoardItem.GetItem : TBoard;
117117 var
118118 protocol, host, path, document, port, bookmark : string;
119119 BBSID{, BBSKey} : string;
120- tmpURL, boardURL : string;
120+ tmpURL : string;
121121 // category : TCategory;
122- i, bi: Integer;
123- tmpThread: TThreadItem;
124- tmpBoard: TBoard;
125122 begin
126123
127124 if FItem = nil then begin
128125 FItem := BBSsFindBoardFromURL( URL );
129126 if FItem = nil then begin
130- //===== プラグイン
131- try
132- //作業中//
133- bi := High( BoardPlugIns );
134- for i := Low( BoardPlugIns ) to bi do begin
135- if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
136- case BoardPlugIns[ i ].AcceptURL( URL ) of
137- atThread:
138- begin
139- tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
140- boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
141- FItem := BBSsFindBoardFromURL( boardURL );
142- URL := FItem.URL;
143- tmpThread.Free;
144- break;
145- end;
146- atBoard:
147- begin
148- tmpBoard := TBoard.Create(BoardPlugIns[ i ], URL);
149- FItem := BBSsFindBoardFromURL( tmpBoard.URL );
150- tmpBoard.Free;
151- if FItem <> nil then begin
152- URL := FItem.URL;
153- end;
154- break;
155- end;
156- end;
157- end;
158- end;
159- except
160- // exception が発生した場合は内部処理に任せたいのでここでは何もしない
161- end;
162- end;
163- if FItem = nil then begin
164127 tmpURL := URL;
165128 GikoSys.ParseURI( tmpURL, protocol, host, path, document, port, bookmark );
166129 if GikoSys.Is2chHost( host ) then begin
@@ -168,6 +131,12 @@ begin
168131 FItem := BBSs[ 0 ].FindBBSID( BBSID );
169132 if FItem <> nil then
170133 URL := FItem.URL;
134+ end else if AnsiPos('jbbs.shitaraba.com', host) <> 0 then begin
135+ // したらばJBBSのhttp://jbbs.shitaraba.com/ → http://jbbs.livedoor.com/ 置換
136+ URL := CustomStringReplace(URL, 'http://jbbs.shitaraba.com/', 'http://jbbs.livedoor.com/', false);
137+ FItem := BBSsFindBoardFromURL( URL );
138+ if FItem <> nil then
139+ URL := FItem.URL;
171140 end;
172141 {
173142 // ※作っても、追加するカテゴリが無いので激しく保留
@@ -315,7 +284,7 @@ begin
315284 FileName := GikoSys.GetConfigDir + FAVORITE_FILE_NAME;
316285
317286 FavFolder := TFavoriteFolder.Create;
318- Node := FTreeView.Items.AddChildObjectFirst(nil, FAVORITE_ROOT_NAME, FavFolder);
287+ Node := FTreeView.Items.AddChildObject(nil, FAVORITE_ROOT_NAME, FavFolder);
319288 Node.ImageIndex := 14;
320289 Node.SelectedIndex := 14;
321290
@@ -331,7 +300,7 @@ begin
331300 FStack.Push(Node);
332301 LinkExists := False;
333302 if XMLNode.NodeName = 'favorite' then begin
334- for i := XMLNode.ChildNodes.Count - 1 downto 0 do begin
303+ for i := 0 to XMLNode.ChildNodes.Count - 1 do begin
335304 ReadNode(XMLNode.ChildNodes[i]);
336305 if (XMLNode.ChildNodes[i].NodeName = 'folder') and
337306 (XMLNode.ChildNodes[i].Attributes['title'] = FAVORITE_LINK_NAME) then begin
@@ -341,7 +310,7 @@ begin
341310 end;
342311 if not LinkExists then begin
343312 FavFolder := TFavoriteFolder.Create;
344- Node := FTreeView.Items.AddChildObjectFirst(Node, FAVORITE_LINK_NAME, FavFolder);
313+ Node := FTreeView.Items.AddChildObject(Node, FAVORITE_LINK_NAME, FavFolder);
345314 Node.ImageIndex := 14;
346315 Node.SelectedIndex := 14;
347316 end;
@@ -355,7 +324,7 @@ begin
355324
356325 {
357326 FavFolder := TFavoriteFolder.Create;
358- Node := FTreeView.Items.AddChildObjectFirst(nil, FAVORITE_ROOT_NAME, FavFolder);
327+ Node := FTreeView.Items.AddChildObject(nil, FAVORITE_ROOT_NAME, FavFolder);
359328 Node.ImageIndex := 12;
360329 Node.SelectedIndex := 13;
361330
@@ -391,16 +360,15 @@ begin
391360 ParentNode := FStack.Peek;
392361 if TObject(ParentNode.Data) is TFavoriteFolder then begin
393362 FavFolder := TFavoriteFolder.Create;
394- CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, Node.Attributes['title'], FavFolder);
363+ CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavFolder);
395364 CurrentNode.ImageIndex := 14;
396365 CurrentNode.SelectedIndex := 14;
366+ CurrentNode.Expanded := Node.Attributes[ 'expanded' ] = 'true';
397367 FStack.Push(CurrentNode);
398368 end;
399- for i := Node.ChildNodes.Count - 1 downto 0 do begin
369+ for i := 0 to Node.ChildNodes.Count - 1 do begin
400370 ReadNode(Node.ChildNodes[i]);
401371 end;
402- if TObject(ParentNode.Data) is TFavoriteFolder then
403- CurrentNode.Expanded := Node.Attributes[ 'expanded' ] = 'true';
404372 if FStack.Count <> 0 then
405373 FStack.Pop;
406374 end else if Node.NodeName = 'favitem' then begin
@@ -419,7 +387,7 @@ begin
419387 FavBoard := TFavoriteBoardItem.Create(
420388 Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], nil );
421389 end;
422- CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, Node.Attributes['title'], FavBoard);
390+ CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavBoard);
423391 CurrentNode.ImageIndex := 15;
424392 CurrentNode.SelectedIndex := 15;
425393 end else if Node.Attributes['favtype'] = 'thread' then begin
@@ -446,7 +414,7 @@ begin
446414 FavThread := TFavoriteThreadItem.Create(
447415 Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], nil );
448416 end;
449- CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, Node.Attributes['title'], FavThread);
417+ CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavThread);
450418 CurrentNode.ImageIndex := 16;
451419 CurrentNode.SelectedIndex := 16;
452420 end;
@@ -478,17 +446,11 @@ begin
478446 XMLDoc.SaveToFile(FileName);
479447 }
480448 var
481- FileName, tmpFileName: string;
449+ FileName: string;
482450 SaveList: TStringList;
483-
484451 begin
485452 FileName := GikoSys.GetConfigDir + FAVORITE_FILE_NAME;
486- if FileExists(FileName) then begin
487- tmpFileName := GikoSys.GetConfigDir + '~' + FAVORITE_FILE_NAME;
488- if FileExists(tmpFileName) then
489- SysUtils.DeleteFile(tmpFileName); //SysUtils.をつけないとWinAPIと区別できないので
490- RenameFile(FileName, tmpFileName);
491- end;
453+ MoveFile( PChar( FileName ), PChar( GikoSys.GetConfigDir + '~' + FAVORITE_FILE_NAME ) );
492454 SaveList := TStringList.Create;
493455 try
494456 SaveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
--- a/Giko.dfm
+++ b/Giko.dfm
@@ -1,11 +1,11 @@
11 object GikoForm: TGikoForm
2- Left = 246
3- Top = 188
2+ Left = 205
3+ Top = 186
44 HorzScrollBar.Visible = False
55 VertScrollBar.Visible = False
66 AutoScroll = False
77 Caption = '-'
8- ClientHeight = 404
8+ ClientHeight = 545
99 ClientWidth = 854
1010 Color = clBtnFace
1111 Font.Charset = SHIFTJIS_CHARSET
@@ -16,9 +16,11 @@ object GikoForm: TGikoForm
1616 KeyPreview = True
1717 OldCreateOrder = False
1818 Visible = True
19+ OnClose = FormClose
1920 OnCloseQuery = FormCloseQuery
2021 OnCreate = FormCreate
2122 OnDestroy = FormDestroy
23+ OnKeyUp = FormKeyUp
2224 OnMouseWheel = FormMouseWheel
2325 OnResize = FormResize
2426 OnShortCut = FormShortCut
@@ -27,7 +29,7 @@ object GikoForm: TGikoForm
2729 TextHeight = 12
2830 object StatusBar: TStatusBar
2931 Left = 0
30- Top = 384
32+ Top = 525
3133 Width = 854
3234 Height = 20
3335 Panels = <
@@ -38,7 +40,11 @@ object GikoForm: TGikoForm
3840 Width = 500
3941 end
4042 item
43+ Style = psOwnerDraw
4144 Width = 50
45+ end
46+ item
47+ Width = 100
4248 end>
4349 SimplePanel = False
4450 OnResize = StatusBarResize
@@ -47,13 +53,13 @@ object GikoForm: TGikoForm
4753 Left = 0
4854 Top = 77
4955 Width = 854
50- Height = 307
56+ Height = 448
5157 Align = alClient
5258 BevelOuter = bvNone
5359 TabOrder = 1
5460 object MessageSplitter: TSplitter
5561 Left = 0
56- Top = 268
62+ Top = 409
5763 Width = 854
5864 Height = 5
5965 Cursor = crVSplit
@@ -66,7 +72,7 @@ object GikoForm: TGikoForm
6672 Left = 0
6773 Top = 0
6874 Width = 854
69- Height = 268
75+ Height = 409
7076 Align = alClient
7177 BevelOuter = bvNone
7278 TabOrder = 0
@@ -74,7 +80,7 @@ object GikoForm: TGikoForm
7480 Left = 145
7581 Top = 0
7682 Width = 5
77- Height = 268
83+ Height = 409
7884 Cursor = crHSplit
7985 AutoSnap = False
8086 ResizeStyle = rsUpdate
@@ -83,7 +89,7 @@ object GikoForm: TGikoForm
8389 Left = 0
8490 Top = 0
8591 Width = 145
86- Height = 268
92+ Height = 409
8793 Align = alLeft
8894 BevelOuter = bvNone
8995 TabOrder = 0
@@ -270,7 +276,7 @@ object GikoForm: TGikoForm
270276 Left = 150
271277 Top = 0
272278 Width = 704
273- Height = 268
279+ Height = 409
274280 Align = alClient
275281 BevelOuter = bvNone
276282 TabOrder = 1
@@ -309,13 +315,13 @@ object GikoForm: TGikoForm
309315 OwnerData = True
310316 ReadOnly = True
311317 RowSelect = True
318+ PopupMenu = ListPopupMenu
312319 SmallImages = ItemIcon16
313320 StateImages = StateIconImageList
314321 TabOrder = 0
315322 ViewStyle = vsReport
316323 OnAdvancedCustomDrawItem = ListViewAdvancedCustomDrawItem
317324 OnColumnClick = ListViewColumnClick
318- OnColumnRightClick = ListViewColumnRightClick
319325 OnCustomDraw = ListViewCustomDraw
320326 OnData = ListViewData
321327 OnDataFind = ListViewDataFind
@@ -548,7 +554,7 @@ object GikoForm: TGikoForm
548554 Left = 0
549555 Top = 194
550556 Width = 704
551- Height = 74
557+ Height = 215
552558 Align = alClient
553559 BevelOuter = bvNone
554560 TabOrder = 1
@@ -556,7 +562,7 @@ object GikoForm: TGikoForm
556562 Left = 0
557563 Top = 46
558564 Width = 704
559- Height = 8
565+ Height = 149
560566 Align = alClient
561567 BevelOuter = bvNone
562568 UseDockManager = False
@@ -566,7 +572,7 @@ object GikoForm: TGikoForm
566572 Left = 0
567573 Top = 0
568574 Width = 704
569- Height = 8
575+ Height = 149
570576 Align = alClient
571577 TabOrder = 0
572578 OnEnter = BrowserEnter
@@ -575,7 +581,7 @@ object GikoForm: TGikoForm
575581 OnNewWindow2 = BrowserNewWindow2
576582 OnDocumentComplete = BrowserDocumentComplete
577583 ControlData = {
578- 4C000000C3480000D40000000000000000000000000000000000000000000000
584+ 4C000000C3480000660F00000000000000000000000000000000000000000000
579585 000000004C000000000000000000000001000000E0D057007335CF11AE690800
580586 2B2E12620A000000000000004C0000000114020000000000C000000000000046
581587 8000000000000000000000000000000000000000000000000000000000000000
@@ -584,7 +590,7 @@ object GikoForm: TGikoForm
584590 end
585591 object BrowserBottomPanel: TGikoPanel
586592 Left = 0
587- Top = 54
593+ Top = 195
588594 Width = 704
589595 Height = 20
590596 Align = alBottom
@@ -862,7 +868,7 @@ object GikoForm: TGikoForm
862868 end
863869 object MessagePanel: TPanel
864870 Left = 0
865- Top = 273
871+ Top = 414
866872 Width = 854
867873 Height = 34
868874 Align = alBottom
@@ -6009,7 +6015,7 @@ object GikoForm: TGikoForm
60096015 end
60106016 object ActionList: TActionList
60116017 Images = ToobarImageList
6012- Left = 5
6018+ Left = 8
60136019 Top = 372
60146020 object OnlyAHundredResAction: TAction
60156021 Category = #12473#12524#12483#12489
@@ -7065,20 +7071,6 @@ object GikoForm: TGikoForm
70657071 Hint = #12479#12502#12398#38918#30058#12434#33258#21205#24489#20803
70667072 OnExecute = TabAutoLoadActionExecute
70677073 end
7068- object JumpToNumOfResAction: TAction
7069- Category = #12473#12524#12483#12489
7070- Caption = #25351#23450#12375#12383#30058#21495#12398#12524#12473#12395#39131#12406
7071- Hint = #25351#23450#12375#12383#30058#21495#12398#12524#12473#12395#39131#12406
7072- ShortCut = 16455
7073- OnExecute = JumpToNumOfResActionExecute
7074- OnUpdate = JumpToNumOfResActionUpdate
7075- end
7076- object FavoriteTreeViewCollapseAction: TAction
7077- Category = #12362#27671#12395#20837#12426
7078- Caption = #12362#27671#12395#20837#12426#12484#12522#12540#12434#12377#12409#12390#38281#12376#12427
7079- Hint = #12362#27671#12395#20837#12426#12484#12522#12540#12434#12377#12409#12390#38281#12376#12427
7080- OnExecute = FavoriteTreeViewCollapseActionExecute
7081- end
70827074 end
70837075 object BrowserPopupMenu: TPopupMenu
70847076 Left = 68
@@ -7574,8 +7566,4 @@ object GikoForm: TGikoForm
75747566 AutoCheck = True
75757567 end
75767568 end
7577- object ListColumnPopupMenu: TPopupMenu
7578- Left = 37
7579- Top = 403
7580- end
75817569 end
--- a/Giko.pas
+++ b/Giko.pas
@@ -28,7 +28,6 @@ type
2828 TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
2929 TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser);
3030 TMinimizeType = (mtNone, mtMinimizing, mtMinimized);
31- TResizeType = (rtNone, rtResizing);
3231
3332 TBrowserRecord = class;
3433
@@ -528,7 +527,7 @@ type
528527 N65: TMenuItem;
529528 BBSSelectPopupMenu: TPopupMenu;
530529 PlugInMenu: TMenuItem;
531- TmpToolBar: TToolBar;
530+ TmpToolBar: TToolBar;
532531 TreeSelectNameCopy: TAction;
533532 TreeSelectNamePupupMenu: TMenuItem;
534533 BrowserPanel: TPanel;
@@ -551,7 +550,7 @@ type
551550 OpenLogFolder: TMenuItem;
552551 Browser: TWebBrowser;
553552 TabSave: TMenuItem;
554- TabOpen: TMenuItem;
553+ TabOpen: TMenuItem;
555554 TabsSaveAction: TAction;
556555 TabsOpenAction: TAction;
557556 ResRangePopupMenu: TPopupMenu;
@@ -574,14 +573,12 @@ type
574573 N69: TMenuItem;
575574 S7: TMenuItem;
576575 ThreadRangeButton: TToolButton;
577- TabAutoSaveAction: TAction;
576+ TabAutoSaveAction: TAction;
578577 TabAutoLoadAction: TAction;
579- ListColumnPopupMenu: TPopupMenu;
580- JumpToNumOfResAction: TAction;
581- FavoriteTreeViewCollapseAction: TAction;
582578 procedure FormCreate(Sender: TObject);
583579 procedure FormDestroy(Sender: TObject);
584580 procedure CabinetPanelHide(Sender: TObject);
581+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
585582 procedure ListViewData(Sender: TObject; Item: TListItem);
586583 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
587584 const FindString: String; const FindPosition: TPoint;
@@ -809,6 +806,8 @@ type
809806 procedure SelectComboBoxExit(Sender: TObject);
810807 procedure SelectResActionExecute(Sender: TObject);
811808 procedure SelectResActionUpdate(Sender: TObject);
809+ procedure FormKeyUp(Sender: TObject; var Key: Word;
810+ Shift: TShiftState);
812811 procedure AllResActionExecute(Sender: TObject);
813812 procedure AllResActionUpdate(Sender: TObject);
814813 procedure ReloadClick(Sender: TObject);
@@ -873,7 +872,7 @@ type
873872 var Handled: Boolean);
874873 procedure KoreCopyExecute(Sender: TObject);
875874 procedure BrowserTabPopupMenuPopup(Sender: TObject);
876- procedure MenuToolBarResize(Sender: TObject);
875+ procedure MenuToolBarResize(Sender: TObject);
877876 procedure StdToolBarResize(Sender: TObject);
878877 procedure LinkToolBarResize(Sender: TObject);
879878 procedure ListNameToolBarResize(Sender: TObject);
@@ -896,7 +895,7 @@ type
896895 procedure SetFocusForBrowserActionUpdate(Sender: TObject);
897896 procedure SetFocusForThreadListActionExecute(Sender: TObject);
898897 procedure SetFocusForCabinetActionExecute(Sender: TObject);
899- procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
898+ procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
900899 procedure BrowserMaxAndFocusActionUpdate(Sender: TObject);
901900 procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject);
902901 procedure ListViewExit(Sender: TObject);
@@ -919,18 +918,13 @@ type
919918 procedure OnlyAHundredResActionExecute(Sender: TObject);
920919 procedure OnlyKokoResActionExecute(Sender: TObject);
921920 procedure OnlyNewResActionExecute(Sender: TObject);
922- procedure BrowsBoradHeadActionExecute(Sender: TObject);
921+ procedure BrowsBoradHeadActionExecute(Sender: TObject);
923922 procedure BrowsBoradHeadActionUpdate(Sender: TObject);
924923 procedure EditNGActionExecute(Sender: TObject);
925924 procedure ThreadRangeActionUpdate(Sender: TObject);
926925 procedure ThreadRangeActionExecute(Sender: TObject);
927- procedure TabAutoSaveActionExecute(Sender: TObject);
926+ procedure TabAutoSaveActionExecute(Sender: TObject);
928927 procedure TabAutoLoadActionExecute(Sender: TObject);
929- procedure ListViewColumnRightClick(Sender: TObject;
930- Column: TListColumn; Point: TPoint);
931- procedure JumpToNumOfResActionExecute(Sender: TObject);
932- procedure JumpToNumOfResActionUpdate(Sender: TObject);
933- procedure FavoriteTreeViewCollapseActionExecute(Sender: TObject);
934928 private
935929 { Private 宣言 }
936930 //RoundList : TRoundList;
@@ -978,24 +972,22 @@ type
978972
979973 FDropSpaceNode: TTreeNode;
980974
981- FDragTime : Cardinal; ///< リンクのD&D用
982- FDragButton : TToolButton; ///< リンクのD&D用にDragしてるButton保存
983- FDragWFirst : Boolean; ///< WebTabのD&D用
975+ FDragTime : Cardinal; //リンクのD&D用
976+ FDragButton : TToolButton; //リンクのD&D用にDragしてるButton保存
977+ FDragWFirst : Boolean; //WebTabのD&D用
984978
985- FListViewBackGroundColor : TColor; ///< ListViewのBackGroundColor
986- FUseOddResOddColor : Boolean; ///< 取得レス数とスレッドのレス数が違ったときに他の色で表示
987- FOddColor : TColor; ///< その色
979+ FListViewBackGroundColor : TColor; //ListViewのBackGroundColor
980+ FUseOddResOddColor : Boolean; //取得レス数とスレッドのレス数が違ったときに他の色で表示
981+ FOddColor : TColor; //その色
988982
989- FSelectResWord : string; ///< レス絞込ワード
990- FIsIgnoreResize : TResizeType; ///< リサイズイベントを無視するかどうか
991- FIsMinimize : TMinimizeType; ///< 最小化している最中か
992- FOldFormWidth : Integer; ///< 直前のウィンドウの幅
993- FToolBarSettingSender : TToolBarSettingSenderType; ///< ツールバー設定をクリックしたクールバー
994- FMouseDownPos : TPoint; ///< ブラウザタブでマウスを押したときの座標
983+ FSelectResWord : string; // レス絞込ワード
984+ FIsIgnoreResize : Boolean; // リサイズイベントを無視するかどうか
985+ FIsMinimize : TMinimizeType; // 最小化している最中か
986+ FOldFormWidth : Integer; // 直前のウィンドウの幅
987+ FToolBarSettingSender : TToolBarSettingSenderType; // ツールバー設定をクリックしたクールバー
988+ FMouseDownPos : TPoint; // ブラウザタブでマウスを押したときの座標
995989 FBrowsers: TList;
996- FResRangeMenuSelect : Longint; ///< ResRangeButton で選択されている項目 (フォーマットは ResRange 互換)
997- FStartUp : Boolean;
998- FIsHandledWheel : Boolean; ///< 既に受け取った WM_MOUSEWHEEL かどうか
990+ FResRangeMenuSelect : Longint; ///< ResRangeButton で選択されている項目 (フォーマットは ResRange 互換)
999991 procedure SetBoardTreeNode( inBBS : TBBS );
1000992 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
1001993 function SetBoardListItem(Category: TCategory): Integer;
@@ -1008,7 +1000,7 @@ type
10081000 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
10091001 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
10101002
1011-
1003+ procedure SetActiveList(Obj: TObject);
10121004 procedure ListClick;
10131005 procedure ListDoubleClick(Shift: TShiftState);
10141006 procedure BrowserMovement(const AName: string); overload;
@@ -1059,41 +1051,37 @@ type
10591051 procedure BBSMenuItemOnClick( Sender : TObject );
10601052 //
10611053 procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
1062- /// CoolBar の設定を変数に保存
1054+ // CoolBar の設定を変数に保存
10631055 procedure SaveCoolBarSettings;
1064- /// CoolBar の設定を変数から復元
1056+ // CoolBar の設定を変数から復元
10651057 procedure LoadCoolBarSettings;
1066- /// 最小化される
1058+ // 最小化される
10671059 procedure OnMinimize;
1068- /// 最小化された
1060+ // 最小化された
10691061 procedure OnMinimized;
1070- /// CoolBar がサイズ変更された
1062+ // CoolBar がサイズ変更された
10711063 procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
1072- /// TreeView がクリックされた
1064+ // TreeView がクリックされた
10731065 procedure TreeClick( Node : TTreeNode );
1074- /// TreeView がダブルクリックされた
1066+ // TreeView がダブルクリックされた
10751067 procedure TreeDoubleClick( Node : TTreeNode );
1076- /// ギコナビのメッセージループを横取りします
1068+ // ギコナビのメッセージループを横取りします
10771069 procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
1078- /// ブラウザのキーダウンイベント
1079- /// イベントを取り扱った場合は True を返す
1070+ // ブラウザのキーダウンイベント
1071+ // イベントを取り扱った場合は True を返す
10801072 function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
1081- /// 各所にあるキャビネット・ BBS メニューをセット/更新
1073+ // 各所にあるキャビネット・ BBS メニューをセット/更新
10821074 procedure SetBBSMenu;
10831075 function WebBrowserClick(Sender: TObject): WordBool;
10841076 procedure SkinorCSSFilesCopy(path: string);
1085- /// タブ取得
1077+ // タブ取得
10861078 function GetTabURLs(AStringList: TStringList) : Boolean;
1087- /// タブ保存
1079+ // タブ保存
10881080 function SaveTabURLs : Boolean;
1089- /// タブ読み出し
1081+ // タブ読み出し
10901082 function LoadTabURLs : Boolean;
1091- /// バンド幅を再計算・再設定する
1083+ // バンド幅を再計算・再設定する
10921084 procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
1093- /// ListView の Column を真のカラムに変換
1094- function ActiveListTrueColumn( column : TListColumn ) : TListColumn;
1095- /// ListColumnPopupMenu アイテムのクリックイベント
1096- procedure ListColumnPopupMenuOnClick( Sender : TObject );
10971085 protected
10981086 procedure CreateParams(var Params: TCreateParams); override;
10991087 procedure WndProc(var Message: TMessage); override;
@@ -1105,11 +1093,8 @@ type
11051093 { Public 宣言 }
11061094 // FDownload: TDownload;
11071095 FControlThread: TThreadControl;
1108- procedure MoveToURL(const inURL: string);
1109- function InsertBrowserTab(
1110- ThreadItem : TThreadItem;
1111- ActiveTab : Boolean = True
1112- ) : TBrowserRecord;
1096+ procedure MoveToURL(URL: string);
1097+ procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
11131098 procedure ReloadBBS;
11141099 function GetHttpState: Boolean;
11151100 procedure SetEnabledCloseButton(Enabled: Boolean);
@@ -1129,7 +1114,7 @@ type
11291114 function GetActiveContent: TThreadItem;
11301115 function GetActiveList: TObject;
11311116
1132-
1117+ property ActiveList: TObject read GetActiveList write SetActiveList;
11331118 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
11341119
11351120 procedure SetListViewType(AViewType: TGikoViewType); overload;
@@ -1153,19 +1138,16 @@ type
11531138 // property Favorite: TFavorite read FFavorite write FFavorite;
11541139 procedure SetToolBarPopup;
11551140 procedure ShowFavoriteAddDialog( Item : TObject );
1156- procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1157- procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
1141+ procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1142+ procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
11581143 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
11591144 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
11601145 property OddColor : TColor read FOddColor write FOddColor;
11611146
11621147 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
11631148 procedure OnPlugInMenuItem( Sender : TObject );
1164- procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
1165- /// ListView のカラム幅および位置の保存 KuroutSettingからよびだしたいので
1166- procedure ActiveListColumnSave;
1167- procedure SetActiveList(Obj: TObject);
1168- property ActiveList: TObject read GetActiveList write SetActiveList;
1149+ procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
1150+
11691151 published
11701152 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
11711153 end;
@@ -1194,18 +1176,18 @@ type
11941176 TBrowserRecord = class( TObject )
11951177 private
11961178 FBrowser : TWebBrowser;
1197- FEvent: THTMLDocumentEventSink; //!< ブラウザドキュメントイベント
1179+ FEvent: THTMLDocumentEventSink;//ブラウザドキュメントイベント
11981180 FThread : TThreadItem;
11991181 FLastSize : Integer;
12001182 FRepaint : Boolean;
1201- FMovement : string; //!< スクロール先アンカー
1183+ // FOnlyHundred: Boolean;
12021184 public
12031185 destructor Destroy; override;
12041186 property Browser : TWebBrowser read FBrowser write FBrowser;
12051187 property Thread : TThreadItem read FThread write FThread;
12061188 property LastSize : Integer read FLastSize write FLastSize;
12071189 property Repaint : Boolean read FRepaint write FRepaint;
1208- property Movement : string read FMovement write FMovement;
1190+// property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred;
12091191 end;
12101192
12111193 var
@@ -1266,7 +1248,6 @@ const
12661248 USER_RESIZED = WM_USER + 2001;
12671249 USER_MINIMIZED = WM_USER + 2002;
12681250 USER_SETLINKBAR = WM_USER + 2003;
1269- USER_DOCUMENTCOMPLETE = WM_USER + 2004; ///< wParam : TWebBrowser
12701251 SELECTTIME_INTERBAL = 110;
12711252
12721253 BROWSER_COUNT = 5; //ブラウザの数
@@ -1304,12 +1285,11 @@ begin
13041285 Writeln(' 終了時は、ギコナビウィンドウを閉じてください');
13051286 Writeln('============================================================');
13061287 {$ENDIF}
1307- FStartUp := false;
13081288 Application.OnDeactivate := AppFormDeactivate;
13091289 Self.OnDeactivate := AppFormDeactivate;
13101290 Application.HookMainWindow(Hook);
13111291 Application.OnMessage := HandleAppMessage; //なんか無くても大丈夫になった by もじゅ
1312-// Self.DoubleBuffered := true;
1292+ Self.DoubleBuffered := true;
13131293 FTreeType := gttNone;
13141294
13151295 FSearchDialog := nil;
@@ -1324,14 +1304,13 @@ begin
13241304 newBrowser.Align := alNone;
13251305 newBrowser.Left := 0;
13261306 newBrowser.Top := 0;
1327- newBrowser.StatusBar := false;
1328- newBrowser.MenuBar := false;
1329- newBrowser.AddressBar := false;
1307+ //newBrowser.DoubleBuffered := true;
13301308 newBrowser.OnDocumentComplete := BrowserDocumentComplete;
13311309 newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
13321310 newBrowser.OnEnter := BrowserEnter;
13331311 newBrowser.OnNewWindow2 := BrowserNewWindow2;
13341312 newBrowser.OnStatusTextChange := BrowserStatusTextChange;
1313+ //newBrowser.OnTitleChange := BrowserTitleChange;
13351314 newBrowser.Navigate(BLANK_HTML);
13361315 ShowWindow(newBrowser.Handle, SW_HIDE);
13371316
@@ -1340,7 +1319,7 @@ begin
13401319 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
13411320
13421321 // 起動時に保存されてしまう対策
1343- FIsIgnoreResize := rtResizing;
1322+ FIsIgnoreResize := True;
13441323
13451324 //手のカーソル
13461325 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
@@ -1349,8 +1328,38 @@ begin
13491328 //アドレス履歴読み込み
13501329 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
13511330
1331+ // 外部板プラグインをロード(ReadBoardFile, LoadHistory より先に行うこと)
1332+ InitializeBoardPlugIns;
1333+
13521334 EnabledCloseButton := True;
13531335
1336+
1337+ //巡回データ読み込み
1338+ RoundList := TRoundList.Create;
1339+ RoundList.LoadRoundBoardFile;
1340+
1341+ // ボードファイル列挙(ReadFavorite より先に行うこと)
1342+ GikoSys.ListBoardFile;
1343+
1344+ RoundList.LoadRoundThreadFile;
1345+
1346+ if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1347+ GikoSys.ListBoardFile;
1348+
1349+ // メニューに追加
1350+ SetBBSMenu;
1351+
1352+ // ヒストリリスト(LoadHistory よりも先に行うこと)
1353+ FHistoryList := TList.Create;
1354+
1355+ // 履歴読み込み
1356+ LoadHistory;
1357+
1358+ //お気に入り読み込み
1359+// FFavorite := TFavorite.Create(FavoriteTreeView);
1360+ FavoriteDM.SetFavTreeView(FavoriteTreeView);
1361+ FavoriteDM.ReadFavorite;
1362+
13541363 //リストスタイル
13551364 ListView.ViewStyle := GikoSys.Setting.ListStyle;
13561365
@@ -1394,8 +1403,8 @@ begin
13941403 ListView.Font.Name := GikoSys.Setting.ListFontName;
13951404 ListView.Font.Size := GikoSys.Setting.ListFontSize;
13961405 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1397- ListViewBackGroundColor := clWhite; // デフォルトに設定したのち
1398- ListViewBackGroundColor := GikoSys.Setting.ListBackColor; // ユーザ定義に変更
1406+ //ListView.Color := GikoSys.Setting.ListBackColor;
1407+ ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
13991408 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
14001409 FOddColor := GikoSys.Setting.OddColor;
14011410
@@ -1463,35 +1472,6 @@ begin
14631472 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
14641473 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
14651474
1466- // 外部板プラグインをロード(ReadBoardFile, LoadHistory より先に行うこと)
1467- InitializeBoardPlugIns;
1468-
1469- //巡回データ読み込み
1470- RoundList := TRoundList.Create;
1471- RoundList.LoadRoundBoardFile;
1472-
1473- // ボードファイル列挙(ReadFavorite より先に行うこと)
1474- GikoSys.ListBoardFile;
1475-
1476- RoundList.LoadRoundThreadFile;
1477-
1478- if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1479- GikoSys.ListBoardFile;
1480-
1481- // メニューに追加
1482- SetBBSMenu;
1483-
1484- // ヒストリリスト(LoadHistory よりも先に行うこと)
1485- FHistoryList := TList.Create;
1486-
1487- // 履歴読み込み
1488- LoadHistory;
1489-
1490- //お気に入り読み込み
1491-// FFavorite := TFavorite.Create(FavoriteTreeView);
1492- FavoriteDM.SetFavTreeView(FavoriteTreeView);
1493- FavoriteDM.ReadFavorite;
1494-
14951475 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
14961476 ArrangeAction.Execute;
14971477
@@ -1688,7 +1668,7 @@ begin
16881668 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
16891669 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
16901670 // 起動時に保存されてしまう対策 2
1691- FIsIgnoreResize := rtResizing;
1671+ FIsIgnoreResize := True;
16921672 CabinetBBSAction.Execute;
16931673 end;
16941674 end else begin
@@ -1697,7 +1677,7 @@ begin
16971677 end;
16981678
16991679 // 起動時に保存されてしまう対策 3
1700- FIsIgnoreResize := rtResizing;
1680+ FIsIgnoreResize := True;
17011681
17021682 //オートログイン
17031683 if GikoSys.Setting.AutoLogin then
@@ -1721,7 +1701,7 @@ begin
17211701 //Samba24のファイルチェック
17221702 GikoSys.SambaFileExists();
17231703
1724- //にちゃん語ファイル読み出し
1704+ //タブ自動読み込み (AV発生のため一時封印)
17251705 end;
17261706
17271707 // CoolBar の設定を変数に保存
@@ -1731,7 +1711,7 @@ var
17311711 CoolSet : TCoolSet;
17321712 begin
17331713
1734- if IsIconic( Handle ) or (FIsIgnoreResize <> rtNone) then
1714+ if IsIconic( Handle ) or FIsIgnoreResize then
17351715 Exit;
17361716
17371717 //クールバー保存(Main)
@@ -1772,7 +1752,7 @@ begin
17721752 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
17731753 CoolSet := GikoSys.Setting.MainCoolSet[i];
17741754 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1775- FIsIgnoreResize := rtNone;
1755+ FIsIgnoreResize := False;
17761756 SaveCoolBarSettings;
17771757 Exit;
17781758 end;
@@ -1791,7 +1771,7 @@ begin
17911771 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
17921772 CoolSet := GikoSys.Setting.ListCoolSet[i];
17931773 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1794- FIsIgnoreResize := rtNone;
1774+ FIsIgnoreResize := False;
17951775 SaveCoolBarSettings;
17961776 Exit;
17971777 end;
@@ -1810,7 +1790,7 @@ begin
18101790 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
18111791 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
18121792 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1813- FIsIgnoreResize := rtNone;
1793+ FIsIgnoreResize := False;
18141794 SaveCoolBarSettings;
18151795 Exit;
18161796 end;
@@ -1829,70 +1809,59 @@ end;
18291809 //
18301810 procedure TGikoForm.FormShow(Sender: TObject);
18311811 begin
1832- if not FStartUp then begin
1833- ShowWindow(Application.Handle, SW_HIDE);
1834-
1835- //FormCreateでやると可視設定が反映されない場合があるのでFormShowでやることにした
1836- //ツールバー表示
1837- StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1838- StdToolBarVisibleActionExecute( nil );
1839- AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1840- AddressBarVisibleActionExecute( nil );
1841- LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1842- LinkBarVisibleActionExecute( nil );
1843- ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1844- ListToolBarVisibleActionExecute( nil );
1845- ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1846- ListNameBarVisibleActionExecute( nil );
1847- BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1848- BrowserToolBarVisibleActionExecute( nil );
1849- BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1850- BrowserNameBarVisibleActionExecute( nil );
1851-
1852- //ブラウザタブ
1853- BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1854- BrowserTabVisibleActionExecute(nil);
1855-
1856- if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1857- BrowserTabTopAction.Checked := True;
1858- BrowserTabTopActionExecute(nil);
1859- end else begin
1860- BrowserTabBottomAction.Checked := True;
1861- BrowserTabBottomActionExecute(nil);
1862- end;
1863-
1864- if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1865- BrowserTabTabStyleAction.Checked := True;
1866- BrowserTabTabStyleActionExecute(nil);
1867- end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1868- BrowserTabButtonStyleAction.Checked := True;
1869- BrowserTabButtonStyleActionExecute(nil);
1870- end else begin
1871- BrowserTabFlatStyleAction.Checked := True;
1872- BrowserTabFlatStyleActionExecute(nil);
1873- end;
1874-
1875- // ListView のヘッダドラッグ
1876-// ListView.FullDrag := True;
1812+ ShowWindow(Application.Handle, SW_HIDE);
1813+
1814+ //FormCreateでやると可視設定が反映されない場合があるのでFormShowでやることにした
1815+ //ツールバー表示
1816+ StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1817+ StdToolBarVisibleActionExecute( nil );
1818+ AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1819+ AddressBarVisibleActionExecute( nil );
1820+ LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1821+ LinkBarVisibleActionExecute( nil );
1822+ ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1823+ ListToolBarVisibleActionExecute( nil );
1824+ ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1825+ ListNameBarVisibleActionExecute( nil );
1826+ BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1827+ BrowserToolBarVisibleActionExecute( nil );
1828+ BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1829+ BrowserNameBarVisibleActionExecute( nil );
1830+
1831+ //ブラウザタブ
1832+ BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1833+ BrowserTabVisibleActionExecute(nil);
1834+
1835+ if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1836+ BrowserTabTopAction.Checked := True;
1837+ BrowserTabTopActionExecute(nil);
1838+ end else begin
1839+ BrowserTabBottomAction.Checked := True;
1840+ BrowserTabBottomActionExecute(nil);
1841+ end;
18771842
1878- // CoolBar 復元
1879- LoadCoolBarSettings;
1843+ if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1844+ BrowserTabTabStyleAction.Checked := True;
1845+ BrowserTabTabStyleActionExecute(nil);
1846+ end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1847+ BrowserTabButtonStyleAction.Checked := True;
1848+ BrowserTabButtonStyleActionExecute(nil);
1849+ end else begin
1850+ BrowserTabFlatStyleAction.Checked := True;
1851+ BrowserTabFlatStyleActionExecute(nil);
1852+ end;
18801853
1881- FIsIgnoreResize := rtNone;
1854+ // CoolBar 復元
1855+ LoadCoolBarSettings;
18821856
1883- //TabAutoLoad
1884- //FormCreteから移動。
1885- if GikoSys.Setting.TabAutoLoadSave then begin
1886- TabAutoLoadAction.Execute;
1887- end;
1888- //にちゃん語案内サポート機能
1889- if GikoSys.Setting.GengoSupport then begin
1890- //予定地
1891- //Test向け
1892- end;
1857+ FIsIgnoreResize := False;
18931858
1894- FStartUp := true;
1859+ //TabAutoLoad
1860+ //FormCreteから移動。
1861+ if GikoSys.Setting.TabAutoLoadSave then begin
1862+ TabAutoLoadAction.Execute;
18951863 end;
1864+
18961865 end;
18971866
18981867 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
@@ -1924,7 +1893,17 @@ begin
19241893 // Application.OnDeactivate := nil;
19251894 // Self.OnDeactivate := nil;
19261895 try
1927- ActiveListColumnSave;
1896+ //column幅
1897+ if GetActiveList is TBBS then begin
1898+ for i := 0 to ListView.Columns.Count - 1 do
1899+ GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1900+ end else if GetActiveList is TCategory then begin
1901+ for i := 0 to ListView.Columns.Count - 1 do
1902+ GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1903+ end else if GetActiveList is TBoard then begin
1904+ for i := 0 to ListView.Columns.Count - 1 do
1905+ GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1906+ end;
19281907 except
19291908 end;
19301909 try
@@ -2101,6 +2080,10 @@ begin
21012080
21022081 end;
21032082
2083+//フォームクローズ
2084+procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
2085+begin
2086+end;
21042087 //キャビネット×ボタンクリック
21052088 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
21062089 begin
@@ -2238,9 +2221,9 @@ begin
22382221 Root.ImageIndex := ITEM_ICON_2CH1;
22392222 Root.SelectedIndex := ITEM_ICON_2CH2;
22402223 Root.Data := inBBS;
2241- for i := inBBS.Count - 1 downto 0 do begin
2224+ for i := 0 to inBBS.Count - 1 do begin
22422225 Category := TCategory(inBBS.Items[i]);
2243- CategoryNode := TreeView.Items.AddChildFirst(Root, Category.Title);
2226+ CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
22442227 CategoryNode.Data := Category;
22452228 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
22462229 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
@@ -2253,10 +2236,10 @@ begin
22532236 Category.CustomSort(BoardSortProc);
22542237 end;
22552238
2256- for j := Category.Count - 1 downto 0 do begin
2239+ for j := 0 to Category.Count - 1 do begin
22572240 Board := TBoard(Category.Items[j]);
22582241 Board.BeginUpdate;
2259- BoardNode := TreeView.Items.AddChildFirst(CategoryNode, Board.Title);
2242+ BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
22602243 BoardNode.Data := Board;
22612244 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
22622245 if not Board.IsLogFile then begin
@@ -2290,37 +2273,22 @@ begin
22902273 end;
22912274
22922275 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2276+const
2277+ COLUMN: array[0..0] of string = ('カテゴリ名');
22932278 var
2294- TitleColumn : TListColumn;
2295- ListColumn : TListColumn;
2296- i, id, idx : Integer;
2279+ ListColumn: TListColumn;
2280+ i: Integer;
22972281 begin
22982282 ListView.Items.BeginUpdate;
22992283 try
23002284 Screen.Cursor := crHourGlass;
23012285
23022286 ListView.Columns.Clear;
2303- TitleColumn := ListView.Columns.Add;
2304- TitleColumn.Caption := GikoBBSColumnCaption[ Ord( gbbscTitle ) ];
2305- TitleColumn.Width := GikoSys.Setting.BBSColumnWidth[ Ord( gbbscTitle ) ];
2306- idx := 0;
2307- for i := 0 to GikoSys.Setting.BBSColumnOrder.Count - 1 do begin
2308- if GikoSys.Setting.BBSColumnOrder[ i ] = gbbscTitle then begin
2309- TitleColumn.Tag := i;
2310- idx := i;
2311- end else begin
2312- id := Ord( GikoSys.Setting.BBSColumnOrder[ i ] );
2313- if (Integer( Low( TGikoBBSColumnID ) ) <= id) and
2314- (id <= Integer( High( TGikoBBSColumnID ) )) then begin
2315- ListColumn := ListView.Columns.Add;
2316- // ListColumn.Tag := id;
2317- ListColumn.Tag := i;
2318- ListColumn.Caption := GikoBBSColumnCaption[ id ];
2319- ListColumn.Width := GikoSys.Setting.BBSColumnWidth[ id ];
2320- end;
2321- end;
2287+ for i := 0 to Length(COLUMN) - 1 do begin
2288+ ListColumn := ListView.Columns.Add;
2289+ ListColumn.Caption := COLUMN[i];
2290+ ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
23222291 end;
2323- TitleColumn.Index := idx;
23242292
23252293 ListView.Items.Count := 0;
23262294 ListView.Items.Clear;
@@ -2341,11 +2309,8 @@ begin
23412309
23422310 FSortIndex := GikoSys.Setting.BBSSortIndex;
23432311 FSortOrder := GikoSys.Setting.BBSSortOrder;
2344- for i := ListView.Columns.Count - 1 downto 0 do begin
2345- idx := ListView.Column[ i ].Tag;
2346- if FSortIndex = Ord( GikoSys.Setting.BBSColumnOrder[ idx ] ) then
2347- ListViewSort( nil, ListView.Column[ i ] );
2348- end;
2312+ if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2313+ ListViewSort(nil, ListView.Column[FSortIndex]);
23492314
23502315 Result := ABBS2ch.Count;
23512316 finally
@@ -2355,37 +2320,22 @@ begin
23552320 end;
23562321
23572322 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2323+const
2324+ COLUMN: array[0..2] of string = ('板名', '巡回予約', '取得日時');
23582325 var
2359- TitleColumn : TListColumn;
2360- ListColumn : TListColumn;
2361- i, id, idx : Integer;
2326+ ListColumn: TListColumn;
2327+ i: Integer;
23622328 begin
23632329 ListView.Items.BeginUpdate;
23642330 try
23652331 Screen.Cursor := crHourGlass;
23662332
23672333 ListView.Columns.Clear;
2368- TitleColumn := ListView.Columns.Add;
2369- TitleColumn.Caption := GikoCategoryColumnCaption[ Ord( gccTitle ) ];
2370- TitleColumn.Width := GikoSys.Setting.CategoryColumnWidth[ Ord( gccTitle ) ];
2371- idx := 0;
2372- for i := 0 to GikoSys.Setting.CategoryColumnOrder.Count - 1 do begin
2373- if GikoSys.Setting.CategoryColumnOrder[ i ] = gccTitle then begin
2374- TitleColumn.Tag := i;
2375- idx := i;
2376- end else begin
2377- id := Ord( GikoSys.Setting.CategoryColumnOrder[ i ] );
2378- if (Integer( Low( TGikoCategoryColumnID ) ) <= id) and
2379- (id <= Integer( High( TGikoCategoryColumnID ) )) then begin
2380- ListColumn := ListView.Columns.Add;
2381-// ListColumn.Tag := id;
2382- ListColumn.Tag := i;
2383- ListColumn.Caption := GikoCategoryColumnCaption[ id ];
2384- ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[ id ];
2385- end;
2386- end;
2334+ for i := 0 to Length(COLUMN) - 1 do begin
2335+ ListColumn := ListView.Columns.Add;
2336+ ListColumn.Caption := COLUMN[i];
2337+ ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
23872338 end;
2388- TitleColumn.Index := idx;
23892339
23902340 ListView.Items.Count := 0;
23912341 ListView.Items.Clear;
@@ -2406,11 +2356,8 @@ begin
24062356
24072357 FSortIndex := GikoSys.Setting.CategorySortIndex;
24082358 FSortOrder := GikoSys.Setting.CategorySortOrder;
2409- for i := ListView.Columns.Count - 1 downto 0 do begin
2410- idx := ListView.Column[ i ].Tag;
2411- if FSortIndex = Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] ) then
2412- ListViewSort( nil, ListView.Column[ i ] );
2413- end;
2359+ if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2360+ ListViewSort(nil, ListView.Column[FSortIndex]);
24142361
24152362 Result := Category.Count;
24162363 finally
@@ -2420,45 +2367,39 @@ begin
24202367 end;
24212368
24222369 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2423-var
2424- TitleColumn : TListColumn;
2425- ListColumn : TListColumn;
2426- i, id, idx : Integer;
2370+const
2371+ COLUMN: array[0..7] of string = ('スレッド名', 'カウント', '取得', '新着',
2372+ '未読', '巡回予約', '取得日時', 'スレ作成日時');
2373+ COLUMN_NONACQUIREDCOUNT: string = '未取得';
2374+ COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
2375+ taRightJustify, taRightJustify,
2376+ taRightJustify, taLeftJustify,
2377+ taLeftJustify, taLeftJustify);
2378+ //No, スレッド名, カウント, 巡回予約, 取得日時
2379+var
2380+ ListColumn: TListColumn;
2381+ i: Integer;
24272382 begin
24282383 ListView.Items.BeginUpdate;
24292384 try
24302385 Screen.Cursor := crHourGlass;
24312386
2432-{*
24332387 // チラつき防止のため、変更されている場合のみ
24342388 // ※名称は違うがカラム数が同じ、といった場合に対処できないので注意
2435- if ListView.Columns.Count <> GikoSys.Setting.BoardColumnOrder.Count then
2436-*}
2389+ if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
24372390 begin
24382391 ListView.Columns.Clear;
2439- TitleColumn := ListView.Columns.Add;
2440- TitleColumn.Caption := GikoBoardColumnCaption[ Ord( gbcTitle ) ];
2441- TitleColumn.Width := GikoSys.Setting.BoardColumnWidth[ Ord( gbcTitle ) ];
2442- idx := 0;
2443- for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
2444- if GikoSys.Setting.BoardColumnOrder[ i ] = gbcTitle then begin
2445- TitleColumn.Tag := i;
2446- idx := i;
2447- end else begin
2448- id := Ord( GikoSys.Setting.BoardColumnOrder[ i ] );
2449- if (Integer( Low( TGikoBoardColumnID ) ) <= id) and
2450- (id <= Integer( High( TGikoBoardColumnID ) )) then begin
2451- ListColumn := ListView.Columns.Add;
2452- ListColumn.Caption := GikoBoardColumnCaption[ id ];
2453- // ListColumn.Tag := id;
2454- ListColumn.Tag := i;
2455- ListColumn.Width := GikoSys.Setting.BoardColumnWidth[ id ];
2456- ListColumn.Alignment := GikoBoardColumnAlignment[ id ];
2457- end;
2458- end;
2392+ for i := 0 to Length(COLUMN) - 1 do begin
2393+ ListColumn := ListView.Columns.Add;
2394+ ListColumn.Caption := COLUMN[i];
2395+ ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2396+ ListColumn.Alignment := COLUMN_ALIGNMENT[i];
24592397 end;
2460- TitleColumn.Index := idx;
24612398 end;
2399+ if GikoSys.Setting.NonAcquiredCount then
2400+ ListView.Columns[2].Caption := COLUMN_NONACQUIREDCOUNT
2401+ else
2402+ ListView.Columns[2].Caption := COLUMN[2];
24622403
24632404 ListView.Items.Count := 0;
24642405 ListView.Items.Clear;
@@ -2476,11 +2417,8 @@ begin
24762417
24772418 FSortIndex := GikoSys.Setting.BoardSortIndex;
24782419 FSortOrder := GikoSys.Setting.BoardSortOrder;
2479- for i := ListView.Columns.Count - 1 downto 0 do begin
2480- idx := ListView.Column[ i ].Tag;
2481- if FSortIndex = Ord( GikoSys.Setting.BoardColumnOrder[ idx ] ) then
2482- ListViewSort( nil, ListView.Column[ i ] );
2483- end;
2420+ if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2421+ ListViewSort(nil, ListView.Column[FSortIndex]);
24842422
24852423 Result := Board.Count;
24862424 finally
@@ -2500,11 +2438,9 @@ var
25002438 ThreadItem: TThreadItem;
25012439 RepStr: string;
25022440 ActivListObj : TObject;
2503- i, idx : Integer;
25042441 begin
25052442 ActivListObj := ActiveList;
25062443 if ActivListObj is TBBS then begin
2507- //===== カテゴリリスト =====
25082444 BBS := TBBS(ActivListObj);
25092445
25102446 ListView.StateImages := nil;
@@ -2527,10 +2463,7 @@ begin
25272463
25282464 Item.ImageIndex := ITEM_ICON_CATEGORY1;
25292465 Item.Data := Category;
2530-
25312466 end else if ActivListObj is TCategory then begin
2532-
2533- //===== 板リスト =====
25342467 Category := TCategory(ActivListObj);
25352468
25362469 ListView.StateImages := nil;
@@ -2551,44 +2484,25 @@ begin
25512484 else
25522485 Item.Caption := Board.Title;
25532486
2554- if Item.SubItems.Count <> ListView.Columns.Count then begin
2487+ if Item.SubItems.Count <> 2 then begin
25552488 Item.SubItems.Clear;
2556- for i := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 1 do
2557- Item.SubItems.Add('');
2489+ Item.SubItems.Add('');
2490+ Item.SubItems.Add('');
25582491 end;
25592492
25602493 Item.ImageIndex := ITEM_ICON_BOARD1;
25612494
2562- idx := 0;
2563- for i := 0 to ListView.Columns.Count - 1 do begin
2564- if GikoSys.Setting.CategoryColumnOrder.Count <= i then
2565- Break;
2566-// case TGikoCategoryColumnID( ListView.Column[ i ].Tag ) of
2567- case GikoSys.Setting.CategoryColumnOrder[ i ] of
2568- gccTitle:
2569- // Item.Caption は SubItems に含まれ無いので
2570- Dec( idx );
2571-
2572- gccRoundName:
2573- if Board.Round then
2574- Item.SubItems[ idx ] := Board.RoundName // '予約'
2575- else
2576- Item.SubItems[ idx ] := '';
2577-
2578- gccLastModified:
2579- if Board.RoundDate = ZERO_DATE then begin
2580- Item.SubItems[ idx ] := '';
2581- end else
2582- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2583- end;
2584- Inc( idx );
2585- end;
2495+ if Board.Round then
2496+ Item.SubItems[0] := Board.RoundName // '予約'
2497+ else
2498+ Item.SubItems[0] := '';
25862499
2500+ if Board.RoundDate = ZERO_DATE then begin
2501+ Item.SubItems[1] := '';
2502+ end else
2503+ Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
25872504 Item.Data := Board;
2588-
25892505 end else if ActivListObj is TBoard then begin
2590-
2591- //===== スレリスト =====
25922506 Board := TBoard(ActivListObj);
25932507
25942508 if GikoSys.Setting.ListIconVisible then
@@ -2634,10 +2548,15 @@ begin
26342548 RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
26352549 //RepStr := StringReplace(RepStr, '@`', ',', [rfReplaceAll]);
26362550
2637- if Item.SubItems.Count <> ListView.Columns.Count then begin
2551+ if Item.SubItems.Count <> 7 then begin
26382552 Item.SubItems.Clear;
2639- for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do
2640- Item.SubItems.Add('');
2553+ Item.SubItems.Add('');
2554+ Item.SubItems.Add('');
2555+ Item.SubItems.Add('');
2556+ Item.SubItems.Add('');
2557+ Item.SubItems.Add('');
2558+ Item.SubItems.Add('');
2559+ Item.SubItems.Add('');
26412560 end;
26422561
26432562 if ListNumberVisibleAction.Checked then
@@ -2653,105 +2572,49 @@ begin
26532572 end;
26542573
26552574 if ThreadItem.IsLogFile then begin
2656- idx := 0;
2657- for i := 0 to ListView.Columns.Count - 1 do begin
2658- if GikoSys.Setting.BoardColumnOrder.Count <= i then
2659- Break;
2660-// case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
2661- case GikoSys.Setting.BoardColumnOrder[ i ] of
2662- gbcTitle:
2663- // Item.Caption は SubItems に含まれ無いので
2664- Dec( idx );
2665-
2666- gbcAllCount:
2667- Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
2668-
2669- gbcLocalCount:
2670- Item.SubItems[ idx ] := IntToStr(ThreadItem.Count);
2671-
2672- gbcNonAcqCount:
2673- Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count);
2674-
2675- gbcNewCount:
2676- if ThreadItem.NewResCount = 0 then
2677- Item.SubItems[ idx ] := ''
2678- else
2679- Item.SubItems[ idx ] := IntToStr(ThreadItem.NewResCount);
2680-
2681- gbcUnReadCount:
2682- Item.SubItems[ idx ] := '';
2683-
2684- gbcRoundName:
2685- if ThreadItem.Round then
2686- Item.SubItems[ idx ] := ThreadItem.RoundName
2687- else
2688- Item.SubItems[ idx ] := '';
2689-
2690- gbcRoundDate://gbcLastModified:
2691- if (ThreadItem.RoundDate = ZERO_DATE) then begin
2692- Item.SubItems[ idx ] := '';
2693- end else
2694- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2695-
2696- gbcCreated:
2697- if ThreadItem.CreateDate = ZERO_DATE then begin
2698- Item.SubItems[ idx ] := '';
2699- end else
2700- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2701-
2702- gbcLastModified:
2703- if (ThreadItem.LastModified = ZERO_DATE) then begin
2704- Item.SubItems[ idx ] := '';
2705- end else
2706- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.LastModified);
2707-
2708-
2709- end;
2710- Inc( idx );
2711- end;
2712-
2713- if ThreadItem.NewArrival then
2714- Item.ImageIndex := ITEM_ICON_THREADNEW1
2575+ Item.ImageIndex := ITEM_ICON_THREADLOG1;
2576+ Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2577+ if GikoSys.Setting.NonAcquiredCount then
2578+ Item.SubItems[1] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count)
27152579 else
2716- Item.ImageIndex := ITEM_ICON_THREADLOG1;
2717- end else begin
2718- idx := 0;
2719- for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
2720-// case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
2721- case GikoSys.Setting.BoardColumnOrder[ i ] of
2722- gbcTitle:
2723- // Item.Caption は SubItems に含まれ無いので
2724- Dec( idx );
2725-
2726- gbcAllCount:
2727- Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
2728-
2729- gbcRoundDate://gbcLastModified:
2730- Item.SubItems[ idx ] := '';
2731-
2732- gbcCreated:
2733- if ThreadItem.CreateDate = ZERO_DATE then begin
2734- Item.SubItems[ idx ] := '';
2735- end else
2736- Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2737-
2738- gbcLastModified:
2739- Item.SubItems[ idx ] := '';
2580+ Item.SubItems[1] := IntToStr(ThreadItem.Count);
2581+ if ThreadItem.NewResCount = 0 then
2582+ Item.SubItems[2] := ''
2583+ else
2584+ Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2585+ Item.SubItems[3] := '';
2586+ if ThreadItem.Round then
2587+ Item.SubItems[4] := ThreadItem.RoundName
2588+ else
2589+ Item.SubItems[4] := '';
2590+ if ThreadItem.RoundDate = ZERO_DATE then begin
2591+ Item.SubItems[5] := '';
2592+ end else
2593+ Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2594+ if ThreadItem.NewArrival then
2595+ Item.ImageIndex := ITEM_ICON_THREADNEW1;
2596+ if ThreadItem.CreateDate = ZERO_DATE then begin
2597+ Item.SubItems[6] := '';
2598+ end else
2599+ Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
27402600
2741- else
2742- Item.SubItems[ idx ] := '';
2743- end;
2744- Inc( idx );
2745- end;
2601+ end else begin
2602+ Item.ImageIndex := ITEM_ICON_THREAD1;
2603+ Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2604+ Item.SubItems[1] := '';
2605+ Item.SubItems[2] := '';
2606+ Item.SubItems[3] := '';
2607+ Item.SubItems[4] := '';
2608+ Item.SubItems[5] := '';
2609+ if not GikoSys.Setting.CreationTimeLogs then
2610+ if ThreadItem.CreateDate = ZERO_DATE then
2611+ Item.SubItems[6] := ''
2612+ else
2613+ Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
27462614
2747- if ThreadItem.NewArrival then
2748- Item.ImageIndex := ITEM_ICON_THREADNEW1
2749- else
2750- Item.ImageIndex := ITEM_ICON_THREAD1;
27512615 end;
27522616
27532617 Item.Data := ThreadItem;
2754-
27552618 end;
27562619 end;
27572620
@@ -2794,7 +2657,7 @@ var
27942657 ActiveFileName: string;
27952658 e: IHTMLElement;
27962659 Ext: string;
2797- buf, buf2: string;
2660+ buf: string;
27982661 PathRec: TPathRec;
27992662 begin
28002663 if not( TObject(Sender) is TWebBrowser )then
@@ -2877,43 +2740,30 @@ begin
28772740 end else begin
28782741 threadItem := GetActiveContent;
28792742 if Pos('about:blank..', Text) = 1 then begin
2880- wkInt := LastDelimiter( '/', threadItem.URL );
2881- if Pos( '?', Copy( threadItem.URL, wkInt, MaxInt ) ) = 0 then begin
2882- // Thread.URL は PATH_INFO 渡し
2883- URL := Copy( threadItem.URL, 1, LastDelimiter( '/', threadItem.URL ) );
2884- wkInt := LastDelimiter( '/', Text );
2885- if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then
2886- // Text も PATH_INFO 渡し
2887- URL := URL + Copy( Text, LastDelimiter( '/', Text ) + 1, MaxInt )
2888- else
2889- // Text は QUERY_STRING 渡し
2890- URL := URL + Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt );
2743+ if (AnsiPos('http://jbbs.livedoor.com/', threadItem.URL) <> 0) then begin
2744+ URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2745+ Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2746+ if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2747+ buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2748+ else if( PathRec.FSt <> 0 ) then
2749+ buf := IntToStr(PathRec.FSt);
2750+ end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2751+ URL := threaditem.URL;
2752+ buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
28912753 end else begin
2892- // Thread.URL は QUERY_STRING 渡し
2893- URL := Copy( threadItem.URL, 1, LastDelimiter( '?', threadItem.URL ) );
2894- wkInt := LastDelimiter( '/', Text );
2895- if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then begin
2896- // Text は PATH_INFO 渡し
2897- // URL に板とキーが足らないので Text から頂戴する
2898- wkInt := LastDelimiter( '/', Copy( Text, 1, wkInt - 1 ) );
2899- wkInt := LastDelimiter( '/', Copy( Text, 1, wkInt - 1 ) );
2900- URL := Copy( URL, 1, Length( URL ) - 1 ) + Copy( Text, wkInt, MaxInt );
2901- end else begin
2902- // Text も QUERY_STRING 渡し
2903- URL := URL + Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt )
2904- end;
2754+ URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2755+ buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
29052756 end;
2757+ URL := URL + buf;
29062758 end else begin
29072759 URL := Text;
29082760 end;
2909-
29102761 PathRec := Gikosys.Parse2chURL2(URL);
29112762 if (PathRec.FNoParam) then begin
29122763 PathRec.FSt := 1;
29132764 PathRec.FTo := 1;
2914- end else begin
2765+ end else
29152766 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2916- end;
29172767 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
29182768
29192769 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
@@ -2940,10 +2790,10 @@ begin
29402790 // wkIntTo := 1;
29412791 //if PathRec.FFirst then
29422792 // wkIntSt := 1;
2943- //if PathRec.FStBegin then //http://〜〜〜〜/-50というとき
2944- // wkIntSt := 1; //
2945- //if PathRec.FToEnd then //http://〜〜〜〜/50-というとき
2946- // wkIntTo := 9999; // どちらの場合も、GetPopupResNumberでうまく番号を調整するのでふよう。
2793+ if PathRec.FStBegin then
2794+ wkIntSt := 1;
2795+ if PathRec.FToEnd then
2796+ wkIntTo := 9999;
29472797
29482798 //ATitle := ActiveFileName <> PathRec.FKey;
29492799 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
@@ -3013,44 +2863,22 @@ end;
30132863
30142864 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
30152865 Shift: TShiftState);
3016-var
3017- pos : TPoint;
30182866 begin
30192867 if GetActiveList is TBoard then begin
3020- case Key of
3021- VK_BACK:; // UpFolderButtonClick(Sender);
3022- VK_SPACE: ListDoubleClick(Shift);
3023- VK_RETURN: ListClick;
3024- VK_APPS:
3025- begin
3026- if ListView.Selected <> nil then begin
3027- pos.X := ListView.Column[ 0 ].Width;
3028- pos.Y := ListView.Selected.Top;
3029- end else begin
3030- pos.X := ListView.Left;
3031- pos.Y := ListView.Top;
3032- end;
3033- Windows.ClientToScreen( ListView.Handle, pos );
3034- ListPopupMenu.Popup( pos.X, pos.Y );
3035- end;
2868+ if Key = VK_BACK then begin
2869+// UpFolderButtonClick(Sender);
2870+ end else if Key = VK_SPACE then begin
2871+ ListDoubleClick(Shift);
2872+ end else if Key = VK_RETURN then begin
2873+ ListClick;
30362874 end;
30372875 end else begin // TBBS, TCategory
3038- case Key of
3039- VK_BACK:; // UpFolderButtonClick(Sender);
3040- VK_SPACE: ListClick;
3041- VK_RETURN: ListDoubleClick(Shift);
3042- VK_APPS:
3043- begin
3044- if ListView.Selected <> nil then begin
3045- pos.X := ListView.Column[ 0 ].Width;
3046- pos.Y := ListView.Selected.Top;
3047- end else begin
3048- pos.X := ListView.Left;
3049- pos.Y := ListView.Top;
3050- end;
3051- Windows.ClientToScreen( ListView.Handle, pos );
3052- ListPopupMenu.Popup( pos.X, pos.Y );
3053- end;
2876+ if Key = VK_BACK then begin
2877+// UpFolderButtonClick(Sender);
2878+ end else if Key = VK_SPACE then begin
2879+ ListClick;
2880+ end else if Key = VK_RETURN then begin
2881+ ListDoubleClick(Shift);
30542882 end;
30552883 end;
30562884 end;
@@ -3060,95 +2888,29 @@ begin
30602888 Result := FHttpState;
30612889 end;
30622890
3063-{*!
3064-\brief ListView の Column を真のカラムに変換
3065-
3066-Delphi 6 Personal での ListView では ListViewColumnClick イベントで
3067-正しいカラムが渡されないため、正しいカラムに変換します。
3068-*}
3069-function TGikoForm.ActiveListTrueColumn( column : TListColumn ) : TListColumn;
3070-{*
3071-var
3072- i, idx : Integer;
3073- orderList : TList;
3074-*}
3075-begin
3076-
3077- // 正しく変換する方法が分からないので保留
3078- Result := column;
3079- Exit;
3080-{*
3081- Result := column;
3082-
3083- if TObject( FActiveList ) is TBBS then
3084- orderList := GikoSys.Setting.BBSColumnOrder
3085- else if TObject( FActiveList ) is TCategory then
3086- orderList := GikoSys.Setting.CategoryColumnOrder
3087- else if TObject( FActiveList ) is TBoard then
3088- orderList := GikoSys.Setting.BoardColumnOrder
3089- else
3090- Exit;
3091-
3092- idx := column.Tag;
3093-
3094- for i := 0 to ListView.Columns.Count - 1 do begin
3095- if Integer( orderList[ ListView.Column[ i ].Tag ] ) = 0 then begin
3096- if idx = 0 then
3097- Result := ListView.Column[ i ]
3098- else if idx <= i then
3099- Result := ListView.Column[ idx - 1 ];
3100- Exit;
3101- end;
3102- end;
3103-*}
3104-
3105-end;
3106-
31072891 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
31082892 Column: TListColumn);
3109-var
3110- id, idx : Integer;
3111- orderList : TList;
31122893 begin
3113- idx := ActiveListTrueColumn( Column ).Tag;
3114-
3115- if TObject( FActiveList ) is TBBS then
3116- orderList := GikoSys.Setting.BBSColumnOrder
3117- else if TObject( FActiveList ) is TCategory then
3118- orderList := GikoSys.Setting.CategoryColumnOrder
3119- else if TObject( FActiveList ) is TBoard then
3120- orderList := GikoSys.Setting.BoardColumnOrder
3121- else
3122- Exit;
3123-
3124- id := Integer( orderList[ idx ] );
3125-
3126- if FSortIndex = id then
2894+ if FSortIndex = Column.Index then
31272895 FSortOrder := not FSortOrder
31282896 else
31292897 FSortOrder := False;
3130-
31312898 ListViewSort(Sender, Column);
31322899 end;
31332900
31342901 procedure TGikoForm.ListViewSort(Sender: TObject; Column: TListColumn);
31352902 var
3136- i, id, idx : Integer;
3137- orderList : TList;
2903+ i: Integer;
31382904 wkBBS: TBBS;
31392905 wkCategory: TCategory;
31402906 wkBoard: TBoard;
31412907 begin
3142- idx := ActiveListTrueColumn( Column ).Tag;
3143-
3144- for i := 0 to ListView.Columns.Count - 1 do begin
2908+ for i := 0 to ListView.Columns.Count - 1 do
31452909 ListView.Column[i].ImageIndex := -1;
3146- end;
3147-
31482910 if FSortOrder then
3149- ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT1
2911+ ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
31502912 else
3151- ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT2;
2913+ ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
31522914
31532915 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
31542916
@@ -3156,41 +2918,35 @@ begin
31562918 if TObject( FActiveList ) is TBBS then begin
31572919 //wkBBS := TBBS(TreeView.Selected.Data);
31582920 wkBBS := TBBS( FActiveList );
3159- orderList := GikoSys.Setting.BBSColumnOrder;
3160- id := Integer( orderList[ idx ] );
31612921 Sort.SortOrder := FSortOrder;
3162- Sort.SortIndex := id;
3163- GikoSys.Setting.BBSSortIndex := id;
2922+ Sort.SortIndex := Column.Index;
2923+ GikoSys.Setting.BBSSortIndex := Column.Index;
31642924 GikoSys.Setting.BBSSortOrder := FSortOrder;
31652925 wkBBS.Sort(CategorySortProc);
2926+ ListView.Refresh;
31662927 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
31672928 end else if TObject( FActiveList ) is TCategory then begin
31682929 //wkCategory := TCategory(TreeView.Selected.Data);
31692930 wkCategory := TCategory( FActiveList );
3170- orderList := GikoSys.Setting.CategoryColumnOrder;
3171- id := Integer( orderList[ idx ] );
31722931 Sort.SortOrder := FSortOrder;
3173- Sort.SortIndex := id;
3174- GikoSys.Setting.CategorySortIndex := id;
2932+ Sort.SortIndex := Column.Index;
2933+ GikoSys.Setting.CategorySortIndex := Column.Index;
31752934 GikoSys.Setting.CategorySortOrder := FSortOrder;
31762935 wkCategory.CustomSort(BoardSortProc);
2936+ ListView.Refresh;
31772937 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
31782938 end else if TObject( FActiveList ) is TBoard then begin
31792939 //wkBoard := TBoard(TreeView.Selected.Data);
31802940 wkBoard := TBoard( FActiveList );
3181- orderList := GikoSys.Setting.BoardColumnOrder;
3182- id := Integer( orderList[ idx ] );
31832941 Sort.SortOrder := FSortOrder;
3184- Sort.SortIndex := id;
3185- GikoSys.Setting.BoardSortIndex := id;
2942+ Sort.SortIndex := Column.Index;
2943+ Sort.SortNonAcquiredCountFlag := GikoSys.Setting.NonAcquiredCount;
2944+ GikoSys.Setting.BoardSortIndex := Column.Index;
31862945 GikoSys.Setting.BoardSortOrder := FSortOrder;
31872946 wkBoard.CustomSort(ThreadItemSortProc);
3188- end else begin
3189- id := 0;
2947+ ListView.Refresh;
31902948 end;
3191-
3192- ListView.Refresh;
3193- FSortIndex := id;
2949+ FSortIndex := Column.Index;
31942950 end;
31952951
31962952 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
@@ -3264,10 +3020,10 @@ begin
32643020 if TObject(Item.Data) is TThreadItem then begin
32653021 ThreadItem := TThreadItem(Item.Data);
32663022 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
3267- ListView.Canvas.Brush.Color := FOddColor;
3268- end else begin
3269- ListView.Canvas.Brush.Color := FListViewBackGroundColor;
3270- end;
3023+ ListView.Canvas.Brush.Color := FOddColor;
3024+ end else begin
3025+ ListView.Canvas.Brush.Color := FListViewBackGroundColor;
3026+ end;
32713027 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
32723028 if ThreadItem.UnRead then
32733029 TListView(Sender).Canvas.Font.Style := [fsBold];
@@ -3459,7 +3215,6 @@ var
34593215 s: string;
34603216 boardPlugIn : TBoardPlugIn;
34613217 i: Integer;
3462- browserRec : TBrowserRecord;
34633218 begin
34643219 try
34653220 if Item.DownType = gdtBoard then
@@ -3494,27 +3249,21 @@ begin
34943249 ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
34953250 end;
34963251 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3497- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then begin
3252+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then
34983253 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3499- break;
3500- end;
35013254 end;
35023255 if GikoSys.Setting.BrowserTabVisible then begin
35033256 if GetActiveContent = Item.ThreadItem then
3504- browserRec := InsertBrowserTab(Item.ThreadItem)
3257+ InsertBrowserTab(Item.ThreadItem)
35053258 else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
3506- browserRec := InsertBrowserTab(Item.ThreadItem, True)
3259+ InsertBrowserTab(Item.ThreadItem, True)
35073260 else
3508- browserRec := InsertBrowserTab(Item.ThreadItem, False);
3509- if browserRec.Thread = BrowserNullTab.Thread then begin
3510- browserRec.Movement := BrowserNullTab.Movement;
3511- BrowserNullTab.Movement := '';
3512- end;
3261+ InsertBrowserTab(Item.ThreadItem, False);
35133262 end else begin
35143263 if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then
35153264 InsertBrowserTab(Item.ThreadItem);
35163265 end;
3517- Application.ProcessMessages;
3266+
35183267 if Item.State = gdsComplete then begin
35193268 PlaySound('New');
35203269 AddMessageList(ATitle + ' [スレ取得完了]', nil, gmiOK);
@@ -3642,17 +3391,14 @@ begin
36423391 end;
36433392 end;}
36443393
3645-function TGikoForm.InsertBrowserTab(
3646- ThreadItem : TThreadItem;
3647- ActiveTab : Boolean = True
3648-) : TBrowserRecord;
3394+procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
3395+
36493396 var
3650- i, j, idx : Integer;
3651- favItem : TFavoriteThreadItem;
3397+ i, j, idx: Integer;
3398+ favItem : TFavoriteThreadItem;
36523399 newBrowser : TBrowserRecord;
36533400 begin
36543401
3655- Result := nil;
36563402 if Threaditem = nil then Exit;
36573403
36583404 if ThreadItem.IsLogFile then begin
@@ -3671,7 +3417,6 @@ begin
36713417 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
36723418 if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
36733419 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
3674- Result := TBrowserRecord( BrowserTab.Tabs.Objects[i] );
36753420 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
36763421 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
36773422 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
@@ -3758,7 +3503,6 @@ begin
37583503 BrowserTab.TabIndex := i;
37593504 end;
37603505 end;
3761- Result := newBrowser;
37623506 if(ActiveTab) or (idx = -1) then begin
37633507 BrowserTab.OnChange(nil);
37643508 end;
@@ -3768,7 +3512,6 @@ begin
37683512 BrowserNullTab.Browser := Browser;
37693513 end;
37703514 BrowserNullTab.thread := ThreadItem;
3771- Result := BrowserNullTab;
37723515 BrowserTab.TabIndex := -1;
37733516 SetContent(BrowserNullTab);
37743517 end;
@@ -3788,6 +3531,7 @@ var
37883531 s: string;
37893532 // OldCursor: TCursor;
37903533 i: Integer;
3534+ url: OleVariant;
37913535 idx: Integer;
37923536 ThreadItem: TThreadItem;
37933537 Thread: TBrowserRecord;
@@ -3795,7 +3539,6 @@ var
37953539 ThreadScrollTop: Integer;
37963540 ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean;
37973541 begin
3798-// AddMessageList('SetContent', nil, gmiWhat);
37993542 Thread := inThread;
38003543 idx := BrowserTab.TabIndex;
38013544 if (FActiveContent <> nil) and
@@ -3859,19 +3602,18 @@ begin
38593602
38603603
38613604 try
3862- {
38633605 if ThreadItem.UnRead then begin
38643606 ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
38653607 if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
38663608 TreeView.Refresh;
38673609 end;
3868- }
3610+ // LockWindowUpdate(Self.Handle);
38693611 if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin
38703612 if (FActiveContent.Browser <> BrowserNullTab.Browser) then
38713613 ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
38723614 end;
3873-
38743615 ShowWindow(Thread.FBrowser.Handle, SW_SHOW);
3616+ //LockWindowUpdate(0);
38753617 if (not Assigned(Thread.Browser.Document)) then begin
38763618 Thread.Browser.Navigate('about:blank');
38773619 end;
@@ -3898,21 +3640,55 @@ begin
38983640 Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']';
38993641 //Thread.Repaintは、スキン等の設定を変更したとき、Threadをダウンロードしたとき
39003642 //新規にThreadを開いたときに真になっている。
3643+// if(Thread.Repaint) or (Thread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin
39013644 if Thread.Repaint then begin
39023645 //Thread.LastSize := ThreadItem.Size;
39033646 Thread.Repaint := false;
3904-
3905- Thread.Browser.OnStatusTextChange := nil;
3906- doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
3907- GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
3908- Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
3909- PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( Thread.Browser ), 0 );
3910- if ThreadItem = nil then begin
3911- FActiveContent := nil;
3912- BrowserTab.Repaint;
3913- Exit;
3647+ try
3648+ Thread.Browser.OnStatusTextChange := nil;
3649+ doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
3650+ GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
3651+
3652+ // if (Assigned(Thread.Browser)) and (Thread.Browser <> nil) then
3653+ Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
3654+ //なぜかここで明示的にDocumentCompleteを呼ばないとうまくいかない
3655+ //追記 200406/19
3656+ //VisibleのときしかDocumentCompleteは呼ばれないらしい
3657+ Thread.FBrowser.OnDocumentComplete(Thread.FBrowser, Thread.FBrowser.Parent, url);
3658+// Thread.OnlyHundred := GikoSys.OnlyAHundredRes;
3659+ Application.ProcessMessages;
3660+ //ここでApplication.ProcessMessagesを呼ぶことによってWebBrowserを更新させる。
3661+ //相しないと一画面分しか描画できてないのでそれ以上のスクロール量を指定しても無効になる
3662+ // byもじゅ(2004/01/20)
3663+ try
3664+ //if (Assigned(Thread)) and (Assigned(ThreadItem))then begin
3665+ if(Thread <> nil) and (ThreadItem <>nil) then begin
3666+ if ThreadUnRead then
3667+ BrowserMovement('new', Thread)
3668+ else if ThreadScrollTop <> 0 then begin
3669+ try
3670+ doc.Body.ScrollTop := ThreadScrollTop;
3671+ except
3672+ on E: Exception do
3673+ MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3674+ end;
3675+ end;
3676+ // end;
3677+ end else begin
3678+ FActiveContent := nil;
3679+ BrowserTab.Repaint;
3680+ Exit;
3681+ end;
3682+ except
3683+ FActiveContent := nil;
3684+ BrowserTab.Repaint;
3685+ Exit;
3686+ end;
3687+ finally
3688+ // Application.ProcessMessages;
39143689 end;
39153690 end;
3691+ ThreadItem.UnRead := False;
39163692 ListView.Refresh;
39173693 end;
39183694 if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin
@@ -3958,6 +3734,7 @@ end;
39583734
39593735 procedure TGikoForm.SetActiveList(Obj: TObject);
39603736 var
3737+ i : Integer;
39613738 idx : Integer;
39623739 begin
39633740 // if FActiveList <> Obj then begin
@@ -3975,11 +3752,13 @@ begin
39753752 Self.Caption := CAPTION_NAME;
39763753 //Application.Title := CAPTION_NAME;
39773754
3978-// ActiveListColumnSave;
3979-
39803755 if Obj is TBBS then begin
3756+ for i := 0 to ListView.Columns.Count - 1 do
3757+ ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
39813758 SetCategoryListItem(TBBS(Obj));
39823759 end else if Obj is TCategory then begin
3760+ for i := 0 to ListView.Columns.Count - 1 do
3761+ ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
39833762 SetBoardListItem(TCategory(Obj));
39843763 end else if Obj is TBoard then begin
39853764 SetThreadListItem(TBoard(Obj));
@@ -4008,16 +3787,12 @@ end;
40083787 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
40093788 var
40103789 Board: TBoard;
4011- i: Integer;
40123790 begin
40133791 if ActiveList is TBoard then begin
4014- for i := Length( BBSs ) - 1 downto 0 do begin
4015- BBSs[i].SelectText := SelectText;
4016- BBSs[i].KubetsuChk := KubetsuChk;
4017- end;
40183792 Board := TBoard(ActiveList);
4019-// Board.ParentCategory.ParenTBBS.SelectText := SelectText;
4020-// Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3793+
3794+ Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3795+ Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
40213796 // Board.SelectText := SelectText;
40223797 // Board.KubetsuChk := KubetsuChk;
40233798 ViewType := AViewType;
@@ -4522,70 +4297,75 @@ begin
45224297 bbs := nil;
45234298
45244299 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
4525- if Item <> FActiveList then begin
4526- ChangeEvent := nil;
4527- ChangingEvent := nil;
4300+ ChangeEvent := nil;
4301+ ChangingEvent := nil;
45284302
4303+ if not CallEvent then begin
4304+ ChangeEvent := TreeView.OnChange;
4305+ ChangingEvent := TreeView.OnChanging;
4306+ end;
4307+ try
45294308 if not CallEvent then begin
4530- ChangeEvent := TreeView.OnChange;
4531- ChangingEvent := TreeView.OnChanging;
4309+ TreeView.OnChange := nil;
4310+ TreeView.OnChanging := nil;
45324311 end;
4533- try
4534- if not CallEvent then begin
4535- TreeView.OnChange := nil;
4536- TreeView.OnChanging := nil;
4537- end;
4538- //Application.ProcessMessages;
4539- for i := 0 to TreeView.Items.Count - 1 do begin
4540- if TreeView.Items[i].Data = Item then begin
4541- TreeView.Items[i].Selected := True;
4542- if CallEvent then
4543- TreeClick(TreeView.Items[i]);
4544- Break;
4545- end;
4546- end;
4547- //Application.ProcessMessages;
4548- finally
4549- if not CallEvent then begin
4550- TreeView.OnChange := ChangeEvent;
4551- TreeView.OnChanging := ChangingEvent;
4312+ //Application.ProcessMessages;
4313+ for i := 0 to TreeView.Items.Count - 1 do begin
4314+ if TreeView.Items[i].Data = Item then begin
4315+ TreeView.Items[i].Selected := True;
4316+ if CallEvent then
4317+ TreeClick(TreeView.Items[i]);
4318+ Break;
45524319 end;
45534320 end;
4321+ //Application.ProcessMessages;
4322+ finally
4323+ if not CallEvent then begin
4324+ TreeView.OnChange := ChangeEvent;
4325+ TreeView.OnChanging := ChangingEvent;
4326+ end;
45544327 end;
45554328 end else begin
4556- if Item <> FActiveList then begin
4557- ActiveListColumnSave;
4558-
4559- if (Item is TBBS) or (Item is TCategory) then begin
4560- ListView.Columns.Clear;
4561- SetActiveList( Item );
4562- end else if Item is TBoard then begin
4563- if not TBoard( Item ).IsThreadDatRead then begin
4564- Screen.Cursor := crHourGlass;
4565- try
4566- if not TBoard( Item ).IsThreadDatRead then
4567- GikoSys.ReadSubjectFile(TBoard( Item ));
4568- finally
4569- Screen.Cursor := crDefault;
4570- end;
4329+ if GetActiveList is TBBS then begin
4330+ for i := 0 to ListView.Columns.Count - 1 do
4331+ GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
4332+ end else if GetActiveList is TCategory then begin
4333+ for i := 0 to ListView.Columns.Count - 1 do
4334+ GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
4335+ end else if GetActiveList is TBoard then begin
4336+ for i := 0 to ListView.Columns.Count - 1 do
4337+ GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
4338+ end;
4339+
4340+ if (Item is TBBS) or (Item is TCategory) then begin
4341+ ListView.Columns.Clear;
4342+ SetActiveList( Item );
4343+ end else if Item is TBoard then begin
4344+ if not TBoard( Item ).IsThreadDatRead then begin
4345+ Screen.Cursor := crHourGlass;
4346+ try
4347+ if not TBoard( Item ).IsThreadDatRead then
4348+ GikoSys.ReadSubjectFile(TBoard( Item ));
4349+ finally
4350+ Screen.Cursor := crDefault;
45714351 end;
4572- SetActiveList( Item );
45734352 end;
4353+ SetActiveList( Item );
45744354 end;
4575- end;
45764355
4577- if Item is TBoard then begin // not TCategory
4578- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4579- if GikoSys.Setting.ListWidthState = glsMax then begin
4580- BrowserMinAction.Execute;
4581- if GikoForm.Visible then
4582- ListView.SetFocus;
4583- end;
4584- end else begin
4585- if GikoSys.Setting.ListHeightState = glsMax then begin
4586- BrowserMinAction.Execute;
4587- if GikoForm.Visible then
4588- ListView.SetFocus;
4356+ if Item is TBoard then begin // not TCategory
4357+ if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4358+ if GikoSys.Setting.ListWidthState = glsMax then begin
4359+ BrowserMinAction.Execute;
4360+ if GikoForm.Visible then
4361+ ListView.SetFocus;
4362+ end;
4363+ end else begin
4364+ if GikoSys.Setting.ListHeightState = glsMax then begin
4365+ BrowserMinAction.Execute;
4366+ if GikoForm.Visible then
4367+ ListView.SetFocus;
4368+ end;
45894369 end;
45904370 end;
45914371 end;
@@ -4596,7 +4376,6 @@ procedure TGikoForm.ListViewMouseDown(Sender: TObject;
45964376 var
45974377 listItem : TListItem;
45984378 threadItem : TThreadItem;
4599- pos : TPoint;
46004379 // t: Cardinal;
46014380 begin
46024381 case Button of
@@ -4620,13 +4399,6 @@ begin
46204399 else
46214400 ListClick;
46224401 end;
4623- mbRight:
4624- begin
4625- pos.X := X;
4626- pos.Y := Y;
4627- Windows.ClientToScreen( ListView.Handle, pos );
4628- ListPopupMenu.Popup( pos.X, pos.Y );
4629- end;
46304402 end;
46314403 { if ssDouble in Shift then begin
46324404 DoubleClickOccurred[Button] := True;
@@ -4753,11 +4525,11 @@ begin
47534525 top := 0;
47544526 nm := AName;
47554527 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4756- item.focus();
47574528 repeat
47584529 top := top + item.offsetTop;
47594530 item := item.offsetParent;
47604531 until AnsiCompareText(item.tagName, 'body' ) = 0;
4532+
47614533 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
47624534 except
47634535 end;
@@ -4785,7 +4557,6 @@ begin
47854557 top := 0;
47864558 nm := AName;
47874559 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4788- item.focus();
47894560 repeat
47904561 top := top + item.offsetTop;
47914562 item := item.offsetParent;
@@ -5257,23 +5028,15 @@ begin
52575028 case GikoSys.Setting.ListWidthState of
52585029 glsMax: begin
52595030 //通常表示にする
5260- if FActiveContent <> nil then
5261- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止
52625031 ViewPanel.Width := FBrowserSizeWidth;
52635032 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
52645033 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
52655034 GikoSys.Setting.ListWidthState := glsNormal;
5266- if FActiveContent <> nil then
5267- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画
52685035 end;
52695036 glsMin, glsNormal: begin
52705037 //最大表示にする
5271- if FActiveContent <> nil then
5272- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止
52735038 if GikoSys.Setting.ListWidthState = glsNormal then
52745039 FBrowserSizeWidth := ViewPanel.Width;
5275- if FActiveContent <> nil then
5276- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画
52775040 ViewPanel.Width := 1;
52785041 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
52795042 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
@@ -5284,23 +5047,15 @@ begin
52845047 case GikoSys.Setting.ListHeightState of
52855048 glsMax: begin
52865049 //通常表示にする
5287- if FActiveContent <> nil then
5288- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止
52895050 ViewPanel.Height := FBrowserSizeHeight;
52905051 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
52915052 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
52925053 GikoSys.Setting.ListHeightState := glsNormal;
5293- if FActiveContent <> nil then
5294- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画
52955054 end;
52965055 glsMin, glsNormal: begin
52975056 //最大表示にする
5298- if FActiveContent <> nil then
5299- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止
53005057 if GikoSys.Setting.ListHeightState = glsNormal then
53015058 FBrowserSizeHeight := ViewPanel.Height;
5302- if FActiveContent <> nil then
5303- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画
53045059 ViewPanel.Height := 1;
53055060 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
53065061 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
@@ -5321,12 +5076,8 @@ begin
53215076 case GikoSys.Setting.ListWidthState of
53225077 glsMax, glsNormal: begin
53235078 //最小表示にする
5324- if FActiveContent <> nil then
5325- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止
53265079 if GikoSys.Setting.ListWidthState = glsNormal then
53275080 FBrowserSizeWidth := ViewPanel.Width;
5328- if FActiveContent <> nil then
5329- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画
53305081 ViewPanel.Width := ThreadMainPanel.Width - 80;
53315082 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
53325083 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
@@ -5334,41 +5085,29 @@ begin
53345085 end;
53355086 glsMin: begin
53365087 //通常表示にする
5337- if FActiveContent <> nil then
5338- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止
53395088 ViewPanel.Width := FBrowserSizeWidth;
53405089 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
53415090 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
53425091 GikoSys.Setting.ListWidthState := glsNormal;
5343- if FActiveContent <> nil then
5344- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画
53455092 end;
53465093 end;
53475094 end else begin
53485095 case GikoSys.Setting.ListHeightState of
53495096 glsMax, glsNormal: begin
53505097 //最小表示にする
5351- if FActiveContent <> nil then
5352- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止
53535098 if GikoSys.Setting.ListHeightState = glsNormal then
53545099 FBrowserSizeHeight := ViewPanel.Height;
53555100 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
53565101 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
53575102 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
53585103 GikoSys.Setting.ListHeightState := glsMin;
5359- if FActiveContent <> nil then
5360- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画
53615104 end;
53625105 glsMin: begin
53635106 //通常表示にする
5364- if FActiveContent <> nil then
5365- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止
53665107 ViewPanel.Height := FBrowserSizeHeight;
53675108 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
53685109 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
53695110 GikoSys.Setting.ListHeightState := glsNormal;
5370- if FActiveContent <> nil then
5371- SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画
53725111 end;
53735112 end;
53745113 end;
@@ -5589,8 +5328,9 @@ begin
55895328 end;
55905329
55915330 procedure TGikoForm.FormResize(Sender: TObject);
5331+var
5332+ doc : Variant;
55925333 begin
5593-
55945334 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
55955335 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
55965336
@@ -5606,10 +5346,17 @@ begin
56065346 end;
56075347 end;
56085348
5609- FIsIgnoreResize := rtResizing;
5610- PostMessage( Handle, USER_RESIZED, 0, 0 );
5611-
5349+ if FIsMinimize = mtMinimized then begin
5350+ if FActiveContent <> nil then begin
5351+ //Application.ProcessMessages;
5352+ doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
5353+ doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
5354+ FIsMinimize := mtNone;
5355+ end;
5356+ end;
56125357
5358+ FIsIgnoreResize := True;
5359+ PostMessage( Handle, USER_RESIZED, 0, 0 );
56135360 end;
56145361
56155362 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
@@ -5697,8 +5444,8 @@ end;
56975444
56985445 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
56995446 const
5700- DEL_MSG = '“^0”のログを削除します。よろしいですか?';
5701- DEL_SAME_MSG = 'これら ^0 個のスレッドのログを削除します。よろしいですか?';
5447+ DEL_MSG = '“^0”のログをを削除します。よろしいですか?';
5448+ DEL_SAME_MSG = 'これら ^0 個のスレッドのログをを削除します。よろしいですか?';
57025449 DEL_TITLE = '削除確認';
57035450 var
57045451 ThreadItem: TThreadItem;
@@ -5735,8 +5482,6 @@ begin
57355482 DeleteHistory(ThreadItem);
57365483 DeleteTab(ThreadItem);
57375484 ThreadItem.DeleteLogFile;
5738-
5739- TreeView.Refresh; // UnRead の表示を更新
57405485 end;
57415486 ListView.Refresh;
57425487 finally
@@ -5922,7 +5667,6 @@ begin
59225667
59235668 Editor := TEditorForm.Create(Self);
59245669 Editor.SetThreadItem(Item);
5925- GikoSys.LoadEditorKeySetting(Editor.ActionList);
59265670 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
59275671 Editor.Show;
59285672 Editor.BodyEdit.SetFocus;
@@ -6658,13 +6402,11 @@ var
66586402 FDispHtmlDocument: DispHTMLDocument;
66596403 BrowserRecord :TBrowserRecord;
66606404 i :Integer;
6661- doc : Variant;
6662- threadItem : TThreadItem;
66636405 begin
6664-// AddMessageList('DocumentComplete', nil, gmiWhat);
6406+// AddMessageList('DocumentComplete', nil);
66656407 if TObject(Sender) is TWebBrowser then begin
6666- BrowserRecord := nil;
66676408 if TWebBrowser(Sender) <> Browser then begin
6409+ BrowserRecord := nil;
66686410 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
66696411 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
66706412 BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
@@ -6680,7 +6422,7 @@ begin
66806422 BrowserRecord.FEvent.OnClick := WebBrowserClick; //追加したOnClickイベント
66816423 end;
66826424 end else begin
6683- if GetActiveContent <> nil then begin
6425+ if GetActiveContent <> nil then begin
66846426 FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument;
66856427 if FEvent <> nil then
66866428 FEvent.Free;
@@ -6689,38 +6431,6 @@ begin
66896431 FEvent.OnClick := WebBrowserClick; //追加したOnClickイベント
66906432 end;
66916433 end;
6692-
6693- if (BrowserRecord <> nil) and
6694- Assigned( BrowserRecord.Thread ) then begin
6695- threadItem := BrowserRecord.Thread;
6696-
6697- if (BrowserRecord <> nil) and (Length( BrowserRecord.Movement ) > 0) then begin
6698- if threadItem.UnRead then begin
6699- threadItem.UnRead := False;
6700- threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
6701- if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
6702- TreeView.Refresh;
6703- ListView.Refresh;
6704- end;
6705- BrowserMovement( BrowserRecord.Movement, BrowserRecord );
6706- BrowserRecord.Movement := '';
6707- end else if threadItem.UnRead then begin
6708- threadItem.UnRead := False;
6709- threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
6710- if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
6711- TreeView.Refresh;
6712- BrowserMovement( 'new', BrowserRecord );
6713- ListView.Refresh;
6714- end else if threadItem.ScrollTop <> 0 then begin
6715- try
6716- doc := Idispatch( OleVariant( BrowserRecord.Browser.ControlInterface ).Document ) as IHTMLDocument2;
6717- doc.Body.ScrollTop := threadItem.ScrollTop;
6718- except
6719- on E: Exception do
6720- MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
6721- end;
6722- end;
6723- end;
67246434 end;
67256435 end;
67266436
@@ -7076,7 +6786,7 @@ end;
70766786
70776787 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
70786788 const
7079- DEL_MSG = '“^0”のログを削除します。よろしいですか?';
6789+ DEL_MSG = '“^0”のログをを削除します。よろしいですか?';
70806790 DEL_TITLE = '削除確認';
70816791 var
70826792 idx: Integer;
@@ -7494,13 +7204,14 @@ begin
74947204 end;
74957205 end;
74967206
7497-procedure TGikoForm.MoveToURL(const inURL: string);
7207+procedure TGikoForm.MoveToURL(URL: string);
7208+
74987209 var
74997210 protocol, host, path, document, port, bookmark : string;
7500- URL, protocol2, host2, path2, document2, port2, bookmark2 : string;
7211+ URL2, protocol2, host2, path2, document2, port2, bookmark2 : string;
75017212 tmp1, tmp2: string;
75027213 BBSID, BBSKey: string;
7503- tmpBoard, Board: TBoard;
7214+ Board: TBoard;
75047215 ThreadItem: TThreadItem;
75057216 i, bi : Integer;
75067217 boardURL : string;
@@ -7510,22 +7221,20 @@ var
75107221 // boardNode : TTreeNode;
75117222 shiftDown : Boolean;
75127223 ctrlDown : Boolean;
7513- stRes, edRes : Int64;
7514- browserRec : TBrowserRecord;
75157224 begin
75167225
7517- GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark );
7518- GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey );
7226+ GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
7227+ GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
75197228
75207229
75217230 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7522- ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7523- if shiftDown then begin
7524- GikoSys.OpenBrowser(inURL, gbtUserApp);
7525- Exit;
7526- end else if ctrlDown then begin
7527- GikoSys.OpenBrowser(inURL, gbtIE);
7528- Exit;
7231+ ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7232+ if shiftDown then begin
7233+ GikoSys.OpenBrowser(URL, gbtUserApp);
7234+ Exit;
7235+ end else if ctrlDown then begin
7236+ GikoSys.OpenBrowser(URL, gbtIE);
7237+ Exit;
75297238 end;
75307239
75317240 //===== プラグイン
@@ -7534,16 +7243,15 @@ begin
75347243 bi := High( BoardPlugIns );
75357244 for i := Low( BoardPlugIns ) to bi do begin
75367245 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
7537- case BoardPlugIns[ i ].AcceptURL( inURL ) of
7246+ case BoardPlugIns[ i ].AcceptURL( URL ) of
75387247 atThread:
75397248 begin
7540- tmpThread := TThreadItem.Create( BoardPlugIns[ i ], inURL );
7249+ tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
75417250 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
75427251 Board := BBSsFindBoardFromURL( boardURL );
75437252 if Board = nil then begin
7544- //break;
75457253 // ※作っても追加するところが無いので激しく保留
7546- //GikoSys.OpenBrowser(inURL, gbtUserApp);
7254+ //GikoSys.OpenBrowser(URL, gbtUserApp);
75477255 //Exit;
75487256 {
75497257 Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
@@ -7555,42 +7263,34 @@ begin
75557263 GikoSys.ReadSubjectFile( Board );
75567264 Exit;
75577265 end;
7558- ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
7559- if ThreadItem = nil then begin
7560- ThreadItem := tmpThread;
7561- Board.Insert( 0, ThreadItem );
7562- if ActiveList is TBoard then begin
7563- if TBoard(ActiveList) = Board then
7564- ListView.Items.Count := ListView.Items.Count + 1;
7565- end;
7566- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
7567- browserRec := InsertBrowserTab( ThreadItem );
7568- if (browserRec <> nil) and (stRes > 0) then
7569- browserRec.Movement := IntToStr( stRes );
7266+ end;
7267+
7268+ ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
7269+ if ThreadItem = nil then begin
7270+ ThreadItem := tmpThread;
7271+ Board.Insert( 0, ThreadItem );
7272+ if ActiveList is TBoard then begin
7273+ if TBoard(ActiveList) = Board then
7274+ ListView.Items.Count := ListView.Items.Count + 1;
7275+ end;
7276+ InsertBrowserTab( ThreadItem );
7277+ DownloadContent( ThreadItem );
7278+ Exit;
7279+ end else begin
7280+ tmpThread.Free;
7281+ InsertBrowserTab( ThreadItem );
7282+ if not ThreadItem.IsLogFile then begin
75707283 DownloadContent( ThreadItem );
7571- Exit;
7572- end else begin
7573- tmpThread.Free;
7574- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
7575- browserRec := InsertBrowserTab( ThreadItem );
7576- if ThreadItem.IsLogFile then begin
7577- if (browserRec <> nil) and (stRes > 0) then
7578- BrowserMovement( IntToStr( stRes ), browserRec );
7579- end else begin
7580- if (browserRec <> nil) and (stRes > 0) then
7581- browserRec.Movement := IntToStr( stRes );
7582- DownloadContent( ThreadItem );
7583- end;
7584- Exit;
75857284 end;
7285+ Exit;
75867286 end;
7287+
7288+ //Exit;
75877289 end;
75887290
75897291 atBoard:
75907292 begin
7591- tmpBoard := TBoard.Create(BoardPlugIns[ i ], inURL);
7592- Board := BBSsFindBoardFromURL( tmpBoard.URL );
7593- tmpBoard.Free;
7293+ Board := BBSsFindBoardFromURL( URL );
75947294 if Board <> nil then begin
75957295 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
75967296 ShowBBSTree( Board.ParentCategory.ParenTBBS );
@@ -7607,7 +7307,7 @@ begin
76077307
76087308
76097309 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
7610- boardURL := GikoSys.Get2chThreadURL2BoardURL( inURL );
7310+ boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
76117311 Board := BBSsFindBoardFromURL( boardURL );
76127312 if Board = nil then
76137313 Board := BBSsFindBoardFromBBSID( BBSID );
@@ -7619,23 +7319,23 @@ begin
76197319 end;
76207320 if Board = nil then begin
76217321 // 入るべき板が見つからなかったので、普通のブラウザで開く
7622- GikoSys.OpenBrowser(inURL, gbtUserApp);
7322+ GikoSys.OpenBrowser(URL, gbtUserApp);
76237323 Exit;
76247324 end else begin
76257325 // 外部の板なのに2chのURLにされてしまった奴をここで確認する
7626- URL := Board.URL;
7627- GikoSys.ParseURI(URL , protocol2, host2, path2, document2, port2, bookmark2 );
7326+ URL2 := Board.URL;
7327+ GikoSys.ParseURI(URL2 , protocol2, host2, path2, document2, port2, bookmark2 );
76287328 tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host));
76297329 tmp2 := Copy(host2, AnsiPos('.', host2) + 1, Length(host2));
7630- if ( not GikoSys.Is2chHost(tmp1)) and (tmp1 <> tmp2) then begin
7631- GikoSys.OpenBrowser(inURL, gbtUserApp);
7330+ if (tmp1 <> tmp2) then begin
7331+ GikoSys.OpenBrowser(URL, gbtUserApp);
76327332 Exit;
76337333 end;
76347334 end;
76357335
76367336 if not Board.IsThreadDatRead then
76377337 GikoSys.ReadSubjectFile(Board);
7638- URL := GikoSys.Get2chBrowsableThreadURL( inURL );
7338+ URL := GikoSys.Get2chBrowsableThreadURL( URL );
76397339 ThreadItem := Board.FindThreadFromURL( URL );
76407340 // 過去ログ倉庫から、ダウソしたスレが発見できないのでここで探すようにする (2004/01/22)
76417341 if ThreadItem = nil then begin
@@ -7648,9 +7348,9 @@ begin
76487348 {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
76497349 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
76507350 if shiftDown then
7651- GikoSys.OpenBrowser(URL1, gbtUserApp)
7351+ GikoSys.OpenBrowser(URL, gbtUserApp)
76527352 else if ctrlDown then
7653- GikoSys.OpenBrowser(URL1, gbtIE)
7353+ GikoSys.OpenBrowser(URL, gbtIE)
76547354 else begin
76557355 }
76567356 ThreadItem := TThreadItem.Create( nil, URL );
@@ -7664,34 +7364,25 @@ begin
76647364 if TBoard(ActiveList) = Board then
76657365 ListView.Items.Count := ListView.Items.Count + 1;
76667366 end;
7667- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
7668- browserRec := InsertBrowserTab(ThreadItem);
7669- if (browserRec <> nil) and (stRes > 0) then
7670- browserRec.Movement := IntToStr( stRes );
7367+ InsertBrowserTab(ThreadItem);
76717368 DownloadContent(ThreadItem);
76727369 {end;}
76737370 end else begin
7674- if ThreadItem.IsLogFile then begin
7675- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
7676- browserRec := InsertBrowserTab(ThreadItem);
7677- if (browserRec <> nil) and (stRes > 0) then
7678- browserRec.Movement := IntToStr( stRes );
7679- end else begin
7371+ if ThreadItem.IsLogFile then
7372+ InsertBrowserTab(ThreadItem)
7373+ else begin
76807374 if AnsiPos(Host, Board.URL) = 0 then
76817375 ThreadItem.DownloadHost := Host
76827376 else
76837377 ThreadItem.DownloadHost := '';
7684- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
7685- browserRec := InsertBrowserTab(ThreadItem);
7686- if (browserRec <> nil) and (stRes > 0) then
7687- browserRec.Movement := IntToStr( stRes );
7378+ InsertBrowserTab(ThreadItem);
76887379 DownloadContent(ThreadItem);
76897380 end;
76907381 end;
76917382 end else begin
7692- Board := BBSsFindBoardFromURL( inURL );
7383+ Board := BBSsFindBoardFromURL( URL );
76937384 if Board = nil then begin
7694- GikoSys.OpenBrowser(inURL, gbtAuto);
7385+ GikoSys.OpenBrowser(URL, gbtAuto);
76957386 end else begin
76967387 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
76977388 ShowBBSTree( Board.ParentCategory.ParenTBBS );
@@ -7737,9 +7428,6 @@ begin
77377428 end;
77387429
77397430 procedure TGikoForm.WndProc(var Message: TMessage);
7740-var
7741- senderBrowser : TWebBrowser;
7742- url : OleVariant;
77437431 begin
77447432 try
77457433 case Message.Msg of
@@ -7757,12 +7445,6 @@ begin
77577445 OnMinimized;
77587446 USER_SETLINKBAR:
77597447 SetLinkBar;
7760- USER_DOCUMENTCOMPLETE:
7761- if (Message.WParam <> 0) and
7762- (TObject(Message.WParam) is TWebBrowser) then begin
7763- senderBrowser := TWebBrowser( Message.WParam );
7764- BrowserDocumentComplete( senderBrowser, senderBrowser.Parent, url );
7765- end;
77667448 end;
77677449
77687450 inherited;
@@ -8217,10 +7899,10 @@ var
82177899 j: Integer;
82187900 ToolButton: TLinkToolButton;
82197901 MenuItem: TMenuItem;
8220- oldIgnoreResize : TResizeType;
7902+ oldIgnoreResize : Boolean;
82217903 begin
82227904 oldIgnoreResize := FIsIgnoreResize;
8223- FIsIgnoreResize := rtResizing;
7905+ FIsIgnoreResize := True;
82247906 MainCoolBar.Bands.BeginUpdate;
82257907 try
82267908 LinkBarPopupMenu.Items.Clear;
@@ -8313,7 +7995,7 @@ begin
83137995 if FDropSpaceNode <> nil then
83147996 FDropSpaceNode.Free;
83157997
8316- FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObjectFirst(Node.Parent, '', nil );
7998+ FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
83177999 FDropSpaceNode.MoveTo( Node, naInsert );
83188000 FDropSpaceNode.ImageIndex := -1;
83198001 FDropSpaceNode.SelectedIndex := -1;
@@ -8679,7 +8361,7 @@ begin
86798361 end;
86808362 end;
86818363 // 設定
8682- lResult := SendMessage( bar.Handle, RB_SETBANDINFO, idx, Integer( pBandInfo ) );
8364+ lResult := SendMessage( bar.Handle, RB_SETBANDINFO, i, Integer( pBandInfo ) );
86838365
86848366 end;
86858367
@@ -8924,11 +8606,12 @@ procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
89248606 var
89258607 Wnd: THandle;
89268608 delta: Integer;
8927-// browserPos : TPoint;
8609+// msg: TMessage;
89288610 const
89298611 ICON_SIZE = 16;
89308612 begin
8931- Wnd := WindowFromPoint(Mouse.CursorPos);
8613+ Handled := False;
8614+ Wnd := WindowFromPoint(MousePos);
89328615 Handled := True;
89338616 if WheelDelta > 0 then
89348617 Delta := -1
@@ -8938,42 +8621,13 @@ begin
89388621 if (Wnd = BrowserTab.Handle) or
89398622 (Wnd = BrowserTab.Parent.Handle) then begin
89408623 BrowserTab.ScrollTabs(Delta);
8624+ end else if Wnd = ListView.Handle then begin
8625+ if ListView.ViewStyle = vsList then
8626+ ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
8627+ else
8628+ ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
89418629 end else begin
8942- if FIsHandledWheel then begin
8943- FIsHandledWheel := False;
8944- Handled := False;
8945- end else begin
8946- FIsHandledWheel := True;
8947- if (Wnd = TreeView.Handle) or (Wnd = FavoriteTreeView.Handle)
8948- or (Wnd = ListView.Handle) or (Wnd = MessageListView.Handle)
8949- then
8950- SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y )
8951- else
8952- Handled := False;
8953-
8954-{
8955-// if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
8956- // TWebBrowser の Handle と比較しても一致しないので座標で TWebBrowser かどうか判定
8957- browserPos.X := 0;
8958- browserPos.Y := 0;
8959- Windows.ClientToScreen( Browser.Handle, browserPos );
8960- if (Longword(Mouse.CursorPos.X - browserPos.X) >= Browser.Width)
8961- or (Longword(Mouse.CursorPos.Y - browserPos.Y) >= Browser.Height)
8962- or (Longword(Mouse.CursorPos.Y - browserPos.Y) < 0)
8963- or (Longword(Mouse.CursorPos.Y - browserPos.Y) < 0) then begin
8964-// or not FActiveContent.Browser.Focused then
8965- // TWebBrowser は無限ループするのでそれ以外ならコントロールに送信
8966- if (Wnd <> BrowserToolBar.Handle) and (Wnd <> BrowserNameToolBar.Handle) then
8967- SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y )
8968- else
8969- Handled := False;
8970- end else begin
8971- Handled := False;
8972- end;
8973-// end else begin
8974-// SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (MousePos.X shl 16) or MousePos.Y );
8975-// end;
8976-} end;
8630+ Handled := False;
89778631 end;
89788632 end;
89798633
@@ -9010,10 +8664,9 @@ begin
90108664 ModifySelectList;
90118665 end else if Length( SelectComboBox.Text ) = 0 then
90128666 begin
9013- {* SelectComboBox.Textが空でも、入力途中でEscしたとか
9014- * 空のときにDelキーを押したとかなので、スレの絞込みを維持する。
9015- * (ここでは何もしない)
9016- *}
8667+ AllItemAction.Checked := True;
8668+ LogItemAction.Checked := False;
8669+ NewItemAction.Checked := False;
90178670 end else begin
90188671 // チラつくと嫌だから、一応押してあるときだけ処理する
90198672 if AllItemAction.Checked then
@@ -9144,6 +8797,11 @@ begin
91448797 SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
91458798 end;
91468799
8800+procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
8801+ Shift: TShiftState);
8802+begin
8803+end;
8804+
91478805 // 全てのレスを表示
91488806 procedure TGikoForm.AllResActionExecute(Sender: TObject);
91498807 var
@@ -9648,26 +9306,25 @@ end;
96489306 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
96499307 Shift: TShiftState);
96509308 begin
9651- if not TTreeView(Sender).IsEditing then begin
9652- Case Key of
9653- VK_F2:
9654- begin
9655- FClickNode := FavoriteTreeView.Selected;
9656- FavoriteTreeViewRenameActionExecute( Sender );
9657- end;
9658- VK_DELETE:
9659- begin
9660- FClickNode := FavoriteTreeView.Selected;
9661- FavoriteTreeViewDeleteActionExecute( Sender );
9662- end;
9663- VK_RETURN:
9664- begin
9665- FavoriteClick( FavoriteTreeView.Selected );
9666- FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
9667- end;
9668- VK_SPACE:
9669- FavoriteTreeViewDblClick( Sender );
9309+
9310+ Case Key of
9311+ VK_F2:
9312+ begin
9313+ FClickNode := FavoriteTreeView.Selected;
9314+ FavoriteTreeViewRenameActionExecute( Sender );
96709315 end;
9316+ VK_DELETE:
9317+ begin
9318+ FClickNode := FavoriteTreeView.Selected;
9319+ FavoriteTreeViewDeleteActionExecute( Sender );
9320+ end;
9321+ VK_RETURN:
9322+ begin
9323+ FavoriteClick( FavoriteTreeView.Selected );
9324+ FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
9325+ end;
9326+ VK_SPACE:
9327+ FavoriteTreeViewDblClick( Sender );
96719328 end;
96729329
96739330 end;
@@ -9919,7 +9576,7 @@ end;
99199576 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
99209577 Sender: TObject);
99219578 const
9922- DEL_MSG = '“^0”のログを削除します。よろしいですか?';
9579+ DEL_MSG = '“^0”のログをを削除します。よろしいですか?';
99239580 DEL_TITLE = '削除確認';
99249581 var
99259582 ThreadItem: TThreadItem;
@@ -10062,7 +9719,7 @@ begin
100629719 ThreadItem := FavThread.Item;
100639720
100649721 try
10065- s := ThreadItem.Title + #13#10 + ThreadItem.URL + #13#10;
9722+ s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
100669723 if s <> '' then
100679724 Clipboard.AsText := s;
100689725 finally
@@ -10077,7 +9734,7 @@ begin
100779734 GikoSys.ReadSubjectFile(Board);
100789735
100799736 try
10080- s := Board.Title + #13#10 + Board.URL + #13#10;
9737+ s := Board.URL + #13#10 + Board.Title + #13#10;
100819738 if s <> '' then
100829739 Clipboard.AsText := s;
100839740 finally
@@ -10134,12 +9791,7 @@ procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
101349791 begin
101359792 if FDragWFirst <> true then begin
101369793 FDragWFirst := false;
10137-{
10138- end else if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold)
10139- and (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
10140-(*}
10141- end else begin
10142-//*)
9794+ end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
101439795 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
101449796 if GikoSys.Setting.ListWidthState = glsMin then begin
101459797 BrowserMaxAndFocusAction.Execute;
@@ -10223,9 +9875,9 @@ end;
102239875 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
102249876 begin
102259877 if FListViewBackGroundColor <> value then begin
10226- FListViewBackGroundColor := value;
10227- ListView.Color := FListViewBackGroundColor;
10228- end;
9878+ FListViewBackGroundColor := value;
9879+ ListView.Color := FListViewBackGroundColor;
9880+ end;
102299881 end;
102309882 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
102319883 begin
@@ -10412,62 +10064,63 @@ end;
1041210064 procedure TGikoForm.TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
1041310065 var
1041410066 i: Integer;
10415- j: Integer;
10416- tempString: string;
10417- tmpURL: string;
10418- oldHost: string;
10419- oldBoardName: string;
10420- newHost: string;
10421- newBoardName: string;
10422- TabList: TStringList;
10423-begin
10424- TabList := TStringList.Create;
10425- if oldURLs.Count <> newURLs.Count then
10426- Exit;
10427- //ここから、BoardのURLの変更
10428- for j :=0 to oldURLs.Count - 1 do begin
10067+ j: Integer;
10068+ tempString: string;
10069+ tmpURL: string;
10070+ oldHost: string;
10071+ oldBoardName: string;
10072+ newHost: string;
10073+ newBoardName: string;
10074+ TabList: TStringList;
10075+begin
10076+ TabList := TStringList.Create;
10077+ if oldURLs.Count <> newURLs.Count then
10078+ Exit;
10079+ //ここから、BoardのURLの変更
10080+ for j :=0 to oldURLs.Count - 1 do begin
1042910081 for i :=0 to TabList.Count - 1 do begin
1043010082 if TabList.Text = oldURLs[j] then
10431- TabList.Text := newURLs[j];
10432- end;
10433- end;
10434- //ここまで、BoardのURLの変更
10435-
10436- //ここから、ThreadのURLの変更
10437- //面倒だけどthreadはそれぞれURLをチャックしながらやってかなきゃいけない。
10438- for i := 0 to oldURLs.Count - 1 do begin
10439- tmpURL := Copy(oldURLs[i], 1, Length(oldURLs[i]) -1);
10440- oldHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
10441- oldBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
10442- tmpURL := Copy(newURLs[i], 1, Length(newURLs[i]) -1);
10443- newHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
10444- newBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
10445-
10446- for j := 0 to TabList.Count - 1 do begin
10447- tempString := TabList.Text;
10448- if ( AnsiPos(oldBoardName, tempString) <> 0 ) and ( AnsiPos(oldHost, tempString ) <> 0 ) then begin
10449- tempString := StringReplace(tempString, oldHost, newHost,[]);
10450- TabList.Text := tempString;
10451- end;
10452- end;
10083+ TabList.Text := newURLs[j];
10084+ end;
10085+ end;
10086+ //ここまで、BoardのURLの変更
10087+
10088+ //ここから、ThreadのURLの変更
10089+ //面倒だけどthreadはそれぞれURLをチャックしながらやってかなきゃいけない。
10090+ for i := 0 to oldURLs.Count - 1 do begin
10091+ tmpURL := Copy(oldURLs[i], 1, Length(oldURLs[i]) -1);
10092+ oldHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
10093+ oldBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
10094+ tmpURL := Copy(newURLs[i], 1, Length(newURLs[i]) -1);
10095+ newHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
10096+ newBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
10097+
10098+ for j := 0 to TabList.Count - 1 do begin
10099+ tempString := TabList.Text;
10100+ if ( AnsiPos(oldBoardName, tempString) <> 0 ) and ( AnsiPos(oldHost, tempString ) <> 0 ) then begin
10101+ tempString := StringReplace(tempString, oldHost, newHost,[]);
10102+ TabList.Text := tempString;
10103+ end;
10104+ end;
1045310105 end;
10454- //ここまで、ThreadのURLの変更
10106+ //ここまで、ThreadのURLの変更
1045510107
1045610108 end;
1045710109
10458-/// 最小化される
10110+// 最小化される
1045910111 procedure TGikoForm.OnMinimize;
1046010112 begin
10461- if FActiveContent <> nil then begin
10462- FIsMinimize := mtMinimizing;
10113+ FIsMinimize := mtMinimizing;
10114+ if FActiveContent <> nil then
1046310115 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
10464- end;
10116+ PostMessage( Handle, USER_MINIMIZED, 0, 0 );
1046510117 end;
1046610118
10467-/// 最小化された (OnResized から呼ばれる)
10119+// 最小化された
1046810120 procedure TGikoForm.OnMinimized;
1046910121 begin
1047010122 FIsMinimize := mtMinimized;
10123+ FIsIgnoreResize := False;
1047110124 end;
1047210125
1047310126 procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
@@ -10478,8 +10131,8 @@ var
1047810131 affectedBand : TCoolBand;
1047910132 i : Integer;
1048010133 begin
10481- if (FOldFormWidth = Width) and not IsIconic( Handle ) and (FIsIgnoreResize = rtNone) then begin
10482- FIsIgnoreResize := rtResizing;
10134+ if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
10135+ FIsIgnoreResize := True;
1048310136 PostMessage( Handle, USER_RESIZED, 0, 0 );
1048410137 if not (Sender is TToolBar) or (CoolBar = nil) then
1048510138 Exit;
@@ -10620,6 +10273,8 @@ begin
1062010273 end;
1062110274 // TreeView がクリックされた
1062210275 procedure TGikoForm.TreeClick( Node : TTreeNode );
10276+var
10277+ i: Integer;
1062310278 begin
1062410279
1062510280 if Node = nil then
@@ -10633,7 +10288,16 @@ begin
1063310288 Exit;
1063410289 end;
1063510290
10636- ActiveListColumnSave;
10291+ if GetActiveList is TBBS then begin
10292+ for i := 0 to ListView.Columns.Count - 1 do
10293+ GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
10294+ end else if GetActiveList is TCategory then begin
10295+ for i := 0 to ListView.Columns.Count - 1 do
10296+ GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
10297+ end else if GetActiveList is TBoard then begin
10298+ for i := 0 to ListView.Columns.Count - 1 do
10299+ GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
10300+ end;
1063710301
1063810302 if TObject(Node.Data) is TBBS then begin
1063910303 SetActiveList(Node.data);
@@ -10748,6 +10412,7 @@ end;
1074810412
1074910413 // ギコナビのメッセージループを横取りします
1075010414 procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
10415+
1075110416 //var
1075210417 // key : Word;
1075310418 begin
@@ -10813,7 +10478,7 @@ end;
1081310478 procedure TGikoForm.MessagePanelResize(Sender: TObject);
1081410479 begin
1081510480
10816- if FIsIgnoreResize <> rtNone then
10481+ if FIsIgnoreResize then
1081710482 Exit;
1081810483
1081910484 if GikoSys.Setting.ListOrientation = gloVertical then begin
@@ -10826,30 +10491,10 @@ begin
1082610491 end;
1082710492
1082810493 procedure TGikoForm.OnResized;
10829-var
10830- doc : Variant;
1083110494 begin
1083210495
1083310496 FOldFormWidth := Width;
10834- FIsIgnoreResize := rtNone;
10835-
10836- case FIsMinimize of
10837- mtMinimizing:
10838- begin
10839- // 最小化中である
10840- PostMessage( Handle, USER_MINIMIZED, 0, 0 );
10841- end;
10842-
10843- mtMinimized:
10844- begin
10845- // 最小化は既に完了している (つまりタスクバーからウィンドウを復元中)
10846- if FActiveContent <> nil then begin
10847- doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
10848- doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
10849- end;
10850- FIsMinimize := mtNone;
10851- end;
10852- end;
10497+ FIsIgnoreResize := False;
1085310498
1085410499 end;
1085510500
@@ -10881,12 +10526,8 @@ begin
1088110526 Self.FEvent.Free;
1088210527 if Self.FBrowser <> nil then begin
1088310528 if Self.Thread <> nil then begin
10884- //タブの復元で復元されたスレは、描画されていないときがあるので
10885- //そのときのスクロール量を保存してしまうとトップに戻ってしまう。
10886- if Self.FBrowser.OleObject.Document.documentElement.innerText <> '' then begin
10887- doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
10888- Self.Thread.ScrollTop := doc.Body.ScrollTop;
10889- end;
10529+ doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
10530+ Self.Thread.ScrollTop := doc.Body.ScrollTop;
1089010531 end;
1089110532 //TOleControl(Self.FBrowser).Visible := false;
1089210533 ShowWindow(Self.FBrowser.Handle, SW_HIDE);
@@ -11165,16 +10806,12 @@ begin
1116510806 SelectListItem(List);
1116610807 for i := 0 to List.Count - 1 do begin
1116710808 if TObject(List[i]) is TThreadItem then begin
11168- if (TThreadItem(List[i]).UnRead) then begin
11169- TThreadItem(List[i]).UnRead := false;
11170- TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
11171- end;
10809+ TThreadItem(List[i]).UnRead := false;
10810+ TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
1117210811 end;
1117310812 end;
1117410813 if TreeView.Visible then
1117510814 TreeView.Refresh;
11176- if ListView.Visible then
11177- ListView.Refresh;
1117810815 finally
1117910816 List.Free;
1118010817 end;
@@ -11190,16 +10827,12 @@ begin
1119010827 SelectListItem(List);
1119110828 for i := 0 to List.Count - 1 do begin
1119210829 if TObject(List[i]) is TThreadItem then begin
11193- if (TThreadItem(List[i]).IsLogFile) and (not TThreadItem(List[i]).UnRead) then begin
11194- TThreadItem(List[i]).UnRead := true;
11195- TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
11196- end;
10830+ TThreadItem(List[i]).UnRead := true;
10831+ TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
1119710832 end;
1119810833 end;
1119910834 if TreeView.Visible then
1120010835 TreeView.Refresh;
11201- if ListView.Visible then
11202- ListView.Refresh;
1120310836 finally
1120410837 List.Free;
1120510838 end;
@@ -11210,8 +10843,11 @@ procedure TGikoForm.BrowserPanelCanResize(Sender: TObject; var NewWidth,
1121010843 var
1121110844 i: Integer;
1121210845 begin
11213- for i := BROWSER_COUNT - 1 downto 0 do begin
10846+ for i := 0 to BROWSER_COUNT - 1 do
1121410847 SetWindowPos(TWebBrowser(FBrowsers[i]).Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
10848+
10849+ if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10850+ SetWindowPos(FActiveContent.Browser.Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
1121510851 end;
1121610852 end;
1121710853
@@ -11350,7 +10986,7 @@ end;
1135010986 procedure TGikoForm.TabsSaveToFileActionExecute(Sender: TObject);
1135110987 var
1135210988 SaveTabList: TStringList;
11353- Result: Boolean;
10989+ Result: Boolean;
1135410990 begin
1135510991 SaveTabList := TStringList.Create;
1135610992 try
@@ -11571,225 +11207,6 @@ begin
1157111207 LoadTabURLs;
1157211208 end;
1157311209
11574-/// ListView のカラム幅および位置の保存
11575-procedure TGikoForm.ActiveListColumnSave;
11576-var
11577- ActivListObj : TObject;
11578- i, id, idx : Integer;
11579- BBSOrder : TGikoBBSColumnList;
11580- CategoryOrder : TGikoCategoryColumnList;
11581- BoardOrder : TGikoBoardColumnList;
11582-begin
11583-
11584- ActivListObj := ActiveList;
11585- if ActivListObj is TBBS then begin
11586- //===== カテゴリリスト =====
11587- BBSOrder := TGikoBBSColumnList.Create;
11588- try
11589- for i := 0 to ListView.Columns.Count - 1 do begin
11590- // 順序の取得
11591- idx := ListView.Column[ i ].Tag;
11592- id := Ord( GikoSys.Setting.BBSColumnOrder[ idx ] );
11593- BBSOrder.Add( TGikoBBSColumnID( id ) );
11594- // 幅の保存
11595- GikoSys.Setting.BBSColumnWidth[ id ] := ListView.Column[ i ].Width;
11596- end;
11597- for i := 0 to ListView.Columns.Count - 1 do
11598- // 順序の保存
11599- GikoSys.Setting.BBSColumnOrder[ i ] := BBSOrder[ i ];
11600- finally
11601- BBSOrder.Free;
11602- end;
11603- end else if ActivListObj is TCategory then begin
11604- //===== 板リスト =====
11605- CategoryOrder := TGikoCategoryColumnList.Create;
11606- try
11607- for i := 0 to ListView.Columns.Count - 1 do begin
11608- // 順序の取得
11609- idx := ListView.Column[ i ].Tag;
11610- id := Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] );
11611- CategoryOrder.Add( TGikoCategoryColumnID( id ) );
11612- // 幅の保存
11613- GikoSys.Setting.CategoryColumnWidth[ id ] := ListView.Column[ i ].Width;
11614- end;
11615- for i := 0 to ListView.Columns.Count - 1 do
11616- // 順序の保存
11617- GikoSys.Setting.CategoryColumnOrder[ i ] := CategoryOrder[ i ];
11618- finally
11619- CategoryOrder.Free;
11620- end;
11621- end else if ActivListObj is TBoard then begin
11622- //===== スレリスト =====
11623- BoardOrder := TGikoBoardColumnList.Create;
11624- try
11625- for i := 0 to ListView.Columns.Count - 1 do begin
11626- // 順序の取得
11627- idx := ListView.Column[ i ].Tag;
11628- id := Ord( GikoSys.Setting.BoardColumnOrder[ idx ] );
11629- BoardOrder.Add( TGikoBoardColumnID( id ) );
11630- // 幅の保存
11631- GikoSys.Setting.BoardColumnWidth[ id ] := ListView.Column[ i ].Width;
11632- end;
11633- for i := 0 to ListView.Columns.Count - 1 do
11634- // 順序の保存
11635- GikoSys.Setting.BoardColumnOrder[ i ] := BoardOrder[ i ];
11636- finally
11637- BoardOrder.Free;
11638- end;
11639- end;
11640-
11641-end;
11642-
11643-procedure TGikoForm.ListViewColumnRightClick(Sender: TObject;
11644- Column: TListColumn; Point: TPoint);
11645-var
11646- i, j : Integer;
11647- item : TMenuItem;
11648-begin
11649-
11650- // ポップアップメニューをクリア
11651- for i := ListColumnPopupMenu.Items.Count - 1 downto 0 do
11652- ListColumnPopupMenu.Items.Items[ i ].Free;
11653-
11654- // メニューの作成 (メインカラムは必須なのでメニューに含めない)
11655- if TObject( FActiveList ) is TBBS then begin
11656-
11657- //===== カテゴリリスト =====
11658- for i := 1 to Length( GikoBBSColumnCaption ) - 1 do begin
11659- item := TMenuItem.Create( ListColumnPopupMenu );
11660- item.Caption := GikoBBSColumnCaption[ i ];
11661- item.Tag := i;
11662- item.OnClick := ListColumnPopupMenuOnClick;
11663- for j := GikoSys.Setting.BBSColumnOrder.Count - 1 downto 0 do begin
11664- if GikoSys.Setting.BBSColumnOrder[ j ] = TGikoBBSColumnID( i ) then begin
11665- item.Checked := True;
11666- Break;
11667- end;
11668- end;
11669- ListColumnPopupMenu.Items.Add( item );
11670- end;
11671-
11672- end else if TObject( FActiveList ) is TCategory then begin
11673-
11674- //===== 板リスト =====
11675- for i := 1 to Length( GikoCategoryColumnCaption ) - 1 do begin
11676- item := TMenuItem.Create( ListColumnPopupMenu );
11677- item.Caption := GikoCategoryColumnCaption[ i ];
11678- item.Tag := i;
11679- item.OnClick := ListColumnPopupMenuOnClick;
11680- for j := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 0 do begin
11681- if GikoSys.Setting.CategoryColumnOrder[ j ] = TGikoCategoryColumnID( i ) then begin
11682- item.Checked := True;
11683- Break;
11684- end;
11685- end;
11686- ListColumnPopupMenu.Items.Add( item );
11687- end;
11688-
11689- end else if TObject( FActiveList ) is TBoard then begin
11690-
11691- //===== スレリスト =====
11692- for i := 1 to Length( GikoBoardColumnCaption ) - 1 do begin
11693- item := TMenuItem.Create( ListColumnPopupMenu );
11694- item.Caption := GikoBoardColumnCaption[ i ];
11695- item.Tag := i;
11696- item.OnClick := ListColumnPopupMenuOnClick;
11697- for j := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 0 do begin
11698- if GikoSys.Setting.BoardColumnOrder[ j ] = TGikoBoardColumnID( i ) then begin
11699- item.Checked := True;
11700- Break;
11701- end;
11702- end;
11703- ListColumnPopupMenu.Items.Add( item );
11704- end;
11705-
11706- end;
11707-
11708- // メニューの表示
11709- Point := ListView.ClientToScreen( Point );
11710- if ListColumnPopupMenu.Items.Count > 0 then
11711- ListColumnPopupMenu.Popup( Point.X, Point.Y );
11712-
11713-end;
11714-
11715-/// ListColumnPopupMenu アイテムのクリックイベント
11716-procedure TGikoForm.ListColumnPopupMenuOnClick( Sender : TObject );
11717-var
11718- i : Integer;
11719- orderList : TList;
11720- item : TMenuItem;
11721-begin
11722-
11723- if not (Sender is TMenuItem) then
11724- Exit;
11725-
11726- ActiveListColumnSave;
11727- item := TMenuItem( Sender );
11728-
11729- if TObject( FActiveList ) is TBBS then
11730- orderList := GikoSys.Setting.BBSColumnOrder
11731- else if TObject( FActiveList ) is TCategory then
11732- orderList := GikoSys.Setting.CategoryColumnOrder
11733- else if TObject( FActiveList ) is TBoard then
11734- orderList := GikoSys.Setting.BoardColumnOrder
11735- else
11736- Exit;
11737-
11738- if item.Checked then begin
11739- // カラムの削除
11740- for i := orderList.Count - 1 downto 0 do begin
11741- if Integer( orderList[ i ] ) = item.Tag then begin
11742- orderList.Delete( i );
11743- Break;
11744- end;
11745- end;
11746- end else begin
11747- // カラムの追加
11748- orderList.Add( Pointer( item.Tag ) );
11749- end;
11750-
11751- SetActiveList( FActiveList );
11752-
11753-end;
11754-//指定した番号のレスにjumpするAction
11755-procedure TGikoForm.JumpToNumOfResActionExecute(Sender: TObject);
11756-var
11757- str: string;
11758- res: integer;
11759-begin
11760- str := '1';
11761- if( InputQuery('指定した番号のレスに飛ぶ', '番号を入力してください', str) ) then begin
11762- str := ZenToHan(str);
11763- res := StrToIntDef(str, -1);
11764- if (res > 0) and (res <= GetActiveContent.Count) then begin
11765- BrowserMovement(IntToStr(res), FActiveContent);
11766- SetFocusForBrowserAction.Execute;
11767- end else if res > GetActiveContent.Count then begin
11768- BrowserMovement(IntToStr(GetActiveContent.Count), FActiveContent);
11769- SetFocusForBrowserAction.Execute;
11770- end;
11771- end;
11772-end;
11773-
11774-procedure TGikoForm.JumpToNumOfResActionUpdate(Sender: TObject);
11775-begin
11776- JumpToNumOfResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
11777-end;
11778-
11779-procedure TGikoForm.FavoriteTreeViewCollapseActionExecute(Sender: TObject);
11780-var
11781- node : TTreeNode;
11782-begin
11783-
11784- node := FavoriteTreeView.Items.GetFirstNode;
11785- while node <> nil do begin
11786- if node.HasChildren then
11787- node.Expanded := False;
11788- node := node.GetNext;
11789- end;
11790-
11791-end;
11792-
1179311210 initialization
1179411211 OleInitialize(nil);
1179511212 finalization
--- a/GikoSystem.pas
+++ b/GikoSystem.pas
@@ -187,7 +187,7 @@ type
187187 function Is2chHost(Host: string): Boolean;
188188 function Parse2chURL(const url: string; const path: string; const document: string; var BBSID: string; var BBSKey: string): Boolean;
189189 function Parse2chURL2(URL: string): TPathRec;
190- procedure ParseURI(const URL : string; var Protocol, Host, Path, Document, Port, Bookmark: string);
190+ procedure ParseURI(var URL, Protocol, Host, Path, Document, Port, Bookmark: string);
191191 function GetVersionBuild: Integer;
192192 function GetBrowsableThreadURL( inURL : string ) : string;
193193 function GetThreadURL2BoardURL( inURL : string ) : string;
@@ -218,7 +218,7 @@ const
218218 ZERO_DATE: Integer = 25569;
219219 BETA_VERSION_NAME_E = 'beta';
220220 BETA_VERSION_NAME_J = 'バタ';
221- BETA_VERSION = 49;
221+ BETA_VERSION = 48;
222222 BETA_VERSION_BUILD = ''; //debug版など
223223 APP_NAME = 'gikoNavi';
224224
@@ -2999,8 +2999,7 @@ begin
29992999 OutputDebugString(pchar(HOST_NAME[0]));
30003000 for i := 0 to Length(HOST_NAME) - 1 do begin
30013001 // Len := Length(HOST_NAME[i]);
3002- if (AnsiPos(HOST_NAME[i], Host) > 0) and
3003- (AnsiPos(HOST_NAME[i], Host) = (Length(Host) - Length(HOST_NAME[i]) + 1)) then begin
3002+ if AnsiPos(HOST_NAME[i], Host) = (Length(Host) - Length(HOST_NAME[i]) + 1) then begin
30043003 Result := True;
30053004 Exit;
30063005 end;
@@ -3424,7 +3423,7 @@ begin
34243423 end;
34253424 end;
34263425
3427-procedure TGikoSys.ParseURI(const URL : string; var Protocol, Host, Path, Document, Port, Bookmark: string);
3426+procedure TGikoSys.ParseURI(var URL, Protocol, Host, Path, Document, Port, Bookmark: string);
34283427 var
34293428 URI: TIdURI;
34303429 begin
--- a/GikoXMLDoc.pas
+++ b/GikoXMLDoc.pas
@@ -10,7 +10,7 @@ interface
1010 uses
1111 //==================================================
1212
13- Classes, SysUtils, Windows,
13+ Classes, SysUtils,
1414 YofUtils;
1515
1616 //==================================================
@@ -26,7 +26,6 @@ type
2626 IXMLNode = class
2727 private
2828 FNodeName : string;
29- FCapacity : Integer;
3029 FCount : Integer;
3130 FAttributeCount : Integer;
3231 FChildNodes : IXMLNode;
@@ -55,16 +54,15 @@ type
5554 end;
5655
5756 function XMLCloseCheck(
58- var p : PChar;
59- const tail : PChar;
57+ var f : TFileStream;
6058 var node : IXMLNode;
59+ ch : char;
6160 out tag : string;
6261 out closed : boolean // 呼び出したルーチンが node を閉じるべきなら true
6362 ) : boolean; // ch をこのルーチンが処理したなら true
6463
6564 function XMLReadNode(
66- var p : PChar;
67- const tail : PChar;
65+ var f : TFileStream;
6866 var node : IXMLNode
6967 ) : string; // node 以外のノードが閉じられた場合のノード名
7068
@@ -77,8 +75,6 @@ procedure LoadXMLDocument(
7775 const
7876 //==================================================
7977 kXMLWhite : TSysCharSet = [#0..#$20];
80- kXMLNodeNameStop : TSysCharSet = [#0..#$20, '/', '>'];
81- kXMLAttributeNameStop : TSysCharSet = [#0..#$20, '=', '/', '>'];
8278 kXMLDQuote : TSysCharSet = ['"'];
8379 kXMLTagStart : TSysCharSet = ['<'];
8480 kXMLTagEnd : TSysCharSet = ['>'];
@@ -94,7 +90,6 @@ begin
9490
9591 inherited;
9692
97- FCapacity := 0;
9893 FCount := 0;
9994
10095 end;
@@ -143,11 +138,7 @@ procedure IXMLNode.Add( node : IXMLNode );
143138 begin
144139
145140 Inc( FCount );
146- if FCount > FCapacity then begin
147- FCapacity := FCapacity + (FCapacity shr 2) + 1;
148- SetLength( FNodes, FCapacity );
149- end;
150-
141+ SetLength( FNodes, FCount );
151142 FNodes[ FCount - 1 ] := node;
152143
153144 end;
@@ -163,7 +154,6 @@ begin
163154 index := FAttributeCount;
164155 Inc( FAttributeCount );
165156 SetLength( FAttributes, FAttributeCount );
166-
167157 FAttributes[ index ].Name := Name;
168158 FAttributes[ index ].Value := Value;
169159
@@ -176,133 +166,116 @@ begin
176166
177167 end;
178168
179-{*!
180-\brief tok を探す
181-\param p 探索開始位置
182-\param tail 終了位置 + 1
183-\param tok 探すキャラクタ
184-\return tok が最初に見つかった位置
185-*}
186-function AnsiStrTok(
187- p : PChar;
188- const tail : PChar;
189- const tok : TSysCharSet
190-) : PChar;
169+// untilSet になるまで飛ばす
170+procedure FileThruUntil(
171+ var f : TFileStream;
172+ const untilSet : TSysCharSet
173+);
174+var
175+ ch : char;
191176 begin
192177
193- while p < tail do
178+ while f.Position < f.Size do
194179 begin
195- if p^ in tok then
180+ f.ReadBuffer( ch, 1 );
181+ if ch in untilSet then
196182 begin
197- Break;
198- end else if p^ in kXMLKanji then
199- p := p + 2
200- else
201- Inc( p );
183+ f.Seek( -1, soFromCurrent );
184+ exit;
185+ end else if ch in kXMLKanji then
186+ f.Seek( 1, soFromCurrent );
202187 end;
203188
204- Result := p;
205-
206189 end;
207190
208-{*!
209-\brief tok では無いキャラクタを探す
210-\param p 探索開始位置
211-\param tail 終了位置 + 1
212-\param tok 探すキャラクタ
213-\return tok ではないキャラクタが最初に見つかった位置
214-*}
215-function AnsiStrNonTok(
216- p : PChar;
217- const tail : PChar;
218- const tok : TSysCharSet
219-) : PChar;
191+// whileSet の間飛ばす
192+procedure FileThruWhile(
193+ var f : TFileStream;
194+ const whileSet : TSysCharSet
195+);
196+var
197+ ch : char;
220198 begin
221199
222- while p < tail do
200+ while f.Position < f.Size do
223201 begin
224- if p^ in tok then
202+ f.ReadBuffer( ch, 1 );
203+ if ch in whileSet then
225204 begin
226- if p^ in kXMLKanji then
227- p := p + 2
228- else
229- Inc( p );
205+ if ch in kXMLKanji then
206+ f.ReadBuffer( ch, 1 );
230207 end else begin
231- Break;
208+ f.Seek( -1, soFromCurrent );
209+ exit;
232210 end;
233211 end;
234212
235- Result := p;
236-
237213 end;
238214
239215 function XMLCloseCheck(
240- var p : PChar;
241- const tail : PChar;
216+ var f : TFileStream;
242217 var node : IXMLNode;
218+ ch : char;
243219 out tag : string;
244220 out closed : boolean
245221 ) : boolean; // ch をこのルーチンが処理したなら true
246222 var
247- found : PChar;
223+ last : Integer;
224+ tagLen : Integer;
248225 begin
249226
250227 closed := false;
251228 Result := false;
252229 tag := '';
253230
254- case p^ of
255- '>':
256- begin
257- // 開始タグの最後まで読んだ
258- Inc( p ); // '>' 飛ばし
259- Result := true;
260- end;
261-
262- '?':
263- begin
264- // <?xml?> みたいなやつ。よって無視
265- p := AnsiStrTok( p, tail, kXMLTagEnd );
266- p := AnsiStrTok( p, tail, kXMLTagStart );
267- Inc( p ); // '<' 飛ばし
268- p := AnsiStrNonTok( p, tail, kXMLWhite );
269- //closed := true;
270- Result := true;
271- end;
272-
273- '/':
274- begin
275- // タグ名を読み込んで返す
276- Inc( p ); // '/' 飛ばし
277- found := AnsiStrTok( p, tail, kXMLTagEnd );
278-// tag := Copy( p, 0, found - p ); // 何故か激遅
279- SetLength( tag, found - p );
280- CopyMemory( PChar( tag ), p, found - p );
281-
282- p := found + 1; // '>' 飛ばし
283- closed := true;
284- Result := true;
285- end;
231+ if ch = '>' then
232+ begin
233+ // 開始タグの最後まで読んだ
234+ Result := true;
235+ end else if ch = '?' then
236+ begin
237+ // <?xml?> みたいなやつ。よって無視
238+ FileThruUntil( f, kXMLTagEnd );
239+ FileThruUntil( f, kXMLTagStart );
240+ f.Seek( 1, soFromCurrent );
241+ FileThruWhile( f, kXMLWhite );
242+ //closed := true;
243+ Result := true;
244+ end else if ch = '/' then
245+ begin
246+ // タグ名を読み込んで返す
247+ last := f.Position;
248+ FileThruUntil( f, kXMLTagEnd );
249+ tagLen := f.Position - last;
250+ SetLength( tag, tagLen );
251+
252+ f.Seek( last, soFromBeginning );
253+ f.ReadBuffer( PChar( tag )^, tagLen );
254+
255+ f.Seek( f.Position + 1, soFromBeginning ); // '>' 飛ばし
256+ closed := true;
257+ Result := true;
286258 end;
287259
288260 end;
289261
290262 function XMLReadNode(
291- var p : PChar;
292- const tail : PChar;
263+ var f : TFileStream;
293264 var node : IXMLNode
294265 ) : string; // node 以外のノードが閉じられた場合のノード名
295266 var
296267 child : IXMLNode;
297268
298- found : PChar;
269+ last : Integer;
299270 tag : string;
271+ tagLen : Integer;
300272
301273 isClosed : boolean;
302274
303- nodeName : string;
304275 attributeName : string;
305276 attributeValue : string;
277+
278+ ch : char;
306279 label
307280 NextNode;
308281 begin
@@ -310,14 +283,16 @@ begin
310283 // node の読み込み(1 ループにつき 1 ノード)
311284 node.ChildNodes := IXMLNode.Create;
312285
313- while p < tail do
286+ while f.Position < f.Size do
314287 begin
315288 // NodeName 読み込み
316- p := AnsiStrNonTok( p, tail, kXMLWhite );
289+ FileThruWhile( f, kXMLWhite );
317290
318- while p < tail do
291+ while f.Position < f.Size do
319292 begin
320- if XMLCloseCheck( p, tail, node, tag, isClosed ) then
293+ f.ReadBuffer( ch, 1 );
294+
295+ if XMLCloseCheck( f, node, ch, tag, isClosed ) then
321296 begin
322297 if isClosed then
323298 begin
@@ -326,12 +301,11 @@ begin
326301 end;
327302
328303 goto NextNode;
329- end else if p^ = '<' then
304+ end else if ch = '<' then
330305 begin
331306 // 新規ノード
332- Inc( p );
333307 child := IXMLNode.Create;
334- tag := XMLReadNode( p, tail, child );
308+ tag := XMLReadNode( f, child );
335309 node.ChildNodes.Add( child );
336310
337311 // タグが閉じられた
@@ -344,32 +318,35 @@ begin
344318 end;
345319
346320 goto NextNode;
347- end else if p^ in kXMLWhite then
321+ end else if ch in kXMLWhite then
348322 begin
349323 // NodeName 完了
350324 break;
351325 end else begin
352- found := AnsiStrTok( p, tail, kXMLNodeNameStop );
353- SetLength( nodeName, found - p );
354- CopyMemory( PChar( nodeName ), p, found - p );
355- node.NodeName := nodeName;
326+ node.NodeName := node.NodeName + ch;
356327
357- p := found;
328+ if ch in kXMLKanji then
329+ begin
330+ f.ReadBuffer( ch, 1 );
331+ node.NodeName := node.NodeName + ch;
332+ end;
358333 end;
359334 end;
360335
361336 // Attribute の読み込み
362- while p < tail do
337+ while f.Position < f.Size do
363338 begin
364339 // Attribute の名前を読み込み
365340 attributeName := '';
366341 attributeValue := '';
367342
368- p := AnsiStrNonTok( p, tail, kXMLWhite );
343+ FileThruWhile( f, kXMLWhite );
369344
370- while p < tail do
345+ while f.Position < f.Size do
371346 begin
372- if XMLCloseCheck( p, tail, node, tag, isClosed ) then
347+ f.ReadBuffer( ch, 1 );
348+
349+ if XMLCloseCheck( f, node, ch, tag, isClosed ) then
373350 begin
374351 if isClosed then
375352 begin
@@ -381,30 +358,33 @@ begin
381358
382359 // 次のノードへ
383360 goto NextNode;
384- end else if p^ = '=' then
361+ end else if ch = '=' then
385362 begin
386363 // ここからは値が始まるので名前は終了
387- Inc( p );
388364 break;
389- end else if p^ in kXMLWhite then
365+ end else if ch in kXMLWhite then
390366 begin
391367 // Value が存在しない(規格外)ので次のノードへ
392368 goto NextNode;
393369 end else begin
394- found := AnsiStrTok( p, tail, kXMLAttributeNameStop );
395- SetLength( attributeName, found - p );
396- CopyMemory( PChar( attributeName ), p, found - p );
370+ attributeName := attributeName + ch;
397371
398- p := found;
372+ if ch in kXMLKanji then
373+ begin
374+ f.ReadBuffer( ch, 1 );
375+ attributeName := attributeName + ch;
376+ end;
399377 end;
400378 end;
401379
402380 // Attribute の値を読み込み
403- p := AnsiStrNonTok( p, tail, kXMLWhite );
381+ FileThruWhile( f, kXMLWhite );
404382
405- while p < tail do
383+ while f.Position < f.Size do
406384 begin
407- if XMLCloseCheck( p, tail, node, tag, isClosed ) then
385+ f.ReadBuffer( ch, 1 );
386+
387+ if XMLCloseCheck( f, node, ch, tag, isClosed ) then
408388 begin
409389 if isClosed then
410390 begin
@@ -420,22 +400,24 @@ begin
420400
421401 // 次のノードへ
422402 goto NextNode;
423- end else if p^ = '"' then
403+ end else if ch = '"' then
424404 begin
425405 // 値が "" で括られてるので(ていうか括られてなきゃいけないんだけど)
426406 // 値を一括読み込み
427- Inc( p );
428- found := AnsiStrTok( p, tail, kXMLDQuote );
429-// attributeValue := Copy( p, 0, found - p ); // 何故か激遅
430- SetLength( attributeValue, found - p );
431- CopyMemory( PChar( attributeValue ), p, found - p );
407+ last := f.Position;
408+ FileThruUntil( f, kXMLDQuote );
409+ tagLen := f.Position - last;
410+ SetLength( attributeValue, tagLen );
411+
412+ f.Seek( last, soFromBeginning );
413+ f.ReadBuffer( PChar( attributeValue )^, tagLen );
432414
433415 node.AddAttribute( attributeName, HtmlDecode( attributeValue ) );
434416
435417 // 値を読み終わったので終了
436- p := found + 1; // '"' 飛ばし
418+ f.Seek( f.Position + 1, soFromBeginning ); // '"' 飛ばし
437419 break;
438- end else if p^ in kXMLWhite then
420+ end else if ch in kXMLWhite then
439421 begin
440422 // 規格外だけどね
441423 node.AddAttribute( attributeName, HtmlDecode( attributeValue ) );
@@ -443,14 +425,12 @@ begin
443425 goto NextNode;
444426 end else begin
445427 // 規格外だけど一応取っておく
446- attributeValue := attributeValue + p^;
428+ attributeValue := attributeValue + ch;
447429
448- if p^ in kXMLKanji then
430+ if ch in kXMLKanji then
449431 begin
450- attributeValue := attributeValue + (p + 1)^;
451- p := p + 2;
452- end else begin
453- Inc( p );
432+ f.ReadBuffer( ch, 1 );
433+ attributeValue := attributeValue + ch;
454434 end;
455435 end;
456436 end;
@@ -469,21 +449,19 @@ procedure LoadXMLDocument(
469449 type
470450 xmlMode = ( xmlHoge );
471451 var
472- xmlFile : TMappedFile;
473- p : PChar;
452+ xmlFile : TFileStream;
474453 begin
475- //Result := IXMLDocument.Create;
454+ //Result := IXMLDocument.Create;
476455 //doc := IXMLDocument.Create;
477456
478- xmlFile := TMappedFile.Create( fileName );
457+ xmlFile := TFileStream.Create( fileName, fmOpenRead );
479458
480- try
481- p := xmlFile.Memory;
482- XMLReadNode( p, p + xmlFile.Size, IXMLNode( doc ) );
483- //XMLReadNode( xmlFile, IXMLNode( Result ) );
484- finally
459+ try
460+ XMLReadNode( xmlFile, IXMLNode( doc ) );
461+ //XMLReadNode( xmlFile, IXMLNode( Result ) );
462+ finally
485463 xmlFile.Free;
486- end;
464+ end;
487465
488466 //Result := doc;
489467
--- a/ItemDownload.pas
+++ b/ItemDownload.pas
@@ -156,7 +156,9 @@ var
156156 Idx: Integer;
157157 ATitle: string;
158158 DownloadResult: Boolean;
159+ foundPos: Integer;
159160 boardPlugIn : TBoardPlugIn;
161+ listContent : string;
160162 lastContent : string;
161163 logFile : TFileStream;
162164 adjustMargin : Integer;
@@ -1175,7 +1177,7 @@ end;
11751177 }
11761178 procedure TDownloadItem.SaveItemFile;
11771179 var
1178- Body, oldBody: TStringList;
1180+ Body: TStringList;
11791181 Cnt: Integer;
11801182 OldCnt: Integer;
11811183 FileName: string;
@@ -1184,11 +1186,11 @@ var
11841186 NewRes: Integer;
11851187 finish : Boolean;
11861188 loopCnt : Integer;
1187-// KokoTxt : string;
1188-// KokoIdx : Integer;
1189-// NewTxt : string;
1190-// NewIdx : Integer;
1191-// LastTxt : string;
1189+ KokoTxt : string;
1190+ KokoIdx : Integer;
1191+ NewTxt : string;
1192+ NewIdx : Integer;
1193+ LastTxt : string;
11921194 LastIdx : Integer;
11931195 begin
11941196 FileName := ThreadItem.GetThreadFileName;
@@ -1206,6 +1208,10 @@ begin
12061208 try
12071209 // if FileExists(FileName) and (ResponseCode = 206) then begin
12081210 if FileExists(FileName) and (State = gdsDiffComplete) then begin
1211+ // Body.Text := Content;
1212+ // if Body.Count > 0 then
1213+ // Body.Delete(0);
1214+ // Content := Body.Text;
12091215 loopCnt := 10;
12101216 repeat
12111217 finish := true;
@@ -1218,55 +1224,53 @@ begin
12181224 except
12191225 on E:EFOpenError do begin
12201226 sleep(10);
1227+ finish := false;
12211228 Dec(loopCnt);
1222- if loopCnt > 0 then
1223- finish := false;
12241229 end;
12251230 end;
1226- until finish;
1231+ until finish and ( loopCnt > 0 );
12271232 //Cnt := Body.Count;
12281233 end else begin
12291234 if IsAbone then begin
12301235 // あぼーんを検出したのでここまで読んだと新着レス番のつけなおし
1231- oldBody := TStringList.Create;
1232- try
1233- loopCnt := 10;
1234- repeat
1235- finish := true;
1236- try
1237- oldBody.LoadFromFile(FileName);
1238- except
1239- on E:EFOpenError do begin
1240- sleep(10);
1241- Dec(loopCnt);
1242- if loopCnt > 0 then
1243- finish := false
1244- else
1245- finish := true;
1246- end;
1236+ loopCnt := 10;
1237+ repeat
1238+ finish := true;
1239+ try
1240+ Body.LoadFromFile(FileName);
1241+ except
1242+ on E:EFOpenError do begin
1243+ sleep(10);
1244+ finish := false;
1245+ Dec(loopCnt);
12471246 end;
1248- until finish;
1249-
1250- Body.Text := Content;
1251- if (ThreadItem.Kokomade > 0) and (ThreadItem.Kokomade <= oldBody.Count) then begin
1252- ThreadItem.Kokomade := Body.IndexOf(oldBody.Strings[ ThreadItem.Kokomade - 1 ]);
1253- if ThreadItem.Kokomade <> -1 then ThreadItem.Kokomade := ThreadItem.Kokomade + 1;
12541247 end;
1248+ until finish and ( loopCnt > 0 );
1249+ LastTxt := Body.Strings[ Body.Count - 1 ];
1250+ if ThreadItem.Kokomade > 0 then begin
1251+ KokoTxt := Body.Strings[ ThreadItem.Kokomade - 1 ];
1252+ end;
1253+ if ThreadItem.NewReceive > 0 then begin
1254+ NewTxt := Body.Strings[ ThreadItem.NewReceive - 1 ];
1255+ end;
12551256
1256- LastIdx := oldBody.Count;
1257- repeat
1258- Dec(LastIdx);
1259- OldCnt := Body.IndexOf(oldBody.Strings[ LastIdx ]) + 1;
1260- until ( OldCnt <> 0 ) or (LastIdx = 0);
1261-
1262- if OldCnt >= Body.Count then OldCnt := Body.Count - 1;
1263- NewRes := Body.Count - OldCnt;
1264-
1257+ Body.Text := Content;
1258+ Body.Find( LastTxt, LastIdx );
1259+ OldCnt := LastIdx + 1;
1260+ NewRes := Body.Count - OldCnt;
12651261
1266- finally
1267- oldBody.Free;
1262+ if ThreadItem.Kokomade > 0 then begin
1263+ Body.Find( KokoTxt, KokoIdx );
1264+ ThreadItem.Kokomade := KokoIdx + 1;
1265+ end;
1266+ if ThreadItem.NewReceive > 0 then begin
1267+ Body.Find( NewTxt, NewIdx );
1268+ Inc( NewIdx );
1269+ if OldCnt < NewIdx then begin
1270+ OldCnt := NewIdx;
1271+ NewRes := Body.Count - NewIdx;
1272+ end;
12681273 end;
1269-
12701274 end else begin
12711275 Body.Text := Content;
12721276 //ThreadItem.Count := 0;
@@ -1299,10 +1303,8 @@ begin
12991303 ThreadItem.AllResCount := ThreadItem.Count;
13001304 ThreadItem.IsLogFile := True;
13011305 ThreadItem.RoundDate := Now;
1302- if not ThreadItem.UnRead then begin
1303- ThreadItem.UnRead := True;
1304- ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1;
1305- end;
1306+ ThreadItem.UnRead := True;
1307+ ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1;
13061308 // if ThreadItem.RoundNo = 6 then
13071309 // ThreadItem.RoundNo := 0;
13081310
--- a/KuroutSetting.dfm
+++ b/KuroutSetting.dfm
@@ -1,6 +1,6 @@
11 object KuroutOption: TKuroutOption
2- Left = 43
3- Top = 114
2+ Left = 260
3+ Top = 167
44 Width = 525
55 Height = 457
66 Caption = #35443#32048#35373#23450
@@ -140,182 +140,6 @@ object KuroutOption: TKuroutOption
140140 TabOrder = 3
141141 end
142142 end
143- object GroupBox1: TGroupBox
144- Left = 14
145- Top = 232
146- Width = 475
147- Height = 57
148- Caption = #12395#12385#12419#12435#35486#26696#20869#27231#33021
149- TabOrder = 2
150- Visible = False
151- object Label5: TLabel
152- Left = 8
153- Top = 16
154- Width = 234
155- Height = 12
156- Caption = #12395#12385#12419#12435#35486#12434#20351#12387#12390#12462#12467#12490#12499#12434#12469#12509#12540#12488#12375#12414#12377#12290
157- end
158- object GengoSupport: TCheckBox
159- Left = 8
160- Top = 32
161- Width = 201
162- Height = 17
163- Caption = #12395#12385#12419#12435#35486#26696#20869#27231#33021#12434#26377#21177#12395#12377#12427
164- TabOrder = 0
165- end
166- end
167- end
168- object ColumnTabSheet: TTabSheet
169- Caption = #35443#32048#35373#23450'2'
170- ImageIndex = 1
171- object CategoryColumnGroupBox: TGroupBox
172- Left = 8
173- Top = 16
174- Width = 481
175- Height = 145
176- Caption = #34920#31034#12459#12521#12512#35373#23450'('#12459#12486#12468#12522#12540')'
177- TabOrder = 0
178- object Label1: TLabel
179- Left = 80
180- Top = 16
181- Width = 60
182- Height = 12
183- Caption = #38750#34920#31034#38917#30446
184- end
185- object Label2: TLabel
186- Left = 312
187- Top = 16
188- Width = 48
189- Height = 12
190- Caption = #34920#31034#38917#30446
191- end
192- object CUnVisibledListBox: TListBox
193- Left = 32
194- Top = 33
195- Width = 161
196- Height = 65
197- ItemHeight = 12
198- TabOrder = 0
199- end
200- object CVisibledListBox: TListBox
201- Left = 264
202- Top = 33
203- Width = 161
204- Height = 65
205- ItemHeight = 12
206- TabOrder = 1
207- end
208- object CAddButton: TButton
209- Left = 200
210- Top = 38
211- Width = 57
212- Height = 25
213- Caption = '>>'
214- TabOrder = 2
215- OnClick = CAddButtonClick
216- end
217- object CDeleteButton: TButton
218- Left = 200
219- Top = 70
220- Width = 57
221- Height = 25
222- Caption = '<<'
223- TabOrder = 3
224- OnClick = CDeleteButtonClick
225- end
226- object CUpButton: TButton
227- Left = 264
228- Top = 104
229- Width = 75
230- Height = 25
231- Caption = #19978#12408
232- TabOrder = 4
233- OnClick = CUpButtonClick
234- end
235- object CDownButton: TButton
236- Left = 352
237- Top = 104
238- Width = 75
239- Height = 25
240- Caption = #19979#12504
241- TabOrder = 5
242- OnClick = CDownButtonClick
243- end
244- end
245- object BoardColumnGroupBox: TGroupBox
246- Left = 8
247- Top = 168
248- Width = 481
249- Height = 185
250- Caption = #34920#31034#12459#12521#12512#35373#23450'('#26495')'
251- TabOrder = 1
252- object Label3: TLabel
253- Left = 80
254- Top = 16
255- Width = 60
256- Height = 12
257- Caption = #38750#34920#31034#38917#30446
258- end
259- object Label4: TLabel
260- Left = 312
261- Top = 16
262- Width = 48
263- Height = 12
264- Caption = #34920#31034#38917#30446
265- end
266- object BUnVisibledListBox: TListBox
267- Left = 32
268- Top = 31
269- Width = 161
270- Height = 113
271- ItemHeight = 12
272- TabOrder = 0
273- end
274- object BVisibledListBox: TListBox
275- Left = 264
276- Top = 31
277- Width = 161
278- Height = 113
279- ItemHeight = 12
280- TabOrder = 1
281- end
282- object BAddButton: TButton
283- Left = 200
284- Top = 48
285- Width = 57
286- Height = 25
287- Caption = '>>'
288- TabOrder = 2
289- OnClick = BAddButtonClick
290- end
291- object BDeleteButton: TButton
292- Left = 200
293- Top = 80
294- Width = 57
295- Height = 25
296- Caption = '<<'
297- TabOrder = 3
298- OnClick = BDeleteButtonClick
299- end
300- object BUpButton: TButton
301- Left = 264
302- Top = 152
303- Width = 75
304- Height = 25
305- Caption = #19978#12408
306- TabOrder = 4
307- OnClick = BUpButtonClick
308- end
309- object BDownButton: TButton
310- Left = 352
311- Top = 152
312- Width = 75
313- Height = 25
314- Caption = #19979#12504
315- TabOrder = 5
316- OnClick = BDownButtonClick
317- end
318- end
319143 end
320144 end
321145 object OkBotton: TButton
--- a/KuroutSetting.pas
+++ b/KuroutSetting.pas
@@ -8,67 +8,35 @@ uses
88
99 type
1010 TKuroutOption = class(TForm)
11- PageControl1: TPageControl;
12- TabSheet1: TTabSheet;
13- GroupBox11: TGroupBox;
14- Label17: TLabel;
15- Label18: TLabel;
16- RecvBufferSize: TEdit;
17- ProxyProtocolCheckBox: TCheckBox;
18- ProtocolCheckBox: TCheckBox;
19- GroupBox13: TGroupBox;
20- Label24: TLabel;
21- Label25: TLabel;
22- PostTimeLabel: TLabel;
23- Label27: TLabel;
24- PostTimeCheckBox: TCheckBox;
25- PostTimeEdit: TEdit;
26- PutPostTimeRadioButton: TRadioButton;
27- BackPostTimeRadioButton: TRadioButton;
28- OkBotton: TButton;
29- CancelBotton: TButton;
30- ApplyButton: TButton;
31- ColumnTabSheet: TTabSheet;
32- CategoryColumnGroupBox: TGroupBox;
33- CUnVisibledListBox: TListBox;
34- CVisibledListBox: TListBox;
35- CAddButton: TButton;
36- CDeleteButton: TButton;
37- BoardColumnGroupBox: TGroupBox;
38- BUnVisibledListBox: TListBox;
39- BVisibledListBox: TListBox;
40- BAddButton: TButton;
41- BDeleteButton: TButton;
42- Label1: TLabel;
43- Label2: TLabel;
44- Label3: TLabel;
45- Label4: TLabel;
46- CUpButton: TButton;
47- CDownButton: TButton;
48- BUpButton: TButton;
49- BDownButton: TButton;
50- GroupBox1: TGroupBox;
51- GengoSupport: TCheckBox;
52- Label5: TLabel;
53- procedure OkBottonClick(Sender: TObject);
54- procedure FormCreate(Sender: TObject);
55- procedure CDeleteButtonClick(Sender: TObject);
56- procedure CAddButtonClick(Sender: TObject);
57- procedure BAddButtonClick(Sender: TObject);
58- procedure BDeleteButtonClick(Sender: TObject);
59- procedure CUpButtonClick(Sender: TObject);
60- procedure CDownButtonClick(Sender: TObject);
61- procedure BUpButtonClick(Sender: TObject);
62- procedure BDownButtonClick(Sender: TObject);
11+ PageControl1: TPageControl;
12+ TabSheet1: TTabSheet;
13+ GroupBox11: TGroupBox;
14+ Label17: TLabel;
15+ Label18: TLabel;
16+ RecvBufferSize: TEdit;
17+ ProxyProtocolCheckBox: TCheckBox;
18+ ProtocolCheckBox: TCheckBox;
19+ GroupBox13: TGroupBox;
20+ Label24: TLabel;
21+ Label25: TLabel;
22+ PostTimeLabel: TLabel;
23+ Label27: TLabel;
24+ PostTimeCheckBox: TCheckBox;
25+ PostTimeEdit: TEdit;
26+ PutPostTimeRadioButton: TRadioButton;
27+ BackPostTimeRadioButton: TRadioButton;
28+ OkBotton: TButton;
29+ CancelBotton: TButton;
30+ ApplyButton: TButton;
31+ procedure OkBottonClick(Sender: TObject);
32+ procedure FormCreate(Sender: TObject);
6333 private
64- { Private 宣言 }
34+ { Private 宣言 }
6535 procedure SetValue;
6636 procedure SaveSetting;
6737 procedure RecvBufferSizeExit(Sender: TObject);
6838 procedure PostTimeEditExit(Sender: TObject);
6939 procedure PostTimeCheckBoxClick(Sender: TObject);
70- procedure SetColumnData();
71- procedure PostColumnData();
7240 public
7341 { Public 宣言 }
7442 end;
@@ -78,9 +46,6 @@ var
7846
7947 implementation
8048
81-uses
82- Giko, Setting;
83-
8449 {$R *.dfm}
8550
8651 procedure TKuroutOption.SetValue;
@@ -99,10 +64,6 @@ begin
9964 PutPostTimeRadioButton.Checked := True
10065 else
10166 BackPostTimeRadioButton.Checked := True;
102-
103- SetColumnData();
104-
105- PageControl1.ActivePageIndex := GikoSys.Setting.KuroutSettingTabIndex;
10667 end;
10768
10869 procedure TKuroutOption.SaveSetting;
@@ -120,10 +81,6 @@ begin
12081 else
12182 GikoSys.Setting.TimeAdjustSec := 0;
12283 GikoSys.Setting.TimeAdjust := PutPostTimeRadioButton.Checked;
123-
124- GikoSys.Setting.GengoSupport := GengoSupport.Checked;
125-
126- GikoSys.Setting.KuroutSettingTabIndex := PageControl1.ActivePageIndex;
12784 end;
12885
12986 procedure TKuroutOption.RecvBufferSizeExit(Sender: TObject);
@@ -152,7 +109,6 @@ procedure TKuroutOption.OkBottonClick(Sender: TObject);
152109 begin
153110 RecvBufferSizeExit(Sender);
154111 PostTimeEditExit(Sender);
155- PostColumnData();
156112 SaveSetting;
157113 end;
158114
@@ -162,191 +118,5 @@ begin
162118 PostTimeCheckBoxClick(Sender);
163119
164120 end;
165-procedure TKuroutOption.SetColumnData();
166-var
167- i, j : Integer;
168- flag : Boolean;
169-begin
170-
171- //===== 板リスト =====
172- for i := 0 to GikoSys.Setting.CategoryColumnOrder.Count - 1 do begin
173- for j := 1 to Length( GikoCategoryColumnCaption ) - 1 do begin
174- if GikoSys.Setting.CategoryColumnOrder[ i ] = TGikoCategoryColumnID( j ) then begin
175- CVisibledListBox.AddItem(GikoCategoryColumnCaption[ j ], nil);
176- break;
177- end;
178- end;
179- end;
180-
181- for i := 1 to Length( GikoCategoryColumnCaption ) - 1 do begin
182- flag := false;
183- for j := 0 to GikoSys.Setting.CategoryColumnOrder.Count - 1 do begin
184- if GikoSys.Setting.CategoryColumnOrder[ j ] = TGikoCategoryColumnID( i ) then begin
185- flag := true;
186- break;
187- end;
188- end;
189- if not flag then
190- CUnVisibledListBox.AddItem(GikoCategoryColumnCaption[ i ], nil);
191- end;
192-
193- //===== スレリスト =====
194- for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
195- for j := 1 to Length( GikoBoardColumnCaption ) - 1 do begin
196- if GikoSys.Setting.BoardColumnOrder[ i ] = TGikoBoardColumnID( j ) then begin
197- BVisibledListBox.AddItem(GikoBoardColumnCaption[ j ], nil);
198- Break;
199- end;
200- end;
201- end;
202-
203- for i := 1 to Length( GikoBoardColumnCaption ) - 1 do begin
204- flag := false;
205- for j := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 0 do begin
206- if GikoSys.Setting.BoardColumnOrder[ j ] = TGikoBoardColumnID( i ) then begin
207- flag := true;
208- Break;
209- end;
210- end;
211- if not flag then
212- BUnVisibledListBox.AddItem(GikoBoardColumnCaption[ i ], nil);
213-
214- end;
215-end;
216-procedure TKuroutOption.CDeleteButtonClick(Sender: TObject);
217-var
218- i: Integer;
219-begin
220- for i := 0 to CVisibledListBox.Count - 1 do begin
221- if CVisibledListBox.Selected[i] then begin
222- CUnVisibledListBox.AddItem( CVisibledListBox.Items.Strings[ i ], nil);
223- CVisibledListBox.DeleteSelected;
224- break;
225- end;
226- end;
227-end;
228-
229-procedure TKuroutOption.CAddButtonClick(Sender: TObject);
230-var
231- i: Integer;
232-begin
233- for i := 0 to CUnVisibledListBox.Count - 1 do begin
234- if CUnVisibledListBox.Selected[i] then begin
235- CVisibledListBox.AddItem( CUnVisibledListBox.Items.Strings[ i ], nil);
236- CUnVisibledListBox.DeleteSelected;
237- break;
238- end;
239- end;
240-end;
241-
242-procedure TKuroutOption.BAddButtonClick(Sender: TObject);
243-var
244- i: Integer;
245-begin
246- for i := 0 to BUnVisibledListBox.Count - 1 do begin
247- if BUnVisibledListBox.Selected[i] then begin
248- BVisibledListBox.AddItem( BUnVisibledListBox.Items.Strings[ i ], nil);
249- BUnVisibledListBox.DeleteSelected;
250- break;
251- end;
252- end;
253-end;
254-
255-procedure TKuroutOption.BDeleteButtonClick(Sender: TObject);
256-var
257- i: Integer;
258-begin
259- for i := 0 to BVisibledListBox.Count - 1 do begin
260- if BVisibledListBox.Selected[i] then begin
261- BUnVisibledListBox.AddItem( BVisibledListBox.Items.Strings[ i ], nil);
262- BVisibledListBox.DeleteSelected;
263- break;
264- end;
265- end;
266-end;
267-
268-procedure TKuroutOption.CUpButtonClick(Sender: TObject);
269-var
270- i: Integer;
271-begin
272- for i := 1 to CVisibledListBox.Count - 1 do begin
273- if CVisibledListBox.Selected[i] then begin
274- CVisibledListBox.Items.Exchange(i, i -1);
275- break;
276- end;
277- end;
278-end;
279-
280-procedure TKuroutOption.CDownButtonClick(Sender: TObject);
281-var
282- i: Integer;
283-begin
284- for i := 0 to CVisibledListBox.Count - 2 do begin
285- if CVisibledListBox.Selected[i] then begin
286- CVisibledListBox.Items.Exchange(i, i + 1);
287- break;
288- end;
289- end;
290-end;
291-
292-procedure TKuroutOption.BUpButtonClick(Sender: TObject);
293-var
294- i: Integer;
295-begin
296- for i := 1 to BVisibledListBox.Count - 1 do begin
297- if BVisibledListBox.Selected[i] then begin
298- BVisibledListBox.Items.Exchange(i, i -1);
299- break;
300- end;
301- end;
302-end;
303-
304-procedure TKuroutOption.BDownButtonClick(Sender: TObject);
305-var
306- i: Integer;
307-begin
308- for i := 0 to BVisibledListBox.Count - 2 do begin
309- if BVisibledListBox.Selected[i] then begin
310- BVisibledListBox.Items.Exchange(i, i + 1);
311- break;
312- end;
313- end;
314-end;
315-
316-
317-procedure TKuroutOption.PostColumnData();
318-var
319- i, j : Integer;
320-begin
321- GikoForm.ActiveListColumnSave;
322-
323- //===== 板リスト =====
324- for i := GikoSys.Setting.CategoryColumnOrder.Count -1 downto 1 do
325- GikoSys.Setting.CategoryColumnOrder.Delete(i);
326-
327- for i := 0 to CVisibledListBox.Count - 1 do begin
328- for j := 1 to Length( GikoCategoryColumnCaption ) - 1 do begin
329- if CVisibledListBox.Items.Strings[ i ] = GikoCategoryColumnCaption[ j ] then begin
330- GikoSys.Setting.CategoryColumnOrder.Add( TGikoCategoryColumnID(j) );
331- break;
332- end;
333- end;
334- end;
335-
336- //===== スレリスト =====
337- for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do
338- GikoSys.Setting.BoardColumnOrder.Delete(i);
339-
340- for i := 0 to BVisibledListBox.Count - 1 do begin
341- for j := 1 to Length( GikoBoardColumnCaption ) - 1 do begin
342- if BVisibledListBox.Items.Strings[ i ] = GikoBoardColumnCaption[ j ] then begin
343- GikoSys.Setting.BoardColumnOrder.Add( TGikoBoardColumnID(j) );
344- Break;
345- end;
346- end;
347- end;
348- //スレ一覧の描画の更新
349- GikoForm.SetActiveList(GikoForm.ActiveList);
350-end;
351121
352122 end.
--- a/Option.dfm
+++ b/Option.dfm
@@ -1,6 +1,6 @@
11 object OptionDialog: TOptionDialog
2- Left = 188
3- Top = 128
2+ Left = 410
3+ Top = 236
44 BorderStyle = bsDialog
55 Caption = #12458#12503#12471#12519#12531
66 ClientHeight = 428
@@ -60,9 +60,9 @@ object OptionDialog: TOptionDialog
6060 Top = 4
6161 Width = 509
6262 Height = 389
63- ActivePage = TabSheet3
63+ ActivePage = ThreadSheet
6464 MultiLine = True
65- TabIndex = 3
65+ TabIndex = 4
6666 TabOrder = 3
6767 OnChange = OptionTabChange
6868 object ConnectSheet: TTabSheet
@@ -252,7 +252,7 @@ object OptionDialog: TOptionDialog
252252 Top = 43
253253 Width = 417
254254 Height = 20
255- ItemHeight = 12
255+ ItemHeight = 0
256256 TabOrder = 0
257257 Text = 'BoardURLComboBox'
258258 end
@@ -654,7 +654,7 @@ object OptionDialog: TOptionDialog
654654 Left = 12
655655 Top = 8
656656 Width = 477
657- Height = 41
657+ Height = 64
658658 Caption = #34920#31034#35373#23450
659659 TabOrder = 0
660660 object ThreadListIconCheckBox: TCheckBox
@@ -665,10 +665,18 @@ object OptionDialog: TOptionDialog
665665 Caption = #12473#12524#12483#12489#26356#26032#12450#12452#12467#12531#12434#34920#31034#12377#12427'(&I)'
666666 TabOrder = 0
667667 end
668+ object NonAcquiredCountCheckBox: TCheckBox
669+ Left = 12
670+ Top = 40
671+ Width = 217
672+ Height = 17
673+ Caption = #21462#24471#25968#12398#20195#12431#12426#12395#26410#21462#24471#25968#12434#34920#31034#12377#12427
674+ TabOrder = 1
675+ end
668676 end
669677 object GroupBox16: TGroupBox
670678 Left = 12
671- Top = 52
679+ Top = 76
672680 Width = 477
673681 Height = 64
674682 Caption = #12473#12524#20316#25104#26085#26178#34920#31034#35373#23450
@@ -692,7 +700,7 @@ object OptionDialog: TOptionDialog
692700 end
693701 object GroupBox5: TGroupBox
694702 Left = 12
695- Top = 121
703+ Top = 145
696704 Width = 477
697705 Height = 86
698706 Caption = #12502#12521#12454#12470#12398#26368#22823#21270
@@ -720,7 +728,7 @@ object OptionDialog: TOptionDialog
720728 end
721729 object GroupBox17: TGroupBox
722730 Left = 12
723- Top = 212
731+ Top = 236
724732 Width = 477
725733 Height = 63
726734 Caption = #12502#12521#12454#12470#12479#12502#38750#34920#31034#26178#35373#23450
@@ -758,9 +766,9 @@ object OptionDialog: TOptionDialog
758766 end
759767 object GroupBox18: TGroupBox
760768 Left = 12
761- Top = 278
769+ Top = 302
762770 Width = 477
763- Height = 43
771+ Height = 41
764772 Caption = 'dat'#33853#12385#12473#12524#12477#12540#12488#38918
765773 TabOrder = 4
766774 object DatOchiSortCombo: TComboBox
@@ -778,9 +786,7 @@ object OptionDialog: TOptionDialog
778786 #21462#24471#26085#26178'('#26119#38918')'
779787 #21462#24471#26085#26178'('#38477#38918')'
780788 #12473#12524#20316#25104#26085#26178'('#26119#38918')'
781- #12473#12524#20316#25104#26085#26178'('#38477#38918')'
782- #12473#12524#26368#32066#26356#26032#26085#26178#65288#26119#38918#65289
783- #12473#12524#26368#32066#26356#26032#26085#26178#65288#38477#38918#65289)
789+ #12473#12524#20316#25104#26085#26178'('#38477#38918')')
784790 end
785791 end
786792 end
--- a/Option.pas
+++ b/Option.pas
@@ -90,6 +90,7 @@ type
9090 TabSheet3: TTabSheet;
9191 GroupBox9: TGroupBox;
9292 ThreadListIconCheckBox: TCheckBox;
93+ NonAcquiredCountCheckBox: TCheckBox;
9394 GroupBox16: TGroupBox;
9495 CreationTimeLogsCheckBox: TCheckBox;
9596 FutureThreadCheckBox: TCheckBox;
@@ -765,32 +766,28 @@ begin
765766
766767 //スレッド一覧更新アイコン
767768 ThreadListIconCheckBox.Checked := GikoSys.Setting.ListIconVisible;
769+ NonAcquiredCountCheckBox.Checked := GikoSys.Setting.NonAcquiredCount;
768770 CreationTimeLogsCheckBox.Checked := GikoSys.Setting.CreationTimeLogs;
769771 FutureThreadCheckBox.Checked := GikoSys.Setting.FutureThread;
770772 SelectIntervalEdit.Text := IntToStr(GikoSys.Setting.SelectInterval);
771773
772774 //dat落ちスレソート順
773- case TGikoBoardColumnID( GikoSys.Setting.DatOchiSortIndex ) of
774- gbcTitle:
775+ case GikoSys.Setting.DatOchiSortIndex of
776+ 0:
775777 if GikoSys.Setting.DatOchiSortOrder then
776778 DatOchiSortCombo.ItemIndex := 1
777779 else
778780 DatOchiSortCombo.ItemIndex := 2;
779- gbcRoundDate://gbcLastModified:
781+ 6:
780782 if GikoSys.Setting.DatOchiSortOrder then
781783 DatOchiSortCombo.ItemIndex := 3
782784 else
783785 DatOchiSortCombo.ItemIndex := 4;
784- gbcCreated:
786+ 7:
785787 if GikoSys.Setting.DatOchiSortOrder then
786788 DatOchiSortCombo.ItemIndex := 5
787789 else
788790 DatOchiSortCombo.ItemIndex := 6;
789- gbcLastModified:
790- if GikoSys.Setting.DatOchiSortOrder then
791- DatOchiSortCombo.ItemIndex := 7
792- else
793- DatOchiSortCombo.ItemIndex := 8;
794791 else
795792 DatOchiSortCombo.ItemIndex := 0;
796793 end;
@@ -805,6 +802,7 @@ begin
805802
806803 //TabAutoLoad
807804 TabLoadSave.Checked := Gikosys.Setting.TabAutoLoadSave;
805+
808806 end;
809807
810808 procedure TOptionDialog.SaveSetting;
@@ -997,6 +995,11 @@ begin
997995 //スレッド一覧更新アイコン
998996 GikoSys.Setting.ListIconVisible := ThreadListIconCheckBox.Checked;
999997
998+ //取得数、未取得数
999+ if (GikoSys.Setting.NonAcquiredCount <> NonAcquiredCountCheckBox.Checked) and (GikoForm.ActiveList Is TBoard) then
1000+ FRepaintList := true;
1001+ GikoSys.Setting.NonAcquiredCount := NonAcquiredCountCheckBox.Checked;
1002+
10001003 GikoSys.Setting.CreationTimeLogs := CreationTimeLogsCheckBox.Checked;
10011004 GikoSys.Setting.FutureThread := FutureThreadCheckBox.Checked;
10021005 if StrToIntDef(SelectIntervalEdit.Text, 110) > 55 then
@@ -1009,36 +1012,28 @@ begin
10091012 0: GikoSys.Setting.DatOchiSortIndex := -1; //並び替えしない
10101013 1: begin //スレ番号(昇順)
10111014 GikoSys.Setting.DatOchiSortOrder := true;
1012- GikoSys.Setting.DatOchiSortIndex := Ord( gbcTitle );
1015+ GikoSys.Setting.DatOchiSortIndex := 0;
10131016 end;
10141017 2: begin //スレ番号(降順)
10151018 GikoSys.Setting.DatOchiSortOrder := false;
1016- GikoSys.Setting.DatOchiSortIndex := Ord( gbcTitle );
1019+ GikoSys.Setting.DatOchiSortIndex := 0;
10171020 end;
10181021 3: begin //取得日時(昇順)
10191022 GikoSys.Setting.DatOchiSortOrder := true;
1020- GikoSys.Setting.DatOchiSortIndex := Ord( gbcRoundDate );{gbcLastModified}
1023+ GikoSys.Setting.DatOchiSortIndex := 6;
10211024 end;
10221025 4: begin //取得日時(降順)
10231026 GikoSys.Setting.DatOchiSortOrder := false;
1024- GikoSys.Setting.DatOchiSortIndex := Ord( gbcRoundDate );{gbcLastModified}
1027+ GikoSys.Setting.DatOchiSortIndex := 6;
10251028 end;
10261029 5: begin //スレ作成日時(昇順)
10271030 GikoSys.Setting.DatOchiSortOrder := true;
1028- GikoSys.Setting.DatOchiSortIndex := Ord( gbcCreated );
1031+ GikoSys.Setting.DatOchiSortIndex := 7;
10291032 end;
10301033 6: begin //スレ作成日時(降順)
10311034 GikoSys.Setting.DatOchiSortOrder := false;
1032- GikoSys.Setting.DatOchiSortIndex := Ord( gbcCreated );
1035+ GikoSys.Setting.DatOchiSortIndex := 7;
10331036 end;
1034- 7: begin //スレ最終更新日時(昇順)
1035- GikoSys.Setting.DatOchiSortOrder := true;
1036- GikoSys.Setting.DatOchiSortIndex := Ord( gbcLastModified );{gbcLastModified}
1037- end;
1038- 8: begin //スレ最終更新日時(降順)
1039- GikoSys.Setting.DatOchiSortOrder := false;
1040- GikoSys.Setting.DatOchiSortIndex := Ord( gbcLastModified );{gbcLastModified}
1041- end;
10421037 end;
10431038
10441039 GikoSys.Setting.WriteSystemSettingFile;
--- a/Setting.pas
+++ b/Setting.pas
@@ -55,62 +55,6 @@ type
5555 /// スレッド一覧表示範囲
5656 TGikoThreadRange = (gtrAll, gtrSelect, gtrLog, gtrNew);
5757
58- /// カテゴリリストのカラム ID
59- type TGikoBBSColumnID = (gbbscTitle);
60- /// カテゴリリストのカラム名
61- const GikoBBSColumnCaption : array[0..0] of string =
62- ( 'カテゴリ名' );
63- /// カテゴリリストカラム配列
64- type TGikoBBSColumnList = class( TList )
65- private
66- function GetItem( index : integer ) : TGikoBBSColumnID;
67- procedure SetItem( index : integer; value : TGikoBBSColumnID);
68- public
69- constructor Create;
70- destructor Destroy; override;
71- function Add( value : TGikoBBSColumnID ) : Integer;
72- property Items[index : integer]: TGikoBBSColumnID read GetItem write SetItem; default;
73- end;
74- /// 板リストのカラム ID
75- type TGikoCategoryColumnID = (gccTitle, gccRoundName, gccLastModified);
76- /// 板リストのカラム名
77- const GikoCategoryColumnCaption : array[0..2] of string =
78- ( '板名', '巡回予約', '取得日時' );
79- /// 板リストカラム配列
80- type TGikoCategoryColumnList = class( TList )
81- private
82- function GetItem( index : integer ) : TGikoCategoryColumnID;
83- procedure SetItem( index : integer; value : TGikoCategoryColumnID);
84- public
85- constructor Create;
86- destructor Destroy; override;
87- function Add( value : TGikoCategoryColumnID ) : Integer;
88- property Items[index : integer]: TGikoCategoryColumnID read GetItem write SetItem; default;
89- end;
90- /// スレリストのカラム ID
91- type TGikoBoardColumnID = (gbcTitle, gbcAllCount, gbcLocalCount, gbcNonAcqCount,
92- gbcNewCount, gbcUnReadCount, gbcRoundName, gbcRoundDate, gbcCreated, gbcLastModified );{gbcLastModified,}
93- /// スレリストのカラム名
94- const GikoBoardColumnCaption : array[0..9] of string =
95- ( 'スレッド名', 'カウント', '取得', '未取得', '新着',
96- '未読', '巡回予約', '取得日時', 'スレ作成日時', '最終更新日時' );
97- const GikoBoardColumnAlignment : array[0..9] of TAlignment = (
98- taLeftJustify, taRightJustify, taRightJustify, taRightJustify,
99- taRightJustify, taRightJustify, taLeftJustify, taLeftJustify,
100- taLeftJustify, taLeftJustify);
101- /// スレリストカラム配列
102- type TGikoBoardColumnList = class( TList )
103- private
104- function GetItem( index : integer ) : TGikoBoardColumnID;
105- procedure SetItem( index : integer; value : TGikoBoardColumnID);
106- public
107- constructor Create;
108- destructor Destroy; override;
109- function Add( value : TGikoBoardColumnID ) : Integer;
110- property Items[index : integer]: TGikoBoardColumnID read GetItem write SetItem; default;
111- end;
112-
113-type
11458 //CoolBar設定レコード
11559 TCoolSet = record
11660 FCoolID: Integer;
@@ -271,15 +215,8 @@ type
271215
272216 //リストカラムヘッダーサイズ
273217 FBBSColumnWidth: array[0..0] of Integer;
274- FCategoryColumnWidth: array[0..2] of Integer;
275- FBoardColumnWidth: array[0..9] of Integer;
276-
277- /// カテゴリリストカラム順序
278- FBBSColumnOrder : TGikoBBSColumnList;
279- /// 板リストカラム順序
280- FCategoryColumnOrder : TGikoCategoryColumnList;
281- /// スレリストカラム順序
282- FBoardColumnOrder : TGikoBoardColumnList;
218+ FCategoryColumnWidth: array[0..3] of Integer;
219+ FBoardColumnWidth: array[0..7] of Integer;
283220
284221 //ソート順
285222 FBBSSortIndex: Integer;
@@ -346,6 +283,8 @@ type
346283
347284 //スレッド一覧更新アイコン表示
348285 FListIconVisible: Boolean;
286+ //取得数ではなく未取得を表示する
287+ FNonAcquiredCount: Boolean;
349288
350289 //スレッド一覧でLogのあるスレッドのみスレ作成日を表示するか
351290 FCreationTimeLogs: Boolean;
@@ -390,19 +329,12 @@ type
390329
391330 //Tab自動保存
392331 FTabAutoLoadSave : Boolean;
393-
394- //にちゃん語案内サポート機能
395- F2chSupport : Boolean;
396-
397332 // エディタ
398333 FSpaceToNBSP : Boolean; ///< 半角スペース、Tab を &nbsp; に置換
399334 FAmpToCharRef : Boolean; ///< '&' を &amp; に置換
400335
401336 //ブラウザタブ非表示の時のスレ一覧でのカーソルキー移動の無反応時間
402337 FSelectInterval : Integer;
403-
404- //KuroutSettingTab 詳細設定タブのActiveTab
405- FKuroutSettingTabIndex: Integer;
406338
407339 function GetMainCoolSet(Index: Integer): TCoolSet;
408340 function GetBoardCoolSet(Index: Integer): TCoolSet;
@@ -594,10 +526,6 @@ type
594526 property CategoryColumnWidth[index: Integer]: Integer read GetCategoryColumnWidth write SetCategoryColumnWidth;
595527 property BoardColumnWidth[index: Integer]: Integer read GetBoardColumnWidth write SetBoardColumnWidth;
596528
597- property BBSColumnOrder : TGikoBBSColumnList read FBBSColumnOrder write FBBSColumnOrder;
598- property CategoryColumnOrder : TGikoCategoryColumnList read FCategoryColumnOrder write FCategoryColumnOrder;
599- property BoardColumnOrder : TGikoBoardColumnList read FBoardColumnOrder write FBoardColumnOrder;
600-
601529 property SoundName[index: Integer]: string read GetSoundName;
602530 property SoundViewName[index: Integer]: string read GetSoundViewName;
603531 property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName;
@@ -648,6 +576,7 @@ type
648576 property BrowserAutoMaximize: TGikoBrowserAutoMaximize read FBrowserAutoMaximize write FBrowserAutoMaximize;
649577
650578 property ListIconVisible: Boolean read FListIconVisible write FListIconVisible;
579+ property NonAcquiredCount: Boolean read FNonAcquiredCount write FNonAcquiredCount;
651580 property CreationTimeLogs: Boolean read FCreationTimeLogs write FCreationTimeLogs;
652581 property FutureThread: Boolean read FFutureThread write FFutureThread;
653582
@@ -685,10 +614,8 @@ type
685614 property AmpToCharRef : Boolean read FAmpToCharRef write FAmpToCharRef;
686615
687616 property SelectInterval : Integer read FSelectInterval write FSelectInterval;
688- //Tab保存
689- property TabAutoLoadSave: Boolean read FTabAutoLoadSave write FTabAutoLoadSave;
690- property GengoSupport : Boolean read F2chSupport write F2chSupport;
691- property KuroutSettingTabIndex: Integer read FKuroutSettingTabIndex write FKuroutSettingTabIndex;
617+ //Tab保存
618+ property TabAutoLoadSave: Boolean read FTabAutoLoadSave write FTabAutoLoadSave;
692619 end;
693620
694621
@@ -727,81 +654,6 @@ var
727654 (Name: 'ResEnd'; ViewName: 'レス送信完了'; FileName: ''),
728655 (Name: 'Error'; ViewName: 'エラー'; FileName: ''));
729656
730-constructor TGikoBBSColumnList.Create;
731-begin
732- inherited;
733-end;
734-
735-destructor TGikoBBSColumnList.Destroy;
736-begin
737- inherited;
738-end;
739-
740-function TGikoBBSColumnList.GetItem( index : integer ) : TGikoBBSColumnID;
741-begin
742- Result := TGikoBBSColumnID( inherited Items[ index ] );
743-end;
744-
745-procedure TGikoBBSColumnList.SetItem( index : integer; value : TGikoBBSColumnID);
746-begin
747- inherited Items[ index ] := Pointer( value );
748-end;
749-
750-function TGikoBBSColumnList.Add( value : TGikoBBSColumnID ) : Integer;
751-begin
752- Result := inherited Add( Pointer( value ) );
753-end;
754-
755-constructor TGikoCategoryColumnList.Create;
756-begin
757- inherited;
758-end;
759-
760-destructor TGikoCategoryColumnList.Destroy;
761-begin
762- inherited;
763-end;
764-
765-function TGikoCategoryColumnList.GetItem( index : integer ) : TGikoCategoryColumnID;
766-begin
767- Result := TGikoCategoryColumnID( inherited Items[ index ] );
768-end;
769-
770-procedure TGikoCategoryColumnList.SetItem( index : integer; value : TGikoCategoryColumnID);
771-begin
772- inherited Items[ index ] := Pointer( value );
773-end;
774-
775-function TGikoCategoryColumnList.Add( value : TGikoCategoryColumnID ) : Integer;
776-begin
777- Result := inherited Add( Pointer( value ) );
778-end;
779-
780-constructor TGikoBoardColumnList.Create;
781-begin
782- inherited;
783-end;
784-
785-destructor TGikoBoardColumnList.Destroy;
786-begin
787- inherited;
788-end;
789-
790-function TGikoBoardColumnList.GetItem( index : integer ) : TGikoBoardColumnID;
791-begin
792- Result := TGikoBoardColumnID( inherited Items[ index ] );
793-end;
794-
795-procedure TGikoBoardColumnList.SetItem( index : integer; value : TGikoBoardColumnID);
796-begin
797- inherited Items[ index ] := Pointer( value );
798-end;
799-
800-function TGikoBoardColumnList.Add( value : TGikoBoardColumnID ) : Integer;
801-begin
802- Result := inherited Add( Pointer( value ) );
803-end;
804-
805657 //コンストラクタ
806658 constructor TSetting.Create();
807659 begin
@@ -809,9 +661,6 @@ begin
809661 FMailList := TStringList.Create;
810662 FSelectTextList := TStringList.Create;
811663 FBoardURLs := TStringList.Create;
812- FBBSColumnOrder := TGikoBBSColumnList.Create;
813- FCategoryColumnOrder := TGikoCategoryColumnList.Create;
814- FBoardColumnOrder := TGikoBoardColumnList.Create;
815664 FNameList.Duplicates := dupIgnore;
816665 FMailList.Duplicates := dupIgnore;
817666 FBoardURLs.Duplicates := dupIgnore;
@@ -824,9 +673,6 @@ end;
824673 destructor TSetting.Destroy();
825674 begin
826675 inherited;
827- FBoardColumnOrder.Free;
828- FCategoryColumnOrder.Free;
829- FBBSColumnOrder.Free;
830676 FSelectTextList.Free;
831677 FBoardURLs.Free;
832678 FMailList.Free;
@@ -849,17 +695,16 @@ end;
849695 procedure TSetting.ReadSettingFile();
850696 const
851697 DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140);
852- DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130);
853- DEFAULT_BOARD_WIDTH: array[0..9] of Integer = (350, 60, 60, 60, 60, 60, 80, 130, 130, 130);
698+ DEFAULT_CATEGORY_WIDTH: array[0..3] of Integer = (150, 80, 130, 130);
699+ DEFAULT_BOARD_WIDTH: array[0..7] of Integer = (350, 60, 60, 60, 60, 80, 130, 130);
854700 MAX_WIDTH: Integer = 2000;
855701 var
856702 ini: TMemIniFile;
857703 i: Integer;
858- id, code : Integer;
859704 wkList: TStringList;
860705 wkStr: string;
861706 Exists: Boolean;
862- s: string;
707+ s: string;
863708 // id: Integer;
864709 CoolSet: TCoolSet;
865710 begin
@@ -1006,7 +851,7 @@ begin
1006851 wkList.Free;
1007852 end;
1008853
1009- // リストカラム幅
854+ //リストカラム
1010855 wkList := TStringList.Create;
1011856 try
1012857 ini.ReadSection('BBSColumnWidth', wkList);
@@ -1040,51 +885,6 @@ begin
1040885 wkList.Free;
1041886 end;
1042887
1043- // カテゴリリストカラム順序
1044- wkList := TStringList.Create;
1045- try
1046- ini.ReadSection( 'BBSColumnOrder', wkList );
1047- for i := 0 to wkList.Count - 1 do begin
1048- wkStr := ini.ReadString( 'BBSColumnOrder', 'ID' + IntToStr( i ), '' );
1049- Val( wkStr, id, code );
1050- if code = 0 then
1051- FBBSColumnOrder.Add( TGikoBBSColumnID( id ) );
1052- end;
1053- if FBBSColumnOrder.Count = 0 then begin
1054- // 設定が無いので作成
1055- for i := 0 to Integer( High( TGikoBBSColumnID ) ) do
1056- FBBSColumnOrder.Add( TGikoBBSColumnID( i ) );
1057- end;
1058-
1059- ini.ReadSection( 'CategoryColumnOrder', wkList );
1060- for i := 0 to wkList.Count - 1 do begin
1061- wkStr := ini.ReadString( 'CategoryColumnOrder', 'ID' + IntToStr( i ), '' );
1062- Val( wkStr, id, code );
1063- if code = 0 then
1064- FCategoryColumnOrder.Add( TGikoCategoryColumnID( id ) );
1065- end;
1066- if FCategoryColumnOrder.Count = 0 then begin
1067- // 設定が無いので作成
1068- for i := 0 to Integer( High( TGikoCategoryColumnID ) ) do
1069- FCategoryColumnOrder.Add( TGikoCategoryColumnID( i ) );
1070- end;
1071-
1072- ini.ReadSection( 'BoardColumnOrder', wkList );
1073- for i := 0 to wkList.Count - 1 do begin
1074- wkStr := ini.ReadString( 'BoardColumnOrder', 'ID' + IntToStr( i ), '' );
1075- Val( wkStr, id, code );
1076- if code = 0 then
1077- FBoardColumnOrder.Add( TGikoBoardColumnID( id ) );
1078- end;
1079- if FBoardColumnOrder.Count = 0 then begin
1080- // 設定が無いので作成
1081- for i := 0 to Integer( High( TGikoBoardColumnID ) ) do
1082- FBoardColumnOrder.Add( TGikoBoardColumnID( i ) );
1083- end;
1084- finally
1085- wkList.Free;
1086- end;
1087-
1088888 //リスト番号
1089889 FListViewNo := ini.ReadBool('Function', 'ListViewNo', True);
1090890 //CSS
@@ -1098,7 +898,7 @@ begin
1098898 if ini.ReadBool('Thread', 'OnlyAHundredRes',false) then
1099899 FResRange := 100 // 古い設定の互換用
1100900 else
1101- FResRange := ini.ReadInteger( 'Thread', 'ResRange', Ord( grrAll ) );
901+ FResRange := ini.ReadInteger( 'Thread', 'ResRange', 100 );
1102902 FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False );
1103903 // スレッド一覧表示範囲
1104904 FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) );
@@ -1158,6 +958,7 @@ begin
1158958
1159959 //スレッド一覧更新アイコン
1160960 FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True);
961+ FNonAcquiredCount := ini.ReadBool('ThreadList', 'NonAcquiredCount', False);
1161962 FCreationTimeLogs := ini.ReadBool('ThreadList', 'CreationTimeLogs', True);
1162963 FFutureThread := ini.ReadBool('ThreadList', 'FutureThread', True);
1163964 FSelectInterval := ini.ReadInteger('ThreadList', 'SelectInterval', 110);
@@ -1223,13 +1024,11 @@ begin
12231024 FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false);
12241025
12251026 // エディタ
1226- FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', False );
1027+ FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', True );
12271028 FAmpToCharRef := ini.ReadBool( 'Editor', 'AmpToCharRef', False );
12281029
1229- //Tab自動保存、読み込み
1230- FTabAutoLoadSave := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False);
1231-
1232- FKuroutSettingTabIndex := ini.ReadInteger('OptionDialog', 'KuroutTabIndex' , 0);
1030+ //Tab自動保存、読み込み
1031+ FTabAutoLoadSave := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False);
12331032
12341033
12351034 finally
@@ -1330,7 +1129,6 @@ var
13301129 i: Integer;
13311130 ini: TMemIniFile;
13321131 CoolSet: TCoolSet;
1333- wkList : TStringList;
13341132 begin
13351133 ini := TMemIniFile.Create(GetFileName());
13361134 try
@@ -1452,11 +1250,11 @@ begin
14521250 ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible);
14531251 ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize));
14541252 ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait);
1455-
1456- ini.WriteInteger('Window', 'BrowserAutoMaximize', Ord( BrowserAutoMaximize ) );
1253+ ini.WriteInteger('Browser', 'AutoMaximize', Ord( FBrowserAutoMaximize ) );
14571254
14581255 //スレッド一覧更新アイコン
14591256 ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible);
1257+ ini.WriteBool('ThreadList', 'NonAcquiredCount', FNonAcquiredCount);
14601258 ini.WriteBool('ThreadList', 'CreationTimeLogs',FCreationTimeLogs);
14611259 ini.WriteBool('ThreadList', 'FutureThread', FFutureThread);
14621260 ini.WriteInteger('ThreadList', 'SelectInterval', FSelectInterval);
@@ -1475,7 +1273,7 @@ begin
14751273 ini.WriteInteger('PostTime', 'TimeAdjustSec', FTimeAdjustSec);
14761274 ini.WriteBool('PostTime', 'TimeAdjust', FTimeAdjust);
14771275
1478- // リストカラム幅
1276+ //リストカラム
14791277 for i := 0 to Length(FBBSColumnWidth) - 1 do begin
14801278 ini.WriteInteger('BBSColumnWidth', 'ID' + IntToStr(i), FBBSColumnWidth[i]);
14811279 end;
@@ -1486,32 +1284,6 @@ begin
14861284 ini.WriteInteger('BoardColumnWidth', 'ID' + IntToStr(i), FBoardColumnWidth[i]);
14871285 end;
14881286
1489- wkList := TStringList.Create;
1490- try
1491- // カテゴリリスト順序
1492- ini.ReadSection( 'BBSColumnOrder', wkList );
1493- for i := wkList.Count - 1 downto 0 do
1494- ini.DeleteKey( 'BBSColumnOrder', wkList[ i ] );
1495- for i := 0 to FBBSColumnOrder.Count - 1 do
1496- ini.WriteInteger( 'BBSColumnOrder', 'ID' + IntToStr( i ), Ord( FBBSColumnOrder[ i ] ) );
1497-
1498- // 板リスト順序
1499- ini.ReadSection( 'CategoryColumnOrder', wkList );
1500- for i := wkList.Count - 1 downto 0 do
1501- ini.DeleteKey( 'CategoryColumnOrder', wkList[ i ] );
1502- for i := 0 to FCategoryColumnOrder.Count - 1 do
1503- ini.WriteInteger( 'CategoryColumnOrder', 'ID' + IntToStr( i ), Ord( FCategoryColumnOrder[ i ] ) );
1504-
1505- // スレリスト順序
1506- ini.ReadSection( 'BoardColumnOrder', wkList );
1507- for i := wkList.Count - 1 downto 0 do
1508- ini.DeleteKey( 'BoardColumnOrder', wkList[ i ] );
1509- for i := 0 to FBoardColumnOrder.Count - 1 do
1510- ini.WriteInteger( 'BoardColumnOrder', 'ID' + IntToStr( i ), Ord( FBoardColumnOrder[ i ] ) );
1511- finally
1512- wkList.Free;
1513- end;
1514-
15151287 //サウンド
15161288 for i := 0 to GetSoundCount - 1 do begin
15171289 if not FileExists(SoundFileName[i]) then
@@ -1555,15 +1327,9 @@ begin
15551327 ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP );
15561328 ini.WriteBool( 'Editor', 'AmpToCharRef', FAmpToCharRef );
15571329
1558- //タブ自動保存
1559- ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave);
1560- //詳細設定
1561- ini.WriteInteger('OptionDialog', 'KuroutTabIndex', FKuroutSettingTabIndex);
1562-
1563- //にちゃん語案内機能
1564- ini.WriteBool('2chSupport', 'Support', F2chSupport);
1330+ ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave);
15651331
1566- ini.UpdateFile;
1332+ ini.UpdateFile;
15671333 finally
15681334 ini.Free;
15691335 end;
--- a/Sort.pas
+++ b/Sort.pas
@@ -3,8 +3,7 @@ unit Sort;
33 interface
44 uses
55 Windows, Messages, SysUtils, Classes, Controls, Forms,
6- BoardGroup,DateUtils,
7- Setting;
6+ BoardGroup,DateUtils;
87
98 function CategorySortProc(Item1, Item2: Pointer): integer;
109 function BoardSortProc(List: TStringList; Item1, Item2: Integer): integer;
@@ -17,6 +16,7 @@ var
1716 SortOrder: Boolean;
1817 SortIndex: Integer;
1918 SortNoFlag: Boolean;
19+ SortNonAcquiredCountFlag: Boolean;
2020
2121 implementation
2222
@@ -28,15 +28,10 @@ begin
2828 CategoryItem1 := TCategory(Item1);
2929 CategoryItem2 := TCategory(Item2);
3030
31- case TGikoBBSColumnID( SortIndex ) of
32- gbbscTitle:
33- if SortNoFlag then
34- Result := CompareInt(CategoryItem1.No, CategoryItem2.No)
35- else
36- Result := AnsiCompareText(CategoryItem1.Title, CategoryItem2.Title);
37- else
31+ if SortNoFlag then
3832 Result := CompareInt(CategoryItem1.No, CategoryItem2.No)
39- end;
33+ else
34+ Result := AnsiCompareText(CategoryItem1.Title, CategoryItem2.Title);
4035
4136 if not SortOrder then
4237 Result := Result * -1;
@@ -49,21 +44,15 @@ var
4944 begin
5045 BoardItem1 := TBoard(List.Objects[Item1]);
5146 BoardItem2 := TBoard(List.Objects[Item2]);
52- case TGikoCategoryColumnID( SortIndex ) of
53- gccTitle:
47+ if SortIndex = 0 then
5448 if SortNoFlag then
5549 Result := CompareInt(BoardItem1.No, BoardItem2.No)
5650 else
57- Result := AnsiCompareText(BoardItem1.Title, BoardItem2.Title);
58-
59- gccRoundName:
60- Result := CompareInt(BoardItem1.Count, BoardItem2.Count);
61-
62- gccLastModified:
51+ Result := AnsiCompareText(BoardItem1.Title, BoardItem2.Title)
52+ else if SortIndex = 1 then
53+ Result := CompareInt(BoardItem1.Count, BoardItem2.Count)
54+ else
6355 Result := CompareDate(BoardItem1.RoundDate, BoardItem2.RoundDate);
64- else
65- Result := CompareInt(BoardItem1.No, BoardItem2.No)
66- end;
6756
6857 if not SortOrder then
6958 Result := Result * -1;
@@ -76,35 +65,34 @@ var
7665 begin
7766 ThreadItem1 := TThreadItem(List.Objects[ Item1 ]);
7867 ThreadItem2 := TThreadItem(List.Objects[ Item2 ]);
79- case TGikoBoardColumnID( SortIndex ) of
80- gbcTitle:
68+ case SortIndex of
69+ 0:
8170 begin
8271 if SortNoFlag then
8372 Result := CompareInt(ThreadItem1.No, ThreadItem2.No)
8473 else
8574 Result := AnsiCompareText(ThreadItem1.Title, ThreadItem2.Title)
8675 end;
87-
88- gbcAllCount: Result := CompareInt(ThreadItem1.AllResCount, ThreadItem2.AllResCount);
89- gbcLocalCount: Result := CompareInt(ThreadItem1.Count, ThreadItem2.Count);
90- gbcNonAcqCount:
76+ 1: Result := CompareInt(ThreadItem1.AllResCount, ThreadItem2.AllResCount);
77+ 2:
9178 begin
92- if ThreadItem1.IsLogFile and ThreadItem2.IsLogFile then
93- Result := CompareInt(ThreadItem1.AllResCount - ThreadItem1.Count, ThreadItem2.AllResCount - ThreadItem2.Count)
94- else if ThreadItem1.IsLogFile then
95- Result := 1
96- else if ThreadItem2.IsLogFile then
97- Result := -1
79+ if SortNonAcquiredCountFlag then
80+ if ThreadItem1.IsLogFile and ThreadItem2.IsLogFile then
81+ Result := CompareInt(ThreadItem1.AllResCount - ThreadItem1.Count, ThreadItem2.AllResCount - ThreadItem2.Count)
82+ else if ThreadItem1.IsLogFile then
83+ Result := 1
84+ else if ThreadItem2.IsLogFile then
85+ Result := -1
86+ else
87+ Result := 0
9888 else
99- Result := 0;
89+ Result := CompareInt(ThreadItem1.Count, ThreadItem2.Count);
10090 end;
101-
102- gbcNewCount: Result := CompareInt(ThreadItem1.NewResCount, ThreadItem2.NewResCount);
103- gbcUnReadCount: Result := 0;
104- gbcRoundName: Result := AnsiCompareText(ThreadItem1.RoundName, ThreadItem2.RoundName);
105- gbcRoundDate: Result := CompareDateTime(ThreadItem1.RoundDate, ThreadItem2.RoundDate); {gbcLastModified:}
106- gbcCreated: Result := CompareDateTime(ThreadItem1.CreateDate, ThreadItem2.CreateDate);
107- gbcLastModified: Result := CompareDateTime(ThreadItem1.LastModified, ThreadItem2.LastModified); {gbcLastModified:}
91+ 3: Result := CompareInt(ThreadItem1.NewResCount, ThreadItem2.NewResCount);
92+ 4: Result := 0;
93+ 5: Result := AnsiCompareText(ThreadItem1.RoundName, ThreadItem2.RoundName);
94+ 6: Result := CompareDateTime(ThreadItem1.RoundDate, ThreadItem2.RoundDate);
95+ 7: Result := CompareDateTime(ThreadItem1.CreateDate, ThreadItem2.CreateDate);
10896 else
10997 Result := 0;
11098 end;
--- a/YofUtils.pas
+++ b/YofUtils.pas
@@ -9,8 +9,7 @@ interface
99 uses
1010 //==================================================
1111
12- Classes, SysUtils,
13- Windows;
12+ Classes, SysUtils;
1413
1514 procedure ExtractHttpFields(
1615 const chrSep : TSysCharSet;
@@ -40,61 +39,11 @@ function MatchesMask(
4039 const filename, mask : string
4140 ) : boolean;
4241
43-/// メタキャラクタを正規表現扱いにならないように置換
42+// メタキャラクタを正規表現扱いにならないように置換
4443 function RegExpEncode(
4544 const text : string
4645 ) : string;
4746
48-{*!
49-\brief 表示メッセージの整形
50-\param msg 表示するメッセージ
51-\param elements 置換単語
52-
53-msg の中の置換される単語は '^番号' で表され、
54-elements は改行によって単語分けされます。<br>
55-
56-<pre><code>
57-elements := IntToStr( 10 ) + #10 + 'hoge';
58-m := MessageStyle(
59- '^0 個の“^1”を置換しました。',
60- elements );
61-</code></pre>
62-
63-で出力される m は「10 個の“hoge”を置換しました。」となります。
64-*}
65-function MessageStyle(
66- const msg : string;
67- const elements : string
68-) : string; overload;
69-
70-function MessageStyle(
71- const msg : string;
72- const elements : TStringList
73-) : string; overload;
74-
75-type
76- /// Mode 値がおかしい
77- EMappedFileModeError = class( Exception );
78- /// マッピングに失敗
79- EMappedFileMappingError = class( Exception );
80-
81- /// メモリマップド・ファイル クラス
82- TMappedFile = class( TObject )
83- private
84- FFileHandle : THandle;
85- FMappingHandle : THandle;
86- FSize : Longword;
87- FViewAddress : Pointer;
88- public
89- constructor Create( const filePath : string; mode : Longword = fmOpenRead );
90- destructor Destroy; override;
91-
92- /// サイズの取得
93- property Size : Longword read FSize;
94- /// アドレスの取得
95- property Memory : Pointer read FViewAddress;
96- end;
97-
9847 //==================================================
9948 const
10049 //==================================================
@@ -104,8 +53,6 @@ const
10453 implementation
10554 //==================================================
10655
107-uses MojuUtils;
108-
10956 // とりあえずの代用品なので chrWhite を考慮していないことに注意!!!
11057 procedure ExtractHttpFields(
11158 const chrSep : TSysCharSet;
@@ -420,97 +367,4 @@ begin
420367
421368 end;
422369
423-function MessageStyle(
424- const msg : string;
425- const elements : string
426-) : string;
427-var
428- list : TStringList;
429-begin
430-
431- list := TStringList.Create;
432- try
433- list.Text := elements;
434- Result := MessageStyle( msg, list );
435- finally
436- list.Free;
437- end;
438-
439-end;
440-
441-function MessageStyle(
442- const msg : string;
443- const elements : TStringList
444-) : string;
445-var
446- i : Integer;
447-begin
448-
449- Result := msg;
450- for i := elements.Count - 1 downto 0 do
451- Result := CustomStringReplace( Result, '^' + IntToStr( i ), elements[ i ], false );
452-
453-end;
454-
455-{ TMappedFile }
456-
457-{*!
458-\brief メモリマップドファイルの作成
459-\param filePath 開くファイルのパス
460-\param mode fmOpenRead (デフォルト) または fmOpenReadWrite
461-*}
462-constructor TMappedFile.Create( const filePath : string; mode : Longword = fmOpenRead );
463-var
464- dwFileDesiredAccess : DWORD;
465- flProtect : DWORD;
466- dwViewDesiredAccess : DWORD;
467-begin
468-
469- case mode of
470- fmOpenRead:
471- begin
472- dwFileDesiredAccess := GENERIC_READ;
473- flProtect := PAGE_READONLY;
474- dwViewDesiredAccess := FILE_MAP_READ;
475- end;
476-
477- fmOpenReadWrite:
478- begin
479- dwFileDesiredAccess := GENERIC_READ or GENERIC_WRITE;
480- flProtect := PAGE_READWRITE;
481- dwViewDesiredAccess := FILE_MAP_WRITE;
482- end;
483-
484- else
485- raise EMappedFileModeError.Create( 'ファイルオープンのモードが不正です。' );
486- end;
487-
488- FFileHandle := CreateFile(
489- PChar( filePath ), dwFileDesiredAccess, 0, nil, OPEN_EXISTING,
490- FILE_ATTRIBUTE_NORMAL, 0 );
491- if FFileHandle = INVALID_HANDLE_VALUE then
492- raise EFOpenError.Create( 'ファイルのオープンに失敗しました。' );
493-
494- FSize := GetFileSize( FFileHandle, nil );
495-
496- FMappingHandle := CreateFileMapping(
497- FFileHandle, nil, flProtect, 0, 0, nil );
498- if FFileHandle = INVALID_HANDLE_VALUE then
499- raise EMappedFileMappingError.Create( 'ファイルのマッピングに失敗しました。' );
500-
501- FViewAddress := MapViewOfFile( FMappingHandle, dwViewDesiredAccess, 0, 0, 0 );
502- if FViewAddress = nil then
503- raise EMappedFileMappingError.Create( 'ファイルのマッピングに失敗しました。' );
504-
505-end;
506-
507-destructor TMappedFile.Destroy;
508-begin
509-
510- UnmapViewOfFile( FViewAddress );
511- CloseHandle( FMappingHandle );
512- CloseHandle( FFileHandle );
513-
514-end;
515-
516370 end.
Binary files a/gikoNavi.res and b/gikoNavi.res differ
--- a/readme/Samba.default
+++ b/readme/Samba.default
@@ -8,14 +8,13 @@ comic6=30
88 etc3=20
99 ex5=10
1010 ex7=10
11-ex8=90
11+ex8=10
1212 food6=20
13+game6=20
1314 game7=45
1415 game8=45
15-game9=45
1616 hobby5=30
1717 hobby6=30
18-hobby7=30
1918 human5=20
2019 life5=20
2120 life6=20
@@ -23,32 +22,29 @@ live8=10
2322 live13=10
2423 live14=10
2524 live15=10
26-live16=10
27-live17=10
2825 love3=20
2926 money3=20
3027 music4=20
31-news13=90
28+news11=20
29+news13=20
3230 news15=20
3331 news16=20
3432 news17=20
3533 news18=20
36-news19=120
3734 off3=20
3835 pc5=20
3936 pc6=20
4037 qb5=60
41-qb6=20
38+qb6=0
4239 school4=20
4340 science3=20
4441 society3=20
4542 sports2=0
46-sports7=60
43+sports7=30
4744 that3=20
45+tmp3=20
4846 tmp4=20
4947 travel2=20
5048 tv6=30
5149 pie=30
5250 idol=30
53-sakura01=10
54-sakura02=10
--- a/readme/readme.txt
+++ b/readme/readme.txt
@@ -1,4 +1,4 @@
1-■ギコナビ Version1.00 バタ49 Readme.txt
1+■ギコナビ Version1.00 バタ48 Readme.txt
22
33
44 ------------------------------
@@ -41,7 +41,7 @@
4141 ------------------------------
4242 バグや要望は、ギコナビスレッドで受け付けております。
4343 ギコナビサイト:http://gikonavi.sourceforge.jp/
44-ギコナビスレ:http://pc5.2ch.net/test/read.cgi/software/1094289071/l50
44+ギコナビスレ:http://pc5.2ch.net/test/read.cgi/software/1079685385/l50
4545
4646 ------------------------------
4747 転載について
@@ -89,28 +89,13 @@ Windows Server 2003 Enterprise Edition IE6
8989 ------------------------------
9090 履歴
9191 ------------------------------
92-2004/10/XX
93- Version バタ49
94- お気に入りの読み込みの高速化による起動時間の短縮
95- StatusBarにNGワードファイルの名前が出ない不具合の修正
96- 「指定した番号のレスに飛ぶ」機能追加(キー設定で、スレッドカテゴリの一番最後)
97- ログを削除した際に未読スレッド数 (UnRead) の表示が更新されないバグを修正
98- ここにレスだと、レスエディターのショートカットキーが設定されない不具合の修正
99- あぼーん時にココまで読んだと新着レスを調整するのに不具合があったので修正
100- スレッド一覧の表示カラムの設定ができるようになった。「オプション」->「詳細設定」->「詳細設定2」
101- デフォルトでのレスアンカーポップアップが種種の形式に対応
102- 3ちゃんねる(8ちゃんねる)を登録すると2ちゃんねるの板が表示される不具合の解消
103- お気に入りで編集中にスペースキー入力の不具合の修正
104- したらばJBBSの過去ログに関する不具合の修正
105- スレッドのリンクでレス番があるものを踏んだときに、そのレス番号までスクロールするようにした。
106-
107-2004/09/05
92+2004/mm/dd
10893 Version バタ48
10994 レスポップアップあぼ〜ん有効にしていても、透明あぼ〜んを表示する不具合の解消
11095 *.tmpファイルの処理の不具合修正
11196 透明あぼ〜んが入ると新着タグとここまで読んだタグが挿入されない不具合の修正
11297 Shiftキーを押しながら板/スレを更新すると強制取得するようにした
113- 最後に表示したスレッドから5つのスレッドは、高速でタブの切り替えができるようにした。
98+ 複数ブラウザを作って、高速でタブの切り替えができるようにした。
11499 ●の認証のURLを新サーバに変更
115100 3ペインそれぞれにフォーカスを当てるショートカットを追加
116101 標準でレスアンカーをクリックするとそのレスに飛ぶ機能を追加
--- a/readme/setup.INF
+++ b/readme/setup.INF
@@ -77,11 +77,13 @@ Folder=gikoNavi
7777 74=config\skin\skin30-3G\NewRes.html
7878 75=config\skin\skin30-3G\Res.html
7979 76=config\BoardPlugIn\MachiBBSPlugIn.dll
80-77=config\BoardPlugIn\ShitarabaJBBSPlugIn.dll
81-78=config\Board\まちBBS.txt
82-79=config\Board\したらばJBBS.txt
83-80=config\Board\ギコナビ.txt
84-81=Samba.default
80+77=config\BoardPlugIn\ShitarabaPlugIn.dll
81+78=config\BoardPlugIn\ShitarabaJBBSPlugIn.dll
82+79=config\Board\まちBBS.txt
83+80=config\Board\したらばBBS.txt
84+81=config\Board\したらばJBBS.txt
85+82=config\Board\ギコナビ.txt
86+83=Samba.default
8587
8688 [Group]
8789 1=ギコナビ,gikoNavi.exe
--- a/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr
+++ b/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr
@@ -3,7 +3,7 @@ library ShitarabaJBBSPlugIn;
33 {
44 ShitarabaJBBSPlugIn
55 したらば処理ユニット
6- $Id: ShitarabaJBBSPlugIn.dpr,v 1.36 2004/09/30 11:49:44 h677 Exp $
6+ $Id: ShitarabaJBBSPlugIn.dpr,v 1.29 2004/08/27 21:01:46 h677 Exp $
77 }
88
99 uses
@@ -33,7 +33,7 @@ type
3333
3434 private
3535 function Download : TDownloadState;
36- function StorageDownload(AURL : string) : TDownloadState;
36+ function StorageDownload(Path, Document : string) : TDownloadState;
3737 function Write( inName : string; inMail : string; inMessage : string ) : TDownloadState;
3838 function GetRes( inNo : Integer ) : string;
3939 function GetDat( inNo : Integer ) : string;
@@ -281,8 +281,7 @@ var
281281 // i : Integer;
282282 const
283283 BBS_HOST_OLD = 'jbbs.shitaraba.com';
284- BBS_HOST_OLD2 = 'jbbs.livedoor.com';
285- BBS_HOST = 'jbbs.livedoor.jp';
284+ BBS_HOST = 'jbbs.livedoor.com';
286285 THREAD_MARK = '/bbs/read.cgi';
287286 begin
288287
@@ -291,7 +290,7 @@ begin
291290 uri := TIdURI.Create( inURL );
292291 uriList := TStringList.Create;
293292 try
294- if (uri.Host = BBS_HOST_OLD) or (uri.Host = BBS_HOST_OLD2) then
293+ if uri.Host = BBS_HOST_OLD then
295294 uri.Host := BBS_HOST;
296295
297296 ExtractHttpFields( ['/'], [], uri.Path, uriList );
@@ -350,13 +349,12 @@ var
350349
351350 found : Integer;
352351 found2 : Integer;
353- pos : Integer;
354352 board : string;
355353 const
356354 CATEGORY_INPUT = 'カテゴリを入力してください';
357355 KEYWORD_INPUT = '検索する板名を入力してください';
358356 SAVEPATH_SELECT = '保存するファイル名を入力してください';
359- BBS_HOST = 'http://jbbs.livedoor.jp/';
357+ BBS_HOST = 'http://jbbs.livedoor.com/';
360358 label
361359 NextBoard;
362360 begin
@@ -439,12 +437,8 @@ begin
439437
440438 saveText.Add( board );
441439 NextBoard:
442- found := AnsiPos( '<a ', downResult );
440+ found := AnsiPos( '<a ', downResult );
443441 end;
444- pos := saveText.IndexOf('JBBS=/');
445- if pos > 0 then
446- saveText.Delete(pos);
447-
448442 saveText.SaveToFile( savepath );
449443 saveText.Free;
450444 end else begin
@@ -505,14 +499,22 @@ begin
505499 uriList := TStringList.Create;
506500 try
507501 ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
508- if uriList[ 5 ] = 'l100' then begin
509- FileName := uriList[ 4 ] + '.dat';
510- FilePath := MyLogFolder + uriList[ 2 ] + '\' + uriList[ 3 ] + '\' + uriList[ 4 ] + '.dat';
511- IsLogFile := FileExists( FilePath );
512- end else begin
513- FileName := uriList[ 5 ] + '.dat';
514- FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
502+ if (AnsiPos('.html', uri.Document) = 0) then begin //通常
503+ if uriList[ 5 ] = 'l100' then begin
504+ FileName := uriList[ 4 ] + '.dat';
505+ FilePath := MyLogFolder + uriList[ 2 ] + '\' + uriList[ 3 ] + '\' + uriList[ 4 ] + '.dat';
506+ IsLogFile := FileExists( FilePath );
507+ end else begin
508+ FileName := uriList[ 5 ] + '.dat';
509+ FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
510+ IsLogFile := FileExists( FilePath );
511+ end;
512+ end else begin //過去ログ
513+ //http://jbbs.livedoor.com/game/1578/storage/1086710948.html
514+ FileName := Copy(uri.Document, 1, Length(uri.Document) - 5) + '.dat';
515+ FilePath := MyLogFolder + CustomStringReplace(CustomStringReplace(uri.Path, '/storage', ''), '/', '\') + FileName;
515516 IsLogFile := FileExists( FilePath );
517+
516518 end;
517519 finally
518520 uri.Free;
@@ -549,109 +551,97 @@ var
549551 logStream : TFileStream;
550552 uri : TIdURI;
551553 uriList : TStringList;
552- datURL, tmpURL : string;
553- tmpText: string;
554+ datURL : string;
555+ tmpText: string;
554556 begin
555557
556558 Result := dsError;
557559
558560 uri := TIdURI.Create( ReadURL );
559- uriList := TStringList.Create;
560- try
561- ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
562- FileName := uriList[ 5 ] + '.dat';
563- // http://jbbs.livedoor.com/bbs/rawmode.cgi/game/1578/1067968274/l100
564- // protocol://host/1/2/3/4/5/uriList.Count - 1
565- if MyLogFolder = '' then begin
566- // どこに保存していいのか分からないので一時ファイルに保存
567- FilePath := TemporaryFile;
568- FIsTemporary := True;
569- end else begin
570- FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
571- FIsTemporary := False;
572- end;
573- finally
561+ if(( AnsiPos('.html', uri.Document) >0 ) and ( AnsiPos('/storage/', uri.Path) > 0 )) then begin
562+ //過去ログ
563+ Result := StorageDownload(uri.Path, uri.Document);
574564 uri.Free;
575- uriList.Free;
576- end;
565+ end else begin
566+ //現在生きてるスレッド
567+ uriList := TStringList.Create;
568+ try
569+ ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
570+ FileName := uriList[ 5 ] + '.dat';
571+ // http://jbbs.livedoor.com/bbs/rawmode.cgi/game/1578/1067968274/l100
572+ // protocol://host/1/2/3/4/5/uriList.Count - 1
573+ if MyLogFolder = '' then begin
574+ // どこに保存していいのか分からないので一時ファイルに保存
575+ FilePath := TemporaryFile;
576+ FIsTemporary := True;
577+ end else begin
578+ FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
579+ FIsTemporary := False;
580+ end;
581+ finally
582+ uri.Free;
583+ uriList.Free;
584+ end;
577585
578- // 保存用のディレクトリを掘る
579- ForceDirectoriesEx( Copy( FilePath, 1, LastDelimiter( '\', FilePath ) ) );
586+ // 保存用のディレクトリを掘る
587+ ForceDirectoriesEx( Copy( FilePath, 1, LastDelimiter( '\', FilePath ) ) );
580588
581- // 独自にダウンロードやフィルタリングを行わない場合は
582- // InternalDownload に任せることが出来る
583- modified := LastModified;
584- datURL := ReadURL + IntToStr( Count + 1 ) + '-'; // 新着のみ
585- responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 );
589+ // 独自にダウンロードやフィルタリングを行わない場合は
590+ // InternalDownload に任せることが出来る
591+ modified := LastModified;
592+ datURL := ReadURL + IntToStr( Count + 1 ) + '-'; // 新着のみ
593+ responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 );
586594
587- try
588- if (responseCode = 200) or (responseCode = 206) then begin
589- downResult := TStringList.Create;
590- try
591- tmpText := CustomStringReplace( string( tmp ), '。?ョ', ',' );
592- downResult.Text := EUCtoSJIS( tmpText );
593- ArrangeDownloadData(Count, downResult);
594- if downResult.Count > 0 then begin
595- if FileExists( FilePath ) then
596- logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite )
597- else
598- logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite );
599- try
600- logStream.Position := logStream.Size;
601- logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) );
602- finally
603- logStream.Free;
604- end;
595+ try
596+ if (responseCode = 200) or (responseCode = 206) then begin
597+ downResult := TStringList.Create;
598+ try
599+ tmpText := CustomStringReplace( string( tmp ), '。?ョ', ',' );
600+ downResult.Text := EUCtoSJIS( tmpText );
601+ ArrangeDownloadData(Count, downResult);
602+ if downResult.Count > 0 then begin
603+ if FileExists( FilePath ) then
604+ logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite )
605+ else
606+ logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite );
607+ try
608+ logStream.Position := logStream.Size;
609+ logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) );
610+ finally
611+ logStream.Free;
612+ end;
605613
606- if Count = 0 then
607- // 新規
608- Result := dsComplete
609- else
610- // 追記
611- Result := dsDiffComplete;
614+ if Count = 0 then
615+ // 新規
616+ Result := dsComplete
617+ else
618+ // 追記
619+ Result := dsDiffComplete;
612620
613- Size := Size + Length( downResult.Text );
614- // CGI からは正しい日付が得られないので現在に設定
615- LastModified := Now;
621+ Size := Size + Length( downResult.Text );
622+ // CGI からは正しい日付が得られないので現在に設定
623+ LastModified := Now;
616624
617625
618626
619- NewReceive := Count + 1;
620- Count := Count + downResult.Count;
621- NewResCount := downResult.Count;
627+ NewReceive := Count + 1;
628+ Count := Count + downResult.Count;
629+ NewResCount := downResult.Count;
622630
623631
624632
625- end else begin
626- Result := dsNotModify;
633+ end else begin
634+ Result := dsNotModify;
635+ end;
636+ finally
637+ downResult.Free;
627638 end;
628- finally
629- downResult.Free;
639+ end else if responseCode = 304 then begin
640+ Result := dsNotModify;
630641 end;
631- end else if responseCode = 302 then begin
632- //http://jbbs.shitaraba.com/bbs/read.cgi/game/3477/1077473358/
633- //http://jbbs.shitaraba.com/game/bbs/read.cgi?BBS=3477&KEY=1077473358
634- //http://jbbs.shitaraba.com/game/3477/storage/1077473358.html
635- //過去ログ
636- //tmpURL := URL;
637- if Assigned( InternalPrint ) then
638- InternalPrint( '過去ログ倉庫入り' );
639- uri := TIdURI.Create( ReadURL );
640- uriList := TStringList.Create;
641- try
642- ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
643- tmpURL := uri.Protocol + '://' + uri.Host +
644- '/' + uriList[3] + '/' + uriList[4] + '/storage/' + uriList[ 5 ] + '.html';
645- finally
646- uriList.Free;
647- uri.Free;
648- end;
649- Result := StorageDownload(tmpURL);
650- end else if responseCode = 304 then begin
651- Result := dsNotModify;
642+ finally
643+ DisposeResultString( tmp );
652644 end;
653- finally
654- DisposeResultString( tmp );
655645 end;
656646
657647 end;
@@ -691,16 +681,17 @@ end;
691681 // 過去ログ用Download関数
692682 // *************************************************************************
693683 function TShitarabaThreadItem.StorageDownload(
694- AURL : string
684+ Path, Document : string
695685 ) : TDownloadState;
696686 var
697687 modified : Double;
698688 tmp : PChar;
699- uri : TIdURI;
700- uriList : TStringList;
701689 downResult : TStringList;
702690 responseCode : Longint;
703691 logStream : TFileStream;
692+ //uri : TIdURI;
693+ //uriList : TStringList;
694+ datURL : string;
704695 tmpText, tmpLine, tmpTitle: string;
705696 tmpHTML: TStringList;
706697
@@ -709,24 +700,23 @@ var
709700 begin
710701
711702 Result := dsError;
712- uri := TIdURI.Create( ReadURL );
713- uriList := TStringList.Create;
703+
704+ //uri := TIdURI.Create( ReadURL );
714705 try
715- ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
716- FileName := uriList[ 5 ] + '.dat';
717- // http://jbbs.livedoor.com/bbs/rawmode.cgi/game/1578/1067968274/l100
718- // protocol://host/1/2/3/4/5/uriList.Count - 1
706+ FileName := Copy(Document, 1, Length(Document) - 5) + '.dat';
719707 if MyLogFolder = '' then begin
720708 // どこに保存していいのか分からないので一時ファイルに保存
721709 FilePath := TemporaryFile;
722710 FIsTemporary := True;
723711 end else begin
724- FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
712+ FilePath := MyLogFolder
713+ + CustomStringReplace(CustomStringReplace(Path, '/storage', ''), '/', '\')
714+ + FileName;
715+
725716 FIsTemporary := False;
726717 end;
727718 finally
728- uri.Free;
729- uriList.Free;
719+ //uri.Free;
730720 end;
731721
732722 // 保存用のディレクトリを掘る
@@ -738,7 +728,8 @@ begin
738728 // InternalDownload に任せることが出来る
739729 modified := LastModified;
740730
741- responseCode := InternalDownload( PChar( AURL ), modified, tmp, 0 );
731+ datURL := ReadURL;
732+ responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 );
742733
743734 try
744735 if (responseCode = 200) or (responseCode = 206) then begin
@@ -803,7 +794,7 @@ begin
803794 end;
804795 tmpHTML.Delete(i);
805796 end;
806- j := 0;
797+ j := 0;
807798 for i := 0 to tmpHTML.Count - 1 do begin
808799 tmpLine := AnsiLowerCase(tmpHTML[i]);
809800 tS := AnsiPos('<dl>', tmpLine);
@@ -924,27 +915,31 @@ begin
924915
925916 if downResult.Count > 0 then begin
926917 if FileExists( FilePath ) then
927- DeleteFile(FilePath);
928-
929- logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite );
918+ logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite )
919+ else
920+ logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite );
930921 try
931- logStream.Position := 0;
922+ logStream.Position := logStream.Size;
932923 logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) );
933924 finally
934925 logStream.Free;
935926 end;
936927
937- // 新規
938- Result := dsComplete;
928+ if Count = 0 then
929+ // 新規
930+ Result := dsComplete
931+ else
932+ // 追記
933+ Result := dsDiffComplete;
939934
940- Size := Length( downResult.Text );
935+ Size := Size + Length( downResult.Text );
941936 // CGI からは正しい日付が得られないので現在に設定
942937 LastModified := Now;
943938
944939
945940
946- NewReceive := 1;
947- Count := downResult.Count;
941+ NewReceive := Count + 1;
942+ Count := Count + downResult.Count;
948943 NewResCount := downResult.Count;
949944 //http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1086710948/l100
950945 //http://jbbs.livedoor.com/game/1578/storage/1086710948.html
@@ -1149,8 +1144,7 @@ var
11491144 tmphost: String;
11501145 const
11511146 BBS_HOST_OLD = 'jbbs.shitaraba.com';
1152- BBS_HOST_OLD2 = 'jbbs.livedoor.com';
1153- BBS_HOST = 'jbbs.livedoor.jp';
1147+ BBS_HOST = 'jbbs.livedoor.com';
11541148 begin
11551149
11561150 uri := TIdURI.Create( ReadURL );
@@ -1160,15 +1154,22 @@ begin
11601154
11611155 tmphost := uri.Host;
11621156
1163- if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then
1157+ if tmphost = BBS_HOST_OLD then
11641158 tmphost := BBS_HOST;
11651159
1166- FileName := uriList[ 5 ] + '.dat';
1167- // http://jbbs.livedoor.com/bbs/read.cgi/computer/351/1090404452/l100
1168- // http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1067968274/l100
1169- // http://jbbs.livedoor.com/game/1000/subject.txt
1170- Result := CreateResultString(
1171- uri.Protocol + '://' + tmphost + '/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' );
1160+ if( AnsiPos('.html', uri.Document) = 0 ) then begin //通常
1161+ FileName := uriList[ 5 ] + '.dat';
1162+ // http://jbbs.livedoor.com/bbs/read.cgi/computer/351/1090404452/l100
1163+ // http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1067968274/l100
1164+ // http://jbbs.livedoor.com/game/1000/subject.txt
1165+ Result := CreateResultString(
1166+ uri.Protocol + '://' + tmphost + '/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' );
1167+ end else begin
1168+ //http://jbbs.livedoor.com/game/1578/storage/1086710948.html
1169+ Result := CreateResultString(
1170+ uri.Protocol + '://' + tmphost + CustomStringReplace(uri.Path, '/storage', ''));
1171+ end;
1172+
11721173 finally
11731174 uri.Free;
11741175 uriList.Free;
@@ -1218,8 +1219,7 @@ var
12181219 dir, tmphost : string;
12191220 const
12201221 BBS_HOST_OLD = 'jbbs.shitaraba.com';
1221- BBS_HOST_OLD2 = 'jbbs.livedoor.com';
1222- BBS_HOST = 'jbbs.livedoor.jp';
1222+ BBS_HOST = 'jbbs.livedoor.com';
12231223 begin
12241224
12251225 foundPos := AnsiPos( '?', URL );
@@ -1232,7 +1232,7 @@ begin
12321232 dir := uriList[ 1 ];
12331233
12341234 tmphost := uri.Host;
1235- if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then
1235+ if tmphost = BBS_HOST_OLD then
12361236 tmphost := BBS_HOST;
12371237
12381238 ExtractHttpFields( ['&'], [], Copy( URL, foundPos + 1, MaxInt ), uriList );
@@ -1254,7 +1254,7 @@ begin
12541254 ExtractHttpFields( ['/'], [], uri.Path, uriList );
12551255
12561256 tmphost := uri.Host;
1257- if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then
1257+ if tmphost = BBS_HOST_OLD then
12581258 tmphost := BBS_HOST;
12591259
12601260 if( AnsiPos(THREAD_MARK, URL) > 0) and (uriList.Count > 5) then begin
@@ -1265,8 +1265,7 @@ begin
12651265 end else if AnsiPos(THREAD_MARK, URL) = 0 then begin
12661266 //ココで過去ログかどうかチェック?
12671267 if(AnsiPos('.html/', uri.Path) > 0) then begin
1268- Result := uri.Protocol + '://' + tmphost + THREAD_MARK +
1269- CustomStringReplace(CustomStringReplace(uri.Path, '/storage', ''), '.html/', '/') + 'l100';
1268+ Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1);
12701269 end else
12711270 Result := URL;
12721271 end;
@@ -1291,8 +1290,7 @@ var
12911290 dir, tmphost : string;
12921291 const
12931292 BBS_HOST_OLD = 'jbbs.shitaraba.com';
1294- BBS_HOST_OLD2 = 'jbbs.livedoor.com';
1295- BBS_HOST = 'jbbs.livedoor.jp';
1293+ BBS_HOST = 'jbbs.livedoor.com';
12961294 begin
12971295
12981296 foundPos := AnsiPos( '?', URL );
@@ -1305,7 +1303,7 @@ begin
13051303 dir := uriList[ 1 ];
13061304
13071305 tmphost := uri.Host;
1308- if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then
1306+ if tmphost = BBS_HOST_OLD then
13091307 tmphost := BBS_HOST;
13101308
13111309 ExtractHttpFields( ['&'], [], Copy( URL, foundPos + 1, MaxInt ), uriList );
@@ -1327,13 +1325,19 @@ begin
13271325 ExtractHttpFields( ['/'], [], uri.Path, uriList );
13281326
13291327 tmphost := uri.Host;
1330- if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then
1328+ if tmphost = BBS_HOST_OLD then
13311329 tmphost := BBS_HOST;
13321330 // http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1067968274/l100
13331331 if( AnsiPos(THREAD_MARK, URL) > 0) and (uriList.Count > 5) then begin
13341332 Result :=
13351333 uri.Protocol + '://' + tmphost + '/bbs/rawmode.cgi/' +
13361334 uriList[ 3 ] + '/' + uriList[ 4 ] + '/' + uriList[ 5 ] + '/';
1335+ end else if AnsiPos(THREAD_MARK, URL) = 0 then begin
1336+ //ココで過去ログかどうかチェック?
1337+ if(AnsiPos('.html/', uri.Path) > 0) then begin
1338+ Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1);
1339+ end else
1340+ Result := URL;
13371341 end;
13381342 finally
13391343 uri.Free;
@@ -1415,8 +1419,7 @@ var
14151419 uriList : TStringList;
14161420 const
14171421 BBS_HOST_OLD = 'jbbs.shitaraba.com';
1418- BBS_HOST_OLD2 = 'jbbs.livedoor.com';
1419- BBS_HOST = 'jbbs.livedoor.jp';
1422+ BBS_HOST = 'jbbs.livedoor.com';
14201423 begin
14211424
14221425 inherited;
@@ -1433,7 +1436,7 @@ begin
14331436 uri := TIdURI.Create( SubjectURL );
14341437 uriList := TStringList.Create;
14351438 try
1436- if (uri.Host = BBS_HOST_OLD) or (uri.Host = BBS_HOST_OLD2) then
1439+ if uri.Host = BBS_HOST_OLD then
14371440 uri.Host := BBS_HOST;
14381441 URL := uri.Protocol + '://' + uri.Host + uri.Path;
14391442
--- a/res/skin/skin30-2G/Header.html
+++ b/res/skin/skin30-2G/Header.html
@@ -15,7 +15,7 @@
1515 var start_time = new Date();
1616 //==========グローバル変数
1717 var anchorHead="";
18-var skinName="skin30-2 v3.3.09xx";
18+var skinName="skin30-2 v3.1.11xx";
1919 var browser="ギコナビ";
2020 //==========ギコナビ用アンカーの判定(0:処理無し,1:ポップアップ,2:ボタン挿入)
2121 // ギコナビでは、レスアンカーは相対アドレスで記述される
@@ -27,22 +27,13 @@ function checkAnchor(href){if(!href){return(0)}
2727 //==========リンク設定
2828 function addAnchor(inner,num){
2929 if(!t_url){threadurl()}
30- var url=document.getElementsByName("ThreadURL")[0].content;
31- if(url.match(/&/)){
32- return('<a href="../test/read.cgi?bbs='+t_bbs+'&key='+t_key+'&st='+inner+'&to='+inner+'&nofirst=true" target="_blank" onclick="blur()">'+num+'</a>')
33- }else{
34- return('<a href="../test/read.cgi/'+t_bbs+'/'+t_key+'/'+inner+'" target="_blank" onclick="blur()">'+num+'</a>')
35- }
30+ return('<a href="../test/read.cgi/'+t_bbs+'/'+t_key+'/'+inner+'" target="_blank" onclick="blur()">'+num+'</a>')
3631 }
3732 // スレッドURLの取得
3833 var t_url=false,t_domain,t_bbs,t_key;
3934 function threadurl(){
4035 var threadurl=document.getElementsByName("ThreadURL")[0].content;
41- if(threadurl.match(/&/)){
42- threadurl.match(/bbs=(.*)&key=(\d*)/);
43- }else{
44- threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//);
45- }
36+ threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//);
4637 t_url=true;
4738 t_bbs=RegExp.$1;
4839 t_key=RegExp.$2;
--- a/res/skin/skin30-2G/chie_event.js
+++ b/res/skin/skin30-2G/chie_event.js
@@ -2,8 +2,7 @@
22 //外部関数:tohan
33 //外部変数:anchorHead,lightmode,getID,skinName,browser,dts
44 //グローバル変数
5-var buffer=1; // 低速回線や低速マシンの場合にはbufferの数値を増やすとより正確にジャンプ(1増やすと0.1秒遅れる)
6-var newResJump=1; // 新着レスジャンプ(0:ブラウザ任せ、1:読了時のみ、2:常時)*かちゅ、OpenJane、twintailのみの設定
5+var buffer=1; // 低速回線や低速マシンの場合にはbufferの数値を増やすとより正確にジャンプ(1増やすと0.1秒遅れる)
76 //========Click処理→search,他
87 document.onclick = clickEvent;
98 function clickEvent(){
@@ -41,19 +40,10 @@ function mouseOverEvent() {
4140 else if(e.innerText.match(/^あぼ〜ん$/)) {abonePopup(e);}
4241 }
4342 if(e.tagName=='A'){
44- if(!e.innerText.match(/%/)){ // URLエンコードでありがちな%がなければ
45- e.href=e.href.replace(/>/g,"");
46- e.href=e.href.replace(/\/ime.nu/g,"");
47- }else{
48- try{
49- e.title=decodeURI(e.innerText);
50- }catch(err){
51- // ShiftJIS,EUC-JPのデコードは面倒だからつけない。
52- }
53- }
43+ e.href=e.href.replace(/>/g,"");
44+ e.href=e.href.replace(/\/ime.nu/g,"");
5445 if (checkAnchor(e.href)==2){insButton(e);return;}
5546 else if(checkAnchor(e.href)==1){
56- if(event.shiftKey){if(e.rel){e.href=e.rel}return}
5747 // 多段ポップアップ
5848 var aNum=parseInt(e.sourceIndex)+1;
5949 if(!document.getElementById("p"+aNum)){
@@ -106,10 +96,10 @@ function scroll_End(){document.getElementsByTagName("DL")[0].lastChild.scrollInt
10696 // IMG
10797 function imgCommand(mode,s){
10898 if(!waited){
109- var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="全レス一括読込"><br><input type="button" onclick="allImageLoad(\'new\')" value="新レス一括読込"><br><input type="button" onclick="removeError()" value="Error画像削除"><br></div>';
99+ var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="全レス一括読込"><br><input type="button" onclick="allImageLoad(\'new\')" value="新レス一括読込"><br></div>';
110100 event.srcElement.parentElement.insertAdjacentHTML('beforeEnd',nHTML);
111101 if(skinName.match(/30-2/)){
112- //if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="パネル切替"><br>')}
102+ if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="パネル切替"><br>')}
113103 document.getElementById("command").insertAdjacentHTML('beforeEnd','<input type="button" onclick="changeMode()" value="モード切替">')
114104 }
115105 waited=true;
@@ -119,7 +109,7 @@ function imgCommand(mode,s){
119109 }
120110 function clearCommand(){
121111 waited=false;
122- document.getElementById("command").removeNode(true);
112+ event.srcElement.parentElement.removeNode(true);
123113 }
124114 //=========左長押処理→copyMenu()
125115 document.onmousedown=mousedownEvent;
@@ -132,7 +122,6 @@ function mousedownEvent(){
132122 clickTimer=setTimeout("copyMenu()",500);
133123 }
134124 }
135-
136125 //コピーメニュー→colorChange(),search::copyText()
137126 function copyMenu(){
138127 clickCancel=true; clearTimeout(clickTimer);
@@ -176,53 +165,27 @@ function key(){
176165 }
177166 }
178167
179-//=========新着レス取得後処理(標準スキン未対応ブラウザ用)←Timer又はFooterから呼び出し
180-//=========かちゅ、ABone、ゾヌ2
168+//=========Load(代替)処理(各Footerもしくは、Headerでのループから呼出し)
181169 var newResNum=parseInt(document.getElementsByName("GetRescount")[0].content)+1;
182170 var k=0;
183-function loadEvent(num){ // Timer又はFooterから
184- //====新着レスジャンプ
185- if(newResJump==0){clearInterval(timerID);return} //「ブラウザ任せ」なら終了
186- //新着レスの開始番号を取得
187- if (browser=="かちゅ〜しゃ"){if(isNaN(newResNum)){while(dts[k]){if(dts[k].className=="new"){newResNum=parseInt(dts[k].firstChild.innerText);break;} k++;}}}
188- else if(browser=="ホットゾヌ2"){newResNum=num+1;}
171+function loadEvent(){
172+ //GetRescount代替 "数字でなければ"
173+ if(isNaN(newResNum)){while(dts[k]){if(dts[k].className=="new"){newResNum=parseInt(dts[k].firstChild.innerText);break;} k++; }}
174+ //新着開始ナンバーを設定してジャンプ
189175 var anc=document.anchors(anchorHead+newResNum);
190- if(!anc || !anc.parentElement){return} // 透明あぼ〜んされてたら終了
191- //新着レスジャンプ
192- scr=lightmode ? document.body : document.getElementById("dl");
193- viewPos=scr.scrollTop+scr.clientHeight;// スクロール後の画面下部位置
194- endPos =anc.offsetTop+20; // 新レスアンカー位置
195- //最後まで読了 or 「常に新着ジャンプ」ならジャンプ
196- if(viewPos>endPos || newResJump==2){clearInterval(timerID);setTimeout("moveToNew("+newResNum+")",buffer*100)}
197- else{firstNew=document.anchors(anchorHead+newResNum).parentElement.nextSibling;}
198-}
199-//=========新着レス取得後処理(標準スキン対応ブラウザ用)←NewMarkから呼び出し
200-//=========OpenJ、twin
201-var scr,viewPos,endPos=0;
202-function reloadEvent(){
203- //====既読化
204- var lastDt=dts[dts.length-2];if(!lastDt){return}// 全部新着なら終了
205- while(lastDt && lastDt.className=="new"){lastDt.className="";lastDt=lastDt.previousSibling.previousSibling;}
206- //====新着レスジャンプ
207- if(newResJump==0){return} //「ブラウザ任せ」なら終了
208- var ancs=document.anchors;
209- var newResNum=parseInt(ancs[ancs.length-1].name)+1;
210- scr=lightmode ? document.body : document.getElementById("dl");
211- viewPos=scr.scrollTop;
212- endPos =scr.scrollHeight-scr.clientHeight-20;
213- //最後まで読了 or 「常に新着ジャンプ」ならジャンプ
214- if(viewPos>endPos || newResJump==2){setTimeout("moveToNew("+newResNum+")",buffer*100);}
176+ if(anc && anc.parentElement){
177+ if(buffer==0){clearInterval(timerID);moveToNew(newResNum);}
178+ else {buffer--;}
179+ }
215180 }
216-
217181 // 新着レス移動+新着レスの位置を記憶
218182 var firstNew;
219183 function moveToNew(num){
220184 firstNew=getDTfromAnc(num);
221- while(!firstNew){num--;firstNew=getDTfromAnc(num);} //対象が透明あぼ〜んなら数を減らす
222- firstNew.scrollIntoView(true);
185+ if(firstNew){firstNew.scrollIntoView(true);}
223186 }
224187
225-//=========DoubleClick処理→defaultPopup()
188+//=========DblClick処理→defaultPopup()
226189 document.ondblclick=defaultPopup;
227190 function defaultPopup(){
228191 var num=document.selection.createRange().text.replace(/\s$/,"");
@@ -237,17 +200,4 @@ function defaultPopup(){
237200 obj.innerText="ID:"+num;
238201 search(obj);
239202 }
240-}
241-
242-//=========Copy処理
243-//headから読むとbodyは見えないので、専用ブラウザの特質を利用してbodyの後ろに書き出す
244-//本来どおりheadに書き出すSkinManager対策で判定を一つ入れる
245- if(document.body) document.write('<script type="text/javascript">document.body.oncopy=copyEvent</script>\n');
246-function copyEvent(){
247- var textarea=document.createElement("TEXTAREA");
248- textarea.value=document.selection.createRange().text.replace(/\s(\r\n|$)/g,"\n");
249- var copyText=textarea.createTextRange();
250- copyText.execCommand("Copy");
251- return false;
252-}
253-
203+}
\ No newline at end of file
--- a/res/skin/skin30-2G/chie_image.js
+++ b/res/skin/skin30-2G/chie_image.js
@@ -2,8 +2,7 @@
22 // 外部関数:addAnchor
33 // 外部変数:cp,tp,vp,dds
44 //======画像読込の設定
5-var onMouseLoad=true; // true:カーソルを合わせただけ、false:LOADボタンをクリックしてから
6-var takeArisk=false; // true:画像読み込み時にモード切替、false:手動でモード切替
5+var onMouseLoad=true; // true:カーソルを合わせただけ、false:LOADボタンをクリックしてから
76 //==========グローバル変数
87 //==========画像処理等
98 var lightmode = true;
@@ -69,13 +68,12 @@ function insButton(a,hRH) {
6968 // 画像読込
7069 function loadImage(btn,href){
7170 if(!panel){changePanel()}
72- if(takeArisk && lightmode){changeMode()}
7371 if(btn.tagName!="A"){
7472 var thumbs = document.images;
7573 var l=thumbs.length;
7674 for(var i=l;i--;){if(thumbs[i].src==href){
7775 if(lightmode){tp.style.visibility="visible";viewed=true;}
78- //thumbs[i].scrollIntoView(true);
76+ thumbs[i].scrollIntoView(true);
7977 imgOver(thumbs[i],100);
8078 return true;
8179 }}
@@ -105,7 +103,7 @@ function loadImage(btn,href){
105103 function imgResult(img){
106104 var btn=img.parentElement.children.item(2);
107105 if(event.type=="load"){btn.value='___'; img.style.display='block';}
108- else {btn.value='NONE';btn.style.color='#C00';setTimeout("viewed=false",3000)}
106+ else {btn.value='NONE';btn.style.color='#C00';}
109107 }
110108 // サイズの切替
111109 function changeSize(btn){
@@ -124,15 +122,6 @@ function changeSize(btn){
124122 }
125123 // サムネイルの削除
126124 function removeThumb(btn){btn.parentElement.removeNode(true);}
127-function removeError(){
128- if(tp){
129- var l=tp.childNodes.length;
130- for(var i=l;i--;){
131- var stateBtn=tp.childNodes[i].childNodes[2];
132- if(stateBtn.tagName=="BUTTON" && stateBtn.innerText=="NONE"){stateBtn.parentElement.removeNode(true);}
133- }
134- }
135-}
136125 // 画像表示の切替
137126 function changeView(mode,href){
138127 if(!href){href=event.srcElement.src}
--- a/res/skin/skin30-2G/chie_popup.js
+++ b/res/skin/skin30-2G/chie_popup.js
@@ -15,7 +15,7 @@ var pb;
1515 function namePopup(e,before,num,after){
1616 var hnum=tohan(num);
1717 //3周年、4周年、Socket774、774KB、21禁、[1-30]、などに対応
18- if(before){if(hnum==5 || hnum==774 || hnum==4 || hnum==21 || hnum==1 || hnum==30){return}}
18+ if(before){if(hnum==3 || hnum==774 || hnum==4 || hnum==21 || hnum==1 || hnum==30){return}}
1919 e.outerHTML = "<b>"+before+"</b><b>"+addAnchor(hnum,num)+"</b><b>"+after+"</b>";
2020 }
2121 //=========弱あぼ〜んのポップアップ
--- a/res/skin/skin30-2G/chie_search.js
+++ b/res/skin/skin30-2G/chie_search.js
@@ -110,7 +110,7 @@ function clearResult(obj){
110110 for(var i=l;i--;){
111111 var dt=eval(arrayElement); var dd=dt.nextSibling;
112112 //Live機能追加 - 透明あぼ〜ん
113- if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;}
113+ if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;continue;}
114114 dt.removeNode(true); dd.removeNode(true);
115115 }
116116 }
@@ -144,7 +144,7 @@ function findIt(word){
144144
145145 //==========逆参照
146146 function searchRef(obj){
147- if(obj.name!='referred'){
147+ if(obj.name!='reffered'){
148148 var num=obj.firstChild.innerText;
149149 var l=dds.length;
150150 var found = new Array;
@@ -171,7 +171,7 @@ function searchRef(obj){
171171 if(exist){
172172 var dt=dds[i].previousSibling.cloneNode(true);
173173 found.unshift(dt.outerHTML.replace(/name=.*?>/,">")+dd.outerHTML.replace(/<a name=.*>/i,""));
174- obj.name="referred";
174+ obj.name="reffered";
175175 }
176176 }
177177 if(found.length){returnRef(obj.nextSibling,found)}
@@ -190,12 +190,13 @@ function returnRef(dd,found){
190190 function copyText(target){
191191 var num=event.srcElement.parentElement.name;
192192 var obj=getDTfromAnc(num);
193+ var decoy=document.createDocumentFragment();
193194 var textarea=document.createElement("TEXTAREA");
194- var message=obj.nextSibling.innerText.replace(/\s(\r\n|$)/g,"\n");
195- if (target=="res") {textarea.value=obj.firstChild.innerText+" :"+obj.childNodes[1].innerText+" :"+obj.lastChild.innerText+"\n"+message;}
195+ if (target=="res") {textarea.value=obj.firstChild.innerText+" :"+obj.childNodes[1].innerText+" :"+obj.lastChild.innerText+"\n"+obj.nextSibling.innerText+"\n";}
196196 else if(target=="name"){textarea.value=obj.childNodes[1].innerText+"\n";}
197- else if(target=="id") {textarea.value="ID:"+(obj.lastChild.innerText.split(/ID:/))[1]+"\n";}
198- var copyText=textarea.createTextRange();
197+ else if(target=="id") {textarea.value=obj.lastChild.innerText.substr(15)+"\n";}
198+ decoy.appendChild(textarea);
199+ var copyText=decoy.getElementsByTagName("TEXTAREA")[0].createTextRange();
199200 copyText.execCommand("Copy")
200201 event.srcElement.parentElement.removeNode(true);
201202 }
--- a/res/skin/skin30-3G/Header.html
+++ b/res/skin/skin30-3G/Header.html
@@ -15,11 +15,11 @@
1515 var start_time = new Date();
1616 //==========グローバル変数
1717 var anchorHead="";
18-var skinName="skin30-3 v3.3.09xx";
18+var skinName="skin30-3 v3.1.11xx";
1919 var browser="ギコナビ";
2020 //==========ギコナビ用アンカーの判定(0:処理無し,1:ポップアップ,2:ボタン挿入)
2121 // ギコナビでは、レスアンカーは相対アドレスで記述される
22-function checkAnchor(href){if(!href){return(0)}
22+function checkAnchor(href){
2323 if (href.match(/decoy:|about:blank/)){return(1)}
2424 else if(href.match(/menu:|read\.cgi|2ch\.net\/.*\/kako/)){return(0)}
2525 else{return(2)}
@@ -27,22 +27,13 @@ function checkAnchor(href){if(!href){return(0)}
2727 //==========リンク設定
2828 function addAnchor(inner,num){
2929 if(!t_url){threadurl()}
30- var url=document.getElementsByName("ThreadURL")[0].content;
31- if(url.match(/&/)){
32- return('<a href="../test/read.cgi?bbs='+t_bbs+'&key='+t_key+'&st='+inner+'&to='+inner+'&nofirst=true" target="_blank" onclick="blur()">'+num+'</a>')
33- }else{
34- return('<a href="../test/read.cgi/'+t_bbs+'/'+t_key+'/'+inner+'" target="_blank" onclick="blur()">'+num+'</a>')
35- }
30+ return('<a href="../test/read.cgi/'+t_bbs+'/'+t_key+'/'+inner+'" target="_blank" onclick="blur()">'+num+'</a>')
3631 }
3732 // スレッドURLの取得
3833 var t_url=false,t_domain,t_bbs,t_key;
3934 function threadurl(){
4035 var threadurl=document.getElementsByName("ThreadURL")[0].content;
41- if(threadurl.match(/&/)){
42- threadurl.match(/bbs=(.*)&key=(\d*)/);
43- }else{
44- threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//);
45- }
36+ threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//);
4637 t_url=true;
4738 t_bbs=RegExp.$1;
4839 t_key=RegExp.$2;
--- a/res/skin/skin30-3G/chie_event.js
+++ b/res/skin/skin30-3G/chie_event.js
@@ -2,8 +2,7 @@
22 //外部関数:tohan
33 //外部変数:anchorHead,lightmode,getID,skinName,browser,dts
44 //グローバル変数
5-var buffer=1; // 低速回線や低速マシンの場合にはbufferの数値を増やすとより正確にジャンプ(1増やすと0.1秒遅れる)
6-var newResJump=1; // 新着レスジャンプ(0:ブラウザ任せ、1:読了時のみ、2:常時)*かちゅ、OpenJane、twintailのみの設定
5+var buffer=1; // 低速回線や低速マシンの場合にはbufferの数値を増やすとより正確にジャンプ(1増やすと0.1秒遅れる)
76 //========Click処理→search,他
87 document.onclick = clickEvent;
98 function clickEvent(){
@@ -41,19 +40,10 @@ function mouseOverEvent() {
4140 else if(e.innerText.match(/^あぼ〜ん$/)) {abonePopup(e);}
4241 }
4342 if(e.tagName=='A'){
44- if(!e.innerText.match(/%/)){ // URLエンコードでありがちな%がなければ
45- e.href=e.href.replace(/>/g,"");
46- e.href=e.href.replace(/\/ime.nu/g,"");
47- }else{
48- try{
49- e.title=decodeURI(e.innerText);
50- }catch(err){
51- // ShiftJIS,EUC-JPのデコードは面倒だからつけない。
52- }
53- }
43+ e.href=e.href.replace(/>/g,"");
44+ e.href=e.href.replace(/\/ime.nu/g,"");
5445 if (checkAnchor(e.href)==2){insButton(e);return;}
5546 else if(checkAnchor(e.href)==1){
56- if(event.shiftKey){if(e.rel){e.href=e.rel}return}
5747 // 多段ポップアップ
5848 var aNum=parseInt(e.sourceIndex)+1;
5949 if(!document.getElementById("p"+aNum)){
@@ -106,10 +96,10 @@ function scroll_End(){document.getElementsByTagName("DL")[0].lastChild.scrollInt
10696 // IMG
10797 function imgCommand(mode,s){
10898 if(!waited){
109- var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="全レス一括読込"><br><input type="button" onclick="allImageLoad(\'new\')" value="新レス一括読込"><br><input type="button" onclick="removeError()" value="Error画像削除"><br></div>';
99+ var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="全レス一括読込"><br><input type="button" onclick="allImageLoad(\'new\')" value="新レス一括読込"><br></div>';
110100 event.srcElement.parentElement.insertAdjacentHTML('beforeEnd',nHTML);
111101 if(skinName.match(/30-2/)){
112- //if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="パネル切替"><br>')}
102+ if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="パネル切替"><br>')}
113103 document.getElementById("command").insertAdjacentHTML('beforeEnd','<input type="button" onclick="changeMode()" value="モード切替">')
114104 }
115105 waited=true;
@@ -119,7 +109,7 @@ function imgCommand(mode,s){
119109 }
120110 function clearCommand(){
121111 waited=false;
122- document.getElementById("command").removeNode(true);
112+ event.srcElement.parentElement.removeNode(true);
123113 }
124114 //=========左長押処理→copyMenu()
125115 document.onmousedown=mousedownEvent;
@@ -132,7 +122,6 @@ function mousedownEvent(){
132122 clickTimer=setTimeout("copyMenu()",500);
133123 }
134124 }
135-
136125 //コピーメニュー→colorChange(),search::copyText()
137126 function copyMenu(){
138127 clickCancel=true; clearTimeout(clickTimer);
@@ -176,53 +165,27 @@ function key(){
176165 }
177166 }
178167
179-//=========新着レス取得後処理(標準スキン未対応ブラウザ用)←Timer又はFooterから呼び出し
180-//=========かちゅ、ABone、ゾヌ2
168+//=========Load(代替)処理(各Footerもしくは、Headerでのループから呼出し)
181169 var newResNum=parseInt(document.getElementsByName("GetRescount")[0].content)+1;
182170 var k=0;
183-function loadEvent(num){ // Timer又はFooterから
184- //====新着レスジャンプ
185- if(newResJump==0){clearInterval(timerID);return} //「ブラウザ任せ」なら終了
186- //新着レスの開始番号を取得
187- if (browser=="かちゅ〜しゃ"){if(isNaN(newResNum)){while(dts[k]){if(dts[k].className=="new"){newResNum=parseInt(dts[k].firstChild.innerText);break;} k++;}}}
188- else if(browser=="ホットゾヌ2"){newResNum=num+1;}
171+function loadEvent(){
172+ //GetRescount代替 "数字でなければ"
173+ if(isNaN(newResNum)){while(dts[k]){if(dts[k].className=="new"){newResNum=parseInt(dts[k].firstChild.innerText);break;} k++; }}
174+ //新着開始ナンバーを設定してジャンプ
189175 var anc=document.anchors(anchorHead+newResNum);
190- if(!anc || !anc.parentElement){return} // 透明あぼ〜んされてたら終了
191- //新着レスジャンプ
192- scr=lightmode ? document.body : document.getElementById("dl");
193- viewPos=scr.scrollTop+scr.clientHeight;// スクロール後の画面下部位置
194- endPos =anc.offsetTop+20; // 新レスアンカー位置
195- //最後まで読了 or 「常に新着ジャンプ」ならジャンプ
196- if(viewPos>endPos || newResJump==2){clearInterval(timerID);setTimeout("moveToNew("+newResNum+")",buffer*100)}
197- else{firstNew=document.anchors(anchorHead+newResNum).parentElement.nextSibling;}
198-}
199-//=========新着レス取得後処理(標準スキン対応ブラウザ用)←NewMarkから呼び出し
200-//=========OpenJ、twin
201-var scr,viewPos,endPos=0;
202-function reloadEvent(){
203- //====既読化
204- var lastDt=dts[dts.length-2];if(!lastDt){return}// 全部新着なら終了
205- while(lastDt && lastDt.className=="new"){lastDt.className="";lastDt=lastDt.previousSibling.previousSibling;}
206- //====新着レスジャンプ
207- if(newResJump==0){return} //「ブラウザ任せ」なら終了
208- var ancs=document.anchors;
209- var newResNum=parseInt(ancs[ancs.length-1].name)+1;
210- scr=lightmode ? document.body : document.getElementById("dl");
211- viewPos=scr.scrollTop;
212- endPos =scr.scrollHeight-scr.clientHeight-20;
213- //最後まで読了 or 「常に新着ジャンプ」ならジャンプ
214- if(viewPos>endPos || newResJump==2){setTimeout("moveToNew("+newResNum+")",buffer*100);}
176+ if(anc && anc.parentElement){
177+ if(buffer==0){clearInterval(timerID);moveToNew(newResNum);}
178+ else {buffer--;}
179+ }
215180 }
216-
217181 // 新着レス移動+新着レスの位置を記憶
218182 var firstNew;
219183 function moveToNew(num){
220184 firstNew=getDTfromAnc(num);
221- while(!firstNew){num--;firstNew=getDTfromAnc(num);} //対象が透明あぼ〜んなら数を減らす
222- firstNew.scrollIntoView(true);
185+ if(firstNew){firstNew.scrollIntoView(true);}
223186 }
224187
225-//=========DoubleClick処理→defaultPopup()
188+//=========DblClick処理→defaultPopup()
226189 document.ondblclick=defaultPopup;
227190 function defaultPopup(){
228191 var num=document.selection.createRange().text.replace(/\s$/,"");
@@ -237,17 +200,4 @@ function defaultPopup(){
237200 obj.innerText="ID:"+num;
238201 search(obj);
239202 }
240-}
241-
242-//=========Copy処理
243-//headから読むとbodyは見えないので、専用ブラウザの特質を利用してbodyの後ろに書き出す
244-//本来どおりheadに書き出すSkinManager対策で判定を一つ入れる
245- if(document.body) document.write('<script type="text/javascript">document.body.oncopy=copyEvent</script>\n');
246-function copyEvent(){
247- var textarea=document.createElement("TEXTAREA");
248- textarea.value=document.selection.createRange().text.replace(/\s(\r\n|$)/g,"\n");
249- var copyText=textarea.createTextRange();
250- copyText.execCommand("Copy");
251- return false;
252-}
253-
203+}
\ No newline at end of file
--- a/res/skin/skin30-3G/chie_popup.js
+++ b/res/skin/skin30-3G/chie_popup.js
@@ -15,7 +15,7 @@ var pb;
1515 function namePopup(e,before,num,after){
1616 var hnum=tohan(num);
1717 //3周年、4周年、Socket774、774KB、21禁、[1-30]、などに対応
18- if(before){if(hnum==5 || hnum==774 || hnum==4 || hnum==21 || hnum==1 || hnum==30){return}}
18+ if(before){if(hnum==3 || hnum==774 || hnum==4 || hnum==21 || hnum==1 || hnum==30){return}}
1919 e.outerHTML = "<b>"+before+"</b><b>"+addAnchor(hnum,num)+"</b><b>"+after+"</b>";
2020 }
2121 //=========弱あぼ〜んのポップアップ
--- a/res/skin/skin30-3G/chie_search.js
+++ b/res/skin/skin30-3G/chie_search.js
@@ -110,7 +110,7 @@ function clearResult(obj){
110110 for(var i=l;i--;){
111111 var dt=eval(arrayElement); var dd=dt.nextSibling;
112112 //Live機能追加 - 透明あぼ〜ん
113- if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;}
113+ if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;continue;}
114114 dt.removeNode(true); dd.removeNode(true);
115115 }
116116 }
@@ -144,7 +144,7 @@ function findIt(word){
144144
145145 //==========逆参照
146146 function searchRef(obj){
147- if(obj.name!='referred'){
147+ if(obj.name!='reffered'){
148148 var num=obj.firstChild.innerText;
149149 var l=dds.length;
150150 var found = new Array;
@@ -171,7 +171,7 @@ function searchRef(obj){
171171 if(exist){
172172 var dt=dds[i].previousSibling.cloneNode(true);
173173 found.unshift(dt.outerHTML.replace(/name=.*?>/,">")+dd.outerHTML.replace(/<a name=.*>/i,""));
174- obj.name="referred";
174+ obj.name="reffered";
175175 }
176176 }
177177 if(found.length){returnRef(obj.nextSibling,found)}
@@ -190,12 +190,13 @@ function returnRef(dd,found){
190190 function copyText(target){
191191 var num=event.srcElement.parentElement.name;
192192 var obj=getDTfromAnc(num);
193+ var decoy=document.createDocumentFragment();
193194 var textarea=document.createElement("TEXTAREA");
194- var message=obj.nextSibling.innerText.replace(/\s(\r\n|$)/g,"\n");
195- if (target=="res") {textarea.value=obj.firstChild.innerText+" :"+obj.childNodes[1].innerText+" :"+obj.lastChild.innerText+"\n"+message;}
195+ if (target=="res") {textarea.value=obj.firstChild.innerText+" :"+obj.childNodes[1].innerText+" :"+obj.lastChild.innerText+"\n"+obj.nextSibling.innerText+"\n";}
196196 else if(target=="name"){textarea.value=obj.childNodes[1].innerText+"\n";}
197- else if(target=="id") {textarea.value="ID:"+(obj.lastChild.innerText.split(/ID:/))[1]+"\n";}
198- var copyText=textarea.createTextRange();
197+ else if(target=="id") {textarea.value=obj.lastChild.innerText.substr(15)+"\n";}
198+ decoy.appendChild(textarea);
199+ var copyText=decoy.getElementsByTagName("TEXTAREA")[0].createTextRange();
199200 copyText.execCommand("Copy")
200201 event.srcElement.parentElement.removeNode(true);
201202 }
Show on old repository browser