mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
replace path entities from filename
This commit is contained in:
parent
6e7a1d51e5
commit
80684e0316
1 changed files with 5 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ use gtk::{
|
||||||
prelude::{ButtonExt, FileExt, OutputStreamExtManual, WidgetExt},
|
prelude::{ButtonExt, FileExt, OutputStreamExtManual, WidgetExt},
|
||||||
Button, FileDialog, FileFilter, Window,
|
Button, FileDialog, FileFilter, Window,
|
||||||
};
|
};
|
||||||
use std::rc::Rc;
|
use std::{path::MAIN_SEPARATOR, rc::Rc};
|
||||||
|
|
||||||
const LABEL: &str = "Export";
|
const LABEL: &str = "Export";
|
||||||
const TOOLTIP_TEXT: &str = "Export selected identity to file";
|
const TOOLTIP_TEXT: &str = "Export selected identity to file";
|
||||||
|
|
@ -62,7 +62,10 @@ impl Save {
|
||||||
FileDialog::builder()
|
FileDialog::builder()
|
||||||
.default_filter(&filter_pem)
|
.default_filter(&filter_pem)
|
||||||
.filters(&filters)
|
.filters(&filters)
|
||||||
.initial_name(format!("{}.pem", certificate.name))
|
.initial_name(format!(
|
||||||
|
"{}.pem",
|
||||||
|
certificate.name.replace(MAIN_SEPARATOR, "-")
|
||||||
|
))
|
||||||
.build()
|
.build()
|
||||||
.save(Window::NONE, Cancellable::NONE, {
|
.save(Window::NONE, Cancellable::NONE, {
|
||||||
let button = button.clone();
|
let button = button.clone();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue