Skip to content

Commit

Permalink
Simplify file format code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Photon89 committed Aug 20, 2024
1 parent 6305e69 commit b044321
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions bin/shutter
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit b044321

Please sign in to comment.