diff options
author | Milan Crha <mcrha@redhat.com> | 2008-10-01 20:29:46 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2008-10-01 20:29:46 +0800 |
commit | 77ff19dd8394167cdc9765af20a62bdaed18e308 (patch) | |
tree | cbc6da9a817aad2d87acab9199a37a69a08851bf /calendar | |
parent | 11fd4c56d352e7e25cd95cf083b071e982cf42ba (diff) | |
download | gsoc2013-evolution-77ff19dd8394167cdc9765af20a62bdaed18e308.tar gsoc2013-evolution-77ff19dd8394167cdc9765af20a62bdaed18e308.tar.gz gsoc2013-evolution-77ff19dd8394167cdc9765af20a62bdaed18e308.tar.bz2 gsoc2013-evolution-77ff19dd8394167cdc9765af20a62bdaed18e308.tar.lz gsoc2013-evolution-77ff19dd8394167cdc9765af20a62bdaed18e308.tar.xz gsoc2013-evolution-77ff19dd8394167cdc9765af20a62bdaed18e308.tar.zst gsoc2013-evolution-77ff19dd8394167cdc9765af20a62bdaed18e308.zip |
** Fix for bug #554418
2008-10-01 Milan Crha <mcrha@redhat.com>
** Fix for bug #554418
* e-util/e-util.h: (e_util_guess_mime_type):
* e-util/e-util.c: (e_util_guess_mime_type): Guess mime_type based on
the file content only when permitted by the caller, otherwise
check based on the filename only, where it fallbacks if file
content guess fails.
* mail/em-utils.c: (em_utils_snoop_type):
* mail/em-popup.c: (emp_standard_menu_factory):
Guess mime_type based on the filename only.
* composer/e-msg-composer.c: (handle_uri),
(e_msg_composer_add_inline_image_from_file): Guess mime_type based
on the file content, if failed, then on the filename.
* widgets/misc/e-attachment.c: (attachment_guess_mime_type):
Allow guessing mime_type based on the file content.
* calendar/gui/dialogs/comp-editor.c: (set_attachment_list):
* calendar/gui/e-cal-popup.c: (ecalp_standard_menu_factory):
Allow/disallow guessing of the mime_type based on the file content.
svn path=/trunk/; revision=36529
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 8 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-cal-popup.c | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 8a53aa81e7..04bfe0d70a 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,13 @@ 2008-10-01 Milan Crha <mcrha@redhat.com> + ** Part of fix for bug #554418 + + * gui/dialogs/comp-editor.c: (set_attachment_list): + * gui/e-cal-popup.c: (ecalp_standard_menu_factory): + Allow/disallow guessing of the mime_type based on the file content. + +2008-10-01 Milan Crha <mcrha@redhat.com> + ** Fix for bug #554458 * gui/e-cal-popup.c: (ecalp_standard_menu_factory): diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index f4ecb85f24..0f3a62cfe8 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -2843,7 +2843,7 @@ set_attachment_list (CompEditor *editor, GSList *attach_list) return; } - mime_type = e_util_guess_mime_type (file_name); + mime_type = e_util_guess_mime_type (file_name, TRUE); if (mime_type) { if (!g_ascii_strcasecmp (mime_type, "message/rfc822")) { wrapper = (CamelDataWrapper *) camel_mime_message_new (); diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c index bec0e9c94d..c18464d8ce 100644 --- a/calendar/gui/e-cal-popup.c +++ b/calendar/gui/e-cal-popup.c @@ -405,7 +405,7 @@ ecalp_standard_menu_factory (EPopup *ecalp, void *data) if (filename) { gchar *name_type; - name_type = e_util_guess_mime_type (filename); + name_type = e_util_guess_mime_type (filename, FALSE); cp = g_content_type_from_mime_type (name_type); apps = g_app_info_get_all_for_type (cp ? cp : name_type); g_free (cp); |