summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorTingPing <tngpng@gmail.com>2013-07-03 12:00:41 -0700
committerTingPing <tngpng@gmail.com>2013-07-03 12:00:41 -0700
commit3284502645f622409fa9e373f9fd0b1c41417e9c (patch)
treeae29613439db02edffc1effbde40e2de83cd2194 /src
parent286bbc6bde4694eaa4f17fcab7c2166fb9e1dd7f (diff)
parent4cc03aba7548fe10b270096a12db6ade3783e60a (diff)
Merge pull request #667 from orium/fe_get-dialogs-transient
fe_get_{int,str}() sets transient for the main window.
Diffstat (limited to 'src')
-rw-r--r--src/fe-gtk/gtkutil.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fe-gtk/gtkutil.c b/src/fe-gtk/gtkutil.c
index 744a0551..11206e02 100644
--- a/src/fe-gtk/gtkutil.c
+++ b/src/fe-gtk/gtkutil.c
@@ -391,12 +391,14 @@ fe_get_str (char *msg, char *def, void *callback, void *userdata)
 	GtkWidget *entry;
 	GtkWidget *hbox;
 	GtkWidget *label;
+	extern GtkWidget *parent_window;
 
 	dialog = gtk_dialog_new_with_buttons (msg, NULL, 0,
 										GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
 										GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
 										NULL);
 	gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dialog)->vbox), TRUE);
+	gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent_window));
 
 	if (userdata == (void *)1)	/* nick box is usually on the very bottom, make it centered */
 	{
@@ -461,6 +463,7 @@ fe_get_int (char *msg, int def, void *callback, void *userdata)
 	GtkWidget *hbox;
 	GtkWidget *label;
 	GtkAdjustment *adj;
+	extern GtkWidget *parent_window;
 
 	dialog = gtk_dialog_new_with_buttons (msg, NULL, 0,
 										GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
@@ -468,6 +471,8 @@ fe_get_int (char *msg, int def, void *callback, void *userdata)
 										NULL);
 	gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dialog)->vbox), TRUE);
 	gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
+	gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent_window));
+
 	hbox = gtk_hbox_new (TRUE, 0);
 
 	g_object_set_data (G_OBJECT (dialog), "cb", callback);