diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-11-10 11:40:00 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-11-11 04:54:43 +0800 |
commit | 2c4ae5e7685c462f8d464448e4617b8dea029e72 (patch) | |
tree | c34f0cbb7c500ff70f10fce846631b0a948b341c /plugins/bbdb | |
parent | 583da46b8caf4b2a8b548b03c38fe0e84164abfb (diff) | |
download | gsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.tar.gz gsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.tar.zst gsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'plugins/bbdb')
-rw-r--r-- | plugins/bbdb/bbdb.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c index b06d168fed..c19551944b 100644 --- a/plugins/bbdb/bbdb.c +++ b/plugins/bbdb/bbdb.c @@ -361,7 +361,7 @@ bbdb_do_it (EBookClient *client, g_error_free (error); } - g_object_unref (G_OBJECT (contact)); + g_object_unref (contact); g_free (uid); } @@ -383,7 +383,7 @@ bbdb_create_book_client (gint type) if (type == AUTOMATIC_CONTACTS_ADDRESSBOOK) enable = g_settings_get_boolean (settings, CONF_KEY_ENABLE); if (!enable) { - g_object_unref (G_OBJECT (settings)); + g_object_unref (settings); return NULL; } @@ -394,7 +394,7 @@ bbdb_create_book_client (gint type) else uid = g_settings_get_string ( settings, CONF_KEY_WHICH_ADDRESSBOOK); - g_object_unref (G_OBJECT (settings)); + g_object_unref (settings); shell = e_shell_get_default (); registry = e_shell_get_registry (shell); @@ -428,11 +428,14 @@ bbdb_open_book_client (EBookClient *client) if (!client) return FALSE; - if (!e_client_open_sync (E_CLIENT (client), FALSE, NULL, &error)) { - g_warning ("bbdb: failed to open addressbook: %s", error ? error->message : "Unknown error"); - if (error) - g_error_free (error); + e_client_open_sync (E_CLIENT (client), FALSE, NULL, &error); + + if (error != NULL) { + g_warning ( + "bbdb: failed to open addressbook: %s", + error->message); g_object_unref (client); + g_error_free (error); return FALSE; } @@ -448,7 +451,7 @@ bbdb_check_gaim_enabled (void) settings = g_settings_new (CONF_SCHEMA); gaim_enabled = g_settings_get_boolean (settings, CONF_KEY_ENABLE_GAIM); - g_object_unref (G_OBJECT (settings)); + g_object_unref (settings); return gaim_enabled; } |