mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
replace path entities from filename
This commit is contained in:
parent
6e7a1d51e5
commit
80684e0316
@ -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…
x
Reference in New Issue
Block a user