chore: use setVisible instead of show
This commit is contained in:
parent
5cc650921b
commit
475717b6b4
|
@ -79,7 +79,7 @@ object GtkMenubar {
|
|||
@JvmStatic
|
||||
fun generateNewMenu(app: Application) {
|
||||
newMenu!!.clear()
|
||||
newMenu!!.button("new") { NewInstanceWindow(app).show() }
|
||||
newMenu!!.button("new") { NewInstanceWindow(app).visible = true }
|
||||
newMenu!!.button("file") {
|
||||
val dialog = FileChooserNative(
|
||||
I18n["menu.file.new.file"],
|
||||
|
@ -202,11 +202,11 @@ object GtkMenubar {
|
|||
@JvmStatic
|
||||
fun generateAccountsMenu(app: Application) {
|
||||
accountsMenu!!.clear()
|
||||
accountsMenu!!.button("new") { MicrosoftLoginDialog(GtkEnvBackend.dialogParent).show() }
|
||||
accountsMenu!!.button("new") { MicrosoftLoginDialog(GtkEnvBackend.dialogParent).visible = true }
|
||||
accountsMenu!!.button("manage") {
|
||||
val window = LauncherSettingsWindow(app)
|
||||
window.activePage = "settings.accounts"
|
||||
window.show()
|
||||
window.visible = true
|
||||
}
|
||||
val accounts: MutableList<MicrosoftAccount?> = ArrayList(AccountManager.getAccounts())
|
||||
accounts.add(null)
|
||||
|
|
|
@ -25,7 +25,7 @@ class AboutWindow : AboutDialog() {
|
|||
companion object {
|
||||
@JvmStatic
|
||||
fun createAndShow() {
|
||||
AboutWindow().show()
|
||||
AboutWindow().visible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ class MainWindow(app: Application) : ApplicationWindow(app) {
|
|||
|
||||
val uiMenu = MenuBuilder(app, Menu(), "hamburger")
|
||||
uiMenu.button("support") { Utils.openWebBrowser(URI("https://git.frohnmeyer-wds.de/JfMods/Inceptum/issues")) }
|
||||
uiMenu.button("preferences") { LauncherSettingsWindow(app).show() }
|
||||
uiMenu.button("preferences") { LauncherSettingsWindow(app).visible = true }
|
||||
uiMenu.button("about") { AboutWindow.createAndShow() }
|
||||
val menuButton = MenuButton()
|
||||
menuButton.iconName = "open-menu-symbolic"
|
||||
|
|
|
@ -95,7 +95,7 @@ class ProcessStateWatcherDialog(
|
|||
executor: ThrowingRunnable<*>
|
||||
): ProcessStateWatcherDialog {
|
||||
val dialog = ProcessStateWatcherDialog(parent, title, errorMessage, state, executor)
|
||||
dialog.show()
|
||||
dialog.visible = true
|
||||
return dialog
|
||||
}
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ class GeneralTab(window: InstanceSettingsWindow) : SectionedSettingsTab<Instance
|
|||
else -> {}
|
||||
}
|
||||
}
|
||||
dialog.show()
|
||||
dialog.visible = true
|
||||
}
|
||||
}
|
||||
row("instance.directory", "instance.directory.subtitle") {
|
||||
|
|
Loading…
Reference in New Issue