fix(#25): do changes suggest by Rafał Mikrut (@qarmin)

This commit is contained in:
Salem Yaslem 2022-01-14 05:08:03 +03:00
parent 58585c3210
commit b365de8aa3
2 changed files with 3 additions and 18 deletions

2
Cargo.lock generated
View File

@ -132,7 +132,7 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
[[package]] [[package]]
name = "blue-recorder" name = "blue-recorder"
version = "0.1.4" version = "0.1.5"
dependencies = [ dependencies = [
"chrono", "chrono",
"gdk", "gdk",

View File

@ -33,23 +33,8 @@ fn main() {
println!("Failed to initialize GTK."); println!("Failed to initialize GTK.");
return; return;
} }
let builder: Builder; let ui_src = include_str!("../interfaces/main.ui").to_string();
let user_interface_path_abs = { let builder: Builder = Builder::from_string(ui_src.as_str());
let mut current_exec_dir = std::env::current_exe().unwrap();
current_exec_dir.pop();
current_exec_dir
}
.join(Path::new("interfaces/main.ui"));
if user_interface_path_abs.exists() {
builder = Builder::from_file(user_interface_path_abs);
} else {
builder = Builder::from_file(
std::env::var("INTERFACES_DIR")
.unwrap_or(String::from("interfaces/"))
.add("main.ui"),
);
}
// translate // translate
let mut po_path_abs = { let mut po_path_abs = {