aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-06-16 07:12:25 +0800
committerChris Toshok <toshok@src.gnome.org>2002-06-16 07:12:25 +0800
commit2bd24323a173fef77a5048ecd6265e570070b088 (patch)
tree7ab4a2acdd2eef7ba5c5fd2d13e93b660d284927 /addressbook/gui/contact-editor
parent50bf7290e804bd34f5780bf70276fa225fa000e2 (diff)
downloadgsoc2013-evolution-2bd24323a173fef77a5048ecd6265e570070b088.tar
gsoc2013-evolution-2bd24323a173fef77a5048ecd6265e570070b088.tar.gz
gsoc2013-evolution-2bd24323a173fef77a5048ecd6265e570070b088.tar.bz2
gsoc2013-evolution-2bd24323a173fef77a5048ecd6265e570070b088.tar.lz
gsoc2013-evolution-2bd24323a173fef77a5048ecd6265e570070b088.tar.xz
gsoc2013-evolution-2bd24323a173fef77a5048ecd6265e570070b088.tar.zst
gsoc2013-evolution-2bd24323a173fef77a5048ecd6265e570070b088.zip
[ fixes bug #26130 ] pass ce->app as parent_window.
2002-06-15 Chris Toshok <toshok@ximian.com> [ fixes bug #26130 ] * gui/contact-editor/e-contact-editor.c (file_save_as_cb): pass ce->app as parent_window. * gui/contact-list-editor/e-contact-list-editor.c (file_save_as_cb): same . * gui/contact-editor/e-contact-save-as.c (e_contact_list_save_as): if a parent_window is specified, the file selector should be modal/transient for that window. (e_contact_save_as): same. * gui/contact-editor/e-contact-save-as.h: track prototype changes (addition of GtkWindow *parent_window to both calls.) svn path=/trunk/; revision=17199
Diffstat (limited to 'addressbook/gui/contact-editor')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c2
-rw-r--r--addressbook/gui/contact-editor/e-contact-save-as.c18
-rw-r--r--addressbook/gui/contact-editor/e-contact-save-as.h6
3 files changed, 19 insertions, 7 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
}