OSDN Git Service

- 履歴の削除に同意を求めるようになった。
authoryoffy <yoffy>
Sun, 15 Aug 2004 16:07:00 +0000 (16:07 +0000)
committeryoffy <yoffy>
Sun, 15 Aug 2004 16:07:00 +0000 (16:07 +0000)
- お気に入り、ログ、履歴の削除に関するダイアログを
 アイコンは「!」に、[いいえ] をデフォルトに、SHIFT キーでダイアログの省略で統一。

FavoriteArrange.pas
Giko.pas

index 19bd705..114a7e8 100644 (file)
@@ -154,12 +154,14 @@ begin
                Exit;
        if FolderTreeView.Selected.IsFirstNode then
                Exit;
-       if FolderTreeView.Selected.Text = Favorite.FAVORITE_LINK_NAME then begin
-               if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
-                       Exit;
-       end else if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
-               if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FolderTreeView.Selected.Text, [rfReplaceAll] ) , DEL_TITLE, 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);
index 7848969..43b38d2 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -5446,7 +5446,8 @@ end;
 
 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
 const
-       DEL_MSG = '\83\8d\83O\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+       DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+       DEL_SAME_MSG = '\91I\91ð\82³\82ê\82Ä\82¢\82é\83X\83\8c\83b\83h\82Ì\83\8d\83O\82ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
        DEL_TITLE = '\8dí\8f\9c\8am\94F';
 var
        ThreadItem: TThreadItem;
@@ -5467,8 +5468,15 @@ begin
                end;
 
                if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
-                       if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
-                               Exit;
+                       if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
+                               if List.Count = 1 then begin
+                                       if MsgBox(Handle, StringReplace( DEL_MSG, '^0', TThreadItem( List[ 0 ] ).Title, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
+                                               Exit;
+                               end else begin
+                                       if MsgBox(Handle, DEL_SAME_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> IDYES then
+                                               Exit;
+                               end;
+                       end;
                end;
 
                for i := 0 to List.Count - 1 do begin
@@ -6781,7 +6789,7 @@ end;
 
 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
 const
-       DEL_MSG = '\83\8d\83O\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+       DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
        DEL_TITLE = '\8dí\8f\9c\8am\94F';
 var
        idx: Integer;
@@ -6790,10 +6798,11 @@ begin
        idx := BrowserTab.TabIndex;
        if idx <> -1 then begin
                if BrowserTab.Tabs.Objects[idx] <> nil then begin
-                       if GikoSys.Setting.DeleteMsg then
-                               if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
-                               Exit;
                        ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).FThread;
+                       if GikoSys.Setting.DeleteMsg then
+                               if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
+                                       if MsgBox(Handle, StringReplace( DEL_MSG, '^0', ThreadItem.Title, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
+                                               Exit;
                        DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
                        ThreadItem.DeleteLogFile;
                        if ThreadItem.ParentBoard = FActiveList then
@@ -6824,7 +6833,13 @@ begin
 end;
 
 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
+const
+       DEL_MSG = '\8di\8d\9e\82Ý\97\9a\97ð\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 (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
+               if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
+                       Exit;
        GikoSys.Setting.SelectTextList.Clear;
        SelectComboBox.Items.Clear;
        SelectComboBox.Text := '';
@@ -6834,7 +6849,13 @@ end;
 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
 var
        i: Integer;
+const
+       DEL_MSG = '\83\8c\83X\83G\83f\83B\83^\96¼\91O\97\9a\97ð\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 (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
+               if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
+                       Exit;
        GikoSys.Setting.NameList.Clear;
        for i := 0 to Screen.CustomFormCount - 1 do begin
                if TObject(Screen.CustomForms[i]) is TEditorForm then
@@ -6845,7 +6866,13 @@ end;
 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
 var
        i: Integer;
+const
+       DEL_MSG = '\83\8c\83X\83G\83f\83B\83^\83\81\81[\83\8b\97\9a\97ð\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 (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
+               if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
+                       Exit;
        GikoSys.Setting.MailList.Clear;
        for i := 0 to Screen.CustomFormCount - 1 do begin
                if TObject(Screen.CustomForms[i]) is TEditorForm then
@@ -7843,9 +7870,15 @@ begin
 end;
 
 procedure TGikoForm.ToolButton18Click(Sender: TObject);
+const
+       DEL_MSG = '\97\9a\97ð\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 FTreeType = gttHistory then begin
-        ClearHistory;
+               if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
+                       if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
+                               Exit;
+               ClearHistory;
                FHistoryList.Clear;
                TreeView.Items.Clear;
        end;
@@ -9425,12 +9458,14 @@ begin
                Exit;
        if FClickNode.IsFirstNode then
                Exit;
-       if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
-               if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
-                       Exit;
-       end else if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
-               if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
-                       Exit;
+       if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
+               if FClickNode.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', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
+                               Exit;
+               end;
        end;
 
        //FDeleteList.Add(FClickNode.Data);
@@ -9543,7 +9578,7 @@ end;
 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
        Sender: TObject);
 const
-       DEL_MSG = '\83\8d\83O\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+       DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
        DEL_TITLE = '\8dí\8f\9c\8am\94F';
 var
        ThreadItem: TThreadItem;
@@ -9558,8 +9593,9 @@ begin
 
        try
                if GikoSys.Setting.DeleteMsg then begin
-                       if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
-                               Exit;
+                       if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
+                               if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
+                                       Exit;
                end;
 
                DeleteHistory(ThreadItem);