mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 19:35:00 -04:00
eros: minosoft updating: log progress
This commit is contained in:
parent
c2f3a7c00b
commit
e6fe8135c0
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2022 Moritz Zwerger
|
||||
* Copyright (C) 2020-2024 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
package de.bixilon.minosoft.commands.stack.print
|
||||
|
||||
interface PrintTarget {
|
||||
fun interface PrintTarget {
|
||||
|
||||
fun print(message: Any)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2023 Moritz Zwerger
|
||||
* Copyright (C) 2020-2024 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
@ -24,6 +24,9 @@ import de.bixilon.minosoft.gui.eros.util.JavaFXUtil.text
|
||||
import de.bixilon.minosoft.updater.MinosoftUpdate
|
||||
import de.bixilon.minosoft.updater.MinosoftUpdater
|
||||
import de.bixilon.minosoft.updater.UpdateProgress
|
||||
import de.bixilon.minosoft.util.logging.Log
|
||||
import de.bixilon.minosoft.util.logging.LogLevels
|
||||
import de.bixilon.minosoft.util.logging.LogMessageType
|
||||
import de.bixilon.minosoft.util.system.SystemUtil
|
||||
import javafx.fxml.FXML
|
||||
import javafx.scene.control.Button
|
||||
@ -87,7 +90,7 @@ class UpdateAvailableDialog(
|
||||
|
||||
@FXML
|
||||
fun update() {
|
||||
val progress = UpdateProgress()
|
||||
val progress = UpdateProgress(log = { Log.log(LogMessageType.OTHER, LogLevels.INFO, it) })
|
||||
MinosoftUpdater.download(update, progress)
|
||||
// TODO: Show progress
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2023 Moritz Zwerger
|
||||
* Copyright (C) 2020-2024 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
@ -183,6 +183,11 @@ object Log {
|
||||
log(type, level = level, additionalPrefix = null, messageBuilder = messageBuilder)
|
||||
}
|
||||
|
||||
inline fun log(type: LogMessageType, level: LogLevels, message: Any?) {
|
||||
log(type, level, null, message)
|
||||
}
|
||||
|
||||
|
||||
@JvmStatic
|
||||
fun log(type: LogMessageType, messageBuilder: () -> Any?) {
|
||||
contract {
|
||||
|
Loading…
x
Reference in New Issue
Block a user