Place dialogs on center of main window. Most window managers place
authorPawel Pekala <c0rn@o2.pl>
Sat, 2 Jul 2016 16:05:14 +0000 (18:05 +0200)
committerPawel Pekala <c0rn@o2.pl>
Sat, 2 Jul 2016 16:05:14 +0000 (18:05 +0200)
these dialogs in some weird positions making interacting with
them unwieldy. Windows is biggest offender here putting things
around left top corner of the screen.

src/account.c
src/addressbook.c
src/gtk/logwindow.c
src/gtk/pluginwindow.c
src/message_search.c
src/sourcewindow.c
src/summary_search.c

index e2f472f5788460c32891c8b351d2a15c52f70256..ad6ba4e6358d734f10cb36d1585b3443ea2f335a 100644 (file)
@@ -724,6 +724,7 @@ static void account_edit_create(void)
        debug_print("Creating account edit window...\n");
 
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "account");
+       gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS);
        gtk_container_set_border_width (GTK_CONTAINER (window), 8);
        gtk_window_set_title (GTK_WINDOW (window), _("Edit accounts"));
        g_signal_connect (G_OBJECT (window), "delete_event",
index 80599f8dce13563f4950430f812ca0812bb857af..fc110dab72b1f8026f9a44645be840e6512a5daf 100644 (file)
@@ -914,6 +914,7 @@ static void addressbook_create(void)
 
        /* Address book window */
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "addressbook");
+       gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS);
        gtk_window_set_title(GTK_WINDOW(window), _("Address book"));
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
        gtk_widget_realize(window);
index 4cc3208dd07b128dfb21692a8ee97843c68f87cd..9fd3bea5a35d016879109da450cf5fde9b40bc2a 100644 (file)
@@ -94,6 +94,7 @@ LogWindow *log_window_create(LogInstance instance)
        logwin = g_new0(LogWindow, 1);
 
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "logwindow");
+       gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS);
        gtk_window_set_title(GTK_WINDOW(window), get_log_title(instance));
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
        g_signal_connect(G_OBJECT(window), "delete_event",
index a29e0ea65e69eb9cbfab650d46f939ad62637a37..4284cfd07296b0fc11fa1083f2d8e6404053e097 100644 (file)
@@ -299,6 +299,7 @@ void pluginwindow_create()
        pluginwindow = g_new0(PluginWindow, 1);
 
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "pluginwindow");
+       gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS);
        gtk_container_set_border_width(GTK_CONTAINER(window), 8);
        gtk_window_set_title(GTK_WINDOW(window), _("Plugins"));
        gtk_window_set_modal(GTK_WINDOW(window), TRUE);
index 33965bd71fcfaf97de89b692c395b17cc99ed890..5fc9a47ba5b6b1bf14d956ecf55faf80aa91bd5a 100644 (file)
@@ -158,6 +158,7 @@ static void message_search_create(void)
        GtkWidget *stop_btn;
 
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "message_search");
+       gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS);
        gtk_window_set_title (GTK_WINDOW (window),
                              _("Find in current message"));
        gtk_widget_set_size_request (window, 450, -1);
index 43c40ff954de5e7f7709897827abc15498acee66..b9fa6f82e2c2cce9401700e6238ea1cff2327d97 100644 (file)
@@ -61,6 +61,7 @@ SourceWindow *source_window_create(void)
        sourcewin = g_new0(SourceWindow, 1);
 
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "sourcewindow");
+       gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS);
        gtk_window_set_title(GTK_WINDOW(window), _("Source of the message"));
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
        gtk_widget_set_size_request(window, prefs_common.sourcewin_width,
index 5e9c546b079cb6bd665c2f8250bd0d8bd2facd1e..0427449417e5e97548ba6ca525b2d9bf0f3f6af8 100644 (file)
@@ -256,6 +256,7 @@ static void summary_search_create(void)
        gboolean is_searching = FALSE;
 
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "summary_search");
+       gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS);
        gtk_window_set_title(GTK_WINDOW (window), _("Search messages"));
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
        gtk_container_set_border_width(GTK_CONTAINER (window), 8);