diff src/collect-dlg.c @ 781:2d2cca2bceb0

Replace hardcoded collection filename extension by a macro (GQ_COLLECTION_EXT).
author zas_
date Tue, 03 Jun 2008 13:54:22 +0000
parents d86748a2650a
children 3096a47232ec
line wrap: on
line diff
--- a/src/collect-dlg.c	Tue Jun 03 11:24:16 2008 +0000
+++ b/src/collect-dlg.c	Tue Jun 03 13:54:22 2008 +0000
@@ -104,10 +104,10 @@
 	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);
 		}
@@ -202,7 +202,7 @@
 
 	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;