[gthumb] fixed command line catalog uri



commit d6d37c19a469c1e213d68a3bc183b17da7598b3a
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sat Jan 16 22:04:35 2010 +0100

    fixed command line catalog uri
    
    [bug #606203]

 extensions/catalogs/callbacks.c   |    2 +-
 extensions/catalogs/gth-catalog.c |    1 +
 gthumb/glib-utils.c               |    3 ++-
 3 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/extensions/catalogs/callbacks.c b/extensions/catalogs/callbacks.c
index 9c9d825..ce55de8 100644
--- a/extensions/catalogs/callbacks.c
+++ b/extensions/catalogs/callbacks.c
@@ -257,7 +257,7 @@ catalogs__command_line_files_cb (GList *files)
 	if (g_list_length (files) <= 1)
 		return NULL;
 
-	file = g_file_new_for_uri ("catalog://command_line.catalog");
+	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"));
diff --git a/extensions/catalogs/gth-catalog.c b/extensions/catalogs/gth-catalog.c
index 8340c9e..c1151a1 100644
--- a/extensions/catalogs/gth-catalog.c
+++ b/extensions/catalogs/gth-catalog.c
@@ -1130,6 +1130,7 @@ gth_catalog_save (GthCatalog *catalog)
 
 	file = gth_catalog_get_file (catalog);
 	gio_file = gth_catalog_file_to_gio_file (file);
+
 	gio_parent = g_file_get_parent (gio_file);
 	g_file_make_directory_with_parents (gio_parent, NULL, NULL);
 	data = gth_catalog_to_data (catalog, &size);
diff --git a/gthumb/glib-utils.c b/gthumb/glib-utils.c
index f5e2720..25f302c 100644
--- a/gthumb/glib-utils.c
+++ b/gthumb/glib-utils.c
@@ -1735,7 +1735,8 @@ _g_file_get_standard_type (GFile *file)
 		g_error_free (error);
 	}
 
-	g_object_unref (info);
+	if (info != NULL)
+		g_object_unref (info);
 
 	return result;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]