Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/Giko.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.120 by yoffy, Fri Nov 21 04:41:19 2003 UTC revision 1.121 by yoffy, Fri Nov 21 06:14:52 2003 UTC
# Line 19  uses Line 19  uses
19          Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd,          Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd,
20          FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan,          FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan,
21          HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil,          HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil,
22          IndividualAbon, Dialogs, Search, ExternalBoardManager, StdActns;          IndividualAbon, Dialogs, Search, ExternalBoardManager, ExternalBoardPlugInMain, StdActns;
23    
24  type  type
25          TGikoTreeType = (gttNone, gtt2ch, gttHistory);          TGikoTreeType = (gttNone, gtt2ch, gttHistory);
# Line 4910  begin Line 4910  begin
4910          CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);          CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
4911    
4912          Cancel := True;          Cancel := True;
4913          if      (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin          if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
4914                  Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;                  Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
4915                  Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;                  Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
4916    
4917                  URL := GikoSys.GetHRefText(Html);                  URL := GikoSys.GetHRefText(Html);
4918                  URL := GikoSys.HTMLDecode(URL);                  URL := GikoSys.HTMLDecode(URL);
4919    
                 GikoSys.ParseURI(URL, Protocol, Host, Path, Document, Port, Bookmark);  
   
   
4920                  //アドレスバーの履歴                  //アドレスバーの履歴
4921                  if GikoSys.Setting.LinkAddAddressBar then begin                  if GikoSys.Setting.LinkAddAddressBar then begin
4922                          idx := AddressComboBox.Items.IndexOf(URL);                          idx := AddressComboBox.Items.IndexOf(URL);
# Line 4933  begin Line 4930  begin
4930                          end;                          end;
4931                  end;                  end;
4932    
4933                  if GikoSys.Is2chHost(Host) and GikoSys.Parse2chURL(URL, Path, Document, BBSID, BBSKey) then begin      MoveToURL( URL );
                         Board := BBS2ch.FindBBSID(BBSID);  
                         if Board = nil then begin  
                                 GikoSys.OpenBrowser(URL, gbtAuto);  
                                 Exit;  
                         end;  
                         if not Board.IsThreadDatRead then  
                                 GikoSys.ReadSubjectFile(Board);  
                         ThreadItem := Board.Find(ChangeFileExt(BBSKey, '.dat'));  
                         if ThreadItem = nil then begin  
                                 if ShiftDown then  
                                         GikoSys.OpenBrowser(URL, gbtUserApp)  
                                 else if CtrlDown then  
                                         GikoSys.OpenBrowser(URL, gbtIE)  
                                 else begin  
                                         ThreadItem := TThreadItem.Create;  
                                         ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');  
                                         if AnsiPos(Host, Board.URL) = 0 then  
                                                 ThreadItem.DownloadHost := Host  
                                         else  
                                                 ThreadItem.DownloadHost := '';  
                                         Board.Insert(0, ThreadItem);  
                                         if ActiveList is TBoard then begin  
                                                 if TBoard(ActiveList) = Board then  
                                                         ListView.Items.Count := ListView.Items.Count + 1;  
                                                 InsertBrowserTab(ThreadItem);  
                                                 DownloadContent(ThreadItem);  
                                         end;  
                                 end;  
                         end else begin  
                                 if ShiftDown then  
                                         GikoSys.OpenBrowser(URL, gbtUserApp)  
                                 else if CtrlDown then  
                                         GikoSys.OpenBrowser(URL, gbtIE)  
                                 else begin  
                                         if ThreadItem.IsLogFile then  
                                                 InsertBrowserTab(ThreadItem)  
                                         else begin  
                                                 if AnsiPos(Host, Board.URL) = 0 then  
                                                         ThreadItem.DownloadHost := Host  
                                                 else  
                                                         ThreadItem.DownloadHost := '';  
                                                 InsertBrowserTab(ThreadItem);  
                                                 DownloadContent(ThreadItem);  
                                         end;  
                                 end;  
                         end;  
                 end else begin  
                         GikoSys.OpenBrowser(URL, gbtAuto);  
                 end;  
4934          end;          end;
4935    
4936  {       ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);  {       ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
# Line 5975  var Line 5923  var
5923          category                        : TCategory;          category                        : TCategory;
5924          categoryNode    : TTreeNode;          categoryNode    : TTreeNode;
5925          boardNode                       : TTreeNode;          boardNode                       : TTreeNode;
5926            shiftDown                       : Boolean;
5927            ctrlDown                        : Boolean;
5928  begin  begin
5929    
5930          //===== プラグイン          //===== プラグイン
# Line 5982  begin Line 5932  begin
5932                  bi := High( BoardPlugIns );                  bi := High( BoardPlugIns );
5933                  for i := Low( BoardPlugIns ) to bi do begin                  for i := Low( BoardPlugIns ) to bi do begin
5934                          if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin                          if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
5935                                  if BoardPlugIns[ i ].AcceptURL( URL ) then begin                                  if BoardPlugIns[ i ].AcceptURL( URL ) = atThread then begin
5936                                          tmpThread               := TThreadItem.Create( BoardPlugIns[ i ], URL );                                          tmpThread               := TThreadItem.Create( BoardPlugIns[ i ], URL );
5937                                          boardURL                := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );                                          boardURL                := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
5938                                          Board                           := BBS2ch.FindBoardFromURL( boardURL );                                          Board                           := BBS2ch.FindBoardFromURL( boardURL );
# Line 6057  begin Line 6007  begin
6007                          GikoSys.ReadSubjectFile(Board);                          GikoSys.ReadSubjectFile(Board);
6008                  ThreadItem := Board.Find(ChangeFileExt(BBSKey, '.dat'));                  ThreadItem := Board.Find(ChangeFileExt(BBSKey, '.dat'));
6009                  if ThreadItem = nil then begin                  if ThreadItem = nil then begin
6010                          ThreadItem := TThreadItem.Create;                          //shift -> 設定ブラウザ(無ければIE)
6011                          ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');                          //ctrl  -> IE
6012                          if AnsiPos(Host, Board.URL) = 0 then                          shiftDown       := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6013                                  ThreadItem.DownloadHost := Host                          ctrlDown        := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6014                          else                          if shiftDown then
6015                                  ThreadItem.DownloadHost := '';                                  GikoSys.OpenBrowser(URL, gbtUserApp)
6016                          Board.Insert(0, ThreadItem);                          else if ctrlDown then
6017                          if ActiveList is TBoard then begin                                  GikoSys.OpenBrowser(URL, gbtIE)
6018                                  if TBoard(ActiveList) = Board then                          else begin
6019                                          ListView.Items.Count := ListView.Items.Count + 1;                                  ThreadItem := TThreadItem.Create;
6020                                    ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
6021                                    if AnsiPos(Host, Board.URL) = 0 then
6022                                            ThreadItem.DownloadHost := Host
6023                                    else
6024                                            ThreadItem.DownloadHost := '';
6025                                    Board.Insert(0, ThreadItem);
6026                                    if ActiveList is TBoard then begin
6027                                            if TBoard(ActiveList) = Board then
6028                                                    ListView.Items.Count := ListView.Items.Count + 1;
6029                                    end;
6030                                    InsertBrowserTab(ThreadItem);
6031                                    DownloadContent(ThreadItem);
6032                          end;                          end;
                         InsertBrowserTab(ThreadItem);  
                         DownloadContent(ThreadItem);  
6033                  end else begin                  end else begin
6034                          if ThreadItem.IsLogFile then                          if ThreadItem.IsLogFile then
6035                                  InsertBrowserTab(ThreadItem)                                  InsertBrowserTab(ThreadItem)

Legend:
Removed from v.1.120  
changed lines
  Added in v.1.121

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26