ギコナビ
Révision | 14699e265671af2e1f58de2c78d4242592538793 (tree) |
---|---|
l'heure | 2007-03-04 21:33:58 |
Auteur | h677 <h677> |
Commiter | h677 |
同IDポップアップの関数の修正
@@ -6509,14 +6509,16 @@ end; | ||
6509 | 6509 | //! ¨CÉüèc[Ì}EXAbvCxg |
6510 | 6510 | // ************************************************************************* |
6511 | 6511 | function TGikoForm.WebBrowserClick(Sender: TObject): WordBool; |
6512 | +const | |
6513 | + LIMIT = 20; | |
6512 | 6514 | var |
6513 | 6515 | p : TPoint; |
6514 | 6516 | e: IHTMLElement; |
6515 | 6517 | AID: string; |
6516 | 6518 | stlist : TStringList; |
6517 | - i, count, rc : Integer; | |
6519 | + i, count: Integer; | |
6518 | 6520 | body : String; |
6519 | - limited : boolean; | |
6521 | + limited : Integer; | |
6520 | 6522 | begin |
6521 | 6523 | result := true; |
6522 | 6524 | try |
@@ -6552,13 +6554,14 @@ begin | ||
6552 | 6554 | end; |
6553 | 6555 | end; |
6554 | 6556 | count := GikoSys.GetSameIDResCount(AID, FActiveContent.Thread); |
6555 | - limited := false; | |
6556 | - if count > 20 then begin | |
6557 | - rc := GikoUtil.MsgBox(Handle, | |
6558 | - '20ÂÈã èÜ·ªA·×Ä\¦µÜ·©H', | |
6557 | + limited := LIMIT; | |
6558 | + if count > LIMIT then begin | |
6559 | + if (GikoUtil.MsgBox(Handle, | |
6560 | + IntToStr(LIMIT) + 'ÂÈã èÜ·ªA·×Ä\¦µÜ·©H', | |
6559 | 6561 | 'ID|bvAbvx', |
6560 | - MB_YESNO or MB_ICONQUESTION); | |
6561 | - limited := rc <> ID_YES; | |
6562 | + MB_YESNO or MB_ICONQUESTION) = ID_YES) then begin | |
6563 | + limited := -1; | |
6564 | + end | |
6562 | 6565 | end; |
6563 | 6566 | body := GikoSys.GetSameIDResAnchor(AID, FActiveContent.Thread, limited); |
6564 | 6567 | FActiveContent.IDAnchorPopup(body); |
@@ -2385,24 +2385,27 @@ end; | ||
2385 | 2385 | //! Iðµ½XðRs[·é |
2386 | 2386 | // ************************************************************************* |
2387 | 2387 | procedure TGikoDM.SameIDResAnchorActionExecute(Sender: TObject); |
2388 | +const | |
2389 | + LIMIT = 20; | |
2388 | 2390 | var |
2389 | 2391 | ThreadItem : TThreadItem; |
2390 | - No, count, rc : Integer; | |
2392 | + No, count: Integer; | |
2391 | 2393 | body : string; |
2392 | - limited: boolean; | |
2394 | + limited: Integer; | |
2393 | 2395 | begin |
2394 | 2396 | No := GikoForm.KokoPopupMenu.Tag; |
2395 | 2397 | if No = 0 then Exit; |
2396 | 2398 | ThreadItem := GikoForm.GetActiveContent; |
2397 | 2399 | if ThreadItem = nil then Exit; |
2398 | 2400 | count := GikoSys.GetSameIDResCount(No, GikoForm.ActiveContent.Thread); |
2399 | - limited := false; | |
2400 | - if count > 20 then begin | |
2401 | - rc := GikoUtil.MsgBox(GikoForm.Handle, | |
2402 | - '20ÂÈã èÜ·ªA·×Ä\¦µÜ·©H', | |
2401 | + limited := LIMIT; | |
2402 | + if count > LIMIT then begin | |
2403 | + if ( GikoUtil.MsgBox(GikoForm.Handle, | |
2404 | + IntToStr(LIMIT) + 'ÂÈã èÜ·ªA·×Ä\¦µÜ·©H', | |
2403 | 2405 | 'ID|bvAbvx', |
2404 | - MB_YESNO or MB_ICONQUESTION); | |
2405 | - limited := rc <> ID_YES; | |
2406 | + MB_YESNO or MB_ICONQUESTION) = ID_YES ) then begin | |
2407 | + limited := -1; | |
2408 | + end; | |
2406 | 2409 | end; |
2407 | 2410 | body := GikoSys.GetSameIDResAnchor(No, ThreadItem, limited); |
2408 | 2411 | GikoForm.ActiveContent.IDAnchorPopup(body); |
@@ -216,8 +216,8 @@ type | ||
216 | 216 | procedure GetPopupResNumber(URL : string; var stRes, endRes : Int64); |
217 | 217 | |
218 | 218 | property Bayesian : TGikoBayesian read FBayesian write FBayesian; |
219 | - function GetSameIDResAnchor(const AID : string; ThreadItem: TThreadItem; limited: boolean):string; overload; | |
220 | - function GetSameIDResAnchor(AIDNum : Integer; ThreadItem: TThreadItem; limited: boolean):string; overload; | |
219 | + function GetSameIDResAnchor(const AID : string; ThreadItem: TThreadItem; limited: Integer):string; overload; | |
220 | + function GetSameIDResAnchor(AIDNum : Integer; ThreadItem: TThreadItem; limited: Integer):string; overload; | |
221 | 221 | procedure GetSameIDRes(const AID : string; ThreadItem: TThreadItem;var body: TStringList); overload; |
222 | 222 | procedure GetSameIDRes(AIDNum : Integer; ThreadItem: TThreadItem;var body: TStringList); overload; |
223 | 223 | function GetSameIDResCount(const AID : string; ThreadItem: TThreadItem):Integer; overload; |
@@ -2699,11 +2699,12 @@ end; | ||
2699 | 2699 | \brief ¯¶e ID ðÂXðAJ[ɵÄñ |
2700 | 2700 | \param AID ÂlðÁè·ée ID |
2701 | 2701 | \param ThreadItem ñ·éXbh |
2702 | -\param limited ñ·éð§À·éÈç True | |
2702 | +\param limited ñ·éð§À·éÈç1Èã | |
2703 | 2703 | \return ñ³ê½XAJ[ |
2704 | -\todo limited ð Integer É·é©A20 ðOÉo· | |
2705 | 2704 | } |
2706 | -function TGikoSys.GetSameIDResAnchor(const AID : string; ThreadItem: TThreadItem; limited: boolean):string; | |
2705 | +function TGikoSys.GetSameIDResAnchor( | |
2706 | + const AID : string; ThreadItem: TThreadItem; | |
2707 | + limited: Integer):string; | |
2707 | 2708 | var |
2708 | 2709 | i: integer; |
2709 | 2710 | body: TStringList; |
@@ -2720,8 +2721,8 @@ begin | ||
2720 | 2721 | body := TStringList.Create; |
2721 | 2722 | try |
2722 | 2723 | GetSameIDRes(AID, ThreadItem, body); |
2723 | - if (limited) and (body.Count > 20) then begin | |
2724 | - for i := body.Count - 20 to body.Count - 1 do begin | |
2724 | + if (limited > 0) and (body.Count > limited) then begin | |
2725 | + for i := body.Count - limited to body.Count - 1 do begin | |
2725 | 2726 | Res.FBody := Res.FBody + '>' + body[i] + ' '; |
2726 | 2727 | end; |
2727 | 2728 | end else begin |
@@ -2788,11 +2789,12 @@ end; | ||
2788 | 2789 | \brief ¯¶e ID ðÂXðñ |
2789 | 2790 | \param AIDNum ÂlðÁè·ée ID |
2790 | 2791 | \param ThreadItem ñ·éXbh |
2791 | -\param limited ñ·éð§À·éÈç True | |
2792 | +\param limited ñ·éð§À·éÈç1Èã | |
2792 | 2793 | \return |
2793 | -\todo limited ð Integer É·é©A20 ðOÉo· | |
2794 | 2794 | } |
2795 | -function TGikoSys.GetSameIDResAnchor(AIDNum : Integer; ThreadItem: TThreadItem; limited: boolean):string; | |
2795 | +function TGikoSys.GetSameIDResAnchor(AIDNum : Integer; | |
2796 | + ThreadItem: TThreadItem; | |
2797 | + limited: Integer):string; | |
2796 | 2798 | var |
2797 | 2799 | i: integer; |
2798 | 2800 | body: TStringList; |
@@ -2808,10 +2810,10 @@ begin | ||
2808 | 2810 | body := TStringList.Create; |
2809 | 2811 | try |
2810 | 2812 | GetSameIDRes(AIDNum, ThreadItem, body); |
2811 | - if (limited) and (body.Count > 20) then begin | |
2812 | - for i := body.Count - 20 to body.Count - 1 do begin | |
2813 | - Res.FBody := Res.FBody + '>' + body[i] + ' '; | |
2814 | - end; | |
2813 | + if (limited > 0) and ( body.Count > limited) then begin | |
2814 | + for i := body.Count - 20 to body.Count - 1 do begin | |
2815 | + Res.FBody := Res.FBody + '>' + body[i] + ' '; | |
2816 | + end; | |
2815 | 2817 | end else begin |
2816 | 2818 | for i := 0 to body.Count - 1 do begin |
2817 | 2819 | Res.FBody := Res.FBody + '>' + body[i] + ' '; |