• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

ギコナビ


Commit MetaInfo

Revision648ad6f41bb59a8b230922ca5f06052ee4bf6cd2 (tree)
Time2007-05-15 07:02:43
Authorh677 <h677>
Commiterh677

Log Message

数字の右クリックでレスポップアップしないの不具合の修正
レスポップアップでタスクバーに追加されないように修正
レスポップアップが消えた後にアクティブなスレッドにフォーカスを移すように修正

Change Summary

Incremental Difference

--- a/Giko.pas
+++ b/Giko.pas
@@ -1683,9 +1683,16 @@ begin
16831683 FEvent.Free;
16841684
16851685 // TODO ƒŒƒXƒ|ƒbƒvƒAƒbƒv‚Ì”jŠü
1686+ try
1687+ if FPreviewBrowser <> nil then begin
1688+ TOleControl(FPreviewBrowser).Parent := nil;
1689+ FPreviewBrowser.Free;
1690+ end;
16861691
1692+ except
1693+ end;
16871694 //Preview”jŠü
1688- if TPreviewBrowser <> nil then begin
1695+ if FPreviewBrowser <> nil then begin
16891696 FPreviewBrowser.Free;
16901697 FPreviewBrowser := nil;
16911698 end;
@@ -4836,16 +4843,17 @@ begin
48364843 s := CustomStringReplace(Range.text, '@', ' ');//‘SŠp‹ó”’‚𔼊p‹ó”’‚É
48374844 s := ZenToHan(Trim(s));
48384845 if GikoSys.IsNumeric(s) then begin
4839-
4846+ Num := StrToInt64(s);
48404847 ThreadItem := GetActiveContent;
4841- if ThreadItem <> nil then begin
4842- Num := StrToInt64(s);
4848+ if (ThreadItem <> nil) and (Num <= ThreadItem.Count)
4849+ and (Num > 0)then begin
48434850 if (FResPopupBrowser = nil) then begin
48444851 FResPopupBrowser := TResPopupBrowser.Create(BrowserPanel);
48454852 ShowWindow(FResPopupBrowser.Handle, SW_HIDE);
48464853 end;
4847- FResPopupBrowser.PopupType := gptThread;
4854+ FResPopupBrowser.CreateNewBrowser.PopupType := gptThread;
48484855 HTMLCreater.SetResPopupText(FResPopupBrowser.CreateNewBrowser, ThreadItem, Num, Num, False, False);
4856+ FResPopupBrowser.Popup;
48494857 Result := False;
48504858 end else
48514859 Result := True;
--- a/GikoDataModule.pas
+++ b/GikoDataModule.pas
@@ -12,7 +12,7 @@ uses
1212 MSHTML_TLB,
1313 {$IFEND}
1414 ComCtrls, BrowserRecord, Graphics, Messages, Setting, Dialogs,
15- ActiveX, MoveHistoryItem, HistoryList;
15+ ActiveX, GikoSystem, MoveHistoryItem, HistoryList;
1616
1717 const
1818 CAPTION_NAME: string = 'ƒMƒRƒiƒr';
@@ -49,6 +49,7 @@ const
4949
5050
5151 type
52+
5253 TGikoDM = class(TDataModule)
5354 GikoFormActionList: TActionList;
5455 OnlyAHundredResAction: TAction;
@@ -487,7 +488,7 @@ implementation
487488
488489 uses
489490 Windows, Math, Clipbrd,
490- Giko, GikoSystem, GikoUtil, BoardGroup,
491+ Giko, GikoUtil, BoardGroup,
491492 FavoriteArrange, Favorite, MojuUtils,
492493 Editor, ListSelect, Search, Option, Round,
493494 KeySetting, Gesture, Kotehan, ToolBarSetting,
--- a/ResPopupBrowser.pas
+++ b/ResPopupBrowser.pas
@@ -62,16 +62,32 @@ begin
6262 Visible := False;
6363 Title := '';
6464 RawDocument := '';
65+ FEvent := nil;
6566 end;
6667
6768 destructor TResPopupBrowser.Destroy;
6869 begin
70+ Self.OnEnter := nil;
71+ Self.OnBeforeNavigate2 := nil;
72+ Self.OnStatusTextChange := nil;
73+ Self.OnNewWindow2 := nil;
74+ if (FChild <> nil) then begin
75+ FChild.Free;
76+ FChild := nil;
77+ end;
78+ if (FEvent <> nil) then begin
79+ FEvent.Free;
80+ FEvent := nil;
81+ end;
82+ FThread := nil;
6983 inherited Destroy;
7084 end;
7185
7286 procedure TResPopupBrowser.CreateParams(var Params: TCreateParams);
7387 begin
74- inherited CreateParams(Params);
88+ inherited;
89+ Params.Style := Params.Style or WS_EX_TOOLWINDOW;
90+
7591 end;
7692 function TResPopupBrowser.CreateNewBrowser: TResPopupBrowser;
7793 begin
@@ -84,13 +100,17 @@ begin
84100 end;
85101 end else begin
86102 FChild := TResPopupBrowser.Create(Self);
87- TOleControl(FChild).Parent := nil;
103+ TOleControl(FChild).Parent := TOleControl(Self).Parent;
88104 FChild.ParentBrowser := Self;
89105 FChild.NavigateBlank;
106+
90107 FChild.OnEnter := GikoForm.BrowserEnter;
91108 FChild.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2;
92109 FChild.OnStatusTextChange := GikoForm.BrowserStatusTextChange;
93110 FChild.OnNewWindow2 := GikoForm.BrowserNewWindow2;
111+ SetWindowPos(FChild.Handle, HWND_BOTTOM,
112+ 0, 0, 0 , 0,
113+ SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE or SWP_HIDEWINDOW);
94114 ShowWindow(FChild.Handle, SW_HIDE);
95115 Result := FChild;
96116 end;
@@ -102,6 +122,9 @@ begin
102122 Self.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2;
103123 Self.OnStatusTextChange := GikoForm.BrowserStatusTextChange;
104124 Self.OnNewWindow2 := GikoForm.BrowserNewWindow2;
125+ SetWindowPos(Self.Handle, HWND_BOTTOM,
126+ 0, 0, 0 , 0,
127+ SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE or SWP_HIDEWINDOW);
105128 Result := Self;
106129 end;
107130 end;
@@ -131,46 +154,46 @@ begin
131154 end;
132155 procedure TResPopupBrowser.Write(ADocument: String; OnlyTitle: Boolean = False);
133156 var
157+ p: TPoint;
134158 doc: Variant;
135159 ARect: TRect;
136160 FDispHtmlDocument: DispHTMLDocument;
137161 begin
138- Self.OnStatusTextChange := nil;
139162 try
140- try
141- // ‚¢‚Á‚½‚ñk¬
142- SetWindowPos(Self.Handle, HWND_TOP,
143- 0, 0, 50 , 50,
144- SWP_NOMOVE or SWP_NOACTIVATE or SWP_HIDEWINDOW);
163+ // ƒ^ƒXƒNƒo[‚©‚çÁ‚·
164+ SetWindowLongA(Self.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
165+ GetCursorpos(p);
166+ // ‚¢‚Á‚½‚ñk¬
167+ SetWindowPos(Self.Handle, HWND_BOTTOM,
168+ p.X, p.Y, 50 , 50,
169+ SWP_NOACTIVATE or SWP_HIDEWINDOW);
170+ doc := Idispatch( olevariant(Self.ControlInterface).Document) as IHTMLDocument2;
171+ doc.open;
172+ doc.charset := 'Shift_JIS';
173+ doc.Write('<html><head>'#13#10 +
174+ '<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">'#13#10
175+ + GetBodyStyle(OnlyTitle) + '</head><body>'
176+ + GetTitle(OnlyTitle)
177+ + ADocument + '<a name="bottom"></a></body></html>');
178+ doc.Close;
145179
146- doc := Idispatch( olevariant(Self.ControlInterface).Document) as IHTMLDocument2;
147- doc.open;
148- doc.charset := 'Shift_JIS';
149- doc.Write('<html><head>'#13#10 +
150- '<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">'#13#10
151- + GetBodyStyle(OnlyTitle) + '</head><body>'
152- + GetTitle(OnlyTitle)
153- + ADocument + '<a name="bottom"></a></body></html>');
154- doc.Close;
180+ ARect := CalcRect(Screen.WorkAreaHeight, Screen.WorkAreaWidth,
181+ not OnlyTitle);
155182
156- ARect := CalcRect(Screen.WorkAreaHeight, Screen.WorkAreaWidth,
157- not OnlyTitle);
158- SetWindowPos(Self.Handle, HWND_TOP,
159- ARect.Left, ARect.Top,
160- (ARect.Right - ARect.Left) ,
161- (ARect.Bottom - ARect.Top),
162- SWP_NOACTIVATE or SWP_HIDEWINDOW);
163- FDispHtmlDocument := Idispatch(OleVariant(Self.ControlInterface).Document) as DispHTMLDocument;
164- FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
165- FEvent.OnClick := ResPopupBrowserClick;
166- ShowWindow(Self.Handle, SW_SHOWNOACTIVATE);
167- Self.Visible := True;
168- except
169- end;
170- finally
171- Self.OnStatusTextChange := GikoForm.BrowserStatusTextChange;
172- end;
183+ FDispHtmlDocument := Idispatch(OleVariant(Self.ControlInterface).Document) as DispHTMLDocument;
184+ FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
185+ FEvent.OnClick := ResPopupBrowserClick;
186+
187+ Self.Visible := True;
188+ SetWindowPos(Self.Handle, HWND_TOP,
189+ ARect.Left, ARect.Top,
190+ (ARect.Right - ARect.Left) ,
191+ (ARect.Bottom - ARect.Top),
192+ SWP_NOACTIVATE or SWP_HIDEWINDOW);
173193
194+ ShowWindow(Self.Handle, SW_SHOWNOACTIVATE);
195+ except
196+ end;
174197 end;
175198 function TResPopupBrowser.GetTitle(OnlyTitle: Boolean): string;
176199 begin
@@ -210,13 +233,24 @@ begin
210233 end;
211234
212235 procedure TResPopupBrowser.Clear;
236+var
237+ body: IHTMLElement2;
213238 begin
214239 ChildClear;
215240 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;
216249 Self.Title := '';
217250 Self.RawDocument := '';
218251 Self.FThread := nil;
219252 FEvent.Free;
253+ FEvent := nil;
220254 NavigateBlank;
221255 ShowWindow(Self.Handle, SW_HIDE);
222256 Self.Visible := False;
@@ -306,7 +340,16 @@ begin
306340 end;
307341 end;
308342 function TResPopupBrowser.ResPopupBrowserClick(Sender: TObject): WordBool;
343+var
344+ doc: IHTMLDocument2;
345+ body: IHTMLElement2;
309346 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;
310353 Result := True;
311354 end;
312355 function TResPopupBrowser.GetThread: TThreadItem;
Binary files a/gikoNavi.res and b/gikoNavi.res differ