From: Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
Subject: Always center dialogs on the screen

---
 src/applet-dialogs.c |    4 ++++
 src/utils/utils.c    |    2 ++
 2 files changed, 6 insertions(+)

Index: network-manager-applet-0.9.4.1/src/applet-dialogs.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/applet-dialogs.c
+++ network-manager-applet-0.9.4.1/src/applet-dialogs.c
@@ -55,6 +55,7 @@ info_dialog_show_error (const char *err)
 
 	dialog = gtk_message_dialog_new_with_markup (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
 			"<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s", _("Error displaying connection information:"), err);
+	gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ALWAYS);
 	gtk_window_present (GTK_WINDOW (dialog));
 	g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
 }
@@ -902,6 +903,7 @@ applet_info_dialog_show (NMApplet *apple
 	g_signal_connect (dialog, "delete-event", G_CALLBACK (gtk_widget_hide_on_delete), dialog);
 	g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_hide), dialog);
 	gtk_widget_realize (dialog);
+	gtk_window_set_position (GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ALWAYS);
 	gtk_window_present_with_time (GTK_WINDOW (dialog),
 		gdk_x11_get_server_time (gtk_widget_get_window (dialog)));
 }
@@ -981,6 +983,7 @@ applet_mobile_password_dialog_new (NMCon
 
 	dialog = GTK_DIALOG (gtk_dialog_new ());
 	gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+	gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ALWAYS);
 	gtk_window_set_title (GTK_WINDOW (dialog), _("Mobile broadband network password"));
 
 	w = gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
@@ -1149,6 +1152,7 @@ applet_mobile_pin_dialog_new (const char
 
 	g_object_set_data_full (G_OBJECT (dialog), "builder", builder, (GDestroyNotify) g_object_unref);
 
+	gtk_window_set_position (GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ALWAYS);
 	gtk_window_set_title (GTK_WINDOW (dialog), title);
 
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "header_label"));
