Author: cazfi
Date: Fri May 13 16:30:22 2016
New Revision: 32687

URL: http://svn.gna.org/viewcvs/freeciv?rev=32687&view=rev
Log:
Show "TRUE" and "FALSE" in their translated form when listing values of boolean
properties in the editor.

See bug #24660

Modified:
    branches/S2_6/client/gui-gtk-2.0/editprop.c
    branches/S2_6/client/gui-gtk-3.0/editprop.c

Modified: branches/S2_6/client/gui-gtk-2.0/editprop.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-2.0/editprop.c?rev=32687&r1=32686&r2=32687&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-2.0/editprop.c (original)
+++ branches/S2_6/client/gui-gtk-2.0/editprop.c Fri May 13 16:30:22 2016
@@ -1,4 +1,4 @@
-/**********************************************************************
+/***********************************************************************
  Freeciv - Copyright (C) 2005 - The Freeciv Project
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -2662,7 +2662,8 @@
   case VALTYPE_INT:
     return G_TYPE_INT;
   case VALTYPE_BOOL:
-    return G_TYPE_BOOLEAN;
+    /* We want to show it as translated string, not as untranslated 
G_TYPE_BOOLEAN */
+    return G_TYPE_STRING;
   case VALTYPE_STRING:
   case VALTYPE_BUILT_ARRAY:
   case VALTYPE_INVENTIONS_ARRAY:
@@ -5192,7 +5193,8 @@
     gtk_list_store_set(store, iter, col_id, pv->data.v_int, -1);
     break;
   case VALTYPE_BOOL:
-    gtk_list_store_set(store, iter, col_id, pv->data.v_bool, -1);
+    /* Set as translated string, not as untranslated G_TYPE_BOOLEAN */
+    gtk_list_store_set(store, iter, col_id, propval_as_string(pv), -1);
     break;
   case VALTYPE_STRING:
     if (fc_strlcpy(buf, pv->data.v_string, 28) >= 28) {

Modified: branches/S2_6/client/gui-gtk-3.0/editprop.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/editprop.c?rev=32687&r1=32686&r2=32687&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.0/editprop.c (original)
+++ branches/S2_6/client/gui-gtk-3.0/editprop.c Fri May 13 16:30:22 2016
@@ -1,4 +1,4 @@
-/**********************************************************************
+/***********************************************************************
  Freeciv - Copyright (C) 2005 - The Freeciv Project
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -2663,7 +2663,8 @@
   case VALTYPE_INT:
     return G_TYPE_INT;
   case VALTYPE_BOOL:
-    return G_TYPE_BOOLEAN;
+    /* We want to show it as translated string, not as untranslated 
G_TYPE_BOOLEAN */
+    return G_TYPE_STRING;
   case VALTYPE_STRING:
   case VALTYPE_BUILT_ARRAY:
   case VALTYPE_INVENTIONS_ARRAY:
@@ -5248,7 +5249,8 @@
     gtk_list_store_set(store, iter, col_id, pv->data.v_int, -1);
     break;
   case VALTYPE_BOOL:
-    gtk_list_store_set(store, iter, col_id, pv->data.v_bool, -1);
+    /* Set as translated string, not as untranslated G_TYPE_BOOLEAN */
+    gtk_list_store_set(store, iter, col_id, propval_as_string(pv), -1);
     break;
   case VALTYPE_STRING:
     if (fc_strlcpy(buf, pv->data.v_string, 28) >= 28) {


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

Reply via email to