[balsa] Use more consistent macro name
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] Use more consistent macro name
- Date: Thu, 11 Jul 2019 16:32:56 +0000 (UTC)
commit 62e7adedd5b9f048464d5639529a59d2e79f012d
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Thu Jul 11 12:30:30 2019 -0400
Use more consistent macro name
Rename LIBBALSA_MAILBOX_REMOTE_SERVER() to
LIBBALSA_MAILBOX_REMOTE_GET_SERVER()
* libbalsa/mailbox_imap.c (libbalsa_mailbox_imap_dispose),
(libbalsa_mailbox_imap_update_url), (clean_cache),
(libbalsa_mailbox_imap_get_handle),
(libbalsa_mailbox_imap_get_selected_handle), (lbm_imap_check),
(libbalsa_mailbox_imap_save_config),
(libbalsa_mailbox_imap_reconnect),
(libbalsa_mailbox_imap_fetch_structure),
(libbalsa_mailbox_imap_messages_copy):
* libbalsa/mailbox_pop3.c (libbalsa_mailbox_pop3_check),
(libbalsa_mailbox_pop3_save_config),
(libbalsa_mailbox_pop3_load_config):
* libbalsa/mailbox_remote.h:
* libinit_balsa/assistant_page_directory.c (unconditional_mailbox):
* libinit_balsa/assistant_page_user.c (create_pop3_mbx):
* src/mailbox-conf.c (update_pop_mailbox),
(create_pop_mailbox_dialog):
* src/save-restore.c (config_mailbox_init):
ChangeLog | 23 +++++++++++++++++++++++
libbalsa/mailbox_imap.c | 26 +++++++++++++-------------
libbalsa/mailbox_pop3.c | 6 +++---
libbalsa/mailbox_remote.h | 2 +-
libinit_balsa/assistant_page_directory.c | 4 ++--
libinit_balsa/assistant_page_user.c | 2 +-
src/mailbox-conf.c | 4 ++--
src/save-restore.c | 2 +-
8 files changed, 46 insertions(+), 23 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6c70d0aab..2158d7b4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2019-07-11 Peter Bloomfield <pbloomfield bellsouth net>
+
+ Rename LIBBALSA_MAILBOX_REMOTE_SERVER() to
+ LIBBALSA_MAILBOX_REMOTE_GET_SERVER()
+
+ * libbalsa/mailbox_imap.c (libbalsa_mailbox_imap_dispose),
+ (libbalsa_mailbox_imap_update_url), (clean_cache),
+ (libbalsa_mailbox_imap_get_handle),
+ (libbalsa_mailbox_imap_get_selected_handle), (lbm_imap_check),
+ (libbalsa_mailbox_imap_save_config),
+ (libbalsa_mailbox_imap_reconnect),
+ (libbalsa_mailbox_imap_fetch_structure),
+ (libbalsa_mailbox_imap_messages_copy):
+ * libbalsa/mailbox_pop3.c (libbalsa_mailbox_pop3_check),
+ (libbalsa_mailbox_pop3_save_config),
+ (libbalsa_mailbox_pop3_load_config):
+ * libbalsa/mailbox_remote.h:
+ * libinit_balsa/assistant_page_directory.c (unconditional_mailbox):
+ * libinit_balsa/assistant_page_user.c (create_pop3_mbx):
+ * src/mailbox-conf.c (update_pop_mailbox),
+ (create_pop_mailbox_dialog):
+ * src/save-restore.c (config_mailbox_init):
+
2019-07-11 Peter Bloomfield <pbloomfield bellsouth net>
* libbalsa/mailbox_imap.c (libbalsa_mailbox_imap_messages_copy):
diff --git a/libbalsa/mailbox_imap.c b/libbalsa/mailbox_imap.c
index 9e00e9646..15d675063 100644
--- a/libbalsa/mailbox_imap.c
+++ b/libbalsa/mailbox_imap.c
@@ -280,7 +280,7 @@ libbalsa_mailbox_imap_dispose(GObject * object)
LibBalsaServer *server;
mimap = LIBBALSA_MAILBOX_IMAP(object);
- server = LIBBALSA_MAILBOX_REMOTE_SERVER(object);
+ server = LIBBALSA_MAILBOX_REMOTE_GET_SERVER(object);
if (server != NULL) {
g_signal_handlers_disconnect_matched(server,
G_SIGNAL_MATCH_DATA, 0,
@@ -324,7 +324,7 @@ libbalsa_mailbox_imap_new(void)
void
libbalsa_mailbox_imap_update_url(LibBalsaMailboxImap* mailbox)
{
- LibBalsaServer *s = LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox);
+ LibBalsaServer *s = LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox);
gchar *url;
url = libbalsa_imap_url(s, mailbox->path);
@@ -540,7 +540,7 @@ clean_dir(const char *dir_name, off_t cache_size)
static gboolean
clean_cache(LibBalsaMailbox* mailbox)
{
- LibBalsaServer *s= LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox);
+ LibBalsaServer *s= LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox);
gboolean is_persistent =
libbalsa_imap_server_has_persistent_cache(LIBBALSA_IMAP_SERVER(s));
gchar* dir;
@@ -616,7 +616,7 @@ libbalsa_mailbox_imap_get_handle(LibBalsaMailboxImap *mimap, GError **err)
g_return_val_if_fail(LIBBALSA_MAILBOX_IMAP(mimap), NULL);
if(!mimap->handle) {
- LibBalsaServer *server = LIBBALSA_MAILBOX_REMOTE_SERVER(mimap);
+ LibBalsaServer *server = LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mimap);
LibBalsaImapServer *imap_server;
if (!LIBBALSA_IS_IMAP_SERVER(server))
return NULL;
@@ -631,7 +631,7 @@ libbalsa_mailbox_imap_get_handle(LibBalsaMailboxImap *mimap, GError **err)
#define RELEASE_HANDLE(mailbox,handle) \
libbalsa_imap_server_release_handle( \
- LIBBALSA_IMAP_SERVER(LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox)),\
+ LIBBALSA_IMAP_SERVER(LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox)),\
handle)
static void
@@ -959,7 +959,7 @@ libbalsa_mailbox_imap_get_selected_handle(LibBalsaMailboxImap *mimap,
unsigned uidval;
gboolean readonly = FALSE;
- server = LIBBALSA_MAILBOX_REMOTE_SERVER(mimap);
+ server = LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mimap);
if (!LIBBALSA_IS_IMAP_SERVER(server))
return NULL;
imap_server = LIBBALSA_IMAP_SERVER(server);
@@ -1271,7 +1271,7 @@ static gboolean
lbm_imap_check(LibBalsaMailbox * mailbox)
{
LibBalsaMailboxImap *mimap = LIBBALSA_MAILBOX_IMAP(mailbox);
- LibBalsaServer *server = LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox);
+ LibBalsaServer *server = LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox);
ImapMboxHandle *handle;
gulong id;
@@ -1637,7 +1637,7 @@ libbalsa_mailbox_imap_save_config(LibBalsaMailbox * mailbox,
libbalsa_conf_set_string("Path", mimap->path);
libbalsa_conf_set_bool("Migrated", TRUE);
- libbalsa_server_save_config(LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox));
+ libbalsa_server_save_config(LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox));
if (LIBBALSA_MAILBOX_CLASS(libbalsa_mailbox_imap_parent_class)->save_config)
LIBBALSA_MAILBOX_CLASS(libbalsa_mailbox_imap_parent_class)->save_config(mailbox, prefix);
@@ -1722,11 +1722,11 @@ libbalsa_mailbox_imap_reconnect(LibBalsaMailboxImap* mimap)
gboolean readonly;
printf("Reconnecting %s (%u)\n",
- libbalsa_server_get_host(LIBBALSA_MAILBOX_REMOTE_SERVER(mimap)),
+ libbalsa_server_get_host(LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mimap)),
(unsigned)time(NULL));
if (imap_mbox_handle_reconnect(mimap->handle, &readonly) == IMAP_SUCCESS) {
printf("Reconnected %s (%u)\n",
- libbalsa_server_get_host(LIBBALSA_MAILBOX_REMOTE_SERVER(mimap)),
+ libbalsa_server_get_host(LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mimap)),
(unsigned)time(NULL));
}
libbalsa_mailbox_set_readonly(LIBBALSA_MAILBOX(mimap), readonly);
@@ -2208,7 +2208,7 @@ libbalsa_mailbox_imap_fetch_structure(LibBalsaMailbox *mailbox,
something else, like "audio", "*" - we do not prefetch such
parts yet. Also, we save some RTTS for very small messages by
fetching them in their entirety. */
- server = LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox);
+ server = LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox);
if(!imap_mbox_handle_can_do(mimap->handle, IMCAP_FETCHBODY) ||
libbalsa_imap_server_has_bug(LIBBALSA_IMAP_SERVER(server),
ISBUG_FETCH) ||
@@ -3286,9 +3286,9 @@ libbalsa_mailbox_imap_messages_copy(LibBalsaMailbox * mailbox,
LibBalsaMailbox * dest, GError **err)
{
LibBalsaMailboxImap *mimap = LIBBALSA_MAILBOX_IMAP(mailbox);
- LibBalsaServer *server = LIBBALSA_MAILBOX_REMOTE_SERVER(mimap);
+ LibBalsaServer *server = LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mimap);
- if (LIBBALSA_IS_MAILBOX_IMAP(dest) && LIBBALSA_MAILBOX_REMOTE_SERVER(dest) == server) {
+ if (LIBBALSA_IS_MAILBOX_IMAP(dest) && LIBBALSA_MAILBOX_REMOTE_GET_SERVER(dest) == server) {
LibBalsaMailboxImap *mimap_dest = (LibBalsaMailboxImap *) dest;
gboolean ret;
ImapMboxHandle *handle = mimap->handle;
diff --git a/libbalsa/mailbox_pop3.c b/libbalsa/mailbox_pop3.c
index 24de870aa..907ccb2e6 100644
--- a/libbalsa/mailbox_pop3.c
+++ b/libbalsa/mailbox_pop3.c
@@ -633,7 +633,7 @@ libbalsa_mailbox_pop3_check(LibBalsaMailbox * mailbox)
return;
}
- server = LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox_pop3);
+ server = LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox_pop3);
/* open the mailbox connection and get the messages list (note: initiates the progress dialogue) */
pop = libbalsa_mailbox_pop3_startup(server, mailbox_pop3,
@@ -719,7 +719,7 @@ libbalsa_mailbox_pop3_save_config(LibBalsaMailbox * mailbox,
{
LibBalsaMailboxPOP3 *mailbox_pop3;
- libbalsa_server_save_config(LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox));
+ libbalsa_server_save_config(LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox));
mailbox_pop3 = LIBBALSA_MAILBOX_POP3(mailbox);
@@ -744,7 +744,7 @@ libbalsa_mailbox_pop3_load_config(LibBalsaMailbox * mailbox,
mailbox_pop3 = LIBBALSA_MAILBOX_POP3(mailbox);
- libbalsa_server_load_config(LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox));
+ libbalsa_server_load_config(LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox));
mailbox_pop3->check = libbalsa_conf_get_bool("Check=false");
mailbox_pop3->delete_from_server = libbalsa_conf_get_bool("Delete=false");
diff --git a/libbalsa/mailbox_remote.h b/libbalsa/mailbox_remote.h
index 050e33f4a..77d84e5a9 100644
--- a/libbalsa/mailbox_remote.h
+++ b/libbalsa/mailbox_remote.h
@@ -43,7 +43,7 @@ struct _LibBalsaMailboxRemoteClass {
LibBalsaServer *libbalsa_mailbox_remote_get_server(LibBalsaMailboxRemote *remote);
/* Macro to avoid casts: */
-#define LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox) \
+#define LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox) \
libbalsa_mailbox_remote_get_server(LIBBALSA_MAILBOX_REMOTE(mailbox))
void libbalsa_mailbox_remote_set_server(LibBalsaMailboxRemote *remote,
diff --git a/libinit_balsa/assistant_page_directory.c b/libinit_balsa/assistant_page_directory.c
index b99c65767..31f366f42 100644
--- a/libinit_balsa/assistant_page_directory.c
+++ b/libinit_balsa/assistant_page_directory.c
@@ -128,11 +128,11 @@ unconditional_mailbox(const gchar * path, const gchar * prettyname,
}
if (is_remote) {
- libbalsa_server_set_host(LIBBALSA_MAILBOX_REMOTE_SERVER(*box),
+ libbalsa_server_set_host(LIBBALSA_MAILBOX_REMOTE_GET_SERVER(*box),
url.host,
ssl ? NET_CLIENT_CRYPT_ENCRYPTED :
NET_CLIENT_CRYPT_NONE);
- libbalsa_server_set_username(LIBBALSA_MAILBOX_REMOTE_SERVER(*box),
+ libbalsa_server_set_username(LIBBALSA_MAILBOX_REMOTE_GET_SERVER(*box),
getenv("USER"));
}
g_free(dup);
diff --git a/libinit_balsa/assistant_page_user.c b/libinit_balsa/assistant_page_user.c
index da91ff084..128378a78 100644
--- a/libinit_balsa/assistant_page_user.c
+++ b/libinit_balsa/assistant_page_user.c
@@ -199,7 +199,7 @@ create_pop3_mbx(const gchar *name, const gchar* host, gint security,
{
LibBalsaMailboxPOP3 *mailbox_pop3 = libbalsa_mailbox_pop3_new();
LibBalsaMailbox *mailbox = LIBBALSA_MAILBOX(mailbox_pop3);
- LibBalsaServer *server = LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox);
+ LibBalsaServer *server = LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox);
gchar *mailbox_name;
libbalsa_server_set_username(server, login);
diff --git a/src/mailbox-conf.c b/src/mailbox-conf.c
index 874e3e5f6..219ebeb0b 100644
--- a/src/mailbox-conf.c
+++ b/src/mailbox-conf.c
@@ -490,7 +490,7 @@ update_pop_mailbox(MailboxConfWindow *mcw)
gchar *name;
mailbox_pop3 = LIBBALSA_MAILBOX_POP3(mcw->mailbox);
- server = LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox_pop3);
+ server = LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox_pop3);
mailbox = (LibBalsaMailbox *) mailbox_pop3;
/* basic data */
@@ -794,7 +794,7 @@ create_pop_mailbox_dialog(MailboxConfWindow *mcw)
#endif
mcw->mb_data.pop3.server_cfg =
- libbalsa_server_cfg_new(LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox),
+ libbalsa_server_cfg_new(LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox),
libbalsa_mailbox_get_name(mailbox));
gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(mcw->window))),
GTK_WIDGET(mcw->mb_data.pop3.server_cfg));
g_signal_connect(mcw->mb_data.pop3.server_cfg, "changed", G_CALLBACK(check_for_blank_fields), mcw);
diff --git a/src/save-restore.c b/src/save-restore.c
index c87b34ea2..6ff1c8d53 100644
--- a/src/save-restore.c
+++ b/src/save-restore.c
@@ -476,7 +476,7 @@ config_mailbox_init(const gchar * prefix)
if (mailbox == NULL)
return FALSE;
if (LIBBALSA_IS_MAILBOX_REMOTE(mailbox)) {
- LibBalsaServer *server = LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox);
+ LibBalsaServer *server = LIBBALSA_MAILBOX_REMOTE_GET_SERVER(mailbox);
libbalsa_server_connect_signals(server,
G_CALLBACK(ask_password), NULL);
g_signal_connect_swapped(server, "config-changed",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]