* Update to new addressbook API.
pmo-trunk-r6376
#
if test "x$with_platform" == "xmaemo"; then
PKG_CHECK_MODULES(MODEST_ABOOK,osso-addressbook-1.0,have_abook=true,have_abook=false)
#
if test "x$with_platform" == "xmaemo"; then
PKG_CHECK_MODULES(MODEST_ABOOK,osso-addressbook-1.0,have_abook=true,have_abook=false)
+ abook_api=`$PKG_CONFIG --modversion osso-addressbook-1.0 | cut -d. -f1`
AC_SUBST(MODEST_ABOOK_CFLAGS)
AC_SUBST(MODEST_ABOOK_LIBS)
AC_SUBST(MODEST_ABOOK_CFLAGS)
AC_SUBST(MODEST_ABOOK_LIBS)
+ if test "x$have_abook" == "xfalse"; then
+ PKG_CHECK_MODULES(MODEST_ABOOK, libosso-abook-1.0,have_abook=true,have_abook=false)
+ abook_api=`$PKG_CONFIG --modversion libosso-abook-1.0 | cut -d. -f1`
+ AC_SUBST(MODEST_ABOOK_CFLAGS)
+ AC_SUBST(MODEST_ABOOK_LIBE)
+ fi
+
if test "x$have_abook" == "xtrue"; then
if test "x$have_abook" == "xtrue"; then
- abook_api=`$PKG_CONFIG --modversion osso-addressbook-1.0 | cut -d. -f1`
AC_DEFINE_UNQUOTED(OSSO_ABOOK_ENABLE_DEPRECATED, 1, ["use deprecated addressbook API"])
AC_DEFINE_UNQUOTED(MODEST_ABOOK_API, $abook_api, ["the API version of osso-addressbook"])
AC_DEFINE_UNQUOTED(MODEST_HAVE_ABOOK, 1, ["whether we have osso-addressbook"])
AC_DEFINE_UNQUOTED(OSSO_ABOOK_ENABLE_DEPRECATED, 1, ["use deprecated addressbook API"])
AC_DEFINE_UNQUOTED(MODEST_ABOOK_API, $abook_api, ["the API version of osso-addressbook"])
AC_DEFINE_UNQUOTED(MODEST_HAVE_ABOOK, 1, ["whether we have osso-addressbook"])
GtkWidget *contact_dialog;
GtkWidget *toplevel;
#else /* MODEST_ABOOK_API < 4 */
GtkWidget *contact_dialog;
GtkWidget *toplevel;
#else /* MODEST_ABOOK_API < 4 */
- OssoABookContactChooser *contact_chooser = NULL;
+ GtkWidget *contact_chooser = NULL;
#endif /* MODEST_ABOOK_API < 4 */
GList *contacts_list = NULL;
#endif /* MODEST_ABOOK_API < 4 */
GList *contacts_list = NULL;
}
#else /* MODEST_ABOOK_API < 4 */
/* TODO: figure out how to make the contact chooser modal */
}
#else /* MODEST_ABOOK_API < 4 */
/* TODO: figure out how to make the contact chooser modal */
- contact_chooser = osso_abook_contact_chooser_new
- ("title", _("mcen_ti_select_recipients"),
- "help-topic", "",
- "minimum-selection", 1, NULL);
-
- if (osso_abook_contact_chooser_run (contact_chooser) == GTK_RESPONSE_OK)
- contacts_list = osso_abook_contact_chooser_get_selection (contact_chooser);
+ contact_chooser = osso_abook_contact_chooser_new_with_capabilities (NULL,
+ _("mcen_ti_select_recipients"),
+ OSSO_ABOOK_CAPS_EMAIL,
+ OSSO_ABOOK_CONTACT_ORDER_NAME);
+
+ if (gtk_dialog_run (GTK_DIALOG (contact_chooser)) == GTK_RESPONSE_OK)
+ contacts_list = osso_abook_contact_chooser_get_selection (OSSO_ABOOK_CONTACT_CHOOSER (contact_chooser));
+ gtk_widget_destroy (contact_chooser);
g_object_unref (contact_chooser);
#endif
g_object_unref (contact_chooser);
#endif