diff options
| author | Martin Owens <doctormo@gmail.com> | 2014-03-27 01:33:44 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2014-03-27 01:33:44 +0000 |
| commit | 5a4fb2325f60d292b47330f540b26a3279341c90 (patch) | |
| tree | d2aa7967be25450b83e625025366c618101ae49f /src/ui/widget/imageicon.cpp | |
| parent | The Polar Arrange Tab of the Arrange Dialog now hides the parametric (diff) | |
| parent | Remove Snap menu item and improve grid menu item text (diff) | |
| download | inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.tar.gz inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.zip | |
Commit a merge to trunk, with probabal errors
(bzr r11073.1.36)
Diffstat (limited to 'src/ui/widget/imageicon.cpp')
| -rw-r--r-- | src/ui/widget/imageicon.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/widget/imageicon.cpp b/src/ui/widget/imageicon.cpp index 77015bdd2..cf41a16a4 100644 --- a/src/ui/widget/imageicon.cpp +++ b/src/ui/widget/imageicon.cpp @@ -19,6 +19,8 @@ #include "svg-view-widget.h" #include "document.h" #include "inkscape.h" +#include <glibmm/convert.h> +#include <glibmm/fileutils.h> namespace Inkscape @@ -115,7 +117,7 @@ bool ImageIcon::showSvgDocument(const SPDocument *docArg) viewerGtkmm->show(); pack_start(*viewerGtkmm, TRUE, TRUE, 0); - //GtkWidget *vbox = (GtkWidget *)gobj(); + //GtkWidget *vbox = GTK_WIDGET(gobj()); //gtk_box_pack_start(GTK_BOX(vbox), viewerGtk, TRUE, TRUE, 0); return true; @@ -304,7 +306,7 @@ void ImageIcon::showBrokenImage(const Glib::ustring &errorMessage) "</svg>"; //Fill in the template - char *cErrorMessage = (char *)errorMessage.c_str(); + char *cErrorMessage = const_cast<char *>(errorMessage.c_str()); gchar *xmlBuffer = g_strdup_printf(xformat, cErrorMessage); //g_message("%s\n", xmlBuffer); @@ -373,14 +375,14 @@ bool ImageIcon::show(const Glib::ustring &fileName) if (!Glib::file_test(fileName, Glib::FILE_TEST_EXISTS)) return false; - gchar *fName = (gchar *)fileName.c_str(); + gchar *fName = const_cast<gchar *>(fileName.c_str()); //g_message("fname:%s\n", fName); if (Glib::file_test(fileName, Glib::FILE_TEST_IS_REGULAR)) { struct stat info; - if (stat(fName, &info)) + if (g_file_test (fName, G_FILE_TEST_EXISTS) && stat(fName, &info)) { Glib::ustring err = "cannot get file info"; showBrokenImage(err); |
