Author: cazfi
Date: Sat Oct 22 16:40:11 2016
New Revision: 34205

URL: http://svn.gna.org/viewcvs/freeciv?rev=34205&view=rev
Log:
Do not use small screen layout for gtk3-clients' citydlg when screen size is 
unknown.

See patch #7861

Modified:
    trunk/client/gui-gtk-3.0/citydlg.c
    trunk/client/gui-gtk-3.22/citydlg.c

Modified: trunk/client/gui-gtk-3.0/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/citydlg.c?rev=34205&r1=34204&r2=34205&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/citydlg.c  (original)
+++ trunk/client/gui-gtk-3.0/citydlg.c  Sat Oct 22 16:40:11 2016
@@ -325,11 +325,17 @@
 *****************************************************************/
 static void initialize_city_dialogs(void)
 {
+  int height;
+
   fc_assert_ret(!city_dialogs_have_been_initialised);
 
   dialog_list = dialog_list_new();
   init_citydlg_dimensions();
-  if (screen_height() <= TINYSCREEN_MAX_HEIGHT) {
+  height = screen_height();
+
+  /* Use default layout when height cannot be determined
+   * (when height == 0) */
+  if (height > 0 && height <= TINYSCREEN_MAX_HEIGHT) {
     low_citydlg = TRUE;
   } else {
     low_citydlg = FALSE;

Modified: trunk/client/gui-gtk-3.22/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/citydlg.c?rev=34205&r1=34204&r2=34205&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.22/citydlg.c (original)
+++ trunk/client/gui-gtk-3.22/citydlg.c Sat Oct 22 16:40:11 2016
@@ -326,11 +326,17 @@
 *****************************************************************/
 static void initialize_city_dialogs(void)
 {
+  int height;
+
   fc_assert_ret(!city_dialogs_have_been_initialised);
 
   dialog_list = dialog_list_new();
   init_citydlg_dimensions();
-  if (screen_height() <= TINYSCREEN_MAX_HEIGHT) {
+  height = screen_height();
+
+  /* Use default layout when height cannot be determined
+   * (when height == 0) */
+  if (height > 0 && height <= TINYSCREEN_MAX_HEIGHT) {
     low_citydlg = TRUE;
   } else {
     low_citydlg = FALSE;


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to