Try to implement slash bar functionality - part 1

This commit is contained in:
jochen@g14
2024-03-25 01:54:05 +01:00
parent 1366422d96
commit cdc9ca7b58
33 changed files with 887 additions and 367 deletions

View File

@@ -50,6 +50,10 @@ impl StdConfig for Config {
}
}
fn file_name(&self) -> String {
CFG_FILE_NAME.to_owned()
}
fn config_dir() -> std::path::PathBuf {
let mut path = dirs::config_dir().unwrap_or_default();
@@ -62,10 +66,6 @@ impl StdConfig for Config {
}
path
}
fn file_name(&self) -> String {
CFG_FILE_NAME.to_owned()
}
}
impl StdConfigLoad1<Config461> for Config {}

View File

@@ -35,14 +35,10 @@ fn main() -> Result<()> {
let is_rog_ally = prod_family == "RC71L";
// tmp-dir must live to the end of program life
let _tmp_dir = match tempfile::Builder::new()
let _tmp_dir = tempfile::Builder::new()
.prefix("rog-gui")
.rand_bytes(0)
.tempdir()
{
Ok(tmp) => tmp,
Err(_) => on_tmp_dir_exists().unwrap(),
};
.tempdir().unwrap_or_else(|_| on_tmp_dir_exists().unwrap());
let args: Vec<String> = args().skip(1).collect();
@@ -76,13 +72,10 @@ fn main() -> Result<()> {
})
.unwrap();
let supported_properties = match dbus.proxies().platform().supported_properties() {
Ok(s) => s,
Err(_e) => {
// TODO: show an error window
Vec::default()
}
};
let supported_properties = dbus.proxies().platform().supported_properties().unwrap_or_else(|_e| {
// TODO: show an error window
Vec::default()
});
// Startup
let mut config = Config::new().load();