[balsa/70-libbalsa-message-structure: 18/18] Rebase on master




commit f08bb6dc6b3e0aaa1d26b1bf9b01137ab776f12e
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Wed Apr 6 14:09:42 2022 -0400

    Rebase on master
    
    modified:   libbalsa/message.c

 libbalsa/message.c | 30 +++++++++++++-----------------
 1 file changed, 13 insertions(+), 17 deletions(-)
---
diff --git a/libbalsa/message.c b/libbalsa/message.c
index 84f953c53..34f3da640 100644
--- a/libbalsa/message.c
+++ b/libbalsa/message.c
@@ -85,15 +85,6 @@ struct _LibBalsaMessage {
     /* message ID */
     gchar *message_id;
 
-    /* GnuPG or S/MIME sign and/or encrypt message (sending), or status of received message */
-    guint crypt_mode;
-
-    /* Indicate that uid's should always be trusted when signing a message */
-    gboolean always_trust;
-
-    /* attach the GnuPG public key to the message (sending) */
-    gboolean att_pubkey;
-
     /* sender identity, required for choosing a forced GnuPG or S/MIME key */
     LibBalsaIdentity *ident;
 
@@ -108,7 +99,14 @@ struct _LibBalsaMessage {
 
     /* message body */
     LibBalsaMessageBody *body_list;
-    /* end of pointers, begin ints */
+
+    /* end of pointers, begin long ints */
+    glong length;   /* byte len */
+
+    /* end of longs, begin ints */
+    /* GnuPG or S/MIME sign and/or encrypt message (sending), or status of received message */
+    guint crypt_mode;
+
     guint body_ref;
 
     /* flags */
@@ -116,17 +114,16 @@ struct _LibBalsaMessage {
 
     guint msgno;     /* message no; always copy for faster sorting;
                       * counting starts at 1. */
-    glong length;   /* byte len */
 
     /* GPG sign and/or encrypt message (sending) */
     guint gpg_mode;
 
-    /* protection (i.e. sign/encrypt) status (received message) */
-    LibBalsaMsgProtectState prot_state;
-
     /* end of ints, begin bit fields */
     unsigned has_all_headers : 1;
 
+    /* Indicate that uid's should always be trusted when signing a message */
+    unsigned always_trust : 1;
+
     /* attach the GnuPG public key to the message (sending) */
     unsigned att_pubkey : 1;
 
@@ -157,7 +154,6 @@ libbalsa_message_init(LibBalsaMessage * message)
     message->ident = NULL;
     message->body_list = NULL;
     message->body_ref = 0;
-    message->prot_state = LIBBALSA_MSG_PROTECT_NONE;
     message->flags = LIBBALSA_MESSAGE_FLAG_NONE;
     message->gpg_mode = 0;
     message->has_all_headers = 0;
@@ -1635,7 +1631,7 @@ libbalsa_message_get_always_trust(LibBalsaMessage *message)
 {
     g_return_val_if_fail(LIBBALSA_IS_MESSAGE(message), FALSE);
 
-    return message->always_trust;
+    return message->always_trust != 0;
 }
 
 
@@ -1834,7 +1830,7 @@ libbalsa_message_set_always_trust(LibBalsaMessage *message,
 {
     g_return_if_fail(LIBBALSA_IS_MESSAGE(message));
 
-    message->always_trust = mode;
+    message->always_trust = mode ? 1 : 0;
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]