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