don't migrate "documents".

2008-03-24  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-user-install.c (user_install_migrate_files): 
don't
	migrate "documents".

	* app/actions/documents-commands.c 
(documents_remove_cmd_callback)
	(documents_remove_dangling_foreach): remove from 
GtkRecentManager
	before removing the item from the documents list.


svn path=/trunk/; revision=25196
This commit is contained in:
Sven Neumann 2008-03-24 17:56:27 +00:00 committed by Sven Neumann
parent 3adca61a80
commit 4cc03a88be
3 changed files with 21 additions and 11 deletions

View file

@ -1,3 +1,12 @@
2008-03-24 Sven Neumann <sven@gimp.org>
* app/core/gimp-user-install.c (user_install_migrate_files): don't
migrate "documents".
* app/actions/documents-commands.c (documents_remove_cmd_callback)
(documents_remove_dangling_foreach): remove from GtkRecentManager
before removing the item from the documents list.
2008-03-24 Sven Neumann <sven@gimp.org>
* libgimpthumb/gimpthumbnail.c: don't reset the mime-type info

View file

@ -176,11 +176,11 @@ documents_remove_cmd_callback (GtkAction *action,
context = gimp_container_view_get_context (editor->view);
imagefile = gimp_context_get_imagefile (context);
gimp_container_view_remove_active (editor->view);
uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri, NULL);
gimp_container_view_remove_active (editor->view);
}
void
@ -288,10 +288,10 @@ documents_remove_dangling_foreach (GimpImagefile *imagefile,
{
const gchar *uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
gimp_container_remove (container, GIMP_OBJECT (imagefile));
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri,
NULL);
gimp_container_remove (container, GIMP_OBJECT (imagefile));
}
}

View file

@ -2,7 +2,7 @@
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimp-user-install.c
* Copyright (C) 2000-2006 Michael Natterer and Sven Neumann
* Copyright (C) 2000-2008 Michael Natterer and Sven Neumann
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -494,16 +494,17 @@ user_install_migrate_files (GimpUserInstall *install)
if (g_file_test (source, G_FILE_TEST_IS_REGULAR))
{
/* skip these files for all old versions */
if (g_str_has_prefix (basename, "gimpswap.") ||
g_str_has_prefix (basename, "pluginrc") ||
g_str_has_prefix (basename, "themerc") ||
g_str_has_prefix (basename, "toolrc"))
if (strcmp (basename, "documents") == 0 ||
g_str_has_prefix (basename, "gimpswap.") ||
strcmp (basename, "pluginrc") == 0 ||
strcmp (basename, "themerc") == 0 ||
strcmp (basename, "toolrc") == 0)
{
goto next_file;
}
/* skip menurc for gimp 2.0 since the format has changed */
if (install->old_minor == 0 && g_str_has_prefix (basename, "menurc"))
/* skip menurc for gimp 2.0 as the format has changed */
if (install->old_minor == 0 && strcmp (basename, "menurc") == 0)
{
goto next_file;
}