• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ギコナビ


Commit MetaInfo

Revisiondb2b41b32b051445bbb74dd1e870f1d8ba239936 (tree)
Zeit2007-05-16 01:38:20
Autorh677 <h677>
Commiterh677

Log Message

スレポップアップ中でクリックすると、レスポップアップしなくなる不具合対応

Ändern Zusammenfassung

Diff

--- a/Giko.pas
+++ b/Giko.pas
@@ -684,6 +684,8 @@ type
684684 procedure AddMenuSameBoardThread;
685685 //! ƒAƒNƒeƒBƒu‚ȃ^ƒu‚Æ“¯‚¶”‚̊J‚¢‚Ä‚¢‚éƒXƒŒƒbƒhƒNƒŠƒbƒNƒCƒxƒ“ƒg
686686 procedure SameBoardThreadSubItemOnClick(Sender: TObject);
687+ //! ƒ|ƒbƒvƒAƒbƒvƒuƒ‰ƒEƒUì¬
688+ procedure CreateResPopupBrowser;
687689 protected
688690 procedure CreateParams(var Params: TCreateParams); override;
689691 procedure WndProc(var Message: TMessage); override;
@@ -1684,9 +1686,9 @@ begin
16841686
16851687 // TODO ƒŒƒXƒ|ƒbƒvƒAƒbƒv‚Ì”jŠü
16861688 try
1687- if FPreviewBrowser <> nil then begin
1688- TOleControl(FPreviewBrowser).Parent := nil;
1689- FPreviewBrowser.Free;
1689+ if FResPopupBrowser <> nil then begin
1690+ TOleControl(FResPopupBrowser).Parent := nil;
1691+ FResPopupBrowser.Free;
16901692 end;
16911693
16921694 except
@@ -1920,9 +1922,11 @@ begin
19201922 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
19211923
19221924 if FResPopupBrowser <> nil then begin
1923- if not(Sender is TResPopupBrowser) then
1924- FResPopupBrowser.Clear
1925- else begin
1925+ if not(Sender is TResPopupBrowser) then begin
1926+ if (FResPopupBrowser.Visible) then begin
1927+ FResPopupBrowser.Clear;
1928+ end;
1929+ end else begin
19261930 TResPopupBrowser(Sender).ChildClear;
19271931 end;
19281932 end;
@@ -1958,10 +1962,7 @@ begin
19581962 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
19591963 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
19601964 if (Assigned(e)) then begin
1961- if (FResPopupBrowser = nil) then begin
1962- FResPopupBrowser := TResPopupBrowser.Create(BrowserPanel);
1963- ShowWindow(FResPopupBrowser.Handle, SW_HIDE);
1964- end;
1965+ CreateResPopupBrowser;
19651966 tmp2 := ZenToHan(e.Get_outerText);
19661967 if (GikoSys.IsNumeric(tmp2)) then begin
19671968 //‚“‚̓ŒƒX”ԍ†‚Á‚Û‚¢‚Á‚·B
@@ -2027,19 +2028,13 @@ begin
20272028 wkIntSt := 1;
20282029 wkIntTo := 1;
20292030 end;
2030- if (FResPopupBrowser = nil) then begin
2031- FResPopupBrowser := TResPopupBrowser.Create(BrowserPanel);
2032- ShowWindow(FResPopupBrowser.Handle, SW_HIDE);
2033- end;
2031+ CreateResPopupBrowser;
20342032 FResPopupBrowser.CreateNewBrowser.PopupType := gptThread;
20352033 HTMLCreater.SetResPopupText(FResPopupBrowser.CreateNewBrowser, threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
20362034 end;
20372035 end;
20382036 end;
2039- if (FResPopupBrowser = nil) then begin
2040- FResPopupBrowser := TResPopupBrowser.Create(BrowserPanel);
2041- ShowWindow(FResPopupBrowser.Handle, SW_HIDE);
2042- end;
2037+ CreateResPopupBrowser;
20432038 if FResPopupBrowser.CreateNewBrowser.PopupType = gptRaw then begin
20442039 if FResPopupBrowser.CreateNewBrowser.Title <> '' then begin
20452040 FResPopupBrowser.CreateNewBrowser.TitlePopup;
@@ -4652,7 +4647,9 @@ end;
46524647
46534648 procedure TGikoForm.BrowserEnter(Sender: TObject);
46544649 begin
4655- Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
4650+ if (Sender is TWebBrowser) then begin
4651+ TWebBrowser(Sender).DoObjectVerb(OLEIVERB_UIACTIVATE);
4652+ end;
46564653 end;
46574654
46584655 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
@@ -4847,10 +4844,7 @@ begin
48474844 ThreadItem := GetActiveContent;
48484845 if (ThreadItem <> nil) and (Num <= ThreadItem.Count)
48494846 and (Num > 0)then begin
4850- if (FResPopupBrowser = nil) then begin
4851- FResPopupBrowser := TResPopupBrowser.Create(BrowserPanel);
4852- ShowWindow(FResPopupBrowser.Handle, SW_HIDE);
4853- end;
4847+ CreateResPopupBrowser;
48544848 FResPopupBrowser.CreateNewBrowser.PopupType := gptThread;
48554849 HTMLCreater.SetResPopupText(FResPopupBrowser.CreateNewBrowser, ThreadItem, Num, Num, False, False);
48564850 FResPopupBrowser.Popup;
@@ -7550,6 +7544,14 @@ begin
75507544
75517545 end;
75527546 end;
7547+//! ƒ|ƒbƒvƒAƒbƒvƒuƒ‰ƒEƒUì¬
7548+procedure TGikoForm.CreateResPopupBrowser;
7549+begin
7550+ if (FResPopupBrowser = nil) then begin
7551+ FResPopupBrowser := TResPopupBrowser.Create(BrowserPanel);
7552+ //ShowWindow(FResPopupBrowser.Handle, SW_HIDE);
7553+ end;
7554+end;
75537555
75547556 initialization
75557557 OleInitialize(nil);
--- a/ResPopupBrowser.pas
+++ b/ResPopupBrowser.pas
@@ -58,11 +58,13 @@ uses MojuUtils, GikoSystem, Setting, Giko, GikoDataModule;
5858 constructor TResPopupBrowser.Create(AOwner: TComponent);
5959 begin
6060 inherited Create(AOwner);
61- FChild := nil;
61+ TOleControl(Self).Parent := nil;
6262 Visible := False;
63+ FChild := nil;
6364 Title := '';
6465 RawDocument := '';
6566 FEvent := nil;
67+ ShowWindow(Self.Handle, SW_HIDE);
6668 end;
6769
6870 destructor TResPopupBrowser.Destroy;
@@ -100,25 +102,19 @@ begin
100102 end;
101103 end else begin
102104 FChild := TResPopupBrowser.Create(Self);
103- TOleControl(FChild).Parent := TOleControl(Self).Parent;
104105 FChild.ParentBrowser := Self;
105106 FChild.NavigateBlank;
106-
107- FChild.OnEnter := GikoForm.BrowserEnter;
108107 FChild.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2;
109108 FChild.OnStatusTextChange := GikoForm.BrowserStatusTextChange;
110109 FChild.OnNewWindow2 := GikoForm.BrowserNewWindow2;
111110 SetWindowPos(FChild.Handle, HWND_BOTTOM,
112111 0, 0, 0 , 0,
113112 SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE or SWP_HIDEWINDOW);
114- ShowWindow(FChild.Handle, SW_HIDE);
115113 Result := FChild;
116114 end;
117115 end else begin
118- TOleControl(Self).Parent := nil;
119116 FParentBrowser := nil;
120117 Self.NavigateBlank;
121- Self.OnEnter := GikoForm.BrowserEnter;
122118 Self.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2;
123119 Self.OnStatusTextChange := GikoForm.BrowserStatusTextChange;
124120 Self.OnNewWindow2 := GikoForm.BrowserNewWindow2;
@@ -158,8 +154,11 @@ var
158154 doc: Variant;
159155 ARect: TRect;
160156 FDispHtmlDocument: DispHTMLDocument;
157+ mainActive: Boolean;
161158 begin
162159 try
160+ mainActive := GikoForm.Active;
161+
163162 // ƒ^ƒXƒNƒo[‚©‚çÁ‚·
164163 SetWindowLongA(Self.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
165164 GetCursorpos(p);
@@ -175,8 +174,10 @@ begin
175174 + GetBodyStyle(OnlyTitle) + '</head><body>'
176175 + GetTitle(OnlyTitle)
177176 + ADocument + '<a name="bottom"></a></body></html>');
177+
178178 doc.Close;
179179
180+
180181 ARect := CalcRect(Screen.WorkAreaHeight, Screen.WorkAreaWidth,
181182 not OnlyTitle);
182183
@@ -185,13 +186,16 @@ begin
185186 FEvent.OnClick := ResPopupBrowserClick;
186187
187188 Self.Visible := True;
188- SetWindowPos(Self.Handle, HWND_TOP,
189+ SetWindowPos(Self.Handle, HWND_TOPMOST,
189190 ARect.Left, ARect.Top,
190191 (ARect.Right - ARect.Left) ,
191192 (ARect.Bottom - ARect.Top),
192193 SWP_NOACTIVATE or SWP_HIDEWINDOW);
193194
194195 ShowWindow(Self.Handle, SW_SHOWNOACTIVATE);
196+ if mainActive <> GikoForm.Active then begin
197+ GikoForm.SetFocus;
198+ end;
195199 except
196200 end;
197201 end;
@@ -233,19 +237,9 @@ begin
233237 end;
234238
235239 procedure TResPopupBrowser.Clear;
236-var
237- body: IHTMLElement2;
238240 begin
239241 ChildClear;
240242 if (Self.Visible) then begin
241- try
242- if (Self.ParentBrowser = nil) then begin
243- body := (Idispatch( olevariant(GikoForm.ActiveContent.Browser
244- .ControlInterface).Document) as IHTMLDocument2).body as IHTMLElement2;
245- body.focus;
246- end;
247- except
248- end;
249243 Self.Title := '';
250244 Self.RawDocument := '';
251245 Self.FThread := nil;
@@ -340,16 +334,11 @@ begin
340334 end;
341335 end;
342336 function TResPopupBrowser.ResPopupBrowserClick(Sender: TObject): WordBool;
343-var
344- doc: IHTMLDocument2;
345- body: IHTMLElement2;
346337 begin
347-// doc := Idispatch( olevariant(
348-// GikoForm.ActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
349- doc := Idispatch( olevariant(
350- Self.ControlInterface).Document) as IHTMLDocument2;
351- body := (doc.body as IHTMLElement2);
352- body.focus;
338+ if (not GikoSys.Setting.UnActivePopup) then begin
339+ // ƒMƒRƒiƒr‚̃tƒH[ƒJƒX‚ð’D‚Á‚Ä‚é‚̂ŃtƒH[ƒ€‚É–³—‚â‚è•Ô‚·
340+ GikoForm.SetFocus;
341+ end;
353342 Result := True;
354343 end;
355344 function TResPopupBrowser.GetThread: TThreadItem;
Binary files a/gikoNavi.res and b/gikoNavi.res differ