balsa r8061 - in trunk: . libbalsa libbalsa/imap src
- From: PeterB svn gnome org
- To: svn-commits-list gnome org
- Subject: balsa r8061 - in trunk: . libbalsa libbalsa/imap src
- Date: Sat, 24 Jan 2009 19:28:50 +0000 (UTC)
Author: PeterB
Date: Sat Jan 24 19:28:50 2009
New Revision: 8061
URL: http://svn.gnome.org/viewvc/balsa?rev=8061&view=rev
Log:
small compatibility fixes
Modified:
trunk/ChangeLog
trunk/libbalsa/imap/imap-handle.c
trunk/libbalsa/rfc3156.c
trunk/libbalsa/send.c
trunk/src/sendmsg-window.c
Modified: trunk/libbalsa/imap/imap-handle.c
==============================================================================
--- trunk/libbalsa/imap/imap-handle.c (original)
+++ trunk/libbalsa/imap/imap-handle.c Sat Jan 24 19:28:50 2009
@@ -2654,7 +2654,7 @@
gchar *str;
c = imap_get_atom(h->sio, atom, sizeof(atom));
if(c == EOF) return IMR_SEVERED;
- if(strcasecmp(atom, "TAG")) { /* TAG is the only acceptable response here! */
+ if(g_ascii_strcasecmp(atom, "TAG")) { /* TAG is the only acceptable response here! */
printf("ESearch expected TAG encountered %s\n", atom);
return IMR_PROTOCOL;
}
@@ -2674,7 +2674,7 @@
/* Now, an atom has to follow */
c = imap_get_atom(h->sio, atom, sizeof(atom));
- if(strcasecmp(atom, "UID") == 0) {
+ if(g_ascii_strcasecmp(atom, "UID") == 0) {
uid_data = 1;
c = imap_get_atom(h->sio, atom, sizeof(atom));
}
@@ -3869,7 +3869,7 @@
}
atom[i] = '\0';
for(i=0; i<ELEMENTS(msg_att); i++) {
- if(strcasecmp(atom, msg_att[i].name) == 0) {
+ if(g_ascii_strcasecmp(atom, msg_att[i].name) == 0) {
if( (rc=msg_att[i].handler(h, c, seqno)) != IMR_OK)
return rc;
break;
Modified: trunk/libbalsa/rfc3156.c
==============================================================================
--- trunk/libbalsa/rfc3156.c (original)
+++ trunk/libbalsa/rfc3156.c Sat Jan 24 19:28:50 2009
@@ -1021,14 +1021,22 @@
}
}
+#define APPEND_TIMET(t,label) \
+ do { \
+ if (t) { \
+ gchar * _tbuf = libbalsa_date_to_utf8(&t, date_string); \
+ g_string_append_printf(msg, "\n%s: %s", label, _tbuf); \
+ g_free(_tbuf); \
+ } \
+ } while (0)
+
gchar *
libbalsa_signature_info_to_gchar(GMimeGpgmeSigstat * info,
const gchar * date_string)
{
GString *msg;
gchar *retval;
- struct tm date;
- char buf[128];
+
g_return_val_if_fail(info != NULL, NULL);
g_return_val_if_fail(date_string != NULL, NULL);
msg = g_string_new(libbalsa_gpgme_sig_protocol_name(info->protocol));
@@ -1045,11 +1053,7 @@
} else if (info->sign_email && strlen(info->sign_email))
g_string_append_printf(msg, _("\nMail address: %s"),
info->sign_email);
- if (info->sign_time) {
- localtime_r(&info->sign_time, &date);
- strftime(buf, sizeof(buf), date_string, &date);
- g_string_append_printf(msg, _("\nSigned on: %s"), buf);
- }
+ APPEND_TIMET(info->sign_time, _("Signed on"));
g_string_append_printf(msg, _("\nUser ID validity: %s"),
libbalsa_gpgme_validity_to_gchar(info->
validity));
@@ -1060,16 +1064,8 @@
if (info->fingerprint)
g_string_append_printf(msg, _("\nKey fingerprint: %s"),
info->fingerprint);
- if (info->key_created) {
- localtime_r(&info->key_created, &date);
- strftime(buf, sizeof(buf), date_string, &date);
- g_string_append_printf(msg, _("\nSubkey created on: %s"), buf);
- }
- if (info->key_expires) {
- localtime_r(&info->key_expires, &date);
- strftime(buf, sizeof(buf), date_string, &date);
- g_string_append_printf(msg, _("\nSubkey expires on: %s"), buf);
- }
+ APPEND_TIMET(info->key_created, _("Subkey created on"));
+ APPEND_TIMET(info->key_expires, _("Subkey expires on"));
if (info->key_revoked || info->key_expired || info->key_disabled ||
info->key_invalid) {
GString * attrs = g_string_new("");
Modified: trunk/libbalsa/send.c
==============================================================================
--- trunk/libbalsa/send.c (original)
+++ trunk/libbalsa/send.c Sat Jan 24 19:28:50 2009
@@ -1758,7 +1758,7 @@
GMimeDataWrapper *content;
GError *err = NULL;
- if (!strcasecmp(mime_type[0], "text")
+ if (!g_ascii_strcasecmp(mime_type[0], "text")
&& !(charset = body->charset)) {
charset = libbalsa_vfs_get_charset(body->file_uri);
if (!charset) {
@@ -1784,7 +1784,7 @@
g_mime_part_set_content_disposition(GMIME_PART(mime_part),
body->attach_mode == LIBBALSA_ATTACH_AS_INLINE ?
GMIME_DISPOSITION_INLINE : GMIME_DISPOSITION_ATTACHMENT);
- if(strcasecmp(mime_type[0],"text") != 0)
+ if(g_ascii_strcasecmp(mime_type[0],"text") != 0)
{
g_mime_part_set_encoding(GMIME_PART(mime_part),
GMIME_PART_ENCODING_BASE64);
Modified: trunk/src/sendmsg-window.c
==============================================================================
--- trunk/src/sendmsg-window.c (original)
+++ trunk/src/sendmsg-window.c Sat Jan 24 19:28:50 2009
@@ -1750,7 +1750,7 @@
GtkWidget *extbody_dialog, *parent;
gint result;
- parent = gtk_widget_get_ancestor(menu_item, GNOME_TYPE_APP);
+ parent = gtk_widget_get_toplevel(menu_item);
extbody_dialog =
gtk_message_dialog_new(GTK_WINDOW(parent),
GTK_DIALOG_DESTROY_WITH_PARENT,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]