From 685f7e3419b27cd0e274b7a768d9fa23b7de5f85 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 2 Sep 2008 01:06:25 +0200 Subject: netdomjoin-gui: always center new windows. Guenther (This used to be commit af25bd95d24de8e9fac8f86b18e03a09902b0b78) --- source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c index d5b60f1878..bf41ee430d 100644 --- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c +++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c @@ -500,6 +500,7 @@ static void callback_creds_prompt(GtkWidget *widget, gtk_widget_set_size_request(GTK_WIDGET(window), 380, 280); gtk_window_set_icon_from_file(GTK_WINDOW(window), SAMBA_ICON_PATH, NULL); gtk_window_set_transient_for(GTK_WINDOW(window), GTK_WINDOW(state->window_do_change)); + gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS); g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(callback_do_close), window); @@ -1102,6 +1103,7 @@ static void callback_do_change(GtkWidget *widget, gtk_widget_set_size_request(GTK_WIDGET(window), 480, 650); gtk_window_set_icon_from_file(GTK_WINDOW(window), SAMBA_ICON_PATH, NULL); gtk_window_set_transient_for(GTK_WINDOW(window), GTK_WINDOW(state->window_main)); + gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS); g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(callback_do_close), window); @@ -1374,6 +1376,7 @@ static int draw_main_window(struct join_state *state) gtk_widget_set_size_request(GTK_WIDGET(window), 600, 600); gtk_window_set_resizable(GTK_WINDOW(window), FALSE); gtk_window_set_icon_from_file(GTK_WINDOW(window), SAMBA_ICON_PATH, NULL); + gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS); g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(callback_delete_event), NULL); -- cgit