aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog32
-rw-r--r--mail/em-account-editor.c5
-rw-r--r--mail/em-filter-editor.c12
-rw-r--r--mail/em-filter-editor.h16
-rw-r--r--mail/em-format-quote.c12
-rw-r--r--mail/em-icon-stream.c2
-rw-r--r--mail/em-utils.c15
-rw-r--r--mail/mail-session.c6
8 files changed, 79 insertions, 21 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 54bfcc5678..a168fdd152 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,35 @@
+2005-08-04 Not Zed <NotZed@Ximian.com>
+
+ ** See bug #273885.
+
+ * em-utils.c (em_utils_edit_filters): setup filter source names
+ properly translated.
+
+ * em-filter-editor.c (em_filter_editor_construct): take an array
+ of structs for the filter source so the incoming/outgoing is
+ properly translated.
+
+ ** See bug #312397.
+
+ * em-format-quote.c (emfq_format_message): dont quote credits
+ here.
+ (emfq_format_message_prefix): new prefix handler for credits.
+ (emfq_format_clone): invoke the message prefix before anything
+ else.
+
+ ** See bug #310840.
+
+ * em-icon-stream.c (em_icon_stream_get_image): check for /0
+ possibility.
+
+ ** See bug #308512.
+
+ * em-account-editor.c (emae_authtype_changed): take into account
+ the writability of the password when sensitising remember
+ password.
+ (get_password): small hack to disable the save-password button
+ when appropriate.
+
2005-08-05 Srinivasa Ragavan <sragavan@novell.com>
* em-format-html-display.c (efhd_init) (efhd_complete) (efhd_message_add_bar):
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 686f8cebcb..ee2a5a75d6 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -1412,7 +1412,10 @@ emae_authtype_changed(GtkComboBox *dropdown, EMAccountEditorService *service)
}
camel_url_free(url);
- gtk_widget_set_sensitive((GtkWidget *)service->remember, authtype?authtype->need_password:FALSE);
+ gtk_widget_set_sensitive((GtkWidget *)service->remember,
+ authtype
+ ?(authtype->need_password && e_account_writable(service->emae->account, emae_service_info[service->type].save_passwd_key))
+ :FALSE);
}
static void
diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c
index f736cc72f6..32f7ff1a48 100644
--- a/mail/em-filter-editor.c
+++ b/mail/em-filter-editor.c
@@ -101,7 +101,7 @@ em_filter_editor_finalise (GObject *obj)
* Return value: A new #EMFilterEditor object.
**/
EMFilterEditor *
-em_filter_editor_new (EMFilterContext *fc, const char **source_names)
+em_filter_editor_new (EMFilterContext *fc, const EMFilterSource *source_names)
{
EMFilterEditor *fe = (EMFilterEditor *) g_object_new (em_filter_editor_get_type(), NULL);
GladeXML *gui;
@@ -125,7 +125,7 @@ select_source (GtkMenuItem *mi, EMFilterEditor *fe)
}
void
-em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const char **source_names)
+em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const EMFilterSource *source_names)
{
GtkWidget *menu, *item, *omenu;
int i;
@@ -134,9 +134,9 @@ em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *g
gtk_option_menu_remove_menu (GTK_OPTION_MENU (omenu));
menu = gtk_menu_new ();
- for (i = 0; source_names[i]; i++) {
- item = gtk_menu_item_new_with_label (_(source_names[i]));
- g_object_set_data_full (G_OBJECT (item), "source", g_strdup (source_names[i]), g_free);
+ for (i = 0; source_names[i].source; i++) {
+ item = gtk_menu_item_new_with_label(source_names[i].name);
+ g_object_set_data_full((GObject *)item, "source", g_strdup(source_names[i].source), g_free);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
gtk_widget_show (item);
g_signal_connect (item, "activate", G_CALLBACK (select_source), fe);
@@ -144,7 +144,7 @@ em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *g
gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
gtk_widget_show (omenu);
- rule_editor_construct ((RuleEditor *) fe, (RuleContext *) fc, gui, source_names[0], _("_Filter Rules"));
+ rule_editor_construct ((RuleEditor *) fe, (RuleContext *) fc, gui, source_names[0].source, _("_Filter Rules"));
}
static FilterRule *
diff --git a/mail/em-filter-editor.h b/mail/em-filter-editor.h
index ff65be5222..bccca3eb53 100644
--- a/mail/em-filter-editor.h
+++ b/mail/em-filter-editor.h
@@ -35,22 +35,24 @@
typedef struct _EMFilterEditor EMFilterEditor;
typedef struct _EMFilterEditorClass EMFilterEditorClass;
+typedef struct _EMFilterSource EMFilterSource;
+
+struct _EMFilterSource {
+ char *source;
+ char *name;
+};
+
struct _EMFilterEditor {
RuleEditor parent_object;
-
};
struct _EMFilterEditorClass {
RuleEditorClass parent_class;
-
- /* virtual methods */
-
- /* signals */
};
GtkType em_filter_editor_get_type (void);
-EMFilterEditor *em_filter_editor_new (EMFilterContext *f, const char **source_names);
-void em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const char **source_names);
+EMFilterEditor *em_filter_editor_new (EMFilterContext *f, const EMFilterSource *source_names);
+void em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const EMFilterSource *source_names);
#endif /* ! _EM_FILTER_EDITOR_H */
diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c
index f7df8fcccc..90751ee48f 100644
--- a/mail/em-format-quote.c
+++ b/mail/em-format-quote.c
@@ -143,6 +143,9 @@ emfq_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMime
camel_stream_reset(emfq->stream);
+ handle = em_format_find_handler(emf, "x-evolution/message/prefix");
+ if (handle)
+ handle->handler(emf, emfq->stream, (CamelMimePart *)msg, handle);
handle = em_format_find_handler(emf, "x-evolution/message/rfc822");
if (handle)
handle->handler(emf, emfq->stream, (CamelMimePart *)msg, handle);
@@ -363,12 +366,18 @@ emfq_format_headers (EMFormatQuote *emfq, CamelStream *stream, CamelMedium *part
}
static void
-emfq_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
+emfq_format_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
{
EMFormatQuote *emfq = (EMFormatQuote *) emf;
if (emfq->credits)
camel_stream_printf(stream, "%s<br>\n", emfq->credits);
+}
+
+static void
+emfq_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
+{
+ EMFormatQuote *emfq = (EMFormatQuote *) emf;
if (emfq->flags & EM_FORMAT_QUOTE_CITE)
camel_stream_printf(stream, "<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"orig\" value=\"1\">-->\n"
@@ -517,6 +526,7 @@ static EMFormatHandler type_builtin_table[] = {
/* internal evolution types */
{ "x-evolution/message/rfc822", (EMFormatFunc)emfq_format_message },
+ { "x-evolution/message/prefix", (EMFormatFunc)emfq_format_message_prefix },
};
static void
diff --git a/mail/em-icon-stream.c b/mail/em-icon-stream.c
index b9079e8c02..3c975ffaef 100644
--- a/mail/em-icon-stream.c
+++ b/mail/em-icon-stream.c
@@ -285,7 +285,7 @@ em_icon_stream_get_image(const char *key, unsigned int maxwidth, unsigned int ma
unsigned int scale;
char *realkey;
- if (width >= height)
+ if (maxheight == 0 || width >= height)
scale = width * EMIS_SCALE / maxwidth;
else
scale = height * EMIS_SCALE / maxheight;
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 364c87cf6e..2a3ce82e75 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -250,10 +250,10 @@ em_filter_editor_response (GtkWidget *dialog, int button, gpointer user_data)
filter_editor = NULL;
}
-static const char *em_filter_source_element_names[] = {
- "incoming",
- "outgoing",
- NULL,
+static EMFilterSource em_filter_source_element_names[] = {
+ { "incoming", },
+ { "outgoing", },
+ { 0 }
};
/**
@@ -286,7 +286,12 @@ em_utils_edit_filters (GtkWidget *parent)
e_error_run((GtkWindow *)parent, "mail:filter-load-error", ((RuleContext *)fc)->error, NULL);
return;
}
-
+
+ if (em_filter_source_element_names[0].name == NULL) {
+ em_filter_source_element_names[0].name = _("Incoming");
+ em_filter_source_element_names[1].name = _("Outgoing");
+ }
+
filter_editor = (GtkWidget *) em_filter_editor_new (fc, em_filter_source_element_names);
if (parent != NULL)
e_dialog_set_transient_for ((GtkWindow *) filter_editor, parent);
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 7328581a89..f38fcd98fd 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -221,6 +221,12 @@ get_password (CamelSession *session, CamelService *service, const char *domain,
if (flags & CAMEL_SESSION_PASSWORD_SECRET)
eflags |= E_PASSWORDS_SECRET;
+ /* HACK: breaks abstraction ...
+ e_account_writable doesn't use the eaccount, it also uses the same writable key for
+ source and transport */
+ if (!e_account_writable(NULL, E_ACCOUNT_SOURCE_SAVE_PASSWD))
+ eflags |= E_PASSWORDS_DISABLE_REMEMBER;
+
ret = e_passwords_ask_password(title, domain, key, prompt, eflags, &remember, NULL);
g_free(title);