Author: cazfi
Date: Sun Feb 21 19:56:42 2016
New Revision: 32008

URL: http://svn.gna.org/viewcvs/freeciv?rev=32008&view=rev
Log:
Renamed 'tileset_get_name()' as 'tileset_basename()'. Use it instead of 
'tileset_name()' when
setting value for a default tileset options.

See bug #24434

Modified:
    branches/S2_6/client/gui-gtk-2.0/tileset_dlg.c
    branches/S2_6/client/gui-gtk-3.0/tileset_dlg.c
    branches/S2_6/client/options.c
    branches/S2_6/client/packhand.c
    branches/S2_6/client/tilespec.c
    branches/S2_6/client/tilespec.h

Modified: branches/S2_6/client/gui-gtk-2.0/tileset_dlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-2.0/tileset_dlg.c?rev=32008&r1=32007&r2=32008&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-2.0/tileset_dlg.c      (original)
+++ branches/S2_6/client/gui-gtk-2.0/tileset_dlg.c      Sun Feb 21 19:56:42 2016
@@ -66,7 +66,7 @@
           _("Modpack suggests using %s tileset.\n"
             "It might not work with other tilesets.\n"
             "You are currently using tileset %s."),
-          game.control.preferred_tileset, tileset_get_name(tileset));
+          game.control.preferred_tileset, tileset_basename(tileset));
 
   label = gtk_label_new(buf);
   gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label);

Modified: branches/S2_6/client/gui-gtk-3.0/tileset_dlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/tileset_dlg.c?rev=32008&r1=32007&r2=32008&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.0/tileset_dlg.c      (original)
+++ branches/S2_6/client/gui-gtk-3.0/tileset_dlg.c      Sun Feb 21 19:56:42 2016
@@ -71,7 +71,7 @@
           _("Modpack suggests using %s tileset.\n"
             "It might not work with other tilesets.\n"
             "You are currently using tileset %s."),
-          game.control.preferred_tileset, tileset_get_name(tileset));
+          game.control.preferred_tileset, tileset_basename(tileset));
 
   label = gtk_label_new(buf);
   
gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
 label);

Modified: branches/S2_6/client/options.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/options.c?rev=32008&r1=32007&r2=32008&view=diff
==============================================================================
--- branches/S2_6/client/options.c      (original)
+++ branches/S2_6/client/options.c      Sun Feb 21 19:56:42 2016
@@ -5979,6 +5979,6 @@
 
   /* Do not call option_str_set() since we don't want option changed callback
    * to reload this tileset. */
-  opt->str_vtable->set(opt, tileset_name(t));
+  opt->str_vtable->set(opt, tileset_basename(t));
   option_gui_update(opt);
 }

Modified: branches/S2_6/client/packhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/packhand.c?rev=32008&r1=32007&r2=32008&view=diff
==============================================================================
--- branches/S2_6/client/packhand.c     (original)
+++ branches/S2_6/client/packhand.c     Sun Feb 21 19:56:42 2016
@@ -2994,7 +2994,7 @@
 
   if (packet->preferred_tileset[0] != '\0') {
     /* There is tileset suggestion */
-    if (strcmp(packet->preferred_tileset, tileset_get_name(tileset))) {
+    if (strcmp(packet->preferred_tileset, tileset_basename(tileset))) {
       /* It's not currently in use */
       if (gui_options.autoaccept_tileset_suggestion) {
         tilespec_reread(game.control.preferred_tileset, FALSE);

Modified: branches/S2_6/client/tilespec.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/tilespec.c?rev=32008&r1=32007&r2=32008&view=diff
==============================================================================
--- branches/S2_6/client/tilespec.c     (original)
+++ branches/S2_6/client/tilespec.c     Sun Feb 21 19:56:42 2016
@@ -634,7 +634,7 @@
 /****************************************************************************
   Return the name of the given tileset.
 ****************************************************************************/
-const char *tileset_get_name(const struct tileset *t)
+const char *tileset_basename(const struct tileset *t)
 {
   return t->name;
 }
@@ -1213,7 +1213,7 @@
     log_verbose("Trying tileset \"%s\".", tileset->name);
   }
   option_set_default_ts(tileset);
-  sz_strlcpy(gui_options.default_tileset_name, tileset_get_name(tileset));
+  sz_strlcpy(gui_options.default_tileset_name, tileset_basename(tileset));
 }
 
 /**********************************************************************

Modified: branches/S2_6/client/tilespec.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/tilespec.h?rev=32008&r1=32007&r2=32008&view=diff
==============================================================================
--- branches/S2_6/client/tilespec.h     (original)
+++ branches/S2_6/client/tilespec.h     Sun Feb 21 19:56:42 2016
@@ -373,7 +373,7 @@
 struct color_system *get_color_system(const struct tileset *t);
 
 /* Tileset accessor functions. */
-const char *tileset_get_name(const struct tileset *t);
+const char *tileset_basename(const struct tileset *t);
 bool tileset_is_isometric(const struct tileset *t);
 int tileset_hex_width(const struct tileset *t);
 int tileset_hex_height(const struct tileset *t);


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

Reply via email to