diff --git a/platform/platform-api/src/com/intellij/openapi/ui/MessageUtil.kt b/platform/platform-api/src/com/intellij/openapi/ui/MessageUtil.kt index 5f3267669f62..63407a1488e9 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/MessageUtil.kt +++ b/platform/platform-api/src/com/intellij/openapi/ui/MessageUtil.kt @@ -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 diff --git a/xml/impl/src/com/intellij/ide/browsers/BrowserLauncherImpl.kt b/xml/impl/src/com/intellij/ide/browsers/BrowserLauncherImpl.kt index df160534690b..96e861852a4f 100644 --- a/xml/impl/src/com/intellij/ide/browsers/BrowserLauncherImpl.kt +++ b/xml/impl/src/com/intellij/ide/browsers/BrowserLauncherImpl.kt @@ -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()