OSDN Git Service

誤記修正
[gikonavigoeson/gikonavi.git] / Giko.pas
index f3e323b..0c0374c 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -3082,12 +3082,27 @@ end;
 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
 var
        i: Integer;
-begin
+       node: TTreeNode;
+begin
+       // \83L\83\83\83r\83l\83b\83g\82É\97\9a\97ð\82ª\95\\8e¦\82³\82ê\82Ä\82¢\82½\82ç\81A
+       // \83L\83\83\83r\83l\83b\83g\93à\82Ì\83A\83C\83e\83\80\82à\8dí\8f\9c\82·\82é\81B
+       if (FTreeType = gttHistory) then begin
+               node := TreeView.Items.GetFirstNode;
+               while (node <> nil) do begin
+                       if ( TFavoriteThreadItem(node.Data).Item  = threadItem ) then begin
+                               TreeView.Items.Delete(node);
+                               TreeView.Refresh;
+                               node := nil;
+                       end else begin
+                               node := node.GetNext;
+                       end;
+               end;
+       end;
        for i := 0 to FHistoryList.Count - 1 do begin
-               if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
+               if threadItem = TFavoriteThreadItem( FHistoryList.Items[i] ).Item then begin
                        TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
                        FHistoryList.Delete(i);
-            FHistoryList.Capacity := FHistoryList.Count;
+                       FHistoryList.Capacity := FHistoryList.Count;
                        Break;
                end;
        end;
@@ -4492,6 +4507,9 @@ begin
 end;
 
 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
+const
+       MsgAdd : String = '\8aù\82É\82¨\8bC\82É\93ü\82è\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81B\82»\82ê\82Å\82à\92Ç\89Á\82µ\82Ü\82·\82©\81H';
+       TitleAdd: String =  '\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á';
 var
        Dlg                     : TFavoriteAddDialog;
        ItemURL : string;
@@ -4511,7 +4529,7 @@ begin
                        Data := Node.Data;
                        if TObject( Data ) is TFavoriteBoardItem then begin
                                if ItemURL = TFavoriteBoardItem( Data ).URL then begin
-                                       if Application.MessageBox( '\8aù\82É\82¨\8bC\82É\93ü\82è\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81B\82»\82ê\82Å\82à\92Ç\89Á\82µ\82Ü\82·\82©\81H', '\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á', MB_YESNO ) = IDNO then
+                                       if Application.MessageBox(PChar(MsgAdd) , PChar(TitleAdd), MB_YESNO ) = IDNO then
                                                Exit;
                                        Break;
                                end;
@@ -4531,7 +4549,7 @@ begin
                        Data := Node.Data;
                        if TObject( Data ) is TFavoriteThreadItem then begin
                                if ItemURL = TFavoriteThreadItem( Data ).URL then begin
-                                       if Application.MessageBox( '\8aù\82É\82¨\8bC\82É\93ü\82è\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81B\82»\82ê\82Å\82à\92Ç\89Á\82µ\82Ü\82·\82©\81H', '\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á', MB_YESNO ) = IDNO then
+                                       if Application.MessageBox( PChar(MsgAdd), PChar(TitleAdd), MB_YESNO ) = IDNO then
                                                Exit;
                                        Break;
                                end;