[balsa/wip/gtk4: 214/351] Uncrustify identity.h
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gtk4: 214/351] Uncrustify identity.h
- Date: Wed, 23 May 2018 21:34:57 +0000 (UTC)
commit 0e9fd8e530c8f69a7dcc02ff60d5d6cfaf9b69c6
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Mar 11 16:59:27 2018 -0400
Uncrustify identity.h
and rename libbalsa_identity_new_config to
libbalsa_identity_new_from_config
libbalsa/identity.c | 4 +-
libbalsa/identity.h | 192 +++++++++++++++++++++++++++++----------------------
src/save-restore.c | 4 +-
3 files changed, 114 insertions(+), 86 deletions(-)
---
diff --git a/libbalsa/identity.c b/libbalsa/identity.c
index aed5356..7ef1b7a 100644
--- a/libbalsa/identity.c
+++ b/libbalsa/identity.c
@@ -435,12 +435,12 @@ libbalsa_identity_set_smtp_server(LibBalsaIdentity * ident,
}
-/* libbalsa_identity_new_config:
+/* libbalsa_identity_new_from_config:
factory-type method creating new Identity object from given
configuration data.
*/
LibBalsaIdentity*
-libbalsa_identity_new_config(const gchar* name)
+libbalsa_identity_new_from_config(const gchar* name)
{
LibBalsaIdentity* ident;
gchar *fname, *email;
diff --git a/libbalsa/identity.h b/libbalsa/identity.h
index 69d8092..62004cd 100644
--- a/libbalsa/identity.h
+++ b/libbalsa/identity.h
@@ -22,7 +22,7 @@
#define __LIBBALSA_IDENTITY_H__
#ifndef BALSA_VERSION
-# error "Include config.h before this file."
+# error "Include config.h before this file."
#endif
#include <gmime/internet-address.h>
@@ -33,90 +33,118 @@
G_BEGIN_DECLS
#define LIBBALSA_TYPE_IDENTITY (libbalsa_identity_get_type ())
-G_DECLARE_FINAL_TYPE(LibBalsaIdentity, libbalsa_identity, LIBBALSA, IDENTITY, GObject)
-
- struct _LibBalsaIdentity
- {
- GObject object;
-
- gchar* identity_name;
-
- InternetAddress *ia;
- gchar* replyto;
- gchar* domain;
- gchar* bcc;
- gchar* reply_string;
- gchar* forward_string;
- gboolean send_mp_alternative;
-
- gchar* signature_path;
- gboolean sig_executable;
- gboolean sig_sending;
- gboolean sig_whenforward;
- gboolean sig_whenreply;
- gboolean sig_separator;
- gboolean sig_prepend;
- gchar *face;
- gchar *x_face;
- gboolean request_mdn;
- gboolean request_dsn;
-
- gboolean gpg_sign;
- gboolean gpg_encrypt;
- gboolean always_trust;
- gboolean warn_send_plain;
- gint crypt_protocol;
- gchar *force_gpg_key_id;
- gchar *force_smime_key_id;
- LibBalsaSmtpServer *smtp_server;
- };
-
- struct _LibBalsaIdentityClass
- {
- GObjectClass parent_class;
- };
+G_DECLARE_FINAL_TYPE(LibBalsaIdentity,
+ libbalsa_identity,
+ LIBBALSA,
+ IDENTITY,
+ GObject)
+
+struct _LibBalsaIdentity {
+ GObject object;
+
+ gchar *identity_name;
+
+ InternetAddress *ia;
+ gchar *replyto;
+ gchar *domain;
+ gchar *bcc;
+ gchar *reply_string;
+ gchar *forward_string;
+ gboolean send_mp_alternative;
+
+ gchar *signature_path;
+ gboolean sig_executable;
+ gboolean sig_sending;
+ gboolean sig_whenforward;
+ gboolean sig_whenreply;
+ gboolean sig_separator;
+ gboolean sig_prepend;
+ gchar *face;
+ gchar *x_face;
+ gboolean request_mdn;
+ gboolean request_dsn;
+
+ gboolean gpg_sign;
+ gboolean gpg_encrypt;
+ gboolean always_trust;
+ gboolean warn_send_plain;
+ gint crypt_protocol;
+ gchar *force_gpg_key_id;
+ gchar *force_smime_key_id;
+ LibBalsaSmtpServer *smtp_server;
+};
+
+struct _LibBalsaIdentityClass {
+ GObjectClass parent_class;
+};
/* Function prototypes */
- GObject* libbalsa_identity_new(void);
- GObject* libbalsa_identity_new_with_name(const gchar* ident_name);
-
- void libbalsa_identity_set_identity_name(LibBalsaIdentity*, const gchar*);
- void libbalsa_identity_set_address(LibBalsaIdentity*, InternetAddress*);
- void libbalsa_identity_set_replyto(LibBalsaIdentity*, const gchar*);
- void libbalsa_identity_set_domain(LibBalsaIdentity*, const gchar*);
- void libbalsa_identity_set_bcc(LibBalsaIdentity*, const gchar*);
- void libbalsa_identity_set_reply_string(LibBalsaIdentity* , const gchar*);
- void libbalsa_identity_set_forward_string(LibBalsaIdentity*, const gchar*);
- void libbalsa_identity_set_send_mp_alternative(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_signature_path(LibBalsaIdentity*, const gchar*);
- void libbalsa_identity_set_sig_executable(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_sig_sending(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_sig_whenforward(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_sig_whenreply(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_sig_separator(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_sig_prepend(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_face_path(LibBalsaIdentity*, const gchar*);
- void libbalsa_identity_set_x_face_path(LibBalsaIdentity*, const gchar*);
- void libbalsa_identity_set_request_mdn(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_request_dsn(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_always_trust(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_warn_send_plain(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_force_gpg_key_id(LibBalsaIdentity*, const gchar *);
- void libbalsa_identity_set_force_smime_key_id(LibBalsaIdentity*, const gchar *);
-
- gchar* libbalsa_identity_get_signature(LibBalsaIdentity *,
- GError **);
- void libbalsa_identity_set_smtp_server(LibBalsaIdentity * ident,
- LibBalsaSmtpServer *
- smtp_server);
-
- void libbalsa_identity_set_gpg_sign(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_gpg_encrypt(LibBalsaIdentity*, gboolean);
- void libbalsa_identity_set_crypt_protocol(LibBalsaIdentity* ident, gint);
-
- LibBalsaIdentity* libbalsa_identity_new_config(const gchar* name);
- void libbalsa_identity_save(LibBalsaIdentity* id, const gchar* prefix);
+GObject *libbalsa_identity_new(void);
+GObject *libbalsa_identity_new_with_name(const gchar *ident_name);
+
+void libbalsa_identity_set_identity_name(LibBalsaIdentity *ident,
+ const gchar *name);
+void libbalsa_identity_set_address(LibBalsaIdentity *ident,
+ InternetAddress *ia);
+void libbalsa_identity_set_replyto(LibBalsaIdentity *id,
+ const gchar *reply_to);
+void libbalsa_identity_set_domain(LibBalsaIdentity *ident,
+ const gchar *text);
+void libbalsa_identity_set_bcc(LibBalsaIdentity *ident,
+ const gchar *text);
+void libbalsa_identity_set_reply_string(LibBalsaIdentity *ident,
+ const gchar *text);
+void libbalsa_identity_set_forward_string(LibBalsaIdentity *ident,
+ const gchar *text);
+void libbalsa_identity_set_send_mp_alternative(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_signature_path(LibBalsaIdentity *ident,
+ const gchar *text);
+void libbalsa_identity_set_sig_executable(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_sig_sending(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_sig_whenforward(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_sig_whenreply(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_sig_separator(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_sig_prepend(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_face_path(LibBalsaIdentity *ident,
+ const gchar *text);
+void libbalsa_identity_set_x_face_path(LibBalsaIdentity *ident,
+ const gchar *text);
+void libbalsa_identity_set_request_mdn(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_request_dsn(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_always_trust(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_warn_send_plain(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_force_gpg_key_id(LibBalsaIdentity *ident,
+ const gchar *text);
+void libbalsa_identity_set_force_smime_key_id(LibBalsaIdentity *ident,
+ const gchar *text);
+
+gchar *libbalsa_identity_get_signature(LibBalsaIdentity *ident,
+ GError **error);
+void libbalsa_identity_set_smtp_server(LibBalsaIdentity *ident,
+ LibBalsaSmtpServer *smtp_server);
+
+void libbalsa_identity_set_gpg_sign(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_gpg_encrypt(LibBalsaIdentity *ident,
+ gboolean set);
+void libbalsa_identity_set_crypt_protocol(LibBalsaIdentity *ident,
+ gint proto);
+
+LibBalsaIdentity *libbalsa_identity_new_from_config(const gchar *name);
+void libbalsa_identity_save(LibBalsaIdentity *id,
+ const gchar *prefix);
G_END_DECLS
diff --git a/src/save-restore.c b/src/save-restore.c
index d06b9f8..6d8d5bf 100644
--- a/src/save-restore.c
+++ b/src/save-restore.c
@@ -1599,7 +1599,7 @@ config_identity_load(const gchar * key, const gchar * value, gpointer data)
gchar *smtp_server_name;
libbalsa_conf_push_group(key);
- ident = libbalsa_identity_new_config(value);
+ ident = libbalsa_identity_new_from_config(value);
smtp_server_name = libbalsa_conf_get_string("SmtpServer");
libbalsa_identity_set_smtp_server(ident,
find_smtp_server_by_name
@@ -1634,7 +1634,7 @@ config_identities_load()
libbalsa_conf_push_group("identity-default");
balsa_app.identities =
g_list_prepend(NULL,
- libbalsa_identity_new_config("default"));
+ libbalsa_identity_new_from_config("default"));
libbalsa_conf_pop_group();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]