修订版 | ffbc30f09add2c88ecc2957be51a5592f070f64f (tree) |
---|---|
时间 | 2004-10-03 03:37:50 |
作者 | cvs2git <cvs2git> |
Commiter | cvs2git |
This commit was manufactured by cvs2svn to create tag 'v1_49_0_541'.
@@ -410,11 +410,8 @@ end; | ||
410 | 410 | |
411 | 411 | function TEditorForm.GetBody : string; |
412 | 412 | var |
413 | - body, tmp : string; | |
414 | - p, tail : PChar; | |
415 | - len : Integer; | |
416 | -const | |
417 | - TAB_LENGTH = 4; | |
413 | + body : string; | |
414 | + regexp : TAWKStr; | |
418 | 415 | begin |
419 | 416 | |
420 | 417 | body := BodyEdit.Text; |
@@ -422,65 +419,16 @@ begin | ||
422 | 419 | // & の置換は一番最初にやること |
423 | 420 | body := CustomStringReplace( body, '&', '&' ); |
424 | 421 | if SpaceToNBSPAction.Checked then begin |
425 | - p := PChar( body ); | |
426 | - tail := p + Length( body ); | |
427 | - len := 0; | |
428 | - while p < tail do begin | |
429 | - case p^ of | |
430 | - #09: | |
431 | - begin | |
432 | - Inc( p ); | |
433 | - repeat | |
434 | - Inc( len ); | |
435 | - tmp := tmp + ' '; | |
436 | - until (len mod TAB_LENGTH) = 0; | |
437 | - end; | |
438 | - | |
439 | - #10, #13: | |
440 | - begin | |
441 | - tmp := tmp + p^; Inc( p ); | |
442 | - len := 0; | |
443 | - end; | |
444 | - | |
445 | - ' ': | |
446 | - begin | |
447 | - tmp := tmp + ' '; | |
448 | - Inc( p ); | |
449 | - Inc( len ); | |
450 | - end; | |
451 | - | |
452 | - '&': | |
453 | - // 実体参照は 1 文字分 | |
454 | - begin | |
455 | - tmp := tmp + '&'; | |
456 | - Inc( p ); | |
457 | - Inc( len ); | |
458 | - while p < tail do begin | |
459 | - if p^ in ['a'..'z', 'A'..'Z', '0'..'9', '#'] then begin | |
460 | - tmp := tmp + p^; | |
461 | - end else if p^ = ';' then begin | |
462 | - tmp := tmp + p^; | |
463 | - Inc( p ); | |
464 | - Break; | |
465 | - end else begin | |
466 | - Break; | |
467 | - end; | |
468 | - Inc( p ); | |
469 | - end; | |
470 | - end; | |
471 | - | |
472 | - else | |
473 | - if p^ in kYofKanji then begin | |
474 | - tmp := tmp + p^; Inc( p ); | |
475 | - tmp := tmp + p^; Inc( p ); | |
476 | - len := len + 2; | |
477 | - end else begin | |
478 | - tmp := tmp + p^; Inc( p ); | |
479 | - Inc( len ); | |
480 | - end; | |
481 | - end; | |
422 | + body := CustomStringReplace( body, #09, ' ' ); | |
423 | + body := CustomStringReplace( body, ' ', ' ' ); | |
424 | + body := CustomStringReplace( body, ' ', ' ' ); | |
425 | + regexp := TAWKStr.Create( nil ); | |
426 | + try | |
427 | + regexp.RegExp := '^ '; | |
428 | + regexp.GSub( '\ ', body ); | |
429 | + finally | |
430 | + regexp.Free; | |
482 | 431 | end; |
483 | - body := tmp; | |
484 | 432 | end; |
485 | 433 | |
486 | 434 | Result := body; |
@@ -1666,6 +1614,7 @@ procedure TEditorForm.GetTitlePictureActionExecute(Sender: TObject); | ||
1666 | 1614 | var |
1667 | 1615 | memStream: TMemoryStream; |
1668 | 1616 | tmpBoard: TBoard; |
1617 | + tmp : string; | |
1669 | 1618 | begin |
1670 | 1619 | InitIdHTTP(Indy); |
1671 | 1620 | memStream := TMemoryStream.Create; |
@@ -229,8 +229,7 @@ var | ||
229 | 229 | // httpSocket : TIdHTTP; |
230 | 230 | resStream : TMemoryStream; |
231 | 231 | content : string; |
232 | -const | |
233 | - LIVEDOOR_URL = 'http://jbbs.livedoor.jp/'; | |
232 | + | |
234 | 233 | begin |
235 | 234 | |
236 | 235 | {$IFDEF DEBUG} |
@@ -271,8 +270,7 @@ begin | ||
271 | 270 | Result := socket.ResponseCode; |
272 | 271 | if (Length( content ) = 0) and (Result = 206) then |
273 | 272 | Result := 304; |
274 | - //したらばJBBSはヘッダにエラー情報が載るらしいので、ここでチェック | |
275 | - if ( AnsiPos(LIVEDOOR_URL, inURL) > 0 ) and (Result = 200) then begin | |
273 | + if ( AnsiPos('http://jbbs.livedoor.com/', inURL) > 0 ) and (Result = 200) then begin | |
276 | 274 | if( AnsiPos('STORAGE IN', socket.Response.RawHeaders.Text) > 0 ) then begin |
277 | 275 | Result := 302; |
278 | 276 | end; |
@@ -117,50 +117,13 @@ function TFavoriteBoardItem.GetItem : TBoard; | ||
117 | 117 | var |
118 | 118 | protocol, host, path, document, port, bookmark : string; |
119 | 119 | BBSID{, BBSKey} : string; |
120 | - tmpURL, boardURL : string; | |
120 | + tmpURL : string; | |
121 | 121 | // category : TCategory; |
122 | - i, bi: Integer; | |
123 | - tmpThread: TThreadItem; | |
124 | - tmpBoard: TBoard; | |
125 | 122 | begin |
126 | 123 | |
127 | 124 | if FItem = nil then begin |
128 | 125 | FItem := BBSsFindBoardFromURL( URL ); |
129 | 126 | if FItem = nil then begin |
130 | - //===== プラグイン | |
131 | - try | |
132 | - //作業中// | |
133 | - bi := High( BoardPlugIns ); | |
134 | - for i := Low( BoardPlugIns ) to bi do begin | |
135 | - if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin | |
136 | - case BoardPlugIns[ i ].AcceptURL( URL ) of | |
137 | - atThread: | |
138 | - begin | |
139 | - tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL ); | |
140 | - boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) ); | |
141 | - FItem := BBSsFindBoardFromURL( boardURL ); | |
142 | - URL := FItem.URL; | |
143 | - tmpThread.Free; | |
144 | - break; | |
145 | - end; | |
146 | - atBoard: | |
147 | - begin | |
148 | - tmpBoard := TBoard.Create(BoardPlugIns[ i ], URL); | |
149 | - FItem := BBSsFindBoardFromURL( tmpBoard.URL ); | |
150 | - tmpBoard.Free; | |
151 | - if FItem <> nil then begin | |
152 | - URL := FItem.URL; | |
153 | - end; | |
154 | - break; | |
155 | - end; | |
156 | - end; | |
157 | - end; | |
158 | - end; | |
159 | - except | |
160 | - // exception が発生した場合は内部処理に任せたいのでここでは何もしない | |
161 | - end; | |
162 | - end; | |
163 | - if FItem = nil then begin | |
164 | 127 | tmpURL := URL; |
165 | 128 | GikoSys.ParseURI( tmpURL, protocol, host, path, document, port, bookmark ); |
166 | 129 | if GikoSys.Is2chHost( host ) then begin |
@@ -1,11 +1,11 @@ | ||
1 | 1 | object GikoForm: TGikoForm |
2 | - Left = 246 | |
3 | - Top = 188 | |
2 | + Left = 124 | |
3 | + Top = 95 | |
4 | 4 | HorzScrollBar.Visible = False |
5 | 5 | VertScrollBar.Visible = False |
6 | 6 | AutoScroll = False |
7 | 7 | Caption = '-' |
8 | - ClientHeight = 404 | |
8 | + ClientHeight = 545 | |
9 | 9 | ClientWidth = 854 |
10 | 10 | Color = clBtnFace |
11 | 11 | Font.Charset = SHIFTJIS_CHARSET |
@@ -27,7 +27,7 @@ object GikoForm: TGikoForm | ||
27 | 27 | TextHeight = 12 |
28 | 28 | object StatusBar: TStatusBar |
29 | 29 | Left = 0 |
30 | - Top = 384 | |
30 | + Top = 525 | |
31 | 31 | Width = 854 |
32 | 32 | Height = 20 |
33 | 33 | Panels = < |
@@ -38,7 +38,11 @@ object GikoForm: TGikoForm | ||
38 | 38 | Width = 500 |
39 | 39 | end |
40 | 40 | item |
41 | + Style = psOwnerDraw | |
41 | 42 | Width = 50 |
43 | + end | |
44 | + item | |
45 | + Width = 100 | |
42 | 46 | end> |
43 | 47 | SimplePanel = False |
44 | 48 | OnResize = StatusBarResize |
@@ -47,13 +51,13 @@ object GikoForm: TGikoForm | ||
47 | 51 | Left = 0 |
48 | 52 | Top = 77 |
49 | 53 | Width = 854 |
50 | - Height = 307 | |
54 | + Height = 448 | |
51 | 55 | Align = alClient |
52 | 56 | BevelOuter = bvNone |
53 | 57 | TabOrder = 1 |
54 | 58 | object MessageSplitter: TSplitter |
55 | 59 | Left = 0 |
56 | - Top = 268 | |
60 | + Top = 409 | |
57 | 61 | Width = 854 |
58 | 62 | Height = 5 |
59 | 63 | Cursor = crVSplit |
@@ -66,7 +70,7 @@ object GikoForm: TGikoForm | ||
66 | 70 | Left = 0 |
67 | 71 | Top = 0 |
68 | 72 | Width = 854 |
69 | - Height = 268 | |
73 | + Height = 409 | |
70 | 74 | Align = alClient |
71 | 75 | BevelOuter = bvNone |
72 | 76 | TabOrder = 0 |
@@ -74,7 +78,7 @@ object GikoForm: TGikoForm | ||
74 | 78 | Left = 145 |
75 | 79 | Top = 0 |
76 | 80 | Width = 5 |
77 | - Height = 268 | |
81 | + Height = 409 | |
78 | 82 | Cursor = crHSplit |
79 | 83 | AutoSnap = False |
80 | 84 | ResizeStyle = rsUpdate |
@@ -83,7 +87,7 @@ object GikoForm: TGikoForm | ||
83 | 87 | Left = 0 |
84 | 88 | Top = 0 |
85 | 89 | Width = 145 |
86 | - Height = 268 | |
90 | + Height = 409 | |
87 | 91 | Align = alLeft |
88 | 92 | BevelOuter = bvNone |
89 | 93 | TabOrder = 0 |
@@ -270,7 +274,7 @@ object GikoForm: TGikoForm | ||
270 | 274 | Left = 150 |
271 | 275 | Top = 0 |
272 | 276 | Width = 704 |
273 | - Height = 268 | |
277 | + Height = 409 | |
274 | 278 | Align = alClient |
275 | 279 | BevelOuter = bvNone |
276 | 280 | TabOrder = 1 |
@@ -309,12 +313,14 @@ object GikoForm: TGikoForm | ||
309 | 313 | OwnerData = True |
310 | 314 | ReadOnly = True |
311 | 315 | RowSelect = True |
316 | + PopupMenu = ListPopupMenu | |
312 | 317 | SmallImages = ItemIcon16 |
313 | 318 | StateImages = StateIconImageList |
314 | 319 | TabOrder = 0 |
315 | 320 | ViewStyle = vsReport |
316 | 321 | OnAdvancedCustomDrawItem = ListViewAdvancedCustomDrawItem |
317 | 322 | OnColumnClick = ListViewColumnClick |
323 | + OnColumnDragged = ListViewColumnDragged | |
318 | 324 | OnColumnRightClick = ListViewColumnRightClick |
319 | 325 | OnCustomDraw = ListViewCustomDraw |
320 | 326 | OnData = ListViewData |
@@ -548,7 +554,7 @@ object GikoForm: TGikoForm | ||
548 | 554 | Left = 0 |
549 | 555 | Top = 194 |
550 | 556 | Width = 704 |
551 | - Height = 74 | |
557 | + Height = 215 | |
552 | 558 | Align = alClient |
553 | 559 | BevelOuter = bvNone |
554 | 560 | TabOrder = 1 |
@@ -556,7 +562,7 @@ object GikoForm: TGikoForm | ||
556 | 562 | Left = 0 |
557 | 563 | Top = 46 |
558 | 564 | Width = 704 |
559 | - Height = 8 | |
565 | + Height = 149 | |
560 | 566 | Align = alClient |
561 | 567 | BevelOuter = bvNone |
562 | 568 | UseDockManager = False |
@@ -566,7 +572,7 @@ object GikoForm: TGikoForm | ||
566 | 572 | Left = 0 |
567 | 573 | Top = 0 |
568 | 574 | Width = 704 |
569 | - Height = 8 | |
575 | + Height = 149 | |
570 | 576 | Align = alClient |
571 | 577 | TabOrder = 0 |
572 | 578 | OnEnter = BrowserEnter |
@@ -575,7 +581,7 @@ object GikoForm: TGikoForm | ||
575 | 581 | OnNewWindow2 = BrowserNewWindow2 |
576 | 582 | OnDocumentComplete = BrowserDocumentComplete |
577 | 583 | ControlData = { |
578 | - 4C000000C3480000D40000000000000000000000000000000000000000000000 | |
584 | + 4C000000C3480000660F00000000000000000000000000000000000000000000 | |
579 | 585 | 000000004C000000000000000000000001000000E0D057007335CF11AE690800 |
580 | 586 | 2B2E12620A000000000000004C0000000114020000000000C000000000000046 |
581 | 587 | 8000000000000000000000000000000000000000000000000000000000000000 |
@@ -584,7 +590,7 @@ object GikoForm: TGikoForm | ||
584 | 590 | end |
585 | 591 | object BrowserBottomPanel: TGikoPanel |
586 | 592 | Left = 0 |
587 | - Top = 54 | |
593 | + Top = 195 | |
588 | 594 | Width = 704 |
589 | 595 | Height = 20 |
590 | 596 | Align = alBottom |
@@ -862,7 +868,7 @@ object GikoForm: TGikoForm | ||
862 | 868 | end |
863 | 869 | object MessagePanel: TPanel |
864 | 870 | Left = 0 |
865 | - Top = 273 | |
871 | + Top = 414 | |
866 | 872 | Width = 854 |
867 | 873 | Height = 34 |
868 | 874 | Align = alBottom |
@@ -6009,7 +6015,7 @@ object GikoForm: TGikoForm | ||
6009 | 6015 | end |
6010 | 6016 | object ActionList: TActionList |
6011 | 6017 | Images = ToobarImageList |
6012 | - Left = 5 | |
6018 | + Left = 8 | |
6013 | 6019 | Top = 372 |
6014 | 6020 | object OnlyAHundredResAction: TAction |
6015 | 6021 | Category = #12473#12524#12483#12489 |
@@ -7065,20 +7071,6 @@ object GikoForm: TGikoForm | ||
7065 | 7071 | Hint = #12479#12502#12398#38918#30058#12434#33258#21205#24489#20803 |
7066 | 7072 | OnExecute = TabAutoLoadActionExecute |
7067 | 7073 | end |
7068 | - object JumpToNumOfResAction: TAction | |
7069 | - Category = #12473#12524#12483#12489 | |
7070 | - Caption = #25351#23450#12375#12383#30058#21495#12398#12524#12473#12395#39131#12406 | |
7071 | - Hint = #25351#23450#12375#12383#30058#21495#12398#12524#12473#12395#39131#12406 | |
7072 | - ShortCut = 16455 | |
7073 | - OnExecute = JumpToNumOfResActionExecute | |
7074 | - OnUpdate = JumpToNumOfResActionUpdate | |
7075 | - end | |
7076 | - object FavoriteTreeViewCollapseAction: TAction | |
7077 | - Category = #12362#27671#12395#20837#12426 | |
7078 | - Caption = #12362#27671#12395#20837#12426#12484#12522#12540#12434#12377#12409#12390#38281#12376#12427 | |
7079 | - Hint = #12362#27671#12395#20837#12426#12484#12522#12540#12434#12377#12409#12390#38281#12376#12427 | |
7080 | - OnExecute = FavoriteTreeViewCollapseActionExecute | |
7081 | - end | |
7082 | 7074 | end |
7083 | 7075 | object BrowserPopupMenu: TPopupMenu |
7084 | 7076 | Left = 68 |
@@ -577,8 +577,6 @@ type | ||
577 | 577 | TabAutoSaveAction: TAction; |
578 | 578 | TabAutoLoadAction: TAction; |
579 | 579 | ListColumnPopupMenu: TPopupMenu; |
580 | - JumpToNumOfResAction: TAction; | |
581 | - FavoriteTreeViewCollapseAction: TAction; | |
582 | 580 | procedure FormCreate(Sender: TObject); |
583 | 581 | procedure FormDestroy(Sender: TObject); |
584 | 582 | procedure CabinetPanelHide(Sender: TObject); |
@@ -928,9 +926,6 @@ type | ||
928 | 926 | procedure TabAutoLoadActionExecute(Sender: TObject); |
929 | 927 | procedure ListViewColumnRightClick(Sender: TObject; |
930 | 928 | Column: TListColumn; Point: TPoint); |
931 | - procedure JumpToNumOfResActionExecute(Sender: TObject); | |
932 | - procedure JumpToNumOfResActionUpdate(Sender: TObject); | |
933 | - procedure FavoriteTreeViewCollapseActionExecute(Sender: TObject); | |
934 | 929 | private |
935 | 930 | { Private 宣言 } |
936 | 931 | //RoundList : TRoundList; |
@@ -995,7 +990,6 @@ type | ||
995 | 990 | FBrowsers: TList; |
996 | 991 | FResRangeMenuSelect : Longint; ///< ResRangeButton で選択されている項目 (フォーマットは ResRange 互換) |
997 | 992 | FStartUp : Boolean; |
998 | - FIsHandledWheel : Boolean; ///< 既に受け取った WM_MOUSEWHEEL かどうか | |
999 | 993 | procedure SetBoardTreeNode( inBBS : TBBS ); |
1000 | 994 | function SetCategoryListItem(ABBS2ch: TBBS): Integer; |
1001 | 995 | function SetBoardListItem(Category: TCategory): Integer; |
@@ -1008,7 +1002,7 @@ type | ||
1008 | 1002 | procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer); |
1009 | 1003 | procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer); |
1010 | 1004 | |
1011 | - | |
1005 | + procedure SetActiveList(Obj: TObject); | |
1012 | 1006 | procedure ListClick; |
1013 | 1007 | procedure ListDoubleClick(Shift: TShiftState); |
1014 | 1008 | procedure BrowserMovement(const AName: string); overload; |
@@ -1090,6 +1084,8 @@ type | ||
1090 | 1084 | function LoadTabURLs : Boolean; |
1091 | 1085 | /// バンド幅を再計算・再設定する |
1092 | 1086 | procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar ); |
1087 | + /// ListView のカラム幅および位置の保存 | |
1088 | + procedure ActiveListColumnSave; | |
1093 | 1089 | /// ListView の Column を真のカラムに変換 |
1094 | 1090 | function ActiveListTrueColumn( column : TListColumn ) : TListColumn; |
1095 | 1091 | /// ListColumnPopupMenu アイテムのクリックイベント |
@@ -1105,11 +1101,8 @@ type | ||
1105 | 1101 | { Public 宣言 } |
1106 | 1102 | // FDownload: TDownload; |
1107 | 1103 | FControlThread: TThreadControl; |
1108 | - procedure MoveToURL(const inURL: string); | |
1109 | - function InsertBrowserTab( | |
1110 | - ThreadItem : TThreadItem; | |
1111 | - ActiveTab : Boolean = True | |
1112 | - ) : TBrowserRecord; | |
1104 | + procedure MoveToURL(URL: string); | |
1105 | + procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True); | |
1113 | 1106 | procedure ReloadBBS; |
1114 | 1107 | function GetHttpState: Boolean; |
1115 | 1108 | procedure SetEnabledCloseButton(Enabled: Boolean); |
@@ -1129,7 +1122,7 @@ type | ||
1129 | 1122 | function GetActiveContent: TThreadItem; |
1130 | 1123 | function GetActiveList: TObject; |
1131 | 1124 | |
1132 | - | |
1125 | + property ActiveList: TObject read GetActiveList write SetActiveList; | |
1133 | 1126 | // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime; |
1134 | 1127 | |
1135 | 1128 | procedure SetListViewType(AViewType: TGikoViewType); overload; |
@@ -1153,19 +1146,16 @@ type | ||
1153 | 1146 | // property Favorite: TFavorite read FFavorite write FFavorite; |
1154 | 1147 | procedure SetToolBarPopup; |
1155 | 1148 | procedure ShowFavoriteAddDialog( Item : TObject ); |
1156 | - procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList); | |
1157 | - procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList); | |
1149 | + procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList); | |
1150 | + procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList); | |
1158 | 1151 | property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor; |
1159 | 1152 | property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor; |
1160 | 1153 | property OddColor : TColor read FOddColor write FOddColor; |
1161 | 1154 | |
1162 | 1155 | function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton; |
1163 | 1156 | procedure OnPlugInMenuItem( Sender : TObject ); |
1164 | - procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList); | |
1165 | - /// ListView のカラム幅および位置の保存 KuroutSettingからよびだしたいので | |
1166 | - procedure ActiveListColumnSave; | |
1167 | - procedure SetActiveList(Obj: TObject); | |
1168 | - property ActiveList: TObject read GetActiveList write SetActiveList; | |
1157 | + procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList); | |
1158 | + | |
1169 | 1159 | published |
1170 | 1160 | property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton; |
1171 | 1161 | end; |
@@ -1194,18 +1184,18 @@ type | ||
1194 | 1184 | TBrowserRecord = class( TObject ) |
1195 | 1185 | private |
1196 | 1186 | FBrowser : TWebBrowser; |
1197 | - FEvent: THTMLDocumentEventSink; //!< ブラウザドキュメントイベント | |
1187 | + FEvent: THTMLDocumentEventSink;//ブラウザドキュメントイベント | |
1198 | 1188 | FThread : TThreadItem; |
1199 | 1189 | FLastSize : Integer; |
1200 | 1190 | FRepaint : Boolean; |
1201 | - FMovement : string; //!< スクロール先アンカー | |
1191 | + // FOnlyHundred: Boolean; | |
1202 | 1192 | public |
1203 | 1193 | destructor Destroy; override; |
1204 | 1194 | property Browser : TWebBrowser read FBrowser write FBrowser; |
1205 | 1195 | property Thread : TThreadItem read FThread write FThread; |
1206 | 1196 | property LastSize : Integer read FLastSize write FLastSize; |
1207 | 1197 | property Repaint : Boolean read FRepaint write FRepaint; |
1208 | - property Movement : string read FMovement write FMovement; | |
1198 | +// property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred; | |
1209 | 1199 | end; |
1210 | 1200 | |
1211 | 1201 | var |
@@ -1266,7 +1256,6 @@ const | ||
1266 | 1256 | USER_RESIZED = WM_USER + 2001; |
1267 | 1257 | USER_MINIMIZED = WM_USER + 2002; |
1268 | 1258 | USER_SETLINKBAR = WM_USER + 2003; |
1269 | - USER_DOCUMENTCOMPLETE = WM_USER + 2004; ///< wParam : TWebBrowser | |
1270 | 1259 | SELECTTIME_INTERBAL = 110; |
1271 | 1260 | |
1272 | 1261 | BROWSER_COUNT = 5; //ブラウザの数 |
@@ -1721,7 +1710,7 @@ begin | ||
1721 | 1710 | //Samba24のファイルチェック |
1722 | 1711 | GikoSys.SambaFileExists(); |
1723 | 1712 | |
1724 | - //にちゃん語ファイル読み出し | |
1713 | + //タブ自動読み込み (AV発生のため一時封印) | |
1725 | 1714 | end; |
1726 | 1715 | |
1727 | 1716 | // CoolBar の設定を変数に保存 |
@@ -1885,12 +1874,6 @@ begin | ||
1885 | 1874 | if GikoSys.Setting.TabAutoLoadSave then begin |
1886 | 1875 | TabAutoLoadAction.Execute; |
1887 | 1876 | end; |
1888 | - //にちゃん語案内サポート機能 | |
1889 | - if GikoSys.Setting.GengoSupport then begin | |
1890 | - //予定地 | |
1891 | - //Test向け | |
1892 | - end; | |
1893 | - | |
1894 | 1877 | FStartUp := true; |
1895 | 1878 | end; |
1896 | 1879 | end; |
@@ -2687,8 +2670,8 @@ begin | ||
2687 | 2670 | else |
2688 | 2671 | Item.SubItems[ idx ] := ''; |
2689 | 2672 | |
2690 | - gbcRoundDate://gbcLastModified: | |
2691 | - if (ThreadItem.RoundDate = ZERO_DATE) then begin | |
2673 | + gbcLastModified: | |
2674 | + if ThreadItem.RoundDate = ZERO_DATE then begin | |
2692 | 2675 | Item.SubItems[ idx ] := ''; |
2693 | 2676 | end else |
2694 | 2677 | Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate); |
@@ -2698,14 +2681,6 @@ begin | ||
2698 | 2681 | Item.SubItems[ idx ] := ''; |
2699 | 2682 | end else |
2700 | 2683 | 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 | 2684 | end; |
2710 | 2685 | Inc( idx ); |
2711 | 2686 | end; |
@@ -2726,18 +2701,18 @@ begin | ||
2726 | 2701 | gbcAllCount: |
2727 | 2702 | Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount); |
2728 | 2703 | |
2729 | - gbcRoundDate://gbcLastModified: | |
2730 | - Item.SubItems[ idx ] := ''; | |
2704 | + gbcLastModified: | |
2705 | + if not GikoSys.Setting.CreationTimeLogs then | |
2706 | + if ThreadItem.CreateDate = ZERO_DATE then | |
2707 | + Item.SubItems[ idx ] := '' | |
2708 | + else | |
2709 | + Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate); | |
2731 | 2710 | |
2732 | 2711 | gbcCreated: |
2733 | 2712 | if ThreadItem.CreateDate = ZERO_DATE then begin |
2734 | 2713 | Item.SubItems[ idx ] := ''; |
2735 | 2714 | end else |
2736 | 2715 | Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate); |
2737 | - | |
2738 | - gbcLastModified: | |
2739 | - Item.SubItems[ idx ] := ''; | |
2740 | - | |
2741 | 2716 | else |
2742 | 2717 | Item.SubItems[ idx ] := ''; |
2743 | 2718 | end; |
@@ -2794,7 +2769,7 @@ var | ||
2794 | 2769 | ActiveFileName: string; |
2795 | 2770 | e: IHTMLElement; |
2796 | 2771 | Ext: string; |
2797 | - buf, buf2: string; | |
2772 | + buf: string; | |
2798 | 2773 | PathRec: TPathRec; |
2799 | 2774 | begin |
2800 | 2775 | if not( TObject(Sender) is TWebBrowser )then |
@@ -2877,43 +2852,30 @@ begin | ||
2877 | 2852 | end else begin |
2878 | 2853 | threadItem := GetActiveContent; |
2879 | 2854 | if Pos('about:blank..', Text) = 1 then begin |
2880 | - wkInt := LastDelimiter( '/', threadItem.URL ); | |
2881 | - if Pos( '?', Copy( threadItem.URL, wkInt, MaxInt ) ) = 0 then begin | |
2882 | - // Thread.URL は PATH_INFO 渡し | |
2883 | - URL := Copy( threadItem.URL, 1, LastDelimiter( '/', threadItem.URL ) ); | |
2884 | - wkInt := LastDelimiter( '/', Text ); | |
2885 | - if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then | |
2886 | - // Text も PATH_INFO 渡し | |
2887 | - URL := URL + Copy( Text, LastDelimiter( '/', Text ) + 1, MaxInt ) | |
2888 | - else | |
2889 | - // Text は QUERY_STRING 渡し | |
2890 | - URL := URL + Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt ); | |
2855 | + if (AnsiPos('http://jbbs.livedoor.com/', threadItem.URL) <> 0) then begin | |
2856 | + URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL)); | |
2857 | + Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo); | |
2858 | + if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then | |
2859 | + buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo) | |
2860 | + else if( PathRec.FSt <> 0 ) then | |
2861 | + buf := IntToStr(PathRec.FSt); | |
2862 | + end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin | |
2863 | + URL := threaditem.URL; | |
2864 | + buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1); | |
2891 | 2865 | end else begin |
2892 | - // Thread.URL は QUERY_STRING 渡し | |
2893 | - URL := Copy( threadItem.URL, 1, LastDelimiter( '?', threadItem.URL ) ); | |
2894 | - wkInt := LastDelimiter( '/', Text ); | |
2895 | - if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then begin | |
2896 | - // Text は PATH_INFO 渡し | |
2897 | - // URL に板とキーが足らないので Text から頂戴する | |
2898 | - wkInt := LastDelimiter( '/', Copy( Text, 1, wkInt - 1 ) ); | |
2899 | - wkInt := LastDelimiter( '/', Copy( Text, 1, wkInt - 1 ) ); | |
2900 | - URL := Copy( URL, 1, Length( URL ) - 1 ) + Copy( Text, wkInt, MaxInt ); | |
2901 | - end else begin | |
2902 | - // Text も QUERY_STRING 渡し | |
2903 | - URL := URL + Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt ) | |
2904 | - end; | |
2866 | + URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL)); | |
2867 | + buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text)); | |
2905 | 2868 | end; |
2869 | + URL := URL + buf; | |
2906 | 2870 | end else begin |
2907 | 2871 | URL := Text; |
2908 | 2872 | end; |
2909 | - | |
2910 | 2873 | PathRec := Gikosys.Parse2chURL2(URL); |
2911 | 2874 | if (PathRec.FNoParam) then begin |
2912 | 2875 | PathRec.FSt := 1; |
2913 | 2876 | PathRec.FTo := 1; |
2914 | - end else begin | |
2877 | + end else | |
2915 | 2878 | Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo); |
2916 | - end; | |
2917 | 2879 | GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark ); |
2918 | 2880 | |
2919 | 2881 | if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin |
@@ -2940,10 +2902,10 @@ begin | ||
2940 | 2902 | // wkIntTo := 1; |
2941 | 2903 | //if PathRec.FFirst then |
2942 | 2904 | // wkIntSt := 1; |
2943 | - //if PathRec.FStBegin then //http://〜〜〜〜/-50というとき | |
2944 | - // wkIntSt := 1; // | |
2945 | - //if PathRec.FToEnd then //http://〜〜〜〜/50-というとき | |
2946 | - // wkIntTo := 9999; // どちらの場合も、GetPopupResNumberでうまく番号を調整するのでふよう。 | |
2905 | + if PathRec.FStBegin then | |
2906 | + wkIntSt := 1; | |
2907 | + if PathRec.FToEnd then | |
2908 | + wkIntTo := 9999; | |
2947 | 2909 | |
2948 | 2910 | //ATitle := ActiveFileName <> PathRec.FKey; |
2949 | 2911 | if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then |
@@ -3013,44 +2975,22 @@ end; | ||
3013 | 2975 | |
3014 | 2976 | procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word; |
3015 | 2977 | Shift: TShiftState); |
3016 | -var | |
3017 | - pos : TPoint; | |
3018 | 2978 | begin |
3019 | 2979 | if GetActiveList is TBoard then begin |
3020 | - case Key of | |
3021 | - VK_BACK:; // UpFolderButtonClick(Sender); | |
3022 | - VK_SPACE: ListDoubleClick(Shift); | |
3023 | - VK_RETURN: ListClick; | |
3024 | - VK_APPS: | |
3025 | - begin | |
3026 | - if ListView.Selected <> nil then begin | |
3027 | - pos.X := ListView.Column[ 0 ].Width; | |
3028 | - pos.Y := ListView.Selected.Top; | |
3029 | - end else begin | |
3030 | - pos.X := ListView.Left; | |
3031 | - pos.Y := ListView.Top; | |
3032 | - end; | |
3033 | - Windows.ClientToScreen( ListView.Handle, pos ); | |
3034 | - ListPopupMenu.Popup( pos.X, pos.Y ); | |
3035 | - end; | |
2980 | + if Key = VK_BACK then begin | |
2981 | +// UpFolderButtonClick(Sender); | |
2982 | + end else if Key = VK_SPACE then begin | |
2983 | + ListDoubleClick(Shift); | |
2984 | + end else if Key = VK_RETURN then begin | |
2985 | + ListClick; | |
3036 | 2986 | end; |
3037 | 2987 | end else begin // TBBS, TCategory |
3038 | - case Key of | |
3039 | - VK_BACK:; // UpFolderButtonClick(Sender); | |
3040 | - VK_SPACE: ListClick; | |
3041 | - VK_RETURN: ListDoubleClick(Shift); | |
3042 | - VK_APPS: | |
3043 | - begin | |
3044 | - if ListView.Selected <> nil then begin | |
3045 | - pos.X := ListView.Column[ 0 ].Width; | |
3046 | - pos.Y := ListView.Selected.Top; | |
3047 | - end else begin | |
3048 | - pos.X := ListView.Left; | |
3049 | - pos.Y := ListView.Top; | |
3050 | - end; | |
3051 | - Windows.ClientToScreen( ListView.Handle, pos ); | |
3052 | - ListPopupMenu.Popup( pos.X, pos.Y ); | |
3053 | - end; | |
2988 | + if Key = VK_BACK then begin | |
2989 | +// UpFolderButtonClick(Sender); | |
2990 | + end else if Key = VK_SPACE then begin | |
2991 | + ListClick; | |
2992 | + end else if Key = VK_RETURN then begin | |
2993 | + ListDoubleClick(Shift); | |
3054 | 2994 | end; |
3055 | 2995 | end; |
3056 | 2996 | end; |
@@ -3067,11 +3007,9 @@ Delphi 6 Personal | ||
3067 | 3007 | 正しいカラムが渡されないため、正しいカラムに変換します。 |
3068 | 3008 | *} |
3069 | 3009 | function TGikoForm.ActiveListTrueColumn( column : TListColumn ) : TListColumn; |
3070 | -{* | |
3071 | 3010 | var |
3072 | 3011 | i, idx : Integer; |
3073 | 3012 | orderList : TList; |
3074 | -*} | |
3075 | 3013 | begin |
3076 | 3014 | |
3077 | 3015 | // 正しく変換する方法が分からないので保留 |
@@ -3185,8 +3123,6 @@ begin | ||
3185 | 3123 | GikoSys.Setting.BoardSortIndex := id; |
3186 | 3124 | GikoSys.Setting.BoardSortOrder := FSortOrder; |
3187 | 3125 | wkBoard.CustomSort(ThreadItemSortProc); |
3188 | - end else begin | |
3189 | - id := 0; | |
3190 | 3126 | end; |
3191 | 3127 | |
3192 | 3128 | ListView.Refresh; |
@@ -3459,7 +3395,6 @@ var | ||
3459 | 3395 | s: string; |
3460 | 3396 | boardPlugIn : TBoardPlugIn; |
3461 | 3397 | i: Integer; |
3462 | - browserRec : TBrowserRecord; | |
3463 | 3398 | begin |
3464 | 3399 | try |
3465 | 3400 | if Item.DownType = gdtBoard then |
@@ -3494,27 +3429,21 @@ begin | ||
3494 | 3429 | ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle; |
3495 | 3430 | end; |
3496 | 3431 | for i := BrowserTab.Tabs.Count - 1 downto 0 do begin |
3497 | - if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then begin | |
3432 | + if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then | |
3498 | 3433 | TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true; |
3499 | - break; | |
3500 | - end; | |
3501 | 3434 | end; |
3502 | 3435 | if GikoSys.Setting.BrowserTabVisible then begin |
3503 | 3436 | if GetActiveContent = Item.ThreadItem then |
3504 | - browserRec := InsertBrowserTab(Item.ThreadItem) | |
3437 | + InsertBrowserTab(Item.ThreadItem) | |
3505 | 3438 | else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then |
3506 | - browserRec := InsertBrowserTab(Item.ThreadItem, True) | |
3439 | + InsertBrowserTab(Item.ThreadItem, True) | |
3507 | 3440 | else |
3508 | - browserRec := InsertBrowserTab(Item.ThreadItem, False); | |
3509 | - if browserRec.Thread = BrowserNullTab.Thread then begin | |
3510 | - browserRec.Movement := BrowserNullTab.Movement; | |
3511 | - BrowserNullTab.Movement := ''; | |
3512 | - end; | |
3441 | + InsertBrowserTab(Item.ThreadItem, False); | |
3513 | 3442 | end else begin |
3514 | 3443 | if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then |
3515 | 3444 | InsertBrowserTab(Item.ThreadItem); |
3516 | 3445 | end; |
3517 | - Application.ProcessMessages; | |
3446 | + | |
3518 | 3447 | if Item.State = gdsComplete then begin |
3519 | 3448 | PlaySound('New'); |
3520 | 3449 | AddMessageList(ATitle + ' [スレ取得完了]', nil, gmiOK); |
@@ -3642,17 +3571,14 @@ begin | ||
3642 | 3571 | end; |
3643 | 3572 | end;} |
3644 | 3573 | |
3645 | -function TGikoForm.InsertBrowserTab( | |
3646 | - ThreadItem : TThreadItem; | |
3647 | - ActiveTab : Boolean = True | |
3648 | -) : TBrowserRecord; | |
3574 | +procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True); | |
3575 | + | |
3649 | 3576 | var |
3650 | - i, j, idx : Integer; | |
3651 | - favItem : TFavoriteThreadItem; | |
3577 | + i, j, idx: Integer; | |
3578 | + favItem : TFavoriteThreadItem; | |
3652 | 3579 | newBrowser : TBrowserRecord; |
3653 | 3580 | begin |
3654 | 3581 | |
3655 | - Result := nil; | |
3656 | 3582 | if Threaditem = nil then Exit; |
3657 | 3583 | |
3658 | 3584 | if ThreadItem.IsLogFile then begin |
@@ -3671,7 +3597,6 @@ begin | ||
3671 | 3597 | for i := 0 to BrowserTab.Tabs.Count - 1 do begin |
3672 | 3598 | if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin |
3673 | 3599 | if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin |
3674 | - Result := TBrowserRecord( BrowserTab.Tabs.Objects[i] ); | |
3675 | 3600 | if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin |
3676 | 3601 | for j := BrowserTab.Tabs.Count - 1 downto 0 do begin |
3677 | 3602 | if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin |
@@ -3758,7 +3683,6 @@ begin | ||
3758 | 3683 | BrowserTab.TabIndex := i; |
3759 | 3684 | end; |
3760 | 3685 | end; |
3761 | - Result := newBrowser; | |
3762 | 3686 | if(ActiveTab) or (idx = -1) then begin |
3763 | 3687 | BrowserTab.OnChange(nil); |
3764 | 3688 | end; |
@@ -3768,7 +3692,6 @@ begin | ||
3768 | 3692 | BrowserNullTab.Browser := Browser; |
3769 | 3693 | end; |
3770 | 3694 | BrowserNullTab.thread := ThreadItem; |
3771 | - Result := BrowserNullTab; | |
3772 | 3695 | BrowserTab.TabIndex := -1; |
3773 | 3696 | SetContent(BrowserNullTab); |
3774 | 3697 | end; |
@@ -3788,6 +3711,7 @@ var | ||
3788 | 3711 | s: string; |
3789 | 3712 | // OldCursor: TCursor; |
3790 | 3713 | i: Integer; |
3714 | + url: OleVariant; | |
3791 | 3715 | idx: Integer; |
3792 | 3716 | ThreadItem: TThreadItem; |
3793 | 3717 | Thread: TBrowserRecord; |
@@ -3795,7 +3719,6 @@ var | ||
3795 | 3719 | ThreadScrollTop: Integer; |
3796 | 3720 | ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean; |
3797 | 3721 | begin |
3798 | -// AddMessageList('SetContent', nil, gmiWhat); | |
3799 | 3722 | Thread := inThread; |
3800 | 3723 | idx := BrowserTab.TabIndex; |
3801 | 3724 | if (FActiveContent <> nil) and |
@@ -3859,13 +3782,11 @@ begin | ||
3859 | 3782 | |
3860 | 3783 | |
3861 | 3784 | try |
3862 | - { | |
3863 | 3785 | if ThreadItem.UnRead then begin |
3864 | 3786 | ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; |
3865 | 3787 | if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0; |
3866 | 3788 | TreeView.Refresh; |
3867 | 3789 | end; |
3868 | - } | |
3869 | 3790 | if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin |
3870 | 3791 | if (FActiveContent.Browser <> BrowserNullTab.Browser) then |
3871 | 3792 | ShowWindow(FActiveContent.Browser.Handle, SW_HIDE); |
@@ -3898,21 +3819,55 @@ begin | ||
3898 | 3819 | Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']'; |
3899 | 3820 | //Thread.Repaintは、スキン等の設定を変更したとき、Threadをダウンロードしたとき |
3900 | 3821 | //新規にThreadを開いたときに真になっている。 |
3822 | +// if(Thread.Repaint) or (Thread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin | |
3901 | 3823 | if Thread.Repaint then begin |
3902 | 3824 | //Thread.LastSize := ThreadItem.Size; |
3903 | 3825 | Thread.Repaint := false; |
3904 | - | |
3905 | - Thread.Browser.OnStatusTextChange := nil; | |
3906 | - doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2; | |
3907 | - GikoSys.CreateHTML2(doc, ThreadItem, sTitle); | |
3908 | - Thread.Browser.OnStatusTextChange := BrowserStatusTextChange; | |
3909 | - PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( Thread.Browser ), 0 ); | |
3910 | - if ThreadItem = nil then begin | |
3911 | - FActiveContent := nil; | |
3912 | - BrowserTab.Repaint; | |
3913 | - Exit; | |
3826 | + try | |
3827 | + Thread.Browser.OnStatusTextChange := nil; | |
3828 | + doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2; | |
3829 | + GikoSys.CreateHTML2(doc, ThreadItem, sTitle); | |
3830 | + | |
3831 | + // if (Assigned(Thread.Browser)) and (Thread.Browser <> nil) then | |
3832 | + Thread.Browser.OnStatusTextChange := BrowserStatusTextChange; | |
3833 | + //なぜかここで明示的にDocumentCompleteを呼ばないとうまくいかない | |
3834 | + //追記 200406/19 | |
3835 | + //VisibleのときしかDocumentCompleteは呼ばれないらしい | |
3836 | + Thread.FBrowser.OnDocumentComplete(Thread.FBrowser, Thread.FBrowser.Parent, url); | |
3837 | +// Thread.OnlyHundred := GikoSys.OnlyAHundredRes; | |
3838 | + Application.ProcessMessages; | |
3839 | + //ここでApplication.ProcessMessagesを呼ぶことによってWebBrowserを更新させる。 | |
3840 | + //相しないと一画面分しか描画できてないのでそれ以上のスクロール量を指定しても無効になる | |
3841 | + // byもじゅ(2004/01/20) | |
3842 | + try | |
3843 | + //if (Assigned(Thread)) and (Assigned(ThreadItem))then begin | |
3844 | + if(Thread <> nil) and (ThreadItem <>nil) then begin | |
3845 | + if ThreadUnRead then | |
3846 | + BrowserMovement('new', Thread) | |
3847 | + else if ThreadScrollTop <> 0 then begin | |
3848 | + try | |
3849 | + doc.Body.ScrollTop := ThreadScrollTop; | |
3850 | + except | |
3851 | + on E: Exception do | |
3852 | + MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0); | |
3853 | + end; | |
3854 | + end; | |
3855 | + // end; | |
3856 | + end else begin | |
3857 | + FActiveContent := nil; | |
3858 | + BrowserTab.Repaint; | |
3859 | + Exit; | |
3860 | + end; | |
3861 | + except | |
3862 | + FActiveContent := nil; | |
3863 | + BrowserTab.Repaint; | |
3864 | + Exit; | |
3865 | + end; | |
3866 | + finally | |
3867 | + // Application.ProcessMessages; | |
3914 | 3868 | end; |
3915 | 3869 | end; |
3870 | + ThreadItem.UnRead := False; | |
3916 | 3871 | ListView.Refresh; |
3917 | 3872 | end; |
3918 | 3873 | if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin |
@@ -4008,16 +3963,12 @@ end; | ||
4008 | 3963 | procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); |
4009 | 3964 | var |
4010 | 3965 | Board: TBoard; |
4011 | - i: Integer; | |
4012 | 3966 | begin |
4013 | 3967 | if ActiveList is TBoard then begin |
4014 | - for i := Length( BBSs ) - 1 downto 0 do begin | |
4015 | - BBSs[i].SelectText := SelectText; | |
4016 | - BBSs[i].KubetsuChk := KubetsuChk; | |
4017 | - end; | |
4018 | 3968 | Board := TBoard(ActiveList); |
4019 | -// Board.ParentCategory.ParenTBBS.SelectText := SelectText; | |
4020 | -// Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk; | |
3969 | + | |
3970 | + Board.ParentCategory.ParenTBBS.SelectText := SelectText; | |
3971 | + Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk; | |
4021 | 3972 | // Board.SelectText := SelectText; |
4022 | 3973 | // Board.KubetsuChk := KubetsuChk; |
4023 | 3974 | ViewType := AViewType; |
@@ -4596,7 +4547,6 @@ procedure TGikoForm.ListViewMouseDown(Sender: TObject; | ||
4596 | 4547 | var |
4597 | 4548 | listItem : TListItem; |
4598 | 4549 | threadItem : TThreadItem; |
4599 | - pos : TPoint; | |
4600 | 4550 | // t: Cardinal; |
4601 | 4551 | begin |
4602 | 4552 | case Button of |
@@ -4620,13 +4570,6 @@ begin | ||
4620 | 4570 | else |
4621 | 4571 | ListClick; |
4622 | 4572 | end; |
4623 | - mbRight: | |
4624 | - begin | |
4625 | - pos.X := X; | |
4626 | - pos.Y := Y; | |
4627 | - Windows.ClientToScreen( ListView.Handle, pos ); | |
4628 | - ListPopupMenu.Popup( pos.X, pos.Y ); | |
4629 | - end; | |
4630 | 4573 | end; |
4631 | 4574 | { if ssDouble in Shift then begin |
4632 | 4575 | DoubleClickOccurred[Button] := True; |
@@ -4753,11 +4696,11 @@ begin | ||
4753 | 4696 | top := 0; |
4754 | 4697 | nm := AName; |
4755 | 4698 | item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm); |
4756 | - item.focus(); | |
4757 | 4699 | repeat |
4758 | 4700 | top := top + item.offsetTop; |
4759 | 4701 | item := item.offsetParent; |
4760 | 4702 | until AnsiCompareText(item.tagName, 'body' ) = 0; |
4703 | + | |
4761 | 4704 | OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top; |
4762 | 4705 | except |
4763 | 4706 | end; |
@@ -4785,7 +4728,6 @@ begin | ||
4785 | 4728 | top := 0; |
4786 | 4729 | nm := AName; |
4787 | 4730 | item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm); |
4788 | - item.focus(); | |
4789 | 4731 | repeat |
4790 | 4732 | top := top + item.offsetTop; |
4791 | 4733 | item := item.offsetParent; |
@@ -6658,13 +6600,11 @@ var | ||
6658 | 6600 | FDispHtmlDocument: DispHTMLDocument; |
6659 | 6601 | BrowserRecord :TBrowserRecord; |
6660 | 6602 | i :Integer; |
6661 | - doc : Variant; | |
6662 | - threadItem : TThreadItem; | |
6663 | 6603 | begin |
6664 | -// AddMessageList('DocumentComplete', nil, gmiWhat); | |
6604 | +// AddMessageList('DocumentComplete', nil); | |
6665 | 6605 | if TObject(Sender) is TWebBrowser then begin |
6666 | - BrowserRecord := nil; | |
6667 | 6606 | if TWebBrowser(Sender) <> Browser then begin |
6607 | + BrowserRecord := nil; | |
6668 | 6608 | for i := BrowserTab.Tabs.Count - 1 downto 0 do begin |
6669 | 6609 | if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin |
6670 | 6610 | BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]); |
@@ -6680,7 +6620,7 @@ begin | ||
6680 | 6620 | BrowserRecord.FEvent.OnClick := WebBrowserClick; //追加したOnClickイベント |
6681 | 6621 | end; |
6682 | 6622 | end else begin |
6683 | - if GetActiveContent <> nil then begin | |
6623 | + if GetActiveContent <> nil then begin | |
6684 | 6624 | FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument; |
6685 | 6625 | if FEvent <> nil then |
6686 | 6626 | FEvent.Free; |
@@ -6689,38 +6629,6 @@ begin | ||
6689 | 6629 | FEvent.OnClick := WebBrowserClick; //追加したOnClickイベント |
6690 | 6630 | end; |
6691 | 6631 | end; |
6692 | - | |
6693 | - if (BrowserRecord <> nil) and | |
6694 | - Assigned( BrowserRecord.Thread ) then begin | |
6695 | - threadItem := BrowserRecord.Thread; | |
6696 | - | |
6697 | - if (BrowserRecord <> nil) and (Length( BrowserRecord.Movement ) > 0) then begin | |
6698 | - if threadItem.UnRead then begin | |
6699 | - threadItem.UnRead := False; | |
6700 | - threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; | |
6701 | - if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0; | |
6702 | - TreeView.Refresh; | |
6703 | - ListView.Refresh; | |
6704 | - end; | |
6705 | - BrowserMovement( BrowserRecord.Movement, BrowserRecord ); | |
6706 | - BrowserRecord.Movement := ''; | |
6707 | - end else if threadItem.UnRead then begin | |
6708 | - threadItem.UnRead := False; | |
6709 | - threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; | |
6710 | - if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0; | |
6711 | - TreeView.Refresh; | |
6712 | - BrowserMovement( 'new', BrowserRecord ); | |
6713 | - ListView.Refresh; | |
6714 | - end else if threadItem.ScrollTop <> 0 then begin | |
6715 | - try | |
6716 | - doc := Idispatch( OleVariant( BrowserRecord.Browser.ControlInterface ).Document ) as IHTMLDocument2; | |
6717 | - doc.Body.ScrollTop := threadItem.ScrollTop; | |
6718 | - except | |
6719 | - on E: Exception do | |
6720 | - MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0); | |
6721 | - end; | |
6722 | - end; | |
6723 | - end; | |
6724 | 6632 | end; |
6725 | 6633 | end; |
6726 | 6634 |
@@ -7494,10 +7402,11 @@ begin | ||
7494 | 7402 | end; |
7495 | 7403 | end; |
7496 | 7404 | |
7497 | -procedure TGikoForm.MoveToURL(const inURL: string); | |
7405 | +procedure TGikoForm.MoveToURL(URL: string); | |
7406 | + | |
7498 | 7407 | var |
7499 | 7408 | protocol, host, path, document, port, bookmark : string; |
7500 | - URL, protocol2, host2, path2, document2, port2, bookmark2 : string; | |
7409 | + URL2, protocol2, host2, path2, document2, port2, bookmark2 : string; | |
7501 | 7410 | tmp1, tmp2: string; |
7502 | 7411 | BBSID, BBSKey: string; |
7503 | 7412 | tmpBoard, Board: TBoard; |
@@ -7510,22 +7419,20 @@ var | ||
7510 | 7419 | // boardNode : TTreeNode; |
7511 | 7420 | shiftDown : Boolean; |
7512 | 7421 | ctrlDown : Boolean; |
7513 | - stRes, edRes : Int64; | |
7514 | - browserRec : TBrowserRecord; | |
7515 | 7422 | begin |
7516 | 7423 | |
7517 | - GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark ); | |
7518 | - GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey ); | |
7424 | + GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark ); | |
7425 | + GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey ); | |
7519 | 7426 | |
7520 | 7427 | |
7521 | 7428 | shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001); |
7522 | - ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001); | |
7523 | - if shiftDown then begin | |
7524 | - GikoSys.OpenBrowser(inURL, gbtUserApp); | |
7525 | - Exit; | |
7526 | - end else if ctrlDown then begin | |
7527 | - GikoSys.OpenBrowser(inURL, gbtIE); | |
7528 | - Exit; | |
7429 | + ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001); | |
7430 | + if shiftDown then begin | |
7431 | + GikoSys.OpenBrowser(URL, gbtUserApp); | |
7432 | + Exit; | |
7433 | + end else if ctrlDown then begin | |
7434 | + GikoSys.OpenBrowser(URL, gbtIE); | |
7435 | + Exit; | |
7529 | 7436 | end; |
7530 | 7437 | |
7531 | 7438 | //===== プラグイン |
@@ -7534,16 +7441,15 @@ begin | ||
7534 | 7441 | bi := High( BoardPlugIns ); |
7535 | 7442 | for i := Low( BoardPlugIns ) to bi do begin |
7536 | 7443 | if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin |
7537 | - case BoardPlugIns[ i ].AcceptURL( inURL ) of | |
7444 | + case BoardPlugIns[ i ].AcceptURL( URL ) of | |
7538 | 7445 | atThread: |
7539 | 7446 | begin |
7540 | - tmpThread := TThreadItem.Create( BoardPlugIns[ i ], inURL ); | |
7447 | + tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL ); | |
7541 | 7448 | boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) ); |
7542 | 7449 | Board := BBSsFindBoardFromURL( boardURL ); |
7543 | 7450 | if Board = nil then begin |
7544 | - //break; | |
7545 | 7451 | // ※作っても追加するところが無いので激しく保留 |
7546 | - //GikoSys.OpenBrowser(inURL, gbtUserApp); | |
7452 | + //GikoSys.OpenBrowser(URL, gbtUserApp); | |
7547 | 7453 | //Exit; |
7548 | 7454 | { |
7549 | 7455 | Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL ); |
@@ -7555,40 +7461,34 @@ begin | ||
7555 | 7461 | GikoSys.ReadSubjectFile( Board ); |
7556 | 7462 | Exit; |
7557 | 7463 | end; |
7558 | - ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName ); | |
7559 | - if ThreadItem = nil then begin | |
7560 | - ThreadItem := tmpThread; | |
7561 | - Board.Insert( 0, ThreadItem ); | |
7562 | - if ActiveList is TBoard then begin | |
7563 | - if TBoard(ActiveList) = Board then | |
7564 | - ListView.Items.Count := ListView.Items.Count + 1; | |
7565 | - end; | |
7566 | - GikoSys.GetPopupResNumber( inURL, stRes, edRes ); | |
7567 | - browserRec := InsertBrowserTab( ThreadItem ); | |
7568 | - if (browserRec <> nil) and (stRes > 0) then | |
7569 | - browserRec.Movement := IntToStr( stRes ); | |
7464 | + end; | |
7465 | + | |
7466 | + ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName ); | |
7467 | + if ThreadItem = nil then begin | |
7468 | + ThreadItem := tmpThread; | |
7469 | + Board.Insert( 0, ThreadItem ); | |
7470 | + if ActiveList is TBoard then begin | |
7471 | + if TBoard(ActiveList) = Board then | |
7472 | + ListView.Items.Count := ListView.Items.Count + 1; | |
7473 | + end; | |
7474 | + InsertBrowserTab( ThreadItem ); | |
7475 | + DownloadContent( ThreadItem ); | |
7476 | + Exit; | |
7477 | + end else begin | |
7478 | + tmpThread.Free; | |
7479 | + InsertBrowserTab( ThreadItem ); | |
7480 | + if not ThreadItem.IsLogFile then begin | |
7570 | 7481 | DownloadContent( ThreadItem ); |
7571 | - Exit; | |
7572 | - end else begin | |
7573 | - tmpThread.Free; | |
7574 | - GikoSys.GetPopupResNumber( inURL, stRes, edRes ); | |
7575 | - browserRec := InsertBrowserTab( ThreadItem ); | |
7576 | - if ThreadItem.IsLogFile then begin | |
7577 | - if (browserRec <> nil) and (stRes > 0) then | |
7578 | - BrowserMovement( IntToStr( stRes ), browserRec ); | |
7579 | - end else begin | |
7580 | - if (browserRec <> nil) and (stRes > 0) then | |
7581 | - browserRec.Movement := IntToStr( stRes ); | |
7582 | - DownloadContent( ThreadItem ); | |
7583 | - end; | |
7584 | - Exit; | |
7585 | 7482 | end; |
7483 | + Exit; | |
7586 | 7484 | end; |
7485 | + | |
7486 | + //Exit; | |
7587 | 7487 | end; |
7588 | 7488 | |
7589 | 7489 | atBoard: |
7590 | 7490 | begin |
7591 | - tmpBoard := TBoard.Create(BoardPlugIns[ i ], inURL); | |
7491 | + tmpBoard := TBoard.Create(BoardPlugIns[ i ], URL); | |
7592 | 7492 | Board := BBSsFindBoardFromURL( tmpBoard.URL ); |
7593 | 7493 | tmpBoard.Free; |
7594 | 7494 | if Board <> nil then begin |
@@ -7607,7 +7507,7 @@ begin | ||
7607 | 7507 | |
7608 | 7508 | |
7609 | 7509 | if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin |
7610 | - boardURL := GikoSys.Get2chThreadURL2BoardURL( inURL ); | |
7510 | + boardURL := GikoSys.Get2chThreadURL2BoardURL( URL ); | |
7611 | 7511 | Board := BBSsFindBoardFromURL( boardURL ); |
7612 | 7512 | if Board = nil then |
7613 | 7513 | Board := BBSsFindBoardFromBBSID( BBSID ); |
@@ -7619,23 +7519,23 @@ begin | ||
7619 | 7519 | end; |
7620 | 7520 | if Board = nil then begin |
7621 | 7521 | // 入るべき板が見つからなかったので、普通のブラウザで開く |
7622 | - GikoSys.OpenBrowser(inURL, gbtUserApp); | |
7522 | + GikoSys.OpenBrowser(URL, gbtUserApp); | |
7623 | 7523 | Exit; |
7624 | 7524 | end else begin |
7625 | 7525 | // 外部の板なのに2chのURLにされてしまった奴をここで確認する |
7626 | - URL := Board.URL; | |
7627 | - GikoSys.ParseURI(URL , protocol2, host2, path2, document2, port2, bookmark2 ); | |
7526 | + URL2 := Board.URL; | |
7527 | + GikoSys.ParseURI(URL2 , protocol2, host2, path2, document2, port2, bookmark2 ); | |
7628 | 7528 | tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host)); |
7629 | 7529 | tmp2 := Copy(host2, AnsiPos('.', host2) + 1, Length(host2)); |
7630 | 7530 | if ( not GikoSys.Is2chHost(tmp1)) and (tmp1 <> tmp2) then begin |
7631 | - GikoSys.OpenBrowser(inURL, gbtUserApp); | |
7531 | + GikoSys.OpenBrowser(URL, gbtUserApp); | |
7632 | 7532 | Exit; |
7633 | 7533 | end; |
7634 | 7534 | end; |
7635 | 7535 | |
7636 | 7536 | if not Board.IsThreadDatRead then |
7637 | 7537 | GikoSys.ReadSubjectFile(Board); |
7638 | - URL := GikoSys.Get2chBrowsableThreadURL( inURL ); | |
7538 | + URL := GikoSys.Get2chBrowsableThreadURL( URL ); | |
7639 | 7539 | ThreadItem := Board.FindThreadFromURL( URL ); |
7640 | 7540 | // 過去ログ倉庫から、ダウソしたスレが発見できないのでここで探すようにする (2004/01/22) |
7641 | 7541 | if ThreadItem = nil then begin |
@@ -7648,9 +7548,9 @@ begin | ||
7648 | 7548 | {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001); |
7649 | 7549 | ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001); |
7650 | 7550 | if shiftDown then |
7651 | - GikoSys.OpenBrowser(URL1, gbtUserApp) | |
7551 | + GikoSys.OpenBrowser(URL, gbtUserApp) | |
7652 | 7552 | else if ctrlDown then |
7653 | - GikoSys.OpenBrowser(URL1, gbtIE) | |
7553 | + GikoSys.OpenBrowser(URL, gbtIE) | |
7654 | 7554 | else begin |
7655 | 7555 | } |
7656 | 7556 | ThreadItem := TThreadItem.Create( nil, URL ); |
@@ -7664,34 +7564,25 @@ begin | ||
7664 | 7564 | if TBoard(ActiveList) = Board then |
7665 | 7565 | ListView.Items.Count := ListView.Items.Count + 1; |
7666 | 7566 | end; |
7667 | - GikoSys.GetPopupResNumber( inURL, stRes, edRes ); | |
7668 | - browserRec := InsertBrowserTab(ThreadItem); | |
7669 | - if (browserRec <> nil) and (stRes > 0) then | |
7670 | - browserRec.Movement := IntToStr( stRes ); | |
7567 | + InsertBrowserTab(ThreadItem); | |
7671 | 7568 | DownloadContent(ThreadItem); |
7672 | 7569 | {end;} |
7673 | 7570 | end else begin |
7674 | - if ThreadItem.IsLogFile then begin | |
7675 | - GikoSys.GetPopupResNumber( inURL, stRes, edRes ); | |
7676 | - browserRec := InsertBrowserTab(ThreadItem); | |
7677 | - if (browserRec <> nil) and (stRes > 0) then | |
7678 | - browserRec.Movement := IntToStr( stRes ); | |
7679 | - end else begin | |
7571 | + if ThreadItem.IsLogFile then | |
7572 | + InsertBrowserTab(ThreadItem) | |
7573 | + else begin | |
7680 | 7574 | if AnsiPos(Host, Board.URL) = 0 then |
7681 | 7575 | ThreadItem.DownloadHost := Host |
7682 | 7576 | else |
7683 | 7577 | ThreadItem.DownloadHost := ''; |
7684 | - GikoSys.GetPopupResNumber( inURL, stRes, edRes ); | |
7685 | - browserRec := InsertBrowserTab(ThreadItem); | |
7686 | - if (browserRec <> nil) and (stRes > 0) then | |
7687 | - browserRec.Movement := IntToStr( stRes ); | |
7578 | + InsertBrowserTab(ThreadItem); | |
7688 | 7579 | DownloadContent(ThreadItem); |
7689 | 7580 | end; |
7690 | 7581 | end; |
7691 | 7582 | end else begin |
7692 | - Board := BBSsFindBoardFromURL( inURL ); | |
7583 | + Board := BBSsFindBoardFromURL( URL ); | |
7693 | 7584 | if Board = nil then begin |
7694 | - GikoSys.OpenBrowser(inURL, gbtAuto); | |
7585 | + GikoSys.OpenBrowser(URL, gbtAuto); | |
7695 | 7586 | end else begin |
7696 | 7587 | if FActiveBBS <> Board.ParentCategory.ParenTBBS then |
7697 | 7588 | ShowBBSTree( Board.ParentCategory.ParenTBBS ); |
@@ -7737,9 +7628,6 @@ begin | ||
7737 | 7628 | end; |
7738 | 7629 | |
7739 | 7630 | procedure TGikoForm.WndProc(var Message: TMessage); |
7740 | -var | |
7741 | - senderBrowser : TWebBrowser; | |
7742 | - url : OleVariant; | |
7743 | 7631 | begin |
7744 | 7632 | try |
7745 | 7633 | case Message.Msg of |
@@ -7757,12 +7645,6 @@ begin | ||
7757 | 7645 | OnMinimized; |
7758 | 7646 | USER_SETLINKBAR: |
7759 | 7647 | SetLinkBar; |
7760 | - USER_DOCUMENTCOMPLETE: | |
7761 | - if (Message.WParam <> 0) and | |
7762 | - (TObject(Message.WParam) is TWebBrowser) then begin | |
7763 | - senderBrowser := TWebBrowser( Message.WParam ); | |
7764 | - BrowserDocumentComplete( senderBrowser, senderBrowser.Parent, url ); | |
7765 | - end; | |
7766 | 7648 | end; |
7767 | 7649 | |
7768 | 7650 | inherited; |
@@ -8679,7 +8561,7 @@ begin | ||
8679 | 8561 | end; |
8680 | 8562 | end; |
8681 | 8563 | // 設定 |
8682 | - lResult := SendMessage( bar.Handle, RB_SETBANDINFO, idx, Integer( pBandInfo ) ); | |
8564 | + lResult := SendMessage( bar.Handle, RB_SETBANDINFO, i, Integer( pBandInfo ) ); | |
8683 | 8565 | |
8684 | 8566 | end; |
8685 | 8567 |
@@ -8924,11 +8806,12 @@ procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState; | ||
8924 | 8806 | var |
8925 | 8807 | Wnd: THandle; |
8926 | 8808 | delta: Integer; |
8927 | -// browserPos : TPoint; | |
8809 | +// msg: TMessage; | |
8928 | 8810 | const |
8929 | 8811 | ICON_SIZE = 16; |
8930 | 8812 | begin |
8931 | - Wnd := WindowFromPoint(Mouse.CursorPos); | |
8813 | + Handled := False; | |
8814 | + Wnd := WindowFromPoint(MousePos); | |
8932 | 8815 | Handled := True; |
8933 | 8816 | if WheelDelta > 0 then |
8934 | 8817 | Delta := -1 |
@@ -8938,42 +8821,13 @@ begin | ||
8938 | 8821 | if (Wnd = BrowserTab.Handle) or |
8939 | 8822 | (Wnd = BrowserTab.Parent.Handle) then begin |
8940 | 8823 | BrowserTab.ScrollTabs(Delta); |
8824 | + end else if Wnd = ListView.Handle then begin | |
8825 | + if ListView.ViewStyle = vsList then | |
8826 | + ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 ) | |
8827 | + else | |
8828 | + ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE ); | |
8941 | 8829 | end else begin |
8942 | - if FIsHandledWheel then begin | |
8943 | - FIsHandledWheel := False; | |
8944 | - Handled := False; | |
8945 | - end else begin | |
8946 | - FIsHandledWheel := True; | |
8947 | - if (Wnd = TreeView.Handle) or (Wnd = FavoriteTreeView.Handle) | |
8948 | - or (Wnd = ListView.Handle) or (Wnd = MessageListView.Handle) | |
8949 | - then | |
8950 | - SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y ) | |
8951 | - else | |
8952 | - Handled := False; | |
8953 | - | |
8954 | -{ | |
8955 | -// if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin | |
8956 | - // TWebBrowser の Handle と比較しても一致しないので座標で TWebBrowser かどうか判定 | |
8957 | - browserPos.X := 0; | |
8958 | - browserPos.Y := 0; | |
8959 | - Windows.ClientToScreen( Browser.Handle, browserPos ); | |
8960 | - if (Longword(Mouse.CursorPos.X - browserPos.X) >= Browser.Width) | |
8961 | - or (Longword(Mouse.CursorPos.Y - browserPos.Y) >= Browser.Height) | |
8962 | - or (Longword(Mouse.CursorPos.Y - browserPos.Y) < 0) | |
8963 | - or (Longword(Mouse.CursorPos.Y - browserPos.Y) < 0) then begin | |
8964 | -// or not FActiveContent.Browser.Focused then | |
8965 | - // TWebBrowser は無限ループするのでそれ以外ならコントロールに送信 | |
8966 | - if (Wnd <> BrowserToolBar.Handle) and (Wnd <> BrowserNameToolBar.Handle) then | |
8967 | - SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y ) | |
8968 | - else | |
8969 | - Handled := False; | |
8970 | - end else begin | |
8971 | - Handled := False; | |
8972 | - end; | |
8973 | -// end else begin | |
8974 | -// SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (MousePos.X shl 16) or MousePos.Y ); | |
8975 | -// end; | |
8976 | -} end; | |
8830 | + Handled := False; | |
8977 | 8831 | end; |
8978 | 8832 | end; |
8979 | 8833 |
@@ -9010,10 +8864,9 @@ begin | ||
9010 | 8864 | ModifySelectList; |
9011 | 8865 | end else if Length( SelectComboBox.Text ) = 0 then |
9012 | 8866 | begin |
9013 | - {* SelectComboBox.Textが空でも、入力途中でEscしたとか | |
9014 | - * 空のときにDelキーを押したとかなので、スレの絞込みを維持する。 | |
9015 | - * (ここでは何もしない) | |
9016 | - *} | |
8867 | + AllItemAction.Checked := True; | |
8868 | + LogItemAction.Checked := False; | |
8869 | + NewItemAction.Checked := False; | |
9017 | 8870 | end else begin |
9018 | 8871 | // チラつくと嫌だから、一応押してあるときだけ処理する |
9019 | 8872 | if AllItemAction.Checked then |
@@ -9648,26 +9501,25 @@ end; | ||
9648 | 9501 | procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word; |
9649 | 9502 | Shift: TShiftState); |
9650 | 9503 | begin |
9651 | - if not TTreeView(Sender).IsEditing then begin | |
9652 | - Case Key of | |
9653 | - VK_F2: | |
9654 | - begin | |
9655 | - FClickNode := FavoriteTreeView.Selected; | |
9656 | - FavoriteTreeViewRenameActionExecute( Sender ); | |
9657 | - end; | |
9658 | - VK_DELETE: | |
9659 | - begin | |
9660 | - FClickNode := FavoriteTreeView.Selected; | |
9661 | - FavoriteTreeViewDeleteActionExecute( Sender ); | |
9662 | - end; | |
9663 | - VK_RETURN: | |
9664 | - begin | |
9665 | - FavoriteClick( FavoriteTreeView.Selected ); | |
9666 | - FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded; | |
9667 | - end; | |
9668 | - VK_SPACE: | |
9669 | - FavoriteTreeViewDblClick( Sender ); | |
9504 | + | |
9505 | + Case Key of | |
9506 | + VK_F2: | |
9507 | + begin | |
9508 | + FClickNode := FavoriteTreeView.Selected; | |
9509 | + FavoriteTreeViewRenameActionExecute( Sender ); | |
9510 | + end; | |
9511 | + VK_DELETE: | |
9512 | + begin | |
9513 | + FClickNode := FavoriteTreeView.Selected; | |
9514 | + FavoriteTreeViewDeleteActionExecute( Sender ); | |
9670 | 9515 | end; |
9516 | + VK_RETURN: | |
9517 | + begin | |
9518 | + FavoriteClick( FavoriteTreeView.Selected ); | |
9519 | + FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded; | |
9520 | + end; | |
9521 | + VK_SPACE: | |
9522 | + FavoriteTreeViewDblClick( Sender ); | |
9671 | 9523 | end; |
9672 | 9524 | |
9673 | 9525 | end; |
@@ -10062,7 +9914,7 @@ begin | ||
10062 | 9914 | ThreadItem := FavThread.Item; |
10063 | 9915 | |
10064 | 9916 | try |
10065 | - s := ThreadItem.Title + #13#10 + ThreadItem.URL + #13#10; | |
9917 | + s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10; | |
10066 | 9918 | if s <> '' then |
10067 | 9919 | Clipboard.AsText := s; |
10068 | 9920 | finally |
@@ -10077,7 +9929,7 @@ begin | ||
10077 | 9929 | GikoSys.ReadSubjectFile(Board); |
10078 | 9930 | |
10079 | 9931 | try |
10080 | - s := Board.Title + #13#10 + Board.URL + #13#10; | |
9932 | + s := Board.URL + #13#10 + Board.Title + #13#10; | |
10081 | 9933 | if s <> '' then |
10082 | 9934 | Clipboard.AsText := s; |
10083 | 9935 | finally |
@@ -10134,12 +9986,7 @@ procedure TGikoForm.BrowserTabMouseUp(Sender: TObject; | ||
10134 | 9986 | begin |
10135 | 9987 | if FDragWFirst <> true then begin |
10136 | 9988 | FDragWFirst := false; |
10137 | -{ | |
10138 | - end else if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) | |
10139 | - and (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin | |
10140 | -(*} | |
10141 | - end else begin | |
10142 | -//*) | |
9989 | + end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin | |
10143 | 9990 | if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
10144 | 9991 | if GikoSys.Setting.ListWidthState = glsMin then begin |
10145 | 9992 | BrowserMaxAndFocusAction.Execute; |
@@ -10620,6 +10467,8 @@ begin | ||
10620 | 10467 | end; |
10621 | 10468 | // TreeView がクリックされた |
10622 | 10469 | procedure TGikoForm.TreeClick( Node : TTreeNode ); |
10470 | +var | |
10471 | + i: Integer; | |
10623 | 10472 | begin |
10624 | 10473 | |
10625 | 10474 | if Node = nil then |
@@ -10748,6 +10597,7 @@ end; | ||
10748 | 10597 | |
10749 | 10598 | // ギコナビのメッセージループを横取りします |
10750 | 10599 | procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean); |
10600 | + | |
10751 | 10601 | //var |
10752 | 10602 | // key : Word; |
10753 | 10603 | begin |
@@ -11165,16 +11015,12 @@ begin | ||
11165 | 11015 | SelectListItem(List); |
11166 | 11016 | for i := 0 to List.Count - 1 do begin |
11167 | 11017 | if TObject(List[i]) is TThreadItem then begin |
11168 | - if (TThreadItem(List[i]).UnRead) then begin | |
11169 | - TThreadItem(List[i]).UnRead := false; | |
11170 | - TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1; | |
11171 | - end; | |
11018 | + TThreadItem(List[i]).UnRead := false; | |
11019 | + TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1; | |
11172 | 11020 | end; |
11173 | 11021 | end; |
11174 | 11022 | if TreeView.Visible then |
11175 | 11023 | TreeView.Refresh; |
11176 | - if ListView.Visible then | |
11177 | - ListView.Refresh; | |
11178 | 11024 | finally |
11179 | 11025 | List.Free; |
11180 | 11026 | end; |
@@ -11190,16 +11036,12 @@ begin | ||
11190 | 11036 | SelectListItem(List); |
11191 | 11037 | for i := 0 to List.Count - 1 do begin |
11192 | 11038 | if TObject(List[i]) is TThreadItem then begin |
11193 | - if (TThreadItem(List[i]).IsLogFile) and (not TThreadItem(List[i]).UnRead) then begin | |
11194 | - TThreadItem(List[i]).UnRead := true; | |
11195 | - TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1; | |
11196 | - end; | |
11039 | + TThreadItem(List[i]).UnRead := true; | |
11040 | + TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1; | |
11197 | 11041 | end; |
11198 | 11042 | end; |
11199 | 11043 | if TreeView.Visible then |
11200 | 11044 | TreeView.Refresh; |
11201 | - if ListView.Visible then | |
11202 | - ListView.Refresh; | |
11203 | 11045 | finally |
11204 | 11046 | List.Free; |
11205 | 11047 | end; |
@@ -11211,7 +11053,9 @@ var | ||
11211 | 11053 | i: Integer; |
11212 | 11054 | begin |
11213 | 11055 | for i := BROWSER_COUNT - 1 downto 0 do begin |
11056 | + SendMessage(TWebBrowser(FBrowsers[i]).Handle, WM_SETREDRAW, 0, 0); //描画停止 | |
11214 | 11057 | SetWindowPos(TWebBrowser(FBrowsers[i]).Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER); |
11058 | + SendMessage(TWebBrowser(FBrowsers[i]).Handle, WM_SETREDRAW, 1, 0); //描画 | |
11215 | 11059 | end; |
11216 | 11060 | end; |
11217 | 11061 |
@@ -11350,7 +11194,7 @@ end; | ||
11350 | 11194 | procedure TGikoForm.TabsSaveToFileActionExecute(Sender: TObject); |
11351 | 11195 | var |
11352 | 11196 | SaveTabList: TStringList; |
11353 | - Result: Boolean; | |
11197 | + Result: Boolean; | |
11354 | 11198 | begin |
11355 | 11199 | SaveTabList := TStringList.Create; |
11356 | 11200 | try |
@@ -11751,44 +11595,6 @@ begin | ||
11751 | 11595 | SetActiveList( FActiveList ); |
11752 | 11596 | |
11753 | 11597 | end; |
11754 | -//指定した番号のレスにjumpするAction | |
11755 | -procedure TGikoForm.JumpToNumOfResActionExecute(Sender: TObject); | |
11756 | -var | |
11757 | - str: string; | |
11758 | - res: integer; | |
11759 | -begin | |
11760 | - str := '1'; | |
11761 | - if( InputQuery('指定した番号のレスに飛ぶ', '番号を入力してください', str) ) then begin | |
11762 | - str := ZenToHan(str); | |
11763 | - res := StrToIntDef(str, -1); | |
11764 | - if (res > 0) and (res <= GetActiveContent.Count) then begin | |
11765 | - BrowserMovement(IntToStr(res), FActiveContent); | |
11766 | - SetFocusForBrowserAction.Execute; | |
11767 | - end else if res > GetActiveContent.Count then begin | |
11768 | - BrowserMovement(IntToStr(GetActiveContent.Count), FActiveContent); | |
11769 | - SetFocusForBrowserAction.Execute; | |
11770 | - end; | |
11771 | - end; | |
11772 | -end; | |
11773 | - | |
11774 | -procedure TGikoForm.JumpToNumOfResActionUpdate(Sender: TObject); | |
11775 | -begin | |
11776 | - JumpToNumOfResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile); | |
11777 | -end; | |
11778 | - | |
11779 | -procedure TGikoForm.FavoriteTreeViewCollapseActionExecute(Sender: TObject); | |
11780 | -var | |
11781 | - node : TTreeNode; | |
11782 | -begin | |
11783 | - | |
11784 | - node := FavoriteTreeView.Items.GetFirstNode; | |
11785 | - while node <> nil do begin | |
11786 | - if node.HasChildren then | |
11787 | - node.Expanded := False; | |
11788 | - node := node.GetNext; | |
11789 | - end; | |
11790 | - | |
11791 | -end; | |
11792 | 11598 | |
11793 | 11599 | initialization |
11794 | 11600 | OleInitialize(nil); |
@@ -187,7 +187,7 @@ type | ||
187 | 187 | function Is2chHost(Host: string): Boolean; |
188 | 188 | function Parse2chURL(const url: string; const path: string; const document: string; var BBSID: string; var BBSKey: string): Boolean; |
189 | 189 | function Parse2chURL2(URL: string): TPathRec; |
190 | - procedure ParseURI(const URL : string; var Protocol, Host, Path, Document, Port, Bookmark: string); | |
190 | + procedure ParseURI(var URL, Protocol, Host, Path, Document, Port, Bookmark: string); | |
191 | 191 | function GetVersionBuild: Integer; |
192 | 192 | function GetBrowsableThreadURL( inURL : string ) : string; |
193 | 193 | function GetThreadURL2BoardURL( inURL : string ) : string; |
@@ -3424,7 +3424,7 @@ begin | ||
3424 | 3424 | end; |
3425 | 3425 | end; |
3426 | 3426 | |
3427 | -procedure TGikoSys.ParseURI(const URL : string; var Protocol, Host, Path, Document, Port, Bookmark: string); | |
3427 | +procedure TGikoSys.ParseURI(var URL, Protocol, Host, Path, Document, Port, Bookmark: string); | |
3428 | 3428 | var |
3429 | 3429 | URI: TIdURI; |
3430 | 3430 | begin |
@@ -157,6 +157,7 @@ procedure IXMLNode.AddAttribute( | ||
157 | 157 | const Value : string |
158 | 158 | ); |
159 | 159 | var |
160 | + t : Integer; | |
160 | 161 | index : Integer; |
161 | 162 | begin |
162 | 163 |
@@ -297,12 +298,15 @@ var | ||
297 | 298 | |
298 | 299 | found : PChar; |
299 | 300 | tag : string; |
301 | + tagLen : Integer; | |
300 | 302 | |
301 | 303 | isClosed : boolean; |
302 | 304 | |
303 | 305 | nodeName : string; |
304 | 306 | attributeName : string; |
305 | 307 | attributeValue : string; |
308 | + | |
309 | + t, t2 : Integer; | |
306 | 310 | label |
307 | 311 | NextNode; |
308 | 312 | begin |
@@ -156,7 +156,9 @@ var | ||
156 | 156 | Idx: Integer; |
157 | 157 | ATitle: string; |
158 | 158 | DownloadResult: Boolean; |
159 | + foundPos: Integer; | |
159 | 160 | boardPlugIn : TBoardPlugIn; |
161 | + listContent : string; | |
160 | 162 | lastContent : string; |
161 | 163 | logFile : TFileStream; |
162 | 164 | adjustMargin : Integer; |
@@ -1259,10 +1261,8 @@ begin | ||
1259 | 1261 | OldCnt := Body.IndexOf(oldBody.Strings[ LastIdx ]) + 1; |
1260 | 1262 | until ( OldCnt <> 0 ) or (LastIdx = 0); |
1261 | 1263 | |
1262 | - if OldCnt >= Body.Count then OldCnt := Body.Count - 1; | |
1263 | 1264 | NewRes := Body.Count - OldCnt; |
1264 | 1265 | |
1265 | - | |
1266 | 1266 | finally |
1267 | 1267 | oldBody.Free; |
1268 | 1268 | end; |
@@ -1299,10 +1299,8 @@ begin | ||
1299 | 1299 | ThreadItem.AllResCount := ThreadItem.Count; |
1300 | 1300 | ThreadItem.IsLogFile := True; |
1301 | 1301 | ThreadItem.RoundDate := Now; |
1302 | - if not ThreadItem.UnRead then begin | |
1303 | - ThreadItem.UnRead := True; | |
1304 | - ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1; | |
1305 | - end; | |
1302 | + ThreadItem.UnRead := True; | |
1303 | + ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1; | |
1306 | 1304 | // if ThreadItem.RoundNo = 6 then |
1307 | 1305 | // ThreadItem.RoundNo := 0; |
1308 | 1306 |
@@ -1,6 +1,6 @@ | ||
1 | 1 | object KuroutOption: TKuroutOption |
2 | - Left = 43 | |
3 | - Top = 114 | |
2 | + Left = 260 | |
3 | + Top = 167 | |
4 | 4 | Width = 525 |
5 | 5 | Height = 457 |
6 | 6 | Caption = #35443#32048#35373#23450 |
@@ -140,182 +140,6 @@ object KuroutOption: TKuroutOption | ||
140 | 140 | TabOrder = 3 |
141 | 141 | end |
142 | 142 | end |
143 | - object GroupBox1: TGroupBox | |
144 | - Left = 14 | |
145 | - Top = 232 | |
146 | - Width = 475 | |
147 | - Height = 57 | |
148 | - Caption = #12395#12385#12419#12435#35486#26696#20869#27231#33021 | |
149 | - TabOrder = 2 | |
150 | - Visible = False | |
151 | - object Label5: TLabel | |
152 | - Left = 8 | |
153 | - Top = 16 | |
154 | - Width = 234 | |
155 | - Height = 12 | |
156 | - Caption = #12395#12385#12419#12435#35486#12434#20351#12387#12390#12462#12467#12490#12499#12434#12469#12509#12540#12488#12375#12414#12377#12290 | |
157 | - end | |
158 | - object GengoSupport: TCheckBox | |
159 | - Left = 8 | |
160 | - Top = 32 | |
161 | - Width = 201 | |
162 | - Height = 17 | |
163 | - Caption = #12395#12385#12419#12435#35486#26696#20869#27231#33021#12434#26377#21177#12395#12377#12427 | |
164 | - TabOrder = 0 | |
165 | - end | |
166 | - end | |
167 | - end | |
168 | - object ColumnTabSheet: TTabSheet | |
169 | - Caption = #35443#32048#35373#23450'2' | |
170 | - ImageIndex = 1 | |
171 | - object CategoryColumnGroupBox: TGroupBox | |
172 | - Left = 8 | |
173 | - Top = 16 | |
174 | - Width = 481 | |
175 | - Height = 145 | |
176 | - Caption = #34920#31034#12459#12521#12512#35373#23450'('#12459#12486#12468#12522#12540')' | |
177 | - TabOrder = 0 | |
178 | - object Label1: TLabel | |
179 | - Left = 80 | |
180 | - Top = 16 | |
181 | - Width = 60 | |
182 | - Height = 12 | |
183 | - Caption = #38750#34920#31034#38917#30446 | |
184 | - end | |
185 | - object Label2: TLabel | |
186 | - Left = 312 | |
187 | - Top = 16 | |
188 | - Width = 48 | |
189 | - Height = 12 | |
190 | - Caption = #34920#31034#38917#30446 | |
191 | - end | |
192 | - object CUnVisibledListBox: TListBox | |
193 | - Left = 32 | |
194 | - Top = 33 | |
195 | - Width = 161 | |
196 | - Height = 65 | |
197 | - ItemHeight = 12 | |
198 | - TabOrder = 0 | |
199 | - end | |
200 | - object CVisibledListBox: TListBox | |
201 | - Left = 264 | |
202 | - Top = 33 | |
203 | - Width = 161 | |
204 | - Height = 65 | |
205 | - ItemHeight = 12 | |
206 | - TabOrder = 1 | |
207 | - end | |
208 | - object CAddButton: TButton | |
209 | - Left = 200 | |
210 | - Top = 38 | |
211 | - Width = 57 | |
212 | - Height = 25 | |
213 | - Caption = '>>' | |
214 | - TabOrder = 2 | |
215 | - OnClick = CAddButtonClick | |
216 | - end | |
217 | - object CDeleteButton: TButton | |
218 | - Left = 200 | |
219 | - Top = 70 | |
220 | - Width = 57 | |
221 | - Height = 25 | |
222 | - Caption = '<<' | |
223 | - TabOrder = 3 | |
224 | - OnClick = CDeleteButtonClick | |
225 | - end | |
226 | - object CUpButton: TButton | |
227 | - Left = 264 | |
228 | - Top = 104 | |
229 | - Width = 75 | |
230 | - Height = 25 | |
231 | - Caption = #19978#12408 | |
232 | - TabOrder = 4 | |
233 | - OnClick = CUpButtonClick | |
234 | - end | |
235 | - object CDownButton: TButton | |
236 | - Left = 352 | |
237 | - Top = 104 | |
238 | - Width = 75 | |
239 | - Height = 25 | |
240 | - Caption = #19979#12504 | |
241 | - TabOrder = 5 | |
242 | - OnClick = CDownButtonClick | |
243 | - end | |
244 | - end | |
245 | - object BoardColumnGroupBox: TGroupBox | |
246 | - Left = 8 | |
247 | - Top = 168 | |
248 | - Width = 481 | |
249 | - Height = 185 | |
250 | - Caption = #34920#31034#12459#12521#12512#35373#23450'('#26495')' | |
251 | - TabOrder = 1 | |
252 | - object Label3: TLabel | |
253 | - Left = 80 | |
254 | - Top = 16 | |
255 | - Width = 60 | |
256 | - Height = 12 | |
257 | - Caption = #38750#34920#31034#38917#30446 | |
258 | - end | |
259 | - object Label4: TLabel | |
260 | - Left = 312 | |
261 | - Top = 16 | |
262 | - Width = 48 | |
263 | - Height = 12 | |
264 | - Caption = #34920#31034#38917#30446 | |
265 | - end | |
266 | - object BUnVisibledListBox: TListBox | |
267 | - Left = 32 | |
268 | - Top = 31 | |
269 | - Width = 161 | |
270 | - Height = 113 | |
271 | - ItemHeight = 12 | |
272 | - TabOrder = 0 | |
273 | - end | |
274 | - object BVisibledListBox: TListBox | |
275 | - Left = 264 | |
276 | - Top = 31 | |
277 | - Width = 161 | |
278 | - Height = 113 | |
279 | - ItemHeight = 12 | |
280 | - TabOrder = 1 | |
281 | - end | |
282 | - object BAddButton: TButton | |
283 | - Left = 200 | |
284 | - Top = 48 | |
285 | - Width = 57 | |
286 | - Height = 25 | |
287 | - Caption = '>>' | |
288 | - TabOrder = 2 | |
289 | - OnClick = BAddButtonClick | |
290 | - end | |
291 | - object BDeleteButton: TButton | |
292 | - Left = 200 | |
293 | - Top = 80 | |
294 | - Width = 57 | |
295 | - Height = 25 | |
296 | - Caption = '<<' | |
297 | - TabOrder = 3 | |
298 | - OnClick = BDeleteButtonClick | |
299 | - end | |
300 | - object BUpButton: TButton | |
301 | - Left = 264 | |
302 | - Top = 152 | |
303 | - Width = 75 | |
304 | - Height = 25 | |
305 | - Caption = #19978#12408 | |
306 | - TabOrder = 4 | |
307 | - OnClick = BUpButtonClick | |
308 | - end | |
309 | - object BDownButton: TButton | |
310 | - Left = 352 | |
311 | - Top = 152 | |
312 | - Width = 75 | |
313 | - Height = 25 | |
314 | - Caption = #19979#12504 | |
315 | - TabOrder = 5 | |
316 | - OnClick = BDownButtonClick | |
317 | - end | |
318 | - end | |
319 | 143 | end |
320 | 144 | end |
321 | 145 | object OkBotton: TButton |
@@ -8,67 +8,35 @@ uses | ||
8 | 8 | |
9 | 9 | type |
10 | 10 | TKuroutOption = class(TForm) |
11 | - PageControl1: TPageControl; | |
12 | - TabSheet1: TTabSheet; | |
13 | - GroupBox11: TGroupBox; | |
14 | - Label17: TLabel; | |
15 | - Label18: TLabel; | |
16 | - RecvBufferSize: TEdit; | |
17 | - ProxyProtocolCheckBox: TCheckBox; | |
18 | - ProtocolCheckBox: TCheckBox; | |
19 | - GroupBox13: TGroupBox; | |
20 | - Label24: TLabel; | |
21 | - Label25: TLabel; | |
22 | - PostTimeLabel: TLabel; | |
23 | - Label27: TLabel; | |
24 | - PostTimeCheckBox: TCheckBox; | |
25 | - PostTimeEdit: TEdit; | |
26 | - PutPostTimeRadioButton: TRadioButton; | |
27 | - BackPostTimeRadioButton: TRadioButton; | |
28 | - OkBotton: TButton; | |
29 | - CancelBotton: TButton; | |
30 | - ApplyButton: TButton; | |
31 | - ColumnTabSheet: TTabSheet; | |
32 | - CategoryColumnGroupBox: TGroupBox; | |
33 | - CUnVisibledListBox: TListBox; | |
34 | - CVisibledListBox: TListBox; | |
35 | - CAddButton: TButton; | |
36 | - CDeleteButton: TButton; | |
37 | - BoardColumnGroupBox: TGroupBox; | |
38 | - BUnVisibledListBox: TListBox; | |
39 | - BVisibledListBox: TListBox; | |
40 | - BAddButton: TButton; | |
41 | - BDeleteButton: TButton; | |
42 | - Label1: TLabel; | |
43 | - Label2: TLabel; | |
44 | - Label3: TLabel; | |
45 | - Label4: TLabel; | |
46 | - CUpButton: TButton; | |
47 | - CDownButton: TButton; | |
48 | - BUpButton: TButton; | |
49 | - BDownButton: TButton; | |
50 | - GroupBox1: TGroupBox; | |
51 | - GengoSupport: TCheckBox; | |
52 | - Label5: TLabel; | |
53 | - procedure OkBottonClick(Sender: TObject); | |
54 | - procedure FormCreate(Sender: TObject); | |
55 | - procedure CDeleteButtonClick(Sender: TObject); | |
56 | - procedure CAddButtonClick(Sender: TObject); | |
57 | - procedure BAddButtonClick(Sender: TObject); | |
58 | - procedure BDeleteButtonClick(Sender: TObject); | |
59 | - procedure CUpButtonClick(Sender: TObject); | |
60 | - procedure CDownButtonClick(Sender: TObject); | |
61 | - procedure BUpButtonClick(Sender: TObject); | |
62 | - procedure BDownButtonClick(Sender: TObject); | |
11 | + PageControl1: TPageControl; | |
12 | + TabSheet1: TTabSheet; | |
13 | + GroupBox11: TGroupBox; | |
14 | + Label17: TLabel; | |
15 | + Label18: TLabel; | |
16 | + RecvBufferSize: TEdit; | |
17 | + ProxyProtocolCheckBox: TCheckBox; | |
18 | + ProtocolCheckBox: TCheckBox; | |
19 | + GroupBox13: TGroupBox; | |
20 | + Label24: TLabel; | |
21 | + Label25: TLabel; | |
22 | + PostTimeLabel: TLabel; | |
23 | + Label27: TLabel; | |
24 | + PostTimeCheckBox: TCheckBox; | |
25 | + PostTimeEdit: TEdit; | |
26 | + PutPostTimeRadioButton: TRadioButton; | |
27 | + BackPostTimeRadioButton: TRadioButton; | |
28 | + OkBotton: TButton; | |
29 | + CancelBotton: TButton; | |
30 | + ApplyButton: TButton; | |
31 | + procedure OkBottonClick(Sender: TObject); | |
32 | + procedure FormCreate(Sender: TObject); | |
63 | 33 | private |
64 | - { Private 宣言 } | |
34 | + { Private 宣言 } | |
65 | 35 | procedure SetValue; |
66 | 36 | procedure SaveSetting; |
67 | 37 | procedure RecvBufferSizeExit(Sender: TObject); |
68 | 38 | procedure PostTimeEditExit(Sender: TObject); |
69 | 39 | procedure PostTimeCheckBoxClick(Sender: TObject); |
70 | - procedure SetColumnData(); | |
71 | - procedure PostColumnData(); | |
72 | 40 | public |
73 | 41 | { Public 宣言 } |
74 | 42 | end; |
@@ -78,9 +46,6 @@ var | ||
78 | 46 | |
79 | 47 | implementation |
80 | 48 | |
81 | -uses | |
82 | - Giko, Setting; | |
83 | - | |
84 | 49 | {$R *.dfm} |
85 | 50 | |
86 | 51 | procedure TKuroutOption.SetValue; |
@@ -99,10 +64,6 @@ begin | ||
99 | 64 | PutPostTimeRadioButton.Checked := True |
100 | 65 | else |
101 | 66 | BackPostTimeRadioButton.Checked := True; |
102 | - | |
103 | - SetColumnData(); | |
104 | - | |
105 | - PageControl1.ActivePageIndex := GikoSys.Setting.KuroutSettingTabIndex; | |
106 | 67 | end; |
107 | 68 | |
108 | 69 | procedure TKuroutOption.SaveSetting; |
@@ -120,10 +81,6 @@ begin | ||
120 | 81 | else |
121 | 82 | GikoSys.Setting.TimeAdjustSec := 0; |
122 | 83 | GikoSys.Setting.TimeAdjust := PutPostTimeRadioButton.Checked; |
123 | - | |
124 | - GikoSys.Setting.GengoSupport := GengoSupport.Checked; | |
125 | - | |
126 | - GikoSys.Setting.KuroutSettingTabIndex := PageControl1.ActivePageIndex; | |
127 | 84 | end; |
128 | 85 | |
129 | 86 | procedure TKuroutOption.RecvBufferSizeExit(Sender: TObject); |
@@ -152,7 +109,6 @@ procedure TKuroutOption.OkBottonClick(Sender: TObject); | ||
152 | 109 | begin |
153 | 110 | RecvBufferSizeExit(Sender); |
154 | 111 | PostTimeEditExit(Sender); |
155 | - PostColumnData(); | |
156 | 112 | SaveSetting; |
157 | 113 | end; |
158 | 114 |
@@ -162,191 +118,5 @@ begin | ||
162 | 118 | PostTimeCheckBoxClick(Sender); |
163 | 119 | |
164 | 120 | end; |
165 | -procedure TKuroutOption.SetColumnData(); | |
166 | -var | |
167 | - i, j : Integer; | |
168 | - flag : Boolean; | |
169 | -begin | |
170 | - | |
171 | - //===== 板リスト ===== | |
172 | - for i := 0 to GikoSys.Setting.CategoryColumnOrder.Count - 1 do begin | |
173 | - for j := 1 to Length( GikoCategoryColumnCaption ) - 1 do begin | |
174 | - if GikoSys.Setting.CategoryColumnOrder[ i ] = TGikoCategoryColumnID( j ) then begin | |
175 | - CVisibledListBox.AddItem(GikoCategoryColumnCaption[ j ], nil); | |
176 | - break; | |
177 | - end; | |
178 | - end; | |
179 | - end; | |
180 | - | |
181 | - for i := 1 to Length( GikoCategoryColumnCaption ) - 1 do begin | |
182 | - flag := false; | |
183 | - for j := 0 to GikoSys.Setting.CategoryColumnOrder.Count - 1 do begin | |
184 | - if GikoSys.Setting.CategoryColumnOrder[ j ] = TGikoCategoryColumnID( i ) then begin | |
185 | - flag := true; | |
186 | - break; | |
187 | - end; | |
188 | - end; | |
189 | - if not flag then | |
190 | - CUnVisibledListBox.AddItem(GikoCategoryColumnCaption[ i ], nil); | |
191 | - end; | |
192 | - | |
193 | - //===== スレリスト ===== | |
194 | - for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin | |
195 | - for j := 1 to Length( GikoBoardColumnCaption ) - 1 do begin | |
196 | - if GikoSys.Setting.BoardColumnOrder[ i ] = TGikoBoardColumnID( j ) then begin | |
197 | - BVisibledListBox.AddItem(GikoBoardColumnCaption[ j ], nil); | |
198 | - Break; | |
199 | - end; | |
200 | - end; | |
201 | - end; | |
202 | - | |
203 | - for i := 1 to Length( GikoBoardColumnCaption ) - 1 do begin | |
204 | - flag := false; | |
205 | - for j := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 0 do begin | |
206 | - if GikoSys.Setting.BoardColumnOrder[ j ] = TGikoBoardColumnID( i ) then begin | |
207 | - flag := true; | |
208 | - Break; | |
209 | - end; | |
210 | - end; | |
211 | - if not flag then | |
212 | - BUnVisibledListBox.AddItem(GikoBoardColumnCaption[ i ], nil); | |
213 | - | |
214 | - end; | |
215 | -end; | |
216 | -procedure TKuroutOption.CDeleteButtonClick(Sender: TObject); | |
217 | -var | |
218 | - i: Integer; | |
219 | -begin | |
220 | - for i := 0 to CVisibledListBox.Count - 1 do begin | |
221 | - if CVisibledListBox.Selected[i] then begin | |
222 | - CUnVisibledListBox.AddItem( CVisibledListBox.Items.Strings[ i ], nil); | |
223 | - CVisibledListBox.DeleteSelected; | |
224 | - break; | |
225 | - end; | |
226 | - end; | |
227 | -end; | |
228 | - | |
229 | -procedure TKuroutOption.CAddButtonClick(Sender: TObject); | |
230 | -var | |
231 | - i: Integer; | |
232 | -begin | |
233 | - for i := 0 to CUnVisibledListBox.Count - 1 do begin | |
234 | - if CUnVisibledListBox.Selected[i] then begin | |
235 | - CVisibledListBox.AddItem( CUnVisibledListBox.Items.Strings[ i ], nil); | |
236 | - CUnVisibledListBox.DeleteSelected; | |
237 | - break; | |
238 | - end; | |
239 | - end; | |
240 | -end; | |
241 | - | |
242 | -procedure TKuroutOption.BAddButtonClick(Sender: TObject); | |
243 | -var | |
244 | - i: Integer; | |
245 | -begin | |
246 | - for i := 0 to BUnVisibledListBox.Count - 1 do begin | |
247 | - if BUnVisibledListBox.Selected[i] then begin | |
248 | - BVisibledListBox.AddItem( BUnVisibledListBox.Items.Strings[ i ], nil); | |
249 | - BUnVisibledListBox.DeleteSelected; | |
250 | - break; | |
251 | - end; | |
252 | - end; | |
253 | -end; | |
254 | - | |
255 | -procedure TKuroutOption.BDeleteButtonClick(Sender: TObject); | |
256 | -var | |
257 | - i: Integer; | |
258 | -begin | |
259 | - for i := 0 to BVisibledListBox.Count - 1 do begin | |
260 | - if BVisibledListBox.Selected[i] then begin | |
261 | - BUnVisibledListBox.AddItem( BVisibledListBox.Items.Strings[ i ], nil); | |
262 | - BVisibledListBox.DeleteSelected; | |
263 | - break; | |
264 | - end; | |
265 | - end; | |
266 | -end; | |
267 | - | |
268 | -procedure TKuroutOption.CUpButtonClick(Sender: TObject); | |
269 | -var | |
270 | - i: Integer; | |
271 | -begin | |
272 | - for i := 1 to CVisibledListBox.Count - 1 do begin | |
273 | - if CVisibledListBox.Selected[i] then begin | |
274 | - CVisibledListBox.Items.Exchange(i, i -1); | |
275 | - break; | |
276 | - end; | |
277 | - end; | |
278 | -end; | |
279 | - | |
280 | -procedure TKuroutOption.CDownButtonClick(Sender: TObject); | |
281 | -var | |
282 | - i: Integer; | |
283 | -begin | |
284 | - for i := 0 to CVisibledListBox.Count - 2 do begin | |
285 | - if CVisibledListBox.Selected[i] then begin | |
286 | - CVisibledListBox.Items.Exchange(i, i + 1); | |
287 | - break; | |
288 | - end; | |
289 | - end; | |
290 | -end; | |
291 | - | |
292 | -procedure TKuroutOption.BUpButtonClick(Sender: TObject); | |
293 | -var | |
294 | - i: Integer; | |
295 | -begin | |
296 | - for i := 1 to BVisibledListBox.Count - 1 do begin | |
297 | - if BVisibledListBox.Selected[i] then begin | |
298 | - BVisibledListBox.Items.Exchange(i, i -1); | |
299 | - break; | |
300 | - end; | |
301 | - end; | |
302 | -end; | |
303 | - | |
304 | -procedure TKuroutOption.BDownButtonClick(Sender: TObject); | |
305 | -var | |
306 | - i: Integer; | |
307 | -begin | |
308 | - for i := 0 to BVisibledListBox.Count - 2 do begin | |
309 | - if BVisibledListBox.Selected[i] then begin | |
310 | - BVisibledListBox.Items.Exchange(i, i + 1); | |
311 | - break; | |
312 | - end; | |
313 | - end; | |
314 | -end; | |
315 | - | |
316 | - | |
317 | -procedure TKuroutOption.PostColumnData(); | |
318 | -var | |
319 | - i, j : Integer; | |
320 | -begin | |
321 | - GikoForm.ActiveListColumnSave; | |
322 | - | |
323 | - //===== 板リスト ===== | |
324 | - for i := GikoSys.Setting.CategoryColumnOrder.Count -1 downto 1 do | |
325 | - GikoSys.Setting.CategoryColumnOrder.Delete(i); | |
326 | - | |
327 | - for i := 0 to CVisibledListBox.Count - 1 do begin | |
328 | - for j := 1 to Length( GikoCategoryColumnCaption ) - 1 do begin | |
329 | - if CVisibledListBox.Items.Strings[ i ] = GikoCategoryColumnCaption[ j ] then begin | |
330 | - GikoSys.Setting.CategoryColumnOrder.Add( TGikoCategoryColumnID(j) ); | |
331 | - break; | |
332 | - end; | |
333 | - end; | |
334 | - end; | |
335 | - | |
336 | - //===== スレリスト ===== | |
337 | - for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do | |
338 | - GikoSys.Setting.BoardColumnOrder.Delete(i); | |
339 | - | |
340 | - for i := 0 to BVisibledListBox.Count - 1 do begin | |
341 | - for j := 1 to Length( GikoBoardColumnCaption ) - 1 do begin | |
342 | - if BVisibledListBox.Items.Strings[ i ] = GikoBoardColumnCaption[ j ] then begin | |
343 | - GikoSys.Setting.BoardColumnOrder.Add( TGikoBoardColumnID(j) ); | |
344 | - Break; | |
345 | - end; | |
346 | - end; | |
347 | - end; | |
348 | - //スレ一覧の描画の更新 | |
349 | - GikoForm.SetActiveList(GikoForm.ActiveList); | |
350 | -end; | |
351 | 121 | |
352 | 122 | end. |
@@ -1,6 +1,6 @@ | ||
1 | 1 | object OptionDialog: TOptionDialog |
2 | - Left = 188 | |
3 | - Top = 128 | |
2 | + Left = 410 | |
3 | + Top = 236 | |
4 | 4 | BorderStyle = bsDialog |
5 | 5 | Caption = #12458#12503#12471#12519#12531 |
6 | 6 | ClientHeight = 428 |
@@ -60,9 +60,9 @@ object OptionDialog: TOptionDialog | ||
60 | 60 | Top = 4 |
61 | 61 | Width = 509 |
62 | 62 | Height = 389 |
63 | - ActivePage = TabSheet3 | |
63 | + ActivePage = ThreadSheet | |
64 | 64 | MultiLine = True |
65 | - TabIndex = 3 | |
65 | + TabIndex = 4 | |
66 | 66 | TabOrder = 3 |
67 | 67 | OnChange = OptionTabChange |
68 | 68 | object ConnectSheet: TTabSheet |
@@ -252,7 +252,7 @@ object OptionDialog: TOptionDialog | ||
252 | 252 | Top = 43 |
253 | 253 | Width = 417 |
254 | 254 | Height = 20 |
255 | - ItemHeight = 12 | |
255 | + ItemHeight = 0 | |
256 | 256 | TabOrder = 0 |
257 | 257 | Text = 'BoardURLComboBox' |
258 | 258 | end |
@@ -654,7 +654,7 @@ object OptionDialog: TOptionDialog | ||
654 | 654 | Left = 12 |
655 | 655 | Top = 8 |
656 | 656 | Width = 477 |
657 | - Height = 41 | |
657 | + Height = 64 | |
658 | 658 | Caption = #34920#31034#35373#23450 |
659 | 659 | TabOrder = 0 |
660 | 660 | object ThreadListIconCheckBox: TCheckBox |
@@ -665,10 +665,18 @@ object OptionDialog: TOptionDialog | ||
665 | 665 | Caption = #12473#12524#12483#12489#26356#26032#12450#12452#12467#12531#12434#34920#31034#12377#12427'(&I)' |
666 | 666 | TabOrder = 0 |
667 | 667 | end |
668 | + object NonAcquiredCountCheckBox: TCheckBox | |
669 | + Left = 12 | |
670 | + Top = 40 | |
671 | + Width = 217 | |
672 | + Height = 17 | |
673 | + Caption = #21462#24471#25968#12398#20195#12431#12426#12395#26410#21462#24471#25968#12434#34920#31034#12377#12427 | |
674 | + TabOrder = 1 | |
675 | + end | |
668 | 676 | end |
669 | 677 | object GroupBox16: TGroupBox |
670 | 678 | Left = 12 |
671 | - Top = 52 | |
679 | + Top = 76 | |
672 | 680 | Width = 477 |
673 | 681 | Height = 64 |
674 | 682 | Caption = #12473#12524#20316#25104#26085#26178#34920#31034#35373#23450 |
@@ -692,7 +700,7 @@ object OptionDialog: TOptionDialog | ||
692 | 700 | end |
693 | 701 | object GroupBox5: TGroupBox |
694 | 702 | Left = 12 |
695 | - Top = 121 | |
703 | + Top = 145 | |
696 | 704 | Width = 477 |
697 | 705 | Height = 86 |
698 | 706 | Caption = #12502#12521#12454#12470#12398#26368#22823#21270 |
@@ -720,7 +728,7 @@ object OptionDialog: TOptionDialog | ||
720 | 728 | end |
721 | 729 | object GroupBox17: TGroupBox |
722 | 730 | Left = 12 |
723 | - Top = 212 | |
731 | + Top = 236 | |
724 | 732 | Width = 477 |
725 | 733 | Height = 63 |
726 | 734 | Caption = #12502#12521#12454#12470#12479#12502#38750#34920#31034#26178#35373#23450 |
@@ -758,9 +766,9 @@ object OptionDialog: TOptionDialog | ||
758 | 766 | end |
759 | 767 | object GroupBox18: TGroupBox |
760 | 768 | Left = 12 |
761 | - Top = 278 | |
769 | + Top = 302 | |
762 | 770 | Width = 477 |
763 | - Height = 43 | |
771 | + Height = 41 | |
764 | 772 | Caption = 'dat'#33853#12385#12473#12524#12477#12540#12488#38918 |
765 | 773 | TabOrder = 4 |
766 | 774 | object DatOchiSortCombo: TComboBox |
@@ -778,9 +786,7 @@ object OptionDialog: TOptionDialog | ||
778 | 786 | #21462#24471#26085#26178'('#26119#38918')' |
779 | 787 | #21462#24471#26085#26178'('#38477#38918')' |
780 | 788 | #12473#12524#20316#25104#26085#26178'('#26119#38918')' |
781 | - #12473#12524#20316#25104#26085#26178'('#38477#38918')' | |
782 | - #12473#12524#26368#32066#26356#26032#26085#26178#65288#26119#38918#65289 | |
783 | - #12473#12524#26368#32066#26356#26032#26085#26178#65288#38477#38918#65289) | |
789 | + #12473#12524#20316#25104#26085#26178'('#38477#38918')') | |
784 | 790 | end |
785 | 791 | end |
786 | 792 | end |
@@ -90,6 +90,7 @@ type | ||
90 | 90 | TabSheet3: TTabSheet; |
91 | 91 | GroupBox9: TGroupBox; |
92 | 92 | ThreadListIconCheckBox: TCheckBox; |
93 | + NonAcquiredCountCheckBox: TCheckBox; | |
93 | 94 | GroupBox16: TGroupBox; |
94 | 95 | CreationTimeLogsCheckBox: TCheckBox; |
95 | 96 | FutureThreadCheckBox: TCheckBox; |
@@ -765,32 +766,28 @@ begin | ||
765 | 766 | |
766 | 767 | //スレッド一覧更新アイコン |
767 | 768 | ThreadListIconCheckBox.Checked := GikoSys.Setting.ListIconVisible; |
769 | + NonAcquiredCountCheckBox.Checked := GikoSys.Setting.NonAcquiredCount; | |
768 | 770 | CreationTimeLogsCheckBox.Checked := GikoSys.Setting.CreationTimeLogs; |
769 | 771 | FutureThreadCheckBox.Checked := GikoSys.Setting.FutureThread; |
770 | 772 | SelectIntervalEdit.Text := IntToStr(GikoSys.Setting.SelectInterval); |
771 | 773 | |
772 | 774 | //dat落ちスレソート順 |
773 | - case TGikoBoardColumnID( GikoSys.Setting.DatOchiSortIndex ) of | |
774 | - gbcTitle: | |
775 | + case GikoSys.Setting.DatOchiSortIndex of | |
776 | + 0: | |
775 | 777 | if GikoSys.Setting.DatOchiSortOrder then |
776 | 778 | DatOchiSortCombo.ItemIndex := 1 |
777 | 779 | else |
778 | 780 | DatOchiSortCombo.ItemIndex := 2; |
779 | - gbcRoundDate://gbcLastModified: | |
781 | + 6: | |
780 | 782 | if GikoSys.Setting.DatOchiSortOrder then |
781 | 783 | DatOchiSortCombo.ItemIndex := 3 |
782 | 784 | else |
783 | 785 | DatOchiSortCombo.ItemIndex := 4; |
784 | - gbcCreated: | |
786 | + 7: | |
785 | 787 | if GikoSys.Setting.DatOchiSortOrder then |
786 | 788 | DatOchiSortCombo.ItemIndex := 5 |
787 | 789 | else |
788 | 790 | DatOchiSortCombo.ItemIndex := 6; |
789 | - gbcLastModified: | |
790 | - if GikoSys.Setting.DatOchiSortOrder then | |
791 | - DatOchiSortCombo.ItemIndex := 7 | |
792 | - else | |
793 | - DatOchiSortCombo.ItemIndex := 8; | |
794 | 791 | else |
795 | 792 | DatOchiSortCombo.ItemIndex := 0; |
796 | 793 | end; |
@@ -805,6 +802,7 @@ begin | ||
805 | 802 | |
806 | 803 | //TabAutoLoad |
807 | 804 | TabLoadSave.Checked := Gikosys.Setting.TabAutoLoadSave; |
805 | + | |
808 | 806 | end; |
809 | 807 | |
810 | 808 | procedure TOptionDialog.SaveSetting; |
@@ -997,6 +995,11 @@ begin | ||
997 | 995 | //スレッド一覧更新アイコン |
998 | 996 | GikoSys.Setting.ListIconVisible := ThreadListIconCheckBox.Checked; |
999 | 997 | |
998 | + //取得数、未取得数 | |
999 | + if (GikoSys.Setting.NonAcquiredCount <> NonAcquiredCountCheckBox.Checked) and (GikoForm.ActiveList Is TBoard) then | |
1000 | + FRepaintList := true; | |
1001 | + GikoSys.Setting.NonAcquiredCount := NonAcquiredCountCheckBox.Checked; | |
1002 | + | |
1000 | 1003 | GikoSys.Setting.CreationTimeLogs := CreationTimeLogsCheckBox.Checked; |
1001 | 1004 | GikoSys.Setting.FutureThread := FutureThreadCheckBox.Checked; |
1002 | 1005 | if StrToIntDef(SelectIntervalEdit.Text, 110) > 55 then |
@@ -1009,36 +1012,28 @@ begin | ||
1009 | 1012 | 0: GikoSys.Setting.DatOchiSortIndex := -1; //並び替えしない |
1010 | 1013 | 1: begin //スレ番号(昇順) |
1011 | 1014 | GikoSys.Setting.DatOchiSortOrder := true; |
1012 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcTitle ); | |
1015 | + GikoSys.Setting.DatOchiSortIndex := 0; | |
1013 | 1016 | end; |
1014 | 1017 | 2: begin //スレ番号(降順) |
1015 | 1018 | GikoSys.Setting.DatOchiSortOrder := false; |
1016 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcTitle ); | |
1019 | + GikoSys.Setting.DatOchiSortIndex := 0; | |
1017 | 1020 | end; |
1018 | 1021 | 3: begin //取得日時(昇順) |
1019 | 1022 | GikoSys.Setting.DatOchiSortOrder := true; |
1020 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcRoundDate );{gbcLastModified} | |
1023 | + GikoSys.Setting.DatOchiSortIndex := 6; | |
1021 | 1024 | end; |
1022 | 1025 | 4: begin //取得日時(降順) |
1023 | 1026 | GikoSys.Setting.DatOchiSortOrder := false; |
1024 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcRoundDate );{gbcLastModified} | |
1027 | + GikoSys.Setting.DatOchiSortIndex := 6; | |
1025 | 1028 | end; |
1026 | 1029 | 5: begin //スレ作成日時(昇順) |
1027 | 1030 | GikoSys.Setting.DatOchiSortOrder := true; |
1028 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcCreated ); | |
1031 | + GikoSys.Setting.DatOchiSortIndex := 7; | |
1029 | 1032 | end; |
1030 | 1033 | 6: begin //スレ作成日時(降順) |
1031 | 1034 | GikoSys.Setting.DatOchiSortOrder := false; |
1032 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcCreated ); | |
1035 | + GikoSys.Setting.DatOchiSortIndex := 7; | |
1033 | 1036 | end; |
1034 | - 7: begin //スレ最終更新日時(昇順) | |
1035 | - GikoSys.Setting.DatOchiSortOrder := true; | |
1036 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcLastModified );{gbcLastModified} | |
1037 | - end; | |
1038 | - 8: begin //スレ最終更新日時(降順) | |
1039 | - GikoSys.Setting.DatOchiSortOrder := false; | |
1040 | - GikoSys.Setting.DatOchiSortIndex := Ord( gbcLastModified );{gbcLastModified} | |
1041 | - end; | |
1042 | 1037 | end; |
1043 | 1038 | |
1044 | 1039 | GikoSys.Setting.WriteSystemSettingFile; |
@@ -67,7 +67,7 @@ type | ||
67 | 67 | procedure SetItem( index : integer; value : TGikoBBSColumnID); |
68 | 68 | public |
69 | 69 | constructor Create; |
70 | - destructor Destroy; override; | |
70 | + destructor Destroy; | |
71 | 71 | function Add( value : TGikoBBSColumnID ) : Integer; |
72 | 72 | property Items[index : integer]: TGikoBBSColumnID read GetItem write SetItem; default; |
73 | 73 | end; |
@@ -83,21 +83,21 @@ type | ||
83 | 83 | procedure SetItem( index : integer; value : TGikoCategoryColumnID); |
84 | 84 | public |
85 | 85 | constructor Create; |
86 | - destructor Destroy; override; | |
86 | + destructor Destroy; | |
87 | 87 | function Add( value : TGikoCategoryColumnID ) : Integer; |
88 | 88 | property Items[index : integer]: TGikoCategoryColumnID read GetItem write SetItem; default; |
89 | 89 | end; |
90 | 90 | /// スレリストのカラム ID |
91 | 91 | type TGikoBoardColumnID = (gbcTitle, gbcAllCount, gbcLocalCount, gbcNonAcqCount, |
92 | - gbcNewCount, gbcUnReadCount, gbcRoundName, gbcRoundDate, gbcCreated, gbcLastModified );{gbcLastModified,} | |
92 | + gbcNewCount, gbcUnReadCount, gbcRoundName, gbcLastModified, gbcCreated ); | |
93 | 93 | /// スレリストのカラム名 |
94 | - const GikoBoardColumnCaption : array[0..9] of string = | |
94 | + const GikoBoardColumnCaption : array[0..8] of string = | |
95 | 95 | ( 'スレッド名', 'カウント', '取得', '未取得', '新着', |
96 | - '未読', '巡回予約', '取得日時', 'スレ作成日時', '最終更新日時' ); | |
97 | - const GikoBoardColumnAlignment : array[0..9] of TAlignment = ( | |
96 | + '未読', '巡回予約', '取得日時', 'スレ作成日時' ); | |
97 | + const GikoBoardColumnAlignment : array[0..8] of TAlignment = ( | |
98 | 98 | taLeftJustify, taRightJustify, taRightJustify, taRightJustify, |
99 | 99 | taRightJustify, taRightJustify, taLeftJustify, taLeftJustify, |
100 | - taLeftJustify, taLeftJustify); | |
100 | + taLeftJustify ); | |
101 | 101 | /// スレリストカラム配列 |
102 | 102 | type TGikoBoardColumnList = class( TList ) |
103 | 103 | private |
@@ -105,7 +105,7 @@ type | ||
105 | 105 | procedure SetItem( index : integer; value : TGikoBoardColumnID); |
106 | 106 | public |
107 | 107 | constructor Create; |
108 | - destructor Destroy; override; | |
108 | + destructor Destroy; | |
109 | 109 | function Add( value : TGikoBoardColumnID ) : Integer; |
110 | 110 | property Items[index : integer]: TGikoBoardColumnID read GetItem write SetItem; default; |
111 | 111 | end; |
@@ -272,7 +272,7 @@ type | ||
272 | 272 | //リストカラムヘッダーサイズ |
273 | 273 | FBBSColumnWidth: array[0..0] of Integer; |
274 | 274 | FCategoryColumnWidth: array[0..2] of Integer; |
275 | - FBoardColumnWidth: array[0..9] of Integer; | |
275 | + FBoardColumnWidth: array[0..8] of Integer; | |
276 | 276 | |
277 | 277 | /// カテゴリリストカラム順序 |
278 | 278 | FBBSColumnOrder : TGikoBBSColumnList; |
@@ -346,6 +346,8 @@ type | ||
346 | 346 | |
347 | 347 | //スレッド一覧更新アイコン表示 |
348 | 348 | FListIconVisible: Boolean; |
349 | + //取得数ではなく未取得を表示する | |
350 | + FNonAcquiredCount: Boolean; | |
349 | 351 | |
350 | 352 | //スレッド一覧でLogのあるスレッドのみスレ作成日を表示するか |
351 | 353 | FCreationTimeLogs: Boolean; |
@@ -390,19 +392,12 @@ type | ||
390 | 392 | |
391 | 393 | //Tab自動保存 |
392 | 394 | FTabAutoLoadSave : Boolean; |
393 | - | |
394 | - //にちゃん語案内サポート機能 | |
395 | - F2chSupport : Boolean; | |
396 | - | |
397 | 395 | // エディタ |
398 | 396 | FSpaceToNBSP : Boolean; ///< 半角スペース、Tab を に置換 |
399 | 397 | FAmpToCharRef : Boolean; ///< '&' を & に置換 |
400 | 398 | |
401 | 399 | //ブラウザタブ非表示の時のスレ一覧でのカーソルキー移動の無反応時間 |
402 | 400 | FSelectInterval : Integer; |
403 | - | |
404 | - //KuroutSettingTab 詳細設定タブのActiveTab | |
405 | - FKuroutSettingTabIndex: Integer; | |
406 | 401 | |
407 | 402 | function GetMainCoolSet(Index: Integer): TCoolSet; |
408 | 403 | function GetBoardCoolSet(Index: Integer): TCoolSet; |
@@ -648,6 +643,7 @@ type | ||
648 | 643 | property BrowserAutoMaximize: TGikoBrowserAutoMaximize read FBrowserAutoMaximize write FBrowserAutoMaximize; |
649 | 644 | |
650 | 645 | property ListIconVisible: Boolean read FListIconVisible write FListIconVisible; |
646 | + property NonAcquiredCount: Boolean read FNonAcquiredCount write FNonAcquiredCount; | |
651 | 647 | property CreationTimeLogs: Boolean read FCreationTimeLogs write FCreationTimeLogs; |
652 | 648 | property FutureThread: Boolean read FFutureThread write FFutureThread; |
653 | 649 |
@@ -685,10 +681,8 @@ type | ||
685 | 681 | property AmpToCharRef : Boolean read FAmpToCharRef write FAmpToCharRef; |
686 | 682 | |
687 | 683 | property SelectInterval : Integer read FSelectInterval write FSelectInterval; |
688 | - //Tab保存 | |
689 | - property TabAutoLoadSave: Boolean read FTabAutoLoadSave write FTabAutoLoadSave; | |
690 | - property GengoSupport : Boolean read F2chSupport write F2chSupport; | |
691 | - property KuroutSettingTabIndex: Integer read FKuroutSettingTabIndex write FKuroutSettingTabIndex; | |
684 | + //Tab保存 | |
685 | + property TabAutoLoadSave: Boolean read FTabAutoLoadSave write FTabAutoLoadSave; | |
692 | 686 | end; |
693 | 687 | |
694 | 688 |
@@ -850,7 +844,7 @@ procedure TSetting.ReadSettingFile(); | ||
850 | 844 | const |
851 | 845 | DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140); |
852 | 846 | 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); | |
847 | + DEFAULT_BOARD_WIDTH: array[0..8] of Integer = (350, 60, 60, 60, 60, 60, 80, 130, 130); | |
854 | 848 | MAX_WIDTH: Integer = 2000; |
855 | 849 | var |
856 | 850 | ini: TMemIniFile; |
@@ -1158,6 +1152,7 @@ begin | ||
1158 | 1152 | |
1159 | 1153 | //スレッド一覧更新アイコン |
1160 | 1154 | FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True); |
1155 | + FNonAcquiredCount := ini.ReadBool('ThreadList', 'NonAcquiredCount', False); | |
1161 | 1156 | FCreationTimeLogs := ini.ReadBool('ThreadList', 'CreationTimeLogs', True); |
1162 | 1157 | FFutureThread := ini.ReadBool('ThreadList', 'FutureThread', True); |
1163 | 1158 | FSelectInterval := ini.ReadInteger('ThreadList', 'SelectInterval', 110); |
@@ -1223,13 +1218,11 @@ begin | ||
1223 | 1218 | FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false); |
1224 | 1219 | |
1225 | 1220 | // エディタ |
1226 | - FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', False ); | |
1221 | + FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', True ); | |
1227 | 1222 | FAmpToCharRef := ini.ReadBool( 'Editor', 'AmpToCharRef', False ); |
1228 | 1223 | |
1229 | - //Tab自動保存、読み込み | |
1230 | - FTabAutoLoadSave := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False); | |
1231 | - | |
1232 | - FKuroutSettingTabIndex := ini.ReadInteger('OptionDialog', 'KuroutTabIndex' , 0); | |
1224 | + //Tab自動保存、読み込み | |
1225 | + FTabAutoLoadSave := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False); | |
1233 | 1226 | |
1234 | 1227 | |
1235 | 1228 | finally |
@@ -1457,6 +1450,7 @@ begin | ||
1457 | 1450 | |
1458 | 1451 | //スレッド一覧更新アイコン |
1459 | 1452 | ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible); |
1453 | + ini.WriteBool('ThreadList', 'NonAcquiredCount', FNonAcquiredCount); | |
1460 | 1454 | ini.WriteBool('ThreadList', 'CreationTimeLogs',FCreationTimeLogs); |
1461 | 1455 | ini.WriteBool('ThreadList', 'FutureThread', FFutureThread); |
1462 | 1456 | ini.WriteInteger('ThreadList', 'SelectInterval', FSelectInterval); |
@@ -1555,15 +1549,9 @@ begin | ||
1555 | 1549 | ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP ); |
1556 | 1550 | ini.WriteBool( 'Editor', 'AmpToCharRef', FAmpToCharRef ); |
1557 | 1551 | |
1558 | - //タブ自動保存 | |
1559 | - ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave); | |
1560 | - //詳細設定 | |
1561 | - ini.WriteInteger('OptionDialog', 'KuroutTabIndex', FKuroutSettingTabIndex); | |
1562 | - | |
1563 | - //にちゃん語案内機能 | |
1564 | - ini.WriteBool('2chSupport', 'Support', F2chSupport); | |
1552 | + ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave); | |
1565 | 1553 | |
1566 | - ini.UpdateFile; | |
1554 | + ini.UpdateFile; | |
1567 | 1555 | finally |
1568 | 1556 | ini.Free; |
1569 | 1557 | end; |
@@ -17,6 +17,7 @@ var | ||
17 | 17 | SortOrder: Boolean; |
18 | 18 | SortIndex: Integer; |
19 | 19 | SortNoFlag: Boolean; |
20 | + SortNonAcquiredCountFlag: Boolean; | |
20 | 21 | |
21 | 22 | implementation |
22 | 23 |
@@ -34,8 +35,6 @@ begin | ||
34 | 35 | Result := CompareInt(CategoryItem1.No, CategoryItem2.No) |
35 | 36 | else |
36 | 37 | Result := AnsiCompareText(CategoryItem1.Title, CategoryItem2.Title); |
37 | - else | |
38 | - Result := CompareInt(CategoryItem1.No, CategoryItem2.No) | |
39 | 38 | end; |
40 | 39 | |
41 | 40 | if not SortOrder then |
@@ -61,8 +60,6 @@ begin | ||
61 | 60 | |
62 | 61 | gccLastModified: |
63 | 62 | Result := CompareDate(BoardItem1.RoundDate, BoardItem2.RoundDate); |
64 | - else | |
65 | - Result := CompareInt(BoardItem1.No, BoardItem2.No) | |
66 | 63 | end; |
67 | 64 | |
68 | 65 | if not SortOrder then |
@@ -102,9 +99,8 @@ begin | ||
102 | 99 | gbcNewCount: Result := CompareInt(ThreadItem1.NewResCount, ThreadItem2.NewResCount); |
103 | 100 | gbcUnReadCount: Result := 0; |
104 | 101 | gbcRoundName: Result := AnsiCompareText(ThreadItem1.RoundName, ThreadItem2.RoundName); |
105 | - gbcRoundDate: Result := CompareDateTime(ThreadItem1.RoundDate, ThreadItem2.RoundDate); {gbcLastModified:} | |
102 | + gbcLastModified: Result := CompareDateTime(ThreadItem1.RoundDate, ThreadItem2.RoundDate); | |
106 | 103 | gbcCreated: Result := CompareDateTime(ThreadItem1.CreateDate, ThreadItem2.CreateDate); |
107 | - gbcLastModified: Result := CompareDateTime(ThreadItem1.LastModified, ThreadItem2.LastModified); {gbcLastModified:} | |
108 | 104 | else |
109 | 105 | Result := 0; |
110 | 106 | end; |
@@ -40,38 +40,11 @@ function MatchesMask( | ||
40 | 40 | const filename, mask : string |
41 | 41 | ) : boolean; |
42 | 42 | |
43 | -/// メタキャラクタを正規表現扱いにならないように置換 | |
43 | +// メタキャラクタを正規表現扱いにならないように置換 | |
44 | 44 | function RegExpEncode( |
45 | 45 | const text : string |
46 | 46 | ) : string; |
47 | 47 | |
48 | -{*! | |
49 | -\brief 表示メッセージの整形 | |
50 | -\param msg 表示するメッセージ | |
51 | -\param elements 置換単語 | |
52 | - | |
53 | -msg の中の置換される単語は '^番号' で表され、 | |
54 | -elements は改行によって単語分けされます。<br> | |
55 | - | |
56 | -<pre><code> | |
57 | -elements := IntToStr( 10 ) + #10 + 'hoge'; | |
58 | -m := MessageStyle( | |
59 | - '^0 個の“^1”を置換しました。', | |
60 | - elements ); | |
61 | -</code></pre> | |
62 | - | |
63 | -で出力される m は「10 個の“hoge”を置換しました。」となります。 | |
64 | -*} | |
65 | -function MessageStyle( | |
66 | - const msg : string; | |
67 | - const elements : string | |
68 | -) : string; overload; | |
69 | - | |
70 | -function MessageStyle( | |
71 | - const msg : string; | |
72 | - const elements : TStringList | |
73 | -) : string; overload; | |
74 | - | |
75 | 48 | type |
76 | 49 | /// Mode 値がおかしい |
77 | 50 | EMappedFileModeError = class( Exception ); |
@@ -104,8 +77,6 @@ const | ||
104 | 77 | implementation |
105 | 78 | //================================================== |
106 | 79 | |
107 | -uses MojuUtils; | |
108 | - | |
109 | 80 | // とりあえずの代用品なので chrWhite を考慮していないことに注意!!! |
110 | 81 | procedure ExtractHttpFields( |
111 | 82 | const chrSep : TSysCharSet; |
@@ -420,38 +391,6 @@ begin | ||
420 | 391 | |
421 | 392 | end; |
422 | 393 | |
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 | 394 | { TMappedFile } |
456 | 395 | |
457 | 396 | {*! |
@@ -1,4 +1,4 @@ | ||
1 | -■ギコナビ Version1.00 バタ49 Readme.txt | |
1 | +■ギコナビ Version1.00 バタ48 Readme.txt | |
2 | 2 | |
3 | 3 | |
4 | 4 | ------------------------------ |
@@ -41,7 +41,7 @@ | ||
41 | 41 | ------------------------------ |
42 | 42 | バグや要望は、ギコナビスレッドで受け付けております。 |
43 | 43 | ギコナビサイト:http://gikonavi.sourceforge.jp/ |
44 | -ギコナビスレ:http://pc5.2ch.net/test/read.cgi/software/1094289071/l50 | |
44 | +ギコナビスレ:http://pc5.2ch.net/test/read.cgi/software/1079685385/l50 | |
45 | 45 | |
46 | 46 | ------------------------------ |
47 | 47 | 転載について |
@@ -89,21 +89,6 @@ Windows Server 2003 Enterprise Edition IE6 | ||
89 | 89 | ------------------------------ |
90 | 90 | 履歴 |
91 | 91 | ------------------------------ |
92 | -2004/10/XX | |
93 | - Version バタ49 | |
94 | - お気に入りの読み込みの高速化による起動時間の短縮 | |
95 | - StatusBarにNGワードファイルの名前が出ない不具合の修正 | |
96 | - 「指定した番号のレスに飛ぶ」機能追加(キー設定で、スレッドカテゴリの一番最後) | |
97 | - ログを削除した際に未読スレッド数 (UnRead) の表示が更新されないバグを修正 | |
98 | - ここにレスだと、レスエディターのショートカットキーが設定されない不具合の修正 | |
99 | - あぼーん時にココまで読んだと新着レスを調整するのに不具合があったので修正 | |
100 | - スレッド一覧の表示カラムの設定ができるようになった。「オプション」->「詳細設定」->「詳細設定2」 | |
101 | - デフォルトでのレスアンカーポップアップが種種の形式に対応 | |
102 | - 3ちゃんねる(8ちゃんねる)を登録すると2ちゃんねるの板が表示される不具合の解消 | |
103 | - お気に入りで編集中にスペースキー入力の不具合の修正 | |
104 | - したらばJBBSの過去ログに関する不具合の修正 | |
105 | - スレッドのリンクでレス番があるものを踏んだときに、そのレス番号までスクロールするようにした。 | |
106 | - | |
107 | 92 | 2004/09/05 |
108 | 93 | Version バタ48 |
109 | 94 | レスポップアップあぼ〜ん有効にしていても、透明あぼ〜んを表示する不具合の解消 |
@@ -3,7 +3,7 @@ library ShitarabaJBBSPlugIn; | ||
3 | 3 | { |
4 | 4 | ShitarabaJBBSPlugIn |
5 | 5 | したらば処理ユニット |
6 | - $Id: ShitarabaJBBSPlugIn.dpr,v 1.36 2004/09/30 11:49:44 h677 Exp $ | |
6 | + $Id: ShitarabaJBBSPlugIn.dpr,v 1.30 2004/09/06 16:41:41 h677 Exp $ | |
7 | 7 | } |
8 | 8 | |
9 | 9 | uses |
@@ -33,7 +33,7 @@ type | ||
33 | 33 | |
34 | 34 | private |
35 | 35 | function Download : TDownloadState; |
36 | - function StorageDownload(AURL : string) : TDownloadState; | |
36 | + function StorageDownload(Path, Document : string) : TDownloadState; | |
37 | 37 | function Write( inName : string; inMail : string; inMessage : string ) : TDownloadState; |
38 | 38 | function GetRes( inNo : Integer ) : string; |
39 | 39 | function GetDat( inNo : Integer ) : string; |
@@ -281,8 +281,7 @@ var | ||
281 | 281 | // i : Integer; |
282 | 282 | const |
283 | 283 | BBS_HOST_OLD = 'jbbs.shitaraba.com'; |
284 | - BBS_HOST_OLD2 = 'jbbs.livedoor.com'; | |
285 | - BBS_HOST = 'jbbs.livedoor.jp'; | |
284 | + BBS_HOST = 'jbbs.livedoor.com'; | |
286 | 285 | THREAD_MARK = '/bbs/read.cgi'; |
287 | 286 | begin |
288 | 287 |
@@ -291,7 +290,7 @@ begin | ||
291 | 290 | uri := TIdURI.Create( inURL ); |
292 | 291 | uriList := TStringList.Create; |
293 | 292 | try |
294 | - if (uri.Host = BBS_HOST_OLD) or (uri.Host = BBS_HOST_OLD2) then | |
293 | + if uri.Host = BBS_HOST_OLD then | |
295 | 294 | uri.Host := BBS_HOST; |
296 | 295 | |
297 | 296 | ExtractHttpFields( ['/'], [], uri.Path, uriList ); |
@@ -350,13 +349,12 @@ var | ||
350 | 349 | |
351 | 350 | found : Integer; |
352 | 351 | found2 : Integer; |
353 | - pos : Integer; | |
354 | 352 | board : string; |
355 | 353 | const |
356 | 354 | CATEGORY_INPUT = 'カテゴリを入力してください'; |
357 | 355 | KEYWORD_INPUT = '検索する板名を入力してください'; |
358 | 356 | SAVEPATH_SELECT = '保存するファイル名を入力してください'; |
359 | - BBS_HOST = 'http://jbbs.livedoor.jp/'; | |
357 | + BBS_HOST = 'http://jbbs.livedoor.com/'; | |
360 | 358 | label |
361 | 359 | NextBoard; |
362 | 360 | begin |
@@ -439,12 +437,8 @@ begin | ||
439 | 437 | |
440 | 438 | saveText.Add( board ); |
441 | 439 | NextBoard: |
442 | - found := AnsiPos( '<a ', downResult ); | |
440 | + found := AnsiPos( '<a ', downResult ); | |
443 | 441 | end; |
444 | - pos := saveText.IndexOf('JBBS=/'); | |
445 | - if pos > 0 then | |
446 | - saveText.Delete(pos); | |
447 | - | |
448 | 442 | saveText.SaveToFile( savepath ); |
449 | 443 | saveText.Free; |
450 | 444 | end else begin |
@@ -505,14 +499,22 @@ begin | ||
505 | 499 | uriList := TStringList.Create; |
506 | 500 | try |
507 | 501 | ExtractHttpFields( ['/', '?'], [], uri.Path, uriList ); |
508 | - if uriList[ 5 ] = 'l100' then begin | |
509 | - FileName := uriList[ 4 ] + '.dat'; | |
510 | - FilePath := MyLogFolder + uriList[ 2 ] + '\' + uriList[ 3 ] + '\' + uriList[ 4 ] + '.dat'; | |
511 | - IsLogFile := FileExists( FilePath ); | |
512 | - end else begin | |
513 | - FileName := uriList[ 5 ] + '.dat'; | |
514 | - FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat'; | |
502 | + if (AnsiPos('.html', uri.Document) = 0) then begin //通常 | |
503 | + if uriList[ 5 ] = 'l100' then begin | |
504 | + FileName := uriList[ 4 ] + '.dat'; | |
505 | + FilePath := MyLogFolder + uriList[ 2 ] + '\' + uriList[ 3 ] + '\' + uriList[ 4 ] + '.dat'; | |
506 | + IsLogFile := FileExists( FilePath ); | |
507 | + end else begin | |
508 | + FileName := uriList[ 5 ] + '.dat'; | |
509 | + FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat'; | |
510 | + IsLogFile := FileExists( FilePath ); | |
511 | + end; | |
512 | + end else begin //過去ログ | |
513 | + //http://jbbs.livedoor.com/game/1578/storage/1086710948.html | |
514 | + FileName := Copy(uri.Document, 1, Length(uri.Document) - 5) + '.dat'; | |
515 | + FilePath := MyLogFolder + CustomStringReplace(CustomStringReplace(uri.Path, '/storage', ''), '/', '\') + FileName; | |
515 | 516 | IsLogFile := FileExists( FilePath ); |
517 | + | |
516 | 518 | end; |
517 | 519 | finally |
518 | 520 | uri.Free; |
@@ -549,109 +551,115 @@ var | ||
549 | 551 | logStream : TFileStream; |
550 | 552 | uri : TIdURI; |
551 | 553 | uriList : TStringList; |
552 | - datURL, tmpURL : string; | |
553 | - tmpText: string; | |
554 | + datURL : string; | |
555 | + tmpText: string; | |
554 | 556 | begin |
555 | 557 | |
556 | 558 | Result := dsError; |
557 | 559 | |
558 | 560 | uri := TIdURI.Create( ReadURL ); |
559 | - uriList := TStringList.Create; | |
560 | - try | |
561 | - ExtractHttpFields( ['/', '?'], [], uri.Path, uriList ); | |
562 | - FileName := uriList[ 5 ] + '.dat'; | |
563 | - // http://jbbs.livedoor.com/bbs/rawmode.cgi/game/1578/1067968274/l100 | |
564 | - // protocol://host/1/2/3/4/5/uriList.Count - 1 | |
565 | - if MyLogFolder = '' then begin | |
566 | - // どこに保存していいのか分からないので一時ファイルに保存 | |
567 | - FilePath := TemporaryFile; | |
568 | - FIsTemporary := True; | |
569 | - end else begin | |
570 | - FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat'; | |
571 | - FIsTemporary := False; | |
572 | - end; | |
573 | - finally | |
561 | + if(( AnsiPos('.html', uri.Document) >0 ) and ( AnsiPos('/storage/', uri.Path) > 0 )) then begin | |
562 | + //過去ログ | |
563 | + Result := StorageDownload(uri.Path, uri.Document); | |
574 | 564 | uri.Free; |
575 | - uriList.Free; | |
576 | - end; | |
565 | + end else begin | |
566 | + //現在生きてるスレッド | |
567 | + uriList := TStringList.Create; | |
568 | + try | |
569 | + ExtractHttpFields( ['/', '?'], [], uri.Path, uriList ); | |
570 | + FileName := uriList[ 5 ] + '.dat'; | |
571 | + // http://jbbs.livedoor.com/bbs/rawmode.cgi/game/1578/1067968274/l100 | |
572 | + // protocol://host/1/2/3/4/5/uriList.Count - 1 | |
573 | + if MyLogFolder = '' then begin | |
574 | + // どこに保存していいのか分からないので一時ファイルに保存 | |
575 | + FilePath := TemporaryFile; | |
576 | + FIsTemporary := True; | |
577 | + end else begin | |
578 | + FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat'; | |
579 | + FIsTemporary := False; | |
580 | + end; | |
581 | + finally | |
582 | + uri.Free; | |
583 | + uriList.Free; | |
584 | + end; | |
577 | 585 | |
578 | - // 保存用のディレクトリを掘る | |
579 | - ForceDirectoriesEx( Copy( FilePath, 1, LastDelimiter( '\', FilePath ) ) ); | |
586 | + // 保存用のディレクトリを掘る | |
587 | + ForceDirectoriesEx( Copy( FilePath, 1, LastDelimiter( '\', FilePath ) ) ); | |
580 | 588 | |
581 | - // 独自にダウンロードやフィルタリングを行わない場合は | |
582 | - // InternalDownload に任せることが出来る | |
583 | - modified := LastModified; | |
584 | - datURL := ReadURL + IntToStr( Count + 1 ) + '-'; // 新着のみ | |
585 | - responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 ); | |
589 | + // 独自にダウンロードやフィルタリングを行わない場合は | |
590 | + // InternalDownload に任せることが出来る | |
591 | + modified := LastModified; | |
592 | + datURL := ReadURL + IntToStr( Count + 1 ) + '-'; // 新着のみ | |
593 | + responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 ); | |
586 | 594 | |
587 | - try | |
588 | - if (responseCode = 200) or (responseCode = 206) then begin | |
589 | - downResult := TStringList.Create; | |
590 | - try | |
591 | - tmpText := CustomStringReplace( string( tmp ), '。?ョ', ',' ); | |
592 | - downResult.Text := EUCtoSJIS( tmpText ); | |
593 | - ArrangeDownloadData(Count, downResult); | |
594 | - if downResult.Count > 0 then begin | |
595 | - if FileExists( FilePath ) then | |
596 | - logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite ) | |
597 | - else | |
598 | - logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite ); | |
599 | - try | |
600 | - logStream.Position := logStream.Size; | |
601 | - logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) ); | |
602 | - finally | |
603 | - logStream.Free; | |
604 | - end; | |
595 | + try | |
596 | + if (responseCode = 200) or (responseCode = 206) then begin | |
597 | + downResult := TStringList.Create; | |
598 | + try | |
599 | + tmpText := CustomStringReplace( string( tmp ), '。?ョ', ',' ); | |
600 | + downResult.Text := EUCtoSJIS( tmpText ); | |
601 | + ArrangeDownloadData(Count, downResult); | |
602 | + if downResult.Count > 0 then begin | |
603 | + if FileExists( FilePath ) then | |
604 | + logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite ) | |
605 | + else | |
606 | + logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite ); | |
607 | + try | |
608 | + logStream.Position := logStream.Size; | |
609 | + logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) ); | |
610 | + finally | |
611 | + logStream.Free; | |
612 | + end; | |
605 | 613 | |
606 | - if Count = 0 then | |
607 | - // 新規 | |
608 | - Result := dsComplete | |
609 | - else | |
610 | - // 追記 | |
611 | - Result := dsDiffComplete; | |
614 | + if Count = 0 then | |
615 | + // 新規 | |
616 | + Result := dsComplete | |
617 | + else | |
618 | + // 追記 | |
619 | + Result := dsDiffComplete; | |
612 | 620 | |
613 | - Size := Size + Length( downResult.Text ); | |
614 | - // CGI からは正しい日付が得られないので現在に設定 | |
615 | - LastModified := Now; | |
621 | + Size := Size + Length( downResult.Text ); | |
622 | + // CGI からは正しい日付が得られないので現在に設定 | |
623 | + LastModified := Now; | |
616 | 624 | |
617 | 625 | |
618 | 626 | |
619 | - NewReceive := Count + 1; | |
620 | - Count := Count + downResult.Count; | |
621 | - NewResCount := downResult.Count; | |
627 | + NewReceive := Count + 1; | |
628 | + Count := Count + downResult.Count; | |
629 | + NewResCount := downResult.Count; | |
622 | 630 | |
623 | 631 | |
624 | 632 | |
625 | - end else begin | |
626 | - Result := dsNotModify; | |
633 | + end else begin | |
634 | + Result := dsNotModify; | |
635 | + end; | |
636 | + finally | |
637 | + downResult.Free; | |
627 | 638 | end; |
628 | - finally | |
629 | - downResult.Free; | |
630 | - end; | |
631 | - end else if responseCode = 302 then begin | |
632 | - //http://jbbs.shitaraba.com/bbs/read.cgi/game/3477/1077473358/ | |
633 | - //http://jbbs.shitaraba.com/game/bbs/read.cgi?BBS=3477&KEY=1077473358 | |
634 | - //http://jbbs.shitaraba.com/game/3477/storage/1077473358.html | |
635 | - //過去ログ | |
636 | - //tmpURL := URL; | |
637 | - if Assigned( InternalPrint ) then | |
638 | - InternalPrint( '過去ログ倉庫入り' ); | |
639 | - uri := TIdURI.Create( ReadURL ); | |
640 | - uriList := TStringList.Create; | |
641 | - try | |
642 | - ExtractHttpFields( ['/', '?'], [], uri.Path, uriList ); | |
643 | - tmpURL := uri.Protocol + '://' + uri.Host + | |
644 | - '/' + uriList[3] + '/' + uriList[4] + '/storage/' + uriList[ 5 ] + '.html'; | |
645 | - finally | |
646 | - uriList.Free; | |
639 | + end else if responseCode = 302 then begin | |
640 | + //http://jbbs.shitaraba.com/bbs/read.cgi/game/3477/1077473358/ | |
641 | + //http://jbbs.shitaraba.com/game/bbs/read.cgi?BBS=3477&KEY=1077473358 | |
642 | + //http://jbbs.shitaraba.com/game/3477/storage/1077473358.html | |
643 | + //過去ログ | |
644 | + uri := TIdURI.Create( ReadURL ); | |
645 | + uriList := TStringList.Create; | |
646 | + try | |
647 | + ExtractHttpFields( ['/', '?'], [], uri.Path, uriList ); | |
648 | + URL := uri.Protocol + '://' + uri.Host + | |
649 | + '/' + uriList[3] + '/' + uriList[4] + '/storage/' + uriList[ 5 ] + '.html'; | |
650 | + finally | |
651 | + uriList.Free; | |
652 | + uri.Free; | |
653 | + end; | |
654 | + uri := TIdURI.Create( ReadURL ); | |
655 | + Result := StorageDownload(uri.Path, uri.Document); | |
647 | 656 | uri.Free; |
657 | + end else if responseCode = 304 then begin | |
658 | + Result := dsNotModify; | |
648 | 659 | end; |
649 | - Result := StorageDownload(tmpURL); | |
650 | - end else if responseCode = 304 then begin | |
651 | - Result := dsNotModify; | |
660 | + finally | |
661 | + DisposeResultString( tmp ); | |
652 | 662 | end; |
653 | - finally | |
654 | - DisposeResultString( tmp ); | |
655 | 663 | end; |
656 | 664 | |
657 | 665 | end; |
@@ -691,16 +699,17 @@ end; | ||
691 | 699 | // 過去ログ用Download関数 |
692 | 700 | // ************************************************************************* |
693 | 701 | function TShitarabaThreadItem.StorageDownload( |
694 | - AURL : string | |
702 | + Path, Document : string | |
695 | 703 | ) : TDownloadState; |
696 | 704 | var |
697 | 705 | modified : Double; |
698 | 706 | tmp : PChar; |
699 | - uri : TIdURI; | |
700 | - uriList : TStringList; | |
701 | 707 | downResult : TStringList; |
702 | 708 | responseCode : Longint; |
703 | 709 | logStream : TFileStream; |
710 | + //uri : TIdURI; | |
711 | + //uriList : TStringList; | |
712 | + datURL : string; | |
704 | 713 | tmpText, tmpLine, tmpTitle: string; |
705 | 714 | tmpHTML: TStringList; |
706 | 715 |
@@ -709,24 +718,23 @@ var | ||
709 | 718 | begin |
710 | 719 | |
711 | 720 | Result := dsError; |
712 | - uri := TIdURI.Create( ReadURL ); | |
713 | - uriList := TStringList.Create; | |
721 | + | |
722 | + //uri := TIdURI.Create( ReadURL ); | |
714 | 723 | try |
715 | - ExtractHttpFields( ['/', '?'], [], uri.Path, uriList ); | |
716 | - FileName := uriList[ 5 ] + '.dat'; | |
717 | - // http://jbbs.livedoor.com/bbs/rawmode.cgi/game/1578/1067968274/l100 | |
718 | - // protocol://host/1/2/3/4/5/uriList.Count - 1 | |
724 | + FileName := Copy(Document, 1, Length(Document) - 5) + '.dat'; | |
719 | 725 | if MyLogFolder = '' then begin |
720 | 726 | // どこに保存していいのか分からないので一時ファイルに保存 |
721 | 727 | FilePath := TemporaryFile; |
722 | 728 | FIsTemporary := True; |
723 | 729 | end else begin |
724 | - FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat'; | |
730 | + FilePath := MyLogFolder | |
731 | + + CustomStringReplace(CustomStringReplace(Path, '/storage', ''), '/', '\') | |
732 | + + FileName; | |
733 | + | |
725 | 734 | FIsTemporary := False; |
726 | 735 | end; |
727 | 736 | finally |
728 | - uri.Free; | |
729 | - uriList.Free; | |
737 | + //uri.Free; | |
730 | 738 | end; |
731 | 739 | |
732 | 740 | // 保存用のディレクトリを掘る |
@@ -738,7 +746,8 @@ begin | ||
738 | 746 | // InternalDownload に任せることが出来る |
739 | 747 | modified := LastModified; |
740 | 748 | |
741 | - responseCode := InternalDownload( PChar( AURL ), modified, tmp, 0 ); | |
749 | + datURL := ReadURL; | |
750 | + responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 ); | |
742 | 751 | |
743 | 752 | try |
744 | 753 | if (responseCode = 200) or (responseCode = 206) then begin |
@@ -1149,8 +1158,7 @@ var | ||
1149 | 1158 | tmphost: String; |
1150 | 1159 | const |
1151 | 1160 | BBS_HOST_OLD = 'jbbs.shitaraba.com'; |
1152 | - BBS_HOST_OLD2 = 'jbbs.livedoor.com'; | |
1153 | - BBS_HOST = 'jbbs.livedoor.jp'; | |
1161 | + BBS_HOST = 'jbbs.livedoor.com'; | |
1154 | 1162 | begin |
1155 | 1163 | |
1156 | 1164 | uri := TIdURI.Create( ReadURL ); |
@@ -1160,15 +1168,22 @@ begin | ||
1160 | 1168 | |
1161 | 1169 | tmphost := uri.Host; |
1162 | 1170 | |
1163 | - if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1171 | + if tmphost = BBS_HOST_OLD then | |
1164 | 1172 | tmphost := BBS_HOST; |
1165 | 1173 | |
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 ] + '/' ); | |
1174 | + if( AnsiPos('.html', uri.Document) = 0 ) then begin //通常 | |
1175 | + FileName := uriList[ 5 ] + '.dat'; | |
1176 | + // http://jbbs.livedoor.com/bbs/read.cgi/computer/351/1090404452/l100 | |
1177 | + // http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1067968274/l100 | |
1178 | + // http://jbbs.livedoor.com/game/1000/subject.txt | |
1179 | + Result := CreateResultString( | |
1180 | + uri.Protocol + '://' + tmphost + '/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' ); | |
1181 | + end else begin | |
1182 | + //http://jbbs.livedoor.com/game/1578/storage/1086710948.html | |
1183 | + Result := CreateResultString( | |
1184 | + uri.Protocol + '://' + tmphost + CustomStringReplace(uri.Path, '/storage', '')); | |
1185 | + end; | |
1186 | + | |
1172 | 1187 | finally |
1173 | 1188 | uri.Free; |
1174 | 1189 | uriList.Free; |
@@ -1218,8 +1233,7 @@ var | ||
1218 | 1233 | dir, tmphost : string; |
1219 | 1234 | const |
1220 | 1235 | BBS_HOST_OLD = 'jbbs.shitaraba.com'; |
1221 | - BBS_HOST_OLD2 = 'jbbs.livedoor.com'; | |
1222 | - BBS_HOST = 'jbbs.livedoor.jp'; | |
1236 | + BBS_HOST = 'jbbs.livedoor.com'; | |
1223 | 1237 | begin |
1224 | 1238 | |
1225 | 1239 | foundPos := AnsiPos( '?', URL ); |
@@ -1232,7 +1246,7 @@ begin | ||
1232 | 1246 | dir := uriList[ 1 ]; |
1233 | 1247 | |
1234 | 1248 | tmphost := uri.Host; |
1235 | - if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1249 | + if tmphost = BBS_HOST_OLD then | |
1236 | 1250 | tmphost := BBS_HOST; |
1237 | 1251 | |
1238 | 1252 | ExtractHttpFields( ['&'], [], Copy( URL, foundPos + 1, MaxInt ), uriList ); |
@@ -1254,7 +1268,7 @@ begin | ||
1254 | 1268 | ExtractHttpFields( ['/'], [], uri.Path, uriList ); |
1255 | 1269 | |
1256 | 1270 | tmphost := uri.Host; |
1257 | - if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1271 | + if tmphost = BBS_HOST_OLD then | |
1258 | 1272 | tmphost := BBS_HOST; |
1259 | 1273 | |
1260 | 1274 | if( AnsiPos(THREAD_MARK, URL) > 0) and (uriList.Count > 5) then begin |
@@ -1265,8 +1279,7 @@ begin | ||
1265 | 1279 | end else if AnsiPos(THREAD_MARK, URL) = 0 then begin |
1266 | 1280 | //ココで過去ログかどうかチェック? |
1267 | 1281 | if(AnsiPos('.html/', uri.Path) > 0) then begin |
1268 | - Result := uri.Protocol + '://' + tmphost + THREAD_MARK + | |
1269 | - CustomStringReplace(CustomStringReplace(uri.Path, '/storage', ''), '.html/', '/') + 'l100'; | |
1282 | + Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1); | |
1270 | 1283 | end else |
1271 | 1284 | Result := URL; |
1272 | 1285 | end; |
@@ -1291,8 +1304,7 @@ var | ||
1291 | 1304 | dir, tmphost : string; |
1292 | 1305 | const |
1293 | 1306 | BBS_HOST_OLD = 'jbbs.shitaraba.com'; |
1294 | - BBS_HOST_OLD2 = 'jbbs.livedoor.com'; | |
1295 | - BBS_HOST = 'jbbs.livedoor.jp'; | |
1307 | + BBS_HOST = 'jbbs.livedoor.com'; | |
1296 | 1308 | begin |
1297 | 1309 | |
1298 | 1310 | foundPos := AnsiPos( '?', URL ); |
@@ -1305,7 +1317,7 @@ begin | ||
1305 | 1317 | dir := uriList[ 1 ]; |
1306 | 1318 | |
1307 | 1319 | tmphost := uri.Host; |
1308 | - if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1320 | + if tmphost = BBS_HOST_OLD then | |
1309 | 1321 | tmphost := BBS_HOST; |
1310 | 1322 | |
1311 | 1323 | ExtractHttpFields( ['&'], [], Copy( URL, foundPos + 1, MaxInt ), uriList ); |
@@ -1327,13 +1339,19 @@ begin | ||
1327 | 1339 | ExtractHttpFields( ['/'], [], uri.Path, uriList ); |
1328 | 1340 | |
1329 | 1341 | tmphost := uri.Host; |
1330 | - if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then | |
1342 | + if tmphost = BBS_HOST_OLD then | |
1331 | 1343 | tmphost := BBS_HOST; |
1332 | 1344 | // http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1067968274/l100 |
1333 | 1345 | if( AnsiPos(THREAD_MARK, URL) > 0) and (uriList.Count > 5) then begin |
1334 | 1346 | Result := |
1335 | 1347 | uri.Protocol + '://' + tmphost + '/bbs/rawmode.cgi/' + |
1336 | 1348 | uriList[ 3 ] + '/' + uriList[ 4 ] + '/' + uriList[ 5 ] + '/'; |
1349 | + end else if AnsiPos(THREAD_MARK, URL) = 0 then begin | |
1350 | + //ココで過去ログかどうかチェック? | |
1351 | + if(AnsiPos('.html/', uri.Path) > 0) then begin | |
1352 | + Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1); | |
1353 | + end else | |
1354 | + Result := URL; | |
1337 | 1355 | end; |
1338 | 1356 | finally |
1339 | 1357 | uri.Free; |
@@ -1415,8 +1433,7 @@ var | ||
1415 | 1433 | uriList : TStringList; |
1416 | 1434 | const |
1417 | 1435 | BBS_HOST_OLD = 'jbbs.shitaraba.com'; |
1418 | - BBS_HOST_OLD2 = 'jbbs.livedoor.com'; | |
1419 | - BBS_HOST = 'jbbs.livedoor.jp'; | |
1436 | + BBS_HOST = 'jbbs.livedoor.com'; | |
1420 | 1437 | begin |
1421 | 1438 | |
1422 | 1439 | inherited; |
@@ -1433,7 +1450,7 @@ begin | ||
1433 | 1450 | uri := TIdURI.Create( SubjectURL ); |
1434 | 1451 | uriList := TStringList.Create; |
1435 | 1452 | try |
1436 | - if (uri.Host = BBS_HOST_OLD) or (uri.Host = BBS_HOST_OLD2) then | |
1453 | + if uri.Host = BBS_HOST_OLD then | |
1437 | 1454 | uri.Host := BBS_HOST; |
1438 | 1455 | URL := uri.Protocol + '://' + uri.Host + uri.Path; |
1439 | 1456 |
@@ -15,7 +15,7 @@ | ||
15 | 15 | var start_time = new Date(); |
16 | 16 | //==========グローバル変数 |
17 | 17 | var anchorHead=""; |
18 | -var skinName="skin30-2 v3.3.09xx"; | |
18 | +var skinName="skin30-2 v3.1.11xx"; | |
19 | 19 | var browser="ギコナビ"; |
20 | 20 | //==========ギコナビ用アンカーの判定(0:処理無し,1:ポップアップ,2:ボタン挿入) |
21 | 21 | // ギコナビでは、レスアンカーは相対アドレスで記述される |
@@ -27,22 +27,13 @@ function checkAnchor(href){if(!href){return(0)} | ||
27 | 27 | //==========リンク設定 |
28 | 28 | function addAnchor(inner,num){ |
29 | 29 | if(!t_url){threadurl()} |
30 | - var url=document.getElementsByName("ThreadURL")[0].content; | |
31 | - if(url.match(/&/)){ | |
32 | - return('<a href="../test/read.cgi?bbs='+t_bbs+'&key='+t_key+'&st='+inner+'&to='+inner+'&nofirst=true" target="_blank" onclick="blur()">'+num+'</a>') | |
33 | - }else{ | |
34 | - return('<a href="../test/read.cgi/'+t_bbs+'/'+t_key+'/'+inner+'" target="_blank" onclick="blur()">'+num+'</a>') | |
35 | - } | |
30 | + return('<a href="../test/read.cgi/'+t_bbs+'/'+t_key+'/'+inner+'" target="_blank" onclick="blur()">'+num+'</a>') | |
36 | 31 | } |
37 | 32 | // スレッドURLの取得 |
38 | 33 | var t_url=false,t_domain,t_bbs,t_key; |
39 | 34 | function threadurl(){ |
40 | 35 | var threadurl=document.getElementsByName("ThreadURL")[0].content; |
41 | - if(threadurl.match(/&/)){ | |
42 | - threadurl.match(/bbs=(.*)&key=(\d*)/); | |
43 | - }else{ | |
44 | - threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//); | |
45 | - } | |
36 | + threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//); | |
46 | 37 | t_url=true; |
47 | 38 | t_bbs=RegExp.$1; |
48 | 39 | t_key=RegExp.$2; |
@@ -2,8 +2,7 @@ | ||
2 | 2 | //外部関数:tohan |
3 | 3 | //外部変数:anchorHead,lightmode,getID,skinName,browser,dts |
4 | 4 | //グローバル変数 |
5 | -var buffer=1; // 低速回線や低速マシンの場合にはbufferの数値を増やすとより正確にジャンプ(1増やすと0.1秒遅れる) | |
6 | -var newResJump=1; // 新着レスジャンプ(0:ブラウザ任せ、1:読了時のみ、2:常時)*かちゅ、OpenJane、twintailのみの設定 | |
5 | +var buffer=1; // 低速回線や低速マシンの場合にはbufferの数値を増やすとより正確にジャンプ(1増やすと0.1秒遅れる) | |
7 | 6 | //========Click処理→search,他 |
8 | 7 | document.onclick = clickEvent; |
9 | 8 | function clickEvent(){ |
@@ -41,19 +40,10 @@ function mouseOverEvent() { | ||
41 | 40 | else if(e.innerText.match(/^あぼ〜ん$/)) {abonePopup(e);} |
42 | 41 | } |
43 | 42 | if(e.tagName=='A'){ |
44 | - if(!e.innerText.match(/%/)){ // URLエンコードでありがちな%がなければ | |
45 | - e.href=e.href.replace(/>/g,""); | |
46 | - e.href=e.href.replace(/\/ime.nu/g,""); | |
47 | - }else{ | |
48 | - try{ | |
49 | - e.title=decodeURI(e.innerText); | |
50 | - }catch(err){ | |
51 | - // ShiftJIS,EUC-JPのデコードは面倒だからつけない。 | |
52 | - } | |
53 | - } | |
43 | + e.href=e.href.replace(/>/g,""); | |
44 | + e.href=e.href.replace(/\/ime.nu/g,""); | |
54 | 45 | if (checkAnchor(e.href)==2){insButton(e);return;} |
55 | 46 | else if(checkAnchor(e.href)==1){ |
56 | - if(event.shiftKey){if(e.rel){e.href=e.rel}return} | |
57 | 47 | // 多段ポップアップ |
58 | 48 | var aNum=parseInt(e.sourceIndex)+1; |
59 | 49 | if(!document.getElementById("p"+aNum)){ |
@@ -106,10 +96,10 @@ function scroll_End(){document.getElementsByTagName("DL")[0].lastChild.scrollInt | ||
106 | 96 | // IMG |
107 | 97 | function imgCommand(mode,s){ |
108 | 98 | if(!waited){ |
109 | - var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="全レス一括読込"><br><input type="button" onclick="allImageLoad(\'new\')" value="新レス一括読込"><br><input type="button" onclick="removeError()" value="Error画像削除"><br></div>'; | |
99 | + var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="全レス一括読込"><br><input type="button" onclick="allImageLoad(\'new\')" value="新レス一括読込"><br></div>'; | |
110 | 100 | event.srcElement.parentElement.insertAdjacentHTML('beforeEnd',nHTML); |
111 | 101 | if(skinName.match(/30-2/)){ |
112 | - //if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="パネル切替"><br>')} | |
102 | + if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="パネル切替"><br>')} | |
113 | 103 | document.getElementById("command").insertAdjacentHTML('beforeEnd','<input type="button" onclick="changeMode()" value="モード切替">') |
114 | 104 | } |
115 | 105 | waited=true; |
@@ -119,7 +109,7 @@ function imgCommand(mode,s){ | ||
119 | 109 | } |
120 | 110 | function clearCommand(){ |
121 | 111 | waited=false; |
122 | - document.getElementById("command").removeNode(true); | |
112 | + event.srcElement.parentElement.removeNode(true); | |
123 | 113 | } |
124 | 114 | //=========左長押処理→copyMenu() |
125 | 115 | document.onmousedown=mousedownEvent; |
@@ -132,7 +122,6 @@ function mousedownEvent(){ | ||
132 | 122 | clickTimer=setTimeout("copyMenu()",500); |
133 | 123 | } |
134 | 124 | } |
135 | - | |
136 | 125 | //コピーメニュー→colorChange(),search::copyText() |
137 | 126 | function copyMenu(){ |
138 | 127 | clickCancel=true; clearTimeout(clickTimer); |
@@ -176,53 +165,27 @@ function key(){ | ||
176 | 165 | } |
177 | 166 | } |
178 | 167 | |
179 | -//=========新着レス取得後処理(標準スキン未対応ブラウザ用)←Timer又はFooterから呼び出し | |
180 | -//=========かちゅ、ABone、ゾヌ2 | |
168 | +//=========Load(代替)処理(各Footerもしくは、Headerでのループから呼出し) | |
181 | 169 | var newResNum=parseInt(document.getElementsByName("GetRescount")[0].content)+1; |
182 | 170 | var k=0; |
183 | -function loadEvent(num){ // Timer又はFooterから | |
184 | - //====新着レスジャンプ | |
185 | - if(newResJump==0){clearInterval(timerID);return} //「ブラウザ任せ」なら終了 | |
186 | - //新着レスの開始番号を取得 | |
187 | - if (browser=="かちゅ〜しゃ"){if(isNaN(newResNum)){while(dts[k]){if(dts[k].className=="new"){newResNum=parseInt(dts[k].firstChild.innerText);break;} k++;}}} | |
188 | - else if(browser=="ホットゾヌ2"){newResNum=num+1;} | |
171 | +function loadEvent(){ | |
172 | + //GetRescount代替 "数字でなければ" | |
173 | + if(isNaN(newResNum)){while(dts[k]){if(dts[k].className=="new"){newResNum=parseInt(dts[k].firstChild.innerText);break;} k++; }} | |
174 | + //新着開始ナンバーを設定してジャンプ | |
189 | 175 | var anc=document.anchors(anchorHead+newResNum); |
190 | - if(!anc || !anc.parentElement){return} // 透明あぼ〜んされてたら終了 | |
191 | - //新着レスジャンプ | |
192 | - scr=lightmode ? document.body : document.getElementById("dl"); | |
193 | - viewPos=scr.scrollTop+scr.clientHeight;// スクロール後の画面下部位置 | |
194 | - endPos =anc.offsetTop+20; // 新レスアンカー位置 | |
195 | - //最後まで読了 or 「常に新着ジャンプ」ならジャンプ | |
196 | - if(viewPos>endPos || newResJump==2){clearInterval(timerID);setTimeout("moveToNew("+newResNum+")",buffer*100)} | |
197 | - else{firstNew=document.anchors(anchorHead+newResNum).parentElement.nextSibling;} | |
198 | -} | |
199 | -//=========新着レス取得後処理(標準スキン対応ブラウザ用)←NewMarkから呼び出し | |
200 | -//=========OpenJ、twin | |
201 | -var scr,viewPos,endPos=0; | |
202 | -function reloadEvent(){ | |
203 | - //====既読化 | |
204 | - var lastDt=dts[dts.length-2];if(!lastDt){return}// 全部新着なら終了 | |
205 | - while(lastDt && lastDt.className=="new"){lastDt.className="";lastDt=lastDt.previousSibling.previousSibling;} | |
206 | - //====新着レスジャンプ | |
207 | - if(newResJump==0){return} //「ブラウザ任せ」なら終了 | |
208 | - var ancs=document.anchors; | |
209 | - var newResNum=parseInt(ancs[ancs.length-1].name)+1; | |
210 | - scr=lightmode ? document.body : document.getElementById("dl"); | |
211 | - viewPos=scr.scrollTop; | |
212 | - endPos =scr.scrollHeight-scr.clientHeight-20; | |
213 | - //最後まで読了 or 「常に新着ジャンプ」ならジャンプ | |
214 | - if(viewPos>endPos || newResJump==2){setTimeout("moveToNew("+newResNum+")",buffer*100);} | |
176 | + if(anc && anc.parentElement){ | |
177 | + if(buffer==0){clearInterval(timerID);moveToNew(newResNum);} | |
178 | + else {buffer--;} | |
179 | + } | |
215 | 180 | } |
216 | - | |
217 | 181 | // 新着レス移動+新着レスの位置を記憶 |
218 | 182 | var firstNew; |
219 | 183 | function moveToNew(num){ |
220 | 184 | firstNew=getDTfromAnc(num); |
221 | - while(!firstNew){num--;firstNew=getDTfromAnc(num);} //対象が透明あぼ〜んなら数を減らす | |
222 | - firstNew.scrollIntoView(true); | |
185 | + if(firstNew){firstNew.scrollIntoView(true);} | |
223 | 186 | } |
224 | 187 | |
225 | -//=========DoubleClick処理→defaultPopup() | |
188 | +//=========DblClick処理→defaultPopup() | |
226 | 189 | document.ondblclick=defaultPopup; |
227 | 190 | function defaultPopup(){ |
228 | 191 | var num=document.selection.createRange().text.replace(/\s$/,""); |
@@ -237,17 +200,4 @@ function defaultPopup(){ | ||
237 | 200 | obj.innerText="ID:"+num; |
238 | 201 | search(obj); |
239 | 202 | } |
240 | -} | |
241 | - | |
242 | -//=========Copy処理 | |
243 | -//headから読むとbodyは見えないので、専用ブラウザの特質を利用してbodyの後ろに書き出す | |
244 | -//本来どおりheadに書き出すSkinManager対策で判定を一つ入れる | |
245 | - if(document.body) document.write('<script type="text/javascript">document.body.oncopy=copyEvent</script>\n'); | |
246 | -function copyEvent(){ | |
247 | - var textarea=document.createElement("TEXTAREA"); | |
248 | - textarea.value=document.selection.createRange().text.replace(/\s(\r\n|$)/g,"\n"); | |
249 | - var copyText=textarea.createTextRange(); | |
250 | - copyText.execCommand("Copy"); | |
251 | - return false; | |
252 | -} | |
253 | - | |
203 | +} | |
\ No newline at end of file |
@@ -2,8 +2,7 @@ | ||
2 | 2 | // 外部関数:addAnchor |
3 | 3 | // 外部変数:cp,tp,vp,dds |
4 | 4 | //======画像読込の設定 |
5 | -var onMouseLoad=true; // true:カーソルを合わせただけ、false:LOADボタンをクリックしてから | |
6 | -var takeArisk=false; // true:画像読み込み時にモード切替、false:手動でモード切替 | |
5 | +var onMouseLoad=true; // true:カーソルを合わせただけ、false:LOADボタンをクリックしてから | |
7 | 6 | //==========グローバル変数 |
8 | 7 | //==========画像処理等 |
9 | 8 | var lightmode = true; |
@@ -69,13 +68,12 @@ function insButton(a,hRH) { | ||
69 | 68 | // 画像読込 |
70 | 69 | function loadImage(btn,href){ |
71 | 70 | if(!panel){changePanel()} |
72 | - if(takeArisk && lightmode){changeMode()} | |
73 | 71 | if(btn.tagName!="A"){ |
74 | 72 | var thumbs = document.images; |
75 | 73 | var l=thumbs.length; |
76 | 74 | for(var i=l;i--;){if(thumbs[i].src==href){ |
77 | 75 | if(lightmode){tp.style.visibility="visible";viewed=true;} |
78 | - //thumbs[i].scrollIntoView(true); | |
76 | + thumbs[i].scrollIntoView(true); | |
79 | 77 | imgOver(thumbs[i],100); |
80 | 78 | return true; |
81 | 79 | }} |
@@ -105,7 +103,7 @@ function loadImage(btn,href){ | ||
105 | 103 | function imgResult(img){ |
106 | 104 | var btn=img.parentElement.children.item(2); |
107 | 105 | if(event.type=="load"){btn.value='___'; img.style.display='block';} |
108 | - else {btn.value='NONE';btn.style.color='#C00';setTimeout("viewed=false",3000)} | |
106 | + else {btn.value='NONE';btn.style.color='#C00';} | |
109 | 107 | } |
110 | 108 | // サイズの切替 |
111 | 109 | function changeSize(btn){ |
@@ -124,15 +122,6 @@ function changeSize(btn){ | ||
124 | 122 | } |
125 | 123 | // サムネイルの削除 |
126 | 124 | function removeThumb(btn){btn.parentElement.removeNode(true);} |
127 | -function removeError(){ | |
128 | - if(tp){ | |
129 | - var l=tp.childNodes.length; | |
130 | - for(var i=l;i--;){ | |
131 | - var stateBtn=tp.childNodes[i].childNodes[2]; | |
132 | - if(stateBtn.tagName=="BUTTON" && stateBtn.innerText=="NONE"){stateBtn.parentElement.removeNode(true);} | |
133 | - } | |
134 | - } | |
135 | -} | |
136 | 125 | // 画像表示の切替 |
137 | 126 | function changeView(mode,href){ |
138 | 127 | if(!href){href=event.srcElement.src} |
@@ -15,7 +15,7 @@ var pb; | ||
15 | 15 | function namePopup(e,before,num,after){ |
16 | 16 | var hnum=tohan(num); |
17 | 17 | //3周年、4周年、Socket774、774KB、21禁、[1-30]、などに対応 |
18 | - if(before){if(hnum==5 || hnum==774 || hnum==4 || hnum==21 || hnum==1 || hnum==30){return}} | |
18 | + if(before){if(hnum==3 || hnum==774 || hnum==4 || hnum==21 || hnum==1 || hnum==30){return}} | |
19 | 19 | e.outerHTML = "<b>"+before+"</b><b>"+addAnchor(hnum,num)+"</b><b>"+after+"</b>"; |
20 | 20 | } |
21 | 21 | //=========弱あぼ〜んのポップアップ |
@@ -110,7 +110,7 @@ function clearResult(obj){ | ||
110 | 110 | for(var i=l;i--;){ |
111 | 111 | var dt=eval(arrayElement); var dd=dt.nextSibling; |
112 | 112 | //Live機能追加 - 透明あぼ〜ん |
113 | - if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;} | |
113 | + if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;continue;} | |
114 | 114 | dt.removeNode(true); dd.removeNode(true); |
115 | 115 | } |
116 | 116 | } |
@@ -144,7 +144,7 @@ function findIt(word){ | ||
144 | 144 | |
145 | 145 | //==========逆参照 |
146 | 146 | function searchRef(obj){ |
147 | - if(obj.name!='referred'){ | |
147 | + if(obj.name!='reffered'){ | |
148 | 148 | var num=obj.firstChild.innerText; |
149 | 149 | var l=dds.length; |
150 | 150 | var found = new Array; |
@@ -171,7 +171,7 @@ function searchRef(obj){ | ||
171 | 171 | if(exist){ |
172 | 172 | var dt=dds[i].previousSibling.cloneNode(true); |
173 | 173 | found.unshift(dt.outerHTML.replace(/name=.*?>/,">")+dd.outerHTML.replace(/<a name=.*>/i,"")); |
174 | - obj.name="referred"; | |
174 | + obj.name="reffered"; | |
175 | 175 | } |
176 | 176 | } |
177 | 177 | if(found.length){returnRef(obj.nextSibling,found)} |
@@ -190,12 +190,13 @@ function returnRef(dd,found){ | ||
190 | 190 | function copyText(target){ |
191 | 191 | var num=event.srcElement.parentElement.name; |
192 | 192 | var obj=getDTfromAnc(num); |
193 | + var decoy=document.createDocumentFragment(); | |
193 | 194 | var textarea=document.createElement("TEXTAREA"); |
194 | - var message=obj.nextSibling.innerText.replace(/\s(\r\n|$)/g,"\n"); | |
195 | - if (target=="res") {textarea.value=obj.firstChild.innerText+" :"+obj.childNodes[1].innerText+" :"+obj.lastChild.innerText+"\n"+message;} | |
195 | + if (target=="res") {textarea.value=obj.firstChild.innerText+" :"+obj.childNodes[1].innerText+" :"+obj.lastChild.innerText+"\n"+obj.nextSibling.innerText+"\n";} | |
196 | 196 | else if(target=="name"){textarea.value=obj.childNodes[1].innerText+"\n";} |
197 | - else if(target=="id") {textarea.value="ID:"+(obj.lastChild.innerText.split(/ID:/))[1]+"\n";} | |
198 | - var copyText=textarea.createTextRange(); | |
197 | + else if(target=="id") {textarea.value=obj.lastChild.innerText.substr(15)+"\n";} | |
198 | + decoy.appendChild(textarea); | |
199 | + var copyText=decoy.getElementsByTagName("TEXTAREA")[0].createTextRange(); | |
199 | 200 | copyText.execCommand("Copy") |
200 | 201 | event.srcElement.parentElement.removeNode(true); |
201 | 202 | } |
@@ -15,11 +15,11 @@ | ||
15 | 15 | var start_time = new Date(); |
16 | 16 | //==========グローバル変数 |
17 | 17 | var anchorHead=""; |
18 | -var skinName="skin30-3 v3.3.09xx"; | |
18 | +var skinName="skin30-3 v3.1.11xx"; | |
19 | 19 | var browser="ギコナビ"; |
20 | 20 | //==========ギコナビ用アンカーの判定(0:処理無し,1:ポップアップ,2:ボタン挿入) |
21 | 21 | // ギコナビでは、レスアンカーは相対アドレスで記述される |
22 | -function checkAnchor(href){if(!href){return(0)} | |
22 | +function checkAnchor(href){ | |
23 | 23 | if (href.match(/decoy:|about:blank/)){return(1)} |
24 | 24 | else if(href.match(/menu:|read\.cgi|2ch\.net\/.*\/kako/)){return(0)} |
25 | 25 | else{return(2)} |
@@ -27,22 +27,13 @@ function checkAnchor(href){if(!href){return(0)} | ||
27 | 27 | //==========リンク設定 |
28 | 28 | function addAnchor(inner,num){ |
29 | 29 | if(!t_url){threadurl()} |
30 | - var url=document.getElementsByName("ThreadURL")[0].content; | |
31 | - if(url.match(/&/)){ | |
32 | - return('<a href="../test/read.cgi?bbs='+t_bbs+'&key='+t_key+'&st='+inner+'&to='+inner+'&nofirst=true" target="_blank" onclick="blur()">'+num+'</a>') | |
33 | - }else{ | |
34 | - return('<a href="../test/read.cgi/'+t_bbs+'/'+t_key+'/'+inner+'" target="_blank" onclick="blur()">'+num+'</a>') | |
35 | - } | |
30 | + return('<a href="../test/read.cgi/'+t_bbs+'/'+t_key+'/'+inner+'" target="_blank" onclick="blur()">'+num+'</a>') | |
36 | 31 | } |
37 | 32 | // スレッドURLの取得 |
38 | 33 | var t_url=false,t_domain,t_bbs,t_key; |
39 | 34 | function threadurl(){ |
40 | 35 | var threadurl=document.getElementsByName("ThreadURL")[0].content; |
41 | - if(threadurl.match(/&/)){ | |
42 | - threadurl.match(/bbs=(.*)&key=(\d*)/); | |
43 | - }else{ | |
44 | - threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//); | |
45 | - } | |
36 | + threadurl.match(/^.*\/test\/read.cgi\/(.*)\/(.*)\//); | |
46 | 37 | t_url=true; |
47 | 38 | t_bbs=RegExp.$1; |
48 | 39 | t_key=RegExp.$2; |
@@ -2,8 +2,7 @@ | ||
2 | 2 | //外部関数:tohan |
3 | 3 | //外部変数:anchorHead,lightmode,getID,skinName,browser,dts |
4 | 4 | //グローバル変数 |
5 | -var buffer=1; // 低速回線や低速マシンの場合にはbufferの数値を増やすとより正確にジャンプ(1増やすと0.1秒遅れる) | |
6 | -var newResJump=1; // 新着レスジャンプ(0:ブラウザ任せ、1:読了時のみ、2:常時)*かちゅ、OpenJane、twintailのみの設定 | |
5 | +var buffer=1; // 低速回線や低速マシンの場合にはbufferの数値を増やすとより正確にジャンプ(1増やすと0.1秒遅れる) | |
7 | 6 | //========Click処理→search,他 |
8 | 7 | document.onclick = clickEvent; |
9 | 8 | function clickEvent(){ |
@@ -41,19 +40,10 @@ function mouseOverEvent() { | ||
41 | 40 | else if(e.innerText.match(/^あぼ〜ん$/)) {abonePopup(e);} |
42 | 41 | } |
43 | 42 | if(e.tagName=='A'){ |
44 | - if(!e.innerText.match(/%/)){ // URLエンコードでありがちな%がなければ | |
45 | - e.href=e.href.replace(/>/g,""); | |
46 | - e.href=e.href.replace(/\/ime.nu/g,""); | |
47 | - }else{ | |
48 | - try{ | |
49 | - e.title=decodeURI(e.innerText); | |
50 | - }catch(err){ | |
51 | - // ShiftJIS,EUC-JPのデコードは面倒だからつけない。 | |
52 | - } | |
53 | - } | |
43 | + e.href=e.href.replace(/>/g,""); | |
44 | + e.href=e.href.replace(/\/ime.nu/g,""); | |
54 | 45 | if (checkAnchor(e.href)==2){insButton(e);return;} |
55 | 46 | else if(checkAnchor(e.href)==1){ |
56 | - if(event.shiftKey){if(e.rel){e.href=e.rel}return} | |
57 | 47 | // 多段ポップアップ |
58 | 48 | var aNum=parseInt(e.sourceIndex)+1; |
59 | 49 | if(!document.getElementById("p"+aNum)){ |
@@ -106,10 +96,10 @@ function scroll_End(){document.getElementsByTagName("DL")[0].lastChild.scrollInt | ||
106 | 96 | // IMG |
107 | 97 | function imgCommand(mode,s){ |
108 | 98 | if(!waited){ |
109 | - var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="全レス一括読込"><br><input type="button" onclick="allImageLoad(\'new\')" value="新レス一括読込"><br><input type="button" onclick="removeError()" value="Error画像削除"><br></div>'; | |
99 | + var nHTML='<div id="command" onclick="clearCommand()"><input type="button" onclick="allImageLoad(\'all\')" value="全レス一括読込"><br><input type="button" onclick="allImageLoad(\'new\')" value="新レス一括読込"><br></div>'; | |
110 | 100 | event.srcElement.parentElement.insertAdjacentHTML('beforeEnd',nHTML); |
111 | 101 | if(skinName.match(/30-2/)){ |
112 | - //if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="パネル切替"><br>')} | |
102 | + if(!lightmode){document.getElementById("command").insertAdjacentHTML('afterBegin','<input type="button" onclick="changePanel()" value="パネル切替"><br>')} | |
113 | 103 | document.getElementById("command").insertAdjacentHTML('beforeEnd','<input type="button" onclick="changeMode()" value="モード切替">') |
114 | 104 | } |
115 | 105 | waited=true; |
@@ -119,7 +109,7 @@ function imgCommand(mode,s){ | ||
119 | 109 | } |
120 | 110 | function clearCommand(){ |
121 | 111 | waited=false; |
122 | - document.getElementById("command").removeNode(true); | |
112 | + event.srcElement.parentElement.removeNode(true); | |
123 | 113 | } |
124 | 114 | //=========左長押処理→copyMenu() |
125 | 115 | document.onmousedown=mousedownEvent; |
@@ -132,7 +122,6 @@ function mousedownEvent(){ | ||
132 | 122 | clickTimer=setTimeout("copyMenu()",500); |
133 | 123 | } |
134 | 124 | } |
135 | - | |
136 | 125 | //コピーメニュー→colorChange(),search::copyText() |
137 | 126 | function copyMenu(){ |
138 | 127 | clickCancel=true; clearTimeout(clickTimer); |
@@ -176,53 +165,27 @@ function key(){ | ||
176 | 165 | } |
177 | 166 | } |
178 | 167 | |
179 | -//=========新着レス取得後処理(標準スキン未対応ブラウザ用)←Timer又はFooterから呼び出し | |
180 | -//=========かちゅ、ABone、ゾヌ2 | |
168 | +//=========Load(代替)処理(各Footerもしくは、Headerでのループから呼出し) | |
181 | 169 | var newResNum=parseInt(document.getElementsByName("GetRescount")[0].content)+1; |
182 | 170 | var k=0; |
183 | -function loadEvent(num){ // Timer又はFooterから | |
184 | - //====新着レスジャンプ | |
185 | - if(newResJump==0){clearInterval(timerID);return} //「ブラウザ任せ」なら終了 | |
186 | - //新着レスの開始番号を取得 | |
187 | - if (browser=="かちゅ〜しゃ"){if(isNaN(newResNum)){while(dts[k]){if(dts[k].className=="new"){newResNum=parseInt(dts[k].firstChild.innerText);break;} k++;}}} | |
188 | - else if(browser=="ホットゾヌ2"){newResNum=num+1;} | |
171 | +function loadEvent(){ | |
172 | + //GetRescount代替 "数字でなければ" | |
173 | + if(isNaN(newResNum)){while(dts[k]){if(dts[k].className=="new"){newResNum=parseInt(dts[k].firstChild.innerText);break;} k++; }} | |
174 | + //新着開始ナンバーを設定してジャンプ | |
189 | 175 | var anc=document.anchors(anchorHead+newResNum); |
190 | - if(!anc || !anc.parentElement){return} // 透明あぼ〜んされてたら終了 | |
191 | - //新着レスジャンプ | |
192 | - scr=lightmode ? document.body : document.getElementById("dl"); | |
193 | - viewPos=scr.scrollTop+scr.clientHeight;// スクロール後の画面下部位置 | |
194 | - endPos =anc.offsetTop+20; // 新レスアンカー位置 | |
195 | - //最後まで読了 or 「常に新着ジャンプ」ならジャンプ | |
196 | - if(viewPos>endPos || newResJump==2){clearInterval(timerID);setTimeout("moveToNew("+newResNum+")",buffer*100)} | |
197 | - else{firstNew=document.anchors(anchorHead+newResNum).parentElement.nextSibling;} | |
198 | -} | |
199 | -//=========新着レス取得後処理(標準スキン対応ブラウザ用)←NewMarkから呼び出し | |
200 | -//=========OpenJ、twin | |
201 | -var scr,viewPos,endPos=0; | |
202 | -function reloadEvent(){ | |
203 | - //====既読化 | |
204 | - var lastDt=dts[dts.length-2];if(!lastDt){return}// 全部新着なら終了 | |
205 | - while(lastDt && lastDt.className=="new"){lastDt.className="";lastDt=lastDt.previousSibling.previousSibling;} | |
206 | - //====新着レスジャンプ | |
207 | - if(newResJump==0){return} //「ブラウザ任せ」なら終了 | |
208 | - var ancs=document.anchors; | |
209 | - var newResNum=parseInt(ancs[ancs.length-1].name)+1; | |
210 | - scr=lightmode ? document.body : document.getElementById("dl"); | |
211 | - viewPos=scr.scrollTop; | |
212 | - endPos =scr.scrollHeight-scr.clientHeight-20; | |
213 | - //最後まで読了 or 「常に新着ジャンプ」ならジャンプ | |
214 | - if(viewPos>endPos || newResJump==2){setTimeout("moveToNew("+newResNum+")",buffer*100);} | |
176 | + if(anc && anc.parentElement){ | |
177 | + if(buffer==0){clearInterval(timerID);moveToNew(newResNum);} | |
178 | + else {buffer--;} | |
179 | + } | |
215 | 180 | } |
216 | - | |
217 | 181 | // 新着レス移動+新着レスの位置を記憶 |
218 | 182 | var firstNew; |
219 | 183 | function moveToNew(num){ |
220 | 184 | firstNew=getDTfromAnc(num); |
221 | - while(!firstNew){num--;firstNew=getDTfromAnc(num);} //対象が透明あぼ〜んなら数を減らす | |
222 | - firstNew.scrollIntoView(true); | |
185 | + if(firstNew){firstNew.scrollIntoView(true);} | |
223 | 186 | } |
224 | 187 | |
225 | -//=========DoubleClick処理→defaultPopup() | |
188 | +//=========DblClick処理→defaultPopup() | |
226 | 189 | document.ondblclick=defaultPopup; |
227 | 190 | function defaultPopup(){ |
228 | 191 | var num=document.selection.createRange().text.replace(/\s$/,""); |
@@ -237,17 +200,4 @@ function defaultPopup(){ | ||
237 | 200 | obj.innerText="ID:"+num; |
238 | 201 | search(obj); |
239 | 202 | } |
240 | -} | |
241 | - | |
242 | -//=========Copy処理 | |
243 | -//headから読むとbodyは見えないので、専用ブラウザの特質を利用してbodyの後ろに書き出す | |
244 | -//本来どおりheadに書き出すSkinManager対策で判定を一つ入れる | |
245 | - if(document.body) document.write('<script type="text/javascript">document.body.oncopy=copyEvent</script>\n'); | |
246 | -function copyEvent(){ | |
247 | - var textarea=document.createElement("TEXTAREA"); | |
248 | - textarea.value=document.selection.createRange().text.replace(/\s(\r\n|$)/g,"\n"); | |
249 | - var copyText=textarea.createTextRange(); | |
250 | - copyText.execCommand("Copy"); | |
251 | - return false; | |
252 | -} | |
253 | - | |
203 | +} | |
\ No newline at end of file |
@@ -15,7 +15,7 @@ var pb; | ||
15 | 15 | function namePopup(e,before,num,after){ |
16 | 16 | var hnum=tohan(num); |
17 | 17 | //3周年、4周年、Socket774、774KB、21禁、[1-30]、などに対応 |
18 | - if(before){if(hnum==5 || hnum==774 || hnum==4 || hnum==21 || hnum==1 || hnum==30){return}} | |
18 | + if(before){if(hnum==3 || hnum==774 || hnum==4 || hnum==21 || hnum==1 || hnum==30){return}} | |
19 | 19 | e.outerHTML = "<b>"+before+"</b><b>"+addAnchor(hnum,num)+"</b><b>"+after+"</b>"; |
20 | 20 | } |
21 | 21 | //=========弱あぼ〜んのポップアップ |
@@ -110,7 +110,7 @@ function clearResult(obj){ | ||
110 | 110 | for(var i=l;i--;){ |
111 | 111 | var dt=eval(arrayElement); var dd=dt.nextSibling; |
112 | 112 | //Live機能追加 - 透明あぼ〜ん |
113 | - if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;} | |
113 | + if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;continue;} | |
114 | 114 | dt.removeNode(true); dd.removeNode(true); |
115 | 115 | } |
116 | 116 | } |
@@ -144,7 +144,7 @@ function findIt(word){ | ||
144 | 144 | |
145 | 145 | //==========逆参照 |
146 | 146 | function searchRef(obj){ |
147 | - if(obj.name!='referred'){ | |
147 | + if(obj.name!='reffered'){ | |
148 | 148 | var num=obj.firstChild.innerText; |
149 | 149 | var l=dds.length; |
150 | 150 | var found = new Array; |
@@ -171,7 +171,7 @@ function searchRef(obj){ | ||
171 | 171 | if(exist){ |
172 | 172 | var dt=dds[i].previousSibling.cloneNode(true); |
173 | 173 | found.unshift(dt.outerHTML.replace(/name=.*?>/,">")+dd.outerHTML.replace(/<a name=.*>/i,"")); |
174 | - obj.name="referred"; | |
174 | + obj.name="reffered"; | |
175 | 175 | } |
176 | 176 | } |
177 | 177 | if(found.length){returnRef(obj.nextSibling,found)} |
@@ -190,12 +190,13 @@ function returnRef(dd,found){ | ||
190 | 190 | function copyText(target){ |
191 | 191 | var num=event.srcElement.parentElement.name; |
192 | 192 | var obj=getDTfromAnc(num); |
193 | + var decoy=document.createDocumentFragment(); | |
193 | 194 | var textarea=document.createElement("TEXTAREA"); |
194 | - var message=obj.nextSibling.innerText.replace(/\s(\r\n|$)/g,"\n"); | |
195 | - if (target=="res") {textarea.value=obj.firstChild.innerText+" :"+obj.childNodes[1].innerText+" :"+obj.lastChild.innerText+"\n"+message;} | |
195 | + if (target=="res") {textarea.value=obj.firstChild.innerText+" :"+obj.childNodes[1].innerText+" :"+obj.lastChild.innerText+"\n"+obj.nextSibling.innerText+"\n";} | |
196 | 196 | else if(target=="name"){textarea.value=obj.childNodes[1].innerText+"\n";} |
197 | - else if(target=="id") {textarea.value="ID:"+(obj.lastChild.innerText.split(/ID:/))[1]+"\n";} | |
198 | - var copyText=textarea.createTextRange(); | |
197 | + else if(target=="id") {textarea.value=obj.lastChild.innerText.substr(15)+"\n";} | |
198 | + decoy.appendChild(textarea); | |
199 | + var copyText=decoy.getElementsByTagName("TEXTAREA")[0].createTextRange(); | |
199 | 200 | copyText.execCommand("Copy") |
200 | 201 | event.srcElement.parentElement.removeNode(true); |
201 | 202 | } |