From: yoffy Date: Sun, 15 Aug 2004 16:07:00 +0000 (+0000) Subject: - 履歴の削除に同意を求めるようになった。 X-Git-Tag: v1_64_1_820~975 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5740caab25a3b0ec7d0a998f49f4e55f541ae649;p=gikonavigoeson%2Fgikonavi.git - 履歴の削除に同意を求めるようになった。 - お気に入り、ログ、履歴の削除に関するダイアログを  アイコンは「!」に、[いいえ] をデフォルトに、SHIFT キーでダイアログの省略で統一。 --- diff --git a/FavoriteArrange.pas b/FavoriteArrange.pas index 19bd705..114a7e8 100644 --- a/FavoriteArrange.pas +++ b/FavoriteArrange.pas @@ -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); diff --git a/Giko.pas b/Giko.pas index 7848969..43b38d2 100644 --- a/Giko.pas +++ b/Giko.pas @@ -5446,7 +5446,8 @@ end; procedure TGikoForm.LogDeleteActionExecute(Sender: TObject); const - DEL_MSG = 'ƒƒOƒtƒ@ƒCƒ‹‚ðíœ‚µ‚Ü‚·B‚æ‚낵‚¢‚Å‚·‚©H'; + DEL_MSG = 'g^0h‚̃ƒO‚ð‚ðíœ‚µ‚Ü‚·B‚æ‚낵‚¢‚Å‚·‚©H'; + DEL_SAME_MSG = '‘I‘ð‚³‚ê‚Ä‚¢‚éƒXƒŒƒbƒh‚̃ƒO‚ð‚ðíœ‚µ‚Ü‚·B‚æ‚낵‚¢‚Å‚·‚©H'; DEL_TITLE = 'íœŠm”F'; 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 = 'ƒƒOƒtƒ@ƒCƒ‹‚ðíœ‚µ‚Ü‚·B‚æ‚낵‚¢‚Å‚·‚©H'; + DEL_MSG = 'g^0h‚̃ƒO‚ð‚ðíœ‚µ‚Ü‚·B‚æ‚낵‚¢‚Å‚·‚©H'; DEL_TITLE = 'íœŠm”F'; 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 = 'iž‚Ý—š—ð‚ðíœ‚µ‚Ü‚·B‚æ‚낵‚¢‚Å‚·‚©H'; + DEL_TITLE = 'íœŠm”F'; 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 = 'ƒŒƒXƒGƒfƒBƒ^–¼‘O—š—ð‚ðíœ‚µ‚Ü‚·B‚æ‚낵‚¢‚Å‚·‚©H'; + DEL_TITLE = 'íœŠm”F'; 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 = 'ƒŒƒXƒGƒfƒBƒ^ƒ[ƒ‹—š—ð‚ðíœ‚µ‚Ü‚·B‚æ‚낵‚¢‚Å‚·‚©H'; + DEL_TITLE = 'íœŠm”F'; 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 = '—š—ð‚ðíœ‚µ‚Ü‚·B‚æ‚낵‚¢‚Å‚·‚©H'; + DEL_TITLE = 'íœŠm”F'; 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 = 'ƒƒOƒtƒ@ƒCƒ‹‚ðíœ‚µ‚Ü‚·B‚æ‚낵‚¢‚Å‚·‚©H'; + DEL_MSG = 'g^0h‚̃ƒO‚ð‚ðíœ‚µ‚Ü‚·B‚æ‚낵‚¢‚Å‚·‚©H'; DEL_TITLE = 'íœŠm”F'; 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);