diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-08-13 02:16:04 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-08-13 02:16:04 +0800 |
commit | cfc8ef4c6ca14603c9ea8dd8429e8297e9c51980 (patch) | |
tree | 1624757b388826972c4fc5a47a23e112a02ce203 /mail/mail-send-recv.c | |
parent | 6be2668e483cfc7a2e75ae2efcd9675388d08601 (diff) | |
download | gsoc2013-evolution-cfc8ef4c6ca14603c9ea8dd8429e8297e9c51980.tar gsoc2013-evolution-cfc8ef4c6ca14603c9ea8dd8429e8297e9c51980.tar.gz gsoc2013-evolution-cfc8ef4c6ca14603c9ea8dd8429e8297e9c51980.tar.bz2 gsoc2013-evolution-cfc8ef4c6ca14603c9ea8dd8429e8297e9c51980.tar.lz gsoc2013-evolution-cfc8ef4c6ca14603c9ea8dd8429e8297e9c51980.tar.xz gsoc2013-evolution-cfc8ef4c6ca14603c9ea8dd8429e8297e9c51980.tar.zst gsoc2013-evolution-cfc8ef4c6ca14603c9ea8dd8429e8297e9c51980.zip |
Adapt to CamelService API changes.
camel_service_get_settings() is now camel_service_ref_settings()
and it returns a new CamelSettings reference which the caller must
release with g_object_unref().
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r-- | mail/mail-send-recv.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index d2190a244d..4dd68f631c 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -370,9 +370,9 @@ format_service_name (CamelService *service) CamelSettings *settings; gchar *service_name = NULL; const gchar *display_name; - const gchar *host = NULL; - const gchar *path = NULL; gchar *pretty_url = NULL; + gchar *host = NULL; + gchar *path = NULL; gchar *user = NULL; gchar *cp; gboolean have_host = FALSE; @@ -380,11 +380,12 @@ format_service_name (CamelService *service) gboolean have_user = FALSE; provider = camel_service_get_provider (service); - settings = camel_service_get_settings (service); display_name = camel_service_get_display_name (service); + settings = camel_service_ref_settings (service); + if (CAMEL_IS_NETWORK_SETTINGS (settings)) { - host = camel_network_settings_get_host ( + host = camel_network_settings_dup_host ( CAMEL_NETWORK_SETTINGS (settings)); have_host = (host != NULL) && (*host != '\0'); @@ -394,11 +395,13 @@ format_service_name (CamelService *service) } if (CAMEL_IS_LOCAL_SETTINGS (settings)) { - path = camel_local_settings_get_path ( + path = camel_local_settings_dup_path ( CAMEL_LOCAL_SETTINGS (settings)); have_path = (path != NULL) && (*path != '\0'); } + g_object_unref (settings); + /* Shorten user names with '@', since multiple '@' in a * 'user@host' label look weird. This is just supposed * to be a hint anyway so it doesn't matter if it's not @@ -433,6 +436,8 @@ format_service_name (CamelService *service) } g_free (service_name); + g_free (host); + g_free (path); g_free (user); return pretty_url; @@ -491,7 +496,7 @@ get_keep_on_server (CamelService *service) CamelSettings *settings; gboolean keep_on_server = FALSE; - settings = camel_service_get_settings (service); + settings = camel_service_ref_settings (service); class = G_OBJECT_GET_CLASS (settings); /* XXX This is a POP3-specific setting. */ @@ -500,6 +505,8 @@ get_keep_on_server (CamelService *service) settings, "keep-on-server", &keep_on_server, NULL); + g_object_unref (settings); + return keep_on_server; } |