mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2024-11-23 17:13:11 +03:00
fix(#25): do changes suggest by Rafał Mikrut (@qarmin)
This commit is contained in:
parent
58585c3210
commit
b365de8aa3
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -132,7 +132,7 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
|
||||
|
||||
[[package]]
|
||||
name = "blue-recorder"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"gdk",
|
||||
|
19
src/main.rs
19
src/main.rs
@ -33,23 +33,8 @@ fn main() {
|
||||
println!("Failed to initialize GTK.");
|
||||
return;
|
||||
}
|
||||
let builder: Builder;
|
||||
let user_interface_path_abs = {
|
||||
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"),
|
||||
);
|
||||
}
|
||||
let ui_src = include_str!("../interfaces/main.ui").to_string();
|
||||
let builder: Builder = Builder::from_string(ui_src.as_str());
|
||||
|
||||
// translate
|
||||
let mut po_path_abs = {
|
||||
|
Loading…
Reference in New Issue
Block a user