修订版 | 4956719239bdf2bba39639f79a1f3f4424daf6bd (tree) |
---|---|
时间 | 2004-10-03 03:37:46 |
作者 | cvs2git <cvs2git> |
Commiter | cvs2git |
This commit was manufactured by cvs2svn to create tag 'v1_48_0_537'.
@@ -824,62 +824,58 @@ begin | ||
824 | 824 | end; |
825 | 825 | end; |
826 | 826 | end; |
827 | - Result := false; | |
827 | + Result := false; | |
828 | 828 | |
829 | 829 | end; |
830 | 830 | //シリア語ブラクラ対策 |
831 | 831 | function TAbon.TreatSyria(AString: string): string; |
832 | 832 | var |
833 | 833 | //count: Integer; //(܀~ݏ) |
834 | - pos: Integer; | |
835 | - tmp: string; | |
834 | + pos: Integer; | |
835 | + tmp: string; | |
836 | 836 | begin |
837 | - pos := AnsiPos('', AString); | |
837 | + pos := AnsiPos('', AString); | |
838 | 838 | 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('', 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('', AString); | |
852 | + end; | |
853 | + if Length(AString) > 0 then | |
854 | + tmp := tmp + AString; | |
855 | + AString := tmp; | |
856 | + tmp := ''; | |
860 | 857 | |
861 | - pos := AnsiPos('³', AString); | |
858 | + pos := AnsiPos('³', AString); | |
862 | 859 | 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('³', 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('³', AString); | |
875 | + end; | |
876 | + if Length(AString) > 0 then | |
877 | + tmp := tmp + AString; | |
878 | + Result := tmp; | |
883 | 879 | end; |
884 | 880 | end. |
885 | 881 |
@@ -394,7 +394,7 @@ const | ||
394 | 394 | SUBJECT_FILENAME: string = 'subject.txt'; |
395 | 395 | PATH_DELIM: string = '\'; |
396 | 396 | SETTINGTXT_FILENAME: string = 'SETTING.TXT'; |
397 | - HEADTXT_FILENAME: string = 'head.html'; | |
397 | + HEADTXT_FILENAME: string = 'head.txt'; | |
398 | 398 | //DEFAULT_LIST_COUNT: Integer = 100; |
399 | 399 | |
400 | 400 | // COLUMN_CATEGORY: array[0..0] of string = ('カテゴリ名'); |
@@ -1668,11 +1668,9 @@ procedure TThreadItem.DeleteLogFile; | ||
1668 | 1668 | begin |
1669 | 1669 | ParentBoard.BeginUpdate; |
1670 | 1670 | |
1671 | - if FUnRead then | |
1672 | - ParentBoard.UnRead := ParentBoard.UnRead - 1; | |
1673 | 1671 | 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')); | |
1676 | 1674 | FRoundDate := ZERO_DATE; |
1677 | 1675 | FLastModified := ZERO_DATE; |
1678 | 1676 | FSize := 0; |
@@ -383,9 +383,6 @@ object EditorForm: TEditorForm | ||
383 | 383 | object SETTINGTXT2: TMenuItem |
384 | 384 | Action = GetSETTINGTXTAction |
385 | 385 | end |
386 | - object HeadTXT1: TMenuItem | |
387 | - Action = GetHeadTXTAction | |
388 | - end | |
389 | 386 | object OP1: TMenuItem |
390 | 387 | Action = GetTitlePictureAction |
391 | 388 | end |
@@ -1112,12 +1109,6 @@ object EditorForm: TEditorForm | ||
1112 | 1109 | OnExecute = GetTitlePictureActionExecute |
1113 | 1110 | OnUpdate = GetTitlePictureActionUpdate |
1114 | 1111 | 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 | |
1121 | 1112 | end |
1122 | 1113 | object IdLogDebug: TIdLogDebug |
1123 | 1114 | OnReceive = IdLogDebugReceive |
@@ -107,8 +107,6 @@ type | ||
107 | 107 | SETTINGTXT2: TMenuItem; |
108 | 108 | GetTitlePictureAction: TAction; |
109 | 109 | OP1: TMenuItem; |
110 | - GetHeadTXTAction: TAction; | |
111 | - HeadTXT1: TMenuItem; | |
112 | 110 | |
113 | 111 | procedure EditorPageChange(Sender: TObject); |
114 | 112 | procedure FormCreate(Sender: TObject); |
@@ -153,7 +151,6 @@ type | ||
153 | 151 | procedure GetSETTINGTXTActionExecute(Sender: TObject); |
154 | 152 | procedure GetTitlePictureActionUpdate(Sender: TObject); |
155 | 153 | procedure GetTitlePictureActionExecute(Sender: TObject); |
156 | - procedure GetHeadTXTActionExecute(Sender: TObject); | |
157 | 154 | private |
158 | 155 | FThreadItem: TThreadItem; |
159 | 156 | FBoard: TBoard; |
@@ -390,7 +387,7 @@ begin | ||
390 | 387 | MailComboBox.Text := FBoard.KotehanMail; |
391 | 388 | SageCheckBox.Checked := AnsiPos('sage', MailComboBox.Text) <> 0; |
392 | 389 | TitlePanel.Visible := True; |
393 | - SetSamba24(FBoard.URL); | |
390 | + SetSamba24(''); | |
394 | 391 | ShowBoardInformation(FBoard, BoardInformationMemo); |
395 | 392 | ShowTitlePicture(); |
396 | 393 | end; |
@@ -410,11 +407,8 @@ end; | ||
410 | 407 | |
411 | 408 | function TEditorForm.GetBody : string; |
412 | 409 | var |
413 | - body, tmp : string; | |
414 | - p, tail : PChar; | |
415 | - len : Integer; | |
416 | -const | |
417 | - TAB_LENGTH = 4; | |
410 | + body : string; | |
411 | + regexp : TAWKStr; | |
418 | 412 | begin |
419 | 413 | |
420 | 414 | body := BodyEdit.Text; |
@@ -422,65 +416,16 @@ begin | ||
422 | 416 | // & の置換は一番最初にやること |
423 | 417 | body := CustomStringReplace( body, '&', '&' ); |
424 | 418 | 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 + ' '; | |
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 + ' '; | |
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, ' ' ); | |
420 | + body := CustomStringReplace( body, ' ', ' ' ); | |
421 | + body := CustomStringReplace( body, ' ', ' ' ); | |
422 | + regexp := TAWKStr.Create( nil ); | |
423 | + try | |
424 | + regexp.RegExp := '^ '; | |
425 | + regexp.GSub( '\ ', body ); | |
426 | + finally | |
427 | + regexp.Free; | |
482 | 428 | end; |
483 | - body := tmp; | |
484 | 429 | end; |
485 | 430 | |
486 | 431 | Result := body; |
@@ -1674,7 +1619,7 @@ begin | ||
1674 | 1619 | tmpBoard := FBoard |
1675 | 1620 | else |
1676 | 1621 | tmpBoard := FThreadItem.ParentBoard; |
1677 | - | |
1622 | + | |
1678 | 1623 | Indy.Request.Referer := tmpBoard.URL; |
1679 | 1624 | if tmpBoard.TitlePictureURL <> '' then begin |
1680 | 1625 | StatusBar.Panels[0].Text := '板トップ画像ダウンロード中'; |
@@ -1729,65 +1674,4 @@ begin | ||
1729 | 1674 | end; |
1730 | 1675 | end; |
1731 | 1676 | |
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 | - | |
1793 | 1677 | end. |
@@ -229,8 +229,7 @@ var | ||
229 | 229 | // httpSocket : TIdHTTP; |
230 | 230 | resStream : TMemoryStream; |
231 | 231 | content : string; |
232 | -const | |
233 | - LIVEDOOR_URL = 'http://jbbs.livedoor.jp/'; | |
232 | + | |
234 | 233 | begin |
235 | 234 | |
236 | 235 | {$IFDEF DEBUG} |
@@ -271,12 +270,7 @@ begin | ||
271 | 270 | Result := socket.ResponseCode; |
272 | 271 | if (Length( content ) = 0) and (Result = 206) then |
273 | 272 | 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 | + | |
280 | 274 | outResultData := CreateResultString( content ); |
281 | 275 | except |
282 | 276 | on E: EIdSocketError do begin |
@@ -117,50 +117,13 @@ function TFavoriteBoardItem.GetItem : TBoard; | ||
117 | 117 | var |
118 | 118 | protocol, host, path, document, port, bookmark : string; |
119 | 119 | BBSID{, BBSKey} : string; |
120 | - tmpURL, boardURL : string; | |
120 | + tmpURL : string; | |
121 | 121 | // category : TCategory; |
122 | - i, bi: Integer; | |
123 | - tmpThread: TThreadItem; | |
124 | - tmpBoard: TBoard; | |
125 | 122 | begin |
126 | 123 | |
127 | 124 | if FItem = nil then begin |
128 | 125 | FItem := BBSsFindBoardFromURL( URL ); |
129 | 126 | 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 | |
164 | 127 | tmpURL := URL; |
165 | 128 | GikoSys.ParseURI( tmpURL, protocol, host, path, document, port, bookmark ); |
166 | 129 | if GikoSys.Is2chHost( host ) then begin |
@@ -168,6 +131,12 @@ begin | ||
168 | 131 | FItem := BBSs[ 0 ].FindBBSID( BBSID ); |
169 | 132 | if FItem <> nil then |
170 | 133 | 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; | |
171 | 140 | end; |
172 | 141 | { |
173 | 142 | // ※作っても、追加するカテゴリが無いので激しく保留 |
@@ -315,7 +284,7 @@ begin | ||
315 | 284 | FileName := GikoSys.GetConfigDir + FAVORITE_FILE_NAME; |
316 | 285 | |
317 | 286 | FavFolder := TFavoriteFolder.Create; |
318 | - Node := FTreeView.Items.AddChildObjectFirst(nil, FAVORITE_ROOT_NAME, FavFolder); | |
287 | + Node := FTreeView.Items.AddChildObject(nil, FAVORITE_ROOT_NAME, FavFolder); | |
319 | 288 | Node.ImageIndex := 14; |
320 | 289 | Node.SelectedIndex := 14; |
321 | 290 |
@@ -331,7 +300,7 @@ begin | ||
331 | 300 | FStack.Push(Node); |
332 | 301 | LinkExists := False; |
333 | 302 | 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 | |
335 | 304 | ReadNode(XMLNode.ChildNodes[i]); |
336 | 305 | if (XMLNode.ChildNodes[i].NodeName = 'folder') and |
337 | 306 | (XMLNode.ChildNodes[i].Attributes['title'] = FAVORITE_LINK_NAME) then begin |
@@ -341,7 +310,7 @@ begin | ||
341 | 310 | end; |
342 | 311 | if not LinkExists then begin |
343 | 312 | FavFolder := TFavoriteFolder.Create; |
344 | - Node := FTreeView.Items.AddChildObjectFirst(Node, FAVORITE_LINK_NAME, FavFolder); | |
313 | + Node := FTreeView.Items.AddChildObject(Node, FAVORITE_LINK_NAME, FavFolder); | |
345 | 314 | Node.ImageIndex := 14; |
346 | 315 | Node.SelectedIndex := 14; |
347 | 316 | end; |
@@ -355,7 +324,7 @@ begin | ||
355 | 324 | |
356 | 325 | { |
357 | 326 | FavFolder := TFavoriteFolder.Create; |
358 | - Node := FTreeView.Items.AddChildObjectFirst(nil, FAVORITE_ROOT_NAME, FavFolder); | |
327 | + Node := FTreeView.Items.AddChildObject(nil, FAVORITE_ROOT_NAME, FavFolder); | |
359 | 328 | Node.ImageIndex := 12; |
360 | 329 | Node.SelectedIndex := 13; |
361 | 330 |
@@ -391,16 +360,15 @@ begin | ||
391 | 360 | ParentNode := FStack.Peek; |
392 | 361 | if TObject(ParentNode.Data) is TFavoriteFolder then begin |
393 | 362 | FavFolder := TFavoriteFolder.Create; |
394 | - CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, Node.Attributes['title'], FavFolder); | |
363 | + CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavFolder); | |
395 | 364 | CurrentNode.ImageIndex := 14; |
396 | 365 | CurrentNode.SelectedIndex := 14; |
366 | + CurrentNode.Expanded := Node.Attributes[ 'expanded' ] = 'true'; | |
397 | 367 | FStack.Push(CurrentNode); |
398 | 368 | end; |
399 | - for i := Node.ChildNodes.Count - 1 downto 0 do begin | |
369 | + for i := 0 to Node.ChildNodes.Count - 1 do begin | |
400 | 370 | ReadNode(Node.ChildNodes[i]); |
401 | 371 | end; |
402 | - if TObject(ParentNode.Data) is TFavoriteFolder then | |
403 | - CurrentNode.Expanded := Node.Attributes[ 'expanded' ] = 'true'; | |
404 | 372 | if FStack.Count <> 0 then |
405 | 373 | FStack.Pop; |
406 | 374 | end else if Node.NodeName = 'favitem' then begin |
@@ -419,7 +387,7 @@ begin | ||
419 | 387 | FavBoard := TFavoriteBoardItem.Create( |
420 | 388 | Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], nil ); |
421 | 389 | end; |
422 | - CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, Node.Attributes['title'], FavBoard); | |
390 | + CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavBoard); | |
423 | 391 | CurrentNode.ImageIndex := 15; |
424 | 392 | CurrentNode.SelectedIndex := 15; |
425 | 393 | end else if Node.Attributes['favtype'] = 'thread' then begin |
@@ -446,7 +414,7 @@ begin | ||
446 | 414 | FavThread := TFavoriteThreadItem.Create( |
447 | 415 | Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], nil ); |
448 | 416 | end; |
449 | - CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, Node.Attributes['title'], FavThread); | |
417 | + CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavThread); | |
450 | 418 | CurrentNode.ImageIndex := 16; |
451 | 419 | CurrentNode.SelectedIndex := 16; |
452 | 420 | end; |
@@ -478,17 +446,11 @@ begin | ||
478 | 446 | XMLDoc.SaveToFile(FileName); |
479 | 447 | } |
480 | 448 | var |
481 | - FileName, tmpFileName: string; | |
449 | + FileName: string; | |
482 | 450 | SaveList: TStringList; |
483 | - | |
484 | 451 | begin |
485 | 452 | 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 ) ); | |
492 | 454 | SaveList := TStringList.Create; |
493 | 455 | try |
494 | 456 | SaveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>'); |
@@ -1,11 +1,11 @@ | ||
1 | 1 | object GikoForm: TGikoForm |
2 | - Left = 246 | |
3 | - Top = 188 | |
2 | + Left = 205 | |
3 | + Top = 186 | |
4 | 4 | HorzScrollBar.Visible = False |
5 | 5 | VertScrollBar.Visible = False |
6 | 6 | AutoScroll = False |
7 | 7 | Caption = '-' |
8 | - ClientHeight = 404 | |
8 | + ClientHeight = 545 | |
9 | 9 | ClientWidth = 854 |
10 | 10 | Color = clBtnFace |
11 | 11 | Font.Charset = SHIFTJIS_CHARSET |
@@ -16,9 +16,11 @@ object GikoForm: TGikoForm | ||
16 | 16 | KeyPreview = True |
17 | 17 | OldCreateOrder = False |
18 | 18 | Visible = True |
19 | + OnClose = FormClose | |
19 | 20 | OnCloseQuery = FormCloseQuery |
20 | 21 | OnCreate = FormCreate |
21 | 22 | OnDestroy = FormDestroy |
23 | + OnKeyUp = FormKeyUp | |
22 | 24 | OnMouseWheel = FormMouseWheel |
23 | 25 | OnResize = FormResize |
24 | 26 | OnShortCut = FormShortCut |
@@ -27,7 +29,7 @@ object GikoForm: TGikoForm | ||
27 | 29 | TextHeight = 12 |
28 | 30 | object StatusBar: TStatusBar |
29 | 31 | Left = 0 |
30 | - Top = 384 | |
32 | + Top = 525 | |
31 | 33 | Width = 854 |
32 | 34 | Height = 20 |
33 | 35 | Panels = < |
@@ -38,7 +40,11 @@ object GikoForm: TGikoForm | ||
38 | 40 | Width = 500 |
39 | 41 | end |
40 | 42 | item |
43 | + Style = psOwnerDraw | |
41 | 44 | Width = 50 |
45 | + end | |
46 | + item | |
47 | + Width = 100 | |
42 | 48 | end> |
43 | 49 | SimplePanel = False |
44 | 50 | OnResize = StatusBarResize |
@@ -47,13 +53,13 @@ object GikoForm: TGikoForm | ||
47 | 53 | Left = 0 |
48 | 54 | Top = 77 |
49 | 55 | Width = 854 |
50 | - Height = 307 | |
56 | + Height = 448 | |
51 | 57 | Align = alClient |
52 | 58 | BevelOuter = bvNone |
53 | 59 | TabOrder = 1 |
54 | 60 | object MessageSplitter: TSplitter |
55 | 61 | Left = 0 |
56 | - Top = 268 | |
62 | + Top = 409 | |
57 | 63 | Width = 854 |
58 | 64 | Height = 5 |
59 | 65 | Cursor = crVSplit |
@@ -66,7 +72,7 @@ object GikoForm: TGikoForm | ||
66 | 72 | Left = 0 |
67 | 73 | Top = 0 |
68 | 74 | Width = 854 |
69 | - Height = 268 | |
75 | + Height = 409 | |
70 | 76 | Align = alClient |
71 | 77 | BevelOuter = bvNone |
72 | 78 | TabOrder = 0 |
@@ -74,7 +80,7 @@ object GikoForm: TGikoForm | ||
74 | 80 | Left = 145 |
75 | 81 | Top = 0 |
76 | 82 | Width = 5 |
77 | - Height = 268 | |
83 | + Height = 409 | |
78 | 84 | Cursor = crHSplit |
79 | 85 | AutoSnap = False |
80 | 86 | ResizeStyle = rsUpdate |
@@ -83,7 +89,7 @@ object GikoForm: TGikoForm | ||
83 | 89 | Left = 0 |
84 | 90 | Top = 0 |
85 | 91 | Width = 145 |
86 | - Height = 268 | |
92 | + Height = 409 | |
87 | 93 | Align = alLeft |
88 | 94 | BevelOuter = bvNone |
89 | 95 | TabOrder = 0 |
@@ -270,7 +276,7 @@ object GikoForm: TGikoForm | ||
270 | 276 | Left = 150 |
271 | 277 | Top = 0 |
272 | 278 | Width = 704 |
273 | - Height = 268 | |
279 | + Height = 409 | |
274 | 280 | Align = alClient |
275 | 281 | BevelOuter = bvNone |
276 | 282 | TabOrder = 1 |
@@ -309,13 +315,13 @@ object GikoForm: TGikoForm | ||
309 | 315 | OwnerData = True |
310 | 316 | ReadOnly = True |
311 | 317 | RowSelect = True |
318 | + PopupMenu = ListPopupMenu | |
312 | 319 | SmallImages = ItemIcon16 |
313 | 320 | StateImages = StateIconImageList |
314 | 321 | TabOrder = 0 |
315 | 322 | ViewStyle = vsReport |
316 | 323 | OnAdvancedCustomDrawItem = ListViewAdvancedCustomDrawItem |
317 | 324 | OnColumnClick = ListViewColumnClick |
318 | - OnColumnRightClick = ListViewColumnRightClick | |
319 | 325 | OnCustomDraw = ListViewCustomDraw |
320 | 326 | OnData = ListViewData |
321 | 327 | OnDataFind = ListViewDataFind |
@@ -548,7 +554,7 @@ object GikoForm: TGikoForm | ||
548 | 554 | Left = 0 |
549 | 555 | Top = 194 |
550 | 556 | Width = 704 |
551 | - Height = 74 | |
557 | + Height = 215 | |
552 | 558 | Align = alClient |
553 | 559 | BevelOuter = bvNone |
554 | 560 | TabOrder = 1 |
@@ -556,7 +562,7 @@ object GikoForm: TGikoForm | ||
556 | 562 | Left = 0 |
557 | 563 | Top = 46 |
558 | 564 | Width = 704 |
559 | - Height = 8 | |
565 | + Height = 149 | |
560 | 566 | Align = alClient |
561 | 567 | BevelOuter = bvNone |
562 | 568 | UseDockManager = False |
@@ -566,7 +572,7 @@ object GikoForm: TGikoForm | ||
566 | 572 | Left = 0 |
567 | 573 | Top = 0 |
568 | 574 | Width = 704 |
569 | - Height = 8 | |
575 | + Height = 149 | |
570 | 576 | Align = alClient |
571 | 577 | TabOrder = 0 |
572 | 578 | OnEnter = BrowserEnter |
@@ -575,7 +581,7 @@ object GikoForm: TGikoForm | ||
575 | 581 | OnNewWindow2 = BrowserNewWindow2 |
576 | 582 | OnDocumentComplete = BrowserDocumentComplete |
577 | 583 | ControlData = { |
578 | - 4C000000C3480000D40000000000000000000000000000000000000000000000 | |
584 | + 4C000000C3480000660F00000000000000000000000000000000000000000000 | |
579 | 585 | 000000004C000000000000000000000001000000E0D057007335CF11AE690800 |
580 | 586 | 2B2E12620A000000000000004C0000000114020000000000C000000000000046 |
581 | 587 | 8000000000000000000000000000000000000000000000000000000000000000 |
@@ -584,7 +590,7 @@ object GikoForm: TGikoForm | ||
584 | 590 | end |
585 | 591 | object BrowserBottomPanel: TGikoPanel |
586 | 592 | Left = 0 |
587 | - Top = 54 | |
593 | + Top = 195 | |
588 | 594 | Width = 704 |
589 | 595 | Height = 20 |
590 | 596 | Align = alBottom |
@@ -862,7 +868,7 @@ object GikoForm: TGikoForm | ||
862 | 868 | end |
863 | 869 | object MessagePanel: TPanel |
864 | 870 | Left = 0 |
865 | - Top = 273 | |
871 | + Top = 414 | |
866 | 872 | Width = 854 |
867 | 873 | Height = 34 |
868 | 874 | Align = alBottom |
@@ -6009,7 +6015,7 @@ object GikoForm: TGikoForm | ||
6009 | 6015 | end |
6010 | 6016 | object ActionList: TActionList |
6011 | 6017 | Images = ToobarImageList |
6012 | - Left = 5 | |
6018 | + Left = 8 | |
6013 | 6019 | Top = 372 |
6014 | 6020 | object OnlyAHundredResAction: TAction |
6015 | 6021 | Category = #12473#12524#12483#12489 |
@@ -7065,20 +7071,6 @@ object GikoForm: TGikoForm | ||
7065 | 7071 | Hint = #12479#12502#12398#38918#30058#12434#33258#21205#24489#20803 |
7066 | 7072 | OnExecute = TabAutoLoadActionExecute |
7067 | 7073 | 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 | |
7082 | 7074 | end |
7083 | 7075 | object BrowserPopupMenu: TPopupMenu |
7084 | 7076 | Left = 68 |
@@ -7574,8 +7566,4 @@ object GikoForm: TGikoForm | ||
7574 | 7566 | AutoCheck = True |
7575 | 7567 | end |
7576 | 7568 | end |
7577 | - object ListColumnPopupMenu: TPopupMenu | |
7578 | - Left = 37 | |
7579 | - Top = 403 | |
7580 | - end | |
7581 | 7569 | end |
@@ -28,7 +28,6 @@ type | ||
28 | 28 | TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite); |
29 | 29 | TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser); |
30 | 30 | TMinimizeType = (mtNone, mtMinimizing, mtMinimized); |
31 | - TResizeType = (rtNone, rtResizing); | |
32 | 31 | |
33 | 32 | TBrowserRecord = class; |
34 | 33 |
@@ -528,7 +527,7 @@ type | ||
528 | 527 | N65: TMenuItem; |
529 | 528 | BBSSelectPopupMenu: TPopupMenu; |
530 | 529 | PlugInMenu: TMenuItem; |
531 | - TmpToolBar: TToolBar; | |
530 | + TmpToolBar: TToolBar; | |
532 | 531 | TreeSelectNameCopy: TAction; |
533 | 532 | TreeSelectNamePupupMenu: TMenuItem; |
534 | 533 | BrowserPanel: TPanel; |
@@ -551,7 +550,7 @@ type | ||
551 | 550 | OpenLogFolder: TMenuItem; |
552 | 551 | Browser: TWebBrowser; |
553 | 552 | TabSave: TMenuItem; |
554 | - TabOpen: TMenuItem; | |
553 | + TabOpen: TMenuItem; | |
555 | 554 | TabsSaveAction: TAction; |
556 | 555 | TabsOpenAction: TAction; |
557 | 556 | ResRangePopupMenu: TPopupMenu; |
@@ -574,14 +573,12 @@ type | ||
574 | 573 | N69: TMenuItem; |
575 | 574 | S7: TMenuItem; |
576 | 575 | ThreadRangeButton: TToolButton; |
577 | - TabAutoSaveAction: TAction; | |
576 | + TabAutoSaveAction: TAction; | |
578 | 577 | TabAutoLoadAction: TAction; |
579 | - ListColumnPopupMenu: TPopupMenu; | |
580 | - JumpToNumOfResAction: TAction; | |
581 | - FavoriteTreeViewCollapseAction: TAction; | |
582 | 578 | procedure FormCreate(Sender: TObject); |
583 | 579 | procedure FormDestroy(Sender: TObject); |
584 | 580 | procedure CabinetPanelHide(Sender: TObject); |
581 | + procedure FormClose(Sender: TObject; var Action: TCloseAction); | |
585 | 582 | procedure ListViewData(Sender: TObject; Item: TListItem); |
586 | 583 | procedure ListViewDataFind(Sender: TObject; Find: TItemFind; |
587 | 584 | const FindString: String; const FindPosition: TPoint; |
@@ -809,6 +806,8 @@ type | ||
809 | 806 | procedure SelectComboBoxExit(Sender: TObject); |
810 | 807 | procedure SelectResActionExecute(Sender: TObject); |
811 | 808 | procedure SelectResActionUpdate(Sender: TObject); |
809 | + procedure FormKeyUp(Sender: TObject; var Key: Word; | |
810 | + Shift: TShiftState); | |
812 | 811 | procedure AllResActionExecute(Sender: TObject); |
813 | 812 | procedure AllResActionUpdate(Sender: TObject); |
814 | 813 | procedure ReloadClick(Sender: TObject); |
@@ -873,7 +872,7 @@ type | ||
873 | 872 | var Handled: Boolean); |
874 | 873 | procedure KoreCopyExecute(Sender: TObject); |
875 | 874 | procedure BrowserTabPopupMenuPopup(Sender: TObject); |
876 | - procedure MenuToolBarResize(Sender: TObject); | |
875 | + procedure MenuToolBarResize(Sender: TObject); | |
877 | 876 | procedure StdToolBarResize(Sender: TObject); |
878 | 877 | procedure LinkToolBarResize(Sender: TObject); |
879 | 878 | procedure ListNameToolBarResize(Sender: TObject); |
@@ -896,7 +895,7 @@ type | ||
896 | 895 | procedure SetFocusForBrowserActionUpdate(Sender: TObject); |
897 | 896 | procedure SetFocusForThreadListActionExecute(Sender: TObject); |
898 | 897 | procedure SetFocusForCabinetActionExecute(Sender: TObject); |
899 | - procedure BrowserMaxAndFocusActionExecute(Sender: TObject); | |
898 | + procedure BrowserMaxAndFocusActionExecute(Sender: TObject); | |
900 | 899 | procedure BrowserMaxAndFocusActionUpdate(Sender: TObject); |
901 | 900 | procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject); |
902 | 901 | procedure ListViewExit(Sender: TObject); |
@@ -919,18 +918,13 @@ type | ||
919 | 918 | procedure OnlyAHundredResActionExecute(Sender: TObject); |
920 | 919 | procedure OnlyKokoResActionExecute(Sender: TObject); |
921 | 920 | procedure OnlyNewResActionExecute(Sender: TObject); |
922 | - procedure BrowsBoradHeadActionExecute(Sender: TObject); | |
921 | + procedure BrowsBoradHeadActionExecute(Sender: TObject); | |
923 | 922 | procedure BrowsBoradHeadActionUpdate(Sender: TObject); |
924 | 923 | procedure EditNGActionExecute(Sender: TObject); |
925 | 924 | procedure ThreadRangeActionUpdate(Sender: TObject); |
926 | 925 | procedure ThreadRangeActionExecute(Sender: TObject); |
927 | - procedure TabAutoSaveActionExecute(Sender: TObject); | |
926 | + procedure TabAutoSaveActionExecute(Sender: TObject); | |
928 | 927 | 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); | |
934 | 928 | private |
935 | 929 | { Private 宣言 } |
936 | 930 | //RoundList : TRoundList; |
@@ -978,24 +972,22 @@ type | ||
978 | 972 | |
979 | 973 | FDropSpaceNode: TTreeNode; |
980 | 974 | |
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用 | |
984 | 978 | |
985 | - FListViewBackGroundColor : TColor; ///< ListViewのBackGroundColor | |
986 | - FUseOddResOddColor : Boolean; ///< 取得レス数とスレッドのレス数が違ったときに他の色で表示 | |
987 | - FOddColor : TColor; ///< その色 | |
979 | + FListViewBackGroundColor : TColor; //ListViewのBackGroundColor | |
980 | + FUseOddResOddColor : Boolean; //取得レス数とスレッドのレス数が違ったときに他の色で表示 | |
981 | + FOddColor : TColor; //その色 | |
988 | 982 | |
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; // ブラウザタブでマウスを押したときの座標 | |
995 | 989 | FBrowsers: TList; |
996 | - FResRangeMenuSelect : Longint; ///< ResRangeButton で選択されている項目 (フォーマットは ResRange 互換) | |
997 | - FStartUp : Boolean; | |
998 | - FIsHandledWheel : Boolean; ///< 既に受け取った WM_MOUSEWHEEL かどうか | |
990 | + FResRangeMenuSelect : Longint; ///< ResRangeButton で選択されている項目 (フォーマットは ResRange 互換) | |
999 | 991 | procedure SetBoardTreeNode( inBBS : TBBS ); |
1000 | 992 | function SetCategoryListItem(ABBS2ch: TBBS): Integer; |
1001 | 993 | function SetBoardListItem(Category: TCategory): Integer; |
@@ -1008,7 +1000,7 @@ type | ||
1008 | 1000 | procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer); |
1009 | 1001 | procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer); |
1010 | 1002 | |
1011 | - | |
1003 | + procedure SetActiveList(Obj: TObject); | |
1012 | 1004 | procedure ListClick; |
1013 | 1005 | procedure ListDoubleClick(Shift: TShiftState); |
1014 | 1006 | procedure BrowserMovement(const AName: string); overload; |
@@ -1059,41 +1051,37 @@ type | ||
1059 | 1051 | procedure BBSMenuItemOnClick( Sender : TObject ); |
1060 | 1052 | // |
1061 | 1053 | procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean); |
1062 | - /// CoolBar の設定を変数に保存 | |
1054 | + // CoolBar の設定を変数に保存 | |
1063 | 1055 | procedure SaveCoolBarSettings; |
1064 | - /// CoolBar の設定を変数から復元 | |
1056 | + // CoolBar の設定を変数から復元 | |
1065 | 1057 | procedure LoadCoolBarSettings; |
1066 | - /// 最小化される | |
1058 | + // 最小化される | |
1067 | 1059 | procedure OnMinimize; |
1068 | - /// 最小化された | |
1060 | + // 最小化された | |
1069 | 1061 | procedure OnMinimized; |
1070 | - /// CoolBar がサイズ変更された | |
1062 | + // CoolBar がサイズ変更された | |
1071 | 1063 | procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar); |
1072 | - /// TreeView がクリックされた | |
1064 | + // TreeView がクリックされた | |
1073 | 1065 | procedure TreeClick( Node : TTreeNode ); |
1074 | - /// TreeView がダブルクリックされた | |
1066 | + // TreeView がダブルクリックされた | |
1075 | 1067 | procedure TreeDoubleClick( Node : TTreeNode ); |
1076 | - /// ギコナビのメッセージループを横取りします | |
1068 | + // ギコナビのメッセージループを横取りします | |
1077 | 1069 | procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean); |
1078 | - /// ブラウザのキーダウンイベント | |
1079 | - /// イベントを取り扱った場合は True を返す | |
1070 | + // ブラウザのキーダウンイベント | |
1071 | + // イベントを取り扱った場合は True を返す | |
1080 | 1072 | function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean; |
1081 | - /// 各所にあるキャビネット・ BBS メニューをセット/更新 | |
1073 | + // 各所にあるキャビネット・ BBS メニューをセット/更新 | |
1082 | 1074 | procedure SetBBSMenu; |
1083 | 1075 | function WebBrowserClick(Sender: TObject): WordBool; |
1084 | 1076 | procedure SkinorCSSFilesCopy(path: string); |
1085 | - /// タブ取得 | |
1077 | + // タブ取得 | |
1086 | 1078 | function GetTabURLs(AStringList: TStringList) : Boolean; |
1087 | - /// タブ保存 | |
1079 | + // タブ保存 | |
1088 | 1080 | function SaveTabURLs : Boolean; |
1089 | - /// タブ読み出し | |
1081 | + // タブ読み出し | |
1090 | 1082 | function LoadTabURLs : Boolean; |
1091 | - /// バンド幅を再計算・再設定する | |
1083 | + // バンド幅を再計算・再設定する | |
1092 | 1084 | procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar ); |
1093 | - /// ListView の Column を真のカラムに変換 | |
1094 | - function ActiveListTrueColumn( column : TListColumn ) : TListColumn; | |
1095 | - /// ListColumnPopupMenu アイテムのクリックイベント | |
1096 | - procedure ListColumnPopupMenuOnClick( Sender : TObject ); | |
1097 | 1085 | protected |
1098 | 1086 | procedure CreateParams(var Params: TCreateParams); override; |
1099 | 1087 | procedure WndProc(var Message: TMessage); override; |
@@ -1105,11 +1093,8 @@ type | ||
1105 | 1093 | { Public 宣言 } |
1106 | 1094 | // FDownload: TDownload; |
1107 | 1095 | 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); | |
1113 | 1098 | procedure ReloadBBS; |
1114 | 1099 | function GetHttpState: Boolean; |
1115 | 1100 | procedure SetEnabledCloseButton(Enabled: Boolean); |
@@ -1129,7 +1114,7 @@ type | ||
1129 | 1114 | function GetActiveContent: TThreadItem; |
1130 | 1115 | function GetActiveList: TObject; |
1131 | 1116 | |
1132 | - | |
1117 | + property ActiveList: TObject read GetActiveList write SetActiveList; | |
1133 | 1118 | // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime; |
1134 | 1119 | |
1135 | 1120 | procedure SetListViewType(AViewType: TGikoViewType); overload; |
@@ -1153,19 +1138,16 @@ type | ||
1153 | 1138 | // property Favorite: TFavorite read FFavorite write FFavorite; |
1154 | 1139 | procedure SetToolBarPopup; |
1155 | 1140 | 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); | |
1158 | 1143 | property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor; |
1159 | 1144 | property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor; |
1160 | 1145 | property OddColor : TColor read FOddColor write FOddColor; |
1161 | 1146 | |
1162 | 1147 | function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton; |
1163 | 1148 | 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 | + | |
1169 | 1151 | published |
1170 | 1152 | property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton; |
1171 | 1153 | end; |
@@ -1194,18 +1176,18 @@ type | ||
1194 | 1176 | TBrowserRecord = class( TObject ) |
1195 | 1177 | private |
1196 | 1178 | FBrowser : TWebBrowser; |
1197 | - FEvent: THTMLDocumentEventSink; //!< ブラウザドキュメントイベント | |
1179 | + FEvent: THTMLDocumentEventSink;//ブラウザドキュメントイベント | |
1198 | 1180 | FThread : TThreadItem; |
1199 | 1181 | FLastSize : Integer; |
1200 | 1182 | FRepaint : Boolean; |
1201 | - FMovement : string; //!< スクロール先アンカー | |
1183 | + // FOnlyHundred: Boolean; | |
1202 | 1184 | public |
1203 | 1185 | destructor Destroy; override; |
1204 | 1186 | property Browser : TWebBrowser read FBrowser write FBrowser; |
1205 | 1187 | property Thread : TThreadItem read FThread write FThread; |
1206 | 1188 | property LastSize : Integer read FLastSize write FLastSize; |
1207 | 1189 | property Repaint : Boolean read FRepaint write FRepaint; |
1208 | - property Movement : string read FMovement write FMovement; | |
1190 | +// property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred; | |
1209 | 1191 | end; |
1210 | 1192 | |
1211 | 1193 | var |
@@ -1266,7 +1248,6 @@ const | ||
1266 | 1248 | USER_RESIZED = WM_USER + 2001; |
1267 | 1249 | USER_MINIMIZED = WM_USER + 2002; |
1268 | 1250 | USER_SETLINKBAR = WM_USER + 2003; |
1269 | - USER_DOCUMENTCOMPLETE = WM_USER + 2004; ///< wParam : TWebBrowser | |
1270 | 1251 | SELECTTIME_INTERBAL = 110; |
1271 | 1252 | |
1272 | 1253 | BROWSER_COUNT = 5; //ブラウザの数 |
@@ -1304,12 +1285,11 @@ begin | ||
1304 | 1285 | Writeln(' 終了時は、ギコナビウィンドウを閉じてください'); |
1305 | 1286 | Writeln('============================================================'); |
1306 | 1287 | {$ENDIF} |
1307 | - FStartUp := false; | |
1308 | 1288 | Application.OnDeactivate := AppFormDeactivate; |
1309 | 1289 | Self.OnDeactivate := AppFormDeactivate; |
1310 | 1290 | Application.HookMainWindow(Hook); |
1311 | 1291 | Application.OnMessage := HandleAppMessage; //なんか無くても大丈夫になった by もじゅ |
1312 | -// Self.DoubleBuffered := true; | |
1292 | + Self.DoubleBuffered := true; | |
1313 | 1293 | FTreeType := gttNone; |
1314 | 1294 | |
1315 | 1295 | FSearchDialog := nil; |
@@ -1324,14 +1304,13 @@ begin | ||
1324 | 1304 | newBrowser.Align := alNone; |
1325 | 1305 | newBrowser.Left := 0; |
1326 | 1306 | newBrowser.Top := 0; |
1327 | - newBrowser.StatusBar := false; | |
1328 | - newBrowser.MenuBar := false; | |
1329 | - newBrowser.AddressBar := false; | |
1307 | + //newBrowser.DoubleBuffered := true; | |
1330 | 1308 | newBrowser.OnDocumentComplete := BrowserDocumentComplete; |
1331 | 1309 | newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2; |
1332 | 1310 | newBrowser.OnEnter := BrowserEnter; |
1333 | 1311 | newBrowser.OnNewWindow2 := BrowserNewWindow2; |
1334 | 1312 | newBrowser.OnStatusTextChange := BrowserStatusTextChange; |
1313 | + //newBrowser.OnTitleChange := BrowserTitleChange; | |
1335 | 1314 | newBrowser.Navigate(BLANK_HTML); |
1336 | 1315 | ShowWindow(newBrowser.Handle, SW_HIDE); |
1337 | 1316 |
@@ -1340,7 +1319,7 @@ begin | ||
1340 | 1319 | ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW); |
1341 | 1320 | |
1342 | 1321 | // 起動時に保存されてしまう対策 |
1343 | - FIsIgnoreResize := rtResizing; | |
1322 | + FIsIgnoreResize := True; | |
1344 | 1323 | |
1345 | 1324 | //手のカーソル |
1346 | 1325 | Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND'); |
@@ -1349,8 +1328,38 @@ begin | ||
1349 | 1328 | //アドレス履歴読み込み |
1350 | 1329 | AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount); |
1351 | 1330 | |
1331 | + // 外部板プラグインをロード(ReadBoardFile, LoadHistory より先に行うこと) | |
1332 | + InitializeBoardPlugIns; | |
1333 | + | |
1352 | 1334 | EnabledCloseButton := True; |
1353 | 1335 | |
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 | + | |
1354 | 1363 | //リストスタイル |
1355 | 1364 | ListView.ViewStyle := GikoSys.Setting.ListStyle; |
1356 | 1365 |
@@ -1394,8 +1403,8 @@ begin | ||
1394 | 1403 | ListView.Font.Name := GikoSys.Setting.ListFontName; |
1395 | 1404 | ListView.Font.Size := GikoSys.Setting.ListFontSize; |
1396 | 1405 | 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; | |
1399 | 1408 | FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum; |
1400 | 1409 | FOddColor := GikoSys.Setting.OddColor; |
1401 | 1410 |
@@ -1463,35 +1472,6 @@ begin | ||
1463 | 1472 | FBrowserSizeHeight := GikoSys.Setting.ListHeight; |
1464 | 1473 | FBrowserSizeWidth := GikoSys.Setting.ListWidth; |
1465 | 1474 | |
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 | - | |
1495 | 1475 | ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical); |
1496 | 1476 | ArrangeAction.Execute; |
1497 | 1477 |
@@ -1688,7 +1668,7 @@ begin | ||
1688 | 1668 | if GikoSys.Setting.CabinetIndex < Length( BBSs ) then |
1689 | 1669 | ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] ); |
1690 | 1670 | // 起動時に保存されてしまう対策 2 |
1691 | - FIsIgnoreResize := rtResizing; | |
1671 | + FIsIgnoreResize := True; | |
1692 | 1672 | CabinetBBSAction.Execute; |
1693 | 1673 | end; |
1694 | 1674 | end else begin |
@@ -1697,7 +1677,7 @@ begin | ||
1697 | 1677 | end; |
1698 | 1678 | |
1699 | 1679 | // 起動時に保存されてしまう対策 3 |
1700 | - FIsIgnoreResize := rtResizing; | |
1680 | + FIsIgnoreResize := True; | |
1701 | 1681 | |
1702 | 1682 | //オートログイン |
1703 | 1683 | if GikoSys.Setting.AutoLogin then |
@@ -1721,7 +1701,7 @@ begin | ||
1721 | 1701 | //Samba24のファイルチェック |
1722 | 1702 | GikoSys.SambaFileExists(); |
1723 | 1703 | |
1724 | - //にちゃん語ファイル読み出し | |
1704 | + //タブ自動読み込み (AV発生のため一時封印) | |
1725 | 1705 | end; |
1726 | 1706 | |
1727 | 1707 | // CoolBar の設定を変数に保存 |
@@ -1731,7 +1711,7 @@ var | ||
1731 | 1711 | CoolSet : TCoolSet; |
1732 | 1712 | begin |
1733 | 1713 | |
1734 | - if IsIconic( Handle ) or (FIsIgnoreResize <> rtNone) then | |
1714 | + if IsIconic( Handle ) or FIsIgnoreResize then | |
1735 | 1715 | Exit; |
1736 | 1716 | |
1737 | 1717 | //クールバー保存(Main) |
@@ -1772,7 +1752,7 @@ begin | ||
1772 | 1752 | for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin |
1773 | 1753 | CoolSet := GikoSys.Setting.MainCoolSet[i]; |
1774 | 1754 | if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin |
1775 | - FIsIgnoreResize := rtNone; | |
1755 | + FIsIgnoreResize := False; | |
1776 | 1756 | SaveCoolBarSettings; |
1777 | 1757 | Exit; |
1778 | 1758 | end; |
@@ -1791,7 +1771,7 @@ begin | ||
1791 | 1771 | for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin |
1792 | 1772 | CoolSet := GikoSys.Setting.ListCoolSet[i]; |
1793 | 1773 | if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin |
1794 | - FIsIgnoreResize := rtNone; | |
1774 | + FIsIgnoreResize := False; | |
1795 | 1775 | SaveCoolBarSettings; |
1796 | 1776 | Exit; |
1797 | 1777 | end; |
@@ -1810,7 +1790,7 @@ begin | ||
1810 | 1790 | for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin |
1811 | 1791 | CoolSet := GikoSys.Setting.BrowserCoolSet[i]; |
1812 | 1792 | if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin |
1813 | - FIsIgnoreResize := rtNone; | |
1793 | + FIsIgnoreResize := False; | |
1814 | 1794 | SaveCoolBarSettings; |
1815 | 1795 | Exit; |
1816 | 1796 | end; |
@@ -1829,70 +1809,59 @@ end; | ||
1829 | 1809 | // |
1830 | 1810 | procedure TGikoForm.FormShow(Sender: TObject); |
1831 | 1811 | 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; | |
1877 | 1842 | |
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; | |
1880 | 1853 | |
1881 | - FIsIgnoreResize := rtNone; | |
1854 | + // CoolBar 復元 | |
1855 | + LoadCoolBarSettings; | |
1882 | 1856 | |
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; | |
1893 | 1858 | |
1894 | - FStartUp := true; | |
1859 | + //TabAutoLoad | |
1860 | + //FormCreteから移動。 | |
1861 | + if GikoSys.Setting.TabAutoLoadSave then begin | |
1862 | + TabAutoLoadAction.Execute; | |
1895 | 1863 | end; |
1864 | + | |
1896 | 1865 | end; |
1897 | 1866 | |
1898 | 1867 | procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
@@ -1924,7 +1893,17 @@ begin | ||
1924 | 1893 | // Application.OnDeactivate := nil; |
1925 | 1894 | // Self.OnDeactivate := nil; |
1926 | 1895 | 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; | |
1928 | 1907 | except |
1929 | 1908 | end; |
1930 | 1909 | try |
@@ -2101,6 +2080,10 @@ begin | ||
2101 | 2080 | |
2102 | 2081 | end; |
2103 | 2082 | |
2083 | +//フォームクローズ | |
2084 | +procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction); | |
2085 | +begin | |
2086 | +end; | |
2104 | 2087 | //キャビネット×ボタンクリック |
2105 | 2088 | procedure TGikoForm.CabinetPanelHide(Sender: TObject); |
2106 | 2089 | begin |
@@ -2238,9 +2221,9 @@ begin | ||
2238 | 2221 | Root.ImageIndex := ITEM_ICON_2CH1; |
2239 | 2222 | Root.SelectedIndex := ITEM_ICON_2CH2; |
2240 | 2223 | Root.Data := inBBS; |
2241 | - for i := inBBS.Count - 1 downto 0 do begin | |
2224 | + for i := 0 to inBBS.Count - 1 do begin | |
2242 | 2225 | Category := TCategory(inBBS.Items[i]); |
2243 | - CategoryNode := TreeView.Items.AddChildFirst(Root, Category.Title); | |
2226 | + CategoryNode := TreeView.Items.AddChild(Root, Category.Title); | |
2244 | 2227 | CategoryNode.Data := Category; |
2245 | 2228 | CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1; |
2246 | 2229 | CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2; |
@@ -2253,10 +2236,10 @@ begin | ||
2253 | 2236 | Category.CustomSort(BoardSortProc); |
2254 | 2237 | end; |
2255 | 2238 | |
2256 | - for j := Category.Count - 1 downto 0 do begin | |
2239 | + for j := 0 to Category.Count - 1 do begin | |
2257 | 2240 | Board := TBoard(Category.Items[j]); |
2258 | 2241 | Board.BeginUpdate; |
2259 | - BoardNode := TreeView.Items.AddChildFirst(CategoryNode, Board.Title); | |
2242 | + BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title); | |
2260 | 2243 | BoardNode.Data := Board; |
2261 | 2244 | //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin |
2262 | 2245 | if not Board.IsLogFile then begin |
@@ -2290,37 +2273,22 @@ begin | ||
2290 | 2273 | end; |
2291 | 2274 | |
2292 | 2275 | function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer; |
2276 | +const | |
2277 | + COLUMN: array[0..0] of string = ('カテゴリ名'); | |
2293 | 2278 | var |
2294 | - TitleColumn : TListColumn; | |
2295 | - ListColumn : TListColumn; | |
2296 | - i, id, idx : Integer; | |
2279 | + ListColumn: TListColumn; | |
2280 | + i: Integer; | |
2297 | 2281 | begin |
2298 | 2282 | ListView.Items.BeginUpdate; |
2299 | 2283 | try |
2300 | 2284 | Screen.Cursor := crHourGlass; |
2301 | 2285 | |
2302 | 2286 | 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]; | |
2322 | 2291 | end; |
2323 | - TitleColumn.Index := idx; | |
2324 | 2292 | |
2325 | 2293 | ListView.Items.Count := 0; |
2326 | 2294 | ListView.Items.Clear; |
@@ -2341,11 +2309,8 @@ begin | ||
2341 | 2309 | |
2342 | 2310 | FSortIndex := GikoSys.Setting.BBSSortIndex; |
2343 | 2311 | 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]); | |
2349 | 2314 | |
2350 | 2315 | Result := ABBS2ch.Count; |
2351 | 2316 | finally |
@@ -2355,37 +2320,22 @@ begin | ||
2355 | 2320 | end; |
2356 | 2321 | |
2357 | 2322 | function TGikoForm.SetBoardListItem(Category: TCategory): Integer; |
2323 | +const | |
2324 | + COLUMN: array[0..2] of string = ('板名', '巡回予約', '取得日時'); | |
2358 | 2325 | var |
2359 | - TitleColumn : TListColumn; | |
2360 | - ListColumn : TListColumn; | |
2361 | - i, id, idx : Integer; | |
2326 | + ListColumn: TListColumn; | |
2327 | + i: Integer; | |
2362 | 2328 | begin |
2363 | 2329 | ListView.Items.BeginUpdate; |
2364 | 2330 | try |
2365 | 2331 | Screen.Cursor := crHourGlass; |
2366 | 2332 | |
2367 | 2333 | 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]; | |
2387 | 2338 | end; |
2388 | - TitleColumn.Index := idx; | |
2389 | 2339 | |
2390 | 2340 | ListView.Items.Count := 0; |
2391 | 2341 | ListView.Items.Clear; |
@@ -2406,11 +2356,8 @@ begin | ||
2406 | 2356 | |
2407 | 2357 | FSortIndex := GikoSys.Setting.CategorySortIndex; |
2408 | 2358 | 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]); | |
2414 | 2361 | |
2415 | 2362 | Result := Category.Count; |
2416 | 2363 | finally |
@@ -2420,45 +2367,39 @@ begin | ||
2420 | 2367 | end; |
2421 | 2368 | |
2422 | 2369 | 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; | |
2427 | 2382 | begin |
2428 | 2383 | ListView.Items.BeginUpdate; |
2429 | 2384 | try |
2430 | 2385 | Screen.Cursor := crHourGlass; |
2431 | 2386 | |
2432 | -{* | |
2433 | 2387 | // チラつき防止のため、変更されている場合のみ |
2434 | 2388 | // ※名称は違うがカラム数が同じ、といった場合に対処できないので注意 |
2435 | - if ListView.Columns.Count <> GikoSys.Setting.BoardColumnOrder.Count then | |
2436 | -*} | |
2389 | + if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then | |
2437 | 2390 | begin |
2438 | 2391 | 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]; | |
2459 | 2397 | end; |
2460 | - TitleColumn.Index := idx; | |
2461 | 2398 | end; |
2399 | + if GikoSys.Setting.NonAcquiredCount then | |
2400 | + ListView.Columns[2].Caption := COLUMN_NONACQUIREDCOUNT | |
2401 | + else | |
2402 | + ListView.Columns[2].Caption := COLUMN[2]; | |
2462 | 2403 | |
2463 | 2404 | ListView.Items.Count := 0; |
2464 | 2405 | ListView.Items.Clear; |
@@ -2476,11 +2417,8 @@ begin | ||
2476 | 2417 | |
2477 | 2418 | FSortIndex := GikoSys.Setting.BoardSortIndex; |
2478 | 2419 | 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]); | |
2484 | 2422 | |
2485 | 2423 | Result := Board.Count; |
2486 | 2424 | finally |
@@ -2500,11 +2438,9 @@ var | ||
2500 | 2438 | ThreadItem: TThreadItem; |
2501 | 2439 | RepStr: string; |
2502 | 2440 | ActivListObj : TObject; |
2503 | - i, idx : Integer; | |
2504 | 2441 | begin |
2505 | 2442 | ActivListObj := ActiveList; |
2506 | 2443 | if ActivListObj is TBBS then begin |
2507 | - //===== カテゴリリスト ===== | |
2508 | 2444 | BBS := TBBS(ActivListObj); |
2509 | 2445 | |
2510 | 2446 | ListView.StateImages := nil; |
@@ -2527,10 +2463,7 @@ begin | ||
2527 | 2463 | |
2528 | 2464 | Item.ImageIndex := ITEM_ICON_CATEGORY1; |
2529 | 2465 | Item.Data := Category; |
2530 | - | |
2531 | 2466 | end else if ActivListObj is TCategory then begin |
2532 | - | |
2533 | - //===== 板リスト ===== | |
2534 | 2467 | Category := TCategory(ActivListObj); |
2535 | 2468 | |
2536 | 2469 | ListView.StateImages := nil; |
@@ -2551,44 +2484,25 @@ begin | ||
2551 | 2484 | else |
2552 | 2485 | Item.Caption := Board.Title; |
2553 | 2486 | |
2554 | - if Item.SubItems.Count <> ListView.Columns.Count then begin | |
2487 | + if Item.SubItems.Count <> 2 then begin | |
2555 | 2488 | 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(''); | |
2558 | 2491 | end; |
2559 | 2492 | |
2560 | 2493 | Item.ImageIndex := ITEM_ICON_BOARD1; |
2561 | 2494 | |
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] := ''; | |
2586 | 2499 | |
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); | |
2587 | 2504 | Item.Data := Board; |
2588 | - | |
2589 | 2505 | end else if ActivListObj is TBoard then begin |
2590 | - | |
2591 | - //===== スレリスト ===== | |
2592 | 2506 | Board := TBoard(ActivListObj); |
2593 | 2507 | |
2594 | 2508 | if GikoSys.Setting.ListIconVisible then |
@@ -2634,10 +2548,15 @@ begin | ||
2634 | 2548 | RepStr := CustomStringReplace(RepStr, '&', '&' ); |
2635 | 2549 | //RepStr := StringReplace(RepStr, '@`', ',', [rfReplaceAll]); |
2636 | 2550 | |
2637 | - if Item.SubItems.Count <> ListView.Columns.Count then begin | |
2551 | + if Item.SubItems.Count <> 7 then begin | |
2638 | 2552 | 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(''); | |
2641 | 2560 | end; |
2642 | 2561 | |
2643 | 2562 | if ListNumberVisibleAction.Checked then |
@@ -2653,105 +2572,49 @@ begin | ||
2653 | 2572 | end; |
2654 | 2573 | |
2655 | 2574 | 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) | |
2715 | 2579 | 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); | |
2740 | 2600 | |
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); | |
2746 | 2614 | |
2747 | - if ThreadItem.NewArrival then | |
2748 | - Item.ImageIndex := ITEM_ICON_THREADNEW1 | |
2749 | - else | |
2750 | - Item.ImageIndex := ITEM_ICON_THREAD1; | |
2751 | 2615 | end; |
2752 | 2616 | |
2753 | 2617 | Item.Data := ThreadItem; |
2754 | - | |
2755 | 2618 | end; |
2756 | 2619 | end; |
2757 | 2620 |
@@ -2794,7 +2657,7 @@ var | ||
2794 | 2657 | ActiveFileName: string; |
2795 | 2658 | e: IHTMLElement; |
2796 | 2659 | Ext: string; |
2797 | - buf, buf2: string; | |
2660 | + buf: string; | |
2798 | 2661 | PathRec: TPathRec; |
2799 | 2662 | begin |
2800 | 2663 | if not( TObject(Sender) is TWebBrowser )then |
@@ -2877,43 +2740,30 @@ begin | ||
2877 | 2740 | end else begin |
2878 | 2741 | threadItem := GetActiveContent; |
2879 | 2742 | 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); | |
2891 | 2753 | 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)); | |
2905 | 2756 | end; |
2757 | + URL := URL + buf; | |
2906 | 2758 | end else begin |
2907 | 2759 | URL := Text; |
2908 | 2760 | end; |
2909 | - | |
2910 | 2761 | PathRec := Gikosys.Parse2chURL2(URL); |
2911 | 2762 | if (PathRec.FNoParam) then begin |
2912 | 2763 | PathRec.FSt := 1; |
2913 | 2764 | PathRec.FTo := 1; |
2914 | - end else begin | |
2765 | + end else | |
2915 | 2766 | Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo); |
2916 | - end; | |
2917 | 2767 | GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark ); |
2918 | 2768 | |
2919 | 2769 | if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin |
@@ -2940,10 +2790,10 @@ begin | ||
2940 | 2790 | // wkIntTo := 1; |
2941 | 2791 | //if PathRec.FFirst then |
2942 | 2792 | // 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; | |
2947 | 2797 | |
2948 | 2798 | //ATitle := ActiveFileName <> PathRec.FKey; |
2949 | 2799 | if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then |
@@ -3013,44 +2863,22 @@ end; | ||
3013 | 2863 | |
3014 | 2864 | procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word; |
3015 | 2865 | Shift: TShiftState); |
3016 | -var | |
3017 | - pos : TPoint; | |
3018 | 2866 | begin |
3019 | 2867 | 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; | |
3036 | 2874 | end; |
3037 | 2875 | 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); | |
3054 | 2882 | end; |
3055 | 2883 | end; |
3056 | 2884 | end; |
@@ -3060,95 +2888,29 @@ begin | ||
3060 | 2888 | Result := FHttpState; |
3061 | 2889 | end; |
3062 | 2890 | |
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 | - | |
3107 | 2891 | procedure TGikoForm.ListViewColumnClick(Sender: TObject; |
3108 | 2892 | Column: TListColumn); |
3109 | -var | |
3110 | - id, idx : Integer; | |
3111 | - orderList : TList; | |
3112 | 2893 | 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 | |
3127 | 2895 | FSortOrder := not FSortOrder |
3128 | 2896 | else |
3129 | 2897 | FSortOrder := False; |
3130 | - | |
3131 | 2898 | ListViewSort(Sender, Column); |
3132 | 2899 | end; |
3133 | 2900 | |
3134 | 2901 | procedure TGikoForm.ListViewSort(Sender: TObject; Column: TListColumn); |
3135 | 2902 | var |
3136 | - i, id, idx : Integer; | |
3137 | - orderList : TList; | |
2903 | + i: Integer; | |
3138 | 2904 | wkBBS: TBBS; |
3139 | 2905 | wkCategory: TCategory; |
3140 | 2906 | wkBoard: TBoard; |
3141 | 2907 | 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 | |
3145 | 2909 | ListView.Column[i].ImageIndex := -1; |
3146 | - end; | |
3147 | - | |
3148 | 2910 | if FSortOrder then |
3149 | - ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT1 | |
2911 | + ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1 | |
3150 | 2912 | else |
3151 | - ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT2; | |
2913 | + ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2; | |
3152 | 2914 | |
3153 | 2915 | Sort.SortNoFlag := ListNumberVisibleAction.Checked; |
3154 | 2916 |
@@ -3156,41 +2918,35 @@ begin | ||
3156 | 2918 | if TObject( FActiveList ) is TBBS then begin |
3157 | 2919 | //wkBBS := TBBS(TreeView.Selected.Data); |
3158 | 2920 | wkBBS := TBBS( FActiveList ); |
3159 | - orderList := GikoSys.Setting.BBSColumnOrder; | |
3160 | - id := Integer( orderList[ idx ] ); | |
3161 | 2921 | Sort.SortOrder := FSortOrder; |
3162 | - Sort.SortIndex := id; | |
3163 | - GikoSys.Setting.BBSSortIndex := id; | |
2922 | + Sort.SortIndex := Column.Index; | |
2923 | + GikoSys.Setting.BBSSortIndex := Column.Index; | |
3164 | 2924 | GikoSys.Setting.BBSSortOrder := FSortOrder; |
3165 | 2925 | wkBBS.Sort(CategorySortProc); |
2926 | + ListView.Refresh; | |
3166 | 2927 | //end else if TObject(TreeView.Selected.Data) is TCategory then begin |
3167 | 2928 | end else if TObject( FActiveList ) is TCategory then begin |
3168 | 2929 | //wkCategory := TCategory(TreeView.Selected.Data); |
3169 | 2930 | wkCategory := TCategory( FActiveList ); |
3170 | - orderList := GikoSys.Setting.CategoryColumnOrder; | |
3171 | - id := Integer( orderList[ idx ] ); | |
3172 | 2931 | Sort.SortOrder := FSortOrder; |
3173 | - Sort.SortIndex := id; | |
3174 | - GikoSys.Setting.CategorySortIndex := id; | |
2932 | + Sort.SortIndex := Column.Index; | |
2933 | + GikoSys.Setting.CategorySortIndex := Column.Index; | |
3175 | 2934 | GikoSys.Setting.CategorySortOrder := FSortOrder; |
3176 | 2935 | wkCategory.CustomSort(BoardSortProc); |
2936 | + ListView.Refresh; | |
3177 | 2937 | //end else if TObject(TreeView.Selected.Data) is TBoard then begin |
3178 | 2938 | end else if TObject( FActiveList ) is TBoard then begin |
3179 | 2939 | //wkBoard := TBoard(TreeView.Selected.Data); |
3180 | 2940 | wkBoard := TBoard( FActiveList ); |
3181 | - orderList := GikoSys.Setting.BoardColumnOrder; | |
3182 | - id := Integer( orderList[ idx ] ); | |
3183 | 2941 | 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; | |
3186 | 2945 | GikoSys.Setting.BoardSortOrder := FSortOrder; |
3187 | 2946 | wkBoard.CustomSort(ThreadItemSortProc); |
3188 | - end else begin | |
3189 | - id := 0; | |
2947 | + ListView.Refresh; | |
3190 | 2948 | end; |
3191 | - | |
3192 | - ListView.Refresh; | |
3193 | - FSortIndex := id; | |
2949 | + FSortIndex := Column.Index; | |
3194 | 2950 | end; |
3195 | 2951 | |
3196 | 2952 | procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar; |
@@ -3264,10 +3020,10 @@ begin | ||
3264 | 3020 | if TObject(Item.Data) is TThreadItem then begin |
3265 | 3021 | ThreadItem := TThreadItem(Item.Data); |
3266 | 3022 | 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; | |
3271 | 3027 | // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then |
3272 | 3028 | if ThreadItem.UnRead then |
3273 | 3029 | TListView(Sender).Canvas.Font.Style := [fsBold]; |
@@ -3459,7 +3215,6 @@ var | ||
3459 | 3215 | s: string; |
3460 | 3216 | boardPlugIn : TBoardPlugIn; |
3461 | 3217 | i: Integer; |
3462 | - browserRec : TBrowserRecord; | |
3463 | 3218 | begin |
3464 | 3219 | try |
3465 | 3220 | if Item.DownType = gdtBoard then |
@@ -3494,27 +3249,21 @@ begin | ||
3494 | 3249 | ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle; |
3495 | 3250 | end; |
3496 | 3251 | 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 | |
3498 | 3253 | TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true; |
3499 | - break; | |
3500 | - end; | |
3501 | 3254 | end; |
3502 | 3255 | if GikoSys.Setting.BrowserTabVisible then begin |
3503 | 3256 | if GetActiveContent = Item.ThreadItem then |
3504 | - browserRec := InsertBrowserTab(Item.ThreadItem) | |
3257 | + InsertBrowserTab(Item.ThreadItem) | |
3505 | 3258 | 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) | |
3507 | 3260 | 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); | |
3513 | 3262 | end else begin |
3514 | 3263 | if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then |
3515 | 3264 | InsertBrowserTab(Item.ThreadItem); |
3516 | 3265 | end; |
3517 | - Application.ProcessMessages; | |
3266 | + | |
3518 | 3267 | if Item.State = gdsComplete then begin |
3519 | 3268 | PlaySound('New'); |
3520 | 3269 | AddMessageList(ATitle + ' [スレ取得完了]', nil, gmiOK); |
@@ -3642,17 +3391,14 @@ begin | ||
3642 | 3391 | end; |
3643 | 3392 | end;} |
3644 | 3393 | |
3645 | -function TGikoForm.InsertBrowserTab( | |
3646 | - ThreadItem : TThreadItem; | |
3647 | - ActiveTab : Boolean = True | |
3648 | -) : TBrowserRecord; | |
3394 | +procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True); | |
3395 | + | |
3649 | 3396 | var |
3650 | - i, j, idx : Integer; | |
3651 | - favItem : TFavoriteThreadItem; | |
3397 | + i, j, idx: Integer; | |
3398 | + favItem : TFavoriteThreadItem; | |
3652 | 3399 | newBrowser : TBrowserRecord; |
3653 | 3400 | begin |
3654 | 3401 | |
3655 | - Result := nil; | |
3656 | 3402 | if Threaditem = nil then Exit; |
3657 | 3403 | |
3658 | 3404 | if ThreadItem.IsLogFile then begin |
@@ -3671,7 +3417,6 @@ begin | ||
3671 | 3417 | for i := 0 to BrowserTab.Tabs.Count - 1 do begin |
3672 | 3418 | if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin |
3673 | 3419 | if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin |
3674 | - Result := TBrowserRecord( BrowserTab.Tabs.Objects[i] ); | |
3675 | 3420 | if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin |
3676 | 3421 | for j := BrowserTab.Tabs.Count - 1 downto 0 do begin |
3677 | 3422 | if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin |
@@ -3758,7 +3503,6 @@ begin | ||
3758 | 3503 | BrowserTab.TabIndex := i; |
3759 | 3504 | end; |
3760 | 3505 | end; |
3761 | - Result := newBrowser; | |
3762 | 3506 | if(ActiveTab) or (idx = -1) then begin |
3763 | 3507 | BrowserTab.OnChange(nil); |
3764 | 3508 | end; |
@@ -3768,7 +3512,6 @@ begin | ||
3768 | 3512 | BrowserNullTab.Browser := Browser; |
3769 | 3513 | end; |
3770 | 3514 | BrowserNullTab.thread := ThreadItem; |
3771 | - Result := BrowserNullTab; | |
3772 | 3515 | BrowserTab.TabIndex := -1; |
3773 | 3516 | SetContent(BrowserNullTab); |
3774 | 3517 | end; |
@@ -3788,6 +3531,7 @@ var | ||
3788 | 3531 | s: string; |
3789 | 3532 | // OldCursor: TCursor; |
3790 | 3533 | i: Integer; |
3534 | + url: OleVariant; | |
3791 | 3535 | idx: Integer; |
3792 | 3536 | ThreadItem: TThreadItem; |
3793 | 3537 | Thread: TBrowserRecord; |
@@ -3795,7 +3539,6 @@ var | ||
3795 | 3539 | ThreadScrollTop: Integer; |
3796 | 3540 | ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean; |
3797 | 3541 | begin |
3798 | -// AddMessageList('SetContent', nil, gmiWhat); | |
3799 | 3542 | Thread := inThread; |
3800 | 3543 | idx := BrowserTab.TabIndex; |
3801 | 3544 | if (FActiveContent <> nil) and |
@@ -3859,19 +3602,18 @@ begin | ||
3859 | 3602 | |
3860 | 3603 | |
3861 | 3604 | try |
3862 | - { | |
3863 | 3605 | if ThreadItem.UnRead then begin |
3864 | 3606 | ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; |
3865 | 3607 | if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0; |
3866 | 3608 | TreeView.Refresh; |
3867 | 3609 | end; |
3868 | - } | |
3610 | + // LockWindowUpdate(Self.Handle); | |
3869 | 3611 | if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin |
3870 | 3612 | if (FActiveContent.Browser <> BrowserNullTab.Browser) then |
3871 | 3613 | ShowWindow(FActiveContent.Browser.Handle, SW_HIDE); |
3872 | 3614 | end; |
3873 | - | |
3874 | 3615 | ShowWindow(Thread.FBrowser.Handle, SW_SHOW); |
3616 | + //LockWindowUpdate(0); | |
3875 | 3617 | if (not Assigned(Thread.Browser.Document)) then begin |
3876 | 3618 | Thread.Browser.Navigate('about:blank'); |
3877 | 3619 | end; |
@@ -3898,21 +3640,55 @@ begin | ||
3898 | 3640 | Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']'; |
3899 | 3641 | //Thread.Repaintは、スキン等の設定を変更したとき、Threadをダウンロードしたとき |
3900 | 3642 | //新規にThreadを開いたときに真になっている。 |
3643 | +// if(Thread.Repaint) or (Thread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin | |
3901 | 3644 | if Thread.Repaint then begin |
3902 | 3645 | //Thread.LastSize := ThreadItem.Size; |
3903 | 3646 | 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; | |
3914 | 3689 | end; |
3915 | 3690 | end; |
3691 | + ThreadItem.UnRead := False; | |
3916 | 3692 | ListView.Refresh; |
3917 | 3693 | end; |
3918 | 3694 | if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin |
@@ -3958,6 +3734,7 @@ end; | ||
3958 | 3734 | |
3959 | 3735 | procedure TGikoForm.SetActiveList(Obj: TObject); |
3960 | 3736 | var |
3737 | + i : Integer; | |
3961 | 3738 | idx : Integer; |
3962 | 3739 | begin |
3963 | 3740 | // if FActiveList <> Obj then begin |
@@ -3975,11 +3752,13 @@ begin | ||
3975 | 3752 | Self.Caption := CAPTION_NAME; |
3976 | 3753 | //Application.Title := CAPTION_NAME; |
3977 | 3754 | |
3978 | -// ActiveListColumnSave; | |
3979 | - | |
3980 | 3755 | 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]; | |
3981 | 3758 | SetCategoryListItem(TBBS(Obj)); |
3982 | 3759 | 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]; | |
3983 | 3762 | SetBoardListItem(TCategory(Obj)); |
3984 | 3763 | end else if Obj is TBoard then begin |
3985 | 3764 | SetThreadListItem(TBoard(Obj)); |
@@ -4008,16 +3787,12 @@ end; | ||
4008 | 3787 | procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); |
4009 | 3788 | var |
4010 | 3789 | Board: TBoard; |
4011 | - i: Integer; | |
4012 | 3790 | begin |
4013 | 3791 | 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; | |
4018 | 3792 | 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; | |
4021 | 3796 | // Board.SelectText := SelectText; |
4022 | 3797 | // Board.KubetsuChk := KubetsuChk; |
4023 | 3798 | ViewType := AViewType; |
@@ -4522,70 +4297,75 @@ begin | ||
4522 | 4297 | bbs := nil; |
4523 | 4298 | |
4524 | 4299 | 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; | |
4528 | 4302 | |
4303 | + if not CallEvent then begin | |
4304 | + ChangeEvent := TreeView.OnChange; | |
4305 | + ChangingEvent := TreeView.OnChanging; | |
4306 | + end; | |
4307 | + try | |
4529 | 4308 | if not CallEvent then begin |
4530 | - ChangeEvent := TreeView.OnChange; | |
4531 | - ChangingEvent := TreeView.OnChanging; | |
4309 | + TreeView.OnChange := nil; | |
4310 | + TreeView.OnChanging := nil; | |
4532 | 4311 | 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; | |
4552 | 4319 | end; |
4553 | 4320 | end; |
4321 | + //Application.ProcessMessages; | |
4322 | + finally | |
4323 | + if not CallEvent then begin | |
4324 | + TreeView.OnChange := ChangeEvent; | |
4325 | + TreeView.OnChanging := ChangingEvent; | |
4326 | + end; | |
4554 | 4327 | end; |
4555 | 4328 | 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; | |
4571 | 4351 | end; |
4572 | - SetActiveList( Item ); | |
4573 | 4352 | end; |
4353 | + SetActiveList( Item ); | |
4574 | 4354 | end; |
4575 | - end; | |
4576 | 4355 | |
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; | |
4589 | 4369 | end; |
4590 | 4370 | end; |
4591 | 4371 | end; |
@@ -4596,7 +4376,6 @@ procedure TGikoForm.ListViewMouseDown(Sender: TObject; | ||
4596 | 4376 | var |
4597 | 4377 | listItem : TListItem; |
4598 | 4378 | threadItem : TThreadItem; |
4599 | - pos : TPoint; | |
4600 | 4379 | // t: Cardinal; |
4601 | 4380 | begin |
4602 | 4381 | case Button of |
@@ -4620,13 +4399,6 @@ begin | ||
4620 | 4399 | else |
4621 | 4400 | ListClick; |
4622 | 4401 | 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; | |
4630 | 4402 | end; |
4631 | 4403 | { if ssDouble in Shift then begin |
4632 | 4404 | DoubleClickOccurred[Button] := True; |
@@ -4753,11 +4525,11 @@ begin | ||
4753 | 4525 | top := 0; |
4754 | 4526 | nm := AName; |
4755 | 4527 | item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm); |
4756 | - item.focus(); | |
4757 | 4528 | repeat |
4758 | 4529 | top := top + item.offsetTop; |
4759 | 4530 | item := item.offsetParent; |
4760 | 4531 | until AnsiCompareText(item.tagName, 'body' ) = 0; |
4532 | + | |
4761 | 4533 | OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top; |
4762 | 4534 | except |
4763 | 4535 | end; |
@@ -4785,7 +4557,6 @@ begin | ||
4785 | 4557 | top := 0; |
4786 | 4558 | nm := AName; |
4787 | 4559 | item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm); |
4788 | - item.focus(); | |
4789 | 4560 | repeat |
4790 | 4561 | top := top + item.offsetTop; |
4791 | 4562 | item := item.offsetParent; |
@@ -5257,23 +5028,15 @@ begin | ||
5257 | 5028 | case GikoSys.Setting.ListWidthState of |
5258 | 5029 | glsMax: begin |
5259 | 5030 | //通常表示にする |
5260 | - if FActiveContent <> nil then | |
5261 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止 | |
5262 | 5031 | ViewPanel.Width := FBrowserSizeWidth; |
5263 | 5032 | BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; |
5264 | 5033 | BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
5265 | 5034 | GikoSys.Setting.ListWidthState := glsNormal; |
5266 | - if FActiveContent <> nil then | |
5267 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画 | |
5268 | 5035 | end; |
5269 | 5036 | glsMin, glsNormal: begin |
5270 | 5037 | //最大表示にする |
5271 | - if FActiveContent <> nil then | |
5272 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止 | |
5273 | 5038 | if GikoSys.Setting.ListWidthState = glsNormal then |
5274 | 5039 | FBrowserSizeWidth := ViewPanel.Width; |
5275 | - if FActiveContent <> nil then | |
5276 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画 | |
5277 | 5040 | ViewPanel.Width := 1; |
5278 | 5041 | BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL; |
5279 | 5042 | BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
@@ -5284,23 +5047,15 @@ begin | ||
5284 | 5047 | case GikoSys.Setting.ListHeightState of |
5285 | 5048 | glsMax: begin |
5286 | 5049 | //通常表示にする |
5287 | - if FActiveContent <> nil then | |
5288 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止 | |
5289 | 5050 | ViewPanel.Height := FBrowserSizeHeight; |
5290 | 5051 | BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; |
5291 | 5052 | BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
5292 | 5053 | GikoSys.Setting.ListHeightState := glsNormal; |
5293 | - if FActiveContent <> nil then | |
5294 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画 | |
5295 | 5054 | end; |
5296 | 5055 | glsMin, glsNormal: begin |
5297 | 5056 | //最大表示にする |
5298 | - if FActiveContent <> nil then | |
5299 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止 | |
5300 | 5057 | if GikoSys.Setting.ListHeightState = glsNormal then |
5301 | 5058 | FBrowserSizeHeight := ViewPanel.Height; |
5302 | - if FActiveContent <> nil then | |
5303 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画 | |
5304 | 5059 | ViewPanel.Height := 1; |
5305 | 5060 | BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL; |
5306 | 5061 | BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
@@ -5321,12 +5076,8 @@ begin | ||
5321 | 5076 | case GikoSys.Setting.ListWidthState of |
5322 | 5077 | glsMax, glsNormal: begin |
5323 | 5078 | //最小表示にする |
5324 | - if FActiveContent <> nil then | |
5325 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止 | |
5326 | 5079 | if GikoSys.Setting.ListWidthState = glsNormal then |
5327 | 5080 | FBrowserSizeWidth := ViewPanel.Width; |
5328 | - if FActiveContent <> nil then | |
5329 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画 | |
5330 | 5081 | ViewPanel.Width := ThreadMainPanel.Width - 80; |
5331 | 5082 | BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; |
5332 | 5083 | BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL; |
@@ -5334,41 +5085,29 @@ begin | ||
5334 | 5085 | end; |
5335 | 5086 | glsMin: begin |
5336 | 5087 | //通常表示にする |
5337 | - if FActiveContent <> nil then | |
5338 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止 | |
5339 | 5088 | ViewPanel.Width := FBrowserSizeWidth; |
5340 | 5089 | BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; |
5341 | 5090 | BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
5342 | 5091 | GikoSys.Setting.ListWidthState := glsNormal; |
5343 | - if FActiveContent <> nil then | |
5344 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画 | |
5345 | 5092 | end; |
5346 | 5093 | end; |
5347 | 5094 | end else begin |
5348 | 5095 | case GikoSys.Setting.ListHeightState of |
5349 | 5096 | glsMax, glsNormal: begin |
5350 | 5097 | //最小表示にする |
5351 | - if FActiveContent <> nil then | |
5352 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止 | |
5353 | 5098 | if GikoSys.Setting.ListHeightState = glsNormal then |
5354 | 5099 | FBrowserSizeHeight := ViewPanel.Height; |
5355 | 5100 | ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7; |
5356 | 5101 | BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; |
5357 | 5102 | BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL; |
5358 | 5103 | GikoSys.Setting.ListHeightState := glsMin; |
5359 | - if FActiveContent <> nil then | |
5360 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画 | |
5361 | 5104 | end; |
5362 | 5105 | glsMin: begin |
5363 | 5106 | //通常表示にする |
5364 | - if FActiveContent <> nil then | |
5365 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //描画停止 | |
5366 | 5107 | ViewPanel.Height := FBrowserSizeHeight; |
5367 | 5108 | BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; |
5368 | 5109 | BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
5369 | 5110 | GikoSys.Setting.ListHeightState := glsNormal; |
5370 | - if FActiveContent <> nil then | |
5371 | - SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //描画 | |
5372 | 5111 | end; |
5373 | 5112 | end; |
5374 | 5113 | end; |
@@ -5589,8 +5328,9 @@ begin | ||
5589 | 5328 | end; |
5590 | 5329 | |
5591 | 5330 | procedure TGikoForm.FormResize(Sender: TObject); |
5331 | +var | |
5332 | + doc : Variant; | |
5592 | 5333 | begin |
5593 | - | |
5594 | 5334 | MessageListView.Column[0].Width := MessageListView.ClientWidth - 32; |
5595 | 5335 | MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width; |
5596 | 5336 |
@@ -5606,10 +5346,17 @@ begin | ||
5606 | 5346 | end; |
5607 | 5347 | end; |
5608 | 5348 | |
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; | |
5612 | 5357 | |
5358 | + FIsIgnoreResize := True; | |
5359 | + PostMessage( Handle, USER_RESIZED, 0, 0 ); | |
5613 | 5360 | end; |
5614 | 5361 | |
5615 | 5362 | procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject); |
@@ -5697,8 +5444,8 @@ end; | ||
5697 | 5444 | |
5698 | 5445 | procedure TGikoForm.LogDeleteActionExecute(Sender: TObject); |
5699 | 5446 | const |
5700 | - DEL_MSG = '“^0”のログを削除します。よろしいですか?'; | |
5701 | - DEL_SAME_MSG = 'これら ^0 個のスレッドのログを削除します。よろしいですか?'; | |
5447 | + DEL_MSG = '“^0”のログをを削除します。よろしいですか?'; | |
5448 | + DEL_SAME_MSG = 'これら ^0 個のスレッドのログをを削除します。よろしいですか?'; | |
5702 | 5449 | DEL_TITLE = '削除確認'; |
5703 | 5450 | var |
5704 | 5451 | ThreadItem: TThreadItem; |
@@ -5735,8 +5482,6 @@ begin | ||
5735 | 5482 | DeleteHistory(ThreadItem); |
5736 | 5483 | DeleteTab(ThreadItem); |
5737 | 5484 | ThreadItem.DeleteLogFile; |
5738 | - | |
5739 | - TreeView.Refresh; // UnRead の表示を更新 | |
5740 | 5485 | end; |
5741 | 5486 | ListView.Refresh; |
5742 | 5487 | finally |
@@ -5922,7 +5667,6 @@ begin | ||
5922 | 5667 | |
5923 | 5668 | Editor := TEditorForm.Create(Self); |
5924 | 5669 | Editor.SetThreadItem(Item); |
5925 | - GikoSys.LoadEditorKeySetting(Editor.ActionList); | |
5926 | 5670 | Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10; |
5927 | 5671 | Editor.Show; |
5928 | 5672 | Editor.BodyEdit.SetFocus; |
@@ -6658,13 +6402,11 @@ var | ||
6658 | 6402 | FDispHtmlDocument: DispHTMLDocument; |
6659 | 6403 | BrowserRecord :TBrowserRecord; |
6660 | 6404 | i :Integer; |
6661 | - doc : Variant; | |
6662 | - threadItem : TThreadItem; | |
6663 | 6405 | begin |
6664 | -// AddMessageList('DocumentComplete', nil, gmiWhat); | |
6406 | +// AddMessageList('DocumentComplete', nil); | |
6665 | 6407 | if TObject(Sender) is TWebBrowser then begin |
6666 | - BrowserRecord := nil; | |
6667 | 6408 | if TWebBrowser(Sender) <> Browser then begin |
6409 | + BrowserRecord := nil; | |
6668 | 6410 | for i := BrowserTab.Tabs.Count - 1 downto 0 do begin |
6669 | 6411 | if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin |
6670 | 6412 | BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]); |
@@ -6680,7 +6422,7 @@ begin | ||
6680 | 6422 | BrowserRecord.FEvent.OnClick := WebBrowserClick; //追加したOnClickイベント |
6681 | 6423 | end; |
6682 | 6424 | end else begin |
6683 | - if GetActiveContent <> nil then begin | |
6425 | + if GetActiveContent <> nil then begin | |
6684 | 6426 | FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument; |
6685 | 6427 | if FEvent <> nil then |
6686 | 6428 | FEvent.Free; |
@@ -6689,38 +6431,6 @@ begin | ||
6689 | 6431 | FEvent.OnClick := WebBrowserClick; //追加したOnClickイベント |
6690 | 6432 | end; |
6691 | 6433 | 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; | |
6724 | 6434 | end; |
6725 | 6435 | end; |
6726 | 6436 |
@@ -7076,7 +6786,7 @@ end; | ||
7076 | 6786 | |
7077 | 6787 | procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject); |
7078 | 6788 | const |
7079 | - DEL_MSG = '“^0”のログを削除します。よろしいですか?'; | |
6789 | + DEL_MSG = '“^0”のログをを削除します。よろしいですか?'; | |
7080 | 6790 | DEL_TITLE = '削除確認'; |
7081 | 6791 | var |
7082 | 6792 | idx: Integer; |
@@ -7494,13 +7204,14 @@ begin | ||
7494 | 7204 | end; |
7495 | 7205 | end; |
7496 | 7206 | |
7497 | -procedure TGikoForm.MoveToURL(const inURL: string); | |
7207 | +procedure TGikoForm.MoveToURL(URL: string); | |
7208 | + | |
7498 | 7209 | var |
7499 | 7210 | 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; | |
7501 | 7212 | tmp1, tmp2: string; |
7502 | 7213 | BBSID, BBSKey: string; |
7503 | - tmpBoard, Board: TBoard; | |
7214 | + Board: TBoard; | |
7504 | 7215 | ThreadItem: TThreadItem; |
7505 | 7216 | i, bi : Integer; |
7506 | 7217 | boardURL : string; |
@@ -7510,22 +7221,20 @@ var | ||
7510 | 7221 | // boardNode : TTreeNode; |
7511 | 7222 | shiftDown : Boolean; |
7512 | 7223 | ctrlDown : Boolean; |
7513 | - stRes, edRes : Int64; | |
7514 | - browserRec : TBrowserRecord; | |
7515 | 7224 | begin |
7516 | 7225 | |
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 ); | |
7519 | 7228 | |
7520 | 7229 | |
7521 | 7230 | 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; | |
7529 | 7238 | end; |
7530 | 7239 | |
7531 | 7240 | //===== プラグイン |
@@ -7534,16 +7243,15 @@ begin | ||
7534 | 7243 | bi := High( BoardPlugIns ); |
7535 | 7244 | for i := Low( BoardPlugIns ) to bi do begin |
7536 | 7245 | if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin |
7537 | - case BoardPlugIns[ i ].AcceptURL( inURL ) of | |
7246 | + case BoardPlugIns[ i ].AcceptURL( URL ) of | |
7538 | 7247 | atThread: |
7539 | 7248 | begin |
7540 | - tmpThread := TThreadItem.Create( BoardPlugIns[ i ], inURL ); | |
7249 | + tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL ); | |
7541 | 7250 | boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) ); |
7542 | 7251 | Board := BBSsFindBoardFromURL( boardURL ); |
7543 | 7252 | if Board = nil then begin |
7544 | - //break; | |
7545 | 7253 | // ※作っても追加するところが無いので激しく保留 |
7546 | - //GikoSys.OpenBrowser(inURL, gbtUserApp); | |
7254 | + //GikoSys.OpenBrowser(URL, gbtUserApp); | |
7547 | 7255 | //Exit; |
7548 | 7256 | { |
7549 | 7257 | Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL ); |
@@ -7555,42 +7263,34 @@ begin | ||
7555 | 7263 | GikoSys.ReadSubjectFile( Board ); |
7556 | 7264 | Exit; |
7557 | 7265 | 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 | |
7570 | 7283 | 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; | |
7585 | 7284 | end; |
7285 | + Exit; | |
7586 | 7286 | end; |
7287 | + | |
7288 | + //Exit; | |
7587 | 7289 | end; |
7588 | 7290 | |
7589 | 7291 | atBoard: |
7590 | 7292 | begin |
7591 | - tmpBoard := TBoard.Create(BoardPlugIns[ i ], inURL); | |
7592 | - Board := BBSsFindBoardFromURL( tmpBoard.URL ); | |
7593 | - tmpBoard.Free; | |
7293 | + Board := BBSsFindBoardFromURL( URL ); | |
7594 | 7294 | if Board <> nil then begin |
7595 | 7295 | if FActiveBBS <> Board.ParentCategory.ParenTBBS then |
7596 | 7296 | ShowBBSTree( Board.ParentCategory.ParenTBBS ); |
@@ -7607,7 +7307,7 @@ begin | ||
7607 | 7307 | |
7608 | 7308 | |
7609 | 7309 | if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin |
7610 | - boardURL := GikoSys.Get2chThreadURL2BoardURL( inURL ); | |
7310 | + boardURL := GikoSys.Get2chThreadURL2BoardURL( URL ); | |
7611 | 7311 | Board := BBSsFindBoardFromURL( boardURL ); |
7612 | 7312 | if Board = nil then |
7613 | 7313 | Board := BBSsFindBoardFromBBSID( BBSID ); |
@@ -7619,23 +7319,23 @@ begin | ||
7619 | 7319 | end; |
7620 | 7320 | if Board = nil then begin |
7621 | 7321 | // 入るべき板が見つからなかったので、普通のブラウザで開く |
7622 | - GikoSys.OpenBrowser(inURL, gbtUserApp); | |
7322 | + GikoSys.OpenBrowser(URL, gbtUserApp); | |
7623 | 7323 | Exit; |
7624 | 7324 | end else begin |
7625 | 7325 | // 外部の板なのに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 ); | |
7628 | 7328 | tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host)); |
7629 | 7329 | 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); | |
7632 | 7332 | Exit; |
7633 | 7333 | end; |
7634 | 7334 | end; |
7635 | 7335 | |
7636 | 7336 | if not Board.IsThreadDatRead then |
7637 | 7337 | GikoSys.ReadSubjectFile(Board); |
7638 | - URL := GikoSys.Get2chBrowsableThreadURL( inURL ); | |
7338 | + URL := GikoSys.Get2chBrowsableThreadURL( URL ); | |
7639 | 7339 | ThreadItem := Board.FindThreadFromURL( URL ); |
7640 | 7340 | // 過去ログ倉庫から、ダウソしたスレが発見できないのでここで探すようにする (2004/01/22) |
7641 | 7341 | if ThreadItem = nil then begin |
@@ -7648,9 +7348,9 @@ begin | ||
7648 | 7348 | {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001); |
7649 | 7349 | ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001); |
7650 | 7350 | if shiftDown then |
7651 | - GikoSys.OpenBrowser(URL1, gbtUserApp) | |
7351 | + GikoSys.OpenBrowser(URL, gbtUserApp) | |
7652 | 7352 | else if ctrlDown then |
7653 | - GikoSys.OpenBrowser(URL1, gbtIE) | |
7353 | + GikoSys.OpenBrowser(URL, gbtIE) | |
7654 | 7354 | else begin |
7655 | 7355 | } |
7656 | 7356 | ThreadItem := TThreadItem.Create( nil, URL ); |
@@ -7664,34 +7364,25 @@ begin | ||
7664 | 7364 | if TBoard(ActiveList) = Board then |
7665 | 7365 | ListView.Items.Count := ListView.Items.Count + 1; |
7666 | 7366 | 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); | |
7671 | 7368 | DownloadContent(ThreadItem); |
7672 | 7369 | {end;} |
7673 | 7370 | 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 | |
7680 | 7374 | if AnsiPos(Host, Board.URL) = 0 then |
7681 | 7375 | ThreadItem.DownloadHost := Host |
7682 | 7376 | else |
7683 | 7377 | 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); | |
7688 | 7379 | DownloadContent(ThreadItem); |
7689 | 7380 | end; |
7690 | 7381 | end; |
7691 | 7382 | end else begin |
7692 | - Board := BBSsFindBoardFromURL( inURL ); | |
7383 | + Board := BBSsFindBoardFromURL( URL ); | |
7693 | 7384 | if Board = nil then begin |
7694 | - GikoSys.OpenBrowser(inURL, gbtAuto); | |
7385 | + GikoSys.OpenBrowser(URL, gbtAuto); | |
7695 | 7386 | end else begin |
7696 | 7387 | if FActiveBBS <> Board.ParentCategory.ParenTBBS then |
7697 | 7388 | ShowBBSTree( Board.ParentCategory.ParenTBBS ); |
@@ -7737,9 +7428,6 @@ begin | ||
7737 | 7428 | end; |
7738 | 7429 | |
7739 | 7430 | procedure TGikoForm.WndProc(var Message: TMessage); |
7740 | -var | |
7741 | - senderBrowser : TWebBrowser; | |
7742 | - url : OleVariant; | |
7743 | 7431 | begin |
7744 | 7432 | try |
7745 | 7433 | case Message.Msg of |
@@ -7757,12 +7445,6 @@ begin | ||
7757 | 7445 | OnMinimized; |
7758 | 7446 | USER_SETLINKBAR: |
7759 | 7447 | 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; | |
7766 | 7448 | end; |
7767 | 7449 | |
7768 | 7450 | inherited; |
@@ -8217,10 +7899,10 @@ var | ||
8217 | 7899 | j: Integer; |
8218 | 7900 | ToolButton: TLinkToolButton; |
8219 | 7901 | MenuItem: TMenuItem; |
8220 | - oldIgnoreResize : TResizeType; | |
7902 | + oldIgnoreResize : Boolean; | |
8221 | 7903 | begin |
8222 | 7904 | oldIgnoreResize := FIsIgnoreResize; |
8223 | - FIsIgnoreResize := rtResizing; | |
7905 | + FIsIgnoreResize := True; | |
8224 | 7906 | MainCoolBar.Bands.BeginUpdate; |
8225 | 7907 | try |
8226 | 7908 | LinkBarPopupMenu.Items.Clear; |
@@ -8313,7 +7995,7 @@ begin | ||
8313 | 7995 | if FDropSpaceNode <> nil then |
8314 | 7996 | FDropSpaceNode.Free; |
8315 | 7997 | |
8316 | - FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObjectFirst(Node.Parent, '', nil ); | |
7998 | + FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil ); | |
8317 | 7999 | FDropSpaceNode.MoveTo( Node, naInsert ); |
8318 | 8000 | FDropSpaceNode.ImageIndex := -1; |
8319 | 8001 | FDropSpaceNode.SelectedIndex := -1; |
@@ -8679,7 +8361,7 @@ begin | ||
8679 | 8361 | end; |
8680 | 8362 | end; |
8681 | 8363 | // 設定 |
8682 | - lResult := SendMessage( bar.Handle, RB_SETBANDINFO, idx, Integer( pBandInfo ) ); | |
8364 | + lResult := SendMessage( bar.Handle, RB_SETBANDINFO, i, Integer( pBandInfo ) ); | |
8683 | 8365 | |
8684 | 8366 | end; |
8685 | 8367 |
@@ -8924,11 +8606,12 @@ procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState; | ||
8924 | 8606 | var |
8925 | 8607 | Wnd: THandle; |
8926 | 8608 | delta: Integer; |
8927 | -// browserPos : TPoint; | |
8609 | +// msg: TMessage; | |
8928 | 8610 | const |
8929 | 8611 | ICON_SIZE = 16; |
8930 | 8612 | begin |
8931 | - Wnd := WindowFromPoint(Mouse.CursorPos); | |
8613 | + Handled := False; | |
8614 | + Wnd := WindowFromPoint(MousePos); | |
8932 | 8615 | Handled := True; |
8933 | 8616 | if WheelDelta > 0 then |
8934 | 8617 | Delta := -1 |
@@ -8938,42 +8621,13 @@ begin | ||
8938 | 8621 | if (Wnd = BrowserTab.Handle) or |
8939 | 8622 | (Wnd = BrowserTab.Parent.Handle) then begin |
8940 | 8623 | 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 ); | |
8941 | 8629 | 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; | |
8977 | 8631 | end; |
8978 | 8632 | end; |
8979 | 8633 |
@@ -9010,10 +8664,9 @@ begin | ||
9010 | 8664 | ModifySelectList; |
9011 | 8665 | end else if Length( SelectComboBox.Text ) = 0 then |
9012 | 8666 | begin |
9013 | - {* SelectComboBox.Textが空でも、入力途中でEscしたとか | |
9014 | - * 空のときにDelキーを押したとかなので、スレの絞込みを維持する。 | |
9015 | - * (ここでは何もしない) | |
9016 | - *} | |
8667 | + AllItemAction.Checked := True; | |
8668 | + LogItemAction.Checked := False; | |
8669 | + NewItemAction.Checked := False; | |
9017 | 8670 | end else begin |
9018 | 8671 | // チラつくと嫌だから、一応押してあるときだけ処理する |
9019 | 8672 | if AllItemAction.Checked then |
@@ -9144,6 +8797,11 @@ begin | ||
9144 | 8797 | SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile); |
9145 | 8798 | end; |
9146 | 8799 | |
8800 | +procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word; | |
8801 | + Shift: TShiftState); | |
8802 | +begin | |
8803 | +end; | |
8804 | + | |
9147 | 8805 | // 全てのレスを表示 |
9148 | 8806 | procedure TGikoForm.AllResActionExecute(Sender: TObject); |
9149 | 8807 | var |
@@ -9648,26 +9306,25 @@ end; | ||
9648 | 9306 | procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word; |
9649 | 9307 | Shift: TShiftState); |
9650 | 9308 | 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 ); | |
9670 | 9315 | 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 ); | |
9671 | 9328 | end; |
9672 | 9329 | |
9673 | 9330 | end; |
@@ -9919,7 +9576,7 @@ end; | ||
9919 | 9576 | procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute( |
9920 | 9577 | Sender: TObject); |
9921 | 9578 | const |
9922 | - DEL_MSG = '“^0”のログを削除します。よろしいですか?'; | |
9579 | + DEL_MSG = '“^0”のログをを削除します。よろしいですか?'; | |
9923 | 9580 | DEL_TITLE = '削除確認'; |
9924 | 9581 | var |
9925 | 9582 | ThreadItem: TThreadItem; |
@@ -10062,7 +9719,7 @@ begin | ||
10062 | 9719 | ThreadItem := FavThread.Item; |
10063 | 9720 | |
10064 | 9721 | try |
10065 | - s := ThreadItem.Title + #13#10 + ThreadItem.URL + #13#10; | |
9722 | + s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10; | |
10066 | 9723 | if s <> '' then |
10067 | 9724 | Clipboard.AsText := s; |
10068 | 9725 | finally |
@@ -10077,7 +9734,7 @@ begin | ||
10077 | 9734 | GikoSys.ReadSubjectFile(Board); |
10078 | 9735 | |
10079 | 9736 | try |
10080 | - s := Board.Title + #13#10 + Board.URL + #13#10; | |
9737 | + s := Board.URL + #13#10 + Board.Title + #13#10; | |
10081 | 9738 | if s <> '' then |
10082 | 9739 | Clipboard.AsText := s; |
10083 | 9740 | finally |
@@ -10134,12 +9791,7 @@ procedure TGikoForm.BrowserTabMouseUp(Sender: TObject; | ||
10134 | 9791 | begin |
10135 | 9792 | if FDragWFirst <> true then begin |
10136 | 9793 | 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 | |
10143 | 9795 | if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
10144 | 9796 | if GikoSys.Setting.ListWidthState = glsMin then begin |
10145 | 9797 | BrowserMaxAndFocusAction.Execute; |
@@ -10223,9 +9875,9 @@ end; | ||
10223 | 9875 | procedure TGikoForm.SetListViewBackGroundColor(value: TColor); |
10224 | 9876 | begin |
10225 | 9877 | if FListViewBackGroundColor <> value then begin |
10226 | - FListViewBackGroundColor := value; | |
10227 | - ListView.Color := FListViewBackGroundColor; | |
10228 | - end; | |
9878 | + FListViewBackGroundColor := value; | |
9879 | + ListView.Color := FListViewBackGroundColor; | |
9880 | + end; | |
10229 | 9881 | end; |
10230 | 9882 | procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject); |
10231 | 9883 | begin |
@@ -10412,62 +10064,63 @@ end; | ||
10412 | 10064 | procedure TGikoForm.TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList); |
10413 | 10065 | var |
10414 | 10066 | 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 | |
10429 | 10081 | for i :=0 to TabList.Count - 1 do begin |
10430 | 10082 | 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; | |
10453 | 10105 | end; |
10454 | - //ここまで、ThreadのURLの変更 | |
10106 | + //ここまで、ThreadのURLの変更 | |
10455 | 10107 | |
10456 | 10108 | end; |
10457 | 10109 | |
10458 | -/// 最小化される | |
10110 | +// 最小化される | |
10459 | 10111 | procedure TGikoForm.OnMinimize; |
10460 | 10112 | begin |
10461 | - if FActiveContent <> nil then begin | |
10462 | - FIsMinimize := mtMinimizing; | |
10113 | + FIsMinimize := mtMinimizing; | |
10114 | + if FActiveContent <> nil then | |
10463 | 10115 | FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop; |
10464 | - end; | |
10116 | + PostMessage( Handle, USER_MINIMIZED, 0, 0 ); | |
10465 | 10117 | end; |
10466 | 10118 | |
10467 | -/// 最小化された (OnResized から呼ばれる) | |
10119 | +// 最小化された | |
10468 | 10120 | procedure TGikoForm.OnMinimized; |
10469 | 10121 | begin |
10470 | 10122 | FIsMinimize := mtMinimized; |
10123 | + FIsIgnoreResize := False; | |
10471 | 10124 | end; |
10472 | 10125 | |
10473 | 10126 | procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar); |
@@ -10478,8 +10131,8 @@ var | ||
10478 | 10131 | affectedBand : TCoolBand; |
10479 | 10132 | i : Integer; |
10480 | 10133 | 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; | |
10483 | 10136 | PostMessage( Handle, USER_RESIZED, 0, 0 ); |
10484 | 10137 | if not (Sender is TToolBar) or (CoolBar = nil) then |
10485 | 10138 | Exit; |
@@ -10620,6 +10273,8 @@ begin | ||
10620 | 10273 | end; |
10621 | 10274 | // TreeView がクリックされた |
10622 | 10275 | procedure TGikoForm.TreeClick( Node : TTreeNode ); |
10276 | +var | |
10277 | + i: Integer; | |
10623 | 10278 | begin |
10624 | 10279 | |
10625 | 10280 | if Node = nil then |
@@ -10633,7 +10288,16 @@ begin | ||
10633 | 10288 | Exit; |
10634 | 10289 | end; |
10635 | 10290 | |
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; | |
10637 | 10301 | |
10638 | 10302 | if TObject(Node.Data) is TBBS then begin |
10639 | 10303 | SetActiveList(Node.data); |
@@ -10748,6 +10412,7 @@ end; | ||
10748 | 10412 | |
10749 | 10413 | // ギコナビのメッセージループを横取りします |
10750 | 10414 | procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean); |
10415 | + | |
10751 | 10416 | //var |
10752 | 10417 | // key : Word; |
10753 | 10418 | begin |
@@ -10813,7 +10478,7 @@ end; | ||
10813 | 10478 | procedure TGikoForm.MessagePanelResize(Sender: TObject); |
10814 | 10479 | begin |
10815 | 10480 | |
10816 | - if FIsIgnoreResize <> rtNone then | |
10481 | + if FIsIgnoreResize then | |
10817 | 10482 | Exit; |
10818 | 10483 | |
10819 | 10484 | if GikoSys.Setting.ListOrientation = gloVertical then begin |
@@ -10826,30 +10491,10 @@ begin | ||
10826 | 10491 | end; |
10827 | 10492 | |
10828 | 10493 | procedure TGikoForm.OnResized; |
10829 | -var | |
10830 | - doc : Variant; | |
10831 | 10494 | begin |
10832 | 10495 | |
10833 | 10496 | 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; | |
10853 | 10498 | |
10854 | 10499 | end; |
10855 | 10500 |
@@ -10881,12 +10526,8 @@ begin | ||
10881 | 10526 | Self.FEvent.Free; |
10882 | 10527 | if Self.FBrowser <> nil then begin |
10883 | 10528 | 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; | |
10890 | 10531 | end; |
10891 | 10532 | //TOleControl(Self.FBrowser).Visible := false; |
10892 | 10533 | ShowWindow(Self.FBrowser.Handle, SW_HIDE); |
@@ -11165,16 +10806,12 @@ begin | ||
11165 | 10806 | SelectListItem(List); |
11166 | 10807 | for i := 0 to List.Count - 1 do begin |
11167 | 10808 | 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; | |
11172 | 10811 | end; |
11173 | 10812 | end; |
11174 | 10813 | if TreeView.Visible then |
11175 | 10814 | TreeView.Refresh; |
11176 | - if ListView.Visible then | |
11177 | - ListView.Refresh; | |
11178 | 10815 | finally |
11179 | 10816 | List.Free; |
11180 | 10817 | end; |
@@ -11190,16 +10827,12 @@ begin | ||
11190 | 10827 | SelectListItem(List); |
11191 | 10828 | for i := 0 to List.Count - 1 do begin |
11192 | 10829 | 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; | |
11197 | 10832 | end; |
11198 | 10833 | end; |
11199 | 10834 | if TreeView.Visible then |
11200 | 10835 | TreeView.Refresh; |
11201 | - if ListView.Visible then | |
11202 | - ListView.Refresh; | |
11203 | 10836 | finally |
11204 | 10837 | List.Free; |
11205 | 10838 | end; |
@@ -11210,8 +10843,11 @@ procedure TGikoForm.BrowserPanelCanResize(Sender: TObject; var NewWidth, | ||
11210 | 10843 | var |
11211 | 10844 | i: Integer; |
11212 | 10845 | begin |
11213 | - for i := BROWSER_COUNT - 1 downto 0 do begin | |
10846 | + for i := 0 to BROWSER_COUNT - 1 do | |
11214 | 10847 | 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); | |
11215 | 10851 | end; |
11216 | 10852 | end; |
11217 | 10853 |
@@ -11350,7 +10986,7 @@ end; | ||
11350 | 10986 | procedure TGikoForm.TabsSaveToFileActionExecute(Sender: TObject); |
11351 | 10987 | var |
11352 | 10988 | SaveTabList: TStringList; |
11353 | - Result: Boolean; | |
10989 | + Result: Boolean; | |
11354 | 10990 | begin |
11355 | 10991 | SaveTabList := TStringList.Create; |
11356 | 10992 | try |
@@ -11571,225 +11207,6 @@ begin | ||
11571 | 11207 | LoadTabURLs; |
11572 | 11208 | end; |
11573 | 11209 | |
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 | - | |
11793 | 11210 | initialization |
11794 | 11211 | OleInitialize(nil); |
11795 | 11212 | finalization |
@@ -187,7 +187,7 @@ type | ||
187 | 187 | function Is2chHost(Host: string): Boolean; |
188 | 188 | function Parse2chURL(const url: string; const path: string; const document: string; var BBSID: string; var BBSKey: string): Boolean; |
189 | 189 | 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); | |
191 | 191 | function GetVersionBuild: Integer; |
192 | 192 | function GetBrowsableThreadURL( inURL : string ) : string; |
193 | 193 | function GetThreadURL2BoardURL( inURL : string ) : string; |
@@ -218,7 +218,7 @@ const | ||
218 | 218 | ZERO_DATE: Integer = 25569; |
219 | 219 | BETA_VERSION_NAME_E = 'beta'; |
220 | 220 | BETA_VERSION_NAME_J = 'バタ'; |
221 | - BETA_VERSION = 49; | |
221 | + BETA_VERSION = 48; | |
222 | 222 | BETA_VERSION_BUILD = ''; //debug版など |
223 | 223 | APP_NAME = 'gikoNavi'; |
224 | 224 |
@@ -2999,8 +2999,7 @@ begin | ||
2999 | 2999 | OutputDebugString(pchar(HOST_NAME[0])); |
3000 | 3000 | for i := 0 to Length(HOST_NAME) - 1 do begin |
3001 | 3001 | // 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 | |
3004 | 3003 | Result := True; |
3005 | 3004 | Exit; |
3006 | 3005 | end; |
@@ -3424,7 +3423,7 @@ begin | ||
3424 | 3423 | end; |
3425 | 3424 | end; |
3426 | 3425 | |
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); | |
3428 | 3427 | var |
3429 | 3428 | URI: TIdURI; |
3430 | 3429 | begin |
@@ -10,7 +10,7 @@ interface | ||
10 | 10 | uses |
11 | 11 | //================================================== |
12 | 12 | |
13 | - Classes, SysUtils, Windows, | |
13 | + Classes, SysUtils, | |
14 | 14 | YofUtils; |
15 | 15 | |
16 | 16 | //================================================== |
@@ -26,7 +26,6 @@ type | ||
26 | 26 | IXMLNode = class |
27 | 27 | private |
28 | 28 | FNodeName : string; |
29 | - FCapacity : Integer; | |
30 | 29 | FCount : Integer; |
31 | 30 | FAttributeCount : Integer; |
32 | 31 | FChildNodes : IXMLNode; |
@@ -55,16 +54,15 @@ type | ||
55 | 54 | end; |
56 | 55 | |
57 | 56 | function XMLCloseCheck( |
58 | - var p : PChar; | |
59 | - const tail : PChar; | |
57 | + var f : TFileStream; | |
60 | 58 | var node : IXMLNode; |
59 | + ch : char; | |
61 | 60 | out tag : string; |
62 | 61 | out closed : boolean // 呼び出したルーチンが node を閉じるべきなら true |
63 | 62 | ) : boolean; // ch をこのルーチンが処理したなら true |
64 | 63 | |
65 | 64 | function XMLReadNode( |
66 | - var p : PChar; | |
67 | - const tail : PChar; | |
65 | + var f : TFileStream; | |
68 | 66 | var node : IXMLNode |
69 | 67 | ) : string; // node 以外のノードが閉じられた場合のノード名 |
70 | 68 |
@@ -77,8 +75,6 @@ procedure LoadXMLDocument( | ||
77 | 75 | const |
78 | 76 | //================================================== |
79 | 77 | kXMLWhite : TSysCharSet = [#0..#$20]; |
80 | - kXMLNodeNameStop : TSysCharSet = [#0..#$20, '/', '>']; | |
81 | - kXMLAttributeNameStop : TSysCharSet = [#0..#$20, '=', '/', '>']; | |
82 | 78 | kXMLDQuote : TSysCharSet = ['"']; |
83 | 79 | kXMLTagStart : TSysCharSet = ['<']; |
84 | 80 | kXMLTagEnd : TSysCharSet = ['>']; |
@@ -94,7 +90,6 @@ begin | ||
94 | 90 | |
95 | 91 | inherited; |
96 | 92 | |
97 | - FCapacity := 0; | |
98 | 93 | FCount := 0; |
99 | 94 | |
100 | 95 | end; |
@@ -143,11 +138,7 @@ procedure IXMLNode.Add( node : IXMLNode ); | ||
143 | 138 | begin |
144 | 139 | |
145 | 140 | 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 ); | |
151 | 142 | FNodes[ FCount - 1 ] := node; |
152 | 143 | |
153 | 144 | end; |
@@ -163,7 +154,6 @@ begin | ||
163 | 154 | index := FAttributeCount; |
164 | 155 | Inc( FAttributeCount ); |
165 | 156 | SetLength( FAttributes, FAttributeCount ); |
166 | - | |
167 | 157 | FAttributes[ index ].Name := Name; |
168 | 158 | FAttributes[ index ].Value := Value; |
169 | 159 |
@@ -176,133 +166,116 @@ begin | ||
176 | 166 | |
177 | 167 | end; |
178 | 168 | |
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; | |
191 | 176 | begin |
192 | 177 | |
193 | - while p < tail do | |
178 | + while f.Position < f.Size do | |
194 | 179 | begin |
195 | - if p^ in tok then | |
180 | + f.ReadBuffer( ch, 1 ); | |
181 | + if ch in untilSet then | |
196 | 182 | 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 ); | |
202 | 187 | end; |
203 | 188 | |
204 | - Result := p; | |
205 | - | |
206 | 189 | end; |
207 | 190 | |
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; | |
220 | 198 | begin |
221 | 199 | |
222 | - while p < tail do | |
200 | + while f.Position < f.Size do | |
223 | 201 | begin |
224 | - if p^ in tok then | |
202 | + f.ReadBuffer( ch, 1 ); | |
203 | + if ch in whileSet then | |
225 | 204 | 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 ); | |
230 | 207 | end else begin |
231 | - Break; | |
208 | + f.Seek( -1, soFromCurrent ); | |
209 | + exit; | |
232 | 210 | end; |
233 | 211 | end; |
234 | 212 | |
235 | - Result := p; | |
236 | - | |
237 | 213 | end; |
238 | 214 | |
239 | 215 | function XMLCloseCheck( |
240 | - var p : PChar; | |
241 | - const tail : PChar; | |
216 | + var f : TFileStream; | |
242 | 217 | var node : IXMLNode; |
218 | + ch : char; | |
243 | 219 | out tag : string; |
244 | 220 | out closed : boolean |
245 | 221 | ) : boolean; // ch をこのルーチンが処理したなら true |
246 | 222 | var |
247 | - found : PChar; | |
223 | + last : Integer; | |
224 | + tagLen : Integer; | |
248 | 225 | begin |
249 | 226 | |
250 | 227 | closed := false; |
251 | 228 | Result := false; |
252 | 229 | tag := ''; |
253 | 230 | |
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; | |
286 | 258 | end; |
287 | 259 | |
288 | 260 | end; |
289 | 261 | |
290 | 262 | function XMLReadNode( |
291 | - var p : PChar; | |
292 | - const tail : PChar; | |
263 | + var f : TFileStream; | |
293 | 264 | var node : IXMLNode |
294 | 265 | ) : string; // node 以外のノードが閉じられた場合のノード名 |
295 | 266 | var |
296 | 267 | child : IXMLNode; |
297 | 268 | |
298 | - found : PChar; | |
269 | + last : Integer; | |
299 | 270 | tag : string; |
271 | + tagLen : Integer; | |
300 | 272 | |
301 | 273 | isClosed : boolean; |
302 | 274 | |
303 | - nodeName : string; | |
304 | 275 | attributeName : string; |
305 | 276 | attributeValue : string; |
277 | + | |
278 | + ch : char; | |
306 | 279 | label |
307 | 280 | NextNode; |
308 | 281 | begin |
@@ -310,14 +283,16 @@ begin | ||
310 | 283 | // node の読み込み(1 ループにつき 1 ノード) |
311 | 284 | node.ChildNodes := IXMLNode.Create; |
312 | 285 | |
313 | - while p < tail do | |
286 | + while f.Position < f.Size do | |
314 | 287 | begin |
315 | 288 | // NodeName 読み込み |
316 | - p := AnsiStrNonTok( p, tail, kXMLWhite ); | |
289 | + FileThruWhile( f, kXMLWhite ); | |
317 | 290 | |
318 | - while p < tail do | |
291 | + while f.Position < f.Size do | |
319 | 292 | 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 | |
321 | 296 | begin |
322 | 297 | if isClosed then |
323 | 298 | begin |
@@ -326,12 +301,11 @@ begin | ||
326 | 301 | end; |
327 | 302 | |
328 | 303 | goto NextNode; |
329 | - end else if p^ = '<' then | |
304 | + end else if ch = '<' then | |
330 | 305 | begin |
331 | 306 | // 新規ノード |
332 | - Inc( p ); | |
333 | 307 | child := IXMLNode.Create; |
334 | - tag := XMLReadNode( p, tail, child ); | |
308 | + tag := XMLReadNode( f, child ); | |
335 | 309 | node.ChildNodes.Add( child ); |
336 | 310 | |
337 | 311 | // タグが閉じられた |
@@ -344,32 +318,35 @@ begin | ||
344 | 318 | end; |
345 | 319 | |
346 | 320 | goto NextNode; |
347 | - end else if p^ in kXMLWhite then | |
321 | + end else if ch in kXMLWhite then | |
348 | 322 | begin |
349 | 323 | // NodeName 完了 |
350 | 324 | break; |
351 | 325 | 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; | |
356 | 327 | |
357 | - p := found; | |
328 | + if ch in kXMLKanji then | |
329 | + begin | |
330 | + f.ReadBuffer( ch, 1 ); | |
331 | + node.NodeName := node.NodeName + ch; | |
332 | + end; | |
358 | 333 | end; |
359 | 334 | end; |
360 | 335 | |
361 | 336 | // Attribute の読み込み |
362 | - while p < tail do | |
337 | + while f.Position < f.Size do | |
363 | 338 | begin |
364 | 339 | // Attribute の名前を読み込み |
365 | 340 | attributeName := ''; |
366 | 341 | attributeValue := ''; |
367 | 342 | |
368 | - p := AnsiStrNonTok( p, tail, kXMLWhite ); | |
343 | + FileThruWhile( f, kXMLWhite ); | |
369 | 344 | |
370 | - while p < tail do | |
345 | + while f.Position < f.Size do | |
371 | 346 | 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 | |
373 | 350 | begin |
374 | 351 | if isClosed then |
375 | 352 | begin |
@@ -381,30 +358,33 @@ begin | ||
381 | 358 | |
382 | 359 | // 次のノードへ |
383 | 360 | goto NextNode; |
384 | - end else if p^ = '=' then | |
361 | + end else if ch = '=' then | |
385 | 362 | begin |
386 | 363 | // ここからは値が始まるので名前は終了 |
387 | - Inc( p ); | |
388 | 364 | break; |
389 | - end else if p^ in kXMLWhite then | |
365 | + end else if ch in kXMLWhite then | |
390 | 366 | begin |
391 | 367 | // Value が存在しない(規格外)ので次のノードへ |
392 | 368 | goto NextNode; |
393 | 369 | 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; | |
397 | 371 | |
398 | - p := found; | |
372 | + if ch in kXMLKanji then | |
373 | + begin | |
374 | + f.ReadBuffer( ch, 1 ); | |
375 | + attributeName := attributeName + ch; | |
376 | + end; | |
399 | 377 | end; |
400 | 378 | end; |
401 | 379 | |
402 | 380 | // Attribute の値を読み込み |
403 | - p := AnsiStrNonTok( p, tail, kXMLWhite ); | |
381 | + FileThruWhile( f, kXMLWhite ); | |
404 | 382 | |
405 | - while p < tail do | |
383 | + while f.Position < f.Size do | |
406 | 384 | 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 | |
408 | 388 | begin |
409 | 389 | if isClosed then |
410 | 390 | begin |
@@ -420,22 +400,24 @@ begin | ||
420 | 400 | |
421 | 401 | // 次のノードへ |
422 | 402 | goto NextNode; |
423 | - end else if p^ = '"' then | |
403 | + end else if ch = '"' then | |
424 | 404 | begin |
425 | 405 | // 値が "" で括られてるので(ていうか括られてなきゃいけないんだけど) |
426 | 406 | // 値を一括読み込み |
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 ); | |
432 | 414 | |
433 | 415 | node.AddAttribute( attributeName, HtmlDecode( attributeValue ) ); |
434 | 416 | |
435 | 417 | // 値を読み終わったので終了 |
436 | - p := found + 1; // '"' 飛ばし | |
418 | + f.Seek( f.Position + 1, soFromBeginning ); // '"' 飛ばし | |
437 | 419 | break; |
438 | - end else if p^ in kXMLWhite then | |
420 | + end else if ch in kXMLWhite then | |
439 | 421 | begin |
440 | 422 | // 規格外だけどね |
441 | 423 | node.AddAttribute( attributeName, HtmlDecode( attributeValue ) ); |
@@ -443,14 +425,12 @@ begin | ||
443 | 425 | goto NextNode; |
444 | 426 | end else begin |
445 | 427 | // 規格外だけど一応取っておく |
446 | - attributeValue := attributeValue + p^; | |
428 | + attributeValue := attributeValue + ch; | |
447 | 429 | |
448 | - if p^ in kXMLKanji then | |
430 | + if ch in kXMLKanji then | |
449 | 431 | 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; | |
454 | 434 | end; |
455 | 435 | end; |
456 | 436 | end; |
@@ -469,21 +449,19 @@ procedure LoadXMLDocument( | ||
469 | 449 | type |
470 | 450 | xmlMode = ( xmlHoge ); |
471 | 451 | var |
472 | - xmlFile : TMappedFile; | |
473 | - p : PChar; | |
452 | + xmlFile : TFileStream; | |
474 | 453 | begin |
475 | - //Result := IXMLDocument.Create; | |
454 | + //Result := IXMLDocument.Create; | |
476 | 455 | //doc := IXMLDocument.Create; |
477 | 456 | |
478 | - xmlFile := TMappedFile.Create( fileName ); | |
457 | + xmlFile := TFileStream.Create( fileName, fmOpenRead ); | |
479 | 458 | |
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 | |
485 | 463 | xmlFile.Free; |
486 | - end; | |
464 | + end; | |
487 | 465 | |
488 | 466 | //Result := doc; |
489 | 467 |
@@ -156,7 +156,9 @@ var | ||
156 | 156 | Idx: Integer; |
157 | 157 | ATitle: string; |
158 | 158 | DownloadResult: Boolean; |
159 | + foundPos: Integer; | |
159 | 160 | boardPlugIn : TBoardPlugIn; |
161 | + listContent : string; | |
160 | 162 | lastContent : string; |
161 | 163 | logFile : TFileStream; |
162 | 164 | adjustMargin : Integer; |
@@ -1175,7 +1177,7 @@ end; | ||
1175 | 1177 | } |
1176 | 1178 | procedure TDownloadItem.SaveItemFile; |
1177 | 1179 | var |
1178 | - Body, oldBody: TStringList; | |
1180 | + Body: TStringList; | |
1179 | 1181 | Cnt: Integer; |
1180 | 1182 | OldCnt: Integer; |
1181 | 1183 | FileName: string; |
@@ -1184,11 +1186,11 @@ var | ||
1184 | 1186 | NewRes: Integer; |
1185 | 1187 | finish : Boolean; |
1186 | 1188 | 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; | |
1192 | 1194 | LastIdx : Integer; |
1193 | 1195 | begin |
1194 | 1196 | FileName := ThreadItem.GetThreadFileName; |
@@ -1206,6 +1208,10 @@ begin | ||
1206 | 1208 | try |
1207 | 1209 | // if FileExists(FileName) and (ResponseCode = 206) then begin |
1208 | 1210 | 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; | |
1209 | 1215 | loopCnt := 10; |
1210 | 1216 | repeat |
1211 | 1217 | finish := true; |
@@ -1218,55 +1224,53 @@ begin | ||
1218 | 1224 | except |
1219 | 1225 | on E:EFOpenError do begin |
1220 | 1226 | sleep(10); |
1227 | + finish := false; | |
1221 | 1228 | Dec(loopCnt); |
1222 | - if loopCnt > 0 then | |
1223 | - finish := false; | |
1224 | 1229 | end; |
1225 | 1230 | end; |
1226 | - until finish; | |
1231 | + until finish and ( loopCnt > 0 ); | |
1227 | 1232 | //Cnt := Body.Count; |
1228 | 1233 | end else begin |
1229 | 1234 | if IsAbone then begin |
1230 | 1235 | // あぼーんを検出したのでここまで読んだと新着レス番のつけなおし |
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); | |
1247 | 1246 | 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; | |
1254 | 1247 | 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; | |
1255 | 1256 | |
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; | |
1265 | 1261 | |
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; | |
1268 | 1273 | end; |
1269 | - | |
1270 | 1274 | end else begin |
1271 | 1275 | Body.Text := Content; |
1272 | 1276 | //ThreadItem.Count := 0; |
@@ -1299,10 +1303,8 @@ begin | ||
1299 | 1303 | ThreadItem.AllResCount := ThreadItem.Count; |
1300 | 1304 | ThreadItem.IsLogFile := True; |
1301 | 1305 | 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; | |
1306 | 1308 | // if ThreadItem.RoundNo = 6 then |
1307 | 1309 | // ThreadItem.RoundNo := 0; |
1308 | 1310 |
@@ -1,6 +1,6 @@ | ||
1 | 1 | object KuroutOption: TKuroutOption |
2 | - Left = 43 | |
3 | - Top = 114 | |
2 | + Left = 260 | |
3 | + Top = 167 | |
4 | 4 | Width = 525 |
5 | 5 | Height = 457 |
6 | 6 | Caption = #35443#32048#35373#23450 |
@@ -140,182 +140,6 @@ object KuroutOption: TKuroutOption | ||
140 | 140 | TabOrder = 3 |
141 | 141 | end |
142 | 142 | 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 | |
319 | 143 | end |
320 | 144 | end |
321 | 145 | object OkBotton: TButton |
@@ -8,67 +8,35 @@ uses | ||
8 | 8 | |
9 | 9 | type |
10 | 10 | 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); | |
63 | 33 | private |
64 | - { Private 宣言 } | |
34 | + { Private 宣言 } | |
65 | 35 | procedure SetValue; |
66 | 36 | procedure SaveSetting; |
67 | 37 | procedure RecvBufferSizeExit(Sender: TObject); |
68 | 38 | procedure PostTimeEditExit(Sender: TObject); |
69 | 39 | procedure PostTimeCheckBoxClick(Sender: TObject); |
70 | - procedure SetColumnData(); | |
71 | - procedure PostColumnData(); | |
72 | 40 | public |
73 | 41 | { Public 宣言 } |
74 | 42 | end; |
@@ -78,9 +46,6 @@ var | ||
78 | 46 | |
79 | 47 | implementation |
80 | 48 | |
81 | -uses | |
82 | - Giko, Setting; | |
83 | - | |
84 | 49 | {$R *.dfm} |
85 | 50 | |
86 | 51 | procedure TKuroutOption.SetValue; |
@@ -99,10 +64,6 @@ begin | ||
99 | 64 | PutPostTimeRadioButton.Checked := True |
100 | 65 | else |
101 | 66 | BackPostTimeRadioButton.Checked := True; |
102 | - | |
103 | - SetColumnData(); | |
104 | - | |
105 | - PageControl1.ActivePageIndex := GikoSys.Setting.KuroutSettingTabIndex; | |
106 | 67 | end; |
107 | 68 | |
108 | 69 | procedure TKuroutOption.SaveSetting; |
@@ -120,10 +81,6 @@ begin | ||
120 | 81 | else |
121 | 82 | GikoSys.Setting.TimeAdjustSec := 0; |
122 | 83 | GikoSys.Setting.TimeAdjust := PutPostTimeRadioButton.Checked; |
123 | - | |
124 | - GikoSys.Setting.GengoSupport := GengoSupport.Checked; | |
125 | - | |
126 | - GikoSys.Setting.KuroutSettingTabIndex := PageControl1.ActivePageIndex; | |
127 | 84 | end; |
128 | 85 | |
129 | 86 | procedure TKuroutOption.RecvBufferSizeExit(Sender: TObject); |
@@ -152,7 +109,6 @@ procedure TKuroutOption.OkBottonClick(Sender: TObject); | ||
152 | 109 | begin |
153 | 110 | RecvBufferSizeExit(Sender); |
154 | 111 | PostTimeEditExit(Sender); |
155 | - PostColumnData(); | |
156 | 112 | SaveSetting; |
157 | 113 | end; |
158 | 114 |
@@ -162,191 +118,5 @@ begin | ||
162 | 118 | PostTimeCheckBoxClick(Sender); |
163 | 119 | |
164 | 120 | 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; | |
351 | 121 | |
352 | 122 | end. |
@@ -1,6 +1,6 @@ | ||
1 | 1 | object OptionDialog: TOptionDialog |
2 | - Left = 188 | |
3 | - Top = 128 | |
2 | + Left = 410 | |
3 | + Top = 236 | |
4 | 4 | BorderStyle = bsDialog |
5 | 5 | Caption = #12458#12503#12471#12519#12531 |
6 | 6 | ClientHeight = 428 |
@@ -60,9 +60,9 @@ object OptionDialog: TOptionDialog | ||
60 | 60 | Top = 4 |
61 | 61 | Width = 509 |
62 | 62 | Height = 389 |
63 | - ActivePage = TabSheet3 | |
63 | + ActivePage = ThreadSheet | |
64 | 64 | MultiLine = True |
65 | - TabIndex = 3 | |
65 | + TabIndex = 4 | |
66 | 66 | TabOrder = 3 |
67 | 67 | OnChange = OptionTabChange |
68 | 68 | object ConnectSheet: TTabSheet |
@@ -252,7 +252,7 @@ object OptionDialog: TOptionDialog | ||
252 | 252 | Top = 43 |
253 | 253 | Width = 417 |
254 | 254 | Height = 20 |
255 | - ItemHeight = 12 | |
255 | + ItemHeight = 0 | |
256 | 256 | TabOrder = 0 |
257 | 257 | Text = 'BoardURLComboBox' |
258 | 258 | end |
@@ -654,7 +654,7 @@ object OptionDialog: TOptionDialog | ||
654 | 654 | Left = 12 |
655 | 655 | Top = 8 |
656 | 656 | Width = 477 |
657 | - Height = 41 | |
657 | + Height = 64 | |
658 | 658 | Caption = #34920#31034#35373#23450 |
659 | 659 | TabOrder = 0 |
660 | 660 | object ThreadListIconCheckBox: TCheckBox |
@@ -665,10 +665,18 @@ object OptionDialog: TOptionDialog | ||
665 | 665 | Caption = #12473#12524#12483#12489#26356#26032#12450#12452#12467#12531#12434#34920#31034#12377#12427'(&I)' |
666 | 666 | TabOrder = 0 |
667 | 667 | 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 | |
668 | 676 | end |
669 | 677 | object GroupBox16: TGroupBox |
670 | 678 | Left = 12 |
671 | - Top = 52 | |
679 | + Top = 76 | |
672 | 680 | Width = 477 |
673 | 681 | Height = 64 |
674 | 682 | Caption = #12473#12524#20316#25104#26085#26178#34920#31034#35373#23450 |
@@ -692,7 +700,7 @@ object OptionDialog: TOptionDialog | ||
692 | 700 | end |
693 | 701 | object GroupBox5: TGroupBox |
694 | 702 | Left = 12 |
695 | - Top = 121 | |
703 | + Top = 145 | |
696 | 704 | Width = 477 |
697 | 705 | Height = 86 |
698 | 706 | Caption = #12502#12521#12454#12470#12398#26368#22823#21270 |
@@ -720,7 +728,7 @@ object OptionDialog: TOptionDialog | ||
720 | 728 | end |
721 | 729 | object GroupBox17: TGroupBox |
722 | 730 | Left = 12 |
723 | - Top = 212 | |
731 | + Top = 236 | |
724 | 732 | Width = 477 |
725 | 733 | Height = 63 |
726 | 734 | Caption = #12502#12521#12454#12470#12479#12502#38750#34920#31034#26178#35373#23450 |
@@ -758,9 +766,9 @@ object OptionDialog: TOptionDialog | ||
758 | 766 | end |
759 | 767 | object GroupBox18: TGroupBox |
760 | 768 | Left = 12 |
761 | - Top = 278 | |
769 | + Top = 302 | |
762 | 770 | Width = 477 |
763 | - Height = 43 | |
771 | + Height = 41 | |
764 | 772 | Caption = 'dat'#33853#12385#12473#12524#12477#12540#12488#38918 |
765 | 773 | TabOrder = 4 |
766 | 774 | object DatOchiSortCombo: TComboBox |
@@ -778,9 +786,7 @@ object OptionDialog: TOptionDialog | ||
778 | 786 | #21462#24471#26085#26178'('#26119#38918')' |
779 | 787 | #21462#24471#26085#26178'('#38477#38918')' |
780 | 788 | #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')') | |
784 | 790 | end |
785 | 791 | end |
786 | 792 | end |
@@ -90,6 +90,7 @@ type | ||
90 | 90 | TabSheet3: TTabSheet; |
91 | 91 | GroupBox9: TGroupBox; |
92 | 92 | ThreadListIconCheckBox: TCheckBox; |
93 | + NonAcquiredCountCheckBox: TCheckBox; | |
93 | 94 | GroupBox16: TGroupBox; |
94 | 95 | CreationTimeLogsCheckBox: TCheckBox; |
95 | 96 | FutureThreadCheckBox: TCheckBox; |
@@ -765,32 +766,28 @@ begin | ||
765 | 766 | |
766 | 767 | //スレッド一覧更新アイコン |
767 | 768 | ThreadListIconCheckBox.Checked := GikoSys.Setting.ListIconVisible; |
769 | + NonAcquiredCountCheckBox.Checked := GikoSys.Setting.NonAcquiredCount; | |
768 | 770 | CreationTimeLogsCheckBox.Checked := GikoSys.Setting.CreationTimeLogs; |
769 | 771 | FutureThreadCheckBox.Checked := GikoSys.Setting.FutureThread; |
770 | 772 | SelectIntervalEdit.Text := IntToStr(GikoSys.Setting.SelectInterval); |
771 | 773 | |
772 | 774 | //dat落ちスレソート順 |
773 | - case TGikoBoardColumnID( GikoSys.Setting.DatOchiSortIndex ) of | |
774 | - gbcTitle: | |
775 | + case GikoSys.Setting.DatOchiSortIndex of | |
776 | + 0: | |
775 | 777 | if GikoSys.Setting.DatOchiSortOrder then |
776 | 778 | DatOchiSortCombo.ItemIndex := 1 |
777 | 779 | else |
778 | 780 | DatOchiSortCombo.ItemIndex := 2; |
779 | - gbcRoundDate://gbcLastModified: | |
781 | + 6: | |
780 | 782 | if GikoSys.Setting.DatOchiSortOrder then |
781 | 783 | DatOchiSortCombo.ItemIndex := 3 |
782 | 784 | else |
783 | 785 | DatOchiSortCombo.ItemIndex := 4; |
784 | - gbcCreated: | |
786 | + 7: | |
785 | 787 | if GikoSys.Setting.DatOchiSortOrder then |
786 | 788 | DatOchiSortCombo.ItemIndex := 5 |
787 | 789 | else |
788 | 790 | DatOchiSortCombo.ItemIndex := 6; |
789 | - gbcLastModified: | |
790 | - if GikoSys.Setting.DatOchiSortOrder then | |
791 | - DatOchiSortCombo.ItemIndex := 7 | |
792 | - else | |
793 | - DatOchiSortCombo.ItemIndex := 8; | |
794 | 791 | else |
795 | 792 | DatOchiSortCombo.ItemIndex := 0; |
796 | 793 | end; |
@@ -805,6 +802,7 @@ begin | ||
805 | 802 | |
806 | 803 | //TabAutoLoad |
807 | 804 | TabLoadSave.Checked := Gikosys.Setting.TabAutoLoadSave; |
805 | + | |
808 | 806 | end; |
809 | 807 | |
810 | 808 | procedure TOptionDialog.SaveSetting; |
@@ -997,6 +995,11 @@ begin | ||
997 | 995 | //スレッド一覧更新アイコン |
998 | 996 | GikoSys.Setting.ListIconVisible := ThreadListIconCheckBox.Checked; |
999 | 997 | |
998 | + //取得数、未取得数 | |
999 | + if (GikoSys.Setting.NonAcquiredCount <> NonAcquiredCountCheckBox.Checked) and (GikoForm.ActiveList Is TBoard) then | |
1000 | + FRepaintList := true; | |
1001 | + GikoSys.Setting.NonAcquiredCount := NonAcquiredCountCheckBox.Checked; | |
1002 | + | |
1000 | 1003 | GikoSys.Setting.CreationTimeLogs := CreationTimeLogsCheckBox.Checked; |
1001 | 1004 | GikoSys.Setting.FutureThread := FutureThreadCheckBox.Checked; |
1002 | 1005 | if StrToIntDef(SelectIntervalEdit.Text, 110) > 55 then |
@@ -1009,36 +1012,28 @@ begin | ||
1009 | 1012 | 0: GikoSys.Setting.DatOchiSortIndex := -1; //並び替えしない |
1010 | 1013 | 1: begin //スレ番号(昇順) |
1011 | 1014 | GikoSys.Setting.DatOchiSortOrder := true; |
1012 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcTitle ); | |
1015 | + GikoSys.Setting.DatOchiSortIndex := 0; | |
1013 | 1016 | end; |
1014 | 1017 | 2: begin //スレ番号(降順) |
1015 | 1018 | GikoSys.Setting.DatOchiSortOrder := false; |
1016 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcTitle ); | |
1019 | + GikoSys.Setting.DatOchiSortIndex := 0; | |
1017 | 1020 | end; |
1018 | 1021 | 3: begin //取得日時(昇順) |
1019 | 1022 | GikoSys.Setting.DatOchiSortOrder := true; |
1020 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcRoundDate );{gbcLastModified} | |
1023 | + GikoSys.Setting.DatOchiSortIndex := 6; | |
1021 | 1024 | end; |
1022 | 1025 | 4: begin //取得日時(降順) |
1023 | 1026 | GikoSys.Setting.DatOchiSortOrder := false; |
1024 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcRoundDate );{gbcLastModified} | |
1027 | + GikoSys.Setting.DatOchiSortIndex := 6; | |
1025 | 1028 | end; |
1026 | 1029 | 5: begin //スレ作成日時(昇順) |
1027 | 1030 | GikoSys.Setting.DatOchiSortOrder := true; |
1028 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcCreated ); | |
1031 | + GikoSys.Setting.DatOchiSortIndex := 7; | |
1029 | 1032 | end; |
1030 | 1033 | 6: begin //スレ作成日時(降順) |
1031 | 1034 | GikoSys.Setting.DatOchiSortOrder := false; |
1032 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcCreated ); | |
1035 | + GikoSys.Setting.DatOchiSortIndex := 7; | |
1033 | 1036 | 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; | |
1042 | 1037 | end; |
1043 | 1038 | |
1044 | 1039 | GikoSys.Setting.WriteSystemSettingFile; |
@@ -55,62 +55,6 @@ type | ||
55 | 55 | /// スレッド一覧表示範囲 |
56 | 56 | TGikoThreadRange = (gtrAll, gtrSelect, gtrLog, gtrNew); |
57 | 57 | |
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 | |
114 | 58 | //CoolBar設定レコード |
115 | 59 | TCoolSet = record |
116 | 60 | FCoolID: Integer; |
@@ -271,15 +215,8 @@ type | ||
271 | 215 | |
272 | 216 | //リストカラムヘッダーサイズ |
273 | 217 | 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; | |
283 | 220 | |
284 | 221 | //ソート順 |
285 | 222 | FBBSSortIndex: Integer; |
@@ -346,6 +283,8 @@ type | ||
346 | 283 | |
347 | 284 | //スレッド一覧更新アイコン表示 |
348 | 285 | FListIconVisible: Boolean; |
286 | + //取得数ではなく未取得を表示する | |
287 | + FNonAcquiredCount: Boolean; | |
349 | 288 | |
350 | 289 | //スレッド一覧でLogのあるスレッドのみスレ作成日を表示するか |
351 | 290 | FCreationTimeLogs: Boolean; |
@@ -390,19 +329,12 @@ type | ||
390 | 329 | |
391 | 330 | //Tab自動保存 |
392 | 331 | FTabAutoLoadSave : Boolean; |
393 | - | |
394 | - //にちゃん語案内サポート機能 | |
395 | - F2chSupport : Boolean; | |
396 | - | |
397 | 332 | // エディタ |
398 | 333 | FSpaceToNBSP : Boolean; ///< 半角スペース、Tab を に置換 |
399 | 334 | FAmpToCharRef : Boolean; ///< '&' を & に置換 |
400 | 335 | |
401 | 336 | //ブラウザタブ非表示の時のスレ一覧でのカーソルキー移動の無反応時間 |
402 | 337 | FSelectInterval : Integer; |
403 | - | |
404 | - //KuroutSettingTab 詳細設定タブのActiveTab | |
405 | - FKuroutSettingTabIndex: Integer; | |
406 | 338 | |
407 | 339 | function GetMainCoolSet(Index: Integer): TCoolSet; |
408 | 340 | function GetBoardCoolSet(Index: Integer): TCoolSet; |
@@ -594,10 +526,6 @@ type | ||
594 | 526 | property CategoryColumnWidth[index: Integer]: Integer read GetCategoryColumnWidth write SetCategoryColumnWidth; |
595 | 527 | property BoardColumnWidth[index: Integer]: Integer read GetBoardColumnWidth write SetBoardColumnWidth; |
596 | 528 | |
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 | - | |
601 | 529 | property SoundName[index: Integer]: string read GetSoundName; |
602 | 530 | property SoundViewName[index: Integer]: string read GetSoundViewName; |
603 | 531 | property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName; |
@@ -648,6 +576,7 @@ type | ||
648 | 576 | property BrowserAutoMaximize: TGikoBrowserAutoMaximize read FBrowserAutoMaximize write FBrowserAutoMaximize; |
649 | 577 | |
650 | 578 | property ListIconVisible: Boolean read FListIconVisible write FListIconVisible; |
579 | + property NonAcquiredCount: Boolean read FNonAcquiredCount write FNonAcquiredCount; | |
651 | 580 | property CreationTimeLogs: Boolean read FCreationTimeLogs write FCreationTimeLogs; |
652 | 581 | property FutureThread: Boolean read FFutureThread write FFutureThread; |
653 | 582 |
@@ -685,10 +614,8 @@ type | ||
685 | 614 | property AmpToCharRef : Boolean read FAmpToCharRef write FAmpToCharRef; |
686 | 615 | |
687 | 616 | 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; | |
692 | 619 | end; |
693 | 620 | |
694 | 621 |
@@ -727,81 +654,6 @@ var | ||
727 | 654 | (Name: 'ResEnd'; ViewName: 'レス送信完了'; FileName: ''), |
728 | 655 | (Name: 'Error'; ViewName: 'エラー'; FileName: '')); |
729 | 656 | |
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 | - | |
805 | 657 | //コンストラクタ |
806 | 658 | constructor TSetting.Create(); |
807 | 659 | begin |
@@ -809,9 +661,6 @@ begin | ||
809 | 661 | FMailList := TStringList.Create; |
810 | 662 | FSelectTextList := TStringList.Create; |
811 | 663 | FBoardURLs := TStringList.Create; |
812 | - FBBSColumnOrder := TGikoBBSColumnList.Create; | |
813 | - FCategoryColumnOrder := TGikoCategoryColumnList.Create; | |
814 | - FBoardColumnOrder := TGikoBoardColumnList.Create; | |
815 | 664 | FNameList.Duplicates := dupIgnore; |
816 | 665 | FMailList.Duplicates := dupIgnore; |
817 | 666 | FBoardURLs.Duplicates := dupIgnore; |
@@ -824,9 +673,6 @@ end; | ||
824 | 673 | destructor TSetting.Destroy(); |
825 | 674 | begin |
826 | 675 | inherited; |
827 | - FBoardColumnOrder.Free; | |
828 | - FCategoryColumnOrder.Free; | |
829 | - FBBSColumnOrder.Free; | |
830 | 676 | FSelectTextList.Free; |
831 | 677 | FBoardURLs.Free; |
832 | 678 | FMailList.Free; |
@@ -849,17 +695,16 @@ end; | ||
849 | 695 | procedure TSetting.ReadSettingFile(); |
850 | 696 | const |
851 | 697 | 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); | |
854 | 700 | MAX_WIDTH: Integer = 2000; |
855 | 701 | var |
856 | 702 | ini: TMemIniFile; |
857 | 703 | i: Integer; |
858 | - id, code : Integer; | |
859 | 704 | wkList: TStringList; |
860 | 705 | wkStr: string; |
861 | 706 | Exists: Boolean; |
862 | - s: string; | |
707 | + s: string; | |
863 | 708 | // id: Integer; |
864 | 709 | CoolSet: TCoolSet; |
865 | 710 | begin |
@@ -1006,7 +851,7 @@ begin | ||
1006 | 851 | wkList.Free; |
1007 | 852 | end; |
1008 | 853 | |
1009 | - // リストカラム幅 | |
854 | + //リストカラム | |
1010 | 855 | wkList := TStringList.Create; |
1011 | 856 | try |
1012 | 857 | ini.ReadSection('BBSColumnWidth', wkList); |
@@ -1040,51 +885,6 @@ begin | ||
1040 | 885 | wkList.Free; |
1041 | 886 | end; |
1042 | 887 | |
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 | - | |
1088 | 888 | //リスト番号 |
1089 | 889 | FListViewNo := ini.ReadBool('Function', 'ListViewNo', True); |
1090 | 890 | //CSS |
@@ -1098,7 +898,7 @@ begin | ||
1098 | 898 | if ini.ReadBool('Thread', 'OnlyAHundredRes',false) then |
1099 | 899 | FResRange := 100 // 古い設定の互換用 |
1100 | 900 | else |
1101 | - FResRange := ini.ReadInteger( 'Thread', 'ResRange', Ord( grrAll ) ); | |
901 | + FResRange := ini.ReadInteger( 'Thread', 'ResRange', 100 ); | |
1102 | 902 | FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False ); |
1103 | 903 | // スレッド一覧表示範囲 |
1104 | 904 | FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) ); |
@@ -1158,6 +958,7 @@ begin | ||
1158 | 958 | |
1159 | 959 | //スレッド一覧更新アイコン |
1160 | 960 | FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True); |
961 | + FNonAcquiredCount := ini.ReadBool('ThreadList', 'NonAcquiredCount', False); | |
1161 | 962 | FCreationTimeLogs := ini.ReadBool('ThreadList', 'CreationTimeLogs', True); |
1162 | 963 | FFutureThread := ini.ReadBool('ThreadList', 'FutureThread', True); |
1163 | 964 | FSelectInterval := ini.ReadInteger('ThreadList', 'SelectInterval', 110); |
@@ -1223,13 +1024,11 @@ begin | ||
1223 | 1024 | FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false); |
1224 | 1025 | |
1225 | 1026 | // エディタ |
1226 | - FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', False ); | |
1027 | + FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', True ); | |
1227 | 1028 | FAmpToCharRef := ini.ReadBool( 'Editor', 'AmpToCharRef', False ); |
1228 | 1029 | |
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); | |
1233 | 1032 | |
1234 | 1033 | |
1235 | 1034 | finally |
@@ -1330,7 +1129,6 @@ var | ||
1330 | 1129 | i: Integer; |
1331 | 1130 | ini: TMemIniFile; |
1332 | 1131 | CoolSet: TCoolSet; |
1333 | - wkList : TStringList; | |
1334 | 1132 | begin |
1335 | 1133 | ini := TMemIniFile.Create(GetFileName()); |
1336 | 1134 | try |
@@ -1452,11 +1250,11 @@ begin | ||
1452 | 1250 | ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible); |
1453 | 1251 | ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize)); |
1454 | 1252 | ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait); |
1455 | - | |
1456 | - ini.WriteInteger('Window', 'BrowserAutoMaximize', Ord( BrowserAutoMaximize ) ); | |
1253 | + ini.WriteInteger('Browser', 'AutoMaximize', Ord( FBrowserAutoMaximize ) ); | |
1457 | 1254 | |
1458 | 1255 | //スレッド一覧更新アイコン |
1459 | 1256 | ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible); |
1257 | + ini.WriteBool('ThreadList', 'NonAcquiredCount', FNonAcquiredCount); | |
1460 | 1258 | ini.WriteBool('ThreadList', 'CreationTimeLogs',FCreationTimeLogs); |
1461 | 1259 | ini.WriteBool('ThreadList', 'FutureThread', FFutureThread); |
1462 | 1260 | ini.WriteInteger('ThreadList', 'SelectInterval', FSelectInterval); |
@@ -1475,7 +1273,7 @@ begin | ||
1475 | 1273 | ini.WriteInteger('PostTime', 'TimeAdjustSec', FTimeAdjustSec); |
1476 | 1274 | ini.WriteBool('PostTime', 'TimeAdjust', FTimeAdjust); |
1477 | 1275 | |
1478 | - // リストカラム幅 | |
1276 | + //リストカラム | |
1479 | 1277 | for i := 0 to Length(FBBSColumnWidth) - 1 do begin |
1480 | 1278 | ini.WriteInteger('BBSColumnWidth', 'ID' + IntToStr(i), FBBSColumnWidth[i]); |
1481 | 1279 | end; |
@@ -1486,32 +1284,6 @@ begin | ||
1486 | 1284 | ini.WriteInteger('BoardColumnWidth', 'ID' + IntToStr(i), FBoardColumnWidth[i]); |
1487 | 1285 | end; |
1488 | 1286 | |
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 | - | |
1515 | 1287 | //サウンド |
1516 | 1288 | for i := 0 to GetSoundCount - 1 do begin |
1517 | 1289 | if not FileExists(SoundFileName[i]) then |
@@ -1555,15 +1327,9 @@ begin | ||
1555 | 1327 | ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP ); |
1556 | 1328 | ini.WriteBool( 'Editor', 'AmpToCharRef', FAmpToCharRef ); |
1557 | 1329 | |
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); | |
1565 | 1331 | |
1566 | - ini.UpdateFile; | |
1332 | + ini.UpdateFile; | |
1567 | 1333 | finally |
1568 | 1334 | ini.Free; |
1569 | 1335 | end; |
@@ -3,8 +3,7 @@ unit Sort; | ||
3 | 3 | interface |
4 | 4 | uses |
5 | 5 | Windows, Messages, SysUtils, Classes, Controls, Forms, |
6 | - BoardGroup,DateUtils, | |
7 | - Setting; | |
6 | + BoardGroup,DateUtils; | |
8 | 7 | |
9 | 8 | function CategorySortProc(Item1, Item2: Pointer): integer; |
10 | 9 | function BoardSortProc(List: TStringList; Item1, Item2: Integer): integer; |
@@ -17,6 +16,7 @@ var | ||
17 | 16 | SortOrder: Boolean; |
18 | 17 | SortIndex: Integer; |
19 | 18 | SortNoFlag: Boolean; |
19 | + SortNonAcquiredCountFlag: Boolean; | |
20 | 20 | |
21 | 21 | implementation |
22 | 22 |
@@ -28,15 +28,10 @@ begin | ||
28 | 28 | CategoryItem1 := TCategory(Item1); |
29 | 29 | CategoryItem2 := TCategory(Item2); |
30 | 30 | |
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 | |
38 | 32 | Result := CompareInt(CategoryItem1.No, CategoryItem2.No) |
39 | - end; | |
33 | + else | |
34 | + Result := AnsiCompareText(CategoryItem1.Title, CategoryItem2.Title); | |
40 | 35 | |
41 | 36 | if not SortOrder then |
42 | 37 | Result := Result * -1; |
@@ -49,21 +44,15 @@ var | ||
49 | 44 | begin |
50 | 45 | BoardItem1 := TBoard(List.Objects[Item1]); |
51 | 46 | BoardItem2 := TBoard(List.Objects[Item2]); |
52 | - case TGikoCategoryColumnID( SortIndex ) of | |
53 | - gccTitle: | |
47 | + if SortIndex = 0 then | |
54 | 48 | if SortNoFlag then |
55 | 49 | Result := CompareInt(BoardItem1.No, BoardItem2.No) |
56 | 50 | 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 | |
63 | 55 | Result := CompareDate(BoardItem1.RoundDate, BoardItem2.RoundDate); |
64 | - else | |
65 | - Result := CompareInt(BoardItem1.No, BoardItem2.No) | |
66 | - end; | |
67 | 56 | |
68 | 57 | if not SortOrder then |
69 | 58 | Result := Result * -1; |
@@ -76,35 +65,34 @@ var | ||
76 | 65 | begin |
77 | 66 | ThreadItem1 := TThreadItem(List.Objects[ Item1 ]); |
78 | 67 | ThreadItem2 := TThreadItem(List.Objects[ Item2 ]); |
79 | - case TGikoBoardColumnID( SortIndex ) of | |
80 | - gbcTitle: | |
68 | + case SortIndex of | |
69 | + 0: | |
81 | 70 | begin |
82 | 71 | if SortNoFlag then |
83 | 72 | Result := CompareInt(ThreadItem1.No, ThreadItem2.No) |
84 | 73 | else |
85 | 74 | Result := AnsiCompareText(ThreadItem1.Title, ThreadItem2.Title) |
86 | 75 | 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: | |
91 | 78 | 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 | |
98 | 88 | else |
99 | - Result := 0; | |
89 | + Result := CompareInt(ThreadItem1.Count, ThreadItem2.Count); | |
100 | 90 | 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); | |
108 | 96 | else |
109 | 97 | Result := 0; |
110 | 98 | end; |
@@ -9,8 +9,7 @@ interface | ||
9 | 9 | uses |
10 | 10 | //================================================== |
11 | 11 | |
12 | - Classes, SysUtils, | |
13 | - Windows; | |
12 | + Classes, SysUtils; | |
14 | 13 | |
15 | 14 | procedure ExtractHttpFields( |
16 | 15 | const chrSep : TSysCharSet; |
@@ -40,61 +39,11 @@ function MatchesMask( | ||
40 | 39 | const filename, mask : string |
41 | 40 | ) : boolean; |
42 | 41 | |
43 | -/// メタキャラクタを正規表現扱いにならないように置換 | |
42 | +// メタキャラクタを正規表現扱いにならないように置換 | |
44 | 43 | function RegExpEncode( |
45 | 44 | const text : string |
46 | 45 | ) : string; |
47 | 46 | |
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 | - | |
98 | 47 | //================================================== |
99 | 48 | const |
100 | 49 | //================================================== |
@@ -104,8 +53,6 @@ const | ||
104 | 53 | implementation |
105 | 54 | //================================================== |
106 | 55 | |
107 | -uses MojuUtils; | |
108 | - | |
109 | 56 | // とりあえずの代用品なので chrWhite を考慮していないことに注意!!! |
110 | 57 | procedure ExtractHttpFields( |
111 | 58 | const chrSep : TSysCharSet; |
@@ -420,97 +367,4 @@ begin | ||
420 | 367 | |
421 | 368 | end; |
422 | 369 | |
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 | - | |
516 | 370 | end. |
@@ -8,14 +8,13 @@ comic6=30 | ||
8 | 8 | etc3=20 |
9 | 9 | ex5=10 |
10 | 10 | ex7=10 |
11 | -ex8=90 | |
11 | +ex8=10 | |
12 | 12 | food6=20 |
13 | +game6=20 | |
13 | 14 | game7=45 |
14 | 15 | game8=45 |
15 | -game9=45 | |
16 | 16 | hobby5=30 |
17 | 17 | hobby6=30 |
18 | -hobby7=30 | |
19 | 18 | human5=20 |
20 | 19 | life5=20 |
21 | 20 | life6=20 |
@@ -23,32 +22,29 @@ live8=10 | ||
23 | 22 | live13=10 |
24 | 23 | live14=10 |
25 | 24 | live15=10 |
26 | -live16=10 | |
27 | -live17=10 | |
28 | 25 | love3=20 |
29 | 26 | money3=20 |
30 | 27 | music4=20 |
31 | -news13=90 | |
28 | +news11=20 | |
29 | +news13=20 | |
32 | 30 | news15=20 |
33 | 31 | news16=20 |
34 | 32 | news17=20 |
35 | 33 | news18=20 |
36 | -news19=120 | |
37 | 34 | off3=20 |
38 | 35 | pc5=20 |
39 | 36 | pc6=20 |
40 | 37 | qb5=60 |
41 | -qb6=20 | |
38 | +qb6=0 | |
42 | 39 | school4=20 |
43 | 40 | science3=20 |
44 | 41 | society3=20 |
45 | 42 | sports2=0 |
46 | -sports7=60 | |
43 | +sports7=30 | |
47 | 44 | that3=20 |
45 | +tmp3=20 | |
48 | 46 | tmp4=20 |
49 | 47 | travel2=20 |
50 | 48 | tv6=30 |
51 | 49 | pie=30 |
52 | 50 | idol=30 |
53 | -sakura01=10 | |
54 | -sakura02=10 |
@@ -1,4 +1,4 @@ | ||
1 | -■ギコナビ Version1.00 バタ49 Readme.txt | |
1 | +■ギコナビ Version1.00 バタ48 Readme.txt | |
2 | 2 | |
3 | 3 | |
4 | 4 | ------------------------------ |
@@ -41,7 +41,7 @@ | ||
41 | 41 | ------------------------------ |
42 | 42 | バグや要望は、ギコナビスレッドで受け付けております。 |
43 | 43 | ギコナビサイト: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 | |
45 | 45 | |
46 | 46 | ------------------------------ |
47 | 47 | 転載について |
@@ -89,28 +89,13 @@ Windows Server 2003 Enterprise Edition IE6 | ||
89 | 89 | ------------------------------ |
90 | 90 | 履歴 |
91 | 91 | ------------------------------ |
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 | |
108 | 93 | Version バタ48 |
109 | 94 | レスポップアップあぼ〜ん有効にしていても、透明あぼ〜んを表示する不具合の解消 |
110 | 95 | *.tmpファイルの処理の不具合修正 |
111 | 96 | 透明あぼ〜んが入ると新着タグとここまで読んだタグが挿入されない不具合の修正 |
112 | 97 | Shiftキーを押しながら板/スレを更新すると強制取得するようにした |
113 | - 最後に表示したスレッドから5つのスレッドは、高速でタブの切り替えができるようにした。 | |
98 | + 複数ブラウザを作って、高速でタブの切り替えができるようにした。 | |
114 | 99 | ●の認証のURLを新サーバに変更 |
115 | 100 | 3ペインそれぞれにフォーカスを当てるショートカットを追加 |
116 | 101 | 標準でレスアンカーをクリックするとそのレスに飛ぶ機能を追加 |
@@ -77,11 +77,13 @@ Folder=gikoNavi | ||
77 | 77 | 74=config\skin\skin30-3G\NewRes.html |
78 | 78 | 75=config\skin\skin30-3G\Res.html |
79 | 79 | 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 | |
85 | 87 | |
86 | 88 | [Group] |
87 | 89 | 1=ギコナビ,gikoNavi.exe |
@@ -3,7 +3,7 @@ library ShitarabaJBBSPlugIn; | ||
3 | 3 | { |
4 | 4 | ShitarabaJBBSPlugIn |
5 | 5 | したらば処理ユニット |
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 $ | |
7 | 7 | } |
8 | 8 | |
9 | 9 | uses |
@@ -33,7 +33,7 @@ type | ||
33 | 33 | |
34 | 34 | private |
35 | 35 | function Download : TDownloadState; |
36 | - function StorageDownload(AURL : string) : TDownloadState; | |
36 | + function StorageDownload(Path, Document : string) : TDownloadState; | |
37 | 37 | function Write( inName : string; inMail : string; inMessage : string ) : TDownloadState; |
38 | 38 | function GetRes( inNo : Integer ) : string; |
39 | 39 | function GetDat( inNo : Integer ) : string; |
@@ -281,8 +281,7 @@ var | ||
281 | 281 | // i : Integer; |
282 | 282 | const |
283 | 283 | 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'; | |
286 | 285 | THREAD_MARK = '/bbs/read.cgi'; |
287 | 286 | begin |
288 | 287 |
@@ -291,7 +290,7 @@ begin | ||
291 | 290 | uri := TIdURI.Create( inURL ); |
292 | 291 | uriList := TStringList.Create; |
293 | 292 | try |
294 | - if (uri.Host = BBS_HOST_OLD) or (uri.Host = BBS_HOST_OLD2) then | |
293 | + if uri.Host = BBS_HOST_OLD then | |
295 | 294 | uri.Host := BBS_HOST; |
296 | 295 | |
297 | 296 | ExtractHttpFields( ['/'], [], uri.Path, uriList ); |
@@ -350,13 +349,12 @@ var | ||
350 | 349 | |
351 | 350 | found : Integer; |
352 | 351 | found2 : Integer; |
353 | - pos : Integer; | |
354 | 352 | board : string; |
355 | 353 | const |
356 | 354 | CATEGORY_INPUT = 'カテゴリを入力してください'; |
357 | 355 | KEYWORD_INPUT = '検索する板名を入力してください'; |
358 | 356 | SAVEPATH_SELECT = '保存するファイル名を入力してください'; |
359 | - BBS_HOST = 'http://jbbs.livedoor.jp/'; | |
357 | + BBS_HOST = 'http://jbbs.livedoor.com/'; | |
360 | 358 | label |
361 | 359 | NextBoard; |
362 | 360 | begin |
@@ -439,12 +437,8 @@ begin | ||
439 | 437 | |
440 | 438 | saveText.Add( board ); |
441 | 439 | NextBoard: |
442 | - found := AnsiPos( '<a ', downResult ); | |
440 | + found := AnsiPos( '<a ', downResult ); | |
443 | 441 | end; |
444 | - pos := saveText.IndexOf('JBBS=/'); | |
445 | - if pos > 0 then | |
446 | - saveText.Delete(pos); | |
447 | - | |
448 | 442 | saveText.SaveToFile( savepath ); |
449 | 443 | saveText.Free; |
450 | 444 | end else begin |
@@ -505,14 +499,22 @@ begin | ||
505 | 499 | uriList := TStringList.Create; |
506 | 500 | try |
507 | 501 | 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; | |
515 | 516 | IsLogFile := FileExists( FilePath ); |
517 | + | |
516 | 518 | end; |
517 | 519 | finally |
518 | 520 | uri.Free; |
@@ -549,109 +551,97 @@ var | ||
549 | 551 | logStream : TFileStream; |
550 | 552 | uri : TIdURI; |
551 | 553 | uriList : TStringList; |
552 | - datURL, tmpURL : string; | |
553 | - tmpText: string; | |
554 | + datURL : string; | |
555 | + tmpText: string; | |
554 | 556 | begin |
555 | 557 | |
556 | 558 | Result := dsError; |
557 | 559 | |
558 | 560 | 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); | |
574 | 564 | 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; | |
577 | 585 | |
578 | - // 保存用のディレクトリを掘る | |
579 | - ForceDirectoriesEx( Copy( FilePath, 1, LastDelimiter( '\', FilePath ) ) ); | |
586 | + // 保存用のディレクトリを掘る | |
587 | + ForceDirectoriesEx( Copy( FilePath, 1, LastDelimiter( '\', FilePath ) ) ); | |
580 | 588 | |
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 ); | |
586 | 594 | |
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; | |
605 | 613 | |
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; | |
612 | 620 | |
613 | - Size := Size + Length( downResult.Text ); | |
614 | - // CGI からは正しい日付が得られないので現在に設定 | |
615 | - LastModified := Now; | |
621 | + Size := Size + Length( downResult.Text ); | |
622 | + // CGI からは正しい日付が得られないので現在に設定 | |
623 | + LastModified := Now; | |
616 | 624 | |
617 | 625 | |
618 | 626 | |
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; | |
622 | 630 | |
623 | 631 | |
624 | 632 | |
625 | - end else begin | |
626 | - Result := dsNotModify; | |
633 | + end else begin | |
634 | + Result := dsNotModify; | |
635 | + end; | |
636 | + finally | |
637 | + downResult.Free; | |
627 | 638 | end; |
628 | - finally | |
629 | - downResult.Free; | |
639 | + end else if responseCode = 304 then begin | |
640 | + Result := dsNotModify; | |
630 | 641 | 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 ); | |
652 | 644 | end; |
653 | - finally | |
654 | - DisposeResultString( tmp ); | |
655 | 645 | end; |
656 | 646 | |
657 | 647 | end; |
@@ -691,16 +681,17 @@ end; | ||
691 | 681 | // 過去ログ用Download関数 |
692 | 682 | // ************************************************************************* |
693 | 683 | function TShitarabaThreadItem.StorageDownload( |
694 | - AURL : string | |
684 | + Path, Document : string | |
695 | 685 | ) : TDownloadState; |
696 | 686 | var |
697 | 687 | modified : Double; |
698 | 688 | tmp : PChar; |
699 | - uri : TIdURI; | |
700 | - uriList : TStringList; | |
701 | 689 | downResult : TStringList; |
702 | 690 | responseCode : Longint; |
703 | 691 | logStream : TFileStream; |
692 | + //uri : TIdURI; | |
693 | + //uriList : TStringList; | |
694 | + datURL : string; | |
704 | 695 | tmpText, tmpLine, tmpTitle: string; |
705 | 696 | tmpHTML: TStringList; |
706 | 697 |
@@ -709,24 +700,23 @@ var | ||
709 | 700 | begin |
710 | 701 | |
711 | 702 | Result := dsError; |
712 | - uri := TIdURI.Create( ReadURL ); | |
713 | - uriList := TStringList.Create; | |
703 | + | |
704 | + //uri := TIdURI.Create( ReadURL ); | |
714 | 705 | 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'; | |
719 | 707 | if MyLogFolder = '' then begin |
720 | 708 | // どこに保存していいのか分からないので一時ファイルに保存 |
721 | 709 | FilePath := TemporaryFile; |
722 | 710 | FIsTemporary := True; |
723 | 711 | end else begin |
724 | - FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat'; | |
712 | + FilePath := MyLogFolder | |
713 | + + CustomStringReplace(CustomStringReplace(Path, '/storage', ''), '/', '\') | |
714 | + + FileName; | |
715 | + | |
725 | 716 | FIsTemporary := False; |
726 | 717 | end; |
727 | 718 | finally |
728 | - uri.Free; | |
729 | - uriList.Free; | |
719 | + //uri.Free; | |
730 | 720 | end; |
731 | 721 | |
732 | 722 | // 保存用のディレクトリを掘る |
@@ -738,7 +728,8 @@ begin | ||
738 | 728 | // InternalDownload に任せることが出来る |
739 | 729 | modified := LastModified; |
740 | 730 | |
741 | - responseCode := InternalDownload( PChar( AURL ), modified, tmp, 0 ); | |
731 | + datURL := ReadURL; | |
732 | + responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 ); | |
742 | 733 | |
743 | 734 | try |
744 | 735 | if (responseCode = 200) or (responseCode = 206) then begin |
@@ -803,7 +794,7 @@ begin | ||
803 | 794 | end; |
804 | 795 | tmpHTML.Delete(i); |
805 | 796 | end; |
806 | - j := 0; | |
797 | + j := 0; | |
807 | 798 | for i := 0 to tmpHTML.Count - 1 do begin |
808 | 799 | tmpLine := AnsiLowerCase(tmpHTML[i]); |
809 | 800 | tS := AnsiPos('<dl>', tmpLine); |
@@ -924,27 +915,31 @@ begin | ||
924 | 915 | |
925 | 916 | if downResult.Count > 0 then begin |
926 | 917 | 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 ); | |
930 | 921 | try |
931 | - logStream.Position := 0; | |
922 | + logStream.Position := logStream.Size; | |
932 | 923 | logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) ); |
933 | 924 | finally |
934 | 925 | logStream.Free; |
935 | 926 | end; |
936 | 927 | |
937 | - // 新規 | |
938 | - Result := dsComplete; | |
928 | + if Count = 0 then | |
929 | + // 新規 | |
930 | + Result := dsComplete | |
931 | + else | |
932 | + // 追記 | |
933 | + Result := dsDiffComplete; | |
939 | 934 | |
940 | - Size := Length( downResult.Text ); | |
935 | + Size := Size + Length( downResult.Text ); | |
941 | 936 | // CGI からは正しい日付が得られないので現在に設定 |
942 | 937 | LastModified := Now; |
943 | 938 | |
944 | 939 | |
945 | 940 | |
946 | - NewReceive := 1; | |
947 | - Count := downResult.Count; | |
941 | + NewReceive := Count + 1; | |
942 | + Count := Count + downResult.Count; | |
948 | 943 | NewResCount := downResult.Count; |
949 | 944 | //http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1086710948/l100 |
950 | 945 | //http://jbbs.livedoor.com/game/1578/storage/1086710948.html |
@@ -1149,8 +1144,7 @@ var | ||
1149 | 1144 | tmphost: String; |
1150 | 1145 | const |
1151 | 1146 | 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'; | |
1154 | 1148 | begin |
1155 | 1149 | |
1156 | 1150 | uri := TIdURI.Create( ReadURL ); |
@@ -1160,15 +1154,22 @@ begin | ||
1160 | 1154 | |
1161 | 1155 | tmphost := uri.Host; |
1162 | 1156 | |
1163 | - if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1157 | + if tmphost = BBS_HOST_OLD then | |
1164 | 1158 | tmphost := BBS_HOST; |
1165 | 1159 | |
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 | + | |
1172 | 1173 | finally |
1173 | 1174 | uri.Free; |
1174 | 1175 | uriList.Free; |
@@ -1218,8 +1219,7 @@ var | ||
1218 | 1219 | dir, tmphost : string; |
1219 | 1220 | const |
1220 | 1221 | 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'; | |
1223 | 1223 | begin |
1224 | 1224 | |
1225 | 1225 | foundPos := AnsiPos( '?', URL ); |
@@ -1232,7 +1232,7 @@ begin | ||
1232 | 1232 | dir := uriList[ 1 ]; |
1233 | 1233 | |
1234 | 1234 | tmphost := uri.Host; |
1235 | - if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1235 | + if tmphost = BBS_HOST_OLD then | |
1236 | 1236 | tmphost := BBS_HOST; |
1237 | 1237 | |
1238 | 1238 | ExtractHttpFields( ['&'], [], Copy( URL, foundPos + 1, MaxInt ), uriList ); |
@@ -1254,7 +1254,7 @@ begin | ||
1254 | 1254 | ExtractHttpFields( ['/'], [], uri.Path, uriList ); |
1255 | 1255 | |
1256 | 1256 | tmphost := uri.Host; |
1257 | - if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1257 | + if tmphost = BBS_HOST_OLD then | |
1258 | 1258 | tmphost := BBS_HOST; |
1259 | 1259 | |
1260 | 1260 | if( AnsiPos(THREAD_MARK, URL) > 0) and (uriList.Count > 5) then begin |
@@ -1265,8 +1265,7 @@ begin | ||
1265 | 1265 | end else if AnsiPos(THREAD_MARK, URL) = 0 then begin |
1266 | 1266 | //ココで過去ログかどうかチェック? |
1267 | 1267 | 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); | |
1270 | 1269 | end else |
1271 | 1270 | Result := URL; |
1272 | 1271 | end; |
@@ -1291,8 +1290,7 @@ var | ||
1291 | 1290 | dir, tmphost : string; |
1292 | 1291 | const |
1293 | 1292 | 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'; | |
1296 | 1294 | begin |
1297 | 1295 | |
1298 | 1296 | foundPos := AnsiPos( '?', URL ); |
@@ -1305,7 +1303,7 @@ begin | ||
1305 | 1303 | dir := uriList[ 1 ]; |
1306 | 1304 | |
1307 | 1305 | tmphost := uri.Host; |
1308 | - if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1306 | + if tmphost = BBS_HOST_OLD then | |
1309 | 1307 | tmphost := BBS_HOST; |
1310 | 1308 | |
1311 | 1309 | ExtractHttpFields( ['&'], [], Copy( URL, foundPos + 1, MaxInt ), uriList ); |
@@ -1327,13 +1325,19 @@ begin | ||
1327 | 1325 | ExtractHttpFields( ['/'], [], uri.Path, uriList ); |
1328 | 1326 | |
1329 | 1327 | tmphost := uri.Host; |
1330 | - if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1328 | + if tmphost = BBS_HOST_OLD then | |
1331 | 1329 | tmphost := BBS_HOST; |
1332 | 1330 | // http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1067968274/l100 |
1333 | 1331 | if( AnsiPos(THREAD_MARK, URL) > 0) and (uriList.Count > 5) then begin |
1334 | 1332 | Result := |
1335 | 1333 | uri.Protocol + '://' + tmphost + '/bbs/rawmode.cgi/' + |
1336 | 1334 | 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; | |
1337 | 1341 | end; |
1338 | 1342 | finally |
1339 | 1343 | uri.Free; |
@@ -1415,8 +1419,7 @@ var | ||
1415 | 1419 | uriList : TStringList; |
1416 | 1420 | const |
1417 | 1421 | 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'; | |
1420 | 1423 | begin |
1421 | 1424 | |
1422 | 1425 | inherited; |
@@ -1433,7 +1436,7 @@ begin | ||
1433 | 1436 | uri := TIdURI.Create( SubjectURL ); |
1434 | 1437 | uriList := TStringList.Create; |
1435 | 1438 | try |
1436 | - if (uri.Host = BBS_HOST_OLD) or (uri.Host = BBS_HOST_OLD2) then | |
1439 | + if uri.Host = BBS_HOST_OLD then | |
1437 | 1440 | uri.Host := BBS_HOST; |
1438 | 1441 | URL := uri.Protocol + '://' + uri.Host + uri.Path; |
1439 | 1442 |
@@ -15,7 +15,7 @@ | ||
15 | 15 | var start_time = new Date(); |
16 | 16 | //==========グローバル変数 |
17 | 17 | var anchorHead=""; |
18 | -var skinName="skin30-2 v3.3.09xx"; | |
18 | +var skinName="skin30-2 v3.1.11xx"; | |
19 | 19 | var browser="ギコナビ"; |
20 | 20 | //==========ギコナビ用アンカーの判定(0:処理無し,1:ポップアップ,2:ボタン挿入) |
21 | 21 | // ギコナビでは、レスアンカーは相対アドレスで記述される |
@@ -27,22 +27,13 @@ function checkAnchor(href){if(!href){return(0)} | ||
27 | 27 | //==========リンク設定 |
28 | 28 | function addAnchor(inner,num){ |
29 | 29 | 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>') | |
36 | 31 | } |
37 | 32 | // スレッドURLの取得 |
38 | 33 | var t_url=false,t_domain,t_bbs,t_key; |
39 | 34 | function threadurl(){ |
40 | 35 | 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\/(.*)\/(.*)\//); | |
46 | 37 | t_url=true; |
47 | 38 | t_bbs=RegExp.$1; |
48 | 39 | t_key=RegExp.$2; |
@@ -2,8 +2,7 @@ | ||
2 | 2 | //外部関数:tohan |
3 | 3 | //外部変数:anchorHead,lightmode,getID,skinName,browser,dts |
4 | 4 | //グローバル変数 |
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秒遅れる) | |
7 | 6 | //========Click処理→search,他 |
8 | 7 | document.onclick = clickEvent; |
9 | 8 | function clickEvent(){ |
@@ -41,19 +40,10 @@ function mouseOverEvent() { | ||
41 | 40 | else if(e.innerText.match(/^あぼ〜ん$/)) {abonePopup(e);} |
42 | 41 | } |
43 | 42 | 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,""); | |
54 | 45 | if (checkAnchor(e.href)==2){insButton(e);return;} |
55 | 46 | else if(checkAnchor(e.href)==1){ |
56 | - if(event.shiftKey){if(e.rel){e.href=e.rel}return} | |
57 | 47 | // 多段ポップアップ |
58 | 48 | var aNum=parseInt(e.sourceIndex)+1; |
59 | 49 | if(!document.getElementById("p"+aNum)){ |
@@ -106,10 +96,10 @@ function scroll_End(){document.getElementsByTagName("DL")[0].lastChild.scrollInt | ||
106 | 96 | // IMG |
107 | 97 | function imgCommand(mode,s){ |
108 | 98 | 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>'; | |
110 | 100 | event.srcElement.parentElement.insertAdjacentHTML('beforeEnd',nHTML); |
111 | 101 | 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>')} | |
113 | 103 | document.getElementById("command").insertAdjacentHTML('beforeEnd','<input type="button" onclick="changeMode()" value="モード切替">') |
114 | 104 | } |
115 | 105 | waited=true; |
@@ -119,7 +109,7 @@ function imgCommand(mode,s){ | ||
119 | 109 | } |
120 | 110 | function clearCommand(){ |
121 | 111 | waited=false; |
122 | - document.getElementById("command").removeNode(true); | |
112 | + event.srcElement.parentElement.removeNode(true); | |
123 | 113 | } |
124 | 114 | //=========左長押処理→copyMenu() |
125 | 115 | document.onmousedown=mousedownEvent; |
@@ -132,7 +122,6 @@ function mousedownEvent(){ | ||
132 | 122 | clickTimer=setTimeout("copyMenu()",500); |
133 | 123 | } |
134 | 124 | } |
135 | - | |
136 | 125 | //コピーメニュー→colorChange(),search::copyText() |
137 | 126 | function copyMenu(){ |
138 | 127 | clickCancel=true; clearTimeout(clickTimer); |
@@ -176,53 +165,27 @@ function key(){ | ||
176 | 165 | } |
177 | 166 | } |
178 | 167 | |
179 | -//=========新着レス取得後処理(標準スキン未対応ブラウザ用)←Timer又はFooterから呼び出し | |
180 | -//=========かちゅ、ABone、ゾヌ2 | |
168 | +//=========Load(代替)処理(各Footerもしくは、Headerでのループから呼出し) | |
181 | 169 | var newResNum=parseInt(document.getElementsByName("GetRescount")[0].content)+1; |
182 | 170 | 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 | + //新着開始ナンバーを設定してジャンプ | |
189 | 175 | 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 | + } | |
215 | 180 | } |
216 | - | |
217 | 181 | // 新着レス移動+新着レスの位置を記憶 |
218 | 182 | var firstNew; |
219 | 183 | function moveToNew(num){ |
220 | 184 | firstNew=getDTfromAnc(num); |
221 | - while(!firstNew){num--;firstNew=getDTfromAnc(num);} //対象が透明あぼ〜んなら数を減らす | |
222 | - firstNew.scrollIntoView(true); | |
185 | + if(firstNew){firstNew.scrollIntoView(true);} | |
223 | 186 | } |
224 | 187 | |
225 | -//=========DoubleClick処理→defaultPopup() | |
188 | +//=========DblClick処理→defaultPopup() | |
226 | 189 | document.ondblclick=defaultPopup; |
227 | 190 | function defaultPopup(){ |
228 | 191 | var num=document.selection.createRange().text.replace(/\s$/,""); |
@@ -237,17 +200,4 @@ function defaultPopup(){ | ||
237 | 200 | obj.innerText="ID:"+num; |
238 | 201 | search(obj); |
239 | 202 | } |
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 |
@@ -2,8 +2,7 @@ | ||
2 | 2 | // 外部関数:addAnchor |
3 | 3 | // 外部変数:cp,tp,vp,dds |
4 | 4 | //======画像読込の設定 |
5 | -var onMouseLoad=true; // true:カーソルを合わせただけ、false:LOADボタンをクリックしてから | |
6 | -var takeArisk=false; // true:画像読み込み時にモード切替、false:手動でモード切替 | |
5 | +var onMouseLoad=true; // true:カーソルを合わせただけ、false:LOADボタンをクリックしてから | |
7 | 6 | //==========グローバル変数 |
8 | 7 | //==========画像処理等 |
9 | 8 | var lightmode = true; |
@@ -69,13 +68,12 @@ function insButton(a,hRH) { | ||
69 | 68 | // 画像読込 |
70 | 69 | function loadImage(btn,href){ |
71 | 70 | if(!panel){changePanel()} |
72 | - if(takeArisk && lightmode){changeMode()} | |
73 | 71 | if(btn.tagName!="A"){ |
74 | 72 | var thumbs = document.images; |
75 | 73 | var l=thumbs.length; |
76 | 74 | for(var i=l;i--;){if(thumbs[i].src==href){ |
77 | 75 | if(lightmode){tp.style.visibility="visible";viewed=true;} |
78 | - //thumbs[i].scrollIntoView(true); | |
76 | + thumbs[i].scrollIntoView(true); | |
79 | 77 | imgOver(thumbs[i],100); |
80 | 78 | return true; |
81 | 79 | }} |
@@ -105,7 +103,7 @@ function loadImage(btn,href){ | ||
105 | 103 | function imgResult(img){ |
106 | 104 | var btn=img.parentElement.children.item(2); |
107 | 105 | 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';} | |
109 | 107 | } |
110 | 108 | // サイズの切替 |
111 | 109 | function changeSize(btn){ |
@@ -124,15 +122,6 @@ function changeSize(btn){ | ||
124 | 122 | } |
125 | 123 | // サムネイルの削除 |
126 | 124 | 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 | -} | |
136 | 125 | // 画像表示の切替 |
137 | 126 | function changeView(mode,href){ |
138 | 127 | if(!href){href=event.srcElement.src} |
@@ -15,7 +15,7 @@ var pb; | ||
15 | 15 | function namePopup(e,before,num,after){ |
16 | 16 | var hnum=tohan(num); |
17 | 17 | //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}} | |
19 | 19 | e.outerHTML = "<b>"+before+"</b><b>"+addAnchor(hnum,num)+"</b><b>"+after+"</b>"; |
20 | 20 | } |
21 | 21 | //=========弱あぼ〜んのポップアップ |
@@ -110,7 +110,7 @@ function clearResult(obj){ | ||
110 | 110 | for(var i=l;i--;){ |
111 | 111 | var dt=eval(arrayElement); var dd=dt.nextSibling; |
112 | 112 | //Live機能追加 - 透明あぼ〜ん |
113 | - if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;} | |
113 | + if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;continue;} | |
114 | 114 | dt.removeNode(true); dd.removeNode(true); |
115 | 115 | } |
116 | 116 | } |
@@ -144,7 +144,7 @@ function findIt(word){ | ||
144 | 144 | |
145 | 145 | //==========逆参照 |
146 | 146 | function searchRef(obj){ |
147 | - if(obj.name!='referred'){ | |
147 | + if(obj.name!='reffered'){ | |
148 | 148 | var num=obj.firstChild.innerText; |
149 | 149 | var l=dds.length; |
150 | 150 | var found = new Array; |
@@ -171,7 +171,7 @@ function searchRef(obj){ | ||
171 | 171 | if(exist){ |
172 | 172 | var dt=dds[i].previousSibling.cloneNode(true); |
173 | 173 | found.unshift(dt.outerHTML.replace(/name=.*?>/,">")+dd.outerHTML.replace(/<a name=.*>/i,"")); |
174 | - obj.name="referred"; | |
174 | + obj.name="reffered"; | |
175 | 175 | } |
176 | 176 | } |
177 | 177 | if(found.length){returnRef(obj.nextSibling,found)} |
@@ -190,12 +190,13 @@ function returnRef(dd,found){ | ||
190 | 190 | function copyText(target){ |
191 | 191 | var num=event.srcElement.parentElement.name; |
192 | 192 | var obj=getDTfromAnc(num); |
193 | + var decoy=document.createDocumentFragment(); | |
193 | 194 | 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";} | |
196 | 196 | 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(); | |
199 | 200 | copyText.execCommand("Copy") |
200 | 201 | event.srcElement.parentElement.removeNode(true); |
201 | 202 | } |
@@ -15,11 +15,11 @@ | ||
15 | 15 | var start_time = new Date(); |
16 | 16 | //==========グローバル変数 |
17 | 17 | var anchorHead=""; |
18 | -var skinName="skin30-3 v3.3.09xx"; | |
18 | +var skinName="skin30-3 v3.1.11xx"; | |
19 | 19 | var browser="ギコナビ"; |
20 | 20 | //==========ギコナビ用アンカーの判定(0:処理無し,1:ポップアップ,2:ボタン挿入) |
21 | 21 | // ギコナビでは、レスアンカーは相対アドレスで記述される |
22 | -function checkAnchor(href){if(!href){return(0)} | |
22 | +function checkAnchor(href){ | |
23 | 23 | if (href.match(/decoy:|about:blank/)){return(1)} |
24 | 24 | else if(href.match(/menu:|read\.cgi|2ch\.net\/.*\/kako/)){return(0)} |
25 | 25 | else{return(2)} |
@@ -27,22 +27,13 @@ function checkAnchor(href){if(!href){return(0)} | ||
27 | 27 | //==========リンク設定 |
28 | 28 | function addAnchor(inner,num){ |
29 | 29 | 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>') | |
36 | 31 | } |
37 | 32 | // スレッドURLの取得 |
38 | 33 | var t_url=false,t_domain,t_bbs,t_key; |
39 | 34 | function threadurl(){ |
40 | 35 | 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\/(.*)\/(.*)\//); | |
46 | 37 | t_url=true; |
47 | 38 | t_bbs=RegExp.$1; |
48 | 39 | t_key=RegExp.$2; |
@@ -2,8 +2,7 @@ | ||
2 | 2 | //外部関数:tohan |
3 | 3 | //外部変数:anchorHead,lightmode,getID,skinName,browser,dts |
4 | 4 | //グローバル変数 |
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秒遅れる) | |
7 | 6 | //========Click処理→search,他 |
8 | 7 | document.onclick = clickEvent; |
9 | 8 | function clickEvent(){ |
@@ -41,19 +40,10 @@ function mouseOverEvent() { | ||
41 | 40 | else if(e.innerText.match(/^あぼ〜ん$/)) {abonePopup(e);} |
42 | 41 | } |
43 | 42 | 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,""); | |
54 | 45 | if (checkAnchor(e.href)==2){insButton(e);return;} |
55 | 46 | else if(checkAnchor(e.href)==1){ |
56 | - if(event.shiftKey){if(e.rel){e.href=e.rel}return} | |
57 | 47 | // 多段ポップアップ |
58 | 48 | var aNum=parseInt(e.sourceIndex)+1; |
59 | 49 | if(!document.getElementById("p"+aNum)){ |
@@ -106,10 +96,10 @@ function scroll_End(){document.getElementsByTagName("DL")[0].lastChild.scrollInt | ||
106 | 96 | // IMG |
107 | 97 | function imgCommand(mode,s){ |
108 | 98 | 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>'; | |
110 | 100 | event.srcElement.parentElement.insertAdjacentHTML('beforeEnd',nHTML); |
111 | 101 | 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>')} | |
113 | 103 | document.getElementById("command").insertAdjacentHTML('beforeEnd','<input type="button" onclick="changeMode()" value="モード切替">') |
114 | 104 | } |
115 | 105 | waited=true; |
@@ -119,7 +109,7 @@ function imgCommand(mode,s){ | ||
119 | 109 | } |
120 | 110 | function clearCommand(){ |
121 | 111 | waited=false; |
122 | - document.getElementById("command").removeNode(true); | |
112 | + event.srcElement.parentElement.removeNode(true); | |
123 | 113 | } |
124 | 114 | //=========左長押処理→copyMenu() |
125 | 115 | document.onmousedown=mousedownEvent; |
@@ -132,7 +122,6 @@ function mousedownEvent(){ | ||
132 | 122 | clickTimer=setTimeout("copyMenu()",500); |
133 | 123 | } |
134 | 124 | } |
135 | - | |
136 | 125 | //コピーメニュー→colorChange(),search::copyText() |
137 | 126 | function copyMenu(){ |
138 | 127 | clickCancel=true; clearTimeout(clickTimer); |
@@ -176,53 +165,27 @@ function key(){ | ||
176 | 165 | } |
177 | 166 | } |
178 | 167 | |
179 | -//=========新着レス取得後処理(標準スキン未対応ブラウザ用)←Timer又はFooterから呼び出し | |
180 | -//=========かちゅ、ABone、ゾヌ2 | |
168 | +//=========Load(代替)処理(各Footerもしくは、Headerでのループから呼出し) | |
181 | 169 | var newResNum=parseInt(document.getElementsByName("GetRescount")[0].content)+1; |
182 | 170 | 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 | + //新着開始ナンバーを設定してジャンプ | |
189 | 175 | 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 | + } | |
215 | 180 | } |
216 | - | |
217 | 181 | // 新着レス移動+新着レスの位置を記憶 |
218 | 182 | var firstNew; |
219 | 183 | function moveToNew(num){ |
220 | 184 | firstNew=getDTfromAnc(num); |
221 | - while(!firstNew){num--;firstNew=getDTfromAnc(num);} //対象が透明あぼ〜んなら数を減らす | |
222 | - firstNew.scrollIntoView(true); | |
185 | + if(firstNew){firstNew.scrollIntoView(true);} | |
223 | 186 | } |
224 | 187 | |
225 | -//=========DoubleClick処理→defaultPopup() | |
188 | +//=========DblClick処理→defaultPopup() | |
226 | 189 | document.ondblclick=defaultPopup; |
227 | 190 | function defaultPopup(){ |
228 | 191 | var num=document.selection.createRange().text.replace(/\s$/,""); |
@@ -237,17 +200,4 @@ function defaultPopup(){ | ||
237 | 200 | obj.innerText="ID:"+num; |
238 | 201 | search(obj); |
239 | 202 | } |
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 |
@@ -15,7 +15,7 @@ var pb; | ||
15 | 15 | function namePopup(e,before,num,after){ |
16 | 16 | var hnum=tohan(num); |
17 | 17 | //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}} | |
19 | 19 | e.outerHTML = "<b>"+before+"</b><b>"+addAnchor(hnum,num)+"</b><b>"+after+"</b>"; |
20 | 20 | } |
21 | 21 | //=========弱あぼ〜んのポップアップ |
@@ -110,7 +110,7 @@ function clearResult(obj){ | ||
110 | 110 | for(var i=l;i--;){ |
111 | 111 | var dt=eval(arrayElement); var dd=dt.nextSibling; |
112 | 112 | //Live機能追加 - 透明あぼ〜ん |
113 | - if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;} | |
113 | + if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;continue;} | |
114 | 114 | dt.removeNode(true); dd.removeNode(true); |
115 | 115 | } |
116 | 116 | } |
@@ -144,7 +144,7 @@ function findIt(word){ | ||
144 | 144 | |
145 | 145 | //==========逆参照 |
146 | 146 | function searchRef(obj){ |
147 | - if(obj.name!='referred'){ | |
147 | + if(obj.name!='reffered'){ | |
148 | 148 | var num=obj.firstChild.innerText; |
149 | 149 | var l=dds.length; |
150 | 150 | var found = new Array; |
@@ -171,7 +171,7 @@ function searchRef(obj){ | ||
171 | 171 | if(exist){ |
172 | 172 | var dt=dds[i].previousSibling.cloneNode(true); |
173 | 173 | found.unshift(dt.outerHTML.replace(/name=.*?>/,">")+dd.outerHTML.replace(/<a name=.*>/i,"")); |
174 | - obj.name="referred"; | |
174 | + obj.name="reffered"; | |
175 | 175 | } |
176 | 176 | } |
177 | 177 | if(found.length){returnRef(obj.nextSibling,found)} |
@@ -190,12 +190,13 @@ function returnRef(dd,found){ | ||
190 | 190 | function copyText(target){ |
191 | 191 | var num=event.srcElement.parentElement.name; |
192 | 192 | var obj=getDTfromAnc(num); |
193 | + var decoy=document.createDocumentFragment(); | |
193 | 194 | 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";} | |
196 | 196 | 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(); | |
199 | 200 | copyText.execCommand("Copy") |
200 | 201 | event.srcElement.parentElement.removeNode(true); |
201 | 202 | } |