From 31dd650951998c5fb0c6c4558bf0bb7cb58126d5 Mon Sep 17 00:00:00 2001 From: Bradford Hovinen Date: Mon, 28 Jan 2002 17:34:25 +0000 Subject: [PATCH] Don't set tmp1 with the full category name, free tmp too 2002-01-28 Bradford Hovinen * mime-type-info.c (mime_category_info_save): Don't set tmp1 with the full category name, free tmp too (mime_category_info_load_all): strdup app->command (get_gconf_base_name): Don't put /default-action-id after the key name * category-names.h: Update category names --- capplets/file-types/ChangeLog | 8 ++++++++ capplets/file-types/category-names.h | 21 ++++++++++++++++----- capplets/file-types/mime-type-info.c | 7 +++---- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/capplets/file-types/ChangeLog b/capplets/file-types/ChangeLog index 535f13757..48ed8bf5d 100644 --- a/capplets/file-types/ChangeLog +++ b/capplets/file-types/ChangeLog @@ -1,5 +1,13 @@ 2002-01-28 Bradford Hovinen + * mime-type-info.c (mime_category_info_save): Don't set tmp1 with + the full category name, free tmp too + (mime_category_info_load_all): strdup app->command + (get_gconf_base_name): Don't put /default-action-id after the key + name + + * category-names.h: Update category names + * mime-type-info.c (update_subcategories): Fix logic (mime_type_info_load_all): Don't load default_action if custom_line is set diff --git a/capplets/file-types/category-names.h b/capplets/file-types/category-names.h index 051d98157..32034ac0d 100644 --- a/capplets/file-types/category-names.h +++ b/capplets/file-types/category-names.h @@ -4,13 +4,24 @@ * DO NOT compile it as part of your application. */ -gchar *s = N_("Audio"); -gchar *s = N_("Video"); -gchar *s = N_("Images"); gchar *s = N_("Documents"); gchar *s = N_("Word Processor"); -gchar *s = N_("World Wide Web Page (HTML)"); +gchar *s = N_("Published Materials"); gchar *s = N_("Spreadsheet"); +gchar *s = N_("Presentation"); +gchar *s = N_("Diagram"); +gchar *s = N_("TeX"); +gchar *s = N_("Vector Graphics"); +gchar *s = N_("World Wide Web"); gchar *s = N_("Plain Text"); -gchar *s = N_("Source Code"); gchar *s = N_("Extended Markup Language (XML)"); +gchar *s = N_("Information"); +gchar *s = N_("Financial"); +gchar *s = N_("Calendar"); +gchar *s = N_("Contacts"); +gchar *s = N_("Packages"); +gchar *s = N_("Software Development"); +gchar *s = N_("Source Code"); +gchar *s = N_("Audio"); +gchar *s = N_("Images"); +gchar *s = N_("Video"); diff --git a/capplets/file-types/mime-type-info.c b/capplets/file-types/mime-type-info.c index b53134c7b..01b5ffaea 100644 --- a/capplets/file-types/mime-type-info.c +++ b/capplets/file-types/mime-type-info.c @@ -346,8 +346,7 @@ get_gconf_base_name (MimeCategoryInfo *category) for (tmp = tmp1; *tmp != '\0'; tmp++) if (isspace (*tmp) || *tmp == '(' || *tmp == ')') *tmp = '-'; - tmp = g_strconcat ("/desktop/gnome/file-types-categories/", - tmp1, "/default-action-id", NULL); + tmp = g_strconcat ("/desktop/gnome/file-types-categories/", tmp1, NULL); g_free (tmp1); return tmp; @@ -372,7 +371,7 @@ mime_category_info_load_all (MimeCategoryInfo *category) app = gnome_vfs_application_registry_get_mime_application (appid); if (!strcmp (app->name, tmp)) { category->default_action = NULL; - category->custom_line = app->command; + category->custom_line = g_strdup (app->command); category->needs_terminal = app->requires_terminal; gnome_vfs_mime_application_free (app); } else { @@ -465,9 +464,9 @@ mime_category_info_save (MimeCategoryInfo *category) g_free (tmp); - tmp1 = mime_category_info_get_full_name (category); tmp = g_strconcat (tmp1, "/use-parent-category", NULL); gconf_client_set_bool (gconf_client_get_default (), tmp, category->use_parent_category, NULL); + g_free (tmp); g_free (tmp1); if (app_id != NULL)