mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-52168: closing "Browser Error" dialog with Escape shouldn't run "Fix..." action (WEB-41095)
(cherry picked from commit 01e97788eb0037345e7560e0d7c8d2105eef5378) GitOrigin-RevId: 4146e34b9a874aa69e77595efb92504c36f37aa0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5a8c63cbfd
commit
9e8700e09b
@@ -10,8 +10,9 @@ fun showYesNoDialog(@Nls(capitalization = Nls.Capitalization.Title) title: Strin
|
||||
return Messages.showYesNoDialog(project, message, title, yesText, noText, icon) == Messages.YES
|
||||
}
|
||||
|
||||
fun showOkNoDialog(@Nls(capitalization = Nls.Capitalization.Title) title: String, message: String, project: Project?, yesText: String = Messages.OK_BUTTON, noText: String = Messages.NO_BUTTON, icon: Icon? = null): Boolean {
|
||||
return Messages.showYesNoDialog(project, message, title, yesText, noText, icon) == Messages.YES
|
||||
fun showOkNoDialog(@Nls(capitalization = Nls.Capitalization.Title) title: String, message: String, project: Project?,
|
||||
okText: String = Messages.OK_BUTTON, noText: String = Messages.NO_BUTTON, icon: Icon? = null): Boolean {
|
||||
return Messages.showYesNoDialog(project, message, title, okText, noText, icon) == Messages.YES
|
||||
}
|
||||
|
||||
@Messages.OkCancelResult
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.intellij.ide.util.PropertiesComponent
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.options.ShowSettingsUtil
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.ui.Messages
|
||||
import com.intellij.openapi.ui.showOkNoDialog
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
@@ -67,7 +68,9 @@ class BrowserLauncherImpl : BrowserLauncherAppless() {
|
||||
|
||||
override fun showError(error: String?, browser: WebBrowser?, project: Project?, title: String?, launchTask: (() -> Unit)?) {
|
||||
AppUIUtil.invokeOnEdt(Runnable {
|
||||
if (!showOkNoDialog(title ?: IdeBundle.message("browser.error"), error ?: "Unknown error", project, noText = IdeBundle.message("button.fix"))) {
|
||||
if (showOkNoDialog(title ?: IdeBundle.message("browser.error"), error ?: "Unknown error", project,
|
||||
okText = IdeBundle.message("button.fix"),
|
||||
noText = Messages.OK_BUTTON)) {
|
||||
val browserSettings = BrowserSettings()
|
||||
if (ShowSettingsUtil.getInstance().editConfigurable(project, browserSettings, browser?.let { Runnable { browserSettings.selectBrowser(it) } })) {
|
||||
launchTask?.invoke()
|
||||
|
||||
Reference in New Issue
Block a user