From 6e5233869cc82dcf9dbfbe9e19a240897f9b8052 Mon Sep 17 00:00:00 2001 From: Jody Goldberg Date: Thu, 27 Jun 2002 01:17:39 +0000 Subject: [PATCH] be anal. 2002-06-26 Jody Goldberg * mime-type-info.c (mime_category_info_save) : be anal. --- capplets/file-types/ChangeLog | 1 + capplets/file-types/mime-type-info.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/capplets/file-types/ChangeLog b/capplets/file-types/ChangeLog index cd8d5a640..4285cfb64 100644 --- a/capplets/file-types/ChangeLog +++ b/capplets/file-types/ChangeLog @@ -4,6 +4,7 @@ gnome_vfs_mime_get_default_application. It silently removes applications that do not exist on the current system. That makes it look like they are not being assigned. + (mime_category_info_save) : be anal. * mime-edit-dialog.c (validate_data) : relax the restriction here. By supplying a reasonable default to the new info it was appearing in diff --git a/capplets/file-types/mime-type-info.c b/capplets/file-types/mime-type-info.c index 17efdb456..207052e6a 100644 --- a/capplets/file-types/mime-type-info.c +++ b/capplets/file-types/mime-type-info.c @@ -411,11 +411,10 @@ mime_category_info_save (MimeCategoryInfo *category) basename = get_gconf_base_name (category); key = g_strconcat (basename, "/default-action-id", NULL); - if (category->default_action != NULL) { + if ((set_ids = (category->default_action != NULL))) gconf_client_set_string (gconf_client_get_default (), key, category->default_action->id, NULL); - set_ids = TRUE; - } else + else gconf_client_unset (gconf_client_get_default (), key, NULL); g_free (key);