use "application/octet-stream" as MIME type in case that it is unset.

2007-09-20  Sven Neumann  <sven@gimp.org>

	* app/gui/gui-vtable.c (gui_recent_list_add_uri): use
	"application/octet-stream" as MIME type in case that it is 
unset.


svn path=/trunk/; revision=23596
This commit is contained in:
Sven Neumann 2007-09-20 19:28:39 +00:00 committed by Sven Neumann
parent 0de56fd922
commit 8cdf71ff05
2 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2007-09-20 Sven Neumann <sven@gimp.org>
* app/gui/gui-vtable.c (gui_recent_list_add_uri): use
"application/octet-stream" as MIME type in case that it is unset.
2007-09-20 Raphaël Quinet <raphael@gimp.org>
* plug-ins/jpeg/jpegqual.c (quant_info): updated the table of

View File

@ -549,28 +549,28 @@ gui_recent_list_add_uri (Gimp *gimp,
const gchar *uri,
const gchar *mime_type)
{
GtkRecentManager *mgr;
GtkRecentManager *manager;
GtkRecentData recent;
const gchar *groups[2] = { "Graphics", NULL };
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
g_return_val_if_fail (uri != NULL, FALSE);
g_return_val_if_fail (mime_type != NULL, FALSE);
mgr = gtk_recent_manager_get_default ();
manager = gtk_recent_manager_get_default ();
g_return_val_if_fail (mgr != NULL, FALSE);
g_return_val_if_fail (manager != NULL, FALSE);
/* use last part of the URI */
recent.display_name = NULL;
/* no special description */
recent.description = NULL;
recent.mime_type = (gchar *) mime_type;
recent.mime_type = (mime_type ?
(gchar *) mime_type : "application/octet-stream");
recent.app_name = "GNU Image Manipulation Program";
recent.app_exec = GIMP_COMMAND " %u";
recent.groups = groups;
recent.groups = (gchar **) groups;
recent.is_private = FALSE;
return gtk_recent_manager_add_full (mgr, uri, &recent);
return gtk_recent_manager_add_full (manager, uri, &recent);
}