ギコナビ
修訂 | b5fb9adb797384161110609455e5bc963acc4ddb (tree) |
---|---|
時間 | 2004-10-08 14:44:53 |
作者 | yoffy <yoffy> |
Commiter | yoffy |
b49 にマージ。
@@ -824,58 +824,62 @@ begin | ||
824 | 824 | end; |
825 | 825 | end; |
826 | 826 | end; |
827 | - Result := false; | |
827 | + Result := false; | |
828 | 828 | |
829 | 829 | end; |
830 | 830 | //VAêuNÎô |
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 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 := ''; | |
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 := ''; | |
857 | 860 | |
858 | - pos := AnsiPos('³', AString); | |
861 | + pos := AnsiPos('³', AString); | |
859 | 862 | while pos <> 0 do begin |
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; | |
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; | |
879 | 883 | end; |
880 | 884 | end. |
881 | 885 |
@@ -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.txt'; | |
397 | + HEADTXT_FILENAME: string = 'head.html'; | |
398 | 398 | //DEFAULT_LIST_COUNT: Integer = 100; |
399 | 399 | |
400 | 400 | // COLUMN_CATEGORY: array[0..0] of string = ('JeS¼'); |
@@ -1668,9 +1668,11 @@ procedure TThreadItem.DeleteLogFile; | ||
1668 | 1668 | begin |
1669 | 1669 | ParentBoard.BeginUpdate; |
1670 | 1670 | |
1671 | + if FUnRead then | |
1672 | + ParentBoard.UnRead := ParentBoard.UnRead - 1; | |
1671 | 1673 | DeleteFile(GetThreadFileName); |
1672 | - if FileExists(ChangeFileExt(GetThreadFileName,'.NG')) = true then | |
1673 | - DeleteFile(ChangeFileExt(GetThreadFileName,'.NG')); | |
1674 | + if FileExists(ChangeFileExt(GetThreadFileName,'.NG')) = true then | |
1675 | + DeleteFile(ChangeFileExt(GetThreadFileName,'.NG')); | |
1674 | 1676 | FRoundDate := ZERO_DATE; |
1675 | 1677 | FLastModified := ZERO_DATE; |
1676 | 1678 | FSize := 0; |
@@ -105,7 +105,7 @@ object EditorForm: TEditorForm | ||
105 | 105 | Width = 149 |
106 | 106 | Height = 20 |
107 | 107 | DropDownCount = 20 |
108 | - ItemHeight = 12 | |
108 | + ItemHeight = 0 | |
109 | 109 | TabOrder = 0 |
110 | 110 | end |
111 | 111 | object MailComboBox: TComboBox |
@@ -114,7 +114,7 @@ object EditorForm: TEditorForm | ||
114 | 114 | Width = 149 |
115 | 115 | Height = 20 |
116 | 116 | DropDownCount = 20 |
117 | - ItemHeight = 12 | |
117 | + ItemHeight = 0 | |
118 | 118 | TabOrder = 1 |
119 | 119 | OnChange = MailComboBoxChange |
120 | 120 | end |
@@ -383,6 +383,9 @@ object EditorForm: TEditorForm | ||
383 | 383 | object SETTINGTXT2: TMenuItem |
384 | 384 | Action = GetSETTINGTXTAction |
385 | 385 | end |
386 | + object HeadTXT1: TMenuItem | |
387 | + Action = GetHeadTXTAction | |
388 | + end | |
386 | 389 | object OP1: TMenuItem |
387 | 390 | Action = GetTitlePictureAction |
388 | 391 | end |
@@ -1109,6 +1112,12 @@ object EditorForm: TEditorForm | ||
1109 | 1112 | OnExecute = GetTitlePictureActionExecute |
1110 | 1113 | OnUpdate = GetTitlePictureActionUpdate |
1111 | 1114 | end |
1115 | + object GetHeadTXTAction: TAction | |
1116 | + Category = #26495#24773#22577 | |
1117 | + Caption = #12525#12540#12459#12523#12523#12540#12523#12398#21462#24471 | |
1118 | + Hint = #12525#12540#12459#12523#12523#12540#12523#12398#21462#24471 | |
1119 | + OnExecute = GetHeadTXTActionExecute | |
1120 | + end | |
1112 | 1121 | end |
1113 | 1122 | object IdLogDebug: TIdLogDebug |
1114 | 1123 | OnReceive = IdLogDebugReceive |
@@ -107,6 +107,8 @@ type | ||
107 | 107 | SETTINGTXT2: TMenuItem; |
108 | 108 | GetTitlePictureAction: TAction; |
109 | 109 | OP1: TMenuItem; |
110 | + GetHeadTXTAction: TAction; | |
111 | + HeadTXT1: TMenuItem; | |
110 | 112 | |
111 | 113 | procedure EditorPageChange(Sender: TObject); |
112 | 114 | procedure FormCreate(Sender: TObject); |
@@ -151,6 +153,7 @@ type | ||
151 | 153 | procedure GetSETTINGTXTActionExecute(Sender: TObject); |
152 | 154 | procedure GetTitlePictureActionUpdate(Sender: TObject); |
153 | 155 | procedure GetTitlePictureActionExecute(Sender: TObject); |
156 | + procedure GetHeadTXTActionExecute(Sender: TObject); | |
154 | 157 | private |
155 | 158 | FThreadItem: TThreadItem; |
156 | 159 | FBoard: TBoard; |
@@ -387,7 +390,7 @@ begin | ||
387 | 390 | MailComboBox.Text := FBoard.KotehanMail; |
388 | 391 | SageCheckBox.Checked := AnsiPos('sage', MailComboBox.Text) <> 0; |
389 | 392 | TitlePanel.Visible := True; |
390 | - SetSamba24(''); | |
393 | + SetSamba24(FBoard.URL); | |
391 | 394 | ShowBoardInformation(FBoard, BoardInformationMemo); |
392 | 395 | ShowTitlePicture(); |
393 | 396 | end; |
@@ -407,8 +410,11 @@ end; | ||
407 | 410 | |
408 | 411 | function TEditorForm.GetBody : string; |
409 | 412 | var |
410 | - body : string; | |
411 | - regexp : TAWKStr; | |
413 | + body, tmp : string; | |
414 | + p, tail : PChar; | |
415 | + len : Integer; | |
416 | +const | |
417 | + TAB_LENGTH = 4; | |
412 | 418 | begin |
413 | 419 | |
414 | 420 | body := BodyEdit.Text; |
@@ -416,16 +422,65 @@ begin | ||
416 | 422 | // & Ìu·ÍêÔÅÉâé±Æ |
417 | 423 | body := CustomStringReplace( body, '&', '&' ); |
418 | 424 | if SpaceToNBSPAction.Checked then begin |
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; | |
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 | + // ÀÌQÆÍ 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; | |
428 | 482 | end; |
483 | + body := tmp; | |
429 | 484 | end; |
430 | 485 | |
431 | 486 | Result := body; |
@@ -1619,7 +1674,7 @@ begin | ||
1619 | 1674 | tmpBoard := FBoard |
1620 | 1675 | else |
1621 | 1676 | tmpBoard := FThreadItem.ParentBoard; |
1622 | - | |
1677 | + | |
1623 | 1678 | Indy.Request.Referer := tmpBoard.URL; |
1624 | 1679 | if tmpBoard.TitlePictureURL <> '' then begin |
1625 | 1680 | StatusBar.Panels[0].Text := 'Âgbvæ_E[h'; |
@@ -1674,4 +1729,65 @@ begin | ||
1674 | 1729 | end; |
1675 | 1730 | end; |
1676 | 1731 | |
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 := '[J[(head.txt)_E[h'; | |
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 := '[J[æ¾®¹(' + 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 := '[J[XV³µ(' + IntToStr(Indy.ResponseCode) + ')' | |
1781 | + else | |
1782 | + StatusBar.Panels[0].Text := '[J[æ¾G[(' + 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 | + | |
1677 | 1793 | end. |
@@ -229,7 +229,8 @@ var | ||
229 | 229 | // httpSocket : TIdHTTP; |
230 | 230 | resStream : TMemoryStream; |
231 | 231 | content : string; |
232 | - | |
232 | +const | |
233 | + LIVEDOOR_URL = 'http://jbbs.livedoor.jp/'; | |
233 | 234 | begin |
234 | 235 | |
235 | 236 | {$IFDEF DEBUG} |
@@ -270,7 +271,12 @@ begin | ||
270 | 271 | Result := socket.ResponseCode; |
271 | 272 | if (Length( content ) = 0) and (Result = 206) then |
272 | 273 | Result := 304; |
273 | - | |
274 | + //µ½çÎJBBSÍwb_ÉG[îñªÚéçµ¢ÌÅA±±Å`FbN | |
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; | |
274 | 280 | outResultData := CreateResultString( content ); |
275 | 281 | except |
276 | 282 | on E: EIdSocketError do begin |
@@ -117,13 +117,50 @@ function TFavoriteBoardItem.GetItem : TBoard; | ||
117 | 117 | var |
118 | 118 | protocol, host, path, document, port, bookmark : string; |
119 | 119 | BBSID{, BBSKey} : string; |
120 | - tmpURL : string; | |
120 | + tmpURL, boardURL : string; | |
121 | 121 | // category : TCategory; |
122 | + i, bi: Integer; | |
123 | + tmpThread: TThreadItem; | |
124 | + tmpBoard: TBoard; | |
122 | 125 | begin |
123 | 126 | |
124 | 127 | if FItem = nil then begin |
125 | 128 | FItem := BBSsFindBoardFromURL( URL ); |
126 | 129 | if FItem = nil then begin |
130 | + //===== vOC | |
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 ª¶µ½êÍàÉC¹½¢Ìű±ÅͽàµÈ¢ | |
161 | + end; | |
162 | + end; | |
163 | + if FItem = nil then begin | |
127 | 164 | tmpURL := URL; |
128 | 165 | GikoSys.ParseURI( tmpURL, protocol, host, path, document, port, bookmark ); |
129 | 166 | if GikoSys.Is2chHost( host ) then begin |
@@ -131,12 +168,6 @@ begin | ||
131 | 168 | FItem := BBSs[ 0 ].FindBBSID( BBSID ); |
132 | 169 | if FItem <> nil then |
133 | 170 | 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/@u· | |
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; | |
140 | 171 | end; |
141 | 172 | { |
142 | 173 | // ¦ìÁÄàAÇÁ·éJeSª³¢Ìŵۯ |
@@ -284,7 +315,7 @@ begin | ||
284 | 315 | FileName := GikoSys.GetConfigDir + FAVORITE_FILE_NAME; |
285 | 316 | |
286 | 317 | FavFolder := TFavoriteFolder.Create; |
287 | - Node := FTreeView.Items.AddChildObject(nil, FAVORITE_ROOT_NAME, FavFolder); | |
318 | + Node := FTreeView.Items.AddChildObjectFirst(nil, FAVORITE_ROOT_NAME, FavFolder); | |
288 | 319 | Node.ImageIndex := 14; |
289 | 320 | Node.SelectedIndex := 14; |
290 | 321 |
@@ -300,7 +331,7 @@ begin | ||
300 | 331 | FStack.Push(Node); |
301 | 332 | LinkExists := False; |
302 | 333 | if XMLNode.NodeName = 'favorite' then begin |
303 | - for i := 0 to XMLNode.ChildNodes.Count - 1 do begin | |
334 | + for i := XMLNode.ChildNodes.Count - 1 downto 0 do begin | |
304 | 335 | ReadNode(XMLNode.ChildNodes[i]); |
305 | 336 | if (XMLNode.ChildNodes[i].NodeName = 'folder') and |
306 | 337 | (XMLNode.ChildNodes[i].Attributes['title'] = FAVORITE_LINK_NAME) then begin |
@@ -310,7 +341,7 @@ begin | ||
310 | 341 | end; |
311 | 342 | if not LinkExists then begin |
312 | 343 | FavFolder := TFavoriteFolder.Create; |
313 | - Node := FTreeView.Items.AddChildObject(Node, FAVORITE_LINK_NAME, FavFolder); | |
344 | + Node := FTreeView.Items.AddChildObjectFirst(Node, FAVORITE_LINK_NAME, FavFolder); | |
314 | 345 | Node.ImageIndex := 14; |
315 | 346 | Node.SelectedIndex := 14; |
316 | 347 | end; |
@@ -324,7 +355,7 @@ begin | ||
324 | 355 | |
325 | 356 | { |
326 | 357 | FavFolder := TFavoriteFolder.Create; |
327 | - Node := FTreeView.Items.AddChildObject(nil, FAVORITE_ROOT_NAME, FavFolder); | |
358 | + Node := FTreeView.Items.AddChildObjectFirst(nil, FAVORITE_ROOT_NAME, FavFolder); | |
328 | 359 | Node.ImageIndex := 12; |
329 | 360 | Node.SelectedIndex := 13; |
330 | 361 |
@@ -360,15 +391,16 @@ begin | ||
360 | 391 | ParentNode := FStack.Peek; |
361 | 392 | if TObject(ParentNode.Data) is TFavoriteFolder then begin |
362 | 393 | FavFolder := TFavoriteFolder.Create; |
363 | - CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavFolder); | |
394 | + CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, Node.Attributes['title'], FavFolder); | |
364 | 395 | CurrentNode.ImageIndex := 14; |
365 | 396 | CurrentNode.SelectedIndex := 14; |
366 | - CurrentNode.Expanded := Node.Attributes[ 'expanded' ] = 'true'; | |
367 | 397 | FStack.Push(CurrentNode); |
368 | 398 | end; |
369 | - for i := 0 to Node.ChildNodes.Count - 1 do begin | |
399 | + for i := Node.ChildNodes.Count - 1 downto 0 do begin | |
370 | 400 | ReadNode(Node.ChildNodes[i]); |
371 | 401 | end; |
402 | + if TObject(ParentNode.Data) is TFavoriteFolder then | |
403 | + CurrentNode.Expanded := Node.Attributes[ 'expanded' ] = 'true'; | |
372 | 404 | if FStack.Count <> 0 then |
373 | 405 | FStack.Pop; |
374 | 406 | end else if Node.NodeName = 'favitem' then begin |
@@ -387,7 +419,7 @@ begin | ||
387 | 419 | FavBoard := TFavoriteBoardItem.Create( |
388 | 420 | Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], nil ); |
389 | 421 | end; |
390 | - CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavBoard); | |
422 | + CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, Node.Attributes['title'], FavBoard); | |
391 | 423 | CurrentNode.ImageIndex := 15; |
392 | 424 | CurrentNode.SelectedIndex := 15; |
393 | 425 | end else if Node.Attributes['favtype'] = 'thread' then begin |
@@ -414,7 +446,7 @@ begin | ||
414 | 446 | FavThread := TFavoriteThreadItem.Create( |
415 | 447 | Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], nil ); |
416 | 448 | end; |
417 | - CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavThread); | |
449 | + CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, Node.Attributes['title'], FavThread); | |
418 | 450 | CurrentNode.ImageIndex := 16; |
419 | 451 | CurrentNode.SelectedIndex := 16; |
420 | 452 | end; |
@@ -1,11 +1,11 @@ | ||
1 | 1 | object GikoForm: TGikoForm |
2 | - Left = 205 | |
3 | - Top = 186 | |
2 | + Left = 246 | |
3 | + Top = 188 | |
4 | 4 | HorzScrollBar.Visible = False |
5 | 5 | VertScrollBar.Visible = False |
6 | 6 | AutoScroll = False |
7 | 7 | Caption = '-' |
8 | - ClientHeight = 545 | |
8 | + ClientHeight = 404 | |
9 | 9 | ClientWidth = 854 |
10 | 10 | Color = clBtnFace |
11 | 11 | Font.Charset = SHIFTJIS_CHARSET |
@@ -16,11 +16,9 @@ object GikoForm: TGikoForm | ||
16 | 16 | KeyPreview = True |
17 | 17 | OldCreateOrder = False |
18 | 18 | Visible = True |
19 | - OnClose = FormClose | |
20 | 19 | OnCloseQuery = FormCloseQuery |
21 | 20 | OnCreate = FormCreate |
22 | 21 | OnDestroy = FormDestroy |
23 | - OnKeyUp = FormKeyUp | |
24 | 22 | OnMouseWheel = FormMouseWheel |
25 | 23 | OnResize = FormResize |
26 | 24 | OnShortCut = FormShortCut |
@@ -29,7 +27,7 @@ object GikoForm: TGikoForm | ||
29 | 27 | TextHeight = 12 |
30 | 28 | object StatusBar: TStatusBar |
31 | 29 | Left = 0 |
32 | - Top = 525 | |
30 | + Top = 384 | |
33 | 31 | Width = 854 |
34 | 32 | Height = 20 |
35 | 33 | Panels = < |
@@ -40,11 +38,7 @@ object GikoForm: TGikoForm | ||
40 | 38 | Width = 500 |
41 | 39 | end |
42 | 40 | item |
43 | - Style = psOwnerDraw | |
44 | 41 | Width = 50 |
45 | - end | |
46 | - item | |
47 | - Width = 100 | |
48 | 42 | end> |
49 | 43 | SimplePanel = False |
50 | 44 | OnResize = StatusBarResize |
@@ -53,13 +47,13 @@ object GikoForm: TGikoForm | ||
53 | 47 | Left = 0 |
54 | 48 | Top = 77 |
55 | 49 | Width = 854 |
56 | - Height = 448 | |
50 | + Height = 307 | |
57 | 51 | Align = alClient |
58 | 52 | BevelOuter = bvNone |
59 | 53 | TabOrder = 1 |
60 | 54 | object MessageSplitter: TSplitter |
61 | 55 | Left = 0 |
62 | - Top = 409 | |
56 | + Top = 268 | |
63 | 57 | Width = 854 |
64 | 58 | Height = 5 |
65 | 59 | Cursor = crVSplit |
@@ -72,7 +66,7 @@ object GikoForm: TGikoForm | ||
72 | 66 | Left = 0 |
73 | 67 | Top = 0 |
74 | 68 | Width = 854 |
75 | - Height = 409 | |
69 | + Height = 268 | |
76 | 70 | Align = alClient |
77 | 71 | BevelOuter = bvNone |
78 | 72 | TabOrder = 0 |
@@ -80,7 +74,7 @@ object GikoForm: TGikoForm | ||
80 | 74 | Left = 145 |
81 | 75 | Top = 0 |
82 | 76 | Width = 5 |
83 | - Height = 409 | |
77 | + Height = 268 | |
84 | 78 | Cursor = crHSplit |
85 | 79 | AutoSnap = False |
86 | 80 | ResizeStyle = rsUpdate |
@@ -89,7 +83,7 @@ object GikoForm: TGikoForm | ||
89 | 83 | Left = 0 |
90 | 84 | Top = 0 |
91 | 85 | Width = 145 |
92 | - Height = 409 | |
86 | + Height = 268 | |
93 | 87 | Align = alLeft |
94 | 88 | BevelOuter = bvNone |
95 | 89 | TabOrder = 0 |
@@ -276,7 +270,7 @@ object GikoForm: TGikoForm | ||
276 | 270 | Left = 150 |
277 | 271 | Top = 0 |
278 | 272 | Width = 704 |
279 | - Height = 409 | |
273 | + Height = 268 | |
280 | 274 | Align = alClient |
281 | 275 | BevelOuter = bvNone |
282 | 276 | TabOrder = 1 |
@@ -315,13 +309,13 @@ object GikoForm: TGikoForm | ||
315 | 309 | OwnerData = True |
316 | 310 | ReadOnly = True |
317 | 311 | RowSelect = True |
318 | - PopupMenu = ListPopupMenu | |
319 | 312 | SmallImages = ItemIcon16 |
320 | 313 | StateImages = StateIconImageList |
321 | 314 | TabOrder = 0 |
322 | 315 | ViewStyle = vsReport |
323 | 316 | OnAdvancedCustomDrawItem = ListViewAdvancedCustomDrawItem |
324 | 317 | OnColumnClick = ListViewColumnClick |
318 | + OnColumnRightClick = ListViewColumnRightClick | |
325 | 319 | OnCustomDraw = ListViewCustomDraw |
326 | 320 | OnData = ListViewData |
327 | 321 | OnDataFind = ListViewDataFind |
@@ -554,7 +548,7 @@ object GikoForm: TGikoForm | ||
554 | 548 | Left = 0 |
555 | 549 | Top = 194 |
556 | 550 | Width = 704 |
557 | - Height = 215 | |
551 | + Height = 74 | |
558 | 552 | Align = alClient |
559 | 553 | BevelOuter = bvNone |
560 | 554 | TabOrder = 1 |
@@ -562,7 +556,7 @@ object GikoForm: TGikoForm | ||
562 | 556 | Left = 0 |
563 | 557 | Top = 46 |
564 | 558 | Width = 704 |
565 | - Height = 149 | |
559 | + Height = 8 | |
566 | 560 | Align = alClient |
567 | 561 | BevelOuter = bvNone |
568 | 562 | UseDockManager = False |
@@ -572,7 +566,7 @@ object GikoForm: TGikoForm | ||
572 | 566 | Left = 0 |
573 | 567 | Top = 0 |
574 | 568 | Width = 704 |
575 | - Height = 149 | |
569 | + Height = 8 | |
576 | 570 | Align = alClient |
577 | 571 | TabOrder = 0 |
578 | 572 | OnEnter = BrowserEnter |
@@ -581,7 +575,7 @@ object GikoForm: TGikoForm | ||
581 | 575 | OnNewWindow2 = BrowserNewWindow2 |
582 | 576 | OnDocumentComplete = BrowserDocumentComplete |
583 | 577 | ControlData = { |
584 | - 4C000000C3480000660F00000000000000000000000000000000000000000000 | |
578 | + 4C000000C3480000D40000000000000000000000000000000000000000000000 | |
585 | 579 | 000000004C000000000000000000000001000000E0D057007335CF11AE690800 |
586 | 580 | 2B2E12620A000000000000004C0000000114020000000000C000000000000046 |
587 | 581 | 8000000000000000000000000000000000000000000000000000000000000000 |
@@ -590,7 +584,7 @@ object GikoForm: TGikoForm | ||
590 | 584 | end |
591 | 585 | object BrowserBottomPanel: TGikoPanel |
592 | 586 | Left = 0 |
593 | - Top = 195 | |
587 | + Top = 54 | |
594 | 588 | Width = 704 |
595 | 589 | Height = 20 |
596 | 590 | Align = alBottom |
@@ -868,7 +862,7 @@ object GikoForm: TGikoForm | ||
868 | 862 | end |
869 | 863 | object MessagePanel: TPanel |
870 | 864 | Left = 0 |
871 | - Top = 414 | |
865 | + Top = 273 | |
872 | 866 | Width = 854 |
873 | 867 | Height = 34 |
874 | 868 | Align = alBottom |
@@ -6015,7 +6009,7 @@ object GikoForm: TGikoForm | ||
6015 | 6009 | end |
6016 | 6010 | object ActionList: TActionList |
6017 | 6011 | Images = ToobarImageList |
6018 | - Left = 8 | |
6012 | + Left = 5 | |
6019 | 6013 | Top = 372 |
6020 | 6014 | object OnlyAHundredResAction: TAction |
6021 | 6015 | Category = #12473#12524#12483#12489 |
@@ -7032,8 +7026,8 @@ object GikoForm: TGikoForm | ||
7032 | 7026 | end |
7033 | 7027 | object LogFolderOpenAction: TAction |
7034 | 7028 | Category = #26495 |
7035 | - Caption = 'Explore'#12391'Log'#12501#12457#12523#12480#12434#38283#12367 | |
7036 | - Hint = 'Explore'#12391'Log'#12501#12457#12523#12480#12434#38283#12367 | |
7029 | + Caption = 'Explorer'#12391'Log'#12501#12457#12523#12480#12434#38283#12367 | |
7030 | + Hint = 'Explorer'#12391'Log'#12501#12457#12523#12480#12434#38283#12367 | |
7037 | 7031 | OnExecute = LogFolderOpenActionExecute |
7038 | 7032 | OnUpdate = LogFolderOpenActionUpdate |
7039 | 7033 | end |
@@ -7071,6 +7065,20 @@ object GikoForm: TGikoForm | ||
7071 | 7065 | Hint = #12479#12502#12398#38918#30058#12434#33258#21205#24489#20803 |
7072 | 7066 | OnExecute = TabAutoLoadActionExecute |
7073 | 7067 | 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 | |
7074 | 7082 | end |
7075 | 7083 | object BrowserPopupMenu: TPopupMenu |
7076 | 7084 | Left = 68 |
@@ -7566,4 +7574,8 @@ object GikoForm: TGikoForm | ||
7566 | 7574 | AutoCheck = True |
7567 | 7575 | end |
7568 | 7576 | end |
7577 | + object ListColumnPopupMenu: TPopupMenu | |
7578 | + Left = 37 | |
7579 | + Top = 403 | |
7580 | + end | |
7569 | 7581 | end |
@@ -28,6 +28,7 @@ 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); | |
31 | 32 | |
32 | 33 | TBrowserRecord = class; |
33 | 34 |
@@ -527,7 +528,7 @@ type | ||
527 | 528 | N65: TMenuItem; |
528 | 529 | BBSSelectPopupMenu: TPopupMenu; |
529 | 530 | PlugInMenu: TMenuItem; |
530 | - TmpToolBar: TToolBar; | |
531 | + TmpToolBar: TToolBar; | |
531 | 532 | TreeSelectNameCopy: TAction; |
532 | 533 | TreeSelectNamePupupMenu: TMenuItem; |
533 | 534 | BrowserPanel: TPanel; |
@@ -550,7 +551,7 @@ type | ||
550 | 551 | OpenLogFolder: TMenuItem; |
551 | 552 | Browser: TWebBrowser; |
552 | 553 | TabSave: TMenuItem; |
553 | - TabOpen: TMenuItem; | |
554 | + TabOpen: TMenuItem; | |
554 | 555 | TabsSaveAction: TAction; |
555 | 556 | TabsOpenAction: TAction; |
556 | 557 | ResRangePopupMenu: TPopupMenu; |
@@ -573,12 +574,14 @@ type | ||
573 | 574 | N69: TMenuItem; |
574 | 575 | S7: TMenuItem; |
575 | 576 | ThreadRangeButton: TToolButton; |
576 | - TabAutoSaveAction: TAction; | |
577 | + TabAutoSaveAction: TAction; | |
577 | 578 | TabAutoLoadAction: TAction; |
579 | + ListColumnPopupMenu: TPopupMenu; | |
580 | + JumpToNumOfResAction: TAction; | |
581 | + FavoriteTreeViewCollapseAction: TAction; | |
578 | 582 | procedure FormCreate(Sender: TObject); |
579 | 583 | procedure FormDestroy(Sender: TObject); |
580 | 584 | procedure CabinetPanelHide(Sender: TObject); |
581 | - procedure FormClose(Sender: TObject; var Action: TCloseAction); | |
582 | 585 | procedure ListViewData(Sender: TObject; Item: TListItem); |
583 | 586 | procedure ListViewDataFind(Sender: TObject; Find: TItemFind; |
584 | 587 | const FindString: String; const FindPosition: TPoint; |
@@ -806,8 +809,6 @@ type | ||
806 | 809 | procedure SelectComboBoxExit(Sender: TObject); |
807 | 810 | procedure SelectResActionExecute(Sender: TObject); |
808 | 811 | procedure SelectResActionUpdate(Sender: TObject); |
809 | - procedure FormKeyUp(Sender: TObject; var Key: Word; | |
810 | - Shift: TShiftState); | |
811 | 812 | procedure AllResActionExecute(Sender: TObject); |
812 | 813 | procedure AllResActionUpdate(Sender: TObject); |
813 | 814 | procedure ReloadClick(Sender: TObject); |
@@ -872,7 +873,7 @@ type | ||
872 | 873 | var Handled: Boolean); |
873 | 874 | procedure KoreCopyExecute(Sender: TObject); |
874 | 875 | procedure BrowserTabPopupMenuPopup(Sender: TObject); |
875 | - procedure MenuToolBarResize(Sender: TObject); | |
876 | + procedure MenuToolBarResize(Sender: TObject); | |
876 | 877 | procedure StdToolBarResize(Sender: TObject); |
877 | 878 | procedure LinkToolBarResize(Sender: TObject); |
878 | 879 | procedure ListNameToolBarResize(Sender: TObject); |
@@ -895,7 +896,7 @@ type | ||
895 | 896 | procedure SetFocusForBrowserActionUpdate(Sender: TObject); |
896 | 897 | procedure SetFocusForThreadListActionExecute(Sender: TObject); |
897 | 898 | procedure SetFocusForCabinetActionExecute(Sender: TObject); |
898 | - procedure BrowserMaxAndFocusActionExecute(Sender: TObject); | |
899 | + procedure BrowserMaxAndFocusActionExecute(Sender: TObject); | |
899 | 900 | procedure BrowserMaxAndFocusActionUpdate(Sender: TObject); |
900 | 901 | procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject); |
901 | 902 | procedure ListViewExit(Sender: TObject); |
@@ -918,13 +919,18 @@ type | ||
918 | 919 | procedure OnlyAHundredResActionExecute(Sender: TObject); |
919 | 920 | procedure OnlyKokoResActionExecute(Sender: TObject); |
920 | 921 | procedure OnlyNewResActionExecute(Sender: TObject); |
921 | - procedure BrowsBoradHeadActionExecute(Sender: TObject); | |
922 | + procedure BrowsBoradHeadActionExecute(Sender: TObject); | |
922 | 923 | procedure BrowsBoradHeadActionUpdate(Sender: TObject); |
923 | 924 | procedure EditNGActionExecute(Sender: TObject); |
924 | 925 | procedure ThreadRangeActionUpdate(Sender: TObject); |
925 | 926 | procedure ThreadRangeActionExecute(Sender: TObject); |
926 | - procedure TabAutoSaveActionExecute(Sender: TObject); | |
927 | + procedure TabAutoSaveActionExecute(Sender: TObject); | |
927 | 928 | 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); | |
928 | 934 | private |
929 | 935 | { Private é¾ } |
930 | 936 | //RoundList : TRoundList; |
@@ -972,22 +978,24 @@ type | ||
972 | 978 | |
973 | 979 | FDropSpaceNode: TTreeNode; |
974 | 980 | |
975 | - FDragTime : Cardinal; //NÌD&Dp | |
976 | - FDragButton : TToolButton; //NÌD&DpÉDragµÄéButtonÛ¶ | |
977 | - FDragWFirst : Boolean; //WebTabÌD&Dp | |
981 | + FDragTime : Cardinal; ///< NÌD&Dp | |
982 | + FDragButton : TToolButton; ///< NÌD&DpÉDragµÄéButtonÛ¶ | |
983 | + FDragWFirst : Boolean; ///< WebTabÌD&Dp | |
978 | 984 | |
979 | - FListViewBackGroundColor : TColor; //ListViewÌBackGroundColor | |
980 | - FUseOddResOddColor : Boolean; //æ¾XÆXbhÌXªáÁ½Æ«É¼ÌFÅ\¦ | |
981 | - FOddColor : TColor; //»ÌF | |
985 | + FListViewBackGroundColor : TColor; ///< ListViewÌBackGroundColor | |
986 | + FUseOddResOddColor : Boolean; ///< æ¾XÆXbhÌXªáÁ½Æ«É¼ÌFÅ\¦ | |
987 | + FOddColor : TColor; ///< »ÌF | |
982 | 988 | |
983 | - FSelectResWord : string; // Xi[h | |
984 | - FIsIgnoreResize : Boolean; // TCYCxgð³·é©Ç¤© | |
985 | - FIsMinimize : TMinimizeType; // Ŭ»µÄ¢éÅ© | |
986 | - FOldFormWidth : Integer; // ¼OÌEBhEÌ | |
987 | - FToolBarSettingSender : TToolBarSettingSenderType; // c[o[ÝèðNbNµ½N[o[ | |
988 | - FMouseDownPos : TPoint; // uEU^uÅ}EXðµ½Æ«ÌÀW | |
989 | + FSelectResWord : string; ///< Xi[h | |
990 | + FIsIgnoreResize : TResizeType; ///< TCYCxgð³·é©Ç¤© | |
991 | + FIsMinimize : TMinimizeType; ///< Ŭ»µÄ¢éÅ© | |
992 | + FOldFormWidth : Integer; ///< ¼OÌEBhEÌ | |
993 | + FToolBarSettingSender : TToolBarSettingSenderType; ///< c[o[ÝèðNbNµ½N[o[ | |
994 | + FMouseDownPos : TPoint; ///< uEU^uÅ}EXðµ½Æ«ÌÀW | |
989 | 995 | FBrowsers: TList; |
990 | - FResRangeMenuSelect : Longint; ///< ResRangeButton ÅIð³êÄ¢éÚ (tH[}bgÍ ResRange Ý·) | |
996 | + FResRangeMenuSelect : Longint; ///< ResRangeButton ÅIð³êÄ¢éÚ (tH[}bgÍ ResRange Ý·) | |
997 | + FStartUp : Boolean; | |
998 | + FIsHandledWheel : Boolean; ///< ùÉó¯æÁ½ WM_MOUSEWHEEL ©Ç¤© | |
991 | 999 | procedure SetBoardTreeNode( inBBS : TBBS ); |
992 | 1000 | function SetCategoryListItem(ABBS2ch: TBBS): Integer; |
993 | 1001 | function SetBoardListItem(Category: TCategory): Integer; |
@@ -1000,7 +1008,7 @@ type | ||
1000 | 1008 | procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer); |
1001 | 1009 | procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer); |
1002 | 1010 | |
1003 | - procedure SetActiveList(Obj: TObject); | |
1011 | + | |
1004 | 1012 | procedure ListClick; |
1005 | 1013 | procedure ListDoubleClick(Shift: TShiftState); |
1006 | 1014 | procedure BrowserMovement(const AName: string); overload; |
@@ -1051,37 +1059,41 @@ type | ||
1051 | 1059 | procedure BBSMenuItemOnClick( Sender : TObject ); |
1052 | 1060 | // |
1053 | 1061 | procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean); |
1054 | - // CoolBar ÌÝèðÏÉÛ¶ | |
1062 | + /// CoolBar ÌÝèðÏÉÛ¶ | |
1055 | 1063 | procedure SaveCoolBarSettings; |
1056 | - // CoolBar ÌÝèðÏ©ç³ | |
1064 | + /// CoolBar ÌÝèðÏ©ç³ | |
1057 | 1065 | procedure LoadCoolBarSettings; |
1058 | - // Ŭ»³êé | |
1066 | + /// Ŭ»³êé | |
1059 | 1067 | procedure OnMinimize; |
1060 | - // Ŭ»³ê½ | |
1068 | + /// Ŭ»³ê½ | |
1061 | 1069 | procedure OnMinimized; |
1062 | - // CoolBar ªTCYÏX³ê½ | |
1070 | + /// CoolBar ªTCYÏX³ê½ | |
1063 | 1071 | procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar); |
1064 | - // TreeView ªNbN³ê½ | |
1072 | + /// TreeView ªNbN³ê½ | |
1065 | 1073 | procedure TreeClick( Node : TTreeNode ); |
1066 | - // TreeView ª_uNbN³ê½ | |
1074 | + /// TreeView ª_uNbN³ê½ | |
1067 | 1075 | procedure TreeDoubleClick( Node : TTreeNode ); |
1068 | - // MRirÌbZ[W[vð¡æèµÜ· | |
1076 | + /// MRirÌbZ[W[vð¡æèµÜ· | |
1069 | 1077 | procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean); |
1070 | - // uEUÌL[_ECxg | |
1071 | - // CxgðæèµÁ½êÍ True ðÔ· | |
1078 | + /// uEUÌL[_ECxg | |
1079 | + /// CxgðæèµÁ½êÍ True ðÔ· | |
1072 | 1080 | function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean; |
1073 | - // eÉ éLrlbgE BBS j [ðZbg^XV | |
1081 | + /// eÉ éLrlbgE BBS j [ðZbg^XV | |
1074 | 1082 | procedure SetBBSMenu; |
1075 | 1083 | function WebBrowserClick(Sender: TObject): WordBool; |
1076 | 1084 | procedure SkinorCSSFilesCopy(path: string); |
1077 | - // ^uæ¾ | |
1085 | + /// ^uæ¾ | |
1078 | 1086 | function GetTabURLs(AStringList: TStringList) : Boolean; |
1079 | - // ^uÛ¶ | |
1087 | + /// ^uÛ¶ | |
1080 | 1088 | function SaveTabURLs : Boolean; |
1081 | - // ^uÇÝoµ | |
1089 | + /// ^uÇÝoµ | |
1082 | 1090 | function LoadTabURLs : Boolean; |
1083 | - // ohðÄvZEÄÝè·é | |
1091 | + /// ohðÄvZEÄÝè·é | |
1084 | 1092 | procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar ); |
1093 | + /// ListView Ì Column ð^ÌJÉÏ· | |
1094 | + function ActiveListTrueColumn( column : TListColumn ) : TListColumn; | |
1095 | + /// ListColumnPopupMenu ACeÌNbNCxg | |
1096 | + procedure ListColumnPopupMenuOnClick( Sender : TObject ); | |
1085 | 1097 | protected |
1086 | 1098 | procedure CreateParams(var Params: TCreateParams); override; |
1087 | 1099 | procedure WndProc(var Message: TMessage); override; |
@@ -1093,8 +1105,11 @@ type | ||
1093 | 1105 | { Public é¾ } |
1094 | 1106 | // FDownload: TDownload; |
1095 | 1107 | FControlThread: TThreadControl; |
1096 | - procedure MoveToURL(URL: string); | |
1097 | - procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True); | |
1108 | + procedure MoveToURL(const inURL: string); | |
1109 | + function InsertBrowserTab( | |
1110 | + ThreadItem : TThreadItem; | |
1111 | + ActiveTab : Boolean = True | |
1112 | + ) : TBrowserRecord; | |
1098 | 1113 | procedure ReloadBBS; |
1099 | 1114 | function GetHttpState: Boolean; |
1100 | 1115 | procedure SetEnabledCloseButton(Enabled: Boolean); |
@@ -1114,7 +1129,7 @@ type | ||
1114 | 1129 | function GetActiveContent: TThreadItem; |
1115 | 1130 | function GetActiveList: TObject; |
1116 | 1131 | |
1117 | - property ActiveList: TObject read GetActiveList write SetActiveList; | |
1132 | + | |
1118 | 1133 | // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime; |
1119 | 1134 | |
1120 | 1135 | procedure SetListViewType(AViewType: TGikoViewType); overload; |
@@ -1138,16 +1153,19 @@ type | ||
1138 | 1153 | // property Favorite: TFavorite read FFavorite write FFavorite; |
1139 | 1154 | procedure SetToolBarPopup; |
1140 | 1155 | procedure ShowFavoriteAddDialog( Item : TObject ); |
1141 | - procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList); | |
1142 | - procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList); | |
1156 | + procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList); | |
1157 | + procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList); | |
1143 | 1158 | property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor; |
1144 | 1159 | property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor; |
1145 | 1160 | property OddColor : TColor read FOddColor write FOddColor; |
1146 | 1161 | |
1147 | 1162 | function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton; |
1148 | 1163 | procedure OnPlugInMenuItem( Sender : TObject ); |
1149 | - procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList); | |
1150 | - | |
1164 | + procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList); | |
1165 | + /// ListView ÌJ¨æÑÊuÌÛ¶ KuroutSetting©çæѾµ½¢ÌÅ | |
1166 | + procedure ActiveListColumnSave; | |
1167 | + procedure SetActiveList(Obj: TObject); | |
1168 | + property ActiveList: TObject read GetActiveList write SetActiveList; | |
1151 | 1169 | published |
1152 | 1170 | property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton; |
1153 | 1171 | end; |
@@ -1176,18 +1194,18 @@ type | ||
1176 | 1194 | TBrowserRecord = class( TObject ) |
1177 | 1195 | private |
1178 | 1196 | FBrowser : TWebBrowser; |
1179 | - FEvent: THTMLDocumentEventSink;//uEUhL gCxg | |
1197 | + FEvent: THTMLDocumentEventSink; //!< uEUhL gCxg | |
1180 | 1198 | FThread : TThreadItem; |
1181 | 1199 | FLastSize : Integer; |
1182 | 1200 | FRepaint : Boolean; |
1183 | - // FOnlyHundred: Boolean; | |
1201 | + FMovement : string; //!< XN[æAJ[ | |
1184 | 1202 | public |
1185 | 1203 | destructor Destroy; override; |
1186 | 1204 | property Browser : TWebBrowser read FBrowser write FBrowser; |
1187 | 1205 | property Thread : TThreadItem read FThread write FThread; |
1188 | 1206 | property LastSize : Integer read FLastSize write FLastSize; |
1189 | 1207 | property Repaint : Boolean read FRepaint write FRepaint; |
1190 | -// property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred; | |
1208 | + property Movement : string read FMovement write FMovement; | |
1191 | 1209 | end; |
1192 | 1210 | |
1193 | 1211 | var |
@@ -1248,6 +1266,7 @@ const | ||
1248 | 1266 | USER_RESIZED = WM_USER + 2001; |
1249 | 1267 | USER_MINIMIZED = WM_USER + 2002; |
1250 | 1268 | USER_SETLINKBAR = WM_USER + 2003; |
1269 | + USER_DOCUMENTCOMPLETE = WM_USER + 2004; ///< wParam : TWebBrowser | |
1251 | 1270 | SELECTTIME_INTERBAL = 110; |
1252 | 1271 | |
1253 | 1272 | BROWSER_COUNT = 5; //uEUÌ |
@@ -1285,11 +1304,12 @@ begin | ||
1285 | 1304 | Writeln(' I¹ÍAMRirEBhEð¶ľ³¢'); |
1286 | 1305 | Writeln('============================================================'); |
1287 | 1306 | {$ENDIF} |
1307 | + FStartUp := false; | |
1288 | 1308 | Application.OnDeactivate := AppFormDeactivate; |
1289 | 1309 | Self.OnDeactivate := AppFormDeactivate; |
1290 | 1310 | Application.HookMainWindow(Hook); |
1291 | 1311 | Application.OnMessage := HandleAppMessage; //Èñ©³ÄàåävÉÈÁ½@by@à¶ã |
1292 | - Self.DoubleBuffered := true; | |
1312 | +// Self.DoubleBuffered := true; | |
1293 | 1313 | FTreeType := gttNone; |
1294 | 1314 | |
1295 | 1315 | FSearchDialog := nil; |
@@ -1304,13 +1324,14 @@ begin | ||
1304 | 1324 | newBrowser.Align := alNone; |
1305 | 1325 | newBrowser.Left := 0; |
1306 | 1326 | newBrowser.Top := 0; |
1307 | - //newBrowser.DoubleBuffered := true; | |
1327 | + newBrowser.StatusBar := false; | |
1328 | + newBrowser.MenuBar := false; | |
1329 | + newBrowser.AddressBar := false; | |
1308 | 1330 | newBrowser.OnDocumentComplete := BrowserDocumentComplete; |
1309 | 1331 | newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2; |
1310 | 1332 | newBrowser.OnEnter := BrowserEnter; |
1311 | 1333 | newBrowser.OnNewWindow2 := BrowserNewWindow2; |
1312 | 1334 | newBrowser.OnStatusTextChange := BrowserStatusTextChange; |
1313 | - //newBrowser.OnTitleChange := BrowserTitleChange; | |
1314 | 1335 | newBrowser.Navigate(BLANK_HTML); |
1315 | 1336 | ShowWindow(newBrowser.Handle, SW_HIDE); |
1316 | 1337 |
@@ -1319,7 +1340,7 @@ begin | ||
1319 | 1340 | ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW); |
1320 | 1341 | |
1321 | 1342 | // N®ÉÛ¶³êĵܤÎô |
1322 | - FIsIgnoreResize := True; | |
1343 | + FIsIgnoreResize := rtResizing; | |
1323 | 1344 | |
1324 | 1345 | //èÌJ[\ |
1325 | 1346 | Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND'); |
@@ -1328,38 +1349,8 @@ begin | ||
1328 | 1349 | //AhXðÇÝÝ |
1329 | 1350 | AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount); |
1330 | 1351 | |
1331 | - // OÂvOCð[h(ReadBoardFile, LoadHistory æèæÉs¤±Æ) | |
1332 | - InitializeBoardPlugIns; | |
1333 | - | |
1334 | 1352 | EnabledCloseButton := True; |
1335 | 1353 | |
1336 | - | |
1337 | - //ñf[^ÇÝÝ | |
1338 | - RoundList := TRoundList.Create; | |
1339 | - RoundList.LoadRoundBoardFile; | |
1340 | - | |
1341 | - // {[ht@Cñ(ReadFavorite æèæÉs¤±Æ) | |
1342 | - GikoSys.ListBoardFile; | |
1343 | - | |
1344 | - RoundList.LoadRoundThreadFile; | |
1345 | - | |
1346 | - if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then | |
1347 | - GikoSys.ListBoardFile; | |
1348 | - | |
1349 | - // j [ÉÇÁ | |
1350 | - SetBBSMenu; | |
1351 | - | |
1352 | - // qXgXg(LoadHistory æèàæÉs¤±Æ) | |
1353 | - FHistoryList := TList.Create; | |
1354 | - | |
1355 | - // ðÇÝÝ | |
1356 | - LoadHistory; | |
1357 | - | |
1358 | - //¨CÉüèÇÝÝ | |
1359 | -// FFavorite := TFavorite.Create(FavoriteTreeView); | |
1360 | - FavoriteDM.SetFavTreeView(FavoriteTreeView); | |
1361 | - FavoriteDM.ReadFavorite; | |
1362 | - | |
1363 | 1354 | //XgX^C |
1364 | 1355 | ListView.ViewStyle := GikoSys.Setting.ListStyle; |
1365 | 1356 |
@@ -1403,8 +1394,8 @@ begin | ||
1403 | 1394 | ListView.Font.Name := GikoSys.Setting.ListFontName; |
1404 | 1395 | ListView.Font.Size := GikoSys.Setting.ListFontSize; |
1405 | 1396 | ListView.Font.Color := GikoSys.Setting.ListFontColor; |
1406 | - //ListView.Color := GikoSys.Setting.ListBackColor; | |
1407 | - ListViewBackGroundColor := GikoSys.Setting.ListBackColor; | |
1397 | + ListViewBackGroundColor := clWhite; // ftHgÉÝ赽̿ | |
1398 | + ListViewBackGroundColor := GikoSys.Setting.ListBackColor; // [Uè`ÉÏX | |
1408 | 1399 | FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum; |
1409 | 1400 | FOddColor := GikoSys.Setting.OddColor; |
1410 | 1401 |
@@ -1472,6 +1463,35 @@ begin | ||
1472 | 1463 | FBrowserSizeHeight := GikoSys.Setting.ListHeight; |
1473 | 1464 | FBrowserSizeWidth := GikoSys.Setting.ListWidth; |
1474 | 1465 | |
1466 | + // OÂvOCð[h(ReadBoardFile, LoadHistory æèæÉs¤±Æ) | |
1467 | + InitializeBoardPlugIns; | |
1468 | + | |
1469 | + //ñf[^ÇÝÝ | |
1470 | + RoundList := TRoundList.Create; | |
1471 | + RoundList.LoadRoundBoardFile; | |
1472 | + | |
1473 | + // {[ht@Cñ(ReadFavorite æèæÉs¤±Æ) | |
1474 | + GikoSys.ListBoardFile; | |
1475 | + | |
1476 | + RoundList.LoadRoundThreadFile; | |
1477 | + | |
1478 | + if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then | |
1479 | + GikoSys.ListBoardFile; | |
1480 | + | |
1481 | + // j [ÉÇÁ | |
1482 | + SetBBSMenu; | |
1483 | + | |
1484 | + // qXgXg(LoadHistory æèàæÉs¤±Æ) | |
1485 | + FHistoryList := TList.Create; | |
1486 | + | |
1487 | + // ðÇÝÝ | |
1488 | + LoadHistory; | |
1489 | + | |
1490 | + //¨CÉüèÇÝÝ | |
1491 | +// FFavorite := TFavorite.Create(FavoriteTreeView); | |
1492 | + FavoriteDM.SetFavTreeView(FavoriteTreeView); | |
1493 | + FavoriteDM.ReadFavorite; | |
1494 | + | |
1475 | 1495 | ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical); |
1476 | 1496 | ArrangeAction.Execute; |
1477 | 1497 |
@@ -1668,7 +1688,7 @@ begin | ||
1668 | 1688 | if GikoSys.Setting.CabinetIndex < Length( BBSs ) then |
1669 | 1689 | ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] ); |
1670 | 1690 | // N®ÉÛ¶³êĵܤÎô 2 |
1671 | - FIsIgnoreResize := True; | |
1691 | + FIsIgnoreResize := rtResizing; | |
1672 | 1692 | CabinetBBSAction.Execute; |
1673 | 1693 | end; |
1674 | 1694 | end else begin |
@@ -1677,7 +1697,7 @@ begin | ||
1677 | 1697 | end; |
1678 | 1698 | |
1679 | 1699 | // N®ÉÛ¶³êĵܤÎô 3 |
1680 | - FIsIgnoreResize := True; | |
1700 | + FIsIgnoreResize := rtResizing; | |
1681 | 1701 | |
1682 | 1702 | //I[gOC |
1683 | 1703 | if GikoSys.Setting.AutoLogin then |
@@ -1701,7 +1721,7 @@ begin | ||
1701 | 1721 | //Samba24Ìt@C`FbN |
1702 | 1722 | GikoSys.SambaFileExists(); |
1703 | 1723 | |
1704 | - //^u©®ÇÝÝ (AV¶Ì½ßêó) | |
1724 | + //É¿áñêt@CÇÝoµ | |
1705 | 1725 | end; |
1706 | 1726 | |
1707 | 1727 | // CoolBar ÌÝèðÏÉÛ¶ |
@@ -1711,7 +1731,7 @@ var | ||
1711 | 1731 | CoolSet : TCoolSet; |
1712 | 1732 | begin |
1713 | 1733 | |
1714 | - if IsIconic( Handle ) or FIsIgnoreResize then | |
1734 | + if IsIconic( Handle ) or (FIsIgnoreResize <> rtNone) then | |
1715 | 1735 | Exit; |
1716 | 1736 | |
1717 | 1737 | //N[o[Û¶(Main) |
@@ -1752,7 +1772,7 @@ begin | ||
1752 | 1772 | for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin |
1753 | 1773 | CoolSet := GikoSys.Setting.MainCoolSet[i]; |
1754 | 1774 | if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin |
1755 | - FIsIgnoreResize := False; | |
1775 | + FIsIgnoreResize := rtNone; | |
1756 | 1776 | SaveCoolBarSettings; |
1757 | 1777 | Exit; |
1758 | 1778 | end; |
@@ -1771,7 +1791,7 @@ begin | ||
1771 | 1791 | for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin |
1772 | 1792 | CoolSet := GikoSys.Setting.ListCoolSet[i]; |
1773 | 1793 | if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin |
1774 | - FIsIgnoreResize := False; | |
1794 | + FIsIgnoreResize := rtNone; | |
1775 | 1795 | SaveCoolBarSettings; |
1776 | 1796 | Exit; |
1777 | 1797 | end; |
@@ -1790,7 +1810,7 @@ begin | ||
1790 | 1810 | for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin |
1791 | 1811 | CoolSet := GikoSys.Setting.BrowserCoolSet[i]; |
1792 | 1812 | if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin |
1793 | - FIsIgnoreResize := False; | |
1813 | + FIsIgnoreResize := rtNone; | |
1794 | 1814 | SaveCoolBarSettings; |
1795 | 1815 | Exit; |
1796 | 1816 | end; |
@@ -1809,59 +1829,70 @@ end; | ||
1809 | 1829 | // |
1810 | 1830 | procedure TGikoForm.FormShow(Sender: TObject); |
1811 | 1831 | begin |
1812 | - ShowWindow(Application.Handle, SW_HIDE); | |
1813 | - | |
1814 | - //FormCreateÅâéÆÂÝ誽f³êÈ¢êª éÌÅFormShowÅâé±Æɵ½ | |
1815 | - //c[o[\¦ | |
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 | - //uEU^u | |
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; | |
1832 | + if not FStartUp then begin | |
1833 | + ShowWindow(Application.Handle, SW_HIDE); | |
1834 | + | |
1835 | + //FormCreateÅâéÆÂÝ誽f³êÈ¢êª éÌÅFormShowÅâé±Æɵ½ | |
1836 | + //c[o[\¦ | |
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 | + //uEU^u | |
1853 | + BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible; | |
1854 | + BrowserTabVisibleActionExecute(nil); | |
1842 | 1855 | |
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; | |
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; | |
1853 | 1863 | |
1854 | - // CoolBar ³ | |
1855 | - LoadCoolBarSettings; | |
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; | |
1856 | 1874 | |
1857 | - FIsIgnoreResize := False; | |
1875 | + // ListView Ìwb_hbO | |
1876 | +// ListView.FullDrag := True; | |
1858 | 1877 | |
1859 | - //TabAutoLoad | |
1860 | - //FormCrete©çÚ®B | |
1861 | - if GikoSys.Setting.TabAutoLoadSave then begin | |
1862 | - TabAutoLoadAction.Execute; | |
1863 | - end; | |
1878 | + // CoolBar ³ | |
1879 | + LoadCoolBarSettings; | |
1880 | + | |
1881 | + FIsIgnoreResize := rtNone; | |
1882 | + | |
1883 | + //TabAutoLoad | |
1884 | + //FormCrete©çÚ®B | |
1885 | + if GikoSys.Setting.TabAutoLoadSave then begin | |
1886 | + TabAutoLoadAction.Execute; | |
1887 | + end; | |
1888 | + //É¿áñêÄàT|[g@\ | |
1889 | + if GikoSys.Setting.GengoSupport then begin | |
1890 | + //\èn | |
1891 | + //Testü¯ | |
1892 | + end; | |
1864 | 1893 | |
1894 | + FStartUp := true; | |
1895 | + end; | |
1865 | 1896 | end; |
1866 | 1897 | |
1867 | 1898 | procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
@@ -1893,17 +1924,7 @@ begin | ||
1893 | 1924 | // Application.OnDeactivate := nil; |
1894 | 1925 | // Self.OnDeactivate := nil; |
1895 | 1926 | try |
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; | |
1927 | + ActiveListColumnSave; | |
1907 | 1928 | except |
1908 | 1929 | end; |
1909 | 1930 | try |
@@ -2080,10 +2101,6 @@ begin | ||
2080 | 2101 | |
2081 | 2102 | end; |
2082 | 2103 | |
2083 | -//tH[N[Y | |
2084 | -procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction); | |
2085 | -begin | |
2086 | -end; | |
2087 | 2104 | //Lrlbg~{^NbN |
2088 | 2105 | procedure TGikoForm.CabinetPanelHide(Sender: TObject); |
2089 | 2106 | begin |
@@ -2221,9 +2238,9 @@ begin | ||
2221 | 2238 | Root.ImageIndex := ITEM_ICON_2CH1; |
2222 | 2239 | Root.SelectedIndex := ITEM_ICON_2CH2; |
2223 | 2240 | Root.Data := inBBS; |
2224 | - for i := 0 to inBBS.Count - 1 do begin | |
2241 | + for i := inBBS.Count - 1 downto 0 do begin | |
2225 | 2242 | Category := TCategory(inBBS.Items[i]); |
2226 | - CategoryNode := TreeView.Items.AddChild(Root, Category.Title); | |
2243 | + CategoryNode := TreeView.Items.AddChildFirst(Root, Category.Title); | |
2227 | 2244 | CategoryNode.Data := Category; |
2228 | 2245 | CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1; |
2229 | 2246 | CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2; |
@@ -2236,10 +2253,10 @@ begin | ||
2236 | 2253 | Category.CustomSort(BoardSortProc); |
2237 | 2254 | end; |
2238 | 2255 | |
2239 | - for j := 0 to Category.Count - 1 do begin | |
2256 | + for j := Category.Count - 1 downto 0 do begin | |
2240 | 2257 | Board := TBoard(Category.Items[j]); |
2241 | 2258 | Board.BeginUpdate; |
2242 | - BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title); | |
2259 | + BoardNode := TreeView.Items.AddChildFirst(CategoryNode, Board.Title); | |
2243 | 2260 | BoardNode.Data := Board; |
2244 | 2261 | //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin |
2245 | 2262 | if not Board.IsLogFile then begin |
@@ -2273,22 +2290,37 @@ begin | ||
2273 | 2290 | end; |
2274 | 2291 | |
2275 | 2292 | function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer; |
2276 | -const | |
2277 | - COLUMN: array[0..0] of string = ('JeS¼'); | |
2278 | 2293 | var |
2279 | - ListColumn: TListColumn; | |
2280 | - i: Integer; | |
2294 | + TitleColumn : TListColumn; | |
2295 | + ListColumn : TListColumn; | |
2296 | + i, id, idx : Integer; | |
2281 | 2297 | begin |
2282 | 2298 | ListView.Items.BeginUpdate; |
2283 | 2299 | try |
2284 | 2300 | Screen.Cursor := crHourGlass; |
2285 | 2301 | |
2286 | 2302 | ListView.Columns.Clear; |
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]; | |
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; | |
2291 | 2322 | end; |
2323 | + TitleColumn.Index := idx; | |
2292 | 2324 | |
2293 | 2325 | ListView.Items.Count := 0; |
2294 | 2326 | ListView.Items.Clear; |
@@ -2309,8 +2341,11 @@ begin | ||
2309 | 2341 | |
2310 | 2342 | FSortIndex := GikoSys.Setting.BBSSortIndex; |
2311 | 2343 | FSortOrder := GikoSys.Setting.BBSSortOrder; |
2312 | - if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then | |
2313 | - ListViewSort(nil, ListView.Column[FSortIndex]); | |
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; | |
2314 | 2349 | |
2315 | 2350 | Result := ABBS2ch.Count; |
2316 | 2351 | finally |
@@ -2320,22 +2355,37 @@ begin | ||
2320 | 2355 | end; |
2321 | 2356 | |
2322 | 2357 | function TGikoForm.SetBoardListItem(Category: TCategory): Integer; |
2323 | -const | |
2324 | - COLUMN: array[0..2] of string = ('¼', 'ñ\ñ', 'æ¾ú'); | |
2325 | 2358 | var |
2326 | - ListColumn: TListColumn; | |
2327 | - i: Integer; | |
2359 | + TitleColumn : TListColumn; | |
2360 | + ListColumn : TListColumn; | |
2361 | + i, id, idx : Integer; | |
2328 | 2362 | begin |
2329 | 2363 | ListView.Items.BeginUpdate; |
2330 | 2364 | try |
2331 | 2365 | Screen.Cursor := crHourGlass; |
2332 | 2366 | |
2333 | 2367 | ListView.Columns.Clear; |
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]; | |
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; | |
2338 | 2387 | end; |
2388 | + TitleColumn.Index := idx; | |
2339 | 2389 | |
2340 | 2390 | ListView.Items.Count := 0; |
2341 | 2391 | ListView.Items.Clear; |
@@ -2356,8 +2406,11 @@ begin | ||
2356 | 2406 | |
2357 | 2407 | FSortIndex := GikoSys.Setting.CategorySortIndex; |
2358 | 2408 | FSortOrder := GikoSys.Setting.CategorySortOrder; |
2359 | - if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then | |
2360 | - ListViewSort(nil, ListView.Column[FSortIndex]); | |
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; | |
2361 | 2414 | |
2362 | 2415 | Result := Category.Count; |
2363 | 2416 | finally |
@@ -2367,39 +2420,45 @@ begin | ||
2367 | 2420 | end; |
2368 | 2421 | |
2369 | 2422 | function TGikoForm.SetThreadListItem(Board: TBoard): Integer; |
2370 | -const | |
2371 | - COLUMN: array[0..7] of string = ('Xbh¼', 'JEg', 'æ¾', 'V ', | |
2372 | - '¢Ç', 'ñ\ñ', 'æ¾ú', 'Xì¬ú'); | |
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, Xbh¼, JEg, ñ\ñ, æ¾ú | |
2379 | -var | |
2380 | - ListColumn: TListColumn; | |
2381 | - i: Integer; | |
2423 | +var | |
2424 | + TitleColumn : TListColumn; | |
2425 | + ListColumn : TListColumn; | |
2426 | + i, id, idx : Integer; | |
2382 | 2427 | begin |
2383 | 2428 | ListView.Items.BeginUpdate; |
2384 | 2429 | try |
2385 | 2430 | Screen.Cursor := crHourGlass; |
2386 | 2431 | |
2432 | +{* | |
2387 | 2433 | // `«h~̽ßAÏX³êÄ¢éêÌÝ |
2388 | 2434 | // ¦¼ÌÍᤪJª¯¶AÆ¢Á½êÉÎÅ«È¢ÌÅÓ |
2389 | - if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then | |
2435 | + if ListView.Columns.Count <> GikoSys.Setting.BoardColumnOrder.Count then | |
2436 | +*} | |
2390 | 2437 | begin |
2391 | 2438 | ListView.Columns.Clear; |
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]; | |
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; | |
2397 | 2459 | end; |
2460 | + TitleColumn.Index := idx; | |
2398 | 2461 | end; |
2399 | - if GikoSys.Setting.NonAcquiredCount then | |
2400 | - ListView.Columns[2].Caption := COLUMN_NONACQUIREDCOUNT | |
2401 | - else | |
2402 | - ListView.Columns[2].Caption := COLUMN[2]; | |
2403 | 2462 | |
2404 | 2463 | ListView.Items.Count := 0; |
2405 | 2464 | ListView.Items.Clear; |
@@ -2417,8 +2476,11 @@ begin | ||
2417 | 2476 | |
2418 | 2477 | FSortIndex := GikoSys.Setting.BoardSortIndex; |
2419 | 2478 | FSortOrder := GikoSys.Setting.BoardSortOrder; |
2420 | - if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then | |
2421 | - ListViewSort(nil, ListView.Column[FSortIndex]); | |
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; | |
2422 | 2484 | |
2423 | 2485 | Result := Board.Count; |
2424 | 2486 | finally |
@@ -2438,9 +2500,11 @@ var | ||
2438 | 2500 | ThreadItem: TThreadItem; |
2439 | 2501 | RepStr: string; |
2440 | 2502 | ActivListObj : TObject; |
2503 | + i, idx : Integer; | |
2441 | 2504 | begin |
2442 | 2505 | ActivListObj := ActiveList; |
2443 | 2506 | if ActivListObj is TBBS then begin |
2507 | + //===== JeSXg ===== | |
2444 | 2508 | BBS := TBBS(ActivListObj); |
2445 | 2509 | |
2446 | 2510 | ListView.StateImages := nil; |
@@ -2463,7 +2527,10 @@ begin | ||
2463 | 2527 | |
2464 | 2528 | Item.ImageIndex := ITEM_ICON_CATEGORY1; |
2465 | 2529 | Item.Data := Category; |
2530 | + | |
2466 | 2531 | end else if ActivListObj is TCategory then begin |
2532 | + | |
2533 | + //===== ÂXg ===== | |
2467 | 2534 | Category := TCategory(ActivListObj); |
2468 | 2535 | |
2469 | 2536 | ListView.StateImages := nil; |
@@ -2484,25 +2551,44 @@ begin | ||
2484 | 2551 | else |
2485 | 2552 | Item.Caption := Board.Title; |
2486 | 2553 | |
2487 | - if Item.SubItems.Count <> 2 then begin | |
2554 | + if Item.SubItems.Count <> ListView.Columns.Count then begin | |
2488 | 2555 | Item.SubItems.Clear; |
2489 | - Item.SubItems.Add(''); | |
2490 | - Item.SubItems.Add(''); | |
2556 | + for i := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 1 do | |
2557 | + Item.SubItems.Add(''); | |
2491 | 2558 | end; |
2492 | 2559 | |
2493 | 2560 | Item.ImageIndex := ITEM_ICON_BOARD1; |
2494 | 2561 | |
2495 | - if Board.Round then | |
2496 | - Item.SubItems[0] := Board.RoundName // '\ñ' | |
2497 | - else | |
2498 | - Item.SubItems[0] := ''; | |
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; | |
2499 | 2586 | |
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); | |
2504 | 2587 | Item.Data := Board; |
2588 | + | |
2505 | 2589 | end else if ActivListObj is TBoard then begin |
2590 | + | |
2591 | + //===== XXg ===== | |
2506 | 2592 | Board := TBoard(ActivListObj); |
2507 | 2593 | |
2508 | 2594 | if GikoSys.Setting.ListIconVisible then |
@@ -2548,15 +2634,10 @@ begin | ||
2548 | 2634 | RepStr := CustomStringReplace(RepStr, '&', '&' ); |
2549 | 2635 | //RepStr := StringReplace(RepStr, 'M', ',', [rfReplaceAll]); |
2550 | 2636 | |
2551 | - if Item.SubItems.Count <> 7 then begin | |
2637 | + if Item.SubItems.Count <> ListView.Columns.Count then begin | |
2552 | 2638 | Item.SubItems.Clear; |
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(''); | |
2639 | + for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do | |
2640 | + Item.SubItems.Add(''); | |
2560 | 2641 | end; |
2561 | 2642 | |
2562 | 2643 | if ListNumberVisibleAction.Checked then |
@@ -2572,49 +2653,105 @@ begin | ||
2572 | 2653 | end; |
2573 | 2654 | |
2574 | 2655 | if ThreadItem.IsLogFile then begin |
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) | |
2579 | - else | |
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); | |
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 ] := ''; | |
2600 | 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 | |
2715 | + else | |
2716 | + Item.ImageIndex := ITEM_ICON_THREADLOG1; | |
2601 | 2717 | 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); | |
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 ] := ''; | |
2740 | + | |
2741 | + else | |
2742 | + Item.SubItems[ idx ] := ''; | |
2743 | + end; | |
2744 | + Inc( idx ); | |
2745 | + end; | |
2614 | 2746 | |
2747 | + if ThreadItem.NewArrival then | |
2748 | + Item.ImageIndex := ITEM_ICON_THREADNEW1 | |
2749 | + else | |
2750 | + Item.ImageIndex := ITEM_ICON_THREAD1; | |
2615 | 2751 | end; |
2616 | 2752 | |
2617 | 2753 | Item.Data := ThreadItem; |
2754 | + | |
2618 | 2755 | end; |
2619 | 2756 | end; |
2620 | 2757 |
@@ -2657,7 +2794,7 @@ var | ||
2657 | 2794 | ActiveFileName: string; |
2658 | 2795 | e: IHTMLElement; |
2659 | 2796 | Ext: string; |
2660 | - buf: string; | |
2797 | +// buf, buf2: string; | |
2661 | 2798 | PathRec: TPathRec; |
2662 | 2799 | begin |
2663 | 2800 | if not( TObject(Sender) is TWebBrowser )then |
@@ -2740,30 +2877,43 @@ begin | ||
2740 | 2877 | end else begin |
2741 | 2878 | threadItem := GetActiveContent; |
2742 | 2879 | if Pos('about:blank..', Text) = 1 then begin |
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); | |
2880 | + wkInt := LastDelimiter( '/', threadItem.URL ); | |
2881 | + if Pos( '?', Copy( threadItem.URL, wkInt, MaxInt ) ) = 0 then begin | |
2882 | + // Thread.URL Í PATH_INFO nµ | |
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 nµ | |
2887 | + URL := URL + Copy( Text, LastDelimiter( '/', Text ) + 1, MaxInt ) | |
2888 | + else | |
2889 | + // Text Í QUERY_STRING nµ | |
2890 | + URL := URL + Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt ); | |
2753 | 2891 | end else begin |
2754 | - URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL)); | |
2755 | - buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text)); | |
2892 | + // Thread.URL Í QUERY_STRING nµ | |
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 nµ | |
2897 | + // URL ÉÂÆL[ª«çÈ¢ÌÅ 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 nµ | |
2903 | + URL := URL + Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt ) | |
2904 | + end; | |
2756 | 2905 | end; |
2757 | - URL := URL + buf; | |
2758 | 2906 | end else begin |
2759 | 2907 | URL := Text; |
2760 | 2908 | end; |
2909 | + | |
2761 | 2910 | PathRec := Gikosys.Parse2chURL2(URL); |
2762 | 2911 | if (PathRec.FNoParam) then begin |
2763 | 2912 | PathRec.FSt := 1; |
2764 | 2913 | PathRec.FTo := 1; |
2765 | - end else | |
2914 | + end else begin | |
2766 | 2915 | Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo); |
2916 | + end; | |
2767 | 2917 | GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark ); |
2768 | 2918 | |
2769 | 2919 | if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin |
@@ -2790,10 +2940,10 @@ begin | ||
2790 | 2940 | // wkIntTo := 1; |
2791 | 2941 | //if PathRec.FFirst then |
2792 | 2942 | // wkIntSt := 1; |
2793 | - if PathRec.FStBegin then | |
2794 | - wkIntSt := 1; | |
2795 | - if PathRec.FToEnd then | |
2796 | - wkIntTo := 9999; | |
2943 | + //if PathRec.FStBegin then //http://````/-50Æ¢¤Æ« | |
2944 | + // wkIntSt := 1; // | |
2945 | + //if PathRec.FToEnd then //http://````/50-Æ¢¤Æ« | |
2946 | + // wkIntTo := 9999; // Ç¿çÌêàAGetPopupResNumberŤÜÔð²®·éÌÅÓæ¤B | |
2797 | 2947 | |
2798 | 2948 | //ATitle := ActiveFileName <> PathRec.FKey; |
2799 | 2949 | if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then |
@@ -2863,22 +3013,44 @@ end; | ||
2863 | 3013 | |
2864 | 3014 | procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word; |
2865 | 3015 | Shift: TShiftState); |
3016 | +var | |
3017 | + pos : TPoint; | |
2866 | 3018 | begin |
2867 | 3019 | if GetActiveList is TBoard then begin |
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; | |
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; | |
2874 | 3036 | end; |
2875 | 3037 | end else begin // TBBS, TCategory |
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); | |
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; | |
2882 | 3054 | end; |
2883 | 3055 | end; |
2884 | 3056 | end; |
@@ -2888,29 +3060,95 @@ begin | ||
2888 | 3060 | Result := FHttpState; |
2889 | 3061 | end; |
2890 | 3062 | |
3063 | +{*! | |
3064 | +\brief ListView Ì Column ð^ÌJÉÏ· | |
3065 | + | |
3066 | +Delphi 6 Personal ÅÌ ListView ÅÍ ListViewColumnClick CxgÅ | |
3067 | +³µ¢Jªn³êÈ¢½ßA³µ¢JÉÏ·µÜ·B | |
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 | + | |
2891 | 3107 | procedure TGikoForm.ListViewColumnClick(Sender: TObject; |
2892 | 3108 | Column: TListColumn); |
3109 | +var | |
3110 | + id, idx : Integer; | |
3111 | + orderList : TList; | |
2893 | 3112 | begin |
2894 | - if FSortIndex = Column.Index then | |
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 | |
2895 | 3127 | FSortOrder := not FSortOrder |
2896 | 3128 | else |
2897 | 3129 | FSortOrder := False; |
3130 | + | |
2898 | 3131 | ListViewSort(Sender, Column); |
2899 | 3132 | end; |
2900 | 3133 | |
2901 | 3134 | procedure TGikoForm.ListViewSort(Sender: TObject; Column: TListColumn); |
2902 | 3135 | var |
2903 | - i: Integer; | |
3136 | + i, id, idx : Integer; | |
3137 | + orderList : TList; | |
2904 | 3138 | wkBBS: TBBS; |
2905 | 3139 | wkCategory: TCategory; |
2906 | 3140 | wkBoard: TBoard; |
2907 | 3141 | begin |
2908 | - for i := 0 to ListView.Columns.Count - 1 do | |
3142 | + idx := ActiveListTrueColumn( Column ).Tag; | |
3143 | + | |
3144 | + for i := 0 to ListView.Columns.Count - 1 do begin | |
2909 | 3145 | ListView.Column[i].ImageIndex := -1; |
3146 | + end; | |
3147 | + | |
2910 | 3148 | if FSortOrder then |
2911 | - ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1 | |
3149 | + ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT1 | |
2912 | 3150 | else |
2913 | - ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2; | |
3151 | + ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT2; | |
2914 | 3152 | |
2915 | 3153 | Sort.SortNoFlag := ListNumberVisibleAction.Checked; |
2916 | 3154 |
@@ -2918,35 +3156,41 @@ begin | ||
2918 | 3156 | if TObject( FActiveList ) is TBBS then begin |
2919 | 3157 | //wkBBS := TBBS(TreeView.Selected.Data); |
2920 | 3158 | wkBBS := TBBS( FActiveList ); |
3159 | + orderList := GikoSys.Setting.BBSColumnOrder; | |
3160 | + id := Integer( orderList[ idx ] ); | |
2921 | 3161 | Sort.SortOrder := FSortOrder; |
2922 | - Sort.SortIndex := Column.Index; | |
2923 | - GikoSys.Setting.BBSSortIndex := Column.Index; | |
3162 | + Sort.SortIndex := id; | |
3163 | + GikoSys.Setting.BBSSortIndex := id; | |
2924 | 3164 | GikoSys.Setting.BBSSortOrder := FSortOrder; |
2925 | 3165 | wkBBS.Sort(CategorySortProc); |
2926 | - ListView.Refresh; | |
2927 | 3166 | //end else if TObject(TreeView.Selected.Data) is TCategory then begin |
2928 | 3167 | end else if TObject( FActiveList ) is TCategory then begin |
2929 | 3168 | //wkCategory := TCategory(TreeView.Selected.Data); |
2930 | 3169 | wkCategory := TCategory( FActiveList ); |
3170 | + orderList := GikoSys.Setting.CategoryColumnOrder; | |
3171 | + id := Integer( orderList[ idx ] ); | |
2931 | 3172 | Sort.SortOrder := FSortOrder; |
2932 | - Sort.SortIndex := Column.Index; | |
2933 | - GikoSys.Setting.CategorySortIndex := Column.Index; | |
3173 | + Sort.SortIndex := id; | |
3174 | + GikoSys.Setting.CategorySortIndex := id; | |
2934 | 3175 | GikoSys.Setting.CategorySortOrder := FSortOrder; |
2935 | 3176 | wkCategory.CustomSort(BoardSortProc); |
2936 | - ListView.Refresh; | |
2937 | 3177 | //end else if TObject(TreeView.Selected.Data) is TBoard then begin |
2938 | 3178 | end else if TObject( FActiveList ) is TBoard then begin |
2939 | 3179 | //wkBoard := TBoard(TreeView.Selected.Data); |
2940 | 3180 | wkBoard := TBoard( FActiveList ); |
3181 | + orderList := GikoSys.Setting.BoardColumnOrder; | |
3182 | + id := Integer( orderList[ idx ] ); | |
2941 | 3183 | Sort.SortOrder := FSortOrder; |
2942 | - Sort.SortIndex := Column.Index; | |
2943 | - Sort.SortNonAcquiredCountFlag := GikoSys.Setting.NonAcquiredCount; | |
2944 | - GikoSys.Setting.BoardSortIndex := Column.Index; | |
3184 | + Sort.SortIndex := id; | |
3185 | + GikoSys.Setting.BoardSortIndex := id; | |
2945 | 3186 | GikoSys.Setting.BoardSortOrder := FSortOrder; |
2946 | 3187 | wkBoard.CustomSort(ThreadItemSortProc); |
2947 | - ListView.Refresh; | |
3188 | + end else begin | |
3189 | + id := 0; | |
2948 | 3190 | end; |
2949 | - FSortIndex := Column.Index; | |
3191 | + | |
3192 | + ListView.Refresh; | |
3193 | + FSortIndex := id; | |
2950 | 3194 | end; |
2951 | 3195 | |
2952 | 3196 | procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar; |
@@ -3020,10 +3264,10 @@ begin | ||
3020 | 3264 | if TObject(Item.Data) is TThreadItem then begin |
3021 | 3265 | ThreadItem := TThreadItem(Item.Data); |
3022 | 3266 | if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin |
3023 | - ListView.Canvas.Brush.Color := FOddColor; | |
3024 | - end else begin | |
3025 | - ListView.Canvas.Brush.Color := FListViewBackGroundColor; | |
3026 | - end; | |
3267 | + ListView.Canvas.Brush.Color := FOddColor; | |
3268 | + end else begin | |
3269 | + ListView.Canvas.Brush.Color := FListViewBackGroundColor; | |
3270 | + end; | |
3027 | 3271 | // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then |
3028 | 3272 | if ThreadItem.UnRead then |
3029 | 3273 | TListView(Sender).Canvas.Font.Style := [fsBold]; |
@@ -3215,6 +3459,7 @@ var | ||
3215 | 3459 | s: string; |
3216 | 3460 | boardPlugIn : TBoardPlugIn; |
3217 | 3461 | i: Integer; |
3462 | + browserRec : TBrowserRecord; | |
3218 | 3463 | begin |
3219 | 3464 | try |
3220 | 3465 | if Item.DownType = gdtBoard then |
@@ -3249,21 +3494,27 @@ begin | ||
3249 | 3494 | ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle; |
3250 | 3495 | end; |
3251 | 3496 | for i := BrowserTab.Tabs.Count - 1 downto 0 do begin |
3252 | - if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then | |
3497 | + if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then begin | |
3253 | 3498 | TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true; |
3499 | + break; | |
3500 | + end; | |
3254 | 3501 | end; |
3255 | 3502 | if GikoSys.Setting.BrowserTabVisible then begin |
3256 | 3503 | if GetActiveContent = Item.ThreadItem then |
3257 | - InsertBrowserTab(Item.ThreadItem) | |
3504 | + browserRec := InsertBrowserTab(Item.ThreadItem) | |
3258 | 3505 | else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then |
3259 | - InsertBrowserTab(Item.ThreadItem, True) | |
3506 | + browserRec := InsertBrowserTab(Item.ThreadItem, True) | |
3260 | 3507 | else |
3261 | - InsertBrowserTab(Item.ThreadItem, False); | |
3508 | + browserRec := InsertBrowserTab(Item.ThreadItem, False); | |
3509 | + if browserRec.Thread = BrowserNullTab.Thread then begin | |
3510 | + browserRec.Movement := BrowserNullTab.Movement; | |
3511 | + BrowserNullTab.Movement := ''; | |
3512 | + end; | |
3262 | 3513 | end else begin |
3263 | 3514 | if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then |
3264 | 3515 | InsertBrowserTab(Item.ThreadItem); |
3265 | 3516 | end; |
3266 | - | |
3517 | + Application.ProcessMessages; | |
3267 | 3518 | if Item.State = gdsComplete then begin |
3268 | 3519 | PlaySound('New'); |
3269 | 3520 | AddMessageList(ATitle + ' [Xæ¾®¹]', nil, gmiOK); |
@@ -3391,14 +3642,17 @@ begin | ||
3391 | 3642 | end; |
3392 | 3643 | end;} |
3393 | 3644 | |
3394 | -procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True); | |
3395 | - | |
3645 | +function TGikoForm.InsertBrowserTab( | |
3646 | + ThreadItem : TThreadItem; | |
3647 | + ActiveTab : Boolean = True | |
3648 | +) : TBrowserRecord; | |
3396 | 3649 | var |
3397 | - i, j, idx: Integer; | |
3398 | - favItem : TFavoriteThreadItem; | |
3650 | + i, j, idx : Integer; | |
3651 | + favItem : TFavoriteThreadItem; | |
3399 | 3652 | newBrowser : TBrowserRecord; |
3400 | 3653 | begin |
3401 | 3654 | |
3655 | + Result := nil; | |
3402 | 3656 | if Threaditem = nil then Exit; |
3403 | 3657 | |
3404 | 3658 | if ThreadItem.IsLogFile then begin |
@@ -3417,6 +3671,7 @@ begin | ||
3417 | 3671 | for i := 0 to BrowserTab.Tabs.Count - 1 do begin |
3418 | 3672 | if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin |
3419 | 3673 | if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin |
3674 | + Result := TBrowserRecord( BrowserTab.Tabs.Objects[i] ); | |
3420 | 3675 | if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin |
3421 | 3676 | for j := BrowserTab.Tabs.Count - 1 downto 0 do begin |
3422 | 3677 | if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin |
@@ -3503,6 +3758,7 @@ begin | ||
3503 | 3758 | BrowserTab.TabIndex := i; |
3504 | 3759 | end; |
3505 | 3760 | end; |
3761 | + Result := newBrowser; | |
3506 | 3762 | if(ActiveTab) or (idx = -1) then begin |
3507 | 3763 | BrowserTab.OnChange(nil); |
3508 | 3764 | end; |
@@ -3512,6 +3768,7 @@ begin | ||
3512 | 3768 | BrowserNullTab.Browser := Browser; |
3513 | 3769 | end; |
3514 | 3770 | BrowserNullTab.thread := ThreadItem; |
3771 | + Result := BrowserNullTab; | |
3515 | 3772 | BrowserTab.TabIndex := -1; |
3516 | 3773 | SetContent(BrowserNullTab); |
3517 | 3774 | end; |
@@ -3531,7 +3788,6 @@ var | ||
3531 | 3788 | s: string; |
3532 | 3789 | // OldCursor: TCursor; |
3533 | 3790 | i: Integer; |
3534 | - url: OleVariant; | |
3535 | 3791 | idx: Integer; |
3536 | 3792 | ThreadItem: TThreadItem; |
3537 | 3793 | Thread: TBrowserRecord; |
@@ -3539,6 +3795,7 @@ var | ||
3539 | 3795 | ThreadScrollTop: Integer; |
3540 | 3796 | ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean; |
3541 | 3797 | begin |
3798 | +// AddMessageList('SetContent', nil, gmiWhat); | |
3542 | 3799 | Thread := inThread; |
3543 | 3800 | idx := BrowserTab.TabIndex; |
3544 | 3801 | if (FActiveContent <> nil) and |
@@ -3602,18 +3859,19 @@ begin | ||
3602 | 3859 | |
3603 | 3860 | |
3604 | 3861 | try |
3862 | + { | |
3605 | 3863 | if ThreadItem.UnRead then begin |
3606 | 3864 | ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; |
3607 | 3865 | if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0; |
3608 | 3866 | TreeView.Refresh; |
3609 | 3867 | end; |
3610 | - // LockWindowUpdate(Self.Handle); | |
3868 | + } | |
3611 | 3869 | if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin |
3612 | 3870 | if (FActiveContent.Browser <> BrowserNullTab.Browser) then |
3613 | 3871 | ShowWindow(FActiveContent.Browser.Handle, SW_HIDE); |
3614 | 3872 | end; |
3873 | + | |
3615 | 3874 | ShowWindow(Thread.FBrowser.Handle, SW_SHOW); |
3616 | - //LockWindowUpdate(0); | |
3617 | 3875 | if (not Assigned(Thread.Browser.Document)) then begin |
3618 | 3876 | Thread.Browser.Navigate('about:blank'); |
3619 | 3877 | end; |
@@ -3640,55 +3898,21 @@ begin | ||
3640 | 3898 | Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']'; |
3641 | 3899 | //Thread.RepaintÍAXLÌÝèðÏXµ½Æ«AThreadð_E[hµ½Æ« |
3642 | 3900 | //VKÉThreadðJ¢½Æ«É^ÉÈÁÄ¢éB |
3643 | -// if(Thread.Repaint) or (Thread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin | |
3644 | 3901 | if Thread.Repaint then begin |
3645 | 3902 | //Thread.LastSize := ThreadItem.Size; |
3646 | 3903 | Thread.Repaint := false; |
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 | - //Ⱥ©±±Å¾¦IÉDocumentCompleteðÄÎȢƤܢ©È¢ | |
3655 | - //ÇL@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ðXV³¹éB | |
3661 | - //µÈ¢Æêæʪµ©`æÅ«ÄÈ¢ÌÅ»êÈãÌXN[ÊðwèµÄà³øÉÈé | |
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; | |
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; | |
3689 | 3914 | end; |
3690 | 3915 | end; |
3691 | - ThreadItem.UnRead := False; | |
3692 | 3916 | ListView.Refresh; |
3693 | 3917 | end; |
3694 | 3918 | if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin |
@@ -3734,7 +3958,6 @@ end; | ||
3734 | 3958 | |
3735 | 3959 | procedure TGikoForm.SetActiveList(Obj: TObject); |
3736 | 3960 | var |
3737 | - i : Integer; | |
3738 | 3961 | idx : Integer; |
3739 | 3962 | begin |
3740 | 3963 | // if FActiveList <> Obj then begin |
@@ -3748,17 +3971,18 @@ begin | ||
3748 | 3971 | ListView.Items.Clear; |
3749 | 3972 | ListView.Selected := nil; |
3750 | 3973 | // ListView.Columns.Clear; |
3751 | - | |
3752 | - Self.Caption := CAPTION_NAME; | |
3974 | + if (FActiveContent <> nil) and (FActiveContent.Thread <> nil) | |
3975 | + and (FActiveContent.Thread.IsLogFile) then | |
3976 | + Self.Caption := CAPTION_NAME + ' - [' + FActiveContent.Thread.Title + ']' | |
3977 | + else | |
3978 | + Self.Caption := CAPTION_NAME; | |
3753 | 3979 | //Application.Title := CAPTION_NAME; |
3754 | 3980 | |
3981 | +// ActiveListColumnSave; | |
3982 | + | |
3755 | 3983 | 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]; | |
3758 | 3984 | SetCategoryListItem(TBBS(Obj)); |
3759 | 3985 | 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]; | |
3762 | 3986 | SetBoardListItem(TCategory(Obj)); |
3763 | 3987 | end else if Obj is TBoard then begin |
3764 | 3988 | SetThreadListItem(TBoard(Obj)); |
@@ -3787,12 +4011,16 @@ end; | ||
3787 | 4011 | procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); |
3788 | 4012 | var |
3789 | 4013 | Board: TBoard; |
4014 | + i: Integer; | |
3790 | 4015 | begin |
3791 | 4016 | if ActiveList is TBoard then begin |
4017 | + for i := Length( BBSs ) - 1 downto 0 do begin | |
4018 | + BBSs[i].SelectText := SelectText; | |
4019 | + BBSs[i].KubetsuChk := KubetsuChk; | |
4020 | + end; | |
3792 | 4021 | Board := TBoard(ActiveList); |
3793 | - | |
3794 | - Board.ParentCategory.ParenTBBS.SelectText := SelectText; | |
3795 | - Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk; | |
4022 | +// Board.ParentCategory.ParenTBBS.SelectText := SelectText; | |
4023 | +// Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk; | |
3796 | 4024 | // Board.SelectText := SelectText; |
3797 | 4025 | // Board.KubetsuChk := KubetsuChk; |
3798 | 4026 | ViewType := AViewType; |
@@ -4297,75 +4525,70 @@ begin | ||
4297 | 4525 | bbs := nil; |
4298 | 4526 | |
4299 | 4527 | if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin |
4300 | - ChangeEvent := nil; | |
4301 | - ChangingEvent := nil; | |
4528 | + if Item <> FActiveList then begin | |
4529 | + ChangeEvent := nil; | |
4530 | + ChangingEvent := nil; | |
4302 | 4531 | |
4303 | - if not CallEvent then begin | |
4304 | - ChangeEvent := TreeView.OnChange; | |
4305 | - ChangingEvent := TreeView.OnChanging; | |
4306 | - end; | |
4307 | - try | |
4308 | 4532 | if not CallEvent then begin |
4309 | - TreeView.OnChange := nil; | |
4310 | - TreeView.OnChanging := nil; | |
4533 | + ChangeEvent := TreeView.OnChange; | |
4534 | + ChangingEvent := TreeView.OnChanging; | |
4311 | 4535 | end; |
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; | |
4536 | + try | |
4537 | + if not CallEvent then begin | |
4538 | + TreeView.OnChange := nil; | |
4539 | + TreeView.OnChanging := nil; | |
4540 | + end; | |
4541 | + //Application.ProcessMessages; | |
4542 | + for i := 0 to TreeView.Items.Count - 1 do begin | |
4543 | + if TreeView.Items[i].Data = Item then begin | |
4544 | + TreeView.Items[i].Selected := True; | |
4545 | + if CallEvent then | |
4546 | + TreeClick(TreeView.Items[i]); | |
4547 | + Break; | |
4548 | + end; | |
4549 | + end; | |
4550 | + //Application.ProcessMessages; | |
4551 | + finally | |
4552 | + if not CallEvent then begin | |
4553 | + TreeView.OnChange := ChangeEvent; | |
4554 | + TreeView.OnChanging := ChangingEvent; | |
4319 | 4555 | end; |
4320 | - end; | |
4321 | - //Application.ProcessMessages; | |
4322 | - finally | |
4323 | - if not CallEvent then begin | |
4324 | - TreeView.OnChange := ChangeEvent; | |
4325 | - TreeView.OnChanging := ChangingEvent; | |
4326 | 4556 | end; |
4327 | 4557 | end; |
4328 | 4558 | end else begin |
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; | |
4559 | + if Item <> FActiveList then begin | |
4560 | + ActiveListColumnSave; | |
4561 | + | |
4562 | + if (Item is TBBS) or (Item is TCategory) then begin | |
4563 | + ListView.Columns.Clear; | |
4564 | + SetActiveList( Item ); | |
4565 | + end else if Item is TBoard then begin | |
4566 | + if not TBoard( Item ).IsThreadDatRead then begin | |
4567 | + Screen.Cursor := crHourGlass; | |
4568 | + try | |
4569 | + if not TBoard( Item ).IsThreadDatRead then | |
4570 | + GikoSys.ReadSubjectFile(TBoard( Item )); | |
4571 | + finally | |
4572 | + Screen.Cursor := crDefault; | |
4573 | + end; | |
4351 | 4574 | end; |
4575 | + SetActiveList( Item ); | |
4352 | 4576 | end; |
4353 | - SetActiveList( Item ); | |
4354 | 4577 | end; |
4578 | + end; | |
4355 | 4579 | |
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; | |
4580 | + if Item is TBoard then begin // not TCategory | |
4581 | + if GikoSys.Setting.ListOrientation = gloHorizontal then begin | |
4582 | + if GikoSys.Setting.ListWidthState = glsMax then begin | |
4583 | + BrowserMinAction.Execute; | |
4584 | + if GikoForm.Visible then | |
4585 | + ListView.SetFocus; | |
4586 | + end; | |
4587 | + end else begin | |
4588 | + if GikoSys.Setting.ListHeightState = glsMax then begin | |
4589 | + BrowserMinAction.Execute; | |
4590 | + if GikoForm.Visible then | |
4591 | + ListView.SetFocus; | |
4369 | 4592 | end; |
4370 | 4593 | end; |
4371 | 4594 | end; |
@@ -4376,6 +4599,7 @@ procedure TGikoForm.ListViewMouseDown(Sender: TObject; | ||
4376 | 4599 | var |
4377 | 4600 | listItem : TListItem; |
4378 | 4601 | threadItem : TThreadItem; |
4602 | + pos : TPoint; | |
4379 | 4603 | // t: Cardinal; |
4380 | 4604 | begin |
4381 | 4605 | case Button of |
@@ -4399,6 +4623,13 @@ begin | ||
4399 | 4623 | else |
4400 | 4624 | ListClick; |
4401 | 4625 | end; |
4626 | + mbRight: | |
4627 | + begin | |
4628 | + pos.X := X; | |
4629 | + pos.Y := Y; | |
4630 | + Windows.ClientToScreen( ListView.Handle, pos ); | |
4631 | + ListPopupMenu.Popup( pos.X, pos.Y ); | |
4632 | + end; | |
4402 | 4633 | end; |
4403 | 4634 | { if ssDouble in Shift then begin |
4404 | 4635 | DoubleClickOccurred[Button] := True; |
@@ -4525,11 +4756,11 @@ begin | ||
4525 | 4756 | top := 0; |
4526 | 4757 | nm := AName; |
4527 | 4758 | item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm); |
4759 | + item.focus(); | |
4528 | 4760 | repeat |
4529 | 4761 | top := top + item.offsetTop; |
4530 | 4762 | item := item.offsetParent; |
4531 | 4763 | until AnsiCompareText(item.tagName, 'body' ) = 0; |
4532 | - | |
4533 | 4764 | OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top; |
4534 | 4765 | except |
4535 | 4766 | end; |
@@ -4557,6 +4788,7 @@ begin | ||
4557 | 4788 | top := 0; |
4558 | 4789 | nm := AName; |
4559 | 4790 | item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm); |
4791 | + item.focus(); | |
4560 | 4792 | repeat |
4561 | 4793 | top := top + item.offsetTop; |
4562 | 4794 | item := item.offsetParent; |
@@ -5028,15 +5260,23 @@ begin | ||
5028 | 5260 | case GikoSys.Setting.ListWidthState of |
5029 | 5261 | glsMax: begin |
5030 | 5262 | //Êí\¦É·é |
5263 | + if FActiveContent <> nil then | |
5264 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //`æâ~ | |
5031 | 5265 | ViewPanel.Width := FBrowserSizeWidth; |
5032 | 5266 | BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; |
5033 | 5267 | BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
5034 | 5268 | GikoSys.Setting.ListWidthState := glsNormal; |
5269 | + if FActiveContent <> nil then | |
5270 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //`æ | |
5035 | 5271 | end; |
5036 | 5272 | glsMin, glsNormal: begin |
5037 | 5273 | //Åå\¦É·é |
5274 | + if FActiveContent <> nil then | |
5275 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //`æâ~ | |
5038 | 5276 | if GikoSys.Setting.ListWidthState = glsNormal then |
5039 | 5277 | FBrowserSizeWidth := ViewPanel.Width; |
5278 | + if FActiveContent <> nil then | |
5279 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //`æ | |
5040 | 5280 | ViewPanel.Width := 1; |
5041 | 5281 | BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL; |
5042 | 5282 | BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
@@ -5047,15 +5287,23 @@ begin | ||
5047 | 5287 | case GikoSys.Setting.ListHeightState of |
5048 | 5288 | glsMax: begin |
5049 | 5289 | //Êí\¦É·é |
5290 | + if FActiveContent <> nil then | |
5291 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //`æâ~ | |
5050 | 5292 | ViewPanel.Height := FBrowserSizeHeight; |
5051 | 5293 | BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; |
5052 | 5294 | BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
5053 | 5295 | GikoSys.Setting.ListHeightState := glsNormal; |
5296 | + if FActiveContent <> nil then | |
5297 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //`æ | |
5054 | 5298 | end; |
5055 | 5299 | glsMin, glsNormal: begin |
5056 | 5300 | //Åå\¦É·é |
5301 | + if FActiveContent <> nil then | |
5302 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //`æâ~ | |
5057 | 5303 | if GikoSys.Setting.ListHeightState = glsNormal then |
5058 | 5304 | FBrowserSizeHeight := ViewPanel.Height; |
5305 | + if FActiveContent <> nil then | |
5306 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //`æ | |
5059 | 5307 | ViewPanel.Height := 1; |
5060 | 5308 | BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL; |
5061 | 5309 | BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
@@ -5076,8 +5324,12 @@ begin | ||
5076 | 5324 | case GikoSys.Setting.ListWidthState of |
5077 | 5325 | glsMax, glsNormal: begin |
5078 | 5326 | //Ŭ\¦É·é |
5327 | + if FActiveContent <> nil then | |
5328 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //`æâ~ | |
5079 | 5329 | if GikoSys.Setting.ListWidthState = glsNormal then |
5080 | 5330 | FBrowserSizeWidth := ViewPanel.Width; |
5331 | + if FActiveContent <> nil then | |
5332 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //`æ | |
5081 | 5333 | ViewPanel.Width := ThreadMainPanel.Width - 80; |
5082 | 5334 | BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; |
5083 | 5335 | BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL; |
@@ -5085,29 +5337,41 @@ begin | ||
5085 | 5337 | end; |
5086 | 5338 | glsMin: begin |
5087 | 5339 | //Êí\¦É·é |
5340 | + if FActiveContent <> nil then | |
5341 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //`æâ~ | |
5088 | 5342 | ViewPanel.Width := FBrowserSizeWidth; |
5089 | 5343 | BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX; |
5090 | 5344 | BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
5091 | 5345 | GikoSys.Setting.ListWidthState := glsNormal; |
5346 | + if FActiveContent <> nil then | |
5347 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //`æ | |
5092 | 5348 | end; |
5093 | 5349 | end; |
5094 | 5350 | end else begin |
5095 | 5351 | case GikoSys.Setting.ListHeightState of |
5096 | 5352 | glsMax, glsNormal: begin |
5097 | 5353 | //Ŭ\¦É·é |
5354 | + if FActiveContent <> nil then | |
5355 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //`æâ~ | |
5098 | 5356 | if GikoSys.Setting.ListHeightState = glsNormal then |
5099 | 5357 | FBrowserSizeHeight := ViewPanel.Height; |
5100 | 5358 | ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7; |
5101 | 5359 | BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; |
5102 | 5360 | BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL; |
5103 | 5361 | GikoSys.Setting.ListHeightState := glsMin; |
5362 | + if FActiveContent <> nil then | |
5363 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //`æ | |
5104 | 5364 | end; |
5105 | 5365 | glsMin: begin |
5106 | 5366 | //Êí\¦É·é |
5367 | + if FActiveContent <> nil then | |
5368 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //`æâ~ | |
5107 | 5369 | ViewPanel.Height := FBrowserSizeHeight; |
5108 | 5370 | BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX; |
5109 | 5371 | BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
5110 | 5372 | GikoSys.Setting.ListHeightState := glsNormal; |
5373 | + if FActiveContent <> nil then | |
5374 | + SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //`æ | |
5111 | 5375 | end; |
5112 | 5376 | end; |
5113 | 5377 | end; |
@@ -5328,9 +5592,8 @@ begin | ||
5328 | 5592 | end; |
5329 | 5593 | |
5330 | 5594 | procedure TGikoForm.FormResize(Sender: TObject); |
5331 | -var | |
5332 | - doc : Variant; | |
5333 | 5595 | begin |
5596 | + | |
5334 | 5597 | MessageListView.Column[0].Width := MessageListView.ClientWidth - 32; |
5335 | 5598 | MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width; |
5336 | 5599 |
@@ -5346,17 +5609,10 @@ begin | ||
5346 | 5609 | end; |
5347 | 5610 | end; |
5348 | 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; | |
5357 | - | |
5358 | - FIsIgnoreResize := True; | |
5612 | + FIsIgnoreResize := rtResizing; | |
5359 | 5613 | PostMessage( Handle, USER_RESIZED, 0, 0 ); |
5614 | + | |
5615 | + | |
5360 | 5616 | end; |
5361 | 5617 | |
5362 | 5618 | procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject); |
@@ -5444,8 +5700,8 @@ end; | ||
5444 | 5700 | |
5445 | 5701 | procedure TGikoForm.LogDeleteActionExecute(Sender: TObject); |
5446 | 5702 | const |
5447 | - DEL_MSG = 'g^0hÌOððíµÜ·Bæ뵢ŷ©H'; | |
5448 | - DEL_SAME_MSG = '±êç ^0 ÂÌXbhÌOððíµÜ·Bæ뵢ŷ©H'; | |
5703 | + DEL_MSG = 'g^0hÌOðíµÜ·Bæ뵢ŷ©H'; | |
5704 | + DEL_SAME_MSG = '±êç ^0 ÂÌXbhÌOðíµÜ·Bæ뵢ŷ©H'; | |
5449 | 5705 | DEL_TITLE = 'ímF'; |
5450 | 5706 | var |
5451 | 5707 | ThreadItem: TThreadItem; |
@@ -5482,6 +5738,8 @@ begin | ||
5482 | 5738 | DeleteHistory(ThreadItem); |
5483 | 5739 | DeleteTab(ThreadItem); |
5484 | 5740 | ThreadItem.DeleteLogFile; |
5741 | + | |
5742 | + TreeView.Refresh; // UnRead Ì\¦ðXV | |
5485 | 5743 | end; |
5486 | 5744 | ListView.Refresh; |
5487 | 5745 | finally |
@@ -5667,6 +5925,7 @@ begin | ||
5667 | 5925 | |
5668 | 5926 | Editor := TEditorForm.Create(Self); |
5669 | 5927 | Editor.SetThreadItem(Item); |
5928 | + GikoSys.LoadEditorKeySetting(Editor.ActionList); | |
5670 | 5929 | Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10; |
5671 | 5930 | Editor.Show; |
5672 | 5931 | Editor.BodyEdit.SetFocus; |
@@ -6402,11 +6661,13 @@ var | ||
6402 | 6661 | FDispHtmlDocument: DispHTMLDocument; |
6403 | 6662 | BrowserRecord :TBrowserRecord; |
6404 | 6663 | i :Integer; |
6664 | + doc : Variant; | |
6665 | + threadItem : TThreadItem; | |
6405 | 6666 | begin |
6406 | -// AddMessageList('DocumentComplete', nil); | |
6667 | +// AddMessageList('DocumentComplete', nil, gmiWhat); | |
6407 | 6668 | if TObject(Sender) is TWebBrowser then begin |
6669 | + BrowserRecord := nil; | |
6408 | 6670 | if TWebBrowser(Sender) <> Browser then begin |
6409 | - BrowserRecord := nil; | |
6410 | 6671 | for i := BrowserTab.Tabs.Count - 1 downto 0 do begin |
6411 | 6672 | if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin |
6412 | 6673 | BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]); |
@@ -6422,7 +6683,7 @@ begin | ||
6422 | 6683 | BrowserRecord.FEvent.OnClick := WebBrowserClick; //ÇÁµ½OnClickCxg |
6423 | 6684 | end; |
6424 | 6685 | end else begin |
6425 | - if GetActiveContent <> nil then begin | |
6686 | + if GetActiveContent <> nil then begin | |
6426 | 6687 | FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument; |
6427 | 6688 | if FEvent <> nil then |
6428 | 6689 | FEvent.Free; |
@@ -6431,6 +6692,38 @@ begin | ||
6431 | 6692 | FEvent.OnClick := WebBrowserClick; //ÇÁµ½OnClickCxg |
6432 | 6693 | end; |
6433 | 6694 | end; |
6695 | + | |
6696 | + if (BrowserRecord <> nil) and | |
6697 | + Assigned( BrowserRecord.Thread ) then begin | |
6698 | + threadItem := BrowserRecord.Thread; | |
6699 | + | |
6700 | + if (BrowserRecord <> nil) and (Length( BrowserRecord.Movement ) > 0) then begin | |
6701 | + if threadItem.UnRead then begin | |
6702 | + threadItem.UnRead := False; | |
6703 | + threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; | |
6704 | + if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0; | |
6705 | + TreeView.Refresh; | |
6706 | + ListView.Refresh; | |
6707 | + end; | |
6708 | + BrowserMovement( BrowserRecord.Movement, BrowserRecord ); | |
6709 | + BrowserRecord.Movement := ''; | |
6710 | + end else if threadItem.UnRead then begin | |
6711 | + threadItem.UnRead := False; | |
6712 | + threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; | |
6713 | + if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0; | |
6714 | + TreeView.Refresh; | |
6715 | + BrowserMovement( 'new', BrowserRecord ); | |
6716 | + ListView.Refresh; | |
6717 | + end else if threadItem.ScrollTop <> 0 then begin | |
6718 | + try | |
6719 | + doc := Idispatch( OleVariant( BrowserRecord.Browser.ControlInterface ).Document ) as IHTMLDocument2; | |
6720 | + doc.Body.ScrollTop := threadItem.ScrollTop; | |
6721 | + except | |
6722 | + on E: Exception do | |
6723 | + MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0); | |
6724 | + end; | |
6725 | + end; | |
6726 | + end; | |
6434 | 6727 | end; |
6435 | 6728 | end; |
6436 | 6729 |
@@ -6786,7 +7079,7 @@ end; | ||
6786 | 7079 | |
6787 | 7080 | procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject); |
6788 | 7081 | const |
6789 | - DEL_MSG = 'g^0hÌOððíµÜ·Bæ뵢ŷ©H'; | |
7082 | + DEL_MSG = 'g^0hÌOðíµÜ·Bæ뵢ŷ©H'; | |
6790 | 7083 | DEL_TITLE = 'ímF'; |
6791 | 7084 | var |
6792 | 7085 | idx: Integer; |
@@ -7204,14 +7497,13 @@ begin | ||
7204 | 7497 | end; |
7205 | 7498 | end; |
7206 | 7499 | |
7207 | -procedure TGikoForm.MoveToURL(URL: string); | |
7208 | - | |
7500 | +procedure TGikoForm.MoveToURL(const inURL: string); | |
7209 | 7501 | var |
7210 | 7502 | protocol, host, path, document, port, bookmark : string; |
7211 | - URL2, protocol2, host2, path2, document2, port2, bookmark2 : string; | |
7503 | + URL, protocol2, host2, path2, document2, port2, bookmark2 : string; | |
7212 | 7504 | tmp1, tmp2: string; |
7213 | 7505 | BBSID, BBSKey: string; |
7214 | - Board: TBoard; | |
7506 | + tmpBoard, Board: TBoard; | |
7215 | 7507 | ThreadItem: TThreadItem; |
7216 | 7508 | i, bi : Integer; |
7217 | 7509 | boardURL : string; |
@@ -7221,20 +7513,22 @@ var | ||
7221 | 7513 | // boardNode : TTreeNode; |
7222 | 7514 | shiftDown : Boolean; |
7223 | 7515 | ctrlDown : Boolean; |
7516 | + stRes, edRes : Int64; | |
7517 | + browserRec : TBrowserRecord; | |
7224 | 7518 | begin |
7225 | 7519 | |
7226 | - GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark ); | |
7227 | - GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey ); | |
7520 | + GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark ); | |
7521 | + GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey ); | |
7228 | 7522 | |
7229 | 7523 | |
7230 | 7524 | shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001); |
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; | |
7525 | + ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001); | |
7526 | + if shiftDown then begin | |
7527 | + GikoSys.OpenBrowser(inURL, gbtUserApp); | |
7528 | + Exit; | |
7529 | + end else if ctrlDown then begin | |
7530 | + GikoSys.OpenBrowser(inURL, gbtIE); | |
7531 | + Exit; | |
7238 | 7532 | end; |
7239 | 7533 | |
7240 | 7534 | //===== vOC |
@@ -7243,15 +7537,16 @@ begin | ||
7243 | 7537 | bi := High( BoardPlugIns ); |
7244 | 7538 | for i := Low( BoardPlugIns ) to bi do begin |
7245 | 7539 | if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin |
7246 | - case BoardPlugIns[ i ].AcceptURL( URL ) of | |
7540 | + case BoardPlugIns[ i ].AcceptURL( inURL ) of | |
7247 | 7541 | atThread: |
7248 | 7542 | begin |
7249 | - tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL ); | |
7543 | + tmpThread := TThreadItem.Create( BoardPlugIns[ i ], inURL ); | |
7250 | 7544 | boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) ); |
7251 | 7545 | Board := BBSsFindBoardFromURL( boardURL ); |
7252 | 7546 | if Board = nil then begin |
7547 | + //break; | |
7253 | 7548 | // ¦ìÁÄàÇÁ·éƱ몳¢Ìŵۯ |
7254 | - //GikoSys.OpenBrowser(URL, gbtUserApp); | |
7549 | + //GikoSys.OpenBrowser(inURL, gbtUserApp); | |
7255 | 7550 | //Exit; |
7256 | 7551 | { |
7257 | 7552 | Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL ); |
@@ -7263,34 +7558,42 @@ begin | ||
7263 | 7558 | GikoSys.ReadSubjectFile( Board ); |
7264 | 7559 | Exit; |
7265 | 7560 | end; |
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 | |
7561 | + ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName ); | |
7562 | + if ThreadItem = nil then begin | |
7563 | + ThreadItem := tmpThread; | |
7564 | + Board.Insert( 0, ThreadItem ); | |
7565 | + if ActiveList is TBoard then begin | |
7566 | + if TBoard(ActiveList) = Board then | |
7567 | + ListView.Items.Count := ListView.Items.Count + 1; | |
7568 | + end; | |
7569 | + GikoSys.GetPopupResNumber( inURL, stRes, edRes ); | |
7570 | + browserRec := InsertBrowserTab( ThreadItem ); | |
7571 | + if (browserRec <> nil) and (stRes > 0) then | |
7572 | + browserRec.Movement := IntToStr( stRes ); | |
7283 | 7573 | DownloadContent( ThreadItem ); |
7574 | + Exit; | |
7575 | + end else begin | |
7576 | + tmpThread.Free; | |
7577 | + GikoSys.GetPopupResNumber( inURL, stRes, edRes ); | |
7578 | + browserRec := InsertBrowserTab( ThreadItem ); | |
7579 | + if ThreadItem.IsLogFile then begin | |
7580 | + if (browserRec <> nil) and (stRes > 0) then | |
7581 | + BrowserMovement( IntToStr( stRes ), browserRec ); | |
7582 | + end else begin | |
7583 | + if (browserRec <> nil) and (stRes > 0) then | |
7584 | + browserRec.Movement := IntToStr( stRes ); | |
7585 | + DownloadContent( ThreadItem ); | |
7586 | + end; | |
7587 | + Exit; | |
7284 | 7588 | end; |
7285 | - Exit; | |
7286 | 7589 | end; |
7287 | - | |
7288 | - //Exit; | |
7289 | 7590 | end; |
7290 | 7591 | |
7291 | 7592 | atBoard: |
7292 | 7593 | begin |
7293 | - Board := BBSsFindBoardFromURL( URL ); | |
7594 | + tmpBoard := TBoard.Create(BoardPlugIns[ i ], inURL); | |
7595 | + Board := BBSsFindBoardFromURL( tmpBoard.URL ); | |
7596 | + tmpBoard.Free; | |
7294 | 7597 | if Board <> nil then begin |
7295 | 7598 | if FActiveBBS <> Board.ParentCategory.ParenTBBS then |
7296 | 7599 | ShowBBSTree( Board.ParentCategory.ParenTBBS ); |
@@ -7307,7 +7610,7 @@ begin | ||
7307 | 7610 | |
7308 | 7611 | |
7309 | 7612 | if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin |
7310 | - boardURL := GikoSys.Get2chThreadURL2BoardURL( URL ); | |
7613 | + boardURL := GikoSys.Get2chThreadURL2BoardURL( inURL ); | |
7311 | 7614 | Board := BBSsFindBoardFromURL( boardURL ); |
7312 | 7615 | if Board = nil then |
7313 | 7616 | Board := BBSsFindBoardFromBBSID( BBSID ); |
@@ -7319,23 +7622,23 @@ begin | ||
7319 | 7622 | end; |
7320 | 7623 | if Board = nil then begin |
7321 | 7624 | // üé׫ª©Â©çÈ©Á½ÌÅAÊÌuEUÅJ |
7322 | - GikoSys.OpenBrowser(URL, gbtUserApp); | |
7625 | + GikoSys.OpenBrowser(inURL, gbtUserApp); | |
7323 | 7626 | Exit; |
7324 | 7627 | end else begin |
7325 | 7628 | // OÌÂÈÌÉ2chÌURLɳêĵÜÁ½zð±±ÅmF·é |
7326 | - URL2 := Board.URL; | |
7327 | - GikoSys.ParseURI(URL2 , protocol2, host2, path2, document2, port2, bookmark2 ); | |
7629 | + URL := Board.URL; | |
7630 | + GikoSys.ParseURI(URL , protocol2, host2, path2, document2, port2, bookmark2 ); | |
7328 | 7631 | tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host)); |
7329 | 7632 | tmp2 := Copy(host2, AnsiPos('.', host2) + 1, Length(host2)); |
7330 | - if (tmp1 <> tmp2) then begin | |
7331 | - GikoSys.OpenBrowser(URL, gbtUserApp); | |
7633 | + if ( not GikoSys.Is2chHost(tmp1)) and (tmp1 <> tmp2) then begin | |
7634 | + GikoSys.OpenBrowser(inURL, gbtUserApp); | |
7332 | 7635 | Exit; |
7333 | 7636 | end; |
7334 | 7637 | end; |
7335 | 7638 | |
7336 | 7639 | if not Board.IsThreadDatRead then |
7337 | 7640 | GikoSys.ReadSubjectFile(Board); |
7338 | - URL := GikoSys.Get2chBrowsableThreadURL( URL ); | |
7641 | + URL := GikoSys.Get2chBrowsableThreadURL( inURL ); | |
7339 | 7642 | ThreadItem := Board.FindThreadFromURL( URL ); |
7340 | 7643 | //@ßOqÉ©çA_E\µ½Xª©Å«È¢Ìű±ÅT·æ¤É·é (2004/01/22) |
7341 | 7644 | if ThreadItem = nil then begin |
@@ -7348,9 +7651,9 @@ begin | ||
7348 | 7651 | {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001); |
7349 | 7652 | ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001); |
7350 | 7653 | if shiftDown then |
7351 | - GikoSys.OpenBrowser(URL, gbtUserApp) | |
7654 | + GikoSys.OpenBrowser(URL1, gbtUserApp) | |
7352 | 7655 | else if ctrlDown then |
7353 | - GikoSys.OpenBrowser(URL, gbtIE) | |
7656 | + GikoSys.OpenBrowser(URL1, gbtIE) | |
7354 | 7657 | else begin |
7355 | 7658 | } |
7356 | 7659 | ThreadItem := TThreadItem.Create( nil, URL ); |
@@ -7364,25 +7667,34 @@ begin | ||
7364 | 7667 | if TBoard(ActiveList) = Board then |
7365 | 7668 | ListView.Items.Count := ListView.Items.Count + 1; |
7366 | 7669 | end; |
7367 | - InsertBrowserTab(ThreadItem); | |
7670 | + GikoSys.GetPopupResNumber( inURL, stRes, edRes ); | |
7671 | + browserRec := InsertBrowserTab(ThreadItem); | |
7672 | + if (browserRec <> nil) and (stRes > 0) then | |
7673 | + browserRec.Movement := IntToStr( stRes ); | |
7368 | 7674 | DownloadContent(ThreadItem); |
7369 | 7675 | {end;} |
7370 | 7676 | end else begin |
7371 | - if ThreadItem.IsLogFile then | |
7372 | - InsertBrowserTab(ThreadItem) | |
7373 | - else begin | |
7677 | + if ThreadItem.IsLogFile then begin | |
7678 | + GikoSys.GetPopupResNumber( inURL, stRes, edRes ); | |
7679 | + browserRec := InsertBrowserTab(ThreadItem); | |
7680 | + if (browserRec <> nil) and (stRes > 0) then | |
7681 | + browserRec.Movement := IntToStr( stRes ); | |
7682 | + end else begin | |
7374 | 7683 | if AnsiPos(Host, Board.URL) = 0 then |
7375 | 7684 | ThreadItem.DownloadHost := Host |
7376 | 7685 | else |
7377 | 7686 | ThreadItem.DownloadHost := ''; |
7378 | - InsertBrowserTab(ThreadItem); | |
7687 | + GikoSys.GetPopupResNumber( inURL, stRes, edRes ); | |
7688 | + browserRec := InsertBrowserTab(ThreadItem); | |
7689 | + if (browserRec <> nil) and (stRes > 0) then | |
7690 | + browserRec.Movement := IntToStr( stRes ); | |
7379 | 7691 | DownloadContent(ThreadItem); |
7380 | 7692 | end; |
7381 | 7693 | end; |
7382 | 7694 | end else begin |
7383 | - Board := BBSsFindBoardFromURL( URL ); | |
7695 | + Board := BBSsFindBoardFromURL( inURL ); | |
7384 | 7696 | if Board = nil then begin |
7385 | - GikoSys.OpenBrowser(URL, gbtAuto); | |
7697 | + GikoSys.OpenBrowser(inURL, gbtAuto); | |
7386 | 7698 | end else begin |
7387 | 7699 | if FActiveBBS <> Board.ParentCategory.ParenTBBS then |
7388 | 7700 | ShowBBSTree( Board.ParentCategory.ParenTBBS ); |
@@ -7428,6 +7740,9 @@ begin | ||
7428 | 7740 | end; |
7429 | 7741 | |
7430 | 7742 | procedure TGikoForm.WndProc(var Message: TMessage); |
7743 | +var | |
7744 | + senderBrowser : TWebBrowser; | |
7745 | + url : OleVariant; | |
7431 | 7746 | begin |
7432 | 7747 | try |
7433 | 7748 | case Message.Msg of |
@@ -7445,6 +7760,12 @@ begin | ||
7445 | 7760 | OnMinimized; |
7446 | 7761 | USER_SETLINKBAR: |
7447 | 7762 | SetLinkBar; |
7763 | + USER_DOCUMENTCOMPLETE: | |
7764 | + if (Message.WParam <> 0) and | |
7765 | + (TObject(Message.WParam) is TWebBrowser) then begin | |
7766 | + senderBrowser := TWebBrowser( Message.WParam ); | |
7767 | + BrowserDocumentComplete( senderBrowser, senderBrowser.Parent, url ); | |
7768 | + end; | |
7448 | 7769 | end; |
7449 | 7770 | |
7450 | 7771 | inherited; |
@@ -7899,10 +8220,10 @@ var | ||
7899 | 8220 | j: Integer; |
7900 | 8221 | ToolButton: TLinkToolButton; |
7901 | 8222 | MenuItem: TMenuItem; |
7902 | - oldIgnoreResize : Boolean; | |
8223 | + oldIgnoreResize : TResizeType; | |
7903 | 8224 | begin |
7904 | 8225 | oldIgnoreResize := FIsIgnoreResize; |
7905 | - FIsIgnoreResize := True; | |
8226 | + FIsIgnoreResize := rtResizing; | |
7906 | 8227 | MainCoolBar.Bands.BeginUpdate; |
7907 | 8228 | try |
7908 | 8229 | LinkBarPopupMenu.Items.Clear; |
@@ -7995,7 +8316,7 @@ begin | ||
7995 | 8316 | if FDropSpaceNode <> nil then |
7996 | 8317 | FDropSpaceNode.Free; |
7997 | 8318 | |
7998 | - FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil ); | |
8319 | + FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObjectFirst(Node.Parent, '', nil ); | |
7999 | 8320 | FDropSpaceNode.MoveTo( Node, naInsert ); |
8000 | 8321 | FDropSpaceNode.ImageIndex := -1; |
8001 | 8322 | FDropSpaceNode.SelectedIndex := -1; |
@@ -8361,7 +8682,7 @@ begin | ||
8361 | 8682 | end; |
8362 | 8683 | end; |
8363 | 8684 | // Ýè |
8364 | - lResult := SendMessage( bar.Handle, RB_SETBANDINFO, i, Integer( pBandInfo ) ); | |
8685 | + lResult := SendMessage( bar.Handle, RB_SETBANDINFO, idx, Integer( pBandInfo ) ); | |
8365 | 8686 | |
8366 | 8687 | end; |
8367 | 8688 |
@@ -8606,12 +8927,11 @@ procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState; | ||
8606 | 8927 | var |
8607 | 8928 | Wnd: THandle; |
8608 | 8929 | delta: Integer; |
8609 | -// msg: TMessage; | |
8930 | +// browserPos : TPoint; | |
8610 | 8931 | const |
8611 | 8932 | ICON_SIZE = 16; |
8612 | 8933 | begin |
8613 | - Handled := False; | |
8614 | - Wnd := WindowFromPoint(MousePos); | |
8934 | + Wnd := WindowFromPoint(Mouse.CursorPos); | |
8615 | 8935 | Handled := True; |
8616 | 8936 | if WheelDelta > 0 then |
8617 | 8937 | Delta := -1 |
@@ -8621,13 +8941,42 @@ begin | ||
8621 | 8941 | if (Wnd = BrowserTab.Handle) or |
8622 | 8942 | (Wnd = BrowserTab.Parent.Handle) then begin |
8623 | 8943 | 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 ); | |
8629 | 8944 | end else begin |
8630 | - Handled := False; | |
8945 | + if FIsHandledWheel then begin | |
8946 | + FIsHandledWheel := False; | |
8947 | + Handled := False; | |
8948 | + end else begin | |
8949 | + FIsHandledWheel := True; | |
8950 | + if (Wnd = TreeView.Handle) or (Wnd = FavoriteTreeView.Handle) | |
8951 | + or (Wnd = ListView.Handle) or (Wnd = MessageListView.Handle) | |
8952 | + then | |
8953 | + SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y ) | |
8954 | + else | |
8955 | + Handled := False; | |
8956 | + | |
8957 | +{ | |
8958 | +// if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin | |
8959 | + // TWebBrowser Ì Handle ÆärµÄàêvµÈ¢ÌÅÀWÅ TWebBrowser ©Ç¤©»è | |
8960 | + browserPos.X := 0; | |
8961 | + browserPos.Y := 0; | |
8962 | + Windows.ClientToScreen( Browser.Handle, browserPos ); | |
8963 | + if (Longword(Mouse.CursorPos.X - browserPos.X) >= Browser.Width) | |
8964 | + or (Longword(Mouse.CursorPos.Y - browserPos.Y) >= Browser.Height) | |
8965 | + or (Longword(Mouse.CursorPos.Y - browserPos.Y) < 0) | |
8966 | + or (Longword(Mouse.CursorPos.Y - browserPos.Y) < 0) then begin | |
8967 | +// or not FActiveContent.Browser.Focused then | |
8968 | + // TWebBrowser ͳÀ[v·éÌÅ»êÈOÈçRg[ÉM | |
8969 | + if (Wnd <> BrowserToolBar.Handle) and (Wnd <> BrowserNameToolBar.Handle) then | |
8970 | + SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y ) | |
8971 | + else | |
8972 | + Handled := False; | |
8973 | + end else begin | |
8974 | + Handled := False; | |
8975 | + end; | |
8976 | +// end else begin | |
8977 | +// SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (MousePos.X shl 16) or MousePos.Y ); | |
8978 | +// end; | |
8979 | +} end; | |
8631 | 8980 | end; |
8632 | 8981 | end; |
8633 | 8982 |
@@ -8664,9 +9013,10 @@ begin | ||
8664 | 9013 | ModifySelectList; |
8665 | 9014 | end else if Length( SelectComboBox.Text ) = 0 then |
8666 | 9015 | begin |
8667 | - AllItemAction.Checked := True; | |
8668 | - LogItemAction.Checked := False; | |
8669 | - NewItemAction.Checked := False; | |
9016 | + {* SelectComboBox.TextªóÅàAüÍrÅEscµ½Æ© | |
9017 | + * óÌÆ«ÉDelL[ðµ½Æ©ÈÌÅAXÌiÝðÛ·éB | |
9018 | + * i±±ÅͽàµÈ¢j | |
9019 | + *} | |
8670 | 9020 | end else begin |
8671 | 9021 | // `Âƾ©çAêµÄ éÆ«¾¯·é |
8672 | 9022 | if AllItemAction.Checked then |
@@ -8797,11 +9147,6 @@ begin | ||
8797 | 9147 | SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile); |
8798 | 9148 | end; |
8799 | 9149 | |
8800 | -procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word; | |
8801 | - Shift: TShiftState); | |
8802 | -begin | |
8803 | -end; | |
8804 | - | |
8805 | 9150 | // SÄÌXð\¦ |
8806 | 9151 | procedure TGikoForm.AllResActionExecute(Sender: TObject); |
8807 | 9152 | var |
@@ -9306,25 +9651,26 @@ end; | ||
9306 | 9651 | procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word; |
9307 | 9652 | Shift: TShiftState); |
9308 | 9653 | begin |
9309 | - | |
9310 | - Case Key of | |
9311 | - VK_F2: | |
9312 | - begin | |
9313 | - FClickNode := FavoriteTreeView.Selected; | |
9314 | - FavoriteTreeViewRenameActionExecute( Sender ); | |
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; | |
9654 | + if not TTreeView(Sender).IsEditing then begin | |
9655 | + Case Key of | |
9656 | + VK_F2: | |
9657 | + begin | |
9658 | + FClickNode := FavoriteTreeView.Selected; | |
9659 | + FavoriteTreeViewRenameActionExecute( Sender ); | |
9660 | + end; | |
9661 | + VK_DELETE: | |
9662 | + begin | |
9663 | + FClickNode := FavoriteTreeView.Selected; | |
9664 | + FavoriteTreeViewDeleteActionExecute( Sender ); | |
9665 | + end; | |
9666 | + VK_RETURN: | |
9667 | + begin | |
9668 | + FavoriteClick( FavoriteTreeView.Selected ); | |
9669 | + FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded; | |
9670 | + end; | |
9671 | + VK_SPACE: | |
9672 | + FavoriteTreeViewDblClick( Sender ); | |
9325 | 9673 | end; |
9326 | - VK_SPACE: | |
9327 | - FavoriteTreeViewDblClick( Sender ); | |
9328 | 9674 | end; |
9329 | 9675 | |
9330 | 9676 | end; |
@@ -9576,7 +9922,7 @@ end; | ||
9576 | 9922 | procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute( |
9577 | 9923 | Sender: TObject); |
9578 | 9924 | const |
9579 | - DEL_MSG = 'g^0hÌOððíµÜ·Bæ뵢ŷ©H'; | |
9925 | + DEL_MSG = 'g^0hÌOðíµÜ·Bæ뵢ŷ©H'; | |
9580 | 9926 | DEL_TITLE = 'ímF'; |
9581 | 9927 | var |
9582 | 9928 | ThreadItem: TThreadItem; |
@@ -9719,7 +10065,7 @@ begin | ||
9719 | 10065 | ThreadItem := FavThread.Item; |
9720 | 10066 | |
9721 | 10067 | try |
9722 | - s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10; | |
10068 | + s := ThreadItem.Title + #13#10 + ThreadItem.URL + #13#10; | |
9723 | 10069 | if s <> '' then |
9724 | 10070 | Clipboard.AsText := s; |
9725 | 10071 | finally |
@@ -9734,7 +10080,7 @@ begin | ||
9734 | 10080 | GikoSys.ReadSubjectFile(Board); |
9735 | 10081 | |
9736 | 10082 | try |
9737 | - s := Board.URL + #13#10 + Board.Title + #13#10; | |
10083 | + s := Board.Title + #13#10 + Board.URL + #13#10; | |
9738 | 10084 | if s <> '' then |
9739 | 10085 | Clipboard.AsText := s; |
9740 | 10086 | finally |
@@ -9791,7 +10137,12 @@ procedure TGikoForm.BrowserTabMouseUp(Sender: TObject; | ||
9791 | 10137 | begin |
9792 | 10138 | if FDragWFirst <> true then begin |
9793 | 10139 | FDragWFirst := false; |
9794 | - end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin | |
10140 | +{ | |
10141 | + end else if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) | |
10142 | + and (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin | |
10143 | +(*} | |
10144 | + end else begin | |
10145 | +//*) | |
9795 | 10146 | if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
9796 | 10147 | if GikoSys.Setting.ListWidthState = glsMin then begin |
9797 | 10148 | BrowserMaxAndFocusAction.Execute; |
@@ -9875,9 +10226,9 @@ end; | ||
9875 | 10226 | procedure TGikoForm.SetListViewBackGroundColor(value: TColor); |
9876 | 10227 | begin |
9877 | 10228 | if FListViewBackGroundColor <> value then begin |
9878 | - FListViewBackGroundColor := value; | |
9879 | - ListView.Color := FListViewBackGroundColor; | |
9880 | - end; | |
10229 | + FListViewBackGroundColor := value; | |
10230 | + ListView.Color := FListViewBackGroundColor; | |
10231 | + end; | |
9881 | 10232 | end; |
9882 | 10233 | procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject); |
9883 | 10234 | begin |
@@ -10064,63 +10415,62 @@ end; | ||
10064 | 10415 | procedure TGikoForm.TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList); |
10065 | 10416 | var |
10066 | 10417 | i: Integer; |
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 | - //±±©çABoardÌURLÌÏX | |
10080 | - for j :=0 to oldURLs.Count - 1 do begin | |
10418 | + j: Integer; | |
10419 | + tempString: string; | |
10420 | + tmpURL: string; | |
10421 | + oldHost: string; | |
10422 | + oldBoardName: string; | |
10423 | + newHost: string; | |
10424 | + newBoardName: string; | |
10425 | + TabList: TStringList; | |
10426 | +begin | |
10427 | + TabList := TStringList.Create; | |
10428 | + if oldURLs.Count <> newURLs.Count then | |
10429 | + Exit; | |
10430 | + //±±©çABoardÌURLÌÏX | |
10431 | + for j :=0 to oldURLs.Count - 1 do begin | |
10081 | 10432 | for i :=0 to TabList.Count - 1 do begin |
10082 | 10433 | if TabList.Text = oldURLs[j] then |
10083 | - TabList.Text := newURLs[j]; | |
10084 | - end; | |
10085 | - end; | |
10086 | - //±±ÜÅABoardÌURLÌÏX | |
10087 | - | |
10088 | - //±±©çAThreadÌURLÌÏX | |
10089 | - //Ê|¾¯ÇthreadÍ»ê¼êURLð`bNµÈªçâÁĩȫ᢯ȢB | |
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; | |
10434 | + TabList.Text := newURLs[j]; | |
10435 | + end; | |
10436 | + end; | |
10437 | + //±±ÜÅABoardÌURLÌÏX | |
10438 | + | |
10439 | + //±±©çAThreadÌURLÌÏX | |
10440 | + //Ê|¾¯ÇthreadÍ»ê¼êURLð`bNµÈªçâÁĩȫ᢯ȢB | |
10441 | + for i := 0 to oldURLs.Count - 1 do begin | |
10442 | + tmpURL := Copy(oldURLs[i], 1, Length(oldURLs[i]) -1); | |
10443 | + oldHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) ); | |
10444 | + oldBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/'; | |
10445 | + tmpURL := Copy(newURLs[i], 1, Length(newURLs[i]) -1); | |
10446 | + newHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) ); | |
10447 | + newBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/'; | |
10448 | + | |
10449 | + for j := 0 to TabList.Count - 1 do begin | |
10450 | + tempString := TabList.Text; | |
10451 | + if ( AnsiPos(oldBoardName, tempString) <> 0 ) and ( AnsiPos(oldHost, tempString ) <> 0 ) then begin | |
10452 | + tempString := StringReplace(tempString, oldHost, newHost,[]); | |
10453 | + TabList.Text := tempString; | |
10454 | + end; | |
10455 | + end; | |
10105 | 10456 | end; |
10106 | - //±±ÜÅAThreadÌURLÌÏX | |
10457 | + //±±ÜÅAThreadÌURLÌÏX | |
10107 | 10458 | |
10108 | 10459 | end; |
10109 | 10460 | |
10110 | -// Ŭ»³êé | |
10461 | +/// Ŭ»³êé | |
10111 | 10462 | procedure TGikoForm.OnMinimize; |
10112 | 10463 | begin |
10113 | - FIsMinimize := mtMinimizing; | |
10114 | - if FActiveContent <> nil then | |
10464 | + if FActiveContent <> nil then begin | |
10465 | + FIsMinimize := mtMinimizing; | |
10115 | 10466 | FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop; |
10116 | - PostMessage( Handle, USER_MINIMIZED, 0, 0 ); | |
10467 | + end; | |
10117 | 10468 | end; |
10118 | 10469 | |
10119 | -// Ŭ»³ê½ | |
10470 | +/// Ŭ»³ê½ (OnResized ©çÄÎêé) | |
10120 | 10471 | procedure TGikoForm.OnMinimized; |
10121 | 10472 | begin |
10122 | 10473 | FIsMinimize := mtMinimized; |
10123 | - FIsIgnoreResize := False; | |
10124 | 10474 | end; |
10125 | 10475 | |
10126 | 10476 | procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar); |
@@ -10131,8 +10481,8 @@ var | ||
10131 | 10481 | affectedBand : TCoolBand; |
10132 | 10482 | i : Integer; |
10133 | 10483 | begin |
10134 | - if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin | |
10135 | - FIsIgnoreResize := True; | |
10484 | + if (FOldFormWidth = Width) and not IsIconic( Handle ) and (FIsIgnoreResize = rtNone) then begin | |
10485 | + FIsIgnoreResize := rtResizing; | |
10136 | 10486 | PostMessage( Handle, USER_RESIZED, 0, 0 ); |
10137 | 10487 | if not (Sender is TToolBar) or (CoolBar = nil) then |
10138 | 10488 | Exit; |
@@ -10273,8 +10623,6 @@ begin | ||
10273 | 10623 | end; |
10274 | 10624 | // TreeView ªNbN³ê½ |
10275 | 10625 | procedure TGikoForm.TreeClick( Node : TTreeNode ); |
10276 | -var | |
10277 | - i: Integer; | |
10278 | 10626 | begin |
10279 | 10627 | |
10280 | 10628 | if Node = nil then |
@@ -10288,16 +10636,7 @@ begin | ||
10288 | 10636 | Exit; |
10289 | 10637 | end; |
10290 | 10638 | |
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; | |
10639 | + ActiveListColumnSave; | |
10301 | 10640 | |
10302 | 10641 | if TObject(Node.Data) is TBBS then begin |
10303 | 10642 | SetActiveList(Node.data); |
@@ -10412,7 +10751,6 @@ end; | ||
10412 | 10751 | |
10413 | 10752 | // MRirÌbZ[W[vð¡æèµÜ· |
10414 | 10753 | procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean); |
10415 | - | |
10416 | 10754 | //var |
10417 | 10755 | // key : Word; |
10418 | 10756 | begin |
@@ -10478,7 +10816,7 @@ end; | ||
10478 | 10816 | procedure TGikoForm.MessagePanelResize(Sender: TObject); |
10479 | 10817 | begin |
10480 | 10818 | |
10481 | - if FIsIgnoreResize then | |
10819 | + if FIsIgnoreResize <> rtNone then | |
10482 | 10820 | Exit; |
10483 | 10821 | |
10484 | 10822 | if GikoSys.Setting.ListOrientation = gloVertical then begin |
@@ -10491,10 +10829,30 @@ begin | ||
10491 | 10829 | end; |
10492 | 10830 | |
10493 | 10831 | procedure TGikoForm.OnResized; |
10832 | +var | |
10833 | + doc : Variant; | |
10494 | 10834 | begin |
10495 | 10835 | |
10496 | 10836 | FOldFormWidth := Width; |
10497 | - FIsIgnoreResize := False; | |
10837 | + FIsIgnoreResize := rtNone; | |
10838 | + | |
10839 | + case FIsMinimize of | |
10840 | + mtMinimizing: | |
10841 | + begin | |
10842 | + // Ŭ»Å é | |
10843 | + PostMessage( Handle, USER_MINIMIZED, 0, 0 ); | |
10844 | + end; | |
10845 | + | |
10846 | + mtMinimized: | |
10847 | + begin | |
10848 | + // Ŭ»ÍùÉ®¹µÄ¢é (ÂÜè^XNo[©çEBhEð³) | |
10849 | + if FActiveContent <> nil then begin | |
10850 | + doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2; | |
10851 | + doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop; | |
10852 | + end; | |
10853 | + FIsMinimize := mtNone; | |
10854 | + end; | |
10855 | + end; | |
10498 | 10856 | |
10499 | 10857 | end; |
10500 | 10858 |
@@ -10810,12 +11168,16 @@ begin | ||
10810 | 11168 | SelectListItem(List); |
10811 | 11169 | for i := 0 to List.Count - 1 do begin |
10812 | 11170 | if TObject(List[i]) is TThreadItem then begin |
10813 | - TThreadItem(List[i]).UnRead := false; | |
10814 | - TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1; | |
11171 | + if (TThreadItem(List[i]).UnRead) then begin | |
11172 | + TThreadItem(List[i]).UnRead := false; | |
11173 | + TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1; | |
11174 | + end; | |
10815 | 11175 | end; |
10816 | 11176 | end; |
10817 | 11177 | if TreeView.Visible then |
10818 | 11178 | TreeView.Refresh; |
11179 | + if ListView.Visible then | |
11180 | + ListView.Refresh; | |
10819 | 11181 | finally |
10820 | 11182 | List.Free; |
10821 | 11183 | end; |
@@ -10831,12 +11193,16 @@ begin | ||
10831 | 11193 | SelectListItem(List); |
10832 | 11194 | for i := 0 to List.Count - 1 do begin |
10833 | 11195 | if TObject(List[i]) is TThreadItem then begin |
10834 | - TThreadItem(List[i]).UnRead := true; | |
10835 | - TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1; | |
11196 | + if (TThreadItem(List[i]).IsLogFile) and (not TThreadItem(List[i]).UnRead) then begin | |
11197 | + TThreadItem(List[i]).UnRead := true; | |
11198 | + TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1; | |
11199 | + end; | |
10836 | 11200 | end; |
10837 | 11201 | end; |
10838 | 11202 | if TreeView.Visible then |
10839 | 11203 | TreeView.Refresh; |
11204 | + if ListView.Visible then | |
11205 | + ListView.Refresh; | |
10840 | 11206 | finally |
10841 | 11207 | List.Free; |
10842 | 11208 | end; |
@@ -10847,11 +11213,8 @@ procedure TGikoForm.BrowserPanelCanResize(Sender: TObject; var NewWidth, | ||
10847 | 11213 | var |
10848 | 11214 | i: Integer; |
10849 | 11215 | begin |
10850 | - for i := 0 to BROWSER_COUNT - 1 do | |
11216 | + for i := BROWSER_COUNT - 1 downto 0 do begin | |
10851 | 11217 | SetWindowPos(TWebBrowser(FBrowsers[i]).Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER); |
10852 | - | |
10853 | - if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin | |
10854 | - SetWindowPos(FActiveContent.Browser.Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER); | |
10855 | 11218 | end; |
10856 | 11219 | end; |
10857 | 11220 |
@@ -10918,14 +11281,24 @@ end; | ||
10918 | 11281 | |
10919 | 11282 | function TGikoForm.SaveTabURLs : Boolean; |
10920 | 11283 | var |
10921 | - SaveStringList: TStringList; | |
11284 | + SaveStringList, BackStrList: TStringList; | |
10922 | 11285 | begin |
10923 | 11286 | SaveStringList := TStringList.Create; |
11287 | + BackStrList := TStringList.Create; | |
11288 | + | |
11289 | + //obNAbv | |
11290 | + BackStrList.LoadFromFile(ExtractFilePath(Application.ExeName) + 'tab.sav'); | |
11291 | + BackStrList.SaveToFile(ExtractFilePath(Application.ExeName) + '~tab.sav'); | |
11292 | + BackStrList.Free; | |
11293 | + //obNAbvðìéB | |
10924 | 11294 | try |
10925 | 11295 | Result := GetTabURLs(SaveStringList); |
11296 | + if not Result then begin | |
11297 | + Exit; //¦° | |
11298 | + end; | |
10926 | 11299 | SaveStringList.SaveToFile(ExtractFilePath(Application.ExeName) + 'tab.sav'); |
10927 | 11300 | finally |
10928 | - SaveStringList.Free | |
11301 | + SaveStringList.Free; | |
10929 | 11302 | end; |
10930 | 11303 | end; |
10931 | 11304 |
@@ -10990,7 +11363,7 @@ end; | ||
10990 | 11363 | procedure TGikoForm.TabsSaveToFileActionExecute(Sender: TObject); |
10991 | 11364 | var |
10992 | 11365 | SaveTabList: TStringList; |
10993 | - Result: Boolean; | |
11366 | + Result: Boolean; | |
10994 | 11367 | begin |
10995 | 11368 | SaveTabList := TStringList.Create; |
10996 | 11369 | try |
@@ -11211,6 +11584,225 @@ begin | ||
11211 | 11584 | LoadTabURLs; |
11212 | 11585 | end; |
11213 | 11586 | |
11587 | +/// ListView ÌJ¨æÑÊuÌÛ¶ | |
11588 | +procedure TGikoForm.ActiveListColumnSave; | |
11589 | +var | |
11590 | + ActivListObj : TObject; | |
11591 | + i, id, idx : Integer; | |
11592 | + BBSOrder : TGikoBBSColumnList; | |
11593 | + CategoryOrder : TGikoCategoryColumnList; | |
11594 | + BoardOrder : TGikoBoardColumnList; | |
11595 | +begin | |
11596 | + | |
11597 | + ActivListObj := ActiveList; | |
11598 | + if ActivListObj is TBBS then begin | |
11599 | + //===== JeSXg ===== | |
11600 | + BBSOrder := TGikoBBSColumnList.Create; | |
11601 | + try | |
11602 | + for i := 0 to ListView.Columns.Count - 1 do begin | |
11603 | + // Ìæ¾ | |
11604 | + idx := ListView.Column[ i ].Tag; | |
11605 | + id := Ord( GikoSys.Setting.BBSColumnOrder[ idx ] ); | |
11606 | + BBSOrder.Add( TGikoBBSColumnID( id ) ); | |
11607 | + // ÌÛ¶ | |
11608 | + GikoSys.Setting.BBSColumnWidth[ id ] := ListView.Column[ i ].Width; | |
11609 | + end; | |
11610 | + for i := 0 to ListView.Columns.Count - 1 do | |
11611 | + // ÌÛ¶ | |
11612 | + GikoSys.Setting.BBSColumnOrder[ i ] := BBSOrder[ i ]; | |
11613 | + finally | |
11614 | + BBSOrder.Free; | |
11615 | + end; | |
11616 | + end else if ActivListObj is TCategory then begin | |
11617 | + //===== ÂXg ===== | |
11618 | + CategoryOrder := TGikoCategoryColumnList.Create; | |
11619 | + try | |
11620 | + for i := 0 to ListView.Columns.Count - 1 do begin | |
11621 | + // Ìæ¾ | |
11622 | + idx := ListView.Column[ i ].Tag; | |
11623 | + id := Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] ); | |
11624 | + CategoryOrder.Add( TGikoCategoryColumnID( id ) ); | |
11625 | + // ÌÛ¶ | |
11626 | + GikoSys.Setting.CategoryColumnWidth[ id ] := ListView.Column[ i ].Width; | |
11627 | + end; | |
11628 | + for i := 0 to ListView.Columns.Count - 1 do | |
11629 | + // ÌÛ¶ | |
11630 | + GikoSys.Setting.CategoryColumnOrder[ i ] := CategoryOrder[ i ]; | |
11631 | + finally | |
11632 | + CategoryOrder.Free; | |
11633 | + end; | |
11634 | + end else if ActivListObj is TBoard then begin | |
11635 | + //===== XXg ===== | |
11636 | + BoardOrder := TGikoBoardColumnList.Create; | |
11637 | + try | |
11638 | + for i := 0 to ListView.Columns.Count - 1 do begin | |
11639 | + // Ìæ¾ | |
11640 | + idx := ListView.Column[ i ].Tag; | |
11641 | + id := Ord( GikoSys.Setting.BoardColumnOrder[ idx ] ); | |
11642 | + BoardOrder.Add( TGikoBoardColumnID( id ) ); | |
11643 | + // ÌÛ¶ | |
11644 | + GikoSys.Setting.BoardColumnWidth[ id ] := ListView.Column[ i ].Width; | |
11645 | + end; | |
11646 | + for i := 0 to ListView.Columns.Count - 1 do | |
11647 | + // ÌÛ¶ | |
11648 | + GikoSys.Setting.BoardColumnOrder[ i ] := BoardOrder[ i ]; | |
11649 | + finally | |
11650 | + BoardOrder.Free; | |
11651 | + end; | |
11652 | + end; | |
11653 | + | |
11654 | +end; | |
11655 | + | |
11656 | +procedure TGikoForm.ListViewColumnRightClick(Sender: TObject; | |
11657 | + Column: TListColumn; Point: TPoint); | |
11658 | +var | |
11659 | + i, j : Integer; | |
11660 | + item : TMenuItem; | |
11661 | +begin | |
11662 | + | |
11663 | + // |bvAbvj [ðNA | |
11664 | + for i := ListColumnPopupMenu.Items.Count - 1 downto 0 do | |
11665 | + ListColumnPopupMenu.Items.Items[ i ].Free; | |
11666 | + | |
11667 | + // j [Ìì¬ (CJÍK{ÈÌÅj [ÉÜßÈ¢) | |
11668 | + if TObject( FActiveList ) is TBBS then begin | |
11669 | + | |
11670 | + //===== JeSXg ===== | |
11671 | + for i := 1 to Length( GikoBBSColumnCaption ) - 1 do begin | |
11672 | + item := TMenuItem.Create( ListColumnPopupMenu ); | |
11673 | + item.Caption := GikoBBSColumnCaption[ i ]; | |
11674 | + item.Tag := i; | |
11675 | + item.OnClick := ListColumnPopupMenuOnClick; | |
11676 | + for j := GikoSys.Setting.BBSColumnOrder.Count - 1 downto 0 do begin | |
11677 | + if GikoSys.Setting.BBSColumnOrder[ j ] = TGikoBBSColumnID( i ) then begin | |
11678 | + item.Checked := True; | |
11679 | + Break; | |
11680 | + end; | |
11681 | + end; | |
11682 | + ListColumnPopupMenu.Items.Add( item ); | |
11683 | + end; | |
11684 | + | |
11685 | + end else if TObject( FActiveList ) is TCategory then begin | |
11686 | + | |
11687 | + //===== ÂXg ===== | |
11688 | + for i := 1 to Length( GikoCategoryColumnCaption ) - 1 do begin | |
11689 | + item := TMenuItem.Create( ListColumnPopupMenu ); | |
11690 | + item.Caption := GikoCategoryColumnCaption[ i ]; | |
11691 | + item.Tag := i; | |
11692 | + item.OnClick := ListColumnPopupMenuOnClick; | |
11693 | + for j := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 0 do begin | |
11694 | + if GikoSys.Setting.CategoryColumnOrder[ j ] = TGikoCategoryColumnID( i ) then begin | |
11695 | + item.Checked := True; | |
11696 | + Break; | |
11697 | + end; | |
11698 | + end; | |
11699 | + ListColumnPopupMenu.Items.Add( item ); | |
11700 | + end; | |
11701 | + | |
11702 | + end else if TObject( FActiveList ) is TBoard then begin | |
11703 | + | |
11704 | + //===== XXg ===== | |
11705 | + for i := 1 to Length( GikoBoardColumnCaption ) - 1 do begin | |
11706 | + item := TMenuItem.Create( ListColumnPopupMenu ); | |
11707 | + item.Caption := GikoBoardColumnCaption[ i ]; | |
11708 | + item.Tag := i; | |
11709 | + item.OnClick := ListColumnPopupMenuOnClick; | |
11710 | + for j := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 0 do begin | |
11711 | + if GikoSys.Setting.BoardColumnOrder[ j ] = TGikoBoardColumnID( i ) then begin | |
11712 | + item.Checked := True; | |
11713 | + Break; | |
11714 | + end; | |
11715 | + end; | |
11716 | + ListColumnPopupMenu.Items.Add( item ); | |
11717 | + end; | |
11718 | + | |
11719 | + end; | |
11720 | + | |
11721 | + // j [Ì\¦ | |
11722 | + Point := ListView.ClientToScreen( Point ); | |
11723 | + if ListColumnPopupMenu.Items.Count > 0 then | |
11724 | + ListColumnPopupMenu.Popup( Point.X, Point.Y ); | |
11725 | + | |
11726 | +end; | |
11727 | + | |
11728 | +/// ListColumnPopupMenu ACeÌNbNCxg | |
11729 | +procedure TGikoForm.ListColumnPopupMenuOnClick( Sender : TObject ); | |
11730 | +var | |
11731 | + i : Integer; | |
11732 | + orderList : TList; | |
11733 | + item : TMenuItem; | |
11734 | +begin | |
11735 | + | |
11736 | + if not (Sender is TMenuItem) then | |
11737 | + Exit; | |
11738 | + | |
11739 | + ActiveListColumnSave; | |
11740 | + item := TMenuItem( Sender ); | |
11741 | + | |
11742 | + if TObject( FActiveList ) is TBBS then | |
11743 | + orderList := GikoSys.Setting.BBSColumnOrder | |
11744 | + else if TObject( FActiveList ) is TCategory then | |
11745 | + orderList := GikoSys.Setting.CategoryColumnOrder | |
11746 | + else if TObject( FActiveList ) is TBoard then | |
11747 | + orderList := GikoSys.Setting.BoardColumnOrder | |
11748 | + else | |
11749 | + Exit; | |
11750 | + | |
11751 | + if item.Checked then begin | |
11752 | + // JÌí | |
11753 | + for i := orderList.Count - 1 downto 0 do begin | |
11754 | + if Integer( orderList[ i ] ) = item.Tag then begin | |
11755 | + orderList.Delete( i ); | |
11756 | + Break; | |
11757 | + end; | |
11758 | + end; | |
11759 | + end else begin | |
11760 | + // JÌÇÁ | |
11761 | + orderList.Add( Pointer( item.Tag ) ); | |
11762 | + end; | |
11763 | + | |
11764 | + SetActiveList( FActiveList ); | |
11765 | + | |
11766 | +end; | |
11767 | +//wèµ½ÔÌXÉjump·éAction | |
11768 | +procedure TGikoForm.JumpToNumOfResActionExecute(Sender: TObject); | |
11769 | +var | |
11770 | + str: string; | |
11771 | + res: integer; | |
11772 | +begin | |
11773 | + str := '1'; | |
11774 | + if( InputQuery('wèµ½ÔÌXÉòÔ', 'Ôðü͵ľ³¢', str) ) then begin | |
11775 | + str := ZenToHan(str); | |
11776 | + res := StrToIntDef(str, -1); | |
11777 | + if (res > 0) and (res <= GetActiveContent.Count) then begin | |
11778 | + BrowserMovement(IntToStr(res), FActiveContent); | |
11779 | + SetFocusForBrowserAction.Execute; | |
11780 | + end else if res > GetActiveContent.Count then begin | |
11781 | + BrowserMovement(IntToStr(GetActiveContent.Count), FActiveContent); | |
11782 | + SetFocusForBrowserAction.Execute; | |
11783 | + end; | |
11784 | + end; | |
11785 | +end; | |
11786 | + | |
11787 | +procedure TGikoForm.JumpToNumOfResActionUpdate(Sender: TObject); | |
11788 | +begin | |
11789 | + JumpToNumOfResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile); | |
11790 | +end; | |
11791 | + | |
11792 | +procedure TGikoForm.FavoriteTreeViewCollapseActionExecute(Sender: TObject); | |
11793 | +var | |
11794 | + node : TTreeNode; | |
11795 | +begin | |
11796 | + | |
11797 | + node := FavoriteTreeView.Items.GetFirstNode; | |
11798 | + while node <> nil do begin | |
11799 | + if node.HasChildren then | |
11800 | + node.Expanded := False; | |
11801 | + node := node.GetNext; | |
11802 | + end; | |
11803 | + | |
11804 | +end; | |
11805 | + | |
11214 | 11806 | initialization |
11215 | 11807 | OleInitialize(nil); |
11216 | 11808 | 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(var URL, Protocol, Host, Path, Document, Port, Bookmark: string); | |
190 | + procedure ParseURI(const URL : string; var 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 = 48; | |
221 | + BETA_VERSION = 49; | |
222 | 222 | BETA_VERSION_BUILD = ''; //debugÅÈÇ |
223 | 223 | APP_NAME = 'gikoNavi'; |
224 | 224 |
@@ -2999,7 +2999,8 @@ 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) = (Length(Host) - Length(HOST_NAME[i]) + 1) then begin | |
3002 | + if (AnsiPos(HOST_NAME[i], Host) > 0) and | |
3003 | + (AnsiPos(HOST_NAME[i], Host) = (Length(Host) - Length(HOST_NAME[i]) + 1)) then begin | |
3003 | 3004 | Result := True; |
3004 | 3005 | Exit; |
3005 | 3006 | end; |
@@ -3423,7 +3424,7 @@ begin | ||
3423 | 3424 | end; |
3424 | 3425 | end; |
3425 | 3426 | |
3426 | -procedure TGikoSys.ParseURI(var URL, Protocol, Host, Path, Document, Port, Bookmark: string); | |
3427 | +procedure TGikoSys.ParseURI(const URL : string; var Protocol, Host, Path, Document, Port, Bookmark: string); | |
3427 | 3428 | var |
3428 | 3429 | URI: TIdURI; |
3429 | 3430 | begin |
@@ -10,7 +10,7 @@ interface | ||
10 | 10 | uses |
11 | 11 | //================================================== |
12 | 12 | |
13 | - Classes, SysUtils, | |
13 | + Classes, SysUtils, Windows, | |
14 | 14 | YofUtils; |
15 | 15 | |
16 | 16 | //================================================== |
@@ -26,6 +26,7 @@ type | ||
26 | 26 | IXMLNode = class |
27 | 27 | private |
28 | 28 | FNodeName : string; |
29 | + FCapacity : Integer; | |
29 | 30 | FCount : Integer; |
30 | 31 | FAttributeCount : Integer; |
31 | 32 | FChildNodes : IXMLNode; |
@@ -54,15 +55,16 @@ type | ||
54 | 55 | end; |
55 | 56 | |
56 | 57 | function XMLCloseCheck( |
57 | - var f : TFileStream; | |
58 | + var p : PChar; | |
59 | + const tail : PChar; | |
58 | 60 | var node : IXMLNode; |
59 | - ch : char; | |
60 | 61 | out tag : string; |
61 | 62 | out closed : boolean // ÄÑoµ½[`ª node ð¶é׫Èç true |
62 | 63 | ) : boolean; // ch ð±Ì[`ªµ½Èç true |
63 | 64 | |
64 | 65 | function XMLReadNode( |
65 | - var f : TFileStream; | |
66 | + var p : PChar; | |
67 | + const tail : PChar; | |
66 | 68 | var node : IXMLNode |
67 | 69 | ) : string; // node ÈOÌm[hªÂ¶çê½êÌm[h¼ |
68 | 70 |
@@ -75,6 +77,8 @@ procedure LoadXMLDocument( | ||
75 | 77 | const |
76 | 78 | //================================================== |
77 | 79 | kXMLWhite : TSysCharSet = [#0..#$20]; |
80 | + kXMLNodeNameStop : TSysCharSet = [#0..#$20, '/', '>']; | |
81 | + kXMLAttributeNameStop : TSysCharSet = [#0..#$20, '=', '/', '>']; | |
78 | 82 | kXMLDQuote : TSysCharSet = ['"']; |
79 | 83 | kXMLTagStart : TSysCharSet = ['<']; |
80 | 84 | kXMLTagEnd : TSysCharSet = ['>']; |
@@ -90,6 +94,7 @@ begin | ||
90 | 94 | |
91 | 95 | inherited; |
92 | 96 | |
97 | + FCapacity := 0; | |
93 | 98 | FCount := 0; |
94 | 99 | |
95 | 100 | end; |
@@ -138,7 +143,11 @@ procedure IXMLNode.Add( node : IXMLNode ); | ||
138 | 143 | begin |
139 | 144 | |
140 | 145 | Inc( FCount ); |
141 | - SetLength( FNodes, FCount ); | |
146 | + if FCount > FCapacity then begin | |
147 | + FCapacity := FCapacity + (FCapacity shr 2) + 1; | |
148 | + SetLength( FNodes, FCapacity ); | |
149 | + end; | |
150 | + | |
142 | 151 | FNodes[ FCount - 1 ] := node; |
143 | 152 | |
144 | 153 | end; |
@@ -154,6 +163,7 @@ begin | ||
154 | 163 | index := FAttributeCount; |
155 | 164 | Inc( FAttributeCount ); |
156 | 165 | SetLength( FAttributes, FAttributeCount ); |
166 | + | |
157 | 167 | FAttributes[ index ].Name := Name; |
158 | 168 | FAttributes[ index ].Value := Value; |
159 | 169 |
@@ -166,116 +176,133 @@ begin | ||
166 | 176 | |
167 | 177 | end; |
168 | 178 | |
169 | -// untilSet ÉÈéÜÅòη | |
170 | -procedure FileThruUntil( | |
171 | - var f : TFileStream; | |
172 | - const untilSet : TSysCharSet | |
173 | -); | |
174 | -var | |
175 | - ch : char; | |
179 | +{*! | |
180 | +\brief tok ðT· | |
181 | +\param p TõJnÊu | |
182 | +\param tail I¹Êu + 1 | |
183 | +\param tok T·LN^ | |
184 | +\return tok ªÅɩ©Á½Êu | |
185 | +*} | |
186 | +function AnsiStrTok( | |
187 | + p : PChar; | |
188 | + const tail : PChar; | |
189 | + const tok : TSysCharSet | |
190 | +) : PChar; | |
176 | 191 | begin |
177 | 192 | |
178 | - while f.Position < f.Size do | |
193 | + while p < tail do | |
179 | 194 | begin |
180 | - f.ReadBuffer( ch, 1 ); | |
181 | - if ch in untilSet then | |
195 | + if p^ in tok then | |
182 | 196 | begin |
183 | - f.Seek( -1, soFromCurrent ); | |
184 | - exit; | |
185 | - end else if ch in kXMLKanji then | |
186 | - f.Seek( 1, soFromCurrent ); | |
197 | + Break; | |
198 | + end else if p^ in kXMLKanji then | |
199 | + p := p + 2 | |
200 | + else | |
201 | + Inc( p ); | |
187 | 202 | end; |
188 | 203 | |
204 | + Result := p; | |
205 | + | |
189 | 206 | end; |
190 | 207 | |
191 | -// whileSet ÌÔòη | |
192 | -procedure FileThruWhile( | |
193 | - var f : TFileStream; | |
194 | - const whileSet : TSysCharSet | |
195 | -); | |
196 | -var | |
197 | - ch : char; | |
208 | +{*! | |
209 | +\brief tok Åͳ¢LN^ðT· | |
210 | +\param p TõJnÊu | |
211 | +\param tail I¹Êu + 1 | |
212 | +\param tok T·LN^ | |
213 | +\return tok ÅÍÈ¢LN^ªÅɩ©Á½Êu | |
214 | +*} | |
215 | +function AnsiStrNonTok( | |
216 | + p : PChar; | |
217 | + const tail : PChar; | |
218 | + const tok : TSysCharSet | |
219 | +) : PChar; | |
198 | 220 | begin |
199 | 221 | |
200 | - while f.Position < f.Size do | |
222 | + while p < tail do | |
201 | 223 | begin |
202 | - f.ReadBuffer( ch, 1 ); | |
203 | - if ch in whileSet then | |
224 | + if p^ in tok then | |
204 | 225 | begin |
205 | - if ch in kXMLKanji then | |
206 | - f.ReadBuffer( ch, 1 ); | |
226 | + if p^ in kXMLKanji then | |
227 | + p := p + 2 | |
228 | + else | |
229 | + Inc( p ); | |
207 | 230 | end else begin |
208 | - f.Seek( -1, soFromCurrent ); | |
209 | - exit; | |
231 | + Break; | |
210 | 232 | end; |
211 | 233 | end; |
212 | 234 | |
235 | + Result := p; | |
236 | + | |
213 | 237 | end; |
214 | 238 | |
215 | 239 | function XMLCloseCheck( |
216 | - var f : TFileStream; | |
240 | + var p : PChar; | |
241 | + const tail : PChar; | |
217 | 242 | var node : IXMLNode; |
218 | - ch : char; | |
219 | 243 | out tag : string; |
220 | 244 | out closed : boolean |
221 | 245 | ) : boolean; // ch ð±Ì[`ªµ½Èç true |
222 | 246 | var |
223 | - last : Integer; | |
224 | - tagLen : Integer; | |
247 | + found : PChar; | |
225 | 248 | begin |
226 | 249 | |
227 | 250 | closed := false; |
228 | 251 | Result := false; |
229 | 252 | tag := ''; |
230 | 253 | |
231 | - if ch = '>' then | |
232 | - begin | |
233 | - // Jn^OÌÅãÜÅÇñ¾ | |
234 | - Result := true; | |
235 | - end else if ch = '?' then | |
236 | - begin | |
237 | - // <?xml?> ݽ¢ÈâÂBæÁij | |
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 | - // ^O¼ðÇÝñÅÔ· | |
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; | |
254 | + case p^ of | |
255 | + '>': | |
256 | + begin | |
257 | + // Jn^OÌÅãÜÅÇñ¾ | |
258 | + Inc( p ); // '>' òε | |
259 | + Result := true; | |
260 | + end; | |
261 | + | |
262 | + '?': | |
263 | + begin | |
264 | + // <?xml?> ݽ¢ÈâÂBæÁij | |
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 | + // ^O¼ðÇÝñÅÔ· | |
276 | + Inc( p ); // '/' òε | |
277 | + found := AnsiStrTok( p, tail, kXMLTagEnd ); | |
278 | +// tag := Copy( p, 0, found - p ); // ½Ì©x | |
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; | |
258 | 286 | end; |
259 | 287 | |
260 | 288 | end; |
261 | 289 | |
262 | 290 | function XMLReadNode( |
263 | - var f : TFileStream; | |
291 | + var p : PChar; | |
292 | + const tail : PChar; | |
264 | 293 | var node : IXMLNode |
265 | 294 | ) : string; // node ÈOÌm[hªÂ¶çê½êÌm[h¼ |
266 | 295 | var |
267 | 296 | child : IXMLNode; |
268 | 297 | |
269 | - last : Integer; | |
298 | + found : PChar; | |
270 | 299 | tag : string; |
271 | - tagLen : Integer; | |
272 | 300 | |
273 | 301 | isClosed : boolean; |
274 | 302 | |
303 | + nodeName : string; | |
275 | 304 | attributeName : string; |
276 | 305 | attributeValue : string; |
277 | - | |
278 | - ch : char; | |
279 | 306 | label |
280 | 307 | NextNode; |
281 | 308 | begin |
@@ -283,16 +310,14 @@ begin | ||
283 | 310 | // node ÌÇÝÝ(1 [vÉ« 1 m[h) |
284 | 311 | node.ChildNodes := IXMLNode.Create; |
285 | 312 | |
286 | - while f.Position < f.Size do | |
313 | + while p < tail do | |
287 | 314 | begin |
288 | 315 | // NodeName ÇÝÝ |
289 | - FileThruWhile( f, kXMLWhite ); | |
316 | + p := AnsiStrNonTok( p, tail, kXMLWhite ); | |
290 | 317 | |
291 | - while f.Position < f.Size do | |
318 | + while p < tail do | |
292 | 319 | begin |
293 | - f.ReadBuffer( ch, 1 ); | |
294 | - | |
295 | - if XMLCloseCheck( f, node, ch, tag, isClosed ) then | |
320 | + if XMLCloseCheck( p, tail, node, tag, isClosed ) then | |
296 | 321 | begin |
297 | 322 | if isClosed then |
298 | 323 | begin |
@@ -301,11 +326,12 @@ begin | ||
301 | 326 | end; |
302 | 327 | |
303 | 328 | goto NextNode; |
304 | - end else if ch = '<' then | |
329 | + end else if p^ = '<' then | |
305 | 330 | begin |
306 | 331 | // VKm[h |
332 | + Inc( p ); | |
307 | 333 | child := IXMLNode.Create; |
308 | - tag := XMLReadNode( f, child ); | |
334 | + tag := XMLReadNode( p, tail, child ); | |
309 | 335 | node.ChildNodes.Add( child ); |
310 | 336 | |
311 | 337 | // ^OªÂ¶çê½ |
@@ -318,35 +344,32 @@ begin | ||
318 | 344 | end; |
319 | 345 | |
320 | 346 | goto NextNode; |
321 | - end else if ch in kXMLWhite then | |
347 | + end else if p^ in kXMLWhite then | |
322 | 348 | begin |
323 | 349 | // NodeName ®¹ |
324 | 350 | break; |
325 | 351 | end else begin |
326 | - node.NodeName := node.NodeName + ch; | |
352 | + found := AnsiStrTok( p, tail, kXMLNodeNameStop ); | |
353 | + SetLength( nodeName, found - p ); | |
354 | + CopyMemory( PChar( nodeName ), p, found - p ); | |
355 | + node.NodeName := nodeName; | |
327 | 356 | |
328 | - if ch in kXMLKanji then | |
329 | - begin | |
330 | - f.ReadBuffer( ch, 1 ); | |
331 | - node.NodeName := node.NodeName + ch; | |
332 | - end; | |
357 | + p := found; | |
333 | 358 | end; |
334 | 359 | end; |
335 | 360 | |
336 | 361 | // Attribute ÌÇÝÝ |
337 | - while f.Position < f.Size do | |
362 | + while p < tail do | |
338 | 363 | begin |
339 | 364 | // Attribute ̼OðÇÝÝ |
340 | 365 | attributeName := ''; |
341 | 366 | attributeValue := ''; |
342 | 367 | |
343 | - FileThruWhile( f, kXMLWhite ); | |
368 | + p := AnsiStrNonTok( p, tail, kXMLWhite ); | |
344 | 369 | |
345 | - while f.Position < f.Size do | |
370 | + while p < tail do | |
346 | 371 | begin |
347 | - f.ReadBuffer( ch, 1 ); | |
348 | - | |
349 | - if XMLCloseCheck( f, node, ch, tag, isClosed ) then | |
372 | + if XMLCloseCheck( p, tail, node, tag, isClosed ) then | |
350 | 373 | begin |
351 | 374 | if isClosed then |
352 | 375 | begin |
@@ -358,33 +381,30 @@ begin | ||
358 | 381 | |
359 | 382 | // Ìm[hÖ |
360 | 383 | goto NextNode; |
361 | - end else if ch = '=' then | |
384 | + end else if p^ = '=' then | |
362 | 385 | begin |
363 | 386 | // ±±©çÍlªnÜéÌżOÍI¹ |
387 | + Inc( p ); | |
364 | 388 | break; |
365 | - end else if ch in kXMLWhite then | |
389 | + end else if p^ in kXMLWhite then | |
366 | 390 | begin |
367 | 391 | // Value ª¶ÝµÈ¢(KiO)ÌÅÌm[hÖ |
368 | 392 | goto NextNode; |
369 | 393 | end else begin |
370 | - attributeName := attributeName + ch; | |
394 | + found := AnsiStrTok( p, tail, kXMLAttributeNameStop ); | |
395 | + SetLength( attributeName, found - p ); | |
396 | + CopyMemory( PChar( attributeName ), p, found - p ); | |
371 | 397 | |
372 | - if ch in kXMLKanji then | |
373 | - begin | |
374 | - f.ReadBuffer( ch, 1 ); | |
375 | - attributeName := attributeName + ch; | |
376 | - end; | |
398 | + p := found; | |
377 | 399 | end; |
378 | 400 | end; |
379 | 401 | |
380 | 402 | // Attribute ÌlðÇÝÝ |
381 | - FileThruWhile( f, kXMLWhite ); | |
403 | + p := AnsiStrNonTok( p, tail, kXMLWhite ); | |
382 | 404 | |
383 | - while f.Position < f.Size do | |
405 | + while p < tail do | |
384 | 406 | begin |
385 | - f.ReadBuffer( ch, 1 ); | |
386 | - | |
387 | - if XMLCloseCheck( f, node, ch, tag, isClosed ) then | |
407 | + if XMLCloseCheck( p, tail, node, tag, isClosed ) then | |
388 | 408 | begin |
389 | 409 | if isClosed then |
390 | 410 | begin |
@@ -400,24 +420,22 @@ begin | ||
400 | 420 | |
401 | 421 | // Ìm[hÖ |
402 | 422 | goto NextNode; |
403 | - end else if ch = '"' then | |
423 | + end else if p^ = '"' then | |
404 | 424 | begin |
405 | 425 | // lª "" ÅçêÄéÌÅ(Ä¢¤©çêÄȫ᢯Ȣñ¾¯Ç) |
406 | 426 | // lðêÇÝÝ |
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 ); | |
427 | + Inc( p ); | |
428 | + found := AnsiStrTok( p, tail, kXMLDQuote ); | |
429 | +// attributeValue := Copy( p, 0, found - p ); // ½Ì©x | |
430 | + SetLength( attributeValue, found - p ); | |
431 | + CopyMemory( PChar( attributeValue ), p, found - p ); | |
414 | 432 | |
415 | 433 | node.AddAttribute( attributeName, HtmlDecode( attributeValue ) ); |
416 | 434 | |
417 | 435 | // lðÇÝIíÁ½ÌÅI¹ |
418 | - f.Seek( f.Position + 1, soFromBeginning ); // '"' òε | |
436 | + p := found + 1; // '"' òε | |
419 | 437 | break; |
420 | - end else if ch in kXMLWhite then | |
438 | + end else if p^ in kXMLWhite then | |
421 | 439 | begin |
422 | 440 | // KiO¾¯ÇË |
423 | 441 | node.AddAttribute( attributeName, HtmlDecode( attributeValue ) ); |
@@ -425,12 +443,14 @@ begin | ||
425 | 443 | goto NextNode; |
426 | 444 | end else begin |
427 | 445 | // KiO¾¯ÇêæÁĨ |
428 | - attributeValue := attributeValue + ch; | |
446 | + attributeValue := attributeValue + p^; | |
429 | 447 | |
430 | - if ch in kXMLKanji then | |
448 | + if p^ in kXMLKanji then | |
431 | 449 | begin |
432 | - f.ReadBuffer( ch, 1 ); | |
433 | - attributeValue := attributeValue + ch; | |
450 | + attributeValue := attributeValue + (p + 1)^; | |
451 | + p := p + 2; | |
452 | + end else begin | |
453 | + Inc( p ); | |
434 | 454 | end; |
435 | 455 | end; |
436 | 456 | end; |
@@ -449,19 +469,21 @@ procedure LoadXMLDocument( | ||
449 | 469 | type |
450 | 470 | xmlMode = ( xmlHoge ); |
451 | 471 | var |
452 | - xmlFile : TFileStream; | |
472 | + xmlFile : TMappedFile; | |
473 | + p : PChar; | |
453 | 474 | begin |
454 | - //Result := IXMLDocument.Create; | |
475 | + //Result := IXMLDocument.Create; | |
455 | 476 | //doc := IXMLDocument.Create; |
456 | 477 | |
457 | - xmlFile := TFileStream.Create( fileName, fmOpenRead ); | |
478 | + xmlFile := TMappedFile.Create( fileName ); | |
458 | 479 | |
459 | - try | |
460 | - XMLReadNode( xmlFile, IXMLNode( doc ) ); | |
461 | - //XMLReadNode( xmlFile, IXMLNode( Result ) ); | |
462 | - finally | |
480 | + try | |
481 | + p := xmlFile.Memory; | |
482 | + XMLReadNode( p, p + xmlFile.Size, IXMLNode( doc ) ); | |
483 | + //XMLReadNode( xmlFile, IXMLNode( Result ) ); | |
484 | + finally | |
463 | 485 | xmlFile.Free; |
464 | - end; | |
486 | + end; | |
465 | 487 | |
466 | 488 | //Result := doc; |
467 | 489 |
@@ -156,9 +156,7 @@ var | ||
156 | 156 | Idx: Integer; |
157 | 157 | ATitle: string; |
158 | 158 | DownloadResult: Boolean; |
159 | - foundPos: Integer; | |
160 | 159 | boardPlugIn : TBoardPlugIn; |
161 | - listContent : string; | |
162 | 160 | lastContent : string; |
163 | 161 | logFile : TFileStream; |
164 | 162 | adjustMargin : Integer; |
@@ -1177,7 +1175,7 @@ end; | ||
1177 | 1175 | } |
1178 | 1176 | procedure TDownloadItem.SaveItemFile; |
1179 | 1177 | var |
1180 | - Body: TStringList; | |
1178 | + Body, oldBody: TStringList; | |
1181 | 1179 | Cnt: Integer; |
1182 | 1180 | OldCnt: Integer; |
1183 | 1181 | FileName: string; |
@@ -1186,11 +1184,11 @@ var | ||
1186 | 1184 | NewRes: Integer; |
1187 | 1185 | finish : Boolean; |
1188 | 1186 | loopCnt : Integer; |
1189 | - KokoTxt : string; | |
1190 | - KokoIdx : Integer; | |
1191 | - NewTxt : string; | |
1192 | - NewIdx : Integer; | |
1193 | - LastTxt : string; | |
1187 | +// KokoTxt : string; | |
1188 | +// KokoIdx : Integer; | |
1189 | +// NewTxt : string; | |
1190 | +// NewIdx : Integer; | |
1191 | +// LastTxt : string; | |
1194 | 1192 | LastIdx : Integer; |
1195 | 1193 | begin |
1196 | 1194 | FileName := ThreadItem.GetThreadFileName; |
@@ -1208,10 +1206,6 @@ begin | ||
1208 | 1206 | try |
1209 | 1207 | // if FileExists(FileName) and (ResponseCode = 206) then begin |
1210 | 1208 | 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; | |
1215 | 1209 | loopCnt := 10; |
1216 | 1210 | repeat |
1217 | 1211 | finish := true; |
@@ -1224,53 +1218,55 @@ begin | ||
1224 | 1218 | except |
1225 | 1219 | on E:EFOpenError do begin |
1226 | 1220 | sleep(10); |
1227 | - finish := false; | |
1228 | 1221 | Dec(loopCnt); |
1222 | + if loopCnt > 0 then | |
1223 | + finish := false; | |
1229 | 1224 | end; |
1230 | 1225 | end; |
1231 | - until finish and ( loopCnt > 0 ); | |
1226 | + until finish; | |
1232 | 1227 | //Cnt := Body.Count; |
1233 | 1228 | end else begin |
1234 | 1229 | if IsAbone then begin |
1235 | 1230 | // Ú[ñðoµ½Ìű±ÜÅÇñ¾ÆV XÔ̯Ȩµ |
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); | |
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; | |
1246 | 1247 | 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; | |
1247 | 1254 | 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; | |
1256 | 1255 | |
1257 | - Body.Text := Content; | |
1258 | - Body.Find( LastTxt, LastIdx ); | |
1259 | - OldCnt := LastIdx + 1; | |
1260 | - NewRes := Body.Count - OldCnt; | |
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 | 1261 | |
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; | |
1262 | + if OldCnt >= Body.Count then OldCnt := Body.Count - 1; | |
1263 | + NewRes := Body.Count - OldCnt; | |
1264 | + | |
1265 | + | |
1266 | + finally | |
1267 | + oldBody.Free; | |
1273 | 1268 | end; |
1269 | + | |
1274 | 1270 | end else begin |
1275 | 1271 | Body.Text := Content; |
1276 | 1272 | //ThreadItem.Count := 0; |
@@ -1303,8 +1299,10 @@ begin | ||
1303 | 1299 | ThreadItem.AllResCount := ThreadItem.Count; |
1304 | 1300 | ThreadItem.IsLogFile := True; |
1305 | 1301 | ThreadItem.RoundDate := Now; |
1306 | - ThreadItem.UnRead := True; | |
1307 | - ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1; | |
1302 | + if not ThreadItem.UnRead then begin | |
1303 | + ThreadItem.UnRead := True; | |
1304 | + ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1; | |
1305 | + end; | |
1308 | 1306 | // if ThreadItem.RoundNo = 6 then |
1309 | 1307 | // ThreadItem.RoundNo := 0; |
1310 | 1308 |
@@ -1,6 +1,6 @@ | ||
1 | 1 | object KuroutOption: TKuroutOption |
2 | - Left = 260 | |
3 | - Top = 167 | |
2 | + Left = 43 | |
3 | + Top = 114 | |
4 | 4 | Width = 525 |
5 | 5 | Height = 457 |
6 | 6 | Caption = #35443#32048#35373#23450 |
@@ -140,6 +140,182 @@ 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 | |
143 | 319 | end |
144 | 320 | end |
145 | 321 | object OkBotton: TButton |
@@ -8,35 +8,67 @@ 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 | - procedure OkBottonClick(Sender: TObject); | |
32 | - procedure FormCreate(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 | + 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); | |
33 | 63 | private |
34 | - { Private é¾ } | |
64 | + { Private é¾ } | |
35 | 65 | procedure SetValue; |
36 | 66 | procedure SaveSetting; |
37 | 67 | procedure RecvBufferSizeExit(Sender: TObject); |
38 | 68 | procedure PostTimeEditExit(Sender: TObject); |
39 | 69 | procedure PostTimeCheckBoxClick(Sender: TObject); |
70 | + procedure SetColumnData(); | |
71 | + procedure PostColumnData(); | |
40 | 72 | public |
41 | 73 | { Public é¾ } |
42 | 74 | end; |
@@ -46,6 +78,9 @@ var | ||
46 | 78 | |
47 | 79 | implementation |
48 | 80 | |
81 | +uses | |
82 | + Giko, Setting; | |
83 | + | |
49 | 84 | {$R *.dfm} |
50 | 85 | |
51 | 86 | procedure TKuroutOption.SetValue; |
@@ -64,6 +99,10 @@ begin | ||
64 | 99 | PutPostTimeRadioButton.Checked := True |
65 | 100 | else |
66 | 101 | BackPostTimeRadioButton.Checked := True; |
102 | + | |
103 | + SetColumnData(); | |
104 | + | |
105 | + PageControl1.ActivePageIndex := GikoSys.Setting.KuroutSettingTabIndex; | |
67 | 106 | end; |
68 | 107 | |
69 | 108 | procedure TKuroutOption.SaveSetting; |
@@ -81,6 +120,10 @@ begin | ||
81 | 120 | else |
82 | 121 | GikoSys.Setting.TimeAdjustSec := 0; |
83 | 122 | GikoSys.Setting.TimeAdjust := PutPostTimeRadioButton.Checked; |
123 | + | |
124 | + GikoSys.Setting.GengoSupport := GengoSupport.Checked; | |
125 | + | |
126 | + GikoSys.Setting.KuroutSettingTabIndex := PageControl1.ActivePageIndex; | |
84 | 127 | end; |
85 | 128 | |
86 | 129 | procedure TKuroutOption.RecvBufferSizeExit(Sender: TObject); |
@@ -109,6 +152,7 @@ procedure TKuroutOption.OkBottonClick(Sender: TObject); | ||
109 | 152 | begin |
110 | 153 | RecvBufferSizeExit(Sender); |
111 | 154 | PostTimeEditExit(Sender); |
155 | + PostColumnData(); | |
112 | 156 | SaveSetting; |
113 | 157 | end; |
114 | 158 |
@@ -118,5 +162,191 @@ begin | ||
118 | 162 | PostTimeCheckBoxClick(Sender); |
119 | 163 | |
120 | 164 | end; |
165 | +procedure TKuroutOption.SetColumnData(); | |
166 | +var | |
167 | + i, j : Integer; | |
168 | + flag : Boolean; | |
169 | +begin | |
170 | + | |
171 | + //===== ÂXg ===== | |
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 | + //===== XXg ===== | |
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 | + //===== ÂXg ===== | |
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 | + //===== XXg ===== | |
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 | + //XêÌ`æÌXV | |
349 | + GikoForm.SetActiveList(GikoForm.ActiveList); | |
350 | +end; | |
121 | 351 | |
122 | 352 | end. |
@@ -1,6 +1,6 @@ | ||
1 | 1 | object OptionDialog: TOptionDialog |
2 | - Left = 410 | |
3 | - Top = 236 | |
2 | + Left = 188 | |
3 | + Top = 128 | |
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 = ThreadSheet | |
63 | + ActivePage = TabSheet3 | |
64 | 64 | MultiLine = True |
65 | - TabIndex = 4 | |
65 | + TabIndex = 3 | |
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 = 0 | |
255 | + ItemHeight = 12 | |
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 = 64 | |
657 | + Height = 41 | |
658 | 658 | Caption = #34920#31034#35373#23450 |
659 | 659 | TabOrder = 0 |
660 | 660 | object ThreadListIconCheckBox: TCheckBox |
@@ -665,18 +665,10 @@ 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 | |
676 | 668 | end |
677 | 669 | object GroupBox16: TGroupBox |
678 | 670 | Left = 12 |
679 | - Top = 76 | |
671 | + Top = 52 | |
680 | 672 | Width = 477 |
681 | 673 | Height = 64 |
682 | 674 | Caption = #12473#12524#20316#25104#26085#26178#34920#31034#35373#23450 |
@@ -700,7 +692,7 @@ object OptionDialog: TOptionDialog | ||
700 | 692 | end |
701 | 693 | object GroupBox5: TGroupBox |
702 | 694 | Left = 12 |
703 | - Top = 145 | |
695 | + Top = 121 | |
704 | 696 | Width = 477 |
705 | 697 | Height = 86 |
706 | 698 | Caption = #12502#12521#12454#12470#12398#26368#22823#21270 |
@@ -728,7 +720,7 @@ object OptionDialog: TOptionDialog | ||
728 | 720 | end |
729 | 721 | object GroupBox17: TGroupBox |
730 | 722 | Left = 12 |
731 | - Top = 236 | |
723 | + Top = 212 | |
732 | 724 | Width = 477 |
733 | 725 | Height = 63 |
734 | 726 | Caption = #12502#12521#12454#12470#12479#12502#38750#34920#31034#26178#35373#23450 |
@@ -766,9 +758,9 @@ object OptionDialog: TOptionDialog | ||
766 | 758 | end |
767 | 759 | object GroupBox18: TGroupBox |
768 | 760 | Left = 12 |
769 | - Top = 302 | |
761 | + Top = 278 | |
770 | 762 | Width = 477 |
771 | - Height = 41 | |
763 | + Height = 43 | |
772 | 764 | Caption = 'dat'#33853#12385#12473#12524#12477#12540#12488#38918 |
773 | 765 | TabOrder = 4 |
774 | 766 | object DatOchiSortCombo: TComboBox |
@@ -786,7 +778,9 @@ object OptionDialog: TOptionDialog | ||
786 | 778 | #21462#24471#26085#26178'('#26119#38918')' |
787 | 779 | #21462#24471#26085#26178'('#38477#38918')' |
788 | 780 | #12473#12524#20316#25104#26085#26178'('#26119#38918')' |
789 | - #12473#12524#20316#25104#26085#26178'('#38477#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) | |
790 | 784 | end |
791 | 785 | end |
792 | 786 | end |
@@ -90,7 +90,6 @@ type | ||
90 | 90 | TabSheet3: TTabSheet; |
91 | 91 | GroupBox9: TGroupBox; |
92 | 92 | ThreadListIconCheckBox: TCheckBox; |
93 | - NonAcquiredCountCheckBox: TCheckBox; | |
94 | 93 | GroupBox16: TGroupBox; |
95 | 94 | CreationTimeLogsCheckBox: TCheckBox; |
96 | 95 | FutureThreadCheckBox: TCheckBox; |
@@ -766,28 +765,32 @@ begin | ||
766 | 765 | |
767 | 766 | //XbhêXVACR |
768 | 767 | ThreadListIconCheckBox.Checked := GikoSys.Setting.ListIconVisible; |
769 | - NonAcquiredCountCheckBox.Checked := GikoSys.Setting.NonAcquiredCount; | |
770 | 768 | CreationTimeLogsCheckBox.Checked := GikoSys.Setting.CreationTimeLogs; |
771 | 769 | FutureThreadCheckBox.Checked := GikoSys.Setting.FutureThread; |
772 | 770 | SelectIntervalEdit.Text := IntToStr(GikoSys.Setting.SelectInterval); |
773 | 771 | |
774 | 772 | //dat¿X\[g |
775 | - case GikoSys.Setting.DatOchiSortIndex of | |
776 | - 0: | |
773 | + case TGikoBoardColumnID( GikoSys.Setting.DatOchiSortIndex ) of | |
774 | + gbcTitle: | |
777 | 775 | if GikoSys.Setting.DatOchiSortOrder then |
778 | 776 | DatOchiSortCombo.ItemIndex := 1 |
779 | 777 | else |
780 | 778 | DatOchiSortCombo.ItemIndex := 2; |
781 | - 6: | |
779 | + gbcRoundDate://gbcLastModified: | |
782 | 780 | if GikoSys.Setting.DatOchiSortOrder then |
783 | 781 | DatOchiSortCombo.ItemIndex := 3 |
784 | 782 | else |
785 | 783 | DatOchiSortCombo.ItemIndex := 4; |
786 | - 7: | |
784 | + gbcCreated: | |
787 | 785 | if GikoSys.Setting.DatOchiSortOrder then |
788 | 786 | DatOchiSortCombo.ItemIndex := 5 |
789 | 787 | else |
790 | 788 | DatOchiSortCombo.ItemIndex := 6; |
789 | + gbcLastModified: | |
790 | + if GikoSys.Setting.DatOchiSortOrder then | |
791 | + DatOchiSortCombo.ItemIndex := 7 | |
792 | + else | |
793 | + DatOchiSortCombo.ItemIndex := 8; | |
791 | 794 | else |
792 | 795 | DatOchiSortCombo.ItemIndex := 0; |
793 | 796 | end; |
@@ -802,7 +805,6 @@ begin | ||
802 | 805 | |
803 | 806 | //TabAutoLoad |
804 | 807 | TabLoadSave.Checked := Gikosys.Setting.TabAutoLoadSave; |
805 | - | |
806 | 808 | end; |
807 | 809 | |
808 | 810 | procedure TOptionDialog.SaveSetting; |
@@ -995,11 +997,6 @@ begin | ||
995 | 997 | //XbhêXVACR |
996 | 998 | GikoSys.Setting.ListIconVisible := ThreadListIconCheckBox.Checked; |
997 | 999 | |
998 | - //æ¾A¢æ¾ | |
999 | - if (GikoSys.Setting.NonAcquiredCount <> NonAcquiredCountCheckBox.Checked) and (GikoForm.ActiveList Is TBoard) then | |
1000 | - FRepaintList := true; | |
1001 | - GikoSys.Setting.NonAcquiredCount := NonAcquiredCountCheckBox.Checked; | |
1002 | - | |
1003 | 1000 | GikoSys.Setting.CreationTimeLogs := CreationTimeLogsCheckBox.Checked; |
1004 | 1001 | GikoSys.Setting.FutureThread := FutureThreadCheckBox.Checked; |
1005 | 1002 | if StrToIntDef(SelectIntervalEdit.Text, 110) > 55 then |
@@ -1012,28 +1009,36 @@ begin | ||
1012 | 1009 | 0: GikoSys.Setting.DatOchiSortIndex := -1; //ÀÑÖ¦µÈ¢ |
1013 | 1010 | 1: begin //XÔ(¸) |
1014 | 1011 | GikoSys.Setting.DatOchiSortOrder := true; |
1015 | - GikoSys.Setting.DatOchiSortIndex := 0; | |
1012 | + GikoSys.Setting.DatOchiSortIndex := Ord( gbcTitle ); | |
1016 | 1013 | end; |
1017 | 1014 | 2: begin //XÔ(~) |
1018 | 1015 | GikoSys.Setting.DatOchiSortOrder := false; |
1019 | - GikoSys.Setting.DatOchiSortIndex := 0; | |
1016 | + GikoSys.Setting.DatOchiSortIndex := Ord( gbcTitle ); | |
1020 | 1017 | end; |
1021 | 1018 | 3: begin //æ¾ú(¸) |
1022 | 1019 | GikoSys.Setting.DatOchiSortOrder := true; |
1023 | - GikoSys.Setting.DatOchiSortIndex := 6; | |
1020 | + GikoSys.Setting.DatOchiSortIndex := Ord( gbcRoundDate );{gbcLastModified} | |
1024 | 1021 | end; |
1025 | 1022 | 4: begin //æ¾ú(~) |
1026 | 1023 | GikoSys.Setting.DatOchiSortOrder := false; |
1027 | - GikoSys.Setting.DatOchiSortIndex := 6; | |
1024 | + GikoSys.Setting.DatOchiSortIndex := Ord( gbcRoundDate );{gbcLastModified} | |
1028 | 1025 | end; |
1029 | 1026 | 5: begin //Xì¬ú(¸) |
1030 | 1027 | GikoSys.Setting.DatOchiSortOrder := true; |
1031 | - GikoSys.Setting.DatOchiSortIndex := 7; | |
1028 | + GikoSys.Setting.DatOchiSortIndex := Ord( gbcCreated ); | |
1032 | 1029 | end; |
1033 | 1030 | 6: begin //Xì¬ú(~) |
1034 | 1031 | GikoSys.Setting.DatOchiSortOrder := false; |
1035 | - GikoSys.Setting.DatOchiSortIndex := 7; | |
1032 | + GikoSys.Setting.DatOchiSortIndex := Ord( gbcCreated ); | |
1036 | 1033 | end; |
1034 | + 7: begin //XÅIXVúi¸j | |
1035 | + GikoSys.Setting.DatOchiSortOrder := true; | |
1036 | + GikoSys.Setting.DatOchiSortIndex := Ord( gbcLastModified );{gbcLastModified} | |
1037 | + end; | |
1038 | + 8: begin //XÅIXVúi~j | |
1039 | + GikoSys.Setting.DatOchiSortOrder := false; | |
1040 | + GikoSys.Setting.DatOchiSortIndex := Ord( gbcLastModified );{gbcLastModified} | |
1041 | + end; | |
1037 | 1042 | end; |
1038 | 1043 | |
1039 | 1044 | GikoSys.Setting.WriteSystemSettingFile; |
@@ -55,6 +55,62 @@ type | ||
55 | 55 | /// Xbhê\¦ÍÍ |
56 | 56 | TGikoThreadRange = (gtrAll, gtrSelect, gtrLog, gtrNew); |
57 | 57 | |
58 | + /// JeSXgÌJ ID | |
59 | + type TGikoBBSColumnID = (gbbscTitle); | |
60 | + /// JeSXgÌJ¼ | |
61 | + const GikoBBSColumnCaption : array[0..0] of string = | |
62 | + ( 'JeS¼' ); | |
63 | + /// JeSXgJzñ | |
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 | + /// ÂXgÌJ ID | |
75 | + type TGikoCategoryColumnID = (gccTitle, gccRoundName, gccLastModified); | |
76 | + /// ÂXgÌJ¼ | |
77 | + const GikoCategoryColumnCaption : array[0..2] of string = | |
78 | + ( '¼', 'ñ\ñ', 'æ¾ú' ); | |
79 | + /// ÂXgJzñ | |
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 | + /// XXgÌJ ID | |
91 | + type TGikoBoardColumnID = (gbcTitle, gbcAllCount, gbcLocalCount, gbcNonAcqCount, | |
92 | + gbcNewCount, gbcUnReadCount, gbcRoundName, gbcRoundDate, gbcCreated, gbcLastModified );{gbcLastModified,} | |
93 | + /// XXgÌJ¼ | |
94 | + const GikoBoardColumnCaption : array[0..9] of string = | |
95 | + ( 'Xbh¼', 'JEg', 'æ¾', '¢æ¾', 'V ', | |
96 | + '¢Ç', 'ñ\ñ', 'æ¾ú', 'Xì¬ú', 'ÅIXVú' ); | |
97 | + const GikoBoardColumnAlignment : array[0..9] of TAlignment = ( | |
98 | + taLeftJustify, taRightJustify, taRightJustify, taRightJustify, | |
99 | + taRightJustify, taRightJustify, taLeftJustify, taLeftJustify, | |
100 | + taLeftJustify, taLeftJustify); | |
101 | + /// XXgJzñ | |
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 | |
58 | 114 | //CoolBarÝèR[h |
59 | 115 | TCoolSet = record |
60 | 116 | FCoolID: Integer; |
@@ -215,8 +271,15 @@ type | ||
215 | 271 | |
216 | 272 | //XgJwb_[TCY |
217 | 273 | FBBSColumnWidth: array[0..0] of Integer; |
218 | - FCategoryColumnWidth: array[0..3] of Integer; | |
219 | - FBoardColumnWidth: array[0..7] of Integer; | |
274 | + FCategoryColumnWidth: array[0..2] of Integer; | |
275 | + FBoardColumnWidth: array[0..9] of Integer; | |
276 | + | |
277 | + /// JeSXgJ | |
278 | + FBBSColumnOrder : TGikoBBSColumnList; | |
279 | + /// ÂXgJ | |
280 | + FCategoryColumnOrder : TGikoCategoryColumnList; | |
281 | + /// XXgJ | |
282 | + FBoardColumnOrder : TGikoBoardColumnList; | |
220 | 283 | |
221 | 284 | //\[g |
222 | 285 | FBBSSortIndex: Integer; |
@@ -283,8 +346,6 @@ type | ||
283 | 346 | |
284 | 347 | //XbhêXVACR\¦ |
285 | 348 | FListIconVisible: Boolean; |
286 | - //æ¾ÅÍÈ¢æ¾ð\¦·é | |
287 | - FNonAcquiredCount: Boolean; | |
288 | 349 | |
289 | 350 | //XbhêÅLogÌ éXbhÌÝXì¬úð\¦·é© |
290 | 351 | FCreationTimeLogs: Boolean; |
@@ -329,12 +390,19 @@ type | ||
329 | 390 | |
330 | 391 | //Tab©®Û¶ |
331 | 392 | FTabAutoLoadSave : Boolean; |
393 | + | |
394 | + //É¿áñêÄàT|[g@\ | |
395 | + F2chSupport : Boolean; | |
396 | + | |
332 | 397 | // GfB^ |
333 | 398 | FSpaceToNBSP : Boolean; ///< ¼pXy[XATab ð Éu· |
334 | 399 | FAmpToCharRef : Boolean; ///< '&' ð & Éu· |
335 | 400 | |
336 | 401 | //uEU^uñ\¦ÌÌXêÅÌJ[\L[ڮ̳½Ô |
337 | 402 | FSelectInterval : Integer; |
403 | + | |
404 | + //KuroutSettingTab Ú×Ýè^uÌActiveTab | |
405 | + FKuroutSettingTabIndex: Integer; | |
338 | 406 | |
339 | 407 | function GetMainCoolSet(Index: Integer): TCoolSet; |
340 | 408 | function GetBoardCoolSet(Index: Integer): TCoolSet; |
@@ -526,6 +594,10 @@ type | ||
526 | 594 | property CategoryColumnWidth[index: Integer]: Integer read GetCategoryColumnWidth write SetCategoryColumnWidth; |
527 | 595 | property BoardColumnWidth[index: Integer]: Integer read GetBoardColumnWidth write SetBoardColumnWidth; |
528 | 596 | |
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 | + | |
529 | 601 | property SoundName[index: Integer]: string read GetSoundName; |
530 | 602 | property SoundViewName[index: Integer]: string read GetSoundViewName; |
531 | 603 | property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName; |
@@ -576,7 +648,6 @@ type | ||
576 | 648 | property BrowserAutoMaximize: TGikoBrowserAutoMaximize read FBrowserAutoMaximize write FBrowserAutoMaximize; |
577 | 649 | |
578 | 650 | property ListIconVisible: Boolean read FListIconVisible write FListIconVisible; |
579 | - property NonAcquiredCount: Boolean read FNonAcquiredCount write FNonAcquiredCount; | |
580 | 651 | property CreationTimeLogs: Boolean read FCreationTimeLogs write FCreationTimeLogs; |
581 | 652 | property FutureThread: Boolean read FFutureThread write FFutureThread; |
582 | 653 |
@@ -614,8 +685,10 @@ type | ||
614 | 685 | property AmpToCharRef : Boolean read FAmpToCharRef write FAmpToCharRef; |
615 | 686 | |
616 | 687 | property SelectInterval : Integer read FSelectInterval write FSelectInterval; |
617 | - //TabÛ¶ | |
618 | - property TabAutoLoadSave: Boolean read FTabAutoLoadSave write FTabAutoLoadSave; | |
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; | |
619 | 692 | end; |
620 | 693 | |
621 | 694 |
@@ -654,6 +727,81 @@ var | ||
654 | 727 | (Name: 'ResEnd'; ViewName: 'XM®¹'; FileName: ''), |
655 | 728 | (Name: 'Error'; ViewName: 'G['; FileName: '')); |
656 | 729 | |
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 | + | |
657 | 805 | //RXgN^ |
658 | 806 | constructor TSetting.Create(); |
659 | 807 | begin |
@@ -661,6 +809,9 @@ begin | ||
661 | 809 | FMailList := TStringList.Create; |
662 | 810 | FSelectTextList := TStringList.Create; |
663 | 811 | FBoardURLs := TStringList.Create; |
812 | + FBBSColumnOrder := TGikoBBSColumnList.Create; | |
813 | + FCategoryColumnOrder := TGikoCategoryColumnList.Create; | |
814 | + FBoardColumnOrder := TGikoBoardColumnList.Create; | |
664 | 815 | FNameList.Duplicates := dupIgnore; |
665 | 816 | FMailList.Duplicates := dupIgnore; |
666 | 817 | FBoardURLs.Duplicates := dupIgnore; |
@@ -673,6 +824,9 @@ end; | ||
673 | 824 | destructor TSetting.Destroy(); |
674 | 825 | begin |
675 | 826 | inherited; |
827 | + FBoardColumnOrder.Free; | |
828 | + FCategoryColumnOrder.Free; | |
829 | + FBBSColumnOrder.Free; | |
676 | 830 | FSelectTextList.Free; |
677 | 831 | FBoardURLs.Free; |
678 | 832 | FMailList.Free; |
@@ -695,16 +849,17 @@ end; | ||
695 | 849 | procedure TSetting.ReadSettingFile(); |
696 | 850 | const |
697 | 851 | DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140); |
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); | |
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); | |
700 | 854 | MAX_WIDTH: Integer = 2000; |
701 | 855 | var |
702 | 856 | ini: TMemIniFile; |
703 | 857 | i: Integer; |
858 | + id, code : Integer; | |
704 | 859 | wkList: TStringList; |
705 | 860 | wkStr: string; |
706 | 861 | Exists: Boolean; |
707 | - s: string; | |
862 | + s: string; | |
708 | 863 | // id: Integer; |
709 | 864 | CoolSet: TCoolSet; |
710 | 865 | begin |
@@ -851,7 +1006,7 @@ begin | ||
851 | 1006 | wkList.Free; |
852 | 1007 | end; |
853 | 1008 | |
854 | - //XgJ | |
1009 | + // XgJ | |
855 | 1010 | wkList := TStringList.Create; |
856 | 1011 | try |
857 | 1012 | ini.ReadSection('BBSColumnWidth', wkList); |
@@ -885,6 +1040,51 @@ begin | ||
885 | 1040 | wkList.Free; |
886 | 1041 | end; |
887 | 1042 | |
1043 | + // JeSXgJ | |
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 | + | |
888 | 1088 | //XgÔ |
889 | 1089 | FListViewNo := ini.ReadBool('Function', 'ListViewNo', True); |
890 | 1090 | //CSS |
@@ -958,7 +1158,6 @@ begin | ||
958 | 1158 | |
959 | 1159 | //XbhêXVACR |
960 | 1160 | FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True); |
961 | - FNonAcquiredCount := ini.ReadBool('ThreadList', 'NonAcquiredCount', False); | |
962 | 1161 | FCreationTimeLogs := ini.ReadBool('ThreadList', 'CreationTimeLogs', True); |
963 | 1162 | FFutureThread := ini.ReadBool('ThreadList', 'FutureThread', True); |
964 | 1163 | FSelectInterval := ini.ReadInteger('ThreadList', 'SelectInterval', 110); |
@@ -1024,11 +1223,13 @@ begin | ||
1024 | 1223 | FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false); |
1025 | 1224 | |
1026 | 1225 | // GfB^ |
1027 | - FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', True ); | |
1226 | + FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', False ); | |
1028 | 1227 | FAmpToCharRef := ini.ReadBool( 'Editor', 'AmpToCharRef', False ); |
1029 | 1228 | |
1030 | - //Tab©®Û¶AÇÝÝ | |
1031 | - FTabAutoLoadSave := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False); | |
1229 | + //Tab©®Û¶AÇÝÝ | |
1230 | + FTabAutoLoadSave := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False); | |
1231 | + | |
1232 | + FKuroutSettingTabIndex := ini.ReadInteger('OptionDialog', 'KuroutTabIndex' , 0); | |
1032 | 1233 | |
1033 | 1234 | |
1034 | 1235 | finally |
@@ -1129,6 +1330,7 @@ var | ||
1129 | 1330 | i: Integer; |
1130 | 1331 | ini: TMemIniFile; |
1131 | 1332 | CoolSet: TCoolSet; |
1333 | + wkList : TStringList; | |
1132 | 1334 | begin |
1133 | 1335 | ini := TMemIniFile.Create(GetFileName()); |
1134 | 1336 | try |
@@ -1250,11 +1452,11 @@ begin | ||
1250 | 1452 | ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible); |
1251 | 1453 | ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize)); |
1252 | 1454 | ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait); |
1253 | - ini.WriteInteger('Browser', 'AutoMaximize', Ord( FBrowserAutoMaximize ) ); | |
1455 | + | |
1456 | + ini.WriteInteger('Window', 'BrowserAutoMaximize', Ord( BrowserAutoMaximize ) ); | |
1254 | 1457 | |
1255 | 1458 | //XbhêXVACR |
1256 | 1459 | ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible); |
1257 | - ini.WriteBool('ThreadList', 'NonAcquiredCount', FNonAcquiredCount); | |
1258 | 1460 | ini.WriteBool('ThreadList', 'CreationTimeLogs',FCreationTimeLogs); |
1259 | 1461 | ini.WriteBool('ThreadList', 'FutureThread', FFutureThread); |
1260 | 1462 | ini.WriteInteger('ThreadList', 'SelectInterval', FSelectInterval); |
@@ -1273,7 +1475,7 @@ begin | ||
1273 | 1475 | ini.WriteInteger('PostTime', 'TimeAdjustSec', FTimeAdjustSec); |
1274 | 1476 | ini.WriteBool('PostTime', 'TimeAdjust', FTimeAdjust); |
1275 | 1477 | |
1276 | - //XgJ | |
1478 | + // XgJ | |
1277 | 1479 | for i := 0 to Length(FBBSColumnWidth) - 1 do begin |
1278 | 1480 | ini.WriteInteger('BBSColumnWidth', 'ID' + IntToStr(i), FBBSColumnWidth[i]); |
1279 | 1481 | end; |
@@ -1284,6 +1486,32 @@ begin | ||
1284 | 1486 | ini.WriteInteger('BoardColumnWidth', 'ID' + IntToStr(i), FBoardColumnWidth[i]); |
1285 | 1487 | end; |
1286 | 1488 | |
1489 | + wkList := TStringList.Create; | |
1490 | + try | |
1491 | + // JeSXg | |
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 | + // ÂXg | |
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 | + // XXg | |
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 | + | |
1287 | 1515 | //TEh |
1288 | 1516 | for i := 0 to GetSoundCount - 1 do begin |
1289 | 1517 | if not FileExists(SoundFileName[i]) then |
@@ -1327,9 +1555,15 @@ begin | ||
1327 | 1555 | ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP ); |
1328 | 1556 | ini.WriteBool( 'Editor', 'AmpToCharRef', FAmpToCharRef ); |
1329 | 1557 | |
1330 | - ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave); | |
1558 | + //^u©®Û¶ | |
1559 | + ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave); | |
1560 | + //Ú×Ýè | |
1561 | + ini.WriteInteger('OptionDialog', 'KuroutTabIndex', FKuroutSettingTabIndex); | |
1331 | 1562 | |
1332 | - ini.UpdateFile; | |
1563 | + //É¿áñêÄà@\ | |
1564 | + ini.WriteBool('2chSupport', 'Support', F2chSupport); | |
1565 | + | |
1566 | + ini.UpdateFile; | |
1333 | 1567 | finally |
1334 | 1568 | ini.Free; |
1335 | 1569 | end; |
@@ -3,7 +3,8 @@ unit Sort; | ||
3 | 3 | interface |
4 | 4 | uses |
5 | 5 | Windows, Messages, SysUtils, Classes, Controls, Forms, |
6 | - BoardGroup,DateUtils; | |
6 | + BoardGroup,DateUtils, | |
7 | + Setting; | |
7 | 8 | |
8 | 9 | function CategorySortProc(Item1, Item2: Pointer): integer; |
9 | 10 | function BoardSortProc(List: TStringList; Item1, Item2: Integer): integer; |
@@ -16,7 +17,6 @@ var | ||
16 | 17 | SortOrder: Boolean; |
17 | 18 | SortIndex: Integer; |
18 | 19 | SortNoFlag: Boolean; |
19 | - SortNonAcquiredCountFlag: Boolean; | |
20 | 20 | |
21 | 21 | implementation |
22 | 22 |
@@ -28,10 +28,15 @@ begin | ||
28 | 28 | CategoryItem1 := TCategory(Item1); |
29 | 29 | CategoryItem2 := TCategory(Item2); |
30 | 30 | |
31 | - if SortNoFlag then | |
32 | - Result := CompareInt(CategoryItem1.No, CategoryItem2.No) | |
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); | |
33 | 37 | else |
34 | - Result := AnsiCompareText(CategoryItem1.Title, CategoryItem2.Title); | |
38 | + Result := CompareInt(CategoryItem1.No, CategoryItem2.No) | |
39 | + end; | |
35 | 40 | |
36 | 41 | if not SortOrder then |
37 | 42 | Result := Result * -1; |
@@ -44,15 +49,21 @@ var | ||
44 | 49 | begin |
45 | 50 | BoardItem1 := TBoard(List.Objects[Item1]); |
46 | 51 | BoardItem2 := TBoard(List.Objects[Item2]); |
47 | - if SortIndex = 0 then | |
52 | + case TGikoCategoryColumnID( SortIndex ) of | |
53 | + gccTitle: | |
48 | 54 | if SortNoFlag then |
49 | 55 | Result := CompareInt(BoardItem1.No, BoardItem2.No) |
50 | 56 | else |
51 | - Result := AnsiCompareText(BoardItem1.Title, BoardItem2.Title) | |
52 | - else if SortIndex = 1 then | |
53 | - Result := CompareInt(BoardItem1.Count, BoardItem2.Count) | |
54 | - else | |
57 | + Result := AnsiCompareText(BoardItem1.Title, BoardItem2.Title); | |
58 | + | |
59 | + gccRoundName: | |
60 | + Result := CompareInt(BoardItem1.Count, BoardItem2.Count); | |
61 | + | |
62 | + gccLastModified: | |
55 | 63 | Result := CompareDate(BoardItem1.RoundDate, BoardItem2.RoundDate); |
64 | + else | |
65 | + Result := CompareInt(BoardItem1.No, BoardItem2.No) | |
66 | + end; | |
56 | 67 | |
57 | 68 | if not SortOrder then |
58 | 69 | Result := Result * -1; |
@@ -65,34 +76,35 @@ var | ||
65 | 76 | begin |
66 | 77 | ThreadItem1 := TThreadItem(List.Objects[ Item1 ]); |
67 | 78 | ThreadItem2 := TThreadItem(List.Objects[ Item2 ]); |
68 | - case SortIndex of | |
69 | - 0: | |
79 | + case TGikoBoardColumnID( SortIndex ) of | |
80 | + gbcTitle: | |
70 | 81 | begin |
71 | 82 | if SortNoFlag then |
72 | 83 | Result := CompareInt(ThreadItem1.No, ThreadItem2.No) |
73 | 84 | else |
74 | 85 | Result := AnsiCompareText(ThreadItem1.Title, ThreadItem2.Title) |
75 | 86 | end; |
76 | - 1: Result := CompareInt(ThreadItem1.AllResCount, ThreadItem2.AllResCount); | |
77 | - 2: | |
87 | + | |
88 | + gbcAllCount: Result := CompareInt(ThreadItem1.AllResCount, ThreadItem2.AllResCount); | |
89 | + gbcLocalCount: Result := CompareInt(ThreadItem1.Count, ThreadItem2.Count); | |
90 | + gbcNonAcqCount: | |
78 | 91 | begin |
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 | |
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 | |
88 | 98 | else |
89 | - Result := CompareInt(ThreadItem1.Count, ThreadItem2.Count); | |
99 | + Result := 0; | |
90 | 100 | end; |
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); | |
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:} | |
96 | 108 | else |
97 | 109 | Result := 0; |
98 | 110 | end; |
@@ -9,7 +9,8 @@ interface | ||
9 | 9 | uses |
10 | 10 | //================================================== |
11 | 11 | |
12 | - Classes, SysUtils; | |
12 | + Classes, SysUtils, | |
13 | + Windows; | |
13 | 14 | |
14 | 15 | procedure ExtractHttpFields( |
15 | 16 | const chrSep : TSysCharSet; |
@@ -39,11 +40,61 @@ function MatchesMask( | ||
39 | 40 | const filename, mask : string |
40 | 41 | ) : boolean; |
41 | 42 | |
42 | -// ^LN^ð³K\»µ¢ÉÈçÈ¢æ¤Éu· | |
43 | +/// ^LN^ð³K\»µ¢ÉÈçÈ¢æ¤Éu· | |
43 | 44 | function RegExpEncode( |
44 | 45 | const text : string |
45 | 46 | ) : string; |
46 | 47 | |
48 | +{*! | |
49 | +\brief \¦bZ[WÌ®` | |
50 | +\param msg \¦·ébZ[W | |
51 | +\param elements u·Pê | |
52 | + | |
53 | +msg ÌÌu·³êéPêÍ '^Ô' Å\³êA | |
54 | +elements ÍüsÉæÁÄPꪯ³êÜ·B<br> | |
55 | + | |
56 | +<pre><code> | |
57 | +elements := IntToStr( 10 ) + #10 + 'hoge'; | |
58 | +m := MessageStyle( | |
59 | + '^0 ÂÌg^1hðu·µÜµ½B', | |
60 | + elements ); | |
61 | +</code></pre> | |
62 | + | |
63 | +Åoͳêé m Íu10 ÂÌghogehðu·µÜµ½BvÆÈèÜ·B | |
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 lª¨©µ¢ | |
77 | + EMappedFileModeError = class( Exception ); | |
78 | + /// }bsOɸs | |
79 | + EMappedFileMappingError = class( Exception ); | |
80 | + | |
81 | + /// }bvhEt@C NX | |
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 | + /// TCYÌæ¾ | |
93 | + property Size : Longword read FSize; | |
94 | + /// AhXÌæ¾ | |
95 | + property Memory : Pointer read FViewAddress; | |
96 | + end; | |
97 | + | |
47 | 98 | //================================================== |
48 | 99 | const |
49 | 100 | //================================================== |
@@ -53,6 +104,8 @@ const | ||
53 | 104 | implementation |
54 | 105 | //================================================== |
55 | 106 | |
107 | +uses MojuUtils; | |
108 | + | |
56 | 109 | // Æè ¦¸ÌãpiÈÌÅ chrWhite ðl¶µÄ¢È¢±ÆÉÓIII |
57 | 110 | procedure ExtractHttpFields( |
58 | 111 | const chrSep : TSysCharSet; |
@@ -367,4 +420,97 @@ begin | ||
367 | 420 | |
368 | 421 | end; |
369 | 422 | |
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 }bvht@CÌì¬ | |
459 | +\param filePath Jt@CÌpX | |
460 | +\param mode fmOpenRead (ftHg) Ü½Í 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( 't@CI[vÌ[hªs³Å·B' ); | |
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( 't@CÌI[vɸsµÜµ½B' ); | |
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( 't@CÌ}bsOɸsµÜµ½B' ); | |
500 | + | |
501 | + FViewAddress := MapViewOfFile( FMappingHandle, dwViewDesiredAccess, 0, 0, 0 ); | |
502 | + if FViewAddress = nil then | |
503 | + raise EMappedFileMappingError.Create( 't@CÌ}bsOɸsµÜµ½B' ); | |
504 | + | |
505 | +end; | |
506 | + | |
507 | +destructor TMappedFile.Destroy; | |
508 | +begin | |
509 | + | |
510 | + UnmapViewOfFile( FViewAddress ); | |
511 | + CloseHandle( FMappingHandle ); | |
512 | + CloseHandle( FFileHandle ); | |
513 | + | |
514 | +end; | |
515 | + | |
370 | 516 | end. |
@@ -1,4 +1,4 @@ | ||
1 | -¡MRir Version1.00 ÊÞÀ48 Readme.txt | |
1 | +¡MRir Version1.00 ÊÞÀ49 Readme.txt | |
2 | 2 | |
3 | 3 | |
4 | 4 | ------------------------------ |
@@ -41,7 +41,7 @@ | ||
41 | 41 | ------------------------------ |
42 | 42 | oOâv]ÍAMRirXbhÅó¯t¯Ä¨èÜ·B |
43 | 43 | MRirTCgFhttp://gikonavi.sourceforge.jp/ |
44 | -MRirXFhttp://pc5.2ch.net/test/read.cgi/software/1079685385/l50 | |
44 | +MRirXFhttp://pc5.2ch.net/test/read.cgi/software/1094289071/l50 | |
45 | 45 | |
46 | 46 | ------------------------------ |
47 | 47 | ]ÚÉ墀 |
@@ -89,6 +89,23 @@ Windows Server 2003 Enterprise Edition IE6 | ||
89 | 89 | ------------------------------ |
90 | 90 | ð |
91 | 91 | ------------------------------ |
92 | +2004/10/06 | |
93 | + Version ÊÞÀ49 | |
94 | + ¨CÉüèÌÇÝÝ̬»ÉæéN®ÔÌZk | |
95 | + StatusBarÉNG[ht@C̼OªoÈ¢sïÌC³ | |
96 | + uwèµ½ÔÌXÉòÔv@\ÇÁiL[ÝèÅAXbhJeSÌêÔÅãj | |
97 | + Oðíµ½ÛÉ¢ÇXbh (UnRead) Ì\¦ªXV³êÈ¢oOðC³ | |
98 | + ±±ÉX¾ÆAXGfB^[ÌV[gJbgL[ªÝè³êÈ¢sïÌC³ | |
99 | + Ú[ñÉRRÜÅÇñ¾ÆV Xð²®·éÌÉsïª Á½ÌÅC³ | |
100 | + XbhêÌ\¦JÌÝèªÅ«éæ¤ÉÈÁ½BuIvVv->uÚ×Ýèv->uÚ×Ýè2v | |
101 | + ftHgÅÌXAJ[|bvAbvªííÌ`®ÉÎ | |
102 | + R¿áñËéi8¿áñËéjðo^·éÆQ¿áñËé̪\¦³êésïÌðÁ | |
103 | + ¨CÉüèÅÒWÉXy[XL[üÍÌsïÌC³ | |
104 | + µ½çÎJBBSÌlivedoor.com->livedoor.jpÌÏXÉÎ | |
105 | + µ½çÎJBBSÌßOÉÖ·ésïÌC³ | |
106 | + XbhÌNÅXÔª éàÌð¥ñ¾Æ«ÉA»ÌXÔÜÅXN[·éæ¤Éµ½B | |
107 | + ^uÌÛ¶Å^uªOÌÆ«ÍAÛ¶µÈ¢æ¤Éµ½B | |
108 | + | |
92 | 109 | 2004/09/05 |
93 | 110 | Version ÊÞÀ48 |
94 | 111 | X|bvAbv Ú`ñLøɵĢÄàA§¾ Ú`ñð\¦·ésïÌðÁ |
@@ -77,13 +77,11 @@ 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\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\MRir.txt | |
86 | -83=Samba.default | |
80 | +77=config\BoardPlugIn\ShitarabaJBBSPlugIn.dll | |
81 | +78=config\Board\Ü¿BBS.txt | |
82 | +79=config\Board\µ½çÎJBBS.txt | |
83 | +80=config\Board\MRir.txt | |
84 | +81=Samba.default | |
87 | 85 | |
88 | 86 | [Group] |
89 | 87 | 1=MRir,gikoNavi.exe |
@@ -3,7 +3,7 @@ library ShitarabaJBBSPlugIn; | ||
3 | 3 | { |
4 | 4 | ShitarabaJBBSPlugIn |
5 | 5 | µ½çÎjbg |
6 | - $Id: ShitarabaJBBSPlugIn.dpr,v 1.30.2.1 2004/09/09 16:20:34 yoffy Exp $ | |
6 | + $Id: ShitarabaJBBSPlugIn.dpr,v 1.30.2.2 2004/10/08 05:44:53 yoffy 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(Path, Document : string) : TDownloadState; | |
36 | + function StorageDownload(AURL : 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,7 +281,8 @@ var | ||
281 | 281 | // i : Integer; |
282 | 282 | const |
283 | 283 | BBS_HOST_OLD = 'jbbs.shitaraba.com'; |
284 | - BBS_HOST = 'jbbs.livedoor.com'; | |
284 | + BBS_HOST_OLD2 = 'jbbs.livedoor.com'; | |
285 | + BBS_HOST = 'jbbs.livedoor.jp'; | |
285 | 286 | THREAD_MARK = '/bbs/read.cgi'; |
286 | 287 | begin |
287 | 288 |
@@ -290,7 +291,7 @@ begin | ||
290 | 291 | uri := TIdURI.Create( inURL ); |
291 | 292 | uriList := TStringList.Create; |
292 | 293 | try |
293 | - if uri.Host = BBS_HOST_OLD then | |
294 | + if (uri.Host = BBS_HOST_OLD) or (uri.Host = BBS_HOST_OLD2) then | |
294 | 295 | uri.Host := BBS_HOST; |
295 | 296 | |
296 | 297 | ExtractHttpFields( ['/'], [], uri.Path, uriList ); |
@@ -349,12 +350,13 @@ var | ||
349 | 350 | |
350 | 351 | found : Integer; |
351 | 352 | found2 : Integer; |
353 | + pos : Integer; | |
352 | 354 | board : string; |
353 | 355 | const |
354 | 356 | CATEGORY_INPUT = 'JeSðü͵ľ³¢'; |
355 | 357 | KEYWORD_INPUT = 'õ·é¼ðü͵ľ³¢'; |
356 | 358 | SAVEPATH_SELECT = 'Û¶·ét@C¼ðü͵ľ³¢'; |
357 | - BBS_HOST = 'http://jbbs.livedoor.com/'; | |
359 | + BBS_HOST = 'http://jbbs.livedoor.jp/'; | |
358 | 360 | label |
359 | 361 | NextBoard; |
360 | 362 | begin |
@@ -437,8 +439,12 @@ begin | ||
437 | 439 | |
438 | 440 | saveText.Add( board ); |
439 | 441 | NextBoard: |
440 | - found := AnsiPos( '<a ', downResult ); | |
442 | + found := AnsiPos( '<a ', downResult ); | |
441 | 443 | end; |
444 | + pos := saveText.IndexOf('JBBS=/'); | |
445 | + if pos > 0 then | |
446 | + saveText.Delete(pos); | |
447 | + | |
442 | 448 | saveText.SaveToFile( savepath ); |
443 | 449 | saveText.Free; |
444 | 450 | end else begin |
@@ -499,22 +505,14 @@ begin | ||
499 | 505 | uriList := TStringList.Create; |
500 | 506 | try |
501 | 507 | ExtractHttpFields( ['/', '?'], [], uri.Path, uriList ); |
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 //ßO | |
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; | |
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'; | |
516 | 515 | IsLogFile := FileExists( FilePath ); |
517 | - | |
518 | 516 | end; |
519 | 517 | finally |
520 | 518 | uri.Free; |
@@ -551,97 +549,109 @@ var | ||
551 | 549 | logStream : TFileStream; |
552 | 550 | uri : TIdURI; |
553 | 551 | uriList : TStringList; |
554 | - datURL : string; | |
555 | - tmpText: string; | |
552 | + datURL, tmpURL : string; | |
553 | + tmpText: string; | |
556 | 554 | begin |
557 | 555 | |
558 | 556 | Result := dsError; |
559 | 557 | |
560 | 558 | uri := TIdURI.Create( ReadURL ); |
561 | - if(( AnsiPos('.html', uri.Document) >0 ) and ( AnsiPos('/storage/', uri.Path) > 0 )) then begin | |
562 | - //ßO | |
563 | - Result := StorageDownload(uri.Path, uri.Document); | |
564 | - uri.Free; | |
565 | - end else begin | |
566 | - //»Ý¶«ÄéXbh | |
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 | - // DZÉÛ¶µÄ¢¢Ì©ª©çÈ¢ÌÅêt@CÉÛ¶ | |
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; | |
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 | + // DZÉÛ¶µÄ¢¢Ì©ª©çÈ¢ÌÅêt@CÉÛ¶ | |
567 | + FilePath := TemporaryFile; | |
568 | + FIsTemporary := True; | |
569 | + end else begin | |
570 | + FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat'; | |
571 | + FIsTemporary := False; | |
584 | 572 | end; |
573 | + finally | |
574 | + uri.Free; | |
575 | + uriList.Free; | |
576 | + end; | |
585 | 577 | |
586 | - // Û¶pÌfBNgð@é | |
587 | - ForceDirectoriesEx( Copy( FilePath, 1, LastDelimiter( '\', FilePath ) ) ); | |
578 | + // Û¶pÌfBNgð@é | |
579 | + ForceDirectoriesEx( Copy( FilePath, 1, LastDelimiter( '\', FilePath ) ) ); | |
588 | 580 | |
589 | - // Æ©É_E[hâtB^OðsíÈ¢êÍ | |
590 | - // InternalDownload ÉC¹é±Æªoé | |
591 | - modified := LastModified; | |
592 | - datURL := ReadURL + IntToStr( Count + 1 ) + '-'; // V ÌÝ | |
593 | - responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 ); | |
581 | + // Æ©É_E[hâtB^OðsíÈ¢êÍ | |
582 | + // InternalDownload ÉC¹é±Æªoé | |
583 | + modified := LastModified; | |
584 | + datURL := ReadURL + IntToStr( Count + 1 ) + '-'; // V ÌÝ | |
585 | + responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 ); | |
594 | 586 | |
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; | |
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; | |
613 | 605 | |
614 | - if Count = 0 then | |
615 | - // VK | |
616 | - Result := dsComplete | |
617 | - else | |
618 | - // ÇL | |
619 | - Result := dsDiffComplete; | |
606 | + if Count = 0 then | |
607 | + // VK | |
608 | + Result := dsComplete | |
609 | + else | |
610 | + // ÇL | |
611 | + Result := dsDiffComplete; | |
620 | 612 | |
621 | - Size := Size + Length( downResult.Text ); | |
622 | - // CGI ©çͳµ¢útª¾çêÈ¢ÌÅ»ÝÉÝè | |
623 | - LastModified := Now; | |
613 | + Size := Size + Length( downResult.Text ); | |
614 | + // CGI ©çͳµ¢útª¾çêÈ¢ÌÅ»ÝÉÝè | |
615 | + LastModified := Now; | |
624 | 616 | |
625 | 617 | |
626 | 618 | |
627 | - NewReceive := Count + 1; | |
628 | - Count := Count + downResult.Count; | |
629 | - NewResCount := downResult.Count; | |
619 | + NewReceive := Count + 1; | |
620 | + Count := Count + downResult.Count; | |
621 | + NewResCount := downResult.Count; | |
630 | 622 | |
631 | 623 | |
632 | 624 | |
633 | - end else begin | |
634 | - Result := dsNotModify; | |
635 | - end; | |
636 | - finally | |
637 | - downResult.Free; | |
625 | + end else begin | |
626 | + Result := dsNotModify; | |
638 | 627 | end; |
639 | - end else if responseCode = 304 then begin | |
640 | - Result := dsNotModify; | |
628 | + finally | |
629 | + downResult.Free; | |
641 | 630 | end; |
642 | - finally | |
643 | - DisposeResultString( tmp ); | |
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 | + //ßO | |
636 | + //tmpURL := URL; | |
637 | + if Assigned( InternalPrint ) then | |
638 | + InternalPrint( 'ßOqÉüè' ); | |
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; | |
644 | 652 | end; |
653 | + finally | |
654 | + DisposeResultString( tmp ); | |
645 | 655 | end; |
646 | 656 | |
647 | 657 | end; |
@@ -681,17 +691,16 @@ end; | ||
681 | 691 | // ßOpDownloadÖ |
682 | 692 | // ************************************************************************* |
683 | 693 | function TShitarabaThreadItem.StorageDownload( |
684 | - Path, Document : string | |
694 | + AURL : string | |
685 | 695 | ) : TDownloadState; |
686 | 696 | var |
687 | 697 | modified : Double; |
688 | 698 | tmp : PChar; |
699 | + uri : TIdURI; | |
700 | + uriList : TStringList; | |
689 | 701 | downResult : TStringList; |
690 | 702 | responseCode : Longint; |
691 | 703 | logStream : TFileStream; |
692 | - //uri : TIdURI; | |
693 | - //uriList : TStringList; | |
694 | - datURL : string; | |
695 | 704 | tmpText, tmpLine, tmpTitle: string; |
696 | 705 | tmpHTML: TStringList; |
697 | 706 |
@@ -700,23 +709,24 @@ var | ||
700 | 709 | begin |
701 | 710 | |
702 | 711 | Result := dsError; |
703 | - | |
704 | - //uri := TIdURI.Create( ReadURL ); | |
712 | + uri := TIdURI.Create( ReadURL ); | |
713 | + uriList := TStringList.Create; | |
705 | 714 | try |
706 | - FileName := Copy(Document, 1, Length(Document) - 5) + '.dat'; | |
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 | |
707 | 719 | if MyLogFolder = '' then begin |
708 | 720 | // DZÉÛ¶µÄ¢¢Ì©ª©çÈ¢ÌÅêt@CÉÛ¶ |
709 | 721 | FilePath := TemporaryFile; |
710 | 722 | FIsTemporary := True; |
711 | 723 | end else begin |
712 | - FilePath := MyLogFolder | |
713 | - + CustomStringReplace(CustomStringReplace(Path, '/storage', ''), '/', '\') | |
714 | - + FileName; | |
715 | - | |
724 | + FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat'; | |
716 | 725 | FIsTemporary := False; |
717 | 726 | end; |
718 | 727 | finally |
719 | - //uri.Free; | |
728 | + uri.Free; | |
729 | + uriList.Free; | |
720 | 730 | end; |
721 | 731 | |
722 | 732 | // Û¶pÌfBNgð@é |
@@ -728,8 +738,7 @@ begin | ||
728 | 738 | // InternalDownload ÉC¹é±Æªoé |
729 | 739 | modified := LastModified; |
730 | 740 | |
731 | - datURL := ReadURL; | |
732 | - responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 ); | |
741 | + responseCode := InternalDownload( PChar( AURL ), modified, tmp, 0 ); | |
733 | 742 | |
734 | 743 | try |
735 | 744 | if (responseCode = 200) or (responseCode = 206) then begin |
@@ -794,7 +803,7 @@ begin | ||
794 | 803 | end; |
795 | 804 | tmpHTML.Delete(i); |
796 | 805 | end; |
797 | - j := 0; | |
806 | + j := 0; | |
798 | 807 | for i := 0 to tmpHTML.Count - 1 do begin |
799 | 808 | tmpLine := AnsiLowerCase(tmpHTML[i]); |
800 | 809 | tS := AnsiPos('<dl>', tmpLine); |
@@ -915,31 +924,27 @@ begin | ||
915 | 924 | |
916 | 925 | if downResult.Count > 0 then begin |
917 | 926 | if FileExists( FilePath ) then |
918 | - logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite ) | |
919 | - else | |
920 | - logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite ); | |
927 | + DeleteFile(FilePath); | |
928 | + | |
929 | + logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite ); | |
921 | 930 | try |
922 | - logStream.Position := logStream.Size; | |
931 | + logStream.Position := 0; | |
923 | 932 | logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) ); |
924 | 933 | finally |
925 | 934 | logStream.Free; |
926 | 935 | end; |
927 | 936 | |
928 | - if Count = 0 then | |
929 | - // VK | |
930 | - Result := dsComplete | |
931 | - else | |
932 | - // ÇL | |
933 | - Result := dsDiffComplete; | |
937 | + // VK | |
938 | + Result := dsComplete; | |
934 | 939 | |
935 | - Size := Size + Length( downResult.Text ); | |
940 | + Size := Length( downResult.Text ); | |
936 | 941 | // CGI ©çͳµ¢útª¾çêÈ¢ÌÅ»ÝÉÝè |
937 | 942 | LastModified := Now; |
938 | 943 | |
939 | 944 | |
940 | 945 | |
941 | - NewReceive := Count + 1; | |
942 | - Count := Count + downResult.Count; | |
946 | + NewReceive := 1; | |
947 | + Count := downResult.Count; | |
943 | 948 | NewResCount := downResult.Count; |
944 | 949 | //http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1086710948/l100 |
945 | 950 | //http://jbbs.livedoor.com/game/1578/storage/1086710948.html |
@@ -1144,7 +1149,8 @@ var | ||
1144 | 1149 | tmphost: String; |
1145 | 1150 | const |
1146 | 1151 | BBS_HOST_OLD = 'jbbs.shitaraba.com'; |
1147 | - BBS_HOST = 'jbbs.livedoor.com'; | |
1152 | + BBS_HOST_OLD2 = 'jbbs.livedoor.com'; | |
1153 | + BBS_HOST = 'jbbs.livedoor.jp'; | |
1148 | 1154 | begin |
1149 | 1155 | |
1150 | 1156 | uri := TIdURI.Create( ReadURL ); |
@@ -1154,22 +1160,15 @@ begin | ||
1154 | 1160 | |
1155 | 1161 | tmphost := uri.Host; |
1156 | 1162 | |
1157 | - if tmphost = BBS_HOST_OLD then | |
1163 | + if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1158 | 1164 | tmphost := BBS_HOST; |
1159 | 1165 | |
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 | - | |
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 ] + '/' ); | |
1173 | 1172 | finally |
1174 | 1173 | uri.Free; |
1175 | 1174 | uriList.Free; |
@@ -1219,7 +1218,8 @@ var | ||
1219 | 1218 | dir, tmphost : string; |
1220 | 1219 | const |
1221 | 1220 | BBS_HOST_OLD = 'jbbs.shitaraba.com'; |
1222 | - BBS_HOST = 'jbbs.livedoor.com'; | |
1221 | + BBS_HOST_OLD2 = 'jbbs.livedoor.com'; | |
1222 | + BBS_HOST = 'jbbs.livedoor.jp'; | |
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 then | |
1235 | + if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) 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 then | |
1257 | + if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1258 | 1258 | tmphost := BBS_HOST; |
1259 | 1259 | |
1260 | 1260 | if( AnsiPos(THREAD_MARK, URL) > 0) and (uriList.Count > 5) then begin |
@@ -1265,7 +1265,8 @@ begin | ||
1265 | 1265 | end else if AnsiPos(THREAD_MARK, URL) = 0 then begin |
1266 | 1266 | //RRÅßO©Ç¤©`FbNH |
1267 | 1267 | if(AnsiPos('.html/', uri.Path) > 0) then begin |
1268 | - Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1); | |
1268 | + Result := uri.Protocol + '://' + tmphost + THREAD_MARK + | |
1269 | + CustomStringReplace(CustomStringReplace(uri.Path, '/storage', ''), '.html/', '/') + 'l100'; | |
1269 | 1270 | end else |
1270 | 1271 | Result := URL; |
1271 | 1272 | end; |
@@ -1290,7 +1291,8 @@ var | ||
1290 | 1291 | dir, tmphost : string; |
1291 | 1292 | const |
1292 | 1293 | BBS_HOST_OLD = 'jbbs.shitaraba.com'; |
1293 | - BBS_HOST = 'jbbs.livedoor.com'; | |
1294 | + BBS_HOST_OLD2 = 'jbbs.livedoor.com'; | |
1295 | + BBS_HOST = 'jbbs.livedoor.jp'; | |
1294 | 1296 | begin |
1295 | 1297 | |
1296 | 1298 | foundPos := AnsiPos( '?', URL ); |
@@ -1303,7 +1305,7 @@ begin | ||
1303 | 1305 | dir := uriList[ 1 ]; |
1304 | 1306 | |
1305 | 1307 | tmphost := uri.Host; |
1306 | - if tmphost = BBS_HOST_OLD then | |
1308 | + if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1307 | 1309 | tmphost := BBS_HOST; |
1308 | 1310 | |
1309 | 1311 | ExtractHttpFields( ['&'], [], Copy( URL, foundPos + 1, MaxInt ), uriList ); |
@@ -1325,19 +1327,13 @@ begin | ||
1325 | 1327 | ExtractHttpFields( ['/'], [], uri.Path, uriList ); |
1326 | 1328 | |
1327 | 1329 | tmphost := uri.Host; |
1328 | - if tmphost = BBS_HOST_OLD then | |
1330 | + if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1329 | 1331 | tmphost := BBS_HOST; |
1330 | 1332 | // http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1067968274/l100 |
1331 | 1333 | if( AnsiPos(THREAD_MARK, URL) > 0) and (uriList.Count > 5) then begin |
1332 | 1334 | Result := |
1333 | 1335 | uri.Protocol + '://' + tmphost + '/bbs/rawmode.cgi/' + |
1334 | 1336 | uriList[ 3 ] + '/' + uriList[ 4 ] + '/' + uriList[ 5 ] + '/'; |
1335 | - end else if AnsiPos(THREAD_MARK, URL) = 0 then begin | |
1336 | - //RRÅßO©Ç¤©`FbNH | |
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; | |
1341 | 1337 | end; |
1342 | 1338 | finally |
1343 | 1339 | uri.Free; |
@@ -1419,7 +1415,8 @@ var | ||
1419 | 1415 | uriList : TStringList; |
1420 | 1416 | const |
1421 | 1417 | BBS_HOST_OLD = 'jbbs.shitaraba.com'; |
1422 | - BBS_HOST = 'jbbs.livedoor.com'; | |
1418 | + BBS_HOST_OLD2 = 'jbbs.livedoor.com'; | |
1419 | + BBS_HOST = 'jbbs.livedoor.jp'; | |
1423 | 1420 | begin |
1424 | 1421 | |
1425 | 1422 | inherited; |
@@ -1436,7 +1433,7 @@ begin | ||
1436 | 1433 | uri := TIdURI.Create( SubjectURL ); |
1437 | 1434 | uriList := TStringList.Create; |
1438 | 1435 | try |
1439 | - if uri.Host = BBS_HOST_OLD then | |
1436 | + if (uri.Host = BBS_HOST_OLD) or (uri.Host = BBS_HOST_OLD2) then | |
1440 | 1437 | uri.Host := BBS_HOST; |
1441 | 1438 | URL := uri.Protocol + '://' + uri.Host + uri.Path; |
1442 | 1439 |
@@ -15,7 +15,7 @@ | ||
15 | 15 | var start_time = new Date(); |
16 | 16 | //==========O[oÏ |
17 | 17 | var anchorHead=""; |
18 | -var skinName="skin30-2 v3.1.11xx"; | |
18 | +var skinName="skin30-2 v3.3.09xx"; | |
19 | 19 | var browser="MRir"; |
20 | 20 | //==========MRirpAJ[Ì»èi0:³µ,1:|bvAbv,2:{^}üj |
21 | 21 | // MRirÅÍAXAJ[ÍÎAhXÅLq³êé |
@@ -27,13 +27,22 @@ function checkAnchor(href){if(!href){return(0)} | ||
27 | 27 | //==========NÝè |
28 | 28 | function addAnchor(inner,num){ |
29 | 29 | if(!t_url){threadurl()} |
30 | - return('<a href="../test/read.cgi/'+t_bbs+'/'+t_key+'/'+inner+'" target="_blank" onclick="blur()">'+num+'</a>') | |
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 | + } | |
31 | 36 | } |
32 | 37 | // XbhURLÌæ¾ |
33 | 38 | var t_url=false,t_domain,t_bbs,t_key; |
34 | 39 | function threadurl(){ |
35 | 40 | var threadurl=document.getElementsByName("ThreadURL")[0].content; |
36 | - threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//); | |
41 | + if(threadurl.match(/&/)){ | |
42 | + threadurl.match(/bbs=(.*)&key=(\d*)/); | |
43 | + }else{ | |
44 | + threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//); | |
45 | + } | |
37 | 46 | t_url=true; |
38 | 47 | t_bbs=RegExp.$1; |
39 | 48 | t_key=RegExp.$2; |
@@ -2,7 +2,8 @@ | ||
2 | 2 | //OÖFtohan |
3 | 3 | //OÏFanchorHead,lightmode,getID,skinName,browser,dts |
4 | 4 | //O[oÏ |
5 | -var buffer=1; // á¬ñüâá¬}VÌêÉÍbufferÌlðâ·Ææè³mÉWvi1â·Æ0.1bxêéj | |
5 | +var buffer=1; // á¬ñüâá¬}VÌêÉÍbufferÌlðâ·Ææè³mÉWvi1â·Æ0.1bxêéj | |
6 | +var newResJump=1; // V XWvi0:uEUC¹A1:ǹÌÝA2:íj©¿ãAOpenJaneAtwintailÌÝÌÝè | |
6 | 7 | //========Click¨search,¼ |
7 | 8 | document.onclick = clickEvent; |
8 | 9 | function clickEvent(){ |
@@ -40,10 +41,19 @@ function mouseOverEvent() { | ||
40 | 41 | else if(e.innerText.match(/^ Ú`ñ$/)) {abonePopup(e);} |
41 | 42 | } |
42 | 43 | if(e.tagName=='A'){ |
43 | - e.href=e.href.replace(/>/g,""); | |
44 | - e.href=e.href.replace(/\/ime.nu/g,""); | |
44 | + if(!e.innerText.match(/%/)){ // URLGR[hŠ調È%ªÈ¯êÎ | |
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ÌfR[hÍÊ|¾©ç¯ȢB | |
52 | + } | |
53 | + } | |
45 | 54 | if (checkAnchor(e.href)==2){insButton(e);return;} |
46 | 55 | else if(checkAnchor(e.href)==1){ |
56 | + if(event.shiftKey){if(e.rel){e.href=e.rel}return} | |
47 | 57 | // ½i|bvAbv |
48 | 58 | var aNum=parseInt(e.sourceIndex)+1; |
49 | 59 | if(!document.getElementById("p"+aNum)){ |
@@ -96,10 +106,10 @@ function scroll_End(){document.getElementsByTagName("DL")[0].lastChild.scrollInt | ||
96 | 106 | // IMG |
97 | 107 | function imgCommand(mode,s){ |
98 | 108 | if(!waited){ |
99 | - var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="SXêÇ"><br><input type="button" onclick="allImageLoad(\'new\')" value="VXêÇ"><br></div>'; | |
109 | + var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="SXêÇ"><br><input type="button" onclick="allImageLoad(\'new\')" value="VXêÇ"><br><input type="button" onclick="removeError()" value="Erroræí"><br></div>'; | |
100 | 110 | event.srcElement.parentElement.insertAdjacentHTML('beforeEnd',nHTML); |
101 | 111 | if(skinName.match(/30-2/)){ |
102 | - if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="plØÖ"><br>')} | |
112 | + //if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="plØÖ"><br>')} | |
103 | 113 | document.getElementById("command").insertAdjacentHTML('beforeEnd','<input type="button" onclick="changeMode()" value="[hØÖ">') |
104 | 114 | } |
105 | 115 | waited=true; |
@@ -109,7 +119,7 @@ function imgCommand(mode,s){ | ||
109 | 119 | } |
110 | 120 | function clearCommand(){ |
111 | 121 | waited=false; |
112 | - event.srcElement.parentElement.removeNode(true); | |
122 | + document.getElementById("command").removeNode(true); | |
113 | 123 | } |
114 | 124 | //=========¶·¨copyMenu() |
115 | 125 | document.onmousedown=mousedownEvent; |
@@ -122,6 +132,7 @@ function mousedownEvent(){ | ||
122 | 132 | clickTimer=setTimeout("copyMenu()",500); |
123 | 133 | } |
124 | 134 | } |
135 | + | |
125 | 136 | //Rs[j [¨colorChange(),search::copyText() |
126 | 137 | function copyMenu(){ |
127 | 138 | clickCancel=true; clearTimeout(clickTimer); |
@@ -165,27 +176,53 @@ function key(){ | ||
165 | 176 | } |
166 | 177 | } |
167 | 178 | |
168 | -//=========LoadiãÖjieFooteràµÍAHeaderÅÌ[v©çÄoµj | |
179 | +//=========V Xæ¾ãiWXL¢ÎuEUpj©TimerÍFooter©çÄÑoµ | |
180 | +//=========©¿ãAABoneA]kQ | |
169 | 181 | var newResNum=parseInt(document.getElementsByName("GetRescount")[0].content)+1; |
170 | 182 | var k=0; |
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 | - //V Jnio[ðÝèµÄWv | |
183 | +function loadEvent(num){ // TimerÍFooter©ç | |
184 | + //====V XWv | |
185 | + if(newResJump==0){clearInterval(timerID);return} //uuEUC¹vÈçI¹ | |
186 | + //V XÌJnÔðæ¾ | |
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=="zbg]kQ"){newResNum=num+1;} | |
175 | 189 | var anc=document.anchors(anchorHead+newResNum); |
176 | - if(anc && anc.parentElement){ | |
177 | - if(buffer==0){clearInterval(timerID);moveToNew(newResNum);} | |
178 | - else {buffer--;} | |
179 | - } | |
190 | + if(!anc || !anc.parentElement){return} // §¾ Ú`ñ³êĽçI¹ | |
191 | + //V XWv | |
192 | + scr=lightmode ? document.body : document.getElementById("dl"); | |
193 | + viewPos=scr.scrollTop+scr.clientHeight;// XN[ãÌæʺÊu | |
194 | + endPos =anc.offsetTop+20; // VXAJ[Êu | |
195 | + //ÅãÜÅǹ or uíÉV WvvÈçWv | |
196 | + if(viewPos>endPos || newResJump==2){clearInterval(timerID);setTimeout("moveToNew("+newResNum+")",buffer*100)} | |
197 | + else{firstNew=document.anchors(anchorHead+newResNum).parentElement.nextSibling;} | |
198 | +} | |
199 | +//=========V Xæ¾ãiWXLÎuEUpj©NewMark©çÄÑoµ | |
200 | +//=========OpenJAtwin | |
201 | +var scr,viewPos,endPos=0; | |
202 | +function reloadEvent(){ | |
203 | + //====ùÇ» | |
204 | + var lastDt=dts[dts.length-2];if(!lastDt){return}// SV ÈçI¹ | |
205 | + while(lastDt && lastDt.className=="new"){lastDt.className="";lastDt=lastDt.previousSibling.previousSibling;} | |
206 | + //====V XWv | |
207 | + if(newResJump==0){return} //uuEUC¹vÈçI¹ | |
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 uíÉV WvvÈçWv | |
214 | + if(viewPos>endPos || newResJump==2){setTimeout("moveToNew("+newResNum+")",buffer*100);} | |
180 | 215 | } |
216 | + | |
181 | 217 | // V XÚ®{V XÌÊuðL¯ |
182 | 218 | var firstNew; |
183 | 219 | function moveToNew(num){ |
184 | 220 | firstNew=getDTfromAnc(num); |
185 | - if(firstNew){firstNew.scrollIntoView(true);} | |
221 | + while(!firstNew){num--;firstNew=getDTfromAnc(num);} //ÎÛª§¾ Ú`ñÈçð¸ç· | |
222 | + firstNew.scrollIntoView(true); | |
186 | 223 | } |
187 | 224 | |
188 | -//=========DblClick¨defaultPopup() | |
225 | +//=========DoubleClick¨defaultPopup() | |
189 | 226 | document.ondblclick=defaultPopup; |
190 | 227 | function defaultPopup(){ |
191 | 228 | var num=document.selection.createRange().text.replace(/\s$/,""); |
@@ -200,4 +237,17 @@ function defaultPopup(){ | ||
200 | 237 | obj.innerText="ID:"+num; |
201 | 238 | search(obj); |
202 | 239 | } |
203 | -} | |
\ No newline at end of file | ||
240 | +} | |
241 | + | |
242 | +//=========Copy | |
243 | +//head©çÇÞÆbodyÍ©¦È¢ÌÅAêpuEUÌÁ¿ðpµÄbodyÌãëÉ«o· | |
244 | +//{ǨèheadÉ«o·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 | + |
@@ -2,7 +2,8 @@ | ||
2 | 2 | // OÖFaddAnchor |
3 | 3 | // OÏFcp,tp,vp,dds |
4 | 4 | //======æÇÌÝè |
5 | -var onMouseLoad=true; // true:J[\ðí¹½¾¯Afalse:LOAD{^ðNbNµÄ©ç | |
5 | +var onMouseLoad=true; // true:J[\ðí¹½¾¯Afalse:LOAD{^ðNbNµÄ©ç | |
6 | +var takeArisk=false; // true:æÇÝÝÉ[hØÖAfalse:è®Å[hØÖ | |
6 | 7 | //==========O[oÏ |
7 | 8 | //==========æ |
8 | 9 | var lightmode = true; |
@@ -68,12 +69,13 @@ function insButton(a,hRH) { | ||
68 | 69 | // æÇ |
69 | 70 | function loadImage(btn,href){ |
70 | 71 | if(!panel){changePanel()} |
72 | + if(takeArisk && lightmode){changeMode()} | |
71 | 73 | if(btn.tagName!="A"){ |
72 | 74 | var thumbs = document.images; |
73 | 75 | var l=thumbs.length; |
74 | 76 | for(var i=l;i--;){if(thumbs[i].src==href){ |
75 | 77 | if(lightmode){tp.style.visibility="visible";viewed=true;} |
76 | - thumbs[i].scrollIntoView(true); | |
78 | + //thumbs[i].scrollIntoView(true); | |
77 | 79 | imgOver(thumbs[i],100); |
78 | 80 | return true; |
79 | 81 | }} |
@@ -103,7 +105,7 @@ function loadImage(btn,href){ | ||
103 | 105 | function imgResult(img){ |
104 | 106 | var btn=img.parentElement.children.item(2); |
105 | 107 | if(event.type=="load"){btn.value='___'; img.style.display='block';} |
106 | - else {btn.value='NONE';btn.style.color='#C00';} | |
108 | + else {btn.value='NONE';btn.style.color='#C00';setTimeout("viewed=false",3000)} | |
107 | 109 | } |
108 | 110 | // TCYÌØÖ |
109 | 111 | function changeSize(btn){ |
@@ -122,6 +124,15 @@ function changeSize(btn){ | ||
122 | 124 | } |
123 | 125 | // TlCÌí |
124 | 126 | 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 | +} | |
125 | 136 | // æ\¦ÌØÖ |
126 | 137 | function changeView(mode,href){ |
127 | 138 | 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 | //RüNASüNASocket774A774KBA21ÖA[1-30]AÈÇÉÎ |
18 | - if(before){if(hnum==3 || hnum==774 || hnum==4 || hnum==21 || hnum==1 || hnum==30){return}} | |
18 | + if(before){if(hnum==5 || 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 | //=========ã Ú`ñÌ|bvAbv |
@@ -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;continue;} | |
113 | + if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;} | |
114 | 114 | dt.removeNode(true); dd.removeNode(true); |
115 | 115 | } |
116 | 116 | } |
@@ -144,7 +144,7 @@ function findIt(word){ | ||
144 | 144 | |
145 | 145 | //==========tQÆ |
146 | 146 | function searchRef(obj){ |
147 | - if(obj.name!='reffered'){ | |
147 | + if(obj.name!='referred'){ | |
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="reffered"; | |
174 | + obj.name="referred"; | |
175 | 175 | } |
176 | 176 | } |
177 | 177 | if(found.length){returnRef(obj.nextSibling,found)} |
@@ -190,13 +190,12 @@ 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(); | |
194 | 193 | var textarea=document.createElement("TEXTAREA"); |
195 | - if (target=="res") {textarea.value=obj.firstChild.innerText+" F"+obj.childNodes[1].innerText+" F"+obj.lastChild.innerText+"\n"+obj.nextSibling.innerText+"\n";} | |
194 | + var message=obj.nextSibling.innerText.replace(/\s(\r\n|$)/g,"\n"); | |
195 | + if (target=="res") {textarea.value=obj.firstChild.innerText+" F"+obj.childNodes[1].innerText+" F"+obj.lastChild.innerText+"\n"+message;} | |
196 | 196 | else if(target=="name"){textarea.value=obj.childNodes[1].innerText+"\n";} |
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(); | |
197 | + else if(target=="id") {textarea.value="ID:"+(obj.lastChild.innerText.split(/ID:/))[1]+"\n";} | |
198 | + var copyText=textarea.createTextRange(); | |
200 | 199 | copyText.execCommand("Copy") |
201 | 200 | event.srcElement.parentElement.removeNode(true); |
202 | 201 | } |
@@ -15,11 +15,11 @@ | ||
15 | 15 | var start_time = new Date(); |
16 | 16 | //==========O[oÏ |
17 | 17 | var anchorHead=""; |
18 | -var skinName="skin30-3 v3.1.11xx"; | |
18 | +var skinName="skin30-3 v3.3.09xx"; | |
19 | 19 | var browser="MRir"; |
20 | 20 | //==========MRirpAJ[Ì»èi0:³µ,1:|bvAbv,2:{^}üj |
21 | 21 | // MRirÅÍAXAJ[ÍÎAhXÅLq³êé |
22 | -function checkAnchor(href){ | |
22 | +function checkAnchor(href){if(!href){return(0)} | |
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,13 +27,22 @@ function checkAnchor(href){ | ||
27 | 27 | //==========NÝè |
28 | 28 | function addAnchor(inner,num){ |
29 | 29 | if(!t_url){threadurl()} |
30 | - return('<a href="../test/read.cgi/'+t_bbs+'/'+t_key+'/'+inner+'" target="_blank" onclick="blur()">'+num+'</a>') | |
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 | + } | |
31 | 36 | } |
32 | 37 | // XbhURLÌæ¾ |
33 | 38 | var t_url=false,t_domain,t_bbs,t_key; |
34 | 39 | function threadurl(){ |
35 | 40 | var threadurl=document.getElementsByName("ThreadURL")[0].content; |
36 | - threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//); | |
41 | + if(threadurl.match(/&/)){ | |
42 | + threadurl.match(/bbs=(.*)&key=(\d*)/); | |
43 | + }else{ | |
44 | + threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//); | |
45 | + } | |
37 | 46 | t_url=true; |
38 | 47 | t_bbs=RegExp.$1; |
39 | 48 | t_key=RegExp.$2; |
@@ -2,7 +2,8 @@ | ||
2 | 2 | //OÖFtohan |
3 | 3 | //OÏFanchorHead,lightmode,getID,skinName,browser,dts |
4 | 4 | //O[oÏ |
5 | -var buffer=1; // á¬ñüâá¬}VÌêÉÍbufferÌlðâ·Ææè³mÉWvi1â·Æ0.1bxêéj | |
5 | +var buffer=1; // á¬ñüâá¬}VÌêÉÍbufferÌlðâ·Ææè³mÉWvi1â·Æ0.1bxêéj | |
6 | +var newResJump=1; // V XWvi0:uEUC¹A1:ǹÌÝA2:íj©¿ãAOpenJaneAtwintailÌÝÌÝè | |
6 | 7 | //========Click¨search,¼ |
7 | 8 | document.onclick = clickEvent; |
8 | 9 | function clickEvent(){ |
@@ -40,10 +41,19 @@ function mouseOverEvent() { | ||
40 | 41 | else if(e.innerText.match(/^ Ú`ñ$/)) {abonePopup(e);} |
41 | 42 | } |
42 | 43 | if(e.tagName=='A'){ |
43 | - e.href=e.href.replace(/>/g,""); | |
44 | - e.href=e.href.replace(/\/ime.nu/g,""); | |
44 | + if(!e.innerText.match(/%/)){ // URLGR[hŠ調È%ªÈ¯êÎ | |
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ÌfR[hÍÊ|¾©ç¯ȢB | |
52 | + } | |
53 | + } | |
45 | 54 | if (checkAnchor(e.href)==2){insButton(e);return;} |
46 | 55 | else if(checkAnchor(e.href)==1){ |
56 | + if(event.shiftKey){if(e.rel){e.href=e.rel}return} | |
47 | 57 | // ½i|bvAbv |
48 | 58 | var aNum=parseInt(e.sourceIndex)+1; |
49 | 59 | if(!document.getElementById("p"+aNum)){ |
@@ -96,10 +106,10 @@ function scroll_End(){document.getElementsByTagName("DL")[0].lastChild.scrollInt | ||
96 | 106 | // IMG |
97 | 107 | function imgCommand(mode,s){ |
98 | 108 | if(!waited){ |
99 | - var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="SXêÇ"><br><input type="button" onclick="allImageLoad(\'new\')" value="VXêÇ"><br></div>'; | |
109 | + var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="SXêÇ"><br><input type="button" onclick="allImageLoad(\'new\')" value="VXêÇ"><br><input type="button" onclick="removeError()" value="Erroræí"><br></div>'; | |
100 | 110 | event.srcElement.parentElement.insertAdjacentHTML('beforeEnd',nHTML); |
101 | 111 | if(skinName.match(/30-2/)){ |
102 | - if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="plØÖ"><br>')} | |
112 | + //if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="plØÖ"><br>')} | |
103 | 113 | document.getElementById("command").insertAdjacentHTML('beforeEnd','<input type="button" onclick="changeMode()" value="[hØÖ">') |
104 | 114 | } |
105 | 115 | waited=true; |
@@ -109,7 +119,7 @@ function imgCommand(mode,s){ | ||
109 | 119 | } |
110 | 120 | function clearCommand(){ |
111 | 121 | waited=false; |
112 | - event.srcElement.parentElement.removeNode(true); | |
122 | + document.getElementById("command").removeNode(true); | |
113 | 123 | } |
114 | 124 | //=========¶·¨copyMenu() |
115 | 125 | document.onmousedown=mousedownEvent; |
@@ -122,6 +132,7 @@ function mousedownEvent(){ | ||
122 | 132 | clickTimer=setTimeout("copyMenu()",500); |
123 | 133 | } |
124 | 134 | } |
135 | + | |
125 | 136 | //Rs[j [¨colorChange(),search::copyText() |
126 | 137 | function copyMenu(){ |
127 | 138 | clickCancel=true; clearTimeout(clickTimer); |
@@ -165,27 +176,53 @@ function key(){ | ||
165 | 176 | } |
166 | 177 | } |
167 | 178 | |
168 | -//=========LoadiãÖjieFooteràµÍAHeaderÅÌ[v©çÄoµj | |
179 | +//=========V Xæ¾ãiWXL¢ÎuEUpj©TimerÍFooter©çÄÑoµ | |
180 | +//=========©¿ãAABoneA]kQ | |
169 | 181 | var newResNum=parseInt(document.getElementsByName("GetRescount")[0].content)+1; |
170 | 182 | var k=0; |
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 | - //V Jnio[ðÝèµÄWv | |
183 | +function loadEvent(num){ // TimerÍFooter©ç | |
184 | + //====V XWv | |
185 | + if(newResJump==0){clearInterval(timerID);return} //uuEUC¹vÈçI¹ | |
186 | + //V XÌJnÔðæ¾ | |
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=="zbg]kQ"){newResNum=num+1;} | |
175 | 189 | var anc=document.anchors(anchorHead+newResNum); |
176 | - if(anc && anc.parentElement){ | |
177 | - if(buffer==0){clearInterval(timerID);moveToNew(newResNum);} | |
178 | - else {buffer--;} | |
179 | - } | |
190 | + if(!anc || !anc.parentElement){return} // §¾ Ú`ñ³êĽçI¹ | |
191 | + //V XWv | |
192 | + scr=lightmode ? document.body : document.getElementById("dl"); | |
193 | + viewPos=scr.scrollTop+scr.clientHeight;// XN[ãÌæʺÊu | |
194 | + endPos =anc.offsetTop+20; // VXAJ[Êu | |
195 | + //ÅãÜÅǹ or uíÉV WvvÈçWv | |
196 | + if(viewPos>endPos || newResJump==2){clearInterval(timerID);setTimeout("moveToNew("+newResNum+")",buffer*100)} | |
197 | + else{firstNew=document.anchors(anchorHead+newResNum).parentElement.nextSibling;} | |
198 | +} | |
199 | +//=========V Xæ¾ãiWXLÎuEUpj©NewMark©çÄÑoµ | |
200 | +//=========OpenJAtwin | |
201 | +var scr,viewPos,endPos=0; | |
202 | +function reloadEvent(){ | |
203 | + //====ùÇ» | |
204 | + var lastDt=dts[dts.length-2];if(!lastDt){return}// SV ÈçI¹ | |
205 | + while(lastDt && lastDt.className=="new"){lastDt.className="";lastDt=lastDt.previousSibling.previousSibling;} | |
206 | + //====V XWv | |
207 | + if(newResJump==0){return} //uuEUC¹vÈçI¹ | |
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 uíÉV WvvÈçWv | |
214 | + if(viewPos>endPos || newResJump==2){setTimeout("moveToNew("+newResNum+")",buffer*100);} | |
180 | 215 | } |
216 | + | |
181 | 217 | // V XÚ®{V XÌÊuðL¯ |
182 | 218 | var firstNew; |
183 | 219 | function moveToNew(num){ |
184 | 220 | firstNew=getDTfromAnc(num); |
185 | - if(firstNew){firstNew.scrollIntoView(true);} | |
221 | + while(!firstNew){num--;firstNew=getDTfromAnc(num);} //ÎÛª§¾ Ú`ñÈçð¸ç· | |
222 | + firstNew.scrollIntoView(true); | |
186 | 223 | } |
187 | 224 | |
188 | -//=========DblClick¨defaultPopup() | |
225 | +//=========DoubleClick¨defaultPopup() | |
189 | 226 | document.ondblclick=defaultPopup; |
190 | 227 | function defaultPopup(){ |
191 | 228 | var num=document.selection.createRange().text.replace(/\s$/,""); |
@@ -200,4 +237,17 @@ function defaultPopup(){ | ||
200 | 237 | obj.innerText="ID:"+num; |
201 | 238 | search(obj); |
202 | 239 | } |
203 | -} | |
\ No newline at end of file | ||
240 | +} | |
241 | + | |
242 | +//=========Copy | |
243 | +//head©çÇÞÆbodyÍ©¦È¢ÌÅAêpuEUÌÁ¿ðpµÄbodyÌãëÉ«o· | |
244 | +//{ǨèheadÉ«o·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 | + |
@@ -15,7 +15,7 @@ var pb; | ||
15 | 15 | function namePopup(e,before,num,after){ |
16 | 16 | var hnum=tohan(num); |
17 | 17 | //RüNASüNASocket774A774KBA21ÖA[1-30]AÈÇÉÎ |
18 | - if(before){if(hnum==3 || hnum==774 || hnum==4 || hnum==21 || hnum==1 || hnum==30){return}} | |
18 | + if(before){if(hnum==5 || 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 | //=========ã Ú`ñÌ|bvAbv |
@@ -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;continue;} | |
113 | + if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;} | |
114 | 114 | dt.removeNode(true); dd.removeNode(true); |
115 | 115 | } |
116 | 116 | } |
@@ -144,7 +144,7 @@ function findIt(word){ | ||
144 | 144 | |
145 | 145 | //==========tQÆ |
146 | 146 | function searchRef(obj){ |
147 | - if(obj.name!='reffered'){ | |
147 | + if(obj.name!='referred'){ | |
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="reffered"; | |
174 | + obj.name="referred"; | |
175 | 175 | } |
176 | 176 | } |
177 | 177 | if(found.length){returnRef(obj.nextSibling,found)} |
@@ -190,13 +190,12 @@ 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(); | |
194 | 193 | var textarea=document.createElement("TEXTAREA"); |
195 | - if (target=="res") {textarea.value=obj.firstChild.innerText+" F"+obj.childNodes[1].innerText+" F"+obj.lastChild.innerText+"\n"+obj.nextSibling.innerText+"\n";} | |
194 | + var message=obj.nextSibling.innerText.replace(/\s(\r\n|$)/g,"\n"); | |
195 | + if (target=="res") {textarea.value=obj.firstChild.innerText+" F"+obj.childNodes[1].innerText+" F"+obj.lastChild.innerText+"\n"+message;} | |
196 | 196 | else if(target=="name"){textarea.value=obj.childNodes[1].innerText+"\n";} |
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(); | |
197 | + else if(target=="id") {textarea.value="ID:"+(obj.lastChild.innerText.split(/ID:/))[1]+"\n";} | |
198 | + var copyText=textarea.createTextRange(); | |
200 | 199 | copyText.execCommand("Copy") |
201 | 200 | event.srcElement.parentElement.removeNode(true); |
202 | 201 | } |