示例#1
0
static void
save_catalog (gpointer key,
	      gpointer value,
	      gpointer user_data)
{
	GthCatalog *catalog = value;

	gth_catalog_save (catalog);
}
示例#2
0
GFile *
catalogs__command_line_files_cb (GList *files)
{
	GFile      *file;
	GthCatalog *catalog;
	GList      *scan;

	if (g_list_length (files) <= 1)
		return NULL;

	file = _g_file_new_for_display_name ("catalog:///", _("Command Line"), ".catalog");
	catalog = gth_catalog_new ();
	gth_catalog_set_file (catalog, file);
	gth_catalog_set_name (catalog, _("Command Line"));
	for (scan = files; scan; scan = scan->next)
		gth_catalog_insert_file (catalog, (GFile *) scan->data, -1);
	gth_catalog_save (catalog);

	g_object_unref (catalog);

	return file;
}