* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/**
GtkRecentManager *manager = user_data;
GtkRecentData recent_data;
GFileInfo *file_info;
- gchar *uri;
+ gchar *uri, *basename;
uri = g_file_get_uri (file);
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 */
+ {
+ basename = g_file_get_basename (file);
+ recent_data.mime_type = g_content_type_guess (basename, NULL, 0, NULL);
+ g_free (basename);
+ }
recent_data.app_name = g_strdup (g_get_application_name ());
recent_data.app_exec = g_strjoin (" ", g_get_prgname (), "%u", NULL);