From: Jose Dapena Paz Date: Fri, 21 Nov 2008 21:30:53 +0000 (+0000) Subject: * Fix osso addressbook detection in configure.ac. X-Git-Tag: git_migration_finished~994 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=b3441828246df65005b0afa4408be0848587cb25 * Fix osso addressbook detection in configure.ac. * Update to new addressbook API. pmo-trunk-r6376 --- diff --git a/configure.ac b/configure.ac index 6492937..7c86bbc 100644 --- a/configure.ac +++ b/configure.ac @@ -445,11 +445,18 @@ fi # 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) + 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 - 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"]) diff --git a/src/hildon2/modest-address-book.c b/src/hildon2/modest-address-book.c index 49a7b3e..4b2fdfd 100644 --- a/src/hildon2/modest-address-book.c +++ b/src/hildon2/modest-address-book.c @@ -176,7 +176,7 @@ modest_address_book_select_addresses (ModestRecptEditor *recpt_editor) 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; @@ -213,13 +213,14 @@ modest_address_book_select_addresses (ModestRecptEditor *recpt_editor) } #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