}
void
-modest_address_book_add_address (const gchar *address)
+modest_address_book_add_address (const gchar *address,
+ GtkWindow *parent)
{
GtkWidget *dialog = NULL;
gchar *email_address;
}
email_address = modest_text_utils_get_email_address (address);
-
+
attribute = e_vcard_attribute_new (NULL, EVC_EMAIL);
e_vcard_attribute_add_value (attribute, email_address);
- dialog = osso_abook_temporary_contact_dialog_new (NULL, book, attribute, NULL);
+ dialog = osso_abook_temporary_contact_dialog_new (parent, book, attribute, NULL);
+
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
gtk_widget_destroy (picker_dialog);
if (selected)
- modest_address_book_add_address (selected);
+ modest_address_book_add_address (selected, (GtkWindow *) self);
g_free (selected);
} else {
}
void
-modest_address_book_add_address (const gchar *address)
+modest_address_book_add_address (const gchar *address,
+ GtkWindow *parent)
{
OssoABookAccount *account = NULL;
GtkWidget *dialog = NULL;
}
email_address = modest_text_utils_get_email_address (address);
-
+
account = osso_abook_account_get (EVC_EMAIL, NULL, email_address);
g_free (email_address);
if (account)
{
dialog = osso_abook_add_to_contacts_dialog_new (contact_model, account);
g_object_unref (account);
+
+ modest_window_mgr_set_modal (modest_runtime_get_window_mgr(),
+ (GtkWindow *) parent,
+ (GtkWindow *) dialog);
+
gtk_dialog_run (GTK_DIALOG (dialog));
if (contact_model) {
#include "modest-address-book.h"
-void modest_address_book_add_address (const gchar *address)
+void modest_address_book_add_address (const gchar *address,
+ GtkWindow *parent)
{
g_debug ("trying to add '%s' to non-existing address book",
address);
* launches the UI for adding @address to the addressbook
*/
void
-modest_address_book_add_address (const gchar *address);
+modest_address_book_add_address (const gchar *address,
+ GtkWindow *parent);
/**
* modest_address_book_select_addresses:
clipboard = gtk_clipboard_get (GDK_SELECTION_PRIMARY);
selection = gtk_clipboard_wait_for_text (clipboard);
- /* Question: why is the clipboard being used here?
- * It doesn't really make a lot of sense. */
-
- if (selection)
- {
- modest_address_book_add_address (selection);
+ if (selection) {
+ modest_address_book_add_address (selection, (GtkWindow *) win);
g_free (selection);
}
}