• R/O
  • HTTP
  • SSH
  • HTTPS

gikonavi: Commit


Commit MetaInfo

Revision0b1a69bc85e758a26f33974cc2e1af770aa85076 (tree)
Time2007-05-09 07:25:45
Authorh677 <h677>
Commiterh677

Log Message

NewBrowserイベントが発生しない不具合対応

Change Summary

Incremental Difference

--- a/ResPopupBrowser.pas
+++ b/ResPopupBrowser.pas
@@ -70,6 +70,7 @@ begin
7070 TOleControl(FChild).Parent := nil;
7171 FChild.NavigateBlank;
7272 FChild.OnEnter := GikoForm.BrowserEnter;
73+ FChild.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2;
7374 FChild.OnStatusTextChange := GikoForm.BrowserStatusTextChange;
7475 FChild.OnNewWindow2 := GikoForm.BrowserNewWindow2;
7576 ShowWindow(FChild.Handle, SW_HIDE);
@@ -79,6 +80,7 @@ begin
7980 TOleControl(Self).Parent := nil;
8081 Self.NavigateBlank;
8182 Self.OnEnter := GikoForm.BrowserEnter;
83+ Self.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2;
8284 Self.OnStatusTextChange := GikoForm.BrowserStatusTextChange;
8385 Self.OnNewWindow2 := GikoForm.BrowserNewWindow2;
8486 Result := Self;
@@ -100,8 +102,6 @@ var
100102 doc: Variant;
101103 ARect: TRect;
102104 begin
103- Self.Visible := True;
104- ShowWindow(Self.Handle, SW_SHOW);
105105 try
106106 doc := Idispatch( olevariant(Self.ControlInterface).Document) as IHTMLDocument2;
107107 doc.open;
@@ -119,12 +119,12 @@ begin
119119 end;
120120
121121 ARect := CalcRect(Screen.Width);
122- SetWindowPos(Self.Handle, HWND_TOPMOST,
122+ SetWindowPos(Self.Handle, HWND_TOP,
123123 ARect.Left, ARect.Top,
124124 (ARect.Right - ARect.Left) ,
125125 (ARect.Bottom - ARect.Top),
126126 SWP_NOACTIVATE or SWP_HIDEWINDOW);
127-
127+ Self.Visible := True;
128128 ShowWindow(Self.Handle, SW_SHOWNOACTIVATE);
129129
130130 except
@@ -176,7 +176,6 @@ end;
176176 function TResPopupBrowser.CalcRect(MaxWidth: Integer): TRect;
177177 var
178178 p: TPoint;
179- doc: Variant;
180179 ele: IHTMLElement2;
181180 begin
182181 GetCursorpos(p);
@@ -185,15 +184,15 @@ begin
185184 ele.scrollWidth + 15,
186185 ele.scrollHeight + 15);
187186 case GikoSys.Setting.PopupPosition of
188- gppRightTop: OffsetRect(Result, p.x - (Result.Right - Result.Left), p.y - (Result.Bottom - Result.Top));
189- gppRight: OffsetRect(Result, p.x - (Result.Right - Result.Left), p.y - ((Result.Bottom - Result.Top) div 2));
190- gppRightBottom: OffsetRect(Result, p.x - (Result.Right - Result.Left), p.y);
191- gppTop: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - (Result.Bottom - Result.Top));
187+ gppRightTop: OffsetRect(Result, p.x - (Result.Right - Result.Left) - 2, p.y - (Result.Bottom - Result.Top) - 2);
188+ gppRight: OffsetRect(Result, p.x - (Result.Right - Result.Left) - 2, p.y - ((Result.Bottom - Result.Top) div 2));
189+ gppRightBottom: OffsetRect(Result, p.x - (Result.Right - Result.Left) -2, p.y + 2);
190+ gppTop: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - (Result.Bottom - Result.Top) - 2);
192191 gppCenter: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - ((Result.Bottom - Result.Top) div 2));
193- gppBottom: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y);
194- gppLeftTop: OffsetRect(Result, p.x, p.y - (Result.Bottom - Result.Top));
195- gppLeft: OffsetRect(Result, p.x, p.y - ((Result.Bottom - Result.Top) div 2));
196- gppLeftBottom: OffsetRect(Result, p.x, p.y);
192+ gppBottom: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y + 2);
193+ gppLeftTop: OffsetRect(Result, p.x + 2, p.y - (Result.Bottom - Result.Top) - 2);
194+ gppLeft: OffsetRect(Result, p.x + 2, p.y - ((Result.Bottom - Result.Top) div 2));
195+ gppLeftBottom: OffsetRect(Result, p.x + 2, p.y + 2);
197196 end;
198197 if (Result.Left < 0) then begin
199198 OffsetRect(Result, -Result.Left, 0);
Binary files a/gikoNavi.res and b/gikoNavi.res differ
Show on old repository browser