aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor/e-contact-quick-add.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-04-22 02:52:23 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-04-22 05:07:15 +0800
commit7950d6a0c6efd6c4d48afd99c138f38952bdd1bb (patch)
tree3a8fd7957dd29441120d2db18ccb1cc23f5935f2 /addressbook/gui/contact-editor/e-contact-quick-add.c
parent397b15ff4aa5afd1d5c7e0a093a33616624401cf (diff)
downloadgsoc2013-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/contact-editor/e-contact-quick-add.c')
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c
index 7c303e7725..69b35b6cdb 100644
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ b/addressbook/gui/contact-editor/e-contact-quick-add.c
@@ -156,12 +156,13 @@ merge_cb (GObject *source_object,
if (!e_client_is_readonly (client))
eab_merging_book_add_contact (
- E_BOOK_CLIENT (client), qa->contact, NULL, NULL);
+ E_BOOK_CLIENT (client),
+ qa->contact, NULL, NULL);
else
e_alert_run_dialog_for_args (
e_shell_get_active_window (NULL),
"addressbook:error-read-only",
- e_source_peek_name (source),
+ e_source_get_display_name (source),
NULL);
if (qa->cb)
@@ -312,7 +313,8 @@ ce_have_book (GObject *source_object,
g_return_if_fail (E_IS_CLIENT (client));
eab_merging_book_find_contact (
- E_BOOK_CLIENT (client), qa->contact, ce_have_contact, qa);
+ E_BOOK_CLIENT (client),
+ qa->contact, ce_have_contact, qa);
}
static void
@@ -389,13 +391,16 @@ clicked_cb (GtkWidget *w,
static void
sanitize_widgets (QuickAdd *qa)
{
+ GtkComboBox *combo_box;
+ const gchar *active_id;
gboolean enabled = TRUE;
g_return_if_fail (qa != NULL);
g_return_if_fail (qa->dialog != NULL);
- enabled = (e_source_combo_box_get_active_uid (
- E_SOURCE_COMBO_BOX (qa->combo_box)) != NULL);
+ combo_box = GTK_COMBO_BOX (qa->combo_box);
+ active_id = gtk_combo_box_get_active_id (combo_box);
+ enabled = (active_id != NULL);
gtk_dialog_set_response_sensitive (
GTK_DIALOG (qa->dialog),
@@ -410,12 +415,12 @@ source_changed (ESourceComboBox *source_combo_box,
{
ESource *source;
- source = e_source_combo_box_get_active (source_combo_box);
+ source = e_source_combo_box_ref_active (source_combo_box);
if (source != NULL) {
if (qa->source != NULL)
g_object_unref (qa->source);
- qa->source = g_object_ref (source);
+ qa->source = source; /* takes reference */
}
sanitize_widgets (qa);