diff options
author | Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com> | 2012-01-24 13:59:12 +0100 |
---|---|---|
committer | Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com> | 2012-01-24 13:59:12 +0100 |
commit | 080f8740f27db22e7dc556723505753e3a937580 (patch) | |
tree | b8d06e03695a6d121ebd5f6d2c9b871cac12b1aa /gtk/gtkrecentmanager.c | |
parent | d0393d7376e2ba66c925d5e0b83b3b1d79902891 (diff) | |
download | gtk+-080f8740f27db22e7dc556723505753e3a937580.tar.gz |
GtkRecentManager: guess mime-type from filename when file doesn't exist
Diffstat (limited to 'gtk/gtkrecentmanager.c')
-rw-r--r-- | gtk/gtkrecentmanager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c index a674b5d982..c3929edc59 100644 --- a/gtk/gtkrecentmanager.c +++ b/gtk/gtkrecentmanager.c @@ -753,7 +753,7 @@ gtk_recent_manager_add_item_query_info (GObject *source_object, g_object_unref (file_info); } else - recent_data.mime_type = g_strdup (GTK_RECENT_DEFAULT_MIME); /* FIXME: maybe we should make up the MIME type from the filename's extension */ + recent_data.mime_type = g_content_type_guess (g_file_get_basename (file), NULL, 0, NULL); recent_data.app_name = g_strdup (g_get_application_name ()); recent_data.app_exec = g_strjoin (" ", g_get_prgname (), "%u", NULL); |