-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Desktop: - Set AWT window class on startup - Rename settings 'server' category to 'desktop' - Add launch command option - Fix settings text field reset not applying to UI
- Loading branch information
1 parent
a350af0
commit 6aafd2d
Showing
24 changed files
with
141 additions
and
93 deletions.
There are no files selected for viewing
Submodule ComposeKit
updated
from 1a4191 to 50ea69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
.../src/commonMain/kotlin/com/toasterofbread/spmp/model/settings/category/DesktopSettings.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.toasterofbread.spmp.model.settings.category | ||
|
||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.outlined.DesktopWindows | ||
import com.toasterofbread.spmp.model.settings.SettingsKey | ||
import com.toasterofbread.spmp.resources.getString | ||
import com.toasterofbread.spmp.ui.layout.apppage.settingspage.category.getDesktopCategoryItems | ||
|
||
data object DesktopSettings: SettingsCategory("desktop") { | ||
override val keys: List<SettingsKey> = Key.values().toList() | ||
|
||
override fun getPage(): Page? = | ||
Page( | ||
getString("s_cat_desktop"), | ||
getString("s_cat_desc_desktop"), | ||
{ getDesktopCategoryItems() } | ||
) { Icons.Outlined.DesktopWindows } | ||
|
||
enum class Key: SettingsKey { | ||
STARTUP_COMMAND, | ||
|
||
SERVER_IP_ADDRESS, | ||
SERVER_PORT, | ||
SERVER_LOCAL_COMMAND, | ||
SERVER_KILL_CHILD_ON_EXIT; | ||
|
||
override val category: SettingsCategory get() = DesktopSettings | ||
|
||
@Suppress("UNCHECKED_CAST") | ||
override fun <T> getDefaultValue(): T = | ||
when (this) { | ||
STARTUP_COMMAND -> "" | ||
SERVER_IP_ADDRESS -> "127.0.0.1" | ||
SERVER_PORT -> 3973 | ||
SERVER_LOCAL_COMMAND -> "spms" | ||
SERVER_KILL_CHILD_ON_EXIT -> true | ||
} as T | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
...d/src/commonMain/kotlin/com/toasterofbread/spmp/model/settings/category/ServerSettings.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.