Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2004:
[Freeciv-Dev] (PR#11197) icon background color confused
Home

[Freeciv-Dev] (PR#11197) icon background color confused

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#11197) icon background color confused
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 1 Dec 2004 18:12:30 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=11197 >

This patch adds helptexts for client options.

Several of the options are rather unintelligible, so I just put TODO
helptexts in for them.  Vasco, you'll need to fix these (and maybe
rewrite the short descriptions to be more useful).

I also note that some of the options are entirely useless.  Like the
"sound new bell for turn done" option.

Of course the GUIs will have to be changed to use these helptexts.  I
didn't add any GUI changes.

-jason

Index: client/options.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/options.c,v
retrieving revision 1.110
diff -u -r1.110 options.c
--- client/options.c    30 Nov 2004 06:54:05 -0000      1.110
+++ client/options.c    2 Dec 2004 02:09:45 -0000
@@ -80,54 +80,127 @@
 static client_option common_options[] = {
   GEN_BOOL_OPTION(save_options_on_exit,
                  N_("Save the options when exiting the game"),
+                 N_("If this option is selected, options will be saved "
+                    "automatically when you exit Freeciv."),
                  COC_MISCELLANEOUS),
-  GEN_STR_OPTION(default_user_name, N_("Default player's login name"),
+  GEN_STR_OPTION(default_user_name,
+                N_("Default player's login name"),
+                N_("This is the default login username that will be used "
+                   "in the connection dialogs or with the -a command-line "
+                   "parameter."),
                 COC_MISCELLANEOUS, NULL, NULL),
-  GEN_STR_OPTION(default_server_host, N_("Default server"),
+  GEN_STR_OPTION(default_server_host,
+                N_("Default server"),
+                N_("This is the default server hostname that will be used "
+                   "in the connection dialogs or with the -a command-line "
+                   "parameter."),
                 COC_MISCELLANEOUS, NULL, NULL),
-  GEN_INT_OPTION(default_server_port, N_("Default server's port"),
+  GEN_INT_OPTION(default_server_port,
+                N_("Default server's port"),
+                N_("This is the default server port that will be used "
+                   "in the connection dialogs or with the -a command-line "
+                   "parameter."),
                 COC_MISCELLANEOUS),
-  GEN_STR_OPTION(default_metaserver, N_("Default metaserver"),
+  GEN_STR_OPTION(default_metaserver,
+                N_("Default metaserver"),
+                N_("The metaserver is a host that the client contacts to "
+                   "find out about games on the internet.  Don't change "
+                   "this from its default value unless you know what "
+                   "you're doing."),
                 COC_MISCELLANEOUS, NULL, NULL),
-  GEN_STR_OPTION(default_sound_set_name, N_("Default name of sound set"),
+  GEN_STR_OPTION(default_sound_set_name,
+                N_("Default name of sound set"),
+                N_("This is the sound set that will be used.  Changing "
+                   "this is the same as using the -S command-line "
+                   "parameter."),
                 COC_MISCELLANEOUS, get_soundset_list, NULL),
-  GEN_STR_OPTION(default_sound_plugin_name, N_("Default sound plugin"),
+  GEN_STR_OPTION(default_sound_plugin_name,
+                N_("Default sound plugin"),
+                N_("If you have a problem with sound, try changing the "
+                   "sound plugin.  The new plugin won't take effect until "
+                   "you restart Freeciv.  Changing this is the same as "
+                   "using the -P command-line option."),
                 COC_MISCELLANEOUS, get_soundplugin_list, NULL),
-  GEN_STR_OPTION(default_tileset_name, N_("Tileset"), COC_MISCELLANEOUS,
+  GEN_STR_OPTION(default_tileset_name, N_("Tileset"),
+                N_("By changing this option you change the active tileset. "
+                   "This is the same as using the -t command-line "
+                   "parameter."),
+                COC_MISCELLANEOUS,
                 get_tileset_list, tilespec_reread_callback),
 
   GEN_BOOL_OPTION(solid_color_behind_units,
                  N_("Solid unit background color"),
+                 N_("Setting this option will cause units on the map "
+                    "view to be drawn with a solid background color "
+                    "instead of the flag backdrop."),
                  COC_GRAPHICS),
   GEN_BOOL_OPTION(sound_bell_at_new_turn, N_("Sound bell at new turn"),
+                 N_("Set this option to have a \"bell\" event be generated "
+                    "at the start of a new turn.  You can control the "
+                    "behavior of the \"bell\" event by editing the message "
+                    "options."),
                  COC_INTERFACE),
   GEN_INT_OPTION(smooth_move_unit_msec,
                 N_("Unit movement animation time (milliseconds)"),
+                N_("This option controls how long unit \"animation\" takes "
+                   "when a unit moves on the map view.  Set it to 0 to "
+                   "disable animation entirely."),
                 COC_GRAPHICS),
   GEN_INT_OPTION(smooth_center_slide_msec,
                 N_("Mapview recentering time (milliseconds)"),
+                N_("When the map view is recentered, it will slide "
+                   "smoothly over the map to its new position.  This "
+                   "option controls how long this slide lasts.  Set it to "
+                   "0 to disable mapview sliding entirely."),
                 COC_GRAPHICS),
   GEN_BOOL_OPTION(do_combat_animation, N_("Show combat animation"),
+                 N_("If this option is disabled them combat animation "
+                    "between units on the mapview will be turned off."),
                  COC_GRAPHICS),
   GEN_BOOL_OPTION(ai_popup_windows, N_("Popup dialogs in AI Mode"),
+                 N_("If this option is disabled then when watching an AI "
+                    "player, dialog windows will not be popped up like "
+                    "normal."),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(ai_manual_turn_done, N_("Manual Turn Done in AI Mode"),
+                 N_("If this option is disabled, then you will not have "
+                    "to press the turn done button manually when watching "
+                    "an AI player."),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(auto_center_on_unit,      N_("Auto Center on Units"),
+                 N_("Set this option to have the active unit centered "
+                    "automatically when the unit focus changes."),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(auto_center_on_combat,    N_("Auto Center on Combat"),
+                 N_("Set this option to have any combat be centered "
+                    "automatically.  Disabled this will speed up the time "
+                    "between turns but may cause you to miss combat "
+                    "entirely."),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(wakeup_focus,             N_("Focus on Awakened Units"),
+                 N_("Set this option to have newly awoken units be "
+                    "focused automatically."),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(center_when_popup_city,   N_("Center map when Popup city"),
+                 N_("If this option is set then when a city dialog is "
+                    "popped up, the city will be centered automatically."),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(concise_city_production,  N_("Concise City Production"),
+                 N_("Set this option to make the city production (as shown "
+                    "in the city dialog) to be more compact."),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(auto_turn_done,           N_("End Turn when done moving"),
+                 N_("If this option is set then when all your units are "
+                    "done moving the turn will be ended for you "
+                    "automatically."),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(ask_city_name,            N_("Prompt for city names"),
+                 N_("If this option is disabled then city names will be "
+                    "chosen for you automatically by the server."),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(popup_new_cities, N_("Pop up city dialog for new cities"),
+                 N_("If this option is set then a newly-founded city will "
+                    "havce its city dialog popped up automatically."),
                  COC_INTERFACE),
 };
 #undef GEN_INT_OPTION
Index: client/options.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/options.h,v
retrieving revision 1.42
diff -u -r1.42 options.h
--- client/options.h    2 Dec 2004 01:04:33 -0000       1.42
+++ client/options.h    2 Dec 2004 02:09:45 -0000
@@ -64,8 +64,9 @@
 extern const char *client_option_class_names[];
 
 typedef struct client_option {
-  const char *name;
-  const char *description;
+  const char *name; /* Short name - used as an identifier */
+  const char *description; /* One-line description */
+  const char *helptext; /* Paragraph-length help text */
   enum client_option_class category;
   enum client_option_type type;
   int *p_int_value;
@@ -85,14 +86,15 @@
 } client_option;
 extern client_option *options;
 
-#define GEN_INT_OPTION(oname, desc, class) { #oname, desc, class, COT_INT, \
-                                             &oname, NULL, NULL, 0, NULL, \
-                                             NULL, NULL }
-#define GEN_BOOL_OPTION(oname, desc, class) \
-  { #oname, desc, class, COT_BOOL, NULL, &oname, NULL, 0, NULL, NULL, NULL }
-#define GEN_STR_OPTION(oname, desc, class, str_defaults, callback) \
-  { #oname, desc, class, COT_STR, NULL, NULL, oname, sizeof(oname), \
-    callback, str_defaults, NULL }
+#define GEN_INT_OPTION(oname, desc, help, category)                        \
+  { #oname, desc, help, category, COT_INT,                                 \
+      &oname, NULL, NULL, 0, NULL, NULL, NULL }
+#define GEN_BOOL_OPTION(oname, desc, help, category)                       \
+  { #oname, desc, help, category, COT_BOOL,                                \
+      NULL, &oname, NULL, 0, NULL, NULL, NULL }
+#define GEN_STR_OPTION(oname, desc, help, category, str_defaults, callback) \
+  { #oname, desc, help, category, COT_STR,                         \
+      NULL, NULL, oname, sizeof(oname), callback, str_defaults, NULL }
 
 extern int num_options;
 
Index: client/gui-gtk/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/gui_main.c,v
retrieving revision 1.156
diff -u -r1.156 gui_main.c
--- client/gui-gtk/gui_main.c   1 Dec 2004 22:15:22 -0000       1.156
+++ client/gui-gtk/gui_main.c   2 Dec 2004 02:09:46 -0000
@@ -128,10 +128,22 @@
 const bool gui_use_transliteration = TRUE;
 
 client_option gui_options[] = {
+  /* This option is the same as the one in gui-gtk-2.0 */
   GEN_BOOL_OPTION(meta_accelerators, N_("Use Alt/Meta for accelerators"),
+                 N_("TODO"),
+                 COC_INTERFACE),
+  /* This option is the same as the one in gui-gtk-2.0 */
+  GEN_BOOL_OPTION(map_scrollbars, N_("Show Map Scrollbars"),
+                 N_("Disable this option to hide the scrollbars on the "
+                    "map view."),
+                 COC_INTERFACE),
+  /* This option is the same as the one in gui-gtk-2.0 */
+  GEN_BOOL_OPTION(keyboardless_goto, N_("Keyboardless goto"),
+                 N_("If this option is set then a goto may be initiated "
+                    "by left-clicking and then holding down the mouse "
+                    "button while dragging the mouse onto a different "
+                    "tile."),
                  COC_INTERFACE),
-  GEN_BOOL_OPTION(map_scrollbars, N_("Show Map Scrollbars"), COC_INTERFACE),
-  GEN_BOOL_OPTION(keyboardless_goto, N_("Keyboardless goto"), COC_INTERFACE),
 };
 const int num_gui_options = ARRAY_SIZE(gui_options);
 
Index: client/gui-gtk-2.0/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gui_main.c,v
retrieving revision 1.97
diff -u -r1.97 gui_main.c
--- client/gui-gtk-2.0/gui_main.c       1 Dec 2004 22:15:22 -0000       1.97
+++ client/gui-gtk-2.0/gui_main.c       2 Dec 2004 02:09:47 -0000
@@ -136,21 +136,46 @@
 const bool gui_use_transliteration = FALSE;
 
 client_option gui_options[] = {
+  /* This option is the same as the one in gui-gtk */
   GEN_BOOL_OPTION(meta_accelerators, N_("Use Alt/Meta for accelerators"),
+                 N_("TODO"),
                  COC_INTERFACE),
+  /* This option is the same as the one in gui-gtk */
   GEN_BOOL_OPTION(map_scrollbars, N_("Show Map Scrollbars"),
+                 N_("Disable this option to hide the scrollbars on the "
+                    "map view."),
                  COC_INTERFACE),
+  /* This option is the same as the one in gui-gtk */
   GEN_BOOL_OPTION(keyboardless_goto, N_("Keyboardless goto"),
+                 N_("If this option is set then a goto may be initiated "
+                    "by left-clicking and then holding down the mouse "
+                    "button while dragging the mouse onto a different "
+                    "tile."),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(dialogs_on_top, N_("Keep dialogs on top"),
+                 N_("If this option is set then dialog windows will always "
+                    "remain in front of the main Freeciv window. "
+                    "Disabling this has no effect in fullscreen mode."),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(show_task_icons, N_("Show worklist task icons"),
+                 N_("TODO"),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(fullscreen_mode, N_("Fullscreen Mode"),
+                 N_("If this option is set then the game will be played in "
+                    "fullscreen mode. There are some known bugs with "
+                    "fullscreen mode so if you run into problems simply "
+                    "disable it."),
                  COC_INTERFACE),
   GEN_BOOL_OPTION(enable_tabs, N_("Enable status report tabs"),
+                 N_("If this option is enabled then report dialogs will "
+                    "be shown as separate tabs rather than in popup "
+                    "dialogs."),
                  COC_INTERFACE),
-  GEN_BOOL_OPTION(solid_unit_icon_bg,N_("Solid unit icon background color"),
+  GEN_BOOL_OPTION(solid_unit_icon_bg,
+                 N_("Solid unit icon background color in city dialog"),
+                 N_("If this is enabled then units will be shown in the "
+                    "city dialog production tab with a color-coded "
+                    "solid background."),
                  COC_INTERFACE)
 };
 const int num_gui_options = ARRAY_SIZE(gui_options);

[Prev in Thread] Current Thread [Next in Thread]