[hitori] Ensure message dialogues have a parent window set where possible



commit 2607ef47dc33545490646491e51eebd78ce2be33
Author: Philip Withnall <philip tecnocode co uk>
Date:   Fri Nov 12 00:18:05 2010 +0000

    Ensure message dialogues have a parent window set where possible

 src/interface.c |    2 +-
 src/main.c      |    2 +-
 src/rules.c     |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/interface.c b/src/interface.c
index e23a3ba..4086fa4 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -507,7 +507,7 @@ hitori_contents_cb (GtkAction *action, Hitori *hitori)
 	GError *error = NULL;
 
 	if (gtk_show_uri (gtk_widget_get_screen (hitori->window), "ghelp:hitori", gtk_get_current_event_time (), &error) == FALSE) {
-		GtkWidget *dialog = gtk_message_dialog_new (NULL,
+		GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (hitori->window),
 							    GTK_DIALOG_MODAL,
 							    GTK_MESSAGE_ERROR,
 							    GTK_BUTTONS_OK,
diff --git a/src/main.c b/src/main.c
index 69074f0..dc420ca 100644
--- a/src/main.c
+++ b/src/main.c
@@ -69,7 +69,7 @@ hitori_set_board_size (Hitori *hitori, guint board_size)
 {
 	/* Ask the user if they want to stop the current game, if they're playing at the moment */
 	if (hitori->processing_events == TRUE && hitori->made_a_move == TRUE) {
-		GtkWidget *dialog = gtk_message_dialog_new (NULL,
+		GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (hitori->window),
 				GTK_DIALOG_MODAL,
 				GTK_MESSAGE_QUESTION,
 				GTK_BUTTONS_YES_NO,
diff --git a/src/rules.c b/src/rules.c
index 2d48c39..4749335 100644
--- a/src/rules.c
+++ b/src/rules.c
@@ -264,7 +264,7 @@ hitori_check_win (Hitori *hitori)
 		/* Translators: The first parameter is the number of minutes which have elapsed since the start of the game; the second parameter is
 		 * the number of seconds. */
 		message = g_strdup_printf (_("You've won in a time of %02u:%02u!"), hitori->timer_value / 60, hitori->timer_value % 60);
-		dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "%s", message);
+		dialog = gtk_message_dialog_new (GTK_WINDOW (hitori->window), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "%s", message);
 		g_free (message);
 
 		gtk_dialog_run (GTK_DIALOG (dialog));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]