* Fixes NB#77103, the message is not sent if the user does not select any recipient...
[modest] / src / maemo / modest-address-book.c
index 8fe6536..03e29d6 100644 (file)
@@ -170,12 +170,9 @@ modest_address_book_select_addresses (ModestRecptEditor *recpt_editor)
        GSList *email_addrs_per_contact = NULL;
        gchar *econtact_id;
        gboolean focus_recpt_editor = FALSE;
-       GtkWidget *toplevel;
 
        g_return_if_fail (MODEST_IS_RECPT_EDITOR (recpt_editor));
 
-       toplevel = gtk_widget_get_toplevel (GTK_WIDGET (recpt_editor));
-
        if (!open_addressbook ()) {
                if (contact_model) {
                        g_object_unref (contact_model);
@@ -882,17 +879,21 @@ resolve_address (const gchar *address, GSList **resolved_addresses, gchar **cont
        
        /* get the resolved contacts (can be no contact) */
        if (resolved_contacts) {
+               gboolean found;
                EContact *contact = (EContact *) resolved_contacts->data;
 
                *resolved_addresses = get_recipients_for_given_contact (contact);
                if (*resolved_addresses) {
                        *contact_id = g_strdup (e_contact_get_const (contact, E_CONTACT_UID));
+                       found = TRUE;
+               } else {
+                       found = FALSE;
                }
 
                g_list_foreach (resolved_contacts, (GFunc)unref_gobject, NULL);
                g_list_free (resolved_contacts);
 
-               return TRUE;
+               return found;
        } else {
                /* cancelled dialog to select more than one contact or
                 * selected no contact */