online-accounts: Fix the add account dialog's size with newer GTK+

We should be pairing gtk_window_get_size with
gtk_window_set_default_size to avoid inconsistencies between the size
reading and setting code. eg., in recent GTK+ versions,
gtk_window_get_size and gtk_widget_set_size_request differ in their
interpretation of the CSD chrome.

However, gtk_window_set_default_size didn't work with non-resizable
GtkWindows, until now.

https://bugzilla.gnome.org/show_bug.cgi?id=762548
This commit is contained in:
Debarshi Ray 2016-03-01 14:28:51 +01:00
parent 84b65ddea0
commit cc144a0707

View file

@ -224,7 +224,7 @@ goa_panel_add_account_dialog_realize (GtkWidget *widget)
gint height;
gtk_window_get_size (parent, &width, &height);
gtk_widget_set_size_request (GTK_WIDGET (add_account), (gint) (0.5 * width), (gint) (1.25 * height));
gtk_window_set_default_size (GTK_WINDOW (add_account), (gint) (0.5 * width), (gint) (1.25 * height));
}
GTK_WIDGET_CLASS (goa_panel_add_account_dialog_parent_class)->realize (widget);