summaryrefslogtreecommitdiff
path: root/src/setup.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-05-10 14:33:13 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-05-10 14:33:13 +0200
commitd22dae58ba7e18ffdcac5f13ab9675eb1776c692 (patch)
tree169e17b321523ec8b29aa602a0ebf90ec2fb8136 /src/setup.c
parent8a722d04938583dc3620de05fd52f0baecce9fbb (diff)
downloadcataract-d22dae58ba7e18ffdcac5f13ab9675eb1776c692.tar.xz
Remove #ifdef __DEBUG_ALL__
Diffstat (limited to 'src/setup.c')
-rw-r--r--src/setup.c59
1 files changed, 11 insertions, 48 deletions
diff --git a/src/setup.c b/src/setup.c
index 1081fa4..7f7caf9 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -164,32 +164,6 @@ parse_setup_xml (const gchar *filename, TGallerySetup *setup)
setup->favicon_type = xml_file_get_node_attribute (xml, "/gallery_setup/meta/favicon", "type");
xml_parser_close (xml);
-
- #ifdef __DEBUG_ALL__
- printf("setup: templates_path = '%s'\n", setup->templates_path);
- printf("setup: template_index = '%s'\n", setup->template_index);
- printf("setup: template_album = '%s'\n", setup->template_album);
- printf("setup: template_photo = '%s'\n", setup->template_photo);
- printf("setup: thumbnail_quality = %d\n", setup->thumbnail_quality);
- printf("setup: thumbnail_landscape_width = %ld\n", setup->thumbnail_landscape_width);
- printf("setup: thumbnail_landscape_height = %ld\n", setup->thumbnail_landscape_height);
- printf("setup: thumbnail_portrait_width = %ld\n", setup->thumbnail_portrait_width);
- printf("setup: thumbnail_portrait_height = %ld\n", setup->thumbnail_portrait_height);
- printf("setup: preview_quality = %d\n", setup->preview_quality);
- printf("setup: preview_landscape_width = %ld\n", setup->preview_landscape_width);
- printf("setup: preview_landscape_height = %ld\n", setup->preview_landscape_height);
- printf("setup: preview_portrait_width = %ld\n", setup->preview_portrait_width);
- printf("setup: preview_portrait_height = %ld\n", setup->preview_portrait_height);
- printf("setup: footer = '%s'\n", setup->footer);
- printf("setup: border_style = '%s'\n", setup->border_style);
- printf("setup: meta_author = '%s'\n", setup->meta_author);
- printf("setup: meta_description = '%s'\n", setup->meta_description);
- printf("setup: meta_keywords = '%s'\n", setup->meta_keywords);
- printf("setup: preload = %d\n", setup->preload);
- printf("setup: use_iptc_exif = %d\n", setup->use_iptc_exif);
- printf("setup: erase_exif_thumbnail = %d\n", setup->erase_exif_thumbnail);
- #endif
-
return TRUE;
}
@@ -225,28 +199,17 @@ find_templates_directory (TGallerySetup *setup)
gchar *base_dir;
gchar *pth;
- if (IS_DIR_SEP (*setup->templates_path))
- {
- #ifdef __DEBUG_ALL__
- printf("Warning: using absolute paths to templates\n");
- #endif
-
- if (! test_tmpl_files (setup->templates_path, setup))
- return g_strdup (setup->templates_path);
- }
- else
- {
- base_dir = g_path_get_dirname (setup->setup_xml_path);
- pth = g_strconcat (base_dir, "/", setup->templates_path, NULL);
- g_free (base_dir);
-
- #ifdef __DEBUG_ALL__
- printf("Warning: using relative paths to templates\n");
- #endif
-
- if (! test_tmpl_files (pth, setup))
- return pth;
- }
+ if (IS_DIR_SEP (*setup->templates_path)) {
+ if (! test_tmpl_files (setup->templates_path, setup))
+ return g_strdup (setup->templates_path);
+ } else {
+ base_dir = g_path_get_dirname (setup->setup_xml_path);
+ pth = g_strconcat (base_dir, "/", setup->templates_path, NULL);
+ g_free (base_dir);
+
+ if (! test_tmpl_files (pth, setup))
+ return pth;
+ }
log_error ("Couldn't find proper templates directory (tried '%s')\n", setup->templates_path);
return NULL;