OSDN Git Service

タスクトレイへの格納で、レスエディタのタスクバーが消えない不具合の修正
[gikonavigoeson/gikonavi.git] / FavoriteArrange.pas
index 782164a..114a7e8 100644 (file)
@@ -145,14 +145,23 @@ begin
 end;
 
 procedure TFavoriteArrangeDialog.DeleteButtonClick(Sender: TObject);
+const
+       DEL_LINK_MSG = '\81g\83\8a\83\93\83N\81h\82Í\83\8a\83\93\83N\83o\81[\97p\83t\83H\83\8b\83_\82Å\82·\81B\8dí\8f\9c\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+       DEL_MSG = '\81g^0\81h\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+       DEL_TITLE = '\8dí\8f\9c\8am\94F';
 begin
        if FolderTreeView.Selected = nil then
                Exit;
        if FolderTreeView.Selected.IsFirstNode then
                Exit;
-       if FolderTreeView.Selected.Text = Favorite.FAVORITE_LINK_NAME then begin
-               if MsgBox(Handle, '\81u\83\8a\83\93\83N\81v\82Í\83\8a\83\93\83N\83o\81[\97p\83t\83H\83\8b\83_\82Å\82·\81B\8dí\8f\9c\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82·\82©\81H', '\8am\94F', MB_YESNO or MB_ICONQUESTION) <> ID_YES then
-                       Exit;
+       if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
+               if FolderTreeView.Selected.Text = Favorite.FAVORITE_LINK_NAME then begin
+                       if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
+                               Exit;
+               end else begin
+                       if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FolderTreeView.Selected.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
+                               Exit;
+               end;
        end;
 
        FDeleteList.Add(FolderTreeView.Selected.Data);