summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e950f1f)
raw | patch | inline | side by side (parent: e950f1f)
author | joncruz <joncruz@users.sourceforge.net> | |
Sat, 22 Mar 2008 08:30:18 +0000 (08:30 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sat, 22 Mar 2008 08:30:18 +0000 (08:30 +0000) |
src/dialogs/swatches.cpp | patch | blob | history |
index 68e6fff0d3f3e5324b4d59e39681b9a8b91d6a64..ea89be30f702b1e7ddb5f0aeb5003fc158c8ebfc 100644 (file)
--- a/src/dialogs/swatches.cpp
+++ b/src/dialogs/swatches.cpp
while ( *ptr == ' ' || *ptr == '\t' ) {
ptr++;
}
- if ( *ptr == 0 ) {
+ if ( (*ptr == 0) || (*ptr == '\r') || (*ptr == '\n') ) {
// blank line. skip it.
} else if ( '0' <= *ptr && *ptr <= '9' ) {
// should be an entry link
while (!sources.empty()) {
gchar *dirname = sources.front();
- if ( Inkscape::IO::file_test( dirname, (GFileTest)(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) ) ) {
+ if ( Inkscape::IO::file_test( dirname, G_FILE_TEST_EXISTS )
+ && Inkscape::IO::file_test( dirname, G_FILE_TEST_IS_DIR )) {
GError *err = 0;
GDir *directory = g_dir_open(dirname, 0, &err);
if (!directory) {
gchar* lower = g_ascii_strdown( filename, -1 );
// if ( g_str_has_suffix(lower, ".gpl") ) {
gchar* full = g_build_filename(dirname, filename, NULL);
- if ( !Inkscape::IO::file_test( full, (GFileTest)(G_FILE_TEST_IS_DIR ) ) ) {
+ if ( !Inkscape::IO::file_test( full, G_FILE_TEST_IS_DIR ) ) {
_loadPaletteFile(full);
}
g_free(full);