Don't set tmp1 with the full category name, free tmp too

2002-01-28  Bradford Hovinen  <hovinen@ximian.com>

	* 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
This commit is contained in:
Bradford Hovinen 2002-01-28 17:34:25 +00:00 committed by Bradford Hovinen (Gdict maintainer)
parent 2073f4108f
commit 31dd650951
3 changed files with 27 additions and 9 deletions

View file

@ -1,5 +1,13 @@
2002-01-28 Bradford Hovinen <hovinen@ximian.com>
* 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

View file

@ -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");

View file

@ -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)