diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-11-03 22:48:41 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-11-03 22:48:41 +0000 |
| commit | d03614eabbc5845890843e43c4d36eab95f3a022 (patch) | |
| tree | f533bef2ca95168473750cc188941f7704965322 /src/ui/dialog/filedialog.cpp | |
| parent | enable Ctrl+Shift+U to switch Unicode mode; add explanatory (Enter to finish)... (diff) | |
| download | inkscape-d03614eabbc5845890843e43c4d36eab95f3a022.tar.gz inkscape-d03614eabbc5845890843e43c4d36eab95f3a022.zip | |
patch 1590039, whitespace
(bzr r1891)
Diffstat (limited to 'src/ui/dialog/filedialog.cpp')
| -rw-r--r-- | src/ui/dialog/filedialog.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp index 7381c660e..cf816033a 100644 --- a/src/ui/dialog/filedialog.cpp +++ b/src/ui/dialog/filedialog.cpp @@ -624,6 +624,10 @@ bool SVGPreview::set(Glib::ustring &fileName, int dialogType) gchar *fName = (gchar *)fileName.c_str(); //g_message("fname:%s\n", fName); + if (Glib::file_test(fileName, Glib::FILE_TEST_IS_DIR)) { + showNoPreview(); + return false; + } if (Glib::file_test(fileName, Glib::FILE_TEST_IS_REGULAR)) { @@ -646,23 +650,18 @@ bool SVGPreview::set(Glib::ustring &fileName, int dialogType) if ((dialogType == SVG_TYPES || dialogType == IMPORT_TYPES) && (hasSuffix(fileName, svg) || hasSuffix(fileName, svgz) ) - ) - { + ) { bool retval = setFileName(fileName); showingNoPreview = false; return retval; - } - else if (isValidImageFile(fileName)) - { + } else if (isValidImageFile(fileName)) { showImage(fileName); showingNoPreview = false; return true; - } - else - { + } else { showNoPreview(); return false; - } + } } |
