use const api for None values

This commit is contained in:
yggverse 2024-12-13 00:39:40 +02:00
parent bcf8dcb83a
commit 5e4f442966
3 changed files with 7 additions and 7 deletions

View File

@ -80,8 +80,8 @@ impl Browser {
let profile = profile.clone(); let profile = profile.clone();
move || { move || {
FileLauncher::new(Some(&File::for_path(profile.config_path.as_path()))).launch( FileLauncher::new(Some(&File::for_path(profile.config_path.as_path()))).launch(
None::<&gtk::Window>, gtk::Window::NONE,
None::<&Cancellable>, Cancellable::NONE,
|result| { |result| {
if let Err(error) = result { if let Err(error) = result {
println!("{error}") println!("{error}")

View File

@ -60,7 +60,7 @@ impl File {
.filters(&filters) .filters(&filters)
.default_filter(&filter_pem) .default_filter(&filter_pem)
.build() .build()
.open(None::<&Window>, None::<&Cancellable>, { .open(Window::NONE, Cancellable::NONE, {
let widget_action = widget_action.clone(); let widget_action = widget_action.clone();
let button = button.clone(); let button = button.clone();
let pem = pem.clone(); let pem = pem.clone();

View File

@ -350,8 +350,8 @@ impl Reader {
} }
// Scheme not supported, delegate // Scheme not supported, delegate
_ => UriLauncher::new(&uri.to_str()).launch( _ => UriLauncher::new(&uri.to_str()).launch(
None::<&Window>, Window::NONE,
None::<&Cancellable>, Cancellable::NONE,
|result| { |result| {
if let Err(error) = result { if let Err(error) = result {
println!("{error}") println!("{error}")
@ -394,8 +394,8 @@ impl Reader {
} }
// Scheme not supported, delegate // Scheme not supported, delegate
_ => UriLauncher::new(&uri.to_str()).launch( _ => UriLauncher::new(&uri.to_str()).launch(
None::<&Window>, Window::NONE,
None::<&Cancellable>, Cancellable::NONE,
|result| { |result| {
if let Err(e) = result { if let Err(e) = result {
println!("{e}") println!("{e}")