Commit 0b63041f authored by Jan Möbius's avatar Jan Möbius

Support jpg for other snapshots

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5693 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c81e17a8
......@@ -200,12 +200,15 @@ void CoreWidget::slotSnapshot() {
if (fi.completeSuffix() == "ppm")
format="ppmraw";
if (fi.completeSuffix() == "jpg")
format="jpg";
suggest += format;
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setDefaultSuffix("png");
dialog.setNameFilter("Images (*.png *.ppm)");
dialog.setNameFilter("Images (*.png *.ppm *.jpg)");
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setConfirmOverwrite(true);
dialog.setDirectory( fi.path() );
......@@ -238,12 +241,15 @@ void CoreWidget::applicationSnapshotDialog() {
if (fi.completeSuffix() == "ppm")
format="ppmraw";
if (fi.completeSuffix() == "jpg")
format="jpg";
suggest += format;
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setDefaultSuffix("png");
dialog.setNameFilter("Images (*.png *.ppm)");
dialog.setNameFilter("Images (*.png *.ppm *.jpg)");
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setConfirmOverwrite(true);
dialog.setDirectory( fi.path() );
......@@ -305,12 +311,15 @@ void CoreWidget::viewerSnapshotDialog() {
if (fi.completeSuffix() == "ppm")
format="ppmraw";
if (fi.completeSuffix() == "jpg")
format="jpg";
suggest += format;
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setDefaultSuffix("png");
dialog.setNameFilter("Images (*.png *.ppm)");
dialog.setNameFilter("Images (*.png *.ppm *.jpg)");
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setConfirmOverwrite(true);
dialog.setDirectory( fi.path() );
......@@ -408,6 +417,9 @@ void CoreWidget::viewerSnapshot() {
if (fi.completeSuffix() == "ppm")
format="ppmraw";
if (fi.completeSuffix() == "jpg")
format="jpg";
suggest += format;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment