X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=GikoDataModule.pas;h=30456e946bc658507962dc356d8273fd3d9ace84;hb=refs%2Fheads%2FBb60;hp=49c09ad6b3f3ddb6901090464ffdfa2ea323c478;hpb=d55911e2b0148bf982f154e3f0c3c1bd292f742e;p=gikonavigoeson%2Fgikonavi.git diff --git a/GikoDataModule.pas b/GikoDataModule.pas index 49c09ad..30456e9 100644 --- a/GikoDataModule.pas +++ b/GikoDataModule.pas @@ -42,7 +42,7 @@ const //! 2‚¿‚á‚ñ‚Ë‚é‚ÌURL URL_2ch: string = 'www.2ch.net/'; //! ƒMƒRƒiƒrWiki‚ÌURL - URL_Wiki: string = 'gikowiki.dyndns.info/index.php?FAQ'; + URL_Wiki: string = 'sourceforge.jp/projects/gikonavi/wiki/FAQ'; SELECTCOMBOBOX_NAME: string = ''; // 'ƒXƒŒƒbƒhižŒŸõ'; SELECTCOMBOBOX_COLOR: TColor = clWindow; @@ -237,6 +237,14 @@ type ScrollPageUpAction: TAction; AllLinkToClipboardAction: TAction; NewLinkToClipboardAction: TAction; + AddIDtoNGWord0Action: TAction; + AddIDtoNGWord1Action: TAction; + ExtractSameIDAction: TAction; + ShowTabListAction: TAction; + DereferenceResAction: TAction; + UpdateGikonaviAction: TAction; + konoURLPATHAction: TAction; + konoURLQueryAction: TAction; procedure EditNGActionExecute(Sender: TObject); procedure ReloadActionExecute(Sender: TObject); procedure GoFowardActionExecute(Sender: TObject); @@ -444,6 +452,15 @@ type procedure ScrollPageUpActionExecute(Sender: TObject); procedure AllLinkToClipboardActionExecute(Sender: TObject); procedure NewLinkToClipboardActionExecute(Sender: TObject); + procedure AddIDtoNGWord0ActionExecute(Sender: TObject); + procedure AddIDtoNGWord1ActionExecute(Sender: TObject); + procedure ExtractSameIDActionExecute(Sender: TObject); + procedure ShowTabListActionExecute(Sender: TObject); + procedure DereferenceResActionExecute(Sender: TObject); + procedure UpdateGikonaviActionExecute(Sender: TObject); + procedure konoURLPATHActionExecute(Sender: TObject); + procedure konoURLQueryActionExecute(Sender: TObject); + procedure konoURLQueryActionUpdate(Sender: TObject); private { Private éŒ¾ } procedure ClearResFilter; @@ -459,7 +476,7 @@ type procedure ClearSelectComboBox; procedure ClearMailAllEditor(); procedure ClearNameTextAllEditor(); - procedure MoveURLWithHistory(URL : String); + procedure MoveURLWithHistory(URL : String; KeyMask: Boolean = False); procedure BackToHistory(item: TMoveHistoryItem); function GetActiveThreadLinks : IHTMLElementCollection; procedure GetLinkURLs(links : IHTMLElementCollection; @@ -476,8 +493,10 @@ type procedure DependActiveCntentActionUpdate(Sender: TObject); //! TAction‚ÅGetActiveContent‚ªnilˆÈŠO‚©‚ƒƒO‚ðŽ‚Á‚Ä‚¢‚é‚Æ—LŒø‚É‚È‚é procedure DependActiveCntentLogActionUpdate(Sender: TObject); - //! TAction‚ÅActiveList‚ªTBoard‚Å—LŒø‚É‚È‚é + //! TAction‚ÅActiveList‚ªTBoard(”ñ“ÁŽê”Â)‚Å—LŒø‚É‚È‚é procedure DependActiveListTBoardActionUpdate(Sender: TObject); + //! TAction‚ÅActiveList‚ªTBoard‚Å—LŒø‚É‚È‚é + procedure DependActiveListTBoardWithSpeciapActionUpdate(Sender: TObject); end; var @@ -496,7 +515,7 @@ uses GikoBayesian, About, ShellAPI, RoundName, RoundData, Menus, ListViewUtils, ThreadControl, GikoMessage, InputAssist, - DefaultFileManager, Forms, NewBoardURL; + DefaultFileManager, Forms, NewBoardURL, UpdateCheck; const MSG_ERROR : string = 'ƒGƒ‰['; @@ -518,10 +537,18 @@ begin and (GikoForm.GetActiveContent.IsLogFile); end; // ************************************************************************* -//! TAction‚ÅActiveList‚ªTBoard‚Å—LŒø‚É‚È‚é +//! TAction‚ÅActiveList‚ªTBoard(”ñ“ÁŽê”Â)‚Å—LŒø‚É‚È‚é // ************************************************************************* procedure TGikoDM.DependActiveListTBoardActionUpdate(Sender: TObject); begin + TAction(Sender).Enabled := (GikoForm.GetActiveList is TBoard) and + (GikoForm.GetActiveList <> BoardGroup.SpecialBoard); +end; +// ************************************************************************* +//! TAction‚ÅActiveList‚ªTBoard‚Å—LŒø‚É‚È‚é +// ************************************************************************* +procedure TGikoDM.DependActiveListTBoardWithSpeciapActionUpdate(Sender: TObject); +begin TAction(Sender).Enabled := (GikoForm.GetActiveList is TBoard); end; // ************************************************************************* @@ -904,8 +931,8 @@ begin GikoForm.ResRangeMenuSelect := 100; OnlyAHundredResAction.Checked := True; - //@•\Ž¦”͈͂ðÝ’è‚·‚é - SetResRange(100); + //@•\Ž¦”͈͂ðÝ’è‚·‚éBÝ’è’l‚©‚ç‚Æ‚Á‚Ä‚­‚éB + SetResRange(GikoSys.Setting.ResRangeExCount); end; // ************************************************************************* //! –¢“ǃŒƒX‚Ì‚Ý•\Ž¦ @@ -2040,9 +2067,8 @@ begin GikoForm.DeleteHistory(ThreadItem); GikoForm.DeleteTab(ThreadItem); ThreadItem.DeleteLogFile; - - GikoForm.TreeView.Refresh; // UnRead ‚Ì•\Ž¦‚ðXV end; + GikoForm.TreeView.Refresh; // UnRead ‚Ì•\Ž¦‚ðXV GikoForm.ListView.Refresh; finally List.Free; @@ -2337,12 +2363,13 @@ var ThreadItem: TThreadItem; begin No := GikoForm.KokoPopupMenu.Tag; - if No = 0 then Exit; - ThreadItem := GikoForm.GetActiveContent(True); - if ThreadItem = nil then Exit; + if No = 0 + then Exit; + ThreadItem := GikoForm.KokoPopupThreadItem; + if not Assigned(ThreadItem) then + Exit; ThreadItem.Kokomade := No; - GikoForm.ActiveContent.Thread.ScrollTop := - OleVariant(IHTMLDocument2(GikoForm.ActiveContent.Browser.Document)).Body.ScrollTop; + GikoForm.ActiveContent.Thread.ScrollTop := GikoForm.ActiveContent.Browser.OleObject.Document.Body.ScrollTop; GikoForm.ActiveContent.Repaint := true; GikoForm.InsertBrowserTab(GikoForm.ActiveContent.Thread, true); //INFO 2005/11/19 ˆê’U‰B•ÁA•K—v‚È‚çGikoForm‚Ì•û‚Ƀƒ\ƒbƒh‚ð’ljÁ‚·‚é @@ -2358,8 +2385,7 @@ begin ThreadItem := GikoForm.GetActiveContent(True); if ThreadItem = nil then Exit; ThreadItem.Kokomade := -1; - GikoForm.ActiveContent.Thread.ScrollTop := - OleVariant(IHTMLDocument2(GikoForm.ActiveContent.Browser.Document)).Body.ScrollTop; + GikoForm.ActiveContent.Thread.ScrollTop := GikoForm.ActiveContent.Browser.OleObject.Document.Body.ScrollTop; GikoForm.ActiveContent.Repaint := true; GikoForm.InsertBrowserTab(GikoForm.ActiveContent.Thread, true); //INFO 2005/11/19 ˆê’U‰B•ÁA•K—v‚È‚çGikoForm‚Ì•û‚Ƀƒ\ƒbƒh‚ð’ljÁ‚·‚é @@ -2376,7 +2402,7 @@ var begin Number := GikoForm.KokoPopupMenu.Tag; if Number = 0 then Exit; - Item := GikoForm.GetActiveContent(True); + Item := GikoForm.KokoPopupThreadItem; if Item = nil then Exit; Editor := TEditorForm.Create(GikoForm); @@ -2400,26 +2426,18 @@ const LIMIT = 20; var ThreadItem : TThreadItem; - No, count: Integer; - body : string; - limited: Integer; + No : Integer; + AID: string; begin No := GikoForm.KokoPopupMenu.Tag; if No = 0 then Exit; - ThreadItem := GikoForm.GetActiveContent(True); + ThreadItem := GikoForm.KokoPopupThreadItem; if ThreadItem = nil then Exit; - count := GikoSys.GetSameIDResCount(No, GikoForm.ActiveContent.Thread); - limited := LIMIT; - if count > LIMIT then begin - if ( GikoUtil.MsgBox(GikoForm.Handle, - IntToStr(LIMIT) + 'ŒÂˆÈã‚ ‚è‚Ü‚·‚ªA‚·‚ׂĕ\Ž¦‚µ‚Ü‚·‚©H', - 'IDƒ|ƒbƒvƒAƒbƒvŒx', - MB_YESNO or MB_ICONQUESTION) = ID_YES ) then begin - limited := -1; - end; - end; - body := GikoSys.GetSameIDResAnchor(No, ThreadItem, limited); - GikoForm.ActiveContent.IDAnchorPopup(body); + + AID := GikoSys.GetResID(No, ThreadItem); + if not IsNoValidID(AID) then begin + GikoForm.ShowSameIDAncher(AID); + end; end; // ************************************************************************* //! ‚±‚̃ŒƒX‚ ‚ځ`‚ñ@i’ʏíj @@ -2449,8 +2467,7 @@ begin IndividualForm := TIndividualAbonForm.Create(GikoForm); try ThreadItem := GikoForm.GetActiveContent(True); - ThreadItem.ScrollTop := - OleVariant(IHTMLDocument2(GikoForm.ActiveContent.Browser.Document)).Body.ScrollTop; + ThreadItem.ScrollTop := GikoForm.ActiveContent.Browser.OleObject.Document.Body.ScrollTop; if (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin if IndividualForm.SetThreadLogFileName(ThreadItem.GetThreadFileName) then begin ReadList := TStringList.Create; @@ -2497,8 +2514,7 @@ begin IndividualForm := TIndividualAbonForm.Create(GikoForm); try ThreadItem := GikoForm.GetActiveContent(True); - ThreadItem.ScrollTop := - OleVariant(IHTMLDocument2(GikoForm.ActiveContent.Browser.Document)).Body.ScrollTop; + ThreadItem.ScrollTop := GikoForm.ActiveContent.Browser.OleObject.Document.Body.ScrollTop; if (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin if IndividualForm.SetThreadLogFileName(ThreadItem.GetThreadFileName) then begin if (IndividualForm.ShowModal = mrOK) then begin @@ -2642,7 +2658,8 @@ end; // ************************************************************************* procedure TGikoDM.UpFolderActionUpdate(Sender: TObject); begin - UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS); + UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS) and + (GikoForm.GetActiveList <> BoardGroup.SpecialBoard); end; // ************************************************************************* //! •\Ž¦@•\Ž¦ƒŠƒXƒg‚̃‚[ƒh•ÏX @@ -3005,9 +3022,10 @@ procedure TGikoDM.SelectListReloadActionUpdate(Sender: TObject); begin if (GikoForm.GetActiveList is TCategory) and (GikoForm.ListView.SelCount > 0) then TAction(Sender).Enabled := True - else if GikoForm.GetActiveList is TBoard then - TAction(Sender).Enabled := True - else + else if GikoForm.GetActiveList is TBoard then begin + TAction(Sender).Enabled := + (GikoForm.GetActiveList <> BoardGroup.SpecialBoard); + end else TAction(Sender).Enabled := False; end; // ************************************************************************* @@ -3205,8 +3223,10 @@ end; // ************************************************************************* procedure TGikoDM.LogFolderOpenActionUpdate(Sender: TObject); begin - if ((GikoForm.GetActiveList is TBoard) or (GikoForm.GetActiveList is TCategory)) - and (GikoForm.ListView.SelCount > 0) then + if (((GikoForm.GetActiveList is TBoard) and + (GikoForm.GetActiveList <> BoardGroup.SpecialBoard)) + or (GikoForm.GetActiveList is TCategory)) + and (GikoForm.ListView.SelCount > 0) then TAction(Sender).Enabled := True else TAction(Sender).Enabled := False; @@ -4108,7 +4128,7 @@ end; procedure TGikoDM.BackToHistory(item: TMoveHistoryItem); var browser : TWebBrowser; - doc : OleVariant; + doc : IHTMLDocument2; begin if ( item <> nil ) then begin if ( GikoForm.GetActiveContent = item.ThreadItem ) then begin @@ -4116,24 +4136,24 @@ begin .Objects[GikoForm.BrowserTab.TabIndex]).Browser; if (browser <> nil) then begin try - doc := Idispatch( olevariant(browser.ControlInterface).Document) as IHTMLDocument2; - doc.Body.ScrollTop := item.ScrollTop; + doc := browser.ControlInterface.Document as IHTMLDocument2; + (doc.body as IHTMLElement2).ScrollTop := item.ScrollTop; except end; end; end else begin //URL‚Ɉړ® - MoveURLWithHistory(item.ThreadItem.URL); + MoveURLWithHistory(item.ThreadItem.URL, True); end; end; end; //! —š—ðˆ—‚‚«URLˆÚ“® -procedure TGikoDM.MoveURLWithHistory(URL : String); +procedure TGikoDM.MoveURLWithHistory(URL : String; KeyMask: Boolean = False); var idx : Integer; begin //URL‚Ɉړ® - GikoForm.MoveToURL(URL); + GikoForm.MoveToURL(URL, KeyMask); //ˆÈ‰ºA—š—ð‚̏ˆ— idx := GikoForm.AddressComboBox.Items.IndexOf(URL); if idx = -1 then begin @@ -4167,6 +4187,7 @@ procedure TGikoDM.ClickActiveElementActionExecute(Sender: TObject); var browser : TWebBrowser; elem : IHTMLElement; + doc : IHTMLDocument2; begin if (GikoForm.GetActiveContent <> nil) then begin if (GikoForm.BrowserTab.Tabs.Count > 0) and @@ -4175,8 +4196,13 @@ begin .Objects[GikoForm.BrowserTab.TabIndex]).Browser; if (browser <> nil) then begin try - elem := IHTMLDocument2(browser.Document).activeElement; - elem.click; + doc := browser.ControlInterface.Document as IHTMLDocument2; + if Assigned(doc) then begin + elem := doc.activeElement; + if Assigned(elem) then begin + elem.click; + end; + end; except end; end; @@ -4337,6 +4363,7 @@ end; function TGikoDM.GetActiveThreadLinks : IHTMLElementCollection; var browser : TWebBrowser; + doc : IHTMLDocument2; begin Result := nil; if (GikoForm.GetActiveContent <> nil) then begin @@ -4346,7 +4373,10 @@ begin .Objects[GikoForm.BrowserTab.TabIndex]).Browser; if (browser <> nil) then begin try - Result := IHTMLDocument2(browser.Document).links; + doc := browser.ControlInterface.Document as IHTMLDocument2; + if Assigned(doc) then begin + Result := doc.links; + end; except Result := nil; end; @@ -4378,7 +4408,7 @@ begin // ƒŒƒX‚̔ԍ†‚ðXV if (Pos('menu:', url) > 0) then begin index := StrToInt64Def( - Copy(url, 5, Length(url)), index + 1 + Copy(url, 6, Length(url)), index + 1 ); end else begin // ŠJŽnƒŒƒX”ԍ†ˆÈ~‚©ƒ`ƒFƒbƒN @@ -4436,6 +4466,210 @@ begin end; +//! ‚±‚̃ŒƒX‚ÌID‚ðNGƒ[ƒh‚ɒljÁ‚·‚éi“§–¾) +procedure TGikoDM.AddIDtoNGWord0ActionExecute(Sender: TObject); +begin + GikoForm.AddIDtoNGWord(true); +end; +//! ‚±‚̃ŒƒX‚ÌID‚ðNGƒ[ƒh‚ɒljÁ‚·‚é +procedure TGikoDM.AddIDtoNGWord1ActionExecute(Sender: TObject); +begin + GikoForm.AddIDtoNGWord(false); +end; +//! ƒNƒŠƒbƒvƒ{[ƒh‚Ì•¶Žš—ñ‚ðID‚Æ‚µ‚Ä“¯ˆêIDƒŒƒXƒAƒ“ƒJ[•\Ž¦ +procedure TGikoDM.ExtractSameIDActionExecute(Sender: TObject); +var + ID: String; +begin + ID := Trim(Clipboard.AsText); + if (Length(ID) > 0) then begin + if not IsNoValidID(ID) then begin + GikoForm.ShowSameIDAncher(ID); + end; + end; +end; +//! ƒ^ƒu‚̃XƒŒƒbƒhˆê——‚ð•\Ž¦‚·‚é +procedure TGikoDM.ShowTabListActionExecute(Sender: TObject); +var + i : Integer; +begin + GikoForm.ListView.Items.BeginUpdate; + GikoForm.ListView.Items.Clear; + BoardGroup.SpecialBoard.Clear; + for i := GikoForm.BrowserTab.Tabs.Count - 1 downto 0 do begin + BoardGroup.SpecialBoard.Add( + TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Thread); + end; + GikoForm.ListView.Items.EndUpdate; + GikoForm.SetActiveList(BoardGroup.SpecialBoard); +end; +//! ‹tŽQÆ‚µ‚Ä‚¢‚郌ƒX‚ð’ljÁ‚·‚é +procedure TGikoDM.DereferenceResActionExecute(Sender: TObject); +var + i, currentNo, No : Integer; + links : IHTMLElementCollection; + threadItem : TThreadItem; + item : IHTMLElement; + url, url2 : string; + resNo : TStringList; + alreadyExist : Boolean; + PathRec: TPathRec; +begin + No := GikoForm.KokoPopupMenu.Tag; + if No = 0 then Exit; + + ThreadItem := GikoForm.KokoPopupThreadItem; + // ƒAƒNƒeƒBƒuƒ^ƒu‚©‚ç‘S‚ẴŠƒ“ƒN‚ðŽæ“¾‚·‚é + links := GetActiveThreadLinks; + if (ThreadItem <> nil) and (links <> nil) then begin + resNo := TStringList.Create; + try + currentNo := 0; + alreadyExist := False; + // ƒŠƒ“ƒN‚ð‘S‚Ä‘–¸‚·‚é + for i := 0 to links.length - 1 do begin + item := links.item(i, 0) as IHTMLElement; + if (item <> nil) then begin + url := item.getAttribute('href', 0); + // ƒŒƒX‚̔ԍ†‚ðXV + if (Pos('menu:', url) > 0) then begin + currentNo := StrToInt64Def( + Copy(url, 6, Length(url)), currentNo + 1 + ); + alreadyExist := False; + end else if (currentNo <> -1) and (not alreadyExist) then begin + // IE7‘Ήž + if Pos('about:..', url) = 1 then begin + url := 'about:blank..' + Copy( url, Length('about:..')+1, Length(url) ) + end; + // Ž©•ª‚ւ̃Šƒ“ƒN‚©‚烌ƒXƒ|ƒbƒv—p‚̔ԍ†Žæ“¾ + if Pos('about:blank..', url) = 1 then begin + // No ”Ԃւ̃Šƒ“ƒN‚ª‚ ‚ê‚ÎŽQÆ‚ ‚è + url2 := THTMLCreate.GetRespopupURL(url, ThreadItem.URL); + PathRec := Gikosys.Parse2chURL2(url2); + if (not PathRec.FNoParam) then begin + Gikosys.GetPopupResNumber(url2,PathRec.FSt,PathRec.FTo); + end; + // ‘ΏۃŒƒX‚à‚µ‚­‚Í‚»‚ê‚ðŠÜ‚Þ‚È‚çŽQÆ‚ ‚è‚Æ‚·‚é + if (PathRec.FSt = No) or + ((PathRec.FSt <= No) and (PathRec.FTo >= No)) then begin + alreadyExist := True; + resNo.Add(IntToStr(currentNo)); + end; + end; + end; + end; + end; + // –³§ŒÀ‚È‚Ì‚Å-1ŒÅ’è + GikoForm.ActiveContent.IDAnchorPopup( + GikoSys.CreateResAnchor(resNo, ThreadItem, -1)); + finally + resNo.Clear; + resNo.Free; + end; + end; +end; + +procedure TGikoDM.UpdateGikonaviActionExecute(Sender: TObject); +var + form : TUpdateCheckForm; + Msg: string; + shutdown: boolean; +begin + if (EditorFormExists) then begin + Msg := 'ƒŒƒXƒGƒfƒBƒ^‚ð‘S‚ĕ‚¶‚Ä‚­‚¾‚³‚¢'; + MsgBox(GikoForm.Handle, Msg, MSG_ERROR, MB_OK or MB_ICONSTOP); + Exit; + end; + GikoForm.UpdateExePath := ''; + GikoForm.UpdateExeArgs := ''; + form := TUpdateCheckForm.Create(Self); + try + form.ShowModal; + shutdown := form.Allowshutdown; + if shutdown then begin + GikoForm.UpdateExePath := form.ExecPath; + GikoForm.UpdateExeArgs := form.ExecArgs; + end; + finally + form.Release; + end; + if shutdown then begin + // ƒMƒRƒiƒrI—¹ + GikoForm.Close; + end; + +end; +//! ‚±‚̃ŒƒX‚ÌURLƒRƒs[iPATH_INFO) +procedure TGikoDM.konoURLPATHActionExecute(Sender: TObject); +var + No : Integer; + ThreadItem : TThreadItem; + URL, Protocol, Host, Path, Document, Port, Bookmark : String; +begin + No := GikoForm.KokoPopupMenu.Tag; + if No = 0 then Exit; + + ThreadItem := GikoForm.KokoPopupThreadItem; + if (ThreadItem.ParentBoard.Is2ch) or not (Pos('?', ThreadItem.URL) > 0) then begin + GikoSys.ParseURI(ThreadItem.URL,Protocol, Host, Path, Document, Port, Bookmark); + URL := Protocol + '://' + Host + Path + IntToStr(No); + end else begin + if Pos('?', ThreadItem.URL) > 0 then begin + URL := Copy(ThreadItem.URL, 1, Pos('?', ThreadItem.URL)-1); + // ‚Ü‚¿BBS—pˆ’u + URL := MojuUtils.CustomStringReplace(URL, 'read.pl', 'read.cgi'); + URL := URL + '/' + ThreadItem.ParentBoard.BBSID + '/' + ChangeFileExt(ThreadItem.FileName, '') + '/' + IntToStr(No); + end; + end; + Clipboard.SetTextBuf( PChar(URL) ); +end; +//! ‚±‚̃ŒƒX‚ÌURLƒRƒs[iQuery_STRING) +procedure TGikoDM.konoURLQueryActionExecute(Sender: TObject); +var + No : Integer; + ThreadItem : TThreadItem; + URL, Protocol, Host, Path, Document, Port, Bookmark : String; +begin + No := GikoForm.KokoPopupMenu.Tag; + if No = 0 then Exit; + + ThreadItem := GikoForm.KokoPopupThreadItem; + // 2ch‚Æ‚µ‚½‚ç‚΂́AƒŒƒX”ԍ†‚ð‚¤‚Ü‚­ˆ—‚µ‚Ä‚­‚ê‚È‚¢‚Ì‚Å—˜—p•s‰Â + if ThreadItem.ParentBoard.Is2ch or not (Pos('?', ThreadItem.URL) > 0) then begin + GikoSys.ParseURI(ThreadItem.URL, Protocol, Host, Path, Document, Port, Bookmark); + URL := Protocol + '://' + Host + '/test/read.cgi?bbs=' + ThreadItem.ParentBoard.BBSID + + '&key=' + ChangeFileExt(ThreadItem.FileName, '') + '&st=' + IntToStr(No) + '&to=' + IntToStr(No); + end else begin + URL := ThreadItem.URL; + // ‚Ü‚¿BBS + if Pos('&LAST=', URL) > 0 then begin + URL := Copy(URL, 1, Pos('&LAST=', URL) - 1); + URL := URL + '&START=' + IntToStr(No) + '&END=' + IntToStr(No); + end; + // ‚»‚Ì‘¼ŠO•”” + if Pos('&ls=', URL) > 0 then begin + URL := Copy(URL, 1, Pos('&ls=', URL) - 1); + URL := URL + '&st=' + IntToStr(No) + '&to=' + IntToStr(No); + end; + + end; + Clipboard.SetTextBuf( PChar(URL) ); +end; +//! ‚±‚̃ŒƒX‚ÌURLƒRƒs[iQuery_STRINGj‚Ì—˜—pƒ`ƒFƒbƒN +procedure TGikoDM.konoURLQueryActionUpdate(Sender: TObject); +const + LIVEDOOR_URL = 'http://jbbs.livedoor.jp/'; +begin + // 2ch‚Æ‚µ‚½‚ç‚΂͗˜—p‚Å‚«‚È‚¢‚悤‚É‚·‚éi‚¤‚Ü‚­ƒŒƒXŽw’è‚Å‚«‚È‚¢‚̂Łj + konoURLQueryAction.Enabled := false; + if (GikoForm.KokoPopupThreadItem <> nil) then begin + konoURLQueryAction.Enabled := not GikoForm.KokoPopupThreadItem.ParentBoard.Is2ch; + if konoURLQueryAction.Enabled then begin + konoURLQueryAction.Enabled := not (Pos(LIVEDOOR_URL, GikoForm.KokoPopupThreadItem.URL) = 1); + end; + end; +end; end.