commit cb67730a260a491ae380fd928d8ca673200972b0
parent bc2c1d1d88c4ad3ecf56dffd9a12be03bfd5564d
Author: Pawel Pekala <c0rn@o2.pl>
Date: Sat, 2 Jul 2016 18:05:14 +0200
Place dialogs on center of main window. Most window managers place
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.
Diffstat:
7 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/account.c b/src/account.c
@@ -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",
diff --git a/src/addressbook.c b/src/addressbook.c
@@ -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);
diff --git a/src/gtk/logwindow.c b/src/gtk/logwindow.c
@@ -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",
diff --git a/src/gtk/pluginwindow.c b/src/gtk/pluginwindow.c
@@ -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);
diff --git a/src/message_search.c b/src/message_search.c
@@ -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);
diff --git a/src/sourcewindow.c b/src/sourcewindow.c
@@ -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,
diff --git a/src/summary_search.c b/src/summary_search.c
@@ -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);