static void addressbook_model_client_notify_readonly_cb (EClientCache *client_cache, EClient *client, GParamSpec *pspec, EAddressbookModel *model) { if (!E_IS_BOOK_CLIENT (client)) return; if (E_BOOK_CLIENT (client) == model->priv->book_client) { gboolean editable = !e_client_is_readonly (client); e_addressbook_model_set_editable (model, editable); } }
static gpointer call_get_view (gpointer user_data) { EBookQuery *query; EBookClient *book_client = user_data; gchar *sexp; g_return_val_if_fail (book_client != NULL, NULL); g_return_val_if_fail (E_IS_BOOK_CLIENT (book_client), NULL); query = e_book_query_any_field_contains (""); sexp = e_book_query_to_string (query); e_book_query_unref (query); e_book_client_get_view (book_client, sexp, NULL, get_view_cb, NULL); g_free (sexp); return NULL; }