diff options
| author | VinÃcius dos Santos Oliveira <vini.ipsmaker@gmail.com> | 2013-09-19 21:14:28 +0000 |
|---|---|---|
| committer | VinÃcius dos Santos Oliveira <vini.ipsmaker@gmail.com> | 2013-09-19 21:14:28 +0000 |
| commit | 47f1c1ee40b8185001b047c2a7bc2ca58e40ab0f (patch) | |
| tree | e681e2a4a1b6248e5c22e3ddc67e8ac68a848fcc /src | |
| parent | Removing redundant "include config.h" (diff) | |
| download | inkscape-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.cpp | 12 |
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 { |
