test without file dialog
This commit is contained in:
parent
89fa165f49
commit
7096cae676
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
|
@ -32,18 +32,9 @@ 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 }}
|
||||||
|
|
||||||
- name: Install dependencies for tinyfiledialogs
|
|
||||||
run: |
|
|
||||||
sudo apt-get install -y libx11-dev libglib2.0-dev
|
|
||||||
|
|
||||||
- name: Check Rust target installation
|
- name: Check Rust target installation
|
||||||
run: rustup target list --installed
|
run: rustup target list --installed
|
||||||
|
|
||||||
|
@ -52,16 +43,6 @@ jobs:
|
||||||
echo "Compiling for target: ${{ matrix.target }}"
|
echo "Compiling for target: ${{ matrix.target }}"
|
||||||
cargo build --release --target ${{ matrix.target }}
|
cargo build --release --target ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Debugging - Check compiled binary
|
|
||||||
run: |
|
|
||||||
echo "Listing the compiled files:"
|
|
||||||
ls -lh target/${{ matrix.target }}/release/
|
|
||||||
|
|
||||||
- name: Run the app (for testing purposes)
|
|
||||||
run: |
|
|
||||||
echo "Running the compiled app for testing"
|
|
||||||
target/${{ matrix.target }}/release/calcifer --help || true
|
|
||||||
|
|
||||||
- name: Create tarball
|
- name: Create tarball
|
||||||
run: |
|
run: |
|
||||||
release_tag=${{ github.event.release.tag_name }}
|
release_tag=${{ github.event.release.tag_name }}
|
||||||
|
|
|
@ -51,16 +51,16 @@ impl Calcifer {
|
||||||
} else {
|
} else {
|
||||||
self.tabs[self.selected_tab].path.to_string_lossy()
|
self.tabs[self.selected_tab].path.to_string_lossy()
|
||||||
};
|
};
|
||||||
println!("app : open dialog at {}", save_path);
|
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,10 +22,11 @@ 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() {
|
||||||
if let Some(path_string) = tinyfiledialogs::open_file_dialog("Open File", &self.home.to_string_lossy(), None)
|
println!("ui : open file, wip");
|
||||||
{
|
// 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