aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-14 01:23:14 +0800
committerDan Winship <danw@src.gnome.org>2001-03-14 01:23:14 +0800
commit14538bdee1f3838d944ac3f6945f0cfb3122965e (patch)
treeee4ae3807d927c7de0f4024b35c432296c4385c6 /composer
parent43c6731edc5bcb9087e3588c3b940876c990cba7 (diff)
downloadgsoc2013-evolution-14538bdee1f3838d944ac3f6945f0cfb3122965e.tar
gsoc2013-evolution-14538bdee1f3838d944ac3f6945f0cfb3122965e.tar.gz
gsoc2013-evolution-14538bdee1f3838d944ac3f6945f0cfb3122965e.tar.bz2
gsoc2013-evolution-14538bdee1f3838d944ac3f6945f0cfb3122965e.tar.lz
gsoc2013-evolution-14538bdee1f3838d944ac3f6945f0cfb3122965e.tar.xz
gsoc2013-evolution-14538bdee1f3838d944ac3f6945f0cfb3122965e.tar.zst
gsoc2013-evolution-14538bdee1f3838d944ac3f6945f0cfb3122965e.zip
Use gnome_vfs_mime_type_from_name rather than gnome_vfs_mime_info, since
* e-msg-composer-attachment.c (update_mime_type): Use gnome_vfs_mime_type_from_name rather than gnome_vfs_mime_info, since the entered filename doesn't have to be a real file on disk. Deal with it returning NULL too. (e_msg_composer_attachment_edit): Select the right item in the inline/attachment menu. * e-msg-composer-hdrs.c: s/Pair/EMsgComposerHdrPair/. Namespace! svn path=/trunk/; revision=8673
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog11
-rw-r--r--composer/e-msg-composer-attachment.c13
-rw-r--r--composer/e-msg-composer-hdrs.c12
3 files changed, 28 insertions, 8 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index d783aad3d3..ccdb44e096 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,14 @@
+2001-03-13 Dan Winship <danw@ximian.com>
+
+ * e-msg-composer-attachment.c (update_mime_type): Use
+ gnome_vfs_mime_type_from_name rather than gnome_vfs_mime_info,
+ since the entered filename doesn't have to be a real file on disk.
+ Deal with it returning NULL too.
+ (e_msg_composer_attachment_edit): Select the right item in the
+ inline/attachment menu.
+
+ * e-msg-composer-hdrs.c: s/Pair/EMsgComposerHdrPair/. Namespace!
+
2001-03-12 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.h: Added view_replyto member.
diff --git a/composer/e-msg-composer-attachment.c b/composer/e-msg-composer-attachment.c
index 223d118de5..796004c283 100644
--- a/composer/e-msg-composer-attachment.c
+++ b/composer/e-msg-composer-attachment.c
@@ -32,6 +32,7 @@
#include <gnome.h>
#include <camel/camel.h>
#include <gal/widgets/e-unicode.h>
+#include <libgnomevfs/gnome-vfs-mime.h>
#include "e-msg-composer.h"
#include "e-msg-composer-attachment.h"
@@ -253,10 +254,11 @@ update_mime_type (DialogData *data)
return;
file_name = e_utf8_gtk_entry_get_text (data->file_name_entry);
- mime_type = e_msg_composer_guess_mime_type (file_name);
+ mime_type = gnome_vfs_mime_type_from_name_or_default (file_name, NULL);
g_free (file_name);
- e_utf8_gtk_entry_set_text (data->mime_type_entry, mime_type);
+ if (mime_type)
+ e_utf8_gtk_entry_set_text (data->mime_type_entry, mime_type);
}
static void
@@ -432,6 +434,7 @@ e_msg_composer_attachment_edit (EMsgComposerAttachment *attachment,
if (attachment != NULL) {
CamelContentType *content_type;
char *type;
+ const char *disposition;
set_entry (editor_gui, "file_name_entry",
camel_mime_part_get_filename (attachment->body));
@@ -441,6 +444,12 @@ e_msg_composer_attachment_edit (EMsgComposerAttachment *attachment,
type = header_content_type_simple (content_type);
set_entry (editor_gui, "mime_type_entry", type);
g_free (type);
+
+ disposition = camel_mime_part_get_disposition (attachment->body);
+ if (disposition && !g_strcasecmp (disposition, "inline"))
+ gtk_option_menu_set_history (dialog_data->disposition_option, 1);
+ else
+ gtk_option_menu_set_history (dialog_data->disposition_option, 0);
}
connect_widget (editor_gui, "ok_button", "clicked", ok_cb, dialog_data);
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
index f6858ee492..39d5c81647 100644
--- a/composer/e-msg-composer-hdrs.c
+++ b/composer/e-msg-composer-hdrs.c
@@ -55,7 +55,7 @@
typedef struct {
GtkWidget *label;
GtkWidget *entry;
-} Pair;
+} EMsgComposerHdrPair;
struct _EMsgComposerHdrsPrivate {
GNOME_Evolution_Addressbook_SelectNames corba_select_names;
@@ -66,7 +66,7 @@ struct _EMsgComposerHdrsPrivate {
GSList *from_options;
/* Standard headers. */
- Pair from, reply_to, to, cc, bcc, subject;
+ EMsgComposerHdrPair from, reply_to, to, cc, bcc, subject;
};
@@ -292,11 +292,11 @@ create_addressbook_entry (EMsgComposerHdrs *hdrs,
return control_widget;
}
-static Pair
+static EMsgComposerHdrPair
header_new_recipient (EMsgComposerHdrs *hdrs, const gchar *name, const gchar *tip)
{
EMsgComposerHdrsPrivate *priv;
- Pair ret;
+ EMsgComposerHdrPair ret;
priv = hdrs->priv;
@@ -388,7 +388,7 @@ create_headers (EMsgComposerHdrs *hdrs)
}
static void
-attach_couple (EMsgComposerHdrs *hdrs, Pair *pair, int line)
+attach_couple (EMsgComposerHdrs *hdrs, EMsgComposerHdrPair *pair, int line)
{
int pad;
@@ -424,7 +424,7 @@ attach_headers (EMsgComposerHdrs *hdrs)
}
static void
-set_pair_visibility (EMsgComposerHdrs *h, Pair *pair, gboolean visible)
+set_pair_visibility (EMsgComposerHdrs *h, EMsgComposerHdrPair *pair, gboolean visible)
{
if (visible){
gtk_widget_show (pair->label);