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/widgets | |
parent | 397b15ff4aa5afd1d5c7e0a093a33616624401cf (diff) | |
download | gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.tar gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.tar.gz gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.tar.bz2 gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.tar.lz gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.tar.xz gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.tar.zst gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.zip |
Adapt to libedataserver[ui] changes.
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/ea-minicard-view.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 27 |
3 files changed, 21 insertions, 10 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 50f50c9203..5dce1e2a74 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1099,7 +1099,7 @@ folder_bar_message (EAddressbookView *view, if (view->priv->source == NULL) return; - display_name = e_source_peek_name (view->priv->source); + display_name = e_source_get_display_name (view->priv->source); e_shell_sidebar_set_primary_text (shell_sidebar, display_name); e_shell_sidebar_set_secondary_text (shell_sidebar, message); } diff --git a/addressbook/gui/widgets/ea-minicard-view.c b/addressbook/gui/widgets/ea-minicard-view.c index 6772a0bf80..65b20feb1a 100644 --- a/addressbook/gui/widgets/ea-minicard-view.c +++ b/addressbook/gui/widgets/ea-minicard-view.c @@ -165,7 +165,7 @@ ea_minicard_view_get_name (AtkObject *accessible) g_object_get (card_view->adapter, "client", &book_client, NULL); g_return_val_if_fail (E_IS_BOOK_CLIENT (book_client), NULL); source = e_client_get_source (E_CLIENT (book_client)); - display_name = e_source_peek_name (source); + display_name = e_source_get_display_name (source); if (display_name == NULL) display_name = ""; diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 535e1bd3f0..3d9d819d06 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -134,7 +134,7 @@ eab_load_error_dialog (GtkWidget *parent, source_dir = e_source_peek_relative_uri (source); if (!source_dir || !g_str_equal (source_dir, "system")) - source_dir = e_source_peek_uid (source); + source_dir = e_source_get_uid (source); /* Mangle the URI to not contain invalid characters. */ mangled_source_dir = g_strdelimit (g_strdup (source_dir), ":/", '_'); @@ -285,11 +285,16 @@ source_selection_changed_cb (ESourceSelector *selector, GtkWidget *ok_button) { ESource *except_source = NULL, *selected; + gboolean sensitive; except_source = g_object_get_data (G_OBJECT (ok_button), "except-source"); - selected = e_source_selector_get_primary_selection (selector); + selected = e_source_selector_ref_primary_selection (selector); - gtk_widget_set_sensitive (ok_button, selected && selected != except_source); + sensitive = (selected != NULL && selected != except_source); + gtk_widget_set_sensitive (ok_button, sensitive); + + if (selected != NULL) + g_object_unref (selected); } ESource * @@ -335,7 +340,7 @@ eab_select_source (ESource *except_source, g_object_set_data ( G_OBJECT (ok_button), "except-source", e_source_list_peek_source_by_uid ( - source_list, e_source_peek_uid (except_source))); + source_list, e_source_get_uid (except_source))); g_signal_connect ( selector, "primary_selection_changed", @@ -343,7 +348,7 @@ eab_select_source (ESource *except_source, if (select_uid) { source = e_source_list_peek_source_by_uid (source_list, select_uid); - if (source) + if (source != NULL) e_source_selector_set_primary_selection ( E_SOURCE_SELECTOR (selector), source); } @@ -359,11 +364,17 @@ eab_select_source (ESource *except_source, response = gtk_dialog_run (GTK_DIALOG (dialog)); if (response == GTK_RESPONSE_ACCEPT) - source = e_source_selector_get_primary_selection (E_SOURCE_SELECTOR (selector)); + source = e_source_selector_ref_primary_selection ( + E_SOURCE_SELECTOR (selector)); else source = NULL; gtk_widget_destroy (dialog); + + /* XXX Return a borrowed reference for backward-compatibility. */ + if (source != NULL) + g_object_unref (source); + return source; } @@ -590,9 +601,9 @@ eab_transfer_contacts (EBookClient *source_client, if (!destination) return; - if (strcmp (last_uid, e_source_peek_uid (destination)) != 0) { + if (strcmp (last_uid, e_source_get_uid (destination)) != 0) { g_free (last_uid); - last_uid = g_strdup (e_source_peek_uid (destination)); + last_uid = g_strdup (e_source_get_uid (destination)); } process = g_new (ContactCopyProcess, 1); |