summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVinícius dos Santos Oliveira <vini.ipsmaker@gmail.com>2013-09-19 21:14:28 +0000
committerVinícius dos Santos Oliveira <vini.ipsmaker@gmail.com>2013-09-19 21:14:28 +0000
commit47f1c1ee40b8185001b047c2a7bc2ca58e40ab0f (patch)
treee681e2a4a1b6248e5c22e3ddc67e8ac68a848fcc /src
parentRemoving redundant "include config.h" (diff)
downloadinkscape-47f1c1ee40b8185001b047c2a7bc2ca58e40ab0f.tar.gz
inkscape-47f1c1ee40b8185001b047c2a7bc2ca58e40ab0f.zip
Show warning when input image of Trace Pixel Art dialog is too large.
(bzr r12546)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/pixelartdialog.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/dialog/pixelartdialog.cpp b/src/ui/dialog/pixelartdialog.cpp
index 24c1ec37f..e07cbccb5 100644
--- a/src/ui/dialog/pixelartdialog.cpp
+++ b/src/ui/dialog/pixelartdialog.cpp
@@ -19,6 +19,7 @@
#include "pixelartdialog.h"
#include <gtkmm/radiobutton.h>
#include <gtkmm/stock.h>
+#include <gtkmm/messagedialog.h>
#include <gtk/gtk.h> //for GTK_RESPONSE* types
#include <glibmm/i18n.h>
@@ -363,6 +364,17 @@ void PixelArtDialogImpl::processLibdepixelize(SPImage *img)
Glib::RefPtr<Gdk::Pixbuf> pixbuf
= Glib::wrap(img->pixbuf->getPixbufRaw(), true);
+ if ( pixbuf->get_width() > 256 || pixbuf->get_height() > 256 ) {
+ char *msg = _("Image looks too big. Process may take a while and is"
+ " wise to save your document before continue."
+ "\n\nContinue the procedure (without saving)?");
+ Gtk::MessageDialog dialog(msg, false, Gtk::MESSAGE_WARNING,
+ Gtk::BUTTONS_OK_CANCEL, true);
+
+ if ( dialog.run() != Gtk::RESPONSE_OK )
+ return;
+ }
+
if ( voronoiRadioButton.get_active() ) {
out = Tracer::Kopf2011::to_voronoi(pixbuf, options());
} else {