• R/O
  • HTTP
  • SSH
  • HTTPS

gikonavi: Commit


Commit MetaInfo

Revisione0a5e1dfa8090014058a4197e92709c81849d128 (tree)
Time2008-09-14 10:47:52
Authorcvs2git <cvs2git>
Commitercvs2git

Log Message

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

Change Summary

Incremental Difference

--- a/BoardGroup.pas
+++ b/BoardGroup.pas
@@ -334,12 +334,6 @@ type
334334 property BoardPlugIn : TBoardPlugIn read FBoardPlugIn write FBoardPlugIn;
335335 end;
336336
337- // 特殊用途用TBoard
338- TSpecialBoard = class(TBoard)
339- public
340- function Add(item: TThreadItem): integer; overload;
341- procedure Clear; overload;
342- end;
343337
344338 function BBSsFindBoardFromBBSID( inBBSID : string ) : TBoard;
345339 function BBSsFindBoardFromURL( inURL : string ) : TBoard;
@@ -347,13 +341,9 @@ type
347341 function BBSsFindThreadFromURL(const inURL : string ) : TThreadItem;
348342 function ConvertDateTimeString( inDateTimeString : string) : TDateTime;
349343
350- procedure DestorySpecialBBS( inBBS : TBBS );
351-
352344 var
353345 BBSs : array of TBBS;
354346 BoardGroups : array of TBoardGroup;
355- SpecialBBS : TBBS;
356- SpecialBoard: TSpecialBoard;
357347
358348 implementation
359349
@@ -539,28 +529,6 @@ begin
539529 end;
540530
541531 end;
542-{!
543-\brief 特殊用途BBS削除
544-\param bbs 削除する特殊用途BBS
545-}
546-procedure DestorySpecialBBS( inBBS : TBBS );
547-var
548- sCategory : TCategory;
549- sBoard : TSpecialBoard;
550-begin
551- if inBBS <> nil then begin
552- sCategory := inBBS.Items[0];
553- if sCategory <> nil then begin
554- sBoard := TSpecialBoard(sCategory.Items[0]);
555- if sBoard <> nil then begin
556- sBoard.Modified := False;
557- sBoard.Clear;
558- FreeAndNil(sBoard);
559- end;
560- end;
561- FreeAndNil(inBBS);
562- end;
563-end;
564532
565533 (*************************************************************************
566534 *機能名:TBBSコンストラクタ
@@ -1862,19 +1830,6 @@ begin
18621830
18631831 end;
18641832
1865-function TSpecialBoard.Add(item: TThreadItem): integer;
1866-begin
1867- Result := inherited AddObject(Item.URL, Item);
1868-end;
1869-
1870-procedure TSpecialBoard.Clear;
1871-var
1872- i: integer;
1873-begin
1874- for i := Count - 1 downto 0 do
1875- DeleteList(i);
1876- Capacity := 0;
1877-end;
18781833
18791834 end.
18801835
--- a/Giko.dfm
+++ b/Giko.dfm
@@ -8397,9 +8397,6 @@ object GikoForm: TGikoForm
83978397 object ID1: TMenuItem
83988398 Action = GikoDM.SameIDResAnchorAction
83998399 end
8400- object N83: TMenuItem
8401- Action = GikoDM.DereferenceResAction
8402- end
84038400 end
84048401 object BrowserTabPopupMenu: TPopupMenu
84058402 Images = HotToobarImageList
--- a/Giko.pas
+++ b/Giko.pas
@@ -419,7 +419,6 @@ type
419419 ResPopupClearTimer: TTimer;
420420 TaskTrayPopupMenu: TPopupMenu;
421421 Exit1: TMenuItem;
422- N83: TMenuItem;
423422 procedure FormCreate(Sender: TObject);
424423 procedure FormDestroy(Sender: TObject);
425424 procedure BrowserStatusTextChange(Sender: TObject;
@@ -692,9 +691,6 @@ type
692691 function isValidFile(FileName: String) : boolean;
693692 //! ListViewのD&D受け取り
694693 procedure AcceptDropFiles(var Msg: TMsg);
695- //! スレッド一覧更新処理
696- procedure UpdateListView();
697-
698694 protected
699695 procedure CreateParams(var Params: TCreateParams); override;
700696 procedure WndProc(var Message: TMessage); override;
@@ -1743,7 +1739,6 @@ begin
17431739 BBSs[ i ].Free;
17441740 BBSs[ i ] := nil;
17451741 end;
1746- DestorySpecialBBS(BoardGroup.SpecialBBS);
17471742 except
17481743 end;
17491744
@@ -2584,7 +2579,20 @@ begin
25842579 end;
25852580 TreeView.Refresh;
25862581 //ListViewでこのスレが含まれる板を表示しているときの更新処理
2587- UpdateListView();
2582+ if (ActiveList <> nil) and (ActiveList is TBoard) then begin
2583+ TBoard(ActiveList).LogThreadCount := TBoard(ActiveList).GetLogThreadCount;
2584+ TBoard(ActiveList).NewThreadCount := TBoard(ActiveList).GetNewThreadCount;
2585+ TBoard(ActiveList).UserThreadCount:= TBoard(ActiveList).GetUserThreadCount;
2586+ //ListViewのアイテムの個数も更新
2587+ case GikoForm.ViewType of
2588+ gvtAll: ListView.Items.Count := TBoard(ActiveList).Count;
2589+ gvtLog: ListView.Items.Count := TBoard(ActiveList).LogThreadCount;
2590+ gvtNew: ListView.Items.Count := TBoard(ActiveList).NewThreadCount;
2591+ gvtArch: ListView.Items.Count := TBoard(ActiveList).ArchiveThreadCount;
2592+ gvtLive: ListView.Items.Count := TBoard(ActiveList).LiveThreadCount;
2593+ gvtUser: ListView.Items.Count := TBoard(ActiveList).UserThreadCount;
2594+ end;
2595+ end;
25882596 RefreshListView(Item.ThreadItem);
25892597 end;
25902598
@@ -3076,9 +3084,6 @@ begin
30763084 BBSs[i].SelectText := SelectText;
30773085 BBSs[i].KubetsuChk := KubetsuChk;
30783086 end;
3079- BoardGroup.SpecialBBS.SelectText := SelectText;
3080- BoardGroup.SpecialBBS.KubetsuChk := KubetsuChk;
3081-
30823087 ViewType := AViewType;
30833088 if ActiveList is TBoard then begin
30843089 Board := TBoard(ActiveList);
@@ -6784,6 +6789,8 @@ var
67846789 FOleInPlaceActiveObject: IOleInPlaceActiveObject;
67856790 p : TPoint;
67866791 AID: string;
6792+ stlist : TStringList;
6793+ i : Integer;
67876794 begin
67886795 result := true;
67896796 if not Assigned(FActiveContent) then
@@ -6808,7 +6815,29 @@ begin
68086815 Exit;
68096816
68106817 if (e.className = 'date') or (e.id = 'date') then begin
6811- AID := GikoSys.ExtructResID(e.innerText);
6818+ AID := e.innerText;
6819+ if AnsiPos('id', AnsiLowerCase(AID)) > 0 then begin
6820+ AID := Copy(AID, AnsiPos('id', AnsiLowerCase(AID)) - 1, 11);
6821+ if AnsiPos(' be:', AnsiLowerCase(AID)) > 0 then begin
6822+ AID := Copy(AID, 1, AnsiPos(' BE:', AnsiLowerCase(AID)) - 1)
6823+ end;
6824+ end else begin
6825+ stlist := TStringList.Create;
6826+ try
6827+ stList.DelimitedText := AID;
6828+ AID := '';
6829+ for i := 0 to stList.Count - 1 do begin
6830+ if Length(WideString(stList[i])) = 8 then begin
6831+ if GikoSys.NotDateorTimeString(stList[i]) then begin
6832+ AID := stList[i];
6833+ break;
6834+ end;
6835+ end;
6836+ end;
6837+ finally
6838+ stList.Free;
6839+ end;
6840+ end;
68126841 ShowSameIDAncher(AID);
68136842 end;
68146843 except
@@ -6837,7 +6866,7 @@ begin
68376866 end
68386867 end;
68396868 FActiveContent.IDAnchorPopup(
6840- GikoSys.CreateResAnchor(numbers, FActiveContent.Thread, limited));
6869+ GikoSys.CreateSameIDResAnchor(numbers, FActiveContent.Thread, limited));
68416870 finally
68426871 numbers.Free;
68436872 end;
@@ -7841,6 +7870,7 @@ var
78417870 Board: TBoard;
78427871 LogFolder: String;
78437872 datList: TStringList;
7873+ p: TPoint;
78447874 begin
78457875 // 表示しているの板のとき以外は拒否
78467876 if GetActiveList is TBoard then begin
@@ -7877,12 +7907,10 @@ begin
78777907 if (datList.Count > 0) then begin
78787908 GikoSys.AddOutofIndexDat(Board, datList, False);
78797909 ShowMessage(IntToStr(datList.Count) + '個のdatファイルがコピーされました。' );
7880- if GikoForm.TreeView.Visible then begin
7910+ if GikoForm.TreeView.Visible then
78817911 GikoForm.TreeView.Refresh;
7882- end;
7883- if GikoForm.ListView.Visible then begin
7884- UpdateListView();
7885- end;
7912+ if GikoForm.ListView.Visible then
7913+ GikoForm.ListView.Refresh;
78867914 end else begin
78877915 ShowMessage('一つもコピーされませんでした。' );
78887916 end;
@@ -7895,25 +7923,7 @@ begin
78957923 ShowMessage('板を表示してください。');
78967924 end;
78977925 end;
7898-procedure TGikoForm.UpdateListView();
7899-begin
7900- //ListViewでこのスレが含まれる板を表示しているときの更新処理
7901- if (ActiveList <> nil) and (ActiveList is TBoard) then begin
7902- TBoard(ActiveList).LogThreadCount := TBoard(ActiveList).GetLogThreadCount;
7903- TBoard(ActiveList).NewThreadCount := TBoard(ActiveList).GetNewThreadCount;
7904- TBoard(ActiveList).UserThreadCount:= TBoard(ActiveList).GetUserThreadCount;
7905- //ListViewのアイテムの個数も更新
7906- case GikoForm.ViewType of
7907- gvtAll: ListView.Items.Count := TBoard(ActiveList).Count;
7908- gvtLog: ListView.Items.Count := TBoard(ActiveList).LogThreadCount;
7909- gvtNew: ListView.Items.Count := TBoard(ActiveList).NewThreadCount;
7910- gvtArch: ListView.Items.Count := TBoard(ActiveList).ArchiveThreadCount;
7911- gvtLive: ListView.Items.Count := TBoard(ActiveList).LiveThreadCount;
7912- gvtUser: ListView.Items.Count := TBoard(ActiveList).UserThreadCount;
7913- end;
7914- end;
7915- ListView.Refresh;
7916-end;
7926+
79177927 //! ファイルチェック
79187928 function TGikoForm.isValidFile(FileName: String) : boolean;
79197929 var
@@ -7930,7 +7940,7 @@ begin
79307940 end else begin
79317941 // ログファイルの拡張子をはずしたものがスレ作成日時
79327942 try
7933- dt := GikoSys.GetCreateDateFromName(ExtractFileName(FileName));
7943+ dt := GikoSys.GetCreateDateFromName(FileName);
79347944 if ((UnixToDateTime(ZERO_DATE) + OffsetFromUTC) = dt) then begin
79357945 Result := False;
79367946 GikoUtil.MsgBox(Handle, ExtractFileName(FileName) + 'のファイル名が不正です。', 'エラー', MB_ICONSTOP or MB_OK);
--- a/GikoDataModule.dfm
+++ b/GikoDataModule.dfm
@@ -1,8 +1,8 @@
11 object GikoDM: TGikoDM
22 OldCreateOrder = False
33 OnCreate = DataModuleCreate
4- Left = 518
5- Top = 174
4+ Left = 516
5+ Top = 172
66 Height = 336
77 Width = 286
88 object GikoFormActionList: TActionList
@@ -315,7 +315,7 @@ object GikoDM: TGikoDM
315315 ImageIndex = 9
316316 ShortCut = 16433
317317 OnExecute = AllItemActionExecute
318- OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
318+ OnUpdate = DependActiveListTBoardActionUpdate
319319 end
320320 object LogItemAction: TAction
321321 Category = #26495
@@ -326,7 +326,7 @@ object GikoDM: TGikoDM
326326 ImageIndex = 10
327327 ShortCut = 16434
328328 OnExecute = LogItemActionExecute
329- OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
329+ OnUpdate = DependActiveListTBoardActionUpdate
330330 end
331331 object NewItemAction: TAction
332332 Category = #26495
@@ -337,7 +337,7 @@ object GikoDM: TGikoDM
337337 ImageIndex = 11
338338 ShortCut = 16435
339339 OnExecute = NewItemActionExecute
340- OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
340+ OnUpdate = DependActiveListTBoardActionUpdate
341341 end
342342 object ArchiveItemAction: TAction
343343 Category = #26495
@@ -347,7 +347,7 @@ object GikoDM: TGikoDM
347347 Hint = 'DAT'#33853#12385#12473#12524#12483#12489#12398#12415#34920#31034#12377#12427
348348 ImageIndex = 55
349349 OnExecute = ArchiveItemActionExecute
350- OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
350+ OnUpdate = DependActiveListTBoardActionUpdate
351351 end
352352 object LiveItemAction: TAction
353353 Category = #26495
@@ -357,7 +357,7 @@ object GikoDM: TGikoDM
357357 Hint = #29983#23384#12375#12390#12356#12427#12473#12524#12483#12489#12398#12415#12434#34920#31034#12377#12427
358358 ImageIndex = 54
359359 OnExecute = LiveItemActionExecute
360- OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
360+ OnUpdate = DependActiveListTBoardActionUpdate
361361 end
362362 object ThreadRangeAction: TAction
363363 Category = #26495
@@ -367,7 +367,7 @@ object GikoDM: TGikoDM
367367 Hint = #12473#12524#12483#12489#12398#34920#31034#31684#22258#12434#35373#23450
368368 ImageIndex = 10
369369 OnExecute = ThreadRangeActionExecute
370- OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
370+ OnUpdate = DependActiveCntentActionUpdate
371371 end
372372 object SelectItemAction: TAction
373373 Category = #26495
@@ -378,7 +378,7 @@ object GikoDM: TGikoDM
378378 ImageIndex = 12
379379 ShortCut = 16436
380380 OnExecute = SelectItemActionExecute
381- OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate
381+ OnUpdate = DependActiveListTBoardActionUpdate
382382 end
383383 object StopAction: TAction
384384 Category = #34920#31034
@@ -1363,20 +1363,6 @@ object GikoDM: TGikoDM
13631363 OnExecute = ExtractSameIDActionExecute
13641364 OnUpdate = DependActiveCntentLogActionUpdate
13651365 end
1366- object ShowTabListAction: TAction
1367- Category = #34920#31034
1368- Caption = #12479#12502#19968#35239#34920#31034
1369- Hint = #12479#12502#19968#35239#34920#31034
1370- OnExecute = ShowTabListActionExecute
1371- end
1372- object DereferenceResAction: TAction
1373- Tag = 1
1374- Category = #12473#12524#12483#12489
1375- Caption = #12371#12398#12524#12473#12434#21442#29031#12375#12390#12356#12427#12524#12473#12450#12531#12459#12540#34920#31034
1376- Hint = #12371#12398#12524#12473#12434#21442#29031#12375#12390#12356#12427#12524#12473#12450#12531#12459#12540#34920#31034
1377- OnExecute = DereferenceResActionExecute
1378- OnUpdate = DependActiveCntentLogActionUpdate
1379- end
13801366 end
13811367 object ToobarImageList: TImageList
13821368 Left = 44
--- a/GikoDataModule.pas
+++ b/GikoDataModule.pas
@@ -240,8 +240,6 @@ type
240240 AddIDtoNGWord0Action: TAction;
241241 AddIDtoNGWord1Action: TAction;
242242 ExtractSameIDAction: TAction;
243- ShowTabListAction: TAction;
244- DereferenceResAction: TAction;
245243 procedure EditNGActionExecute(Sender: TObject);
246244 procedure ReloadActionExecute(Sender: TObject);
247245 procedure GoFowardActionExecute(Sender: TObject);
@@ -452,8 +450,6 @@ type
452450 procedure AddIDtoNGWord0ActionExecute(Sender: TObject);
453451 procedure AddIDtoNGWord1ActionExecute(Sender: TObject);
454452 procedure ExtractSameIDActionExecute(Sender: TObject);
455- procedure ShowTabListActionExecute(Sender: TObject);
456- procedure DereferenceResActionExecute(Sender: TObject);
457453 private
458454 { Private 宣言 }
459455 procedure ClearResFilter;
@@ -486,10 +482,8 @@ type
486482 procedure DependActiveCntentActionUpdate(Sender: TObject);
487483 //! TActionでGetActiveContentがnil以外かつログを持っていると有効になる
488484 procedure DependActiveCntentLogActionUpdate(Sender: TObject);
489- //! TActionでActiveListがTBoard(非特殊板)で有効になる
490- procedure DependActiveListTBoardActionUpdate(Sender: TObject);
491485 //! TActionでActiveListがTBoardで有効になる
492- procedure DependActiveListTBoardWithSpeciapActionUpdate(Sender: TObject);
486+ procedure DependActiveListTBoardActionUpdate(Sender: TObject);
493487 end;
494488
495489 var
@@ -530,17 +524,9 @@ begin
530524 and (GikoForm.GetActiveContent.IsLogFile);
531525 end;
532526 // *************************************************************************
533-//! TActionでActiveListがTBoard(非特殊板)で有効になる
534-// *************************************************************************
535-procedure TGikoDM.DependActiveListTBoardActionUpdate(Sender: TObject);
536-begin
537- TAction(Sender).Enabled := (GikoForm.GetActiveList is TBoard) and
538- (GikoForm.GetActiveList <> BoardGroup.SpecialBoard);
539-end;
540-// *************************************************************************
541527 //! TActionでActiveListがTBoardで有効になる
542528 // *************************************************************************
543-procedure TGikoDM.DependActiveListTBoardWithSpeciapActionUpdate(Sender: TObject);
529+procedure TGikoDM.DependActiveListTBoardActionUpdate(Sender: TObject);
544530 begin
545531 TAction(Sender).Enabled := (GikoForm.GetActiveList is TBoard);
546532 end;
@@ -2651,8 +2637,7 @@ end;
26512637 // *************************************************************************
26522638 procedure TGikoDM.UpFolderActionUpdate(Sender: TObject);
26532639 begin
2654- UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS) and
2655- (GikoForm.GetActiveList <> BoardGroup.SpecialBoard);
2640+ UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS);
26562641 end;
26572642 // *************************************************************************
26582643 //! 表示 表示リストのモード変更
@@ -3015,10 +3000,9 @@ procedure TGikoDM.SelectListReloadActionUpdate(Sender: TObject);
30153000 begin
30163001 if (GikoForm.GetActiveList is TCategory) and (GikoForm.ListView.SelCount > 0) then
30173002 TAction(Sender).Enabled := True
3018- else if GikoForm.GetActiveList is TBoard then begin
3019- TAction(Sender).Enabled :=
3020- (GikoForm.GetActiveList <> BoardGroup.SpecialBoard);
3021- end else
3003+ else if GikoForm.GetActiveList is TBoard then
3004+ TAction(Sender).Enabled := True
3005+ else
30223006 TAction(Sender).Enabled := False;
30233007 end;
30243008 // *************************************************************************
@@ -3216,10 +3200,8 @@ end;
32163200 // *************************************************************************
32173201 procedure TGikoDM.LogFolderOpenActionUpdate(Sender: TObject);
32183202 begin
3219- if (((GikoForm.GetActiveList is TBoard) and
3220- (GikoForm.GetActiveList <> BoardGroup.SpecialBoard))
3221- or (GikoForm.GetActiveList is TCategory))
3222- and (GikoForm.ListView.SelCount > 0) then
3203+ if ((GikoForm.GetActiveList is TBoard) or (GikoForm.GetActiveList is TCategory))
3204+ and (GikoForm.ListView.SelCount > 0) then
32233205 TAction(Sender).Enabled := True
32243206 else
32253207 TAction(Sender).Enabled := False;
@@ -4401,7 +4383,7 @@ begin
44014383 // レスの番号を更新
44024384 if (Pos('menu:', url) > 0) then begin
44034385 index := StrToInt64Def(
4404- Copy(url, 6, Length(url)), index + 1
4386+ Copy(url, 5, Length(url)), index + 1
44054387 );
44064388 end else begin
44074389 // 開始レス番号以降かチェック
@@ -4481,87 +4463,6 @@ begin
44814463 end;
44824464 end;
44834465 end;
4484-//! タブのスレッド一覧を表示する
4485-procedure TGikoDM.ShowTabListActionExecute(Sender: TObject);
4486-var
4487- i : Integer;
4488-begin
4489- GikoForm.ListView.Items.BeginUpdate;
4490- GikoForm.ListView.Items.Clear;
4491- BoardGroup.SpecialBoard.Clear;
4492- for i := GikoForm.BrowserTab.Tabs.Count - 1 downto 0 do begin
4493- BoardGroup.SpecialBoard.Add(
4494- TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Thread);
4495- end;
4496- GikoForm.ListView.Items.EndUpdate;
4497- GikoForm.SetActiveList(BoardGroup.SpecialBoard);
4498-end;
4499-//! 逆参照しているレスを追加する
4500-procedure TGikoDM.DereferenceResActionExecute(Sender: TObject);
4501-var
4502- i, currentNo, No : Integer;
4503- links : IHTMLElementCollection;
4504- threadItem : TThreadItem;
4505- item : IHTMLElement;
4506- url, url2 : string;
4507- resNo : TStringList;
4508- alreadyExist : Boolean;
4509- PathRec: TPathRec;
4510-begin
4511- No := GikoForm.KokoPopupMenu.Tag;
4512- if No = 0 then Exit;
4513-
4514- ThreadItem := GikoForm.GetActiveContent;
4515- // アクティブタブから全てのリンクを取得する
4516- links := GetActiveThreadLinks;
4517- if (ThreadItem <> nil) and (links <> nil) then begin
4518- resNo := TStringList.Create;
4519- try
4520- currentNo := 0;
4521- alreadyExist := False;
4522- // リンクを全て走査する
4523- for i := 0 to links.length - 1 do begin
4524- item := links.item(i, 0) as IHTMLElement;
4525- if (item <> nil) then begin
4526- url := item.getAttribute('href', 0);
4527- // レスの番号を更新
4528- if (Pos('menu:', url) > 0) then begin
4529- currentNo := StrToInt64Def(
4530- Copy(url, 6, Length(url)), currentNo + 1
4531- );
4532- alreadyExist := False;
4533- end else if (currentNo <> -1) and (not alreadyExist) then begin
4534- // IE7対応
4535- if Pos('about:..', url) = 1 then begin
4536- url := 'about:blank..' + Copy( url, Length('about:..')+1, Length(url) )
4537- end;
4538- // 自分へのリンクからレスポップ用の番号取得
4539- if Pos('about:blank..', url) = 1 then begin
4540- // No 番へのリンクがあれば参照あり
4541- url2 := THTMLCreate.GetRespopupURL(url, ThreadItem.URL);
4542- PathRec := Gikosys.Parse2chURL2(url2);
4543- if (not PathRec.FNoParam) then begin
4544- Gikosys.GetPopupResNumber(url2,PathRec.FSt,PathRec.FTo);
4545- end;
4546- // 対象レスもしくはそれを含むなら参照ありとする
4547- if (PathRec.FSt = No) or
4548- ((PathRec.FSt <= No) and (PathRec.FTo >= No)) then begin
4549- alreadyExist := True;
4550- resNo.Add(IntToStr(currentNo));
4551- end;
4552- end;
4553- end;
4554- end;
4555- end;
4556- // 無制限なので-1固定
4557- GikoForm.ActiveContent.IDAnchorPopup(
4558- GikoSys.CreateResAnchor(resNo, ThreadItem, -1));
4559- finally
4560- resNo.Clear;
4561- resNo.Free;
4562- end;
4563- end;
4564-end;
45654466
45664467 end.
45674468
--- a/GikoSystem.pas
+++ b/GikoSystem.pas
@@ -213,11 +213,10 @@ type
213213 procedure GetPopupResNumber(URL : string; var stRes, endRes : Int64);
214214
215215 property Bayesian : TGikoBayesian read FBayesian write FBayesian;
216- function CreateResAnchor(var Numbers: TStringList; ThreadItem: TThreadItem; limited: Integer):string;
216+ function CreateSameIDResAnchor(var Numbers: TStringList; ThreadItem: TThreadItem; limited: Integer):string;
217217 procedure GetSameIDRes(const AID : string; ThreadItem: TThreadItem;var body: TStringList); overload;
218218 procedure GetSameIDRes(AIDNum : Integer; ThreadItem: TThreadItem;var body: TStringList); overload;
219219 function GetResID(AIDNum: Integer; ThreadItem: TThreadItem): String;
220- function ExtructResID(ADateStr: String): String;
221220 //! 単語解析
222221 procedure SpamCountWord( const text : string; wordCount : TWordCount );
223222 //! 学習クリア
@@ -226,6 +225,8 @@ type
226225 procedure SpamLearn( wordCount : TWordCount; isSpam : Boolean );
227226 //! スパム度数
228227 function SpamParse( const text : string; wordCount : TWordCount ) : Extended;
228+ //引数が、日付でも時刻でもないことを調べる
229+ function NotDateorTimeString(const AStr : string): boolean;
229230
230231 //! 引数に送られてきた日付/ID部にBEの文字列があったら、プロファイルへのリンクを追加
231232 function AddBeProfileLink(AID : string; ANum: Integer): string;
@@ -2508,7 +2509,6 @@ procedure TGikoSys.ListBoardFile;
25082509 var
25092510 boardFileList : TStringList;
25102511 i, l : Integer;
2511- sCategory : TCategory;
25122512 begin
25132513 // BBS の開放
25142514 try
@@ -2551,20 +2551,6 @@ begin
25512551 BoardFileList.Free;
25522552 end;
25532553 end;
2554-
2555- // 特殊用途BBS生成
2556- // 既に存在する場合は削除する
2557- DestorySpecialBBS(BoardGroup.SpecialBBS);
2558- SpecialBBS := TBBS.Create('');
2559- SpecialBBS.Title := '特殊用途(非表示)';
2560- sCategory := TCategory.Create;
2561- sCategory.No := 1;
2562- sCategory.Title := '特殊用途(非表示)';
2563- SpecialBBS.Add(sCategory);
2564- BoardGroup.SpecialBoard := TSpecialBoard.Create(nil, 'http://localhost/gikonavi/special/index.html');
2565- BoardGroup.SpecialBoard.Title := 'タブ一覧';
2566- BoardGroup.SpecialBoard.IsThreadDatRead := True;
2567- sCategory.Add(BoardGroup.SpecialBoard);
25682554 end;
25692555
25702556 {!
@@ -2769,7 +2755,7 @@ end;
27692755 \param limited 列挙する数を制限するなら1以上
27702756 \return 列挙されたレスアンカー
27712757 }
2772-function TGikoSys.CreateResAnchor(
2758+function TGikoSys.CreateSameIDResAnchor(
27732759 var Numbers: TStringList; ThreadItem: TThreadItem;
27742760 limited: Integer):string;
27752761 var
@@ -2881,6 +2867,8 @@ function TGikoSys.GetResID(AIDNum: Integer; ThreadItem: TThreadItem): String;
28812867 var
28822868 Res: TResRec;
28832869 boardPlugIn : TBoardPlugIn;
2870+ stList: TStringList;
2871+ i : Integer;
28842872 begin
28852873 Result := '';
28862874 if (ThreadItem <> nil) and (ThreadItem.IsLogFile)
@@ -2894,40 +2882,51 @@ begin
28942882 end else begin
28952883 THTMLCreate.DivideStrLine( ReadThreadFile(ThreadItem.GetThreadFileName, AIDNum), @Res);
28962884 end;
2897- Result := ExtructResID(Res.FDateTime);
2885+ Result := Res.FDateTime;
2886+ if AnsiPos('id', AnsiLowerCase(Result)) > 0 then begin
2887+ Result := Copy(Result, AnsiPos('id', AnsiLowerCase(Result)) - 1, 11);
2888+ if AnsiPos(' be:', AnsiLowerCase(Result)) > 0 then begin
2889+ Result := Copy(Result, 1, AnsiPos(' BE:', AnsiLowerCase(Result)) - 1)
2890+ end;
2891+ end else begin
2892+ stlist := TStringList.Create;
2893+ try
2894+ stList.DelimitedText := Result;
2895+ Result := '';
2896+ for i := 0 to stList.Count - 1 do
2897+ if Length(WideString(stList[i])) = 8 then begin
2898+ if NotDateorTimeString(stList[i]) then begin
2899+ Result := stList[i];
2900+ break;
2901+ end;
2902+ end;
2903+ finally
2904+ stList.Free;
2905+ end;
2906+ end;
28982907 end;
28992908 end;
2909+
29002910 {!
2901-\brief レスの時刻部からIDを抽出する
2902-\param ADateStr 時刻部の文字列
2903-\return ID(IDとみなせる部分がないときは空文字列)
2911+\brief 時刻を示す文字列では無いかどうか
2912+\param AStr 調べる文字列
2913+\return 時刻では無いなら True
2914+\todo 否定形(Not)より肯定系(Is)
29042915 }
2905-function TGikoSys.ExtructResID(ADateStr: String): String;
2906-var
2907- stlist : TStringList;
2916+function TGikoSys.NotDateorTimeString(const AStr : string): boolean;
29082917 begin
2909- Result := '';
2910- if AnsiPos('id', AnsiLowerCase(ADateStr)) > 0 then begin
2911- Result := Copy(ADateStr, AnsiPos('id', AnsiLowerCase(ADateStr)), Length(ADateStr));
2912- if AnsiPos(' ', Result) > 0 then begin
2913- Result := Copy(Result, 1, AnsiPos(' ', Result) - 1);
2914- end;
2915- Result := ' ' + Result;
2916- end else begin
2917- stlist := TStringList.Create;
2918- try
2919- stList.Delimiter := ' ';
2920- stList.DelimitedText := ADateStr;
2921- // 日付 時刻 ID 他 と固定で考える
2922- if (stList.Count >= 3) then begin
2923- if Length(stList[3 - 1]) >= 7 then begin
2924- Result := stList[3 - 1];
2925- end;
2926- end;
2927- finally
2928- stList.Free;
2929- end;
2930- end;
2918+ Result := false;
2919+ try
2920+ StrToDate(AStr);
2921+ except
2922+ try
2923+ StrToTime(AStr);
2924+ Result := false;
2925+ except
2926+ Result := true;
2927+ end;
2928+ end;
2929+
29312930 end;
29322931
29332932 {!
--- a/Option.pas
+++ b/Option.pas
@@ -1325,19 +1325,13 @@ begin
13251325 end;
13261326
13271327 procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject);
1328-var
1329- s : String;
13301328 begin
1331- s := SoundFileEdit.Text;
1332- if (AnsiPos('.\', s) = 1) then begin
1333- s := GikoSys.Setting.GetAppDir + Copy(s, 2, Length(s));
1334- end;
1335- if not FileExists(s) then begin
1329+ if not FileExists(SoundFileEdit.Text) then begin
13361330 MsgBox(Handle, '存在しないファイルです', 'エラー', MB_ICONSTOP or MB_OK);
13371331 SoundFileEdit.Text := '';
13381332 Exit;
13391333 end;
1340- if not sndPlaySound(PChar(s), SND_ASYNC or SND_NOSTOP) then begin
1334+ if not sndPlaySound(PChar(SoundFileEdit.Text), SND_ASYNC or SND_NOSTOP) then begin
13411335 sndPlaySound(nil, SND_ASYNC);
13421336 end;
13431337 end;
--- a/ResPopupBrowser.pas
+++ b/ResPopupBrowser.pas
@@ -66,8 +66,6 @@ begin
6666 RawDocument := '';
6767 FEvent := nil;
6868 ShowWindow(Self.Handle, SW_HIDE);
69- GikoSys.ShowRefCount('ResPop Create', Self.ControlInterface);
70- GikoSys.ShowRefCount('ResPop.Document Create', Self.ControlInterface.Document);
7169 end;
7270
7371 destructor TResPopupBrowser.Destroy;
@@ -86,10 +84,6 @@ begin
8684 FEvent := nil;
8785 end;
8886 FThread := nil;
89-
90- GikoSys.ShowRefCount('ResPop Desctroy', Self.ControlInterface);
91- GikoSys.ShowRefCount('ResPop.Document Create', Self.ControlInterface.Document);
92-
9387 inherited Destroy;
9488 end;
9589
@@ -142,7 +136,7 @@ begin
142136 end;
143137 procedure TResPopupBrowser.NavigateBlank(Forced: Boolean);
144138 begin
145- if (not Assigned(Self.ControlInterface.Document)) or (Forced) then begin
139+ if (not Assigned(Self.Document)) or (Forced) then begin
146140 Self.Navigate('about:blank');
147141 end;
148142 while (Self.ReadyState <> READYSTATE_COMPLETE) and
@@ -198,7 +192,7 @@ begin
198192 ARect := CalcRect(Screen.MonitorFromPoint(p).WorkareaRect,
199193 not OnlyTitle);
200194
201- FEvent := THTMLDocumentEventSink.Create(Self, Self.OleObject.Document, HTMLDocumentEvents2);
195+ FEvent := THTMLDocumentEventSink.Create(Self, Self.Document, HTMLDocumentEvents2);
202196 FEvent.OnClick := ResPopupBrowserClick;
203197 FEvent.OnDoubleClick := ResPopupBrowserDbClick;
204198 Self.Visible := True;
@@ -278,7 +272,7 @@ var
278272 DIV_X, DIV_Y: Integer;
279273 begin
280274 GetCursorpos(p);
281- ele := ((Self.ControlInterface.Document as IHTMLDocument2).body as IHTMLElement2);
275+ ele := ((Self.Document as IHTMLDocument2).body as IHTMLElement2);
282276 if Scroll then begin
283277 h := GetWindowHeight + 10;
284278 w := ele.scrollWidth + 25
--- a/Setting.pas
+++ b/Setting.pas
@@ -1218,16 +1218,8 @@ begin
12181218 if Exists then begin
12191219 for i := 0 to GetSoundCount - 1 do begin
12201220 SoundFileName[i] := ini.ReadString('Sound', SoundName[i], '');
1221- // 相対参照対策
1222- s := SoundFileName[i];
1223- if (AnsiPos('.\', SoundFileName[i]) = 1) then begin
1224- s := GetAppDir
1225- + Copy(SoundFileName[i], 2, Length(SoundFileName[i]));
1226- end;
1227- // ファイルの存在チェック
1228- if not FileExists(SoundFileName[i]) then begin
1229- SoundFileName[i] := '';
1230- end;
1221+ if not FileExists(SoundFileName[i]) then
1222+ SoundFileName[i] := '';
12311223 end;
12321224 end else begin
12331225 s := GetAppDir + '\sound\';
@@ -1880,11 +1872,6 @@ begin
18801872 for i := 0 to GetSoundCount - 1 do begin
18811873 if SoundName[i] = Name then begin
18821874 Result := SoundFileName[i];
1883- // 相対パス対策
1884- if (AnsiPos('.\', Result) = 1) then begin
1885- Result := GetAppDir
1886- + Copy(Result, 2, Length(Result));
1887- end;
18881875 Exit;
18891876 end;
18901877 end;
Binary files a/gikoNavi.res and b/gikoNavi.res differ
--- a/readme/readme.txt
+++ b/readme/readme.txt
@@ -79,7 +79,7 @@ http://www.microsoft.com/windows95/downloads/contents/WUAdminTools/S_WUNetworkin
7979 ------------------------------
8080 開発ツール:Delphi6 Professional (UP2 + RTL UP2 + RTL UP3)
8181 Delphi6 Personal(UP2 + RTL UP2 + RTL UP3)
82-OS :WindowsXP Professional Edition(SP3) + IE7
82+OS :WindowsXP Professional Edition(SP2) + IE7
8383 WindowsXP Professional Edition(SP1) + IE6(SP1)
8484 Windows2000 Professional (SP4) + IE6(SP1)
8585
@@ -108,16 +108,10 @@ LICENSE
108108 ------------------------------
109109 履歴
110110 ------------------------------
111-2008/09/20
111+2008/0X/XX
112112 Version バタ58
113113 プレビューのURLから登録してある外部アプリを起動する機能を追加
114114 レス送信エディタで、連続して投稿できるようにする機能を追加
115- 開いているタブのスレッドの一覧をスレッド一覧に表示する機能を追加
116- まちBBSのPATH_INFO形式のURLに対応
117- サウンドイベントのファイル指定を相対パスで指定できるように修正
118- 表示中のタブの一覧をスレッド一覧に表示するアクションを追加
119- したらばJBBSの板更新機能修正
120- datファイルをスレッド一覧にD&Dしたときに、ファイル名が不正ですエラーに常になる不具合の修正
121115
122116 2008/03/22
123117 Version バタ57 リリース2
--- a/res/ExternalBoardPlugIn/MachiBBSPlugIn.dpr
+++ b/res/ExternalBoardPlugIn/MachiBBSPlugIn.dpr
@@ -83,7 +83,7 @@ const
8383 MAJOR_VERSION = 1;
8484 MINOR_VERSION = 0;
8585 RELEASE_VERSION = 'beta';
86- REVISION_VERSION = 19;
86+ REVISION_VERSION = 18;
8787
8888 // =========================================================================
8989 // 雑用関数
@@ -269,7 +269,6 @@ var
269269 const
270270 BBS_HOST = 'machi.to';
271271 THREAD_MARK = '/bbs/read.pl';
272- THREAD_MARK2= '/bbs/read.cgi';
273272 begin
274273
275274 try
@@ -281,10 +280,6 @@ begin
281280 foundPos := AnsiPos( BBS_HOST, uri.Host );
282281 if (foundPos > 0) and (Length( uri.Host ) - foundPos + 1 = Length( BBS_HOST )) then begin
283282 foundPos := Pos( THREAD_MARK, inURL );
284- if (foundPos = 0) then begin
285- // 新URL対応
286- foundPos := Pos( THREAD_MARK2, inURL );
287- end;
288283 if foundPos > 0 then
289284 Result := atThread
290285 else if (uriList.Count > 1) and (uri.Path <> '/') then // 最後が '/' で閉められてるなら 3
@@ -314,10 +309,9 @@ procedure OnExtractBoardURL(
314309 var
315310 uri : TIdURI;
316311 uriList : TStringList;
317- URL : String;
312+ URL : String;
318313 const
319314 THREAD_MARK = '/bbs/read.pl';
320- THREAD_MARK2= '/bbs/read.cgi';
321315 begin
322316 URL := string(inURL);
323317 if AnsiPos(THREAD_MARK, URL) > 0 then begin
@@ -339,27 +333,6 @@ begin
339333 uri.Free;
340334 uriList.Free;
341335 end;
342- end else if AnsiPos(THREAD_MARK2, URL) > 0 then begin
343- if Copy( inURL, Length( inURL ), 1 ) = '/' then
344- uri := TIdURI.Create( URL )
345- else
346- uri := TIdURI.Create( URL + '/' );
347-
348- uriList := TStringList.Create;
349- try
350- // http://kanto.machi.to/bbs/read.cgi/kana/1215253035/l50
351- // http://kanto.machi.to/kana/
352- uriList.Delimiter := '/';
353- uriList.DelimitedText := uri.Path;
354- URL := uri.Protocol + '://' + uri.Host + '/';
355- if (uriList.Count >= 4) then begin
356- URL := URL + uriList[3] + '/';
357- end;
358- outURL := CreateResultString(URL);
359- finally
360- uri.Free;
361- uriList.Free;
362- end;
363336 end else begin
364337 outURL := CreateResultString(URL);
365338 end;
@@ -900,8 +873,6 @@ var
900873 uri : TIdURI;
901874 uriList : TStringList;
902875 foundPos : Integer;
903-const
904- THREAD_MARK2= '/bbs/read.cgi';
905876 begin
906877
907878 foundPos := AnsiPos( '?', URL );
@@ -917,26 +888,7 @@ begin
917888 uri.Free;
918889 uriList.Free;
919890 end;
920- end else begin
921- // 新形式 ?
922- foundPos := AnsiPos(THREAD_MARK2, URL);
923- if (foundPos > 0) then begin
924- uri := TIdURI.Create( URL );
925- uriList := TStringList.Create;
926- try
927- uriList.Delimiter := '/';
928- uriList.DelimitedText := uri.Path;
929- if (uriList.Count >= 5) then begin
930- Result :=
931- uri.Protocol + '://' + uri.Host + '/bbs/read.pl?' +
932- 'BBS=' + uriList[3] + '&KEY=' + uriList[4];
933- end;
934- finally
935- uri.Free;
936- uriList.Free;
937- end;
938- end;
939- end;
891+ end;
940892
941893 end;
942894
Binary files a/res/ExternalBoardPlugIn/MachiBBSPlugIn.res and b/res/ExternalBoardPlugIn/MachiBBSPlugIn.res differ
--- a/res/ExternalBoardPlugIn/ShitarabaJBBSAcquireBoard.pas
+++ b/res/ExternalBoardPlugIn/ShitarabaJBBSAcquireBoard.pas
@@ -201,9 +201,6 @@ var
201201 key : string;
202202 htmlList : TStringList;
203203 i : Integer;
204-
205- resultArea : Boolean;
206- pos : Integer;
207204 const
208205 //http://rentalbbs.livedoor.com/jbbs/search/?word=%C2%E7%B3%D8&category=auto
209206 BBS_HOST = 'http://rentalbbs.livedoor.com/';
@@ -215,7 +212,7 @@ const
215212 label
216213 NextBoard;
217214 begin
218- responseCode := 0;
215+
219216 category := CATEGORIES[ CategoryComboBox.ItemIndex ];
220217 boardname := BoardNameEdit.Text;
221218
@@ -240,30 +237,31 @@ begin
240237 htmlList := TStringList.Create();
241238 try
242239 htmlList.Text := CustomStringReplace(downResult, '<br>', #13#10);
243- resultArea := False;
244- for i := 0 to htmlList.Count - 1 do begin
240+ for i := htmlList.Count - 1 downto 0 do begin
245241 downResult := htmlList[i];
246242 try
247- //<div class="searchResults">
248- //<h2><span class="ranking">[1]</span><a href="http://jbbs.livedoor.jp/auto/5497/">MIT-MCC BBS</a><span class="point"><span class="all">4750pt</span><span class="yesterday">(Yesterday40 pt)</span></span></h2>
249- //<p>武蔵工業大学 モータサイクル部のBBSです。各自チェックするようにしましょう♪(&amp;gt;_&amp;lt;)b</p>
250- //</div>
251- if (not resultArea) and (AnsiPos('class="searchResults"', downResult) > 0) then begin
252- resultArea := True;
253- end else if (resultArea) then begin
254- pos := AnsiPos('<a href="', downResult);
255- if (pos > 0) then begin
256- resultArea := False;
257- downResult := Copy(downResult, pos + 9, Length(downResult));
258- key := Copy(downResult, 1, AnsiPos('"', downResult)-1);
259- downResult := Copy(downResult, AnsiPos('>', downResult) + 1, Length(downResult));
260-
261- board := Copy(downResult, 1, AnsiPos('</a>', downResult) -1);
262-
263- board := CustomStringReplace(board, '=', '=') + '=' + key;
264- LogEdit.SelText := board + #13#10;
265- FBoardList.Add( board );
266- end;
243+ //<a href="/auto/2348/">トヨタ自動車掲示板</a>
244+ //<small><strng><a href="http://jbbs.livedoor.jp/auto/4112/">明治大学 二部・短大</a></strong></small></td>
245+ if (AnsiPos('<small><strng><a href="', downResult) > 0)
246+ and (AnsiPos(category, downResult) > 0) then begin
247+ downResult := CustomStringReplace(downResult, '<small><strng>', '');
248+ board := Copy(downResult, AnsiPos('<a href="', downResult) + 9,
249+ Length(downResult));
250+ key := Copy(board, AnsiPos('">', board) + 2,
251+ Length(board));
252+ key := Copy(key, 1, AnsiPos('</a>', key) -1);
253+
254+ board := Copy(board, 1, AnsiPos('">', board) - 1);
255+ if (board = '../') then begin
256+ board := CustomStringReplace(board, '../', BOARD_HOST);
257+ end else if (AnsiPos('/', board) = 1) then begin
258+ board := BOARD_HOST + Copy(board, 2, Length(board));
259+ end;
260+
261+ board := key + '=' + board;
262+
263+ LogEdit.SelText := board + #13#10;
264+ FBoardList.Add( board );
267265 end;
268266 except
269267 end;
--- a/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr
+++ b/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr
@@ -2,7 +2,7 @@ library ShitarabaJBBSPlugIn;
22
33 {
44 ShitarabaJBBSPlugIn
5- $Id: ShitarabaJBBSPlugIn.dpr,v 1.45 2008/08/03 02:45:48 h677 Exp $
5+ $Id: ShitarabaJBBSPlugIn.dpr,v 1.44 2006/07/02 09:48:04 h677 Exp $
66 }
77
88 uses
@@ -83,7 +83,7 @@ const
8383 MAJOR_VERSION = 1;
8484 MINOR_VERSION = 1;
8585 RELEASE_VERSION = 'alpha';
86- REVISION_VERSION = 17;
86+ REVISION_VERSION = 15;
8787
8888 SYNCRONIZE_MENU_CAPTION = 'したらばJBBS板更新';
8989
Binary files a/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.res and b/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.res differ
--- a/res/default/Samba.default
+++ b/res/default/Samba.default
@@ -1,31 +1,40 @@
11 [Setting]
2-@endless=20
32 @liveplus=10
4-@news=156
3+@news=30
54 @newsplus=128
6-@operate=24
7-@sec2chd=20
8-academy6=45
9-babiru=30
10-bubble6=45
11-changi=45
12-ex24=45
13-food8=45
14-gimpo=45
15-ipv6=45
16-life9=45
17-live23=15
18-live24=15
19-love6=45
20-mamono=45
21-namidame=45
22-pc11=45
23-qb5=45
24-qiufen=30
25-schiphol=45
26-science6=45
27-set=30
28-society6=45
29-venus=30
30-yomi=30
31-yutori=10
5+@news4vip=10
6+@news4viptasu=10
7+academy6=20
8+anime3=20
9+bubble6=20
10+etc7=20
11+ex21=20
12+food8=20
13+game13=20
14+game14=20
15+hobby10=20
16+human7=20
17+life9=20
18+live23=10
19+live24=10
20+live27=10
21+love6=20
22+mamono=10
23+money6=20
24+music8=20
25+namidame=10
26+news24=20
27+pc11=20
28+qb5=20
29+qiufen=20
30+babiru=20
31+yomi=20
32+venus=20
33+set=20
34+school7=20
35+science6=20
36+society6=20
37+sports11=20
38+tmp7=20
39+tv11=20
40+yutori=20
\ No newline at end of file
Show on old repository browser