diff options
Diffstat (limited to 'addressbook/gui')
4 files changed, 20 insertions, 8 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index cabc1f7986..0e606c1c91 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -1043,7 +1043,7 @@ file_save_as_cb (GtkWidget *widget, gpointer data) e_card_simple_sync_card (ce->simple); card = ce->card; - e_contact_save_as(_("Save Contact as VCard"), card); + e_contact_save_as(_("Save Contact as VCard"), card, GTK_WINDOW (ce->app)); } static void diff --git a/addressbook/gui/contact-editor/e-contact-save-as.c b/addressbook/gui/contact-editor/e-contact-save-as.c index 78994ea405..f2251ee233 100644 --- a/addressbook/gui/contact-editor/e-contact-save-as.c +++ b/addressbook/gui/contact-editor/e-contact-save-as.c @@ -120,7 +120,7 @@ make_safe_filename (const char *prefix, char *name) } void -e_contact_save_as(char *title, ECard *card) +e_contact_save_as(char *title, ECard *card, GtkWindow *parent_window) { GtkFileSelection *filesel; char *file; @@ -145,11 +145,18 @@ e_contact_save_as(char *title, ECard *card) close_it, info); gtk_signal_connect(GTK_OBJECT(filesel), "delete_event", delete_it, info); + + if (parent_window) { + gtk_window_set_transient_for (GTK_WINDOW (filesel), + parent_window); + gtk_window_set_modal (GTK_WINDOW (filesel), TRUE); + } + gtk_widget_show(GTK_WIDGET(filesel)); } void -e_contact_list_save_as(char *title, GList *list) +e_contact_list_save_as(char *title, GList *list, GtkWindow *parent_window) { GtkFileSelection *filesel; SaveAsInfo *info = g_new(SaveAsInfo, 1); @@ -181,6 +188,13 @@ e_contact_list_save_as(char *title, GList *list) close_it, info); gtk_signal_connect(GTK_OBJECT(filesel), "delete_event", delete_it, info); + + if (parent_window) { + gtk_window_set_transient_for (GTK_WINDOW (filesel), + parent_window); + gtk_window_set_modal (GTK_WINDOW (filesel), TRUE); + } + gtk_widget_show(GTK_WIDGET(filesel)); } diff --git a/addressbook/gui/contact-editor/e-contact-save-as.h b/addressbook/gui/contact-editor/e-contact-save-as.h index b97d25ee3a..66d1e8bad9 100644 --- a/addressbook/gui/contact-editor/e-contact-save-as.h +++ b/addressbook/gui/contact-editor/e-contact-save-as.h @@ -29,10 +29,8 @@ extern "C" { #pragma } #endif /* __cplusplus */ -void -e_contact_save_as(gchar *title, ECard *card); -void -e_contact_list_save_as(gchar *title, GList *list); +void e_contact_save_as (gchar *title, ECard *card, GtkWindow *parent_window); +void e_contact_list_save_as (gchar *title, GList *list, GtkWindow *parent_window); #ifdef __cplusplus } diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index abb08d30f8..9c7ddb0d25 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -427,7 +427,7 @@ file_save_as_cb (GtkWidget *widget, gpointer data) extract_info (cle); - e_contact_save_as(_("Save List as VCard"), cle->card); + e_contact_save_as(_("Save List as VCard"), cle->card, GTK_WINDOW (cle->app)); } static void |