Beispiel #1
0
static void collection_confirm_ok_cb(GenericDialog *gd, gpointer data)
{
	FileDialog *fd = data;
	CollectionData *cd = GENERIC_DIALOG(fd)->data;

	if (!collection_save_confirmed(fd, TRUE, cd))
		{
		collection_unref(cd);
		file_dialog_close(fd);
		}
}
Beispiel #2
0
static void collection_save_cb(FileDialog *fd, gpointer data)
{
	CollectionData *cd = data;
	const gchar *path;

	path = fd->dest_path;
	
	if (!(strlen(path) > 7 && strncasecmp(path + (strlen(path) - 4), ".gqv", 4) == 0))
		{
		gchar *buf;
		buf = g_strconcat(path, ".gqv", NULL);
		gtk_entry_set_text(GTK_ENTRY(fd->entry), buf);
		g_free(buf);
		}

	collection_save_confirmed(fd, FALSE, cd);
}
Beispiel #3
0
static void collection_save_cb(FileDialog *fd, gpointer data)
{
	CollectionData *cd = data;
	const gchar *path;

	path = fd->dest_path;

	/* FIXME: utf8 */
	if (!file_extension_match(path, GQ_COLLECTION_EXT))
		{
		gchar *buf;
		buf = g_strconcat(path, GQ_COLLECTION_EXT, NULL);
		gtk_entry_set_text(GTK_ENTRY(fd->entry), buf);
		g_free(buf);
		}

	collection_save_confirmed(fd, FALSE, cd);
}