back to working 1.4
This commit is contained in:
parent
1d13e429ff
commit
85b2b587c1
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
|
@ -32,6 +32,11 @@ jobs:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
|
- name: Install musl-gcc
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y musl-tools
|
||||||
|
|
||||||
- name: Install target
|
- name: Install target
|
||||||
run: rustup target add ${{ matrix.target }}
|
run: rustup target add ${{ matrix.target }}
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,13 @@
|
||||||
name = "calcifer"
|
name = "calcifer"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
#build = "build/build.rs"
|
build = "build/build.rs"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
eframe = "0.25.0"
|
eframe = "0.25.0"
|
||||||
|
tinyfiledialogs = "3.0"
|
||||||
egui_extras = "0.25.0"
|
egui_extras = "0.25.0"
|
||||||
image = "0.24.8"
|
image = "0.24.8"
|
||||||
serde = { version = "1.0.195", features = ["derive"] }
|
serde = { version = "1.0.195", features = ["derive"] }
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"categories":[{"name":"to do","content":[{"name":"update workflow .yml","description":"make a workflow compiling the calcifer and put the linux in calcifer-{version}\nand the windows in calcifer_windows_{version}\n\nupdate nix\nupdate jiji","id":5}]},{"name":"in progress","content":[{"name":"export copy paste fix","description":"// Hello there","id":1}]},{"name":"done","content":[{"name":"move .project file","description":"// Hello there","id":4},{"name":"move config","description":"config from .calcifer/save.json\nto .config/calcifer/state.json","id":1},{"name":"add id to textarea per tab","description":"to improve undo, make each code area of each tab have a unique id (no more undo into another tab)","id":1},{"name":"file tree id ?","description":"// Hello there","id":1},{"name":"open dir in tree ?","description":"// Hello there","id":2},{"name":"fix tab title","description":"// Hello there","id":2}]},{"name":"+","content":[]}]}
|
{"categories":[{"name":"to do","content":[{"name":"update workflow .yml","description":"make a workflow compiling the calcifer and put the linux in calcifer-{version}\nand the windows in calcifer_windows_{version}\n\nupdate nix\nupdate jiji","id":5},{"name":"repair build.rs","description":"// Hello there","id":1},{"name":"repair tinyfiledialog","description":"// Hello there","id":2}]},{"name":"in progress","content":[{"name":"export copy paste fix","description":"// Hello there","id":1}]},{"name":"done","content":[{"name":"move .project file","description":"// Hello there","id":4},{"name":"move config","description":"config from .calcifer/save.json\nto .config/calcifer/state.json","id":1},{"name":"add id to textarea per tab","description":"to improve undo, make each code area of each tab have a unique id (no more undo into another tab)","id":1},{"name":"file tree id ?","description":"// Hello there","id":1},{"name":"open dir in tree ?","description":"// Hello there","id":2},{"name":"fix tab title","description":"// Hello there","id":2}]},{"name":"+","content":[]}]}
|
|
@ -51,16 +51,15 @@ impl Calcifer {
|
||||||
} else {
|
} else {
|
||||||
self.tabs[self.selected_tab].path.to_string_lossy()
|
self.tabs[self.selected_tab].path.to_string_lossy()
|
||||||
};
|
};
|
||||||
println!("app : tried to open dialog at {}", save_path);
|
if let Some(path_string) = tinyfiledialogs::save_file_dialog("Save as", &save_path)
|
||||||
// if let Some(path_string) = tinyfiledialogs::save_file_dialog("Save as", &save_path)
|
{
|
||||||
// {
|
let path = PathBuf::from(path_string);
|
||||||
// let path = PathBuf::from(path_string);
|
if let Err(err) = fs::write(&path, &self.tabs[self.selected_tab].code) {
|
||||||
// if let Err(err) = fs::write(&path, &self.tabs[self.selected_tab].code) {
|
eprintln!("Error writing file: {}", err);
|
||||||
// eprintln!("Error writing file: {}", err);
|
return None;
|
||||||
// return None;
|
}
|
||||||
// }
|
return Some(path);
|
||||||
// return Some(path);
|
}
|
||||||
// }
|
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,11 +22,10 @@ impl Calcifer {
|
||||||
.show(ctx, |ui| {
|
.show(ctx, |ui| {
|
||||||
ui.vertical(|ui| {
|
ui.vertical(|ui| {
|
||||||
if ui.add(egui::Button::new("📁")).clicked() {
|
if ui.add(egui::Button::new("📁")).clicked() {
|
||||||
println!("ui : open file, wip");
|
if let Some(path_string) = tinyfiledialogs::open_file_dialog("Open File", &self.home.to_string_lossy(), None)
|
||||||
// if let Some(path_string) = tinyfiledialogs::open_file_dialog("Open File", &self.home.to_string_lossy(), None)
|
{
|
||||||
// {
|
self.open_file(Some(&Path::new(&path_string)));
|
||||||
// self.open_file(Some(&Path::new(&path_string)));
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
ui.separator();
|
ui.separator();
|
||||||
self.tree_visible = self.toggle(ui, self.tree_visible, "📦");
|
self.tree_visible = self.toggle(ui, self.tree_visible, "📦");
|
||||||
|
|
Loading…
Reference in a new issue