diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-04-22 02:52:23 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-04-22 05:07:15 +0800 |
commit | 7950d6a0c6efd6c4d48afd99c138f38952bdd1bb (patch) | |
tree | 3a8fd7957dd29441120d2db18ccb1cc23f5935f2 /addressbook/gui/contact-list-editor | |
parent | 397b15ff4aa5afd1d5c7e0a093a33616624401cf (diff) | |
download | gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.tar.gz gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.tar.zst gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.zip |
Adapt to libedataserver[ui] changes.
Diffstat (limited to 'addressbook/gui/contact-list-editor')
-rw-r--r-- | addressbook/gui/contact-list-editor/e-contact-list-editor.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index 3db6c4cca7..385ce096eb 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -935,21 +935,31 @@ contact_list_editor_source_menu_changed_cb (GtkWidget *widget); void contact_list_editor_source_menu_changed_cb (GtkWidget *widget) { + ESourceComboBox *combo_box; EContactListEditor *editor; - ESource *source; + ESource *active_source; + ESource *client_source; + EClient *client; editor = contact_list_editor_extract (widget); - source = e_source_combo_box_get_active (E_SOURCE_COMBO_BOX (widget)); - if (e_source_equal (e_client_get_source (E_CLIENT (editor->priv->book_client)), source)) - return; + combo_box = E_SOURCE_COMBO_BOX (widget); + active_source = e_source_combo_box_ref_active (combo_box); + g_return_if_fail (active_source != NULL); + + client = E_CLIENT (editor->priv->book_client); + client_source = e_client_get_source (client); + + if (!e_source_equal (client_source, active_source)) + e_client_utils_open_new ( + client_source, E_CLIENT_SOURCE_TYPE_CONTACTS, + FALSE, NULL, + e_client_utils_authenticate_handler, + eab_editor_get_window (EAB_EDITOR (editor)), + contact_list_editor_book_loaded_cb, + g_object_ref (editor)); - e_client_utils_open_new ( - source, E_CLIENT_SOURCE_TYPE_CONTACTS, FALSE, NULL, - e_client_utils_authenticate_handler, - eab_editor_get_window (EAB_EDITOR (editor)), - contact_list_editor_book_loaded_cb, - g_object_ref (editor)); + g_object_unref (active_source); } gboolean |