OSDN Git Service

・TBoard および TThreadItem のコンストラクタは
authoryoffy <yoffy>
Sat, 22 Nov 2003 15:11:26 +0000 (15:11 +0000)
committeryoffy <yoffy>
Sat, 22 Nov 2003 15:11:26 +0000 (15:11 +0000)
 URL の引数無しでは呼び出せなくなった。

BoardGroup.pas
Giko.pas

index 1df651f..67e55fb 100644 (file)
@@ -181,9 +181,9 @@ type
                procedure SetUnRead(i: Integer);
                procedure SetKotehanName(s: string);
                procedure SetKotehanMail(s: string);
+               procedure Create; overload;
        public
-               constructor Create; overload;
-               constructor Create( inPlugIn : TBoardPlugIn; inURL : string = '' ); overload;
+               constructor Create( inPlugIn : TBoardPlugIn; inURL : string ); overload;
                destructor Destroy; override;
 
                property Context: DWORD read FContext write FContext;
@@ -284,9 +284,9 @@ type
                procedure SetKokomade(i: Integer);
                procedure SetUnRead(b: Boolean);
                procedure SetScrollTop(i: Integer);
+               procedure Create; overload;
        public
-               constructor Create; overload;
-               constructor Create( inPlugIn : TBoardPlugIn; inURL : string = '' ); overload;
+               constructor Create( inPlugIn : TBoardPlugIn; inURL : string ); overload;
                destructor Destroy; override;
 
                function GetDatURL: string;
@@ -766,7 +766,7 @@ end;}
 //===================
 //TBoard
 //===================
-constructor TBoard.Create;
+procedure TBoard.Create;
 begin
        FNo := 0;
        FTitle := '';
@@ -791,7 +791,7 @@ end;
 // *************************************************************************
 constructor TBoard.Create(
        inPlugIn        : TBoardPlugIn;
-       inURL                   : string = ''
+       inURL                   : string
 );
 begin
 
@@ -1320,7 +1320,7 @@ begin
 end;}
 
 //constructor TThreadItem.Create(AOwner: TComponent);
-constructor TThreadItem.Create;
+procedure TThreadItem.Create;
 begin
        FNo := 0;
        FFileName := '';
@@ -1348,7 +1348,7 @@ end;
 // *************************************************************************
 constructor TThreadItem.Create(
        inPlugIn        : TBoardPlugIn;
-       inURL                   : string = ''
+       inURL                   : string
 );
 begin
 
index f9e0f61..e78cfc6 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -2435,7 +2435,7 @@ begin
                        URL := Text;
 
                        if Pos('about:blank..', URL) = 1 then
-                               URL := StringReplace(URL, 'about:blank..', 'http://www.2ch.net', []);
+                               URL := StringReplace( URL, 'about:blank..', 'http://www.2ch.net', [] );
 
                        PathRec := Gikosys.Parse2chURL2(URL);
 
@@ -2468,11 +2468,12 @@ begin
                                        wkIntTo := 9999;
 
                                ATitle := ActiveFileName <> PathRec.FKey;
-                               wkThread := BBSsFindThreadFromURL( URL );
 
-                               //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
-                               FHint.PopupType := gptThread;
-                               SetResPopupText(wkThread, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
+                               if (FActiveContent <> nil) and (FActiveContent is TThreadItem) then begin
+                                       //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
+                                       FHint.PopupType := gptThread;
+                                       SetResPopupText( TThreadItem( FActiveContent ), wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
+                               end;
                        end;
                end;
 
@@ -7808,9 +7809,7 @@ begin
 
        if Source is TBoard then begin
                Board := TBoard( Source );
-               FavoBoardItem                           := TFavoriteBoardItem.Create;
-               FavoBoardItem.Item      := Board;
-               FavoBoardItem.Title     := Board.Title;
+               FavoBoardItem                           := TFavoriteBoardItem.Create( Board.URL, Board.Title, Board );
                Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
                Node.ImageIndex := 15;
                Node.SelectedIndex := 15;
@@ -7825,9 +7824,7 @@ begin
                Node.SelectedIndex := 15;
        end else if Source is TThreadItem then begin
                ThreadItem := TThreadItem( Source );
-               FavoThreadItem                          := TFavoriteThreadItem.Create;
-               FavoThreadItem.Item             := ThreadItem;
-               FavoThreadItem.Title    := ThreadItem.Title;
+               FavoThreadItem                          := TFavoriteThreadItem.Create( ThreadItem.URL, ThreadItem.Title, ThreadItem );
                Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
                Node.ImageIndex := 16;
                Node.SelectedIndex := 16;