• 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

Revisione7e2b5dfd4b937977fe4a8e9b043312436cd2ebe (tree)
Time2007-05-14 02:38:44
Authorh677 <h677>
Commiterh677

Log Message

レスポップアップ中のメニューのアクションを、そのスレッドで動作するように拡張

Change Summary

Incremental Difference

--- a/Giko.dfm
+++ b/Giko.dfm
@@ -159,7 +159,7 @@ object GikoForm: TGikoForm
159159 object ToolBar1: TToolBar
160160 Left = 2
161161 Top = 4
162- Width = 15
162+ Width = 16
163163 Height = 18
164164 Align = alNone
165165 AutoSize = True
@@ -971,7 +971,7 @@ object GikoForm: TGikoForm
971971 OnResize = AddressToolBarResize
972972 object AddressComboBox: TComboBox
973973 Left = 0
974- Top = 0
974+ Top = 1
975975 Width = 177
976976 Height = 20
977977 DropDownCount = 20
--- a/Giko.pas
+++ b/Giko.pas
@@ -2209,6 +2209,9 @@ begin
22092209
22102210 Cancel := True;
22112211 GetCursorpos(p);
2212+ KokoPopupMenu.PopupComponent := nil;
2213+ if (Sender is TComponent) then
2214+ KokoPopupMenu.PopupComponent := TComponent(Sender);
22122215 KokoPopupMenu.Tag := StrToInt(sNo);
22132216 KokoPopupMenu.Popup(p.x, p.y);
22142217 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
@@ -2846,9 +2849,13 @@ end;
28462849 function TGikoForm.GetActiveContent: TThreadItem;
28472850 begin
28482851 try
2849- if FActiveContent <> nil then
2850- Result := FActiveContent.Thread
2851- else
2852+ if FActiveContent <> nil then begin
2853+ Result := FActiveContent.Thread;
2854+ if (FResPopupBrowser <> nil) and (FResPopupBrowser.CurrentBrowser.Visible = True) then
2855+ if (FResPopupBrowser.CurrentBrowser.Thread <> nil) then begin
2856+ Result := FResPopupBrowser.CurrentBrowser.Thread;
2857+ end;
2858+ end else
28522859 Result := nil;
28532860 except
28542861 Result := nil;
@@ -7110,7 +7117,6 @@ begin
71107117 if Assigned(firstElement) then
71117118 if firstElement.style.visibility <> 'hidden' then
71127119 firstElement.style.visibility := 'hidden';
7113-
71147120 end;
71157121
71167122 procedure TGikoForm.RepaintAllTabsBrowser();
--- a/HTMLCreate.pas
+++ b/HTMLCreate.pas
@@ -1282,13 +1282,15 @@ begin
12821282
12831283 Hint.Title := '';
12841284 Hint.RawDocument := '';
1285-
1285+ Hint.Thread := nil;
1286+
12861287 //ƒ^ƒCƒgƒ‹•\Ž¦
12871288 if Title then
12881289 if ThreadItem <> nil then
12891290 Hint.Title := ThreadItem.Title;
12901291
12911292 if ThreadItem <> nil then begin
1293+ Hint.Thread := ThreadItem;
12921294 ResLink.FBbs := ThreadItem.ParentBoard.BBSID;
12931295 ResLink.FKey := ChangeFileExt(ThreadItem.FileName, '');
12941296 //if ThreadItem.IsBoardPlugInAvailable then begin
--- a/ResPopupBrowser.pas
+++ b/ResPopupBrowser.pas
@@ -2,7 +2,7 @@ unit ResPopupBrowser;
22 interface
33 uses
44 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
5- ActiveX, OleCtrls, {HintWindow,}
5+ ActiveX, OleCtrls, {HintWindow,} HTMLDocumentEvent, BoardGroup,
66 {$IF Defined(DELPRO) }
77 SHDocVw,
88 MSHTML
@@ -22,10 +22,14 @@ type
2222 FTitle :String;
2323 FRawDocument: String;
2424 FPopupType: TGikoPopupType;
25+ FEvent: THTMLDocumentEventSink;//ƒuƒ‰ƒEƒUƒhƒLƒ…ƒƒ“ƒgƒCƒxƒ“ƒg
26+ FThread: TThreadItem;
2527 function GetBodyStyle(OnlyTitle: Boolean = False): string;
2628 function GetWindowHeight : Integer;
2729 function GetTitle(OnlyTitle: Boolean): string;
2830 function CalcRect(MaxHeight: Integer; MaxWidth: Integer; Scroll: Boolean): TRect;
31+ function ResPopupBrowserClick(Sender: TObject): WordBool;
32+ function GetThread: TThreadItem;
2933 protected
3034 procedure CreateParams(var Params: TCreateParams); override;
3135 public
@@ -35,6 +39,7 @@ type
3539 property ParentBrowser:TResPopupBrowser read FParentBrowser write FParentBrowser;
3640 property Title: String read FTitle write FTitle;
3741 property RawDocument: String read FRawDocument write FRawDocument;
42+ property Thread: TThreadItem read GetThread write FThread;
3843 function CreateNewBrowser: TResPopupBrowser;
3944 function CurrentBrowser: TResPopupBrowser;
4045 procedure Write(ADocument: String; OnlyTitle: Boolean = False);
@@ -47,7 +52,7 @@ type
4752 end;
4853
4954 implementation
50-uses MojuUtils, GikoSystem, Setting, Giko;
55+uses MojuUtils, GikoSystem, Setting, Giko, GikoDataModule;
5156
5257
5358 constructor TResPopupBrowser.Create(AOwner: TComponent);
@@ -103,7 +108,7 @@ end;
103108 function TResPopupBrowser.CurrentBrowser: TResPopupBrowser;
104109 begin
105110 Result := Self.CreateNewBrowser;
106- if (Result.Parent <> nil) then
111+ if (Result.ParentBrowser <> nil) then
107112 Result := Result.ParentBrowser;
108113 end;
109114 procedure TResPopupBrowser.NavigateBlank;
@@ -128,6 +133,7 @@ procedure TResPopupBrowser.Write(ADocument: String; OnlyTitle: Boolean = False);
128133 var
129134 doc: Variant;
130135 ARect: TRect;
136+ FDispHtmlDocument: DispHTMLDocument;
131137 begin
132138 Self.OnStatusTextChange := nil;
133139 try
@@ -154,7 +160,9 @@ begin
154160 (ARect.Right - ARect.Left) ,
155161 (ARect.Bottom - ARect.Top),
156162 SWP_NOACTIVATE or SWP_HIDEWINDOW);
157-
163+ FDispHtmlDocument := Idispatch(OleVariant(Self.ControlInterface).Document) as DispHTMLDocument;
164+ FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
165+ FEvent.OnClick := ResPopupBrowserClick;
158166 ShowWindow(Self.Handle, SW_SHOWNOACTIVATE);
159167 Self.Visible := True;
160168 except
@@ -207,6 +215,8 @@ begin
207215 if (Self.Visible) then begin
208216 Self.Title := '';
209217 Self.RawDocument := '';
218+ Self.FThread := nil;
219+ FEvent.Free;
210220 NavigateBlank;
211221 ShowWindow(Self.Handle, SW_HIDE);
212222 Self.Visible := False;
@@ -295,4 +305,23 @@ begin
295305 except
296306 end;
297307 end;
308+function TResPopupBrowser.ResPopupBrowserClick(Sender: TObject): WordBool;
309+begin
310+ Result := True;
311+end;
312+function TResPopupBrowser.GetThread: TThreadItem;
313+begin
314+ Result := nil;
315+ if (FThread <> nil) then begin
316+ try
317+ // –³Œø‚ȃ|ƒCƒ“ƒ^ŒŸ¸
318+ if (FThread.ParentBoard <> nil) then begin
319+ Result := FThread
320+ end;
321+ except
322+ //–³Œø‚ȃ|ƒCƒ“ƒ^‚¾‚Á‚½
323+ Result := nil;
324+ end;
325+ end;
326+end;
298327 end.
Binary files a/gikoNavi.res and b/gikoNavi.res differ