aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-04-15 05:24:07 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-04-15 05:24:07 +0800
commit4e3776a37dee9b520e9ec71a051dc7f3ceb836bd (patch)
treed5b704f9fa823a9bf80b777fc82538df437ea325 /mail
parent6dce8c2f32c5738b78a6e7b26e15db8b562981e5 (diff)
downloadgsoc2013-evolution-4e3776a37dee9b520e9ec71a051dc7f3ceb836bd.tar
gsoc2013-evolution-4e3776a37dee9b520e9ec71a051dc7f3ceb836bd.tar.gz
gsoc2013-evolution-4e3776a37dee9b520e9ec71a051dc7f3ceb836bd.tar.bz2
gsoc2013-evolution-4e3776a37dee9b520e9ec71a051dc7f3ceb836bd.tar.lz
gsoc2013-evolution-4e3776a37dee9b520e9ec71a051dc7f3ceb836bd.tar.xz
gsoc2013-evolution-4e3776a37dee9b520e9ec71a051dc7f3ceb836bd.tar.zst
gsoc2013-evolution-4e3776a37dee9b520e9ec71a051dc7f3ceb836bd.zip
Only use non-NULL contexts. (mail_crypto_pgp_mime_part_encrypt): Same.
2001-04-14 Jeffrey Stedfast <fejj@ximian.com> * mail-crypto.c (mail_crypto_pgp_mime_part_verify): Only use non-NULL contexts. (mail_crypto_pgp_mime_part_encrypt): Same. (mail_crypto_pgp_mime_part_decrypt): And here too. * mail-format.c (try_inline_pgp_sig): Make sure to not use the context if it is NULL. (decode_pgp): Same. * folder-browser-factory.c: Added stuff for filtering/vfoldering on mailinglists. svn path=/trunk/; revision=9315
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog14
-rw-r--r--mail/folder-browser-factory.c20
-rw-r--r--mail/mail-crypto.c25
-rw-r--r--mail/mail-format.c44
-rw-r--r--mail/mail-local.c1
-rw-r--r--mail/mail-vfolder.c6
6 files changed, 72 insertions, 38 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 0a664b9a88..d88956ee49 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,17 @@
+2001-04-14 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-crypto.c (mail_crypto_pgp_mime_part_verify): Only use
+ non-NULL contexts.
+ (mail_crypto_pgp_mime_part_encrypt): Same.
+ (mail_crypto_pgp_mime_part_decrypt): And here too.
+
+ * mail-format.c (try_inline_pgp_sig): Make sure to not use the
+ context if it is NULL.
+ (decode_pgp): Same.
+
+ * folder-browser-factory.c: Added stuff for filtering/vfoldering
+ on mailinglists.
+
2001-04-13 Dan Winship <danw@ximian.com>
* Makefile.am (evolution_mail_LDADD): Remove some redundant LIBS
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index 4d7644d149..9f6abf43bb 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -68,7 +68,7 @@ BonoboUIVerb verbs [] = {
BONOBO_UI_UNSAFE_VERB ("MessageResend", resend_msg),
BONOBO_UI_UNSAFE_VERB ("MessageSaveAs", save_msg),
BONOBO_UI_UNSAFE_VERB ("MessagePrint", print_msg),
- BONOBO_UI_UNSAFE_VERB ("MessageReplySndr", reply_to_sender),
+ BONOBO_UI_UNSAFE_VERB ("MessageReplySender", reply_to_sender),
BONOBO_UI_UNSAFE_VERB ("MessageReplyAll", reply_to_all),
BONOBO_UI_UNSAFE_VERB ("MessageForwardAttached", forward_attached),
BONOBO_UI_UNSAFE_VERB ("MessageForwardInlined", forward_inlined),
@@ -87,13 +87,15 @@ BonoboUIVerb verbs [] = {
BONOBO_UI_UNSAFE_VERB ("MessageApplyFilters", apply_filters),
- BONOBO_UI_UNSAFE_VERB ("MessageVFolderSubj", vfolder_subject),
- BONOBO_UI_UNSAFE_VERB ("MessageVFolderSndr", vfolder_sender),
- BONOBO_UI_UNSAFE_VERB ("MessageVFolderRecip", vfolder_recipient),
+ BONOBO_UI_UNSAFE_VERB ("MessageVFolderSubject", vfolder_subject),
+ BONOBO_UI_UNSAFE_VERB ("MessageVFolderSender", vfolder_sender),
+ BONOBO_UI_UNSAFE_VERB ("MessageVFolderRecipient", vfolder_recipient),
+ BONOBO_UI_UNSAFE_VERB ("MessageVFolderMailingList", vfolder_mlist),
- BONOBO_UI_UNSAFE_VERB ("MessageFilterSubj", filter_subject),
- BONOBO_UI_UNSAFE_VERB ("MessageFilterSndr", filter_sender),
- BONOBO_UI_UNSAFE_VERB ("MessageFilterRecip", filter_recipient),
+ BONOBO_UI_UNSAFE_VERB ("MessageFilterSubject", filter_subject),
+ BONOBO_UI_UNSAFE_VERB ("MessageFilterSender", filter_sender),
+ BONOBO_UI_UNSAFE_VERB ("MessageFilterRecipient", filter_recipient),
+ BONOBO_UI_UNSAFE_VERB ("MessageFilterMailingList", filter_mlist),
BONOBO_UI_UNSAFE_VERB ("MessageHideClear", hide_none),
BONOBO_UI_UNSAFE_VERB ("MessageHideRead", hide_read),
@@ -103,7 +105,7 @@ BonoboUIVerb verbs [] = {
/* Folder Menu */
BONOBO_UI_UNSAFE_VERB ("FolderExpunge", expunge_folder),
BONOBO_UI_UNSAFE_VERB ("FolderConfig", configure_folder),
- BONOBO_UI_UNSAFE_VERB ("ActionsEmptyTrash", empty_trash),
+ BONOBO_UI_UNSAFE_VERB ("EmptyTrash", empty_trash),
/* Toolbar specific */
BONOBO_UI_UNSAFE_VERB ("MailStop", stop_threads),
@@ -130,7 +132,7 @@ static EPixmap pixcache [] = {
E_PIXMAP ("/menu/Actions/Component/SendReceive", "send-receive.xpm"),
E_PIXMAP ("/menu/Actions/Component/MessageMove", "move_message.xpm"),
E_PIXMAP ("/menu/Actions/Component/MessageReplyAll", "reply_to_all.xpm"),
- E_PIXMAP ("/menu/Actions/Component/MessageReplySndr", "reply.xpm"),
+ E_PIXMAP ("/menu/Actions/Component/MessageReplySender", "reply.xpm"),
E_PIXMAP ("/menu/Tools/Component/SetMailConfig", "configure_16_mail.xpm"),
diff --git a/mail/mail-crypto.c b/mail/mail-crypto.c
index 7613f11eef..7fb3aba88d 100644
--- a/mail/mail-crypto.c
+++ b/mail/mail-crypto.c
@@ -154,13 +154,16 @@ mail_crypto_pgp_mime_part_sign (CamelMimePart **mime_part, const char *userid, C
CamelCipherValidity *
mail_crypto_pgp_mime_part_verify (CamelMimePart *mime_part, CamelException *ex)
{
+ CamelCipherValidity *valid = NULL;
CamelPgpContext *context;
- CamelCipherValidity *valid;
context = camel_pgp_context_new (session, mail_config_get_pgp_type (),
mail_config_get_pgp_path ());
- valid = camel_pgp_mime_part_verify (context, mime_part, ex);
- camel_object_unref (CAMEL_OBJECT (context));
+
+ if (context) {
+ valid = camel_pgp_mime_part_verify (context, mime_part, ex);
+ camel_object_unref (CAMEL_OBJECT (context));
+ }
return valid;
}
@@ -183,8 +186,11 @@ mail_crypto_pgp_mime_part_encrypt (CamelMimePart **mime_part, GPtrArray *recipie
context = camel_pgp_context_new (session, mail_config_get_pgp_type (),
mail_config_get_pgp_path ());
- camel_pgp_mime_part_encrypt (context, mime_part, recipients, ex);
- camel_object_unref (CAMEL_OBJECT (context));
+
+ if (context) {
+ camel_pgp_mime_part_encrypt (context, mime_part, recipients, ex);
+ camel_object_unref (CAMEL_OBJECT (context));
+ }
}
@@ -199,12 +205,15 @@ CamelMimePart *
mail_crypto_pgp_mime_part_decrypt (CamelMimePart *mime_part, CamelException *ex)
{
CamelPgpContext *context;
- CamelMimePart *part;
+ CamelMimePart *part = NULL;
context = camel_pgp_context_new (session, mail_config_get_pgp_type (),
mail_config_get_pgp_path ());
- part = camel_pgp_mime_part_decrypt (context, mime_part, ex);
- camel_object_unref (CAMEL_OBJECT (context));
+
+ if (context) {
+ part = camel_pgp_mime_part_decrypt (context, mime_part, ex);
+ camel_object_unref (CAMEL_OBJECT (context));
+ }
return part;
}
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 3903c56fc9..3af17025de 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -1027,9 +1027,14 @@ decode_pgp (CamelStream *ciphertext, CamelStream *plaintext, MailDisplay *md)
ctx = camel_pgp_context_new (session, mail_config_get_pgp_type (),
mail_config_get_pgp_path ());
- camel_pgp_decrypt (ctx, ciphertext, plaintext, &ex);
- camel_object_unref (CAMEL_OBJECT (ctx));
- camel_stream_reset (plaintext);
+ if (ctx) {
+ camel_pgp_decrypt (ctx, ciphertext, plaintext, &ex);
+ camel_object_unref (CAMEL_OBJECT (ctx));
+ camel_stream_reset (plaintext);
+ } else {
+ camel_exception_setv (&ex, CAMEL_EXCEPTION_SYSTEM,
+ _("No GPG/PGP program configured."));
+ }
if (!camel_exception_is_set (&ex))
return;
@@ -1040,7 +1045,7 @@ decode_pgp (CamelStream *ciphertext, CamelStream *plaintext, MailDisplay *md)
"<a href=\"x-evolution-decode-pgp:\">"
"<img src=\"%s\"></a></td><td>",
get_url_for_icon ("gnome-lockscreen.png", md));
-
+
if (camel_exception_is_set (&ex)) {
mail_html_write (md->html, md->stream, "%s<br><br>\n",
_("Encrypted message not displayed"));
@@ -1052,7 +1057,7 @@ decode_pgp (CamelStream *ciphertext, CamelStream *plaintext, MailDisplay *md)
_("Encrypted message"),
_("Click icon to decrypt."));
}
-
+
mail_html_write (md->html, md->stream, "</td></tr></table>");
}
@@ -1099,10 +1104,8 @@ try_inline_pgp (char *start, MailDisplay *md)
static char *
try_inline_pgp_sig (char *start, MailDisplay *md)
{
+ CamelCipherValidity *valid = NULL;
CamelPgpContext *context;
- CamelStream *ciphertext;
- CamelCipherValidity *valid;
- CamelException *ex;
char *end;
end = strstr (start, "-----END PGP SIGNATURE-----");
@@ -1116,14 +1119,22 @@ try_inline_pgp_sig (char *start, MailDisplay *md)
context = camel_pgp_context_new (session, mail_config_get_pgp_type (),
mail_config_get_pgp_path ());
- ciphertext = camel_stream_mem_new ();
- camel_stream_write (ciphertext, start, end - start);
- camel_stream_reset (ciphertext);
-
- ex = camel_exception_new ();
- valid = camel_pgp_verify (context, ciphertext, NULL, ex);
- camel_object_unref (CAMEL_OBJECT (ciphertext));
- camel_object_unref (CAMEL_OBJECT (context));
+ if (context) {
+ CamelStream *ciphertext;
+ CamelException *ex;
+
+ ex = camel_exception_new ();
+
+ ciphertext = camel_stream_mem_new ();
+ camel_stream_write (ciphertext, start, end - start);
+ camel_stream_reset (ciphertext);
+
+ valid = camel_pgp_verify (context, ciphertext, NULL, ex);
+ camel_object_unref (CAMEL_OBJECT (ciphertext));
+ camel_object_unref (CAMEL_OBJECT (context));
+
+ camel_exception_free (ex);
+ }
mail_text_write (md->html, md->stream, "%.*s", end - start, start);
@@ -1154,7 +1165,6 @@ try_inline_pgp_sig (char *start, MailDisplay *md)
mail_html_write (md->html, md->stream, "</font></td></table>");
- camel_exception_free (ex);
camel_cipher_validity_free (valid);
return end;
diff --git a/mail/mail-local.c b/mail/mail-local.c
index c5f32c5376..d8448a1154 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -803,7 +803,6 @@ reconfigure_folder_reconfigure(struct _mail_msg *mm)
char *fromurl = NULL, *tourl = NULL;
CamelFolder *fromfolder = NULL, *tofolder = NULL;
GPtrArray *uids;
- int i;
char *metapath;
char *tmpname;
CamelURL *url = NULL;
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index cd269cb183..ec3ac8881c 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -371,9 +371,9 @@ vfolder_edit(void)
{
GtkWidget *w;
- w = vfolder_editor_new(context);
- gtk_signal_connect((GtkObject *)w, "clicked", vfolder_editor_clicked, NULL);
- gtk_widget_show(w);
+ w = GTK_WIDGET (vfolder_editor_new (context));
+ gtk_signal_connect (GTK_OBJECT (w), "clicked", vfolder_editor_clicked, NULL);
+ gtk_widget_show (w);
}
static void