From b044321bc286fd2ccb934797e871c61284e12b7f Mon Sep 17 00:00:00 2001 From: Photon89 Date: Tue, 20 Aug 2024 09:39:58 +0200 Subject: [PATCH] Simplify file format code a bit --- bin/shutter | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/bin/shutter b/bin/shutter index b890c2f1..c3f93085 100755 --- a/bin/shutter +++ b/bin/shutter @@ -9719,15 +9719,11 @@ sub STARTUP { #Fix Bug #966159 if (defined $rfilename) { my ($short, $folder, $ext) = fileparse($rfilename, qr/\.[^.]*/); - if ($mime eq "image/jpeg" && $ext eq ".jpg") { - $combobox_save_as_type->set_active($counter); - } elsif ($mime eq "image/png" && $ext eq ".png") { - $combobox_save_as_type->set_active($counter); - } elsif ($mime eq "image/bmp" && $ext eq ".bmp") { - $combobox_save_as_type->set_active($counter); - } elsif ($mime eq "image/webp" && $ext eq ".webp") { - $combobox_save_as_type->set_active($counter); - } elsif ($mime eq "image/avif" && $ext eq ".avif") { + if ($mime eq "image/jpeg" && $ext eq ".jpg" + || $mime eq "image/png" && $ext eq ".png" + || $mime eq "image/bmp" && $ext eq ".bmp" + || $mime eq "image/webp" && $ext eq ".webp" + || $mime eq "image/avif" && $ext eq ".avif") { $combobox_save_as_type->set_active($counter); } }