aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-accounts.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-03-12 05:11:44 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-03-12 05:11:44 +0800
commit179239f0e51b4ae7470482d1053378aad981eb7a (patch)
tree2dd79a01327a393826447e5c89f5c1909f0a551b /mail/mail-accounts.c
parent245e48af1118c758b4810fa7f0344e48451f40cc (diff)
downloadgsoc2013-evolution-179239f0e51b4ae7470482d1053378aad981eb7a.tar.gz
gsoc2013-evolution-179239f0e51b4ae7470482d1053378aad981eb7a.tar.zst
gsoc2013-evolution-179239f0e51b4ae7470482d1053378aad981eb7a.zip
Use gtk_window_set_transient_for() on the druid with the settings dialog
2003-03-11 Jeffrey Stedfast <fejj@ximian.com> * mail-accounts.c (account_add_clicked): Use gtk_window_set_transient_for() on the druid with the settings dialog as the parent window. svn path=/trunk/; revision=20253
Diffstat (limited to 'mail/mail-accounts.c')
-rw-r--r--mail/mail-accounts.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c
index f47b6b4da9..fb06efd6ba 100644
--- a/mail/mail-accounts.c
+++ b/mail/mail-accounts.c
@@ -143,9 +143,15 @@ static void
account_add_clicked (GtkButton *button, gpointer user_data)
{
MailAccountsTab *prefs = (MailAccountsTab *) user_data;
+ GtkWidget *parent;
if (prefs->druid == NULL) {
prefs->druid = (GtkWidget *) mail_config_druid_new ();
+
+ parent = gtk_widget_get_toplevel ((GtkWidget *) prefs);
+ if (GTK_WIDGET_TOPLEVEL (parent))
+ gtk_window_set_transient_for ((GtkWindow *) prefs->druid, (GtkWindow *) parent);
+
g_object_weak_ref ((GObject *) prefs->druid,
(GWeakNotify) account_add_finished, prefs);
@@ -183,10 +189,13 @@ account_edit_clicked (GtkButton *button, gpointer user_data)
gtk_tree_model_get (model, &iter, 3, &account, -1);
if (account) {
- GtkWidget *window;
+ GtkWidget *parent;
+
+ parent = gtk_widget_get_toplevel ((GtkWidget *) prefs);
+ parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
+
+ prefs->editor = (GtkWidget *) mail_account_editor_new (account, (GtkWindow *) parent, prefs);
- window = gtk_widget_get_ancestor (GTK_WIDGET (prefs), GTK_TYPE_WINDOW);
- prefs->editor = (GtkWidget *) mail_account_editor_new (account, GTK_WINDOW (window), prefs);
g_object_weak_ref ((GObject *) prefs->editor, (GWeakNotify) account_edit_finished, prefs);
gtk_widget_show (prefs->editor);
g_object_ref (prefs);