fd = work->data;
work = work->next;
- if (file_extension_match(fd->path, ".gqv"))
+ if (file_extension_match(fd->path, GQ_COLLECTION_EXT))
{
name = remove_extension_from_path(fd->name);
}
if (strlen(name) == 0) return;
- if (!file_extension_match(name, ".gqv"))
+ if (!file_extension_match(name, GQ_COLLECTION_EXT))
{
- gchar *tmp = g_strconcat(name, ".gqv", NULL);
+ gchar *tmp = g_strconcat(name, GQ_COLLECTION_EXT, NULL);
g_free((gpointer) name);
name = tmp;
}
path = fd->dest_path;
/* FIXME: utf8 */
- if (!(strlen(path) > 7 && strncasecmp(path + (strlen(path) - 4), ".gqv", 4) == 0))
+ if (!file_extension_match(path, GQ_COLLECTION_EXT))
{
gchar *buf;
- buf = g_strconcat(path, ".gqv", NULL);
+ buf = g_strconcat(path, GQ_COLLECTION_EXT, NULL);
gtk_entry_set_text(GTK_ENTRY(fd->entry), buf);
g_free(buf);
}
base = g_build_filename(homedir(), GQ_RC_DIR_COLLECTIONS, NULL);
file_dialog_add_path_widgets(fd, base, path,
- "collection_load_save", ".gqv", _("Collection Files"));
+ "collection_load_save", GQ_COLLECTION_EXT, _("Collection Files"));
g_free(base);
fd->type = type;
/* non-image files that might be desirable to show */
filter_add_if_missing("xmp", "XMP sidecar", ".xmp", FORMAT_CLASS_META, TRUE);
- filter_add_if_missing("gqv", GQ_APPNAME " image collection", ".gqv", FORMAT_CLASS_META, TRUE);
+ filter_add_if_missing("gqv", GQ_APPNAME " image collection", GQ_COLLECTION_EXT, FORMAT_CLASS_META, TRUE);
/* These are the raw camera formats with embedded jpeg/exif.
* (see format_raw.c and/or exiv2.cc)
n = g_list_index(cd->list, info) + 1;
if (cd->name)
{
- if (file_extension_match(cd->name, ".gqv"))
+ if (file_extension_match(cd->name, GQ_COLLECTION_EXT))
collection_name = remove_extension_from_path(cd->name);
else
collection_name = g_strdup(cd->name);
{
GList *list;
- if (file_extension_match(fd->path, ".gqv"))
+ if (file_extension_match(fd->path, GQ_COLLECTION_EXT))
{
ViewWindow *vw;
CollectionData *cd;
path_parsed = g_strdup(file_path);
parse_out_relatives(path_parsed);
- if (file_extension_match(path_parsed, ".gqv"))
+ if (file_extension_match(path_parsed, GQ_COLLECTION_EXT))
{
*collection_list = g_list_append(*collection_list, path_parsed);
}
#define RC_FILE_NAME GQ_APPNAME_LC "rc"
+#define GQ_COLLECTION_EXT ".gqv"
+
#define ZOOM_RESET_ORIGINAL 0
#define ZOOM_RESET_FIT_WINDOW 1
#define ZOOM_RESET_NONE 2
if (isfile(filename))
{
- if (file_extension_match(filename, ".gqv"))
+ if (file_extension_match(filename, GQ_COLLECTION_EXT))
{
collection_window_new(filename);
}