Code

Ctrl+click in pen/pencil tool: Created dots are now selected; Alt is used for randomn...
[inkscape.git] / src / ui / dialog / filedialogimpl-gtkmm.cpp
index 6ad7179383abfd59df45d4311be59953a7c42b26..a1773d39a317c36775d91815e5fe0141a5e62cf5 100644 (file)
@@ -205,7 +205,26 @@ void SVGPreview::showImage(Glib::ustring &theFileName)
     gint previewHeight = 600;
 
     //Get some image info. Smart pointer does not need to be deleted
-    Glib::RefPtr<Gdk::Pixbuf> img = Gdk::Pixbuf::create_from_file(fileName);
+    Glib::RefPtr<Gdk::Pixbuf> img(NULL);
+    try {
+        img = Gdk::Pixbuf::create_from_file(fileName);
+    }
+    catch (const Glib::FileError & e)
+    {
+        g_message("caught Glib::FileError in SVGPreview::showImage");
+        return;
+    }
+    catch (const Gdk::PixbufError & e)
+    {
+        g_message("Gdk::PixbufError in SVGPreview::showImage");
+        return;
+    }
+    catch (...)
+    {
+        g_message("Caught ... in SVGPreview::showImage");
+        return;
+    }
+
     gint imgWidth  = img->get_width();
     gint imgHeight = img->get_height();
 
@@ -874,11 +893,11 @@ std::vector<Glib::ustring>FileOpenDialogImplGtk::getFilenames()
 /**
  * Constructor
  */
-FileSaveDialogImplGtk::FileSaveDialogImplGtk(Gtk::Window &parentWindow,
-            const Glib::ustring &dir,
-            FileDialogType fileTypes,
-            const Glib::ustring &title,
-            const Glib::ustring &default_key) :
+FileSaveDialogImplGtk::FileSaveDialogImplGtk( Gtk::Window &parentWindow,
+                                              const Glib::ustring &dir,
+                                              FileDialogType fileTypes,
+                                              const Glib::ustring &title,
+                                              const Glib::ustring &/*default_key*/ ) :
     FileDialogBaseGtk(parentWindow, title, Gtk::FILE_CHOOSER_ACTION_SAVE, fileTypes, "dialogs.save_as")
 {
     /* One file at a time */
@@ -1350,11 +1369,11 @@ void FileExportDialogImpl::createFileTypeMenu()
 /**
  * Constructor
  */
-FileExportDialogImpl::FileExportDialogImpl(Gtk::Window& parentWindow,
-            const Glib::ustring &dir,
-            FileDialogType fileTypes,
-            const Glib::ustring &title,
-            const Glib::ustring &default_key) :
+FileExportDialogImpl::FileExportDialogImpl( Gtk::Window& parentWindow,
+                                            const Glib::ustring &dir,
+                                            FileDialogType fileTypes,
+                                            const Glib::ustring &title,
+                                            const Glib::ustring &/*default_key*/ ) :
             FileDialogBaseGtk(parentWindow, title, Gtk::FILE_CHOOSER_ACTION_SAVE, fileTypes, "dialogs.export"),
             sourceX0Spinner("X0",         _("Left edge of source")),
             sourceY0Spinner("Y0",         _("Top edge of source")),