<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39927 >

Forgot to attach the final patches for posterity.

Here's the shorter S2_2:

Index: data/helpdata.txt
===================================================================
--- data/helpdata.txt   (revision 14164)
+++ data/helpdata.txt   (working copy)
@@ -495,7 +495,6 @@
         Ctrl-N: show city names on/off\n\
         Ctrl-R: show city growth on/off\n\
         Ctrl-P: show city production on/off\n\
-             t: show city workers (mouse over or near city)\n\
 "), _("\
 Main Map (Mouse):\n\
 =================\n\
@@ -510,6 +509,7 @@
 \n\
   Shift-Control-Left-click:    Adjust city workers\n\
   Control-Center-click:        Wake up sentried units\n\
+  Shift-Control-Right-click:   Show city workers (mouse over or near city)\n\
 \n\
   Area Selection mode (GTK):\n\
   ==========================\n\
@@ -523,11 +523,12 @@
 "), _("\
 Dialogs and Reports:\n\
 ====================\n\
-     F1: open City Report\n\
+     F1: show Map View\n\
      F2: open Unit Report\n\
-     F3: open Players dialog\n\
+     F3: open Nations Report\n\
+     F4: open City Report\n\
      F5: open Economy Report\n\
-     F6: open Science Report\n\
+     F6: open Research Report\n\
      F7: open World Wonders\n\
      F8: open Top Five Cities\n\
      F9: open Messages dialog\n\
Index: data/scenario/tutorial.sav
===================================================================
--- data/scenario/tutorial.sav  (revision 14164)
+++ data/scenario/tutorial.sav  (working copy)
@@ -95,7 +95,7 @@
       notify.event(city.owner, city.tile, E.TUTORIAL,
 _("As the number of cities in your empire grows, it becomes harder to\n\
 manage individual cities.  This is where the city report becomes\n\
-useful.  Press F1 to bring it up.  This report shows a list of cities\n\
+useful.  Press F4 to bring it up.  This report shows a list of cities\n\
 with various statistics about each.  Play around with it a bit if you\n\
 like (return to the map view by clicking on the Map tab).  With a bit\n\
 of practice it is possible to control almost every aspect of the cities\n\
Index: client/gui-gtk-2.0/repodlgs.c
===================================================================
--- client/gui-gtk-2.0/repodlgs.c       (revision 14164)
+++ client/gui-gtk-2.0/repodlgs.c       (working copy)
@@ -293,7 +293,7 @@
   GtkWidget *science_diagram;
 
   gui_dialog_new(&science_dialog_shell, GTK_NOTEBOOK(top_notebook), NULL);
-  gui_dialog_set_title(science_dialog_shell, _("Science"));
+  gui_dialog_set_title(science_dialog_shell, _("Research"));
 
   gui_dialog_add_button(science_dialog_shell,
       GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
Index: client/gui-gtk-2.0/gui_main.c
===================================================================
--- client/gui-gtk-2.0/gui_main.c       (revision 14164)
+++ client/gui-gtk-2.0/gui_main.c       (working copy)
@@ -385,6 +385,17 @@
 /**************************************************************************
 ...
 **************************************************************************/
+gboolean map_canvas_focus(void)
+{
+  gtk_window_present(GTK_WINDOW(toplevel));
+  gtk_notebook_set_current_page(GTK_NOTEBOOK(top_notebook), 0);
+  gtk_widget_grab_focus(map_canvas);
+  return TRUE;
+}
+
+/**************************************************************************
+...
+**************************************************************************/
 gboolean inputline_handler(GtkWidget *w, GdkEventKey *ev)
 {
   void *data = NULL;
@@ -496,59 +507,55 @@
   }
 
   assert(MAX_NUM_BATTLEGROUPS == 4);
-#define BATTLEGROUP_SHIFT_CASE(num)                                        \
-  if (ev->state & GDK_CONTROL_MASK) {                                      \
-    key_unit_assign_battlegroup((num), TRUE);                              \
-  } else {                                                                 \
-    key_unit_select_battlegroup((num), FALSE);                             \
-  }
   
   if ((ev->state & GDK_CONTROL_MASK)) {
     switch (ev->keyval) {
 
-    case GDK_1:
-      key_unit_assign_battlegroup(0, FALSE);
+    case GDK_F1:
+      key_unit_assign_battlegroup(0, (ev->state & GDK_SHIFT_MASK));
       return TRUE;
 
-    case GDK_2:
-      key_unit_assign_battlegroup(1, FALSE);
+    case GDK_F2:
+      key_unit_assign_battlegroup(1, (ev->state & GDK_SHIFT_MASK));
       return TRUE;
 
-    case GDK_3:
-      key_unit_assign_battlegroup(2, FALSE);
+    case GDK_F3:
+      key_unit_assign_battlegroup(2, (ev->state & GDK_SHIFT_MASK));
       return TRUE;
 
-    case GDK_4:
-      key_unit_assign_battlegroup(3, FALSE);
+    case GDK_F4:
+      key_unit_assign_battlegroup(3, (ev->state & GDK_SHIFT_MASK));
       return TRUE;
 
     default:
       break;
     };
-  }
+  } else if ((ev->state & GDK_SHIFT_MASK)) {
+    switch (ev->keyval) {
 
-  switch (ev->keyval) {
+    case GDK_F1:
+      key_unit_select_battlegroup(0, FALSE);
+      return TRUE;
 
-  case GDK_exclam:
-    /* Shift + 1 */
-    BATTLEGROUP_SHIFT_CASE(0);
-    return TRUE;
+    case GDK_F2:
+      key_unit_select_battlegroup(1, FALSE);
+      return TRUE;
 
-  case GDK_at:
-    /* Shift + 2 */
-    BATTLEGROUP_SHIFT_CASE(1);
-    return TRUE;
+    case GDK_F3:
+      key_unit_select_battlegroup(2, FALSE);
+      return TRUE;
 
-  case GDK_numbersign:
-    /* Shift + 3 */
-    BATTLEGROUP_SHIFT_CASE(2);
-    return TRUE;
+    case GDK_F4:
+      key_unit_select_battlegroup(3, FALSE);
+      return TRUE;
 
-  case GDK_dollar:
-    /* Shift + 4 */
-    BATTLEGROUP_SHIFT_CASE(3);
-    return TRUE;
+    default:
+      break;
+    };
+  }
 
+  switch (ev->keyval) {
+
   case GDK_KP_Up:
   case GDK_KP_8:
   case GDK_Up:
@@ -643,6 +650,7 @@
     default:
       break;
     };
+  } else {
   }
 
   switch (ev->keyval) {
@@ -665,6 +673,23 @@
     return keyboard_map_canvas(w, ev, data);
   }
 
+#if 0
+  /* We are focused some other dialog, tab, or widget. */
+  if ((ev->state & GDK_CONTROL_MASK)) {
+  } else if ((ev->state & GDK_SHIFT_MASK)) {
+  } else {
+    switch (ev->keyval) {
+
+    case GDK_F4:
+      map_canvas_focus();
+      return TRUE;
+
+    default:
+      break;
+    };
+  }
+#endif
+
   return FALSE;
 }
 
@@ -1161,7 +1186,7 @@
 
   map_widget = gtk_table_new(2, 2, FALSE);
 
-  label = gtk_label_new_with_mnemonic(_("_Map"));
+  label = gtk_label_new(_("View"));
   gtk_notebook_append_page(GTK_NOTEBOOK(top_notebook), map_widget, label);
 
   frame = gtk_frame_new(NULL);
@@ -1552,19 +1577,15 @@
   }
   gtk_widget_set_sensitive(ready_button, (game.player_ptr != NULL));
 
-  if (aconnection.player) {
-    gtk_stockbutton_set_label(nation_button, _("Pick _Nation"));
-  } else {
-    gtk_stockbutton_set_label(nation_button, _("Create _player"));
+  gtk_stockbutton_set_label(nation_button, _("Pick _Nation"));
+  if (!aconnection.player) {
     gtk_widget_set_sensitive(nation_button, game.info.is_new_game);
   }
 
-  if (aconnection.player) {
-    gtk_stockbutton_set_label(take_button, _("_Release player"));
-  } else if (!aconnection.observer) {
+  if (aconnection.player || !aconnection.observer) {
     gtk_stockbutton_set_label(take_button, _("_Observe"));
   } else {
-    gtk_stockbutton_set_label(take_button, _("_Do not observe"));
+    gtk_stockbutton_set_label(take_button, _("Do not _observe"));
   }
 
   gtk_tree_view_column_set_visible(record_col, (with_ggz || in_ggz));
Index: client/gui-gtk-2.0/gui_main.h
===================================================================
--- client/gui-gtk-2.0/gui_main.h       (revision 14164)
+++ client/gui-gtk-2.0/gui_main.h       (working copy)
@@ -76,6 +76,8 @@
 
 void enable_menus(bool enable);
 
+gboolean map_canvas_focus(void);
+
 gboolean inputline_handler(GtkWidget *w, GdkEventKey *ev);
 
 void reset_unit_table(void);
Index: client/gui-gtk-2.0/pages.c
===================================================================
--- client/gui-gtk-2.0/pages.c  (revision 14164)
+++ client/gui-gtk-2.0/pages.c  (working copy)
@@ -999,6 +999,7 @@
     popup_races_dialog(game.player_ptr);
   } else if (game.info.is_new_game) {
     send_chat("/take -");
+    popup_races_dialog(game.player_ptr);
   }
 }
 
@@ -1018,6 +1019,7 @@
       send_chat(buf);
     }
     send_chat("/detach");
+    send_chat("/observe");
   } else if (!aconnection.observer) {
     send_chat("/observe");
   } else {
@@ -1420,7 +1422,7 @@
   label = g_object_new(GTK_TYPE_LABEL,
                       "use-underline", TRUE,
                       "mnemonic-widget", spin,
-                       "label", _("_Number of Players (including AI):"),
+                       "label", _("Number of _Players (including AI):"),
                        "xalign", 0.0,
                        "yalign", 0.5,
                        NULL);
@@ -1447,7 +1449,7 @@
   label = g_object_new(GTK_TYPE_LABEL,
                       "use-underline", TRUE,
                       "mnemonic-widget", option,
-                       "label", _("_AI Skill Level:"),
+                       "label", _("AI Skill _Level:"),
                        "xalign", 0.0,
                        "yalign", 0.5,
                        NULL);
@@ -1464,7 +1466,7 @@
   label = g_object_new(GTK_TYPE_LABEL,
                       "use-underline", TRUE,
                       "mnemonic-widget", GTK_COMBO(ruleset_combo)->entry,
-                       "label", _("_Ruleset:"),
+                       "label", _("Ruleset _Version:"),
                        "xalign", 0.0,
                        "yalign", 0.5,
                        NULL);
@@ -1472,7 +1474,7 @@
 
   align = gtk_alignment_new(0.5, 0.5, 0.0, 0.0);
   button = gtk_stockbutton_new(GTK_STOCK_PREFERENCES,
-      _("More Game _Options..."));
+      _("_More Game Options..."));
   g_signal_connect(button, "clicked",
       G_CALLBACK(game_options_callback), NULL);
   gtk_container_add(GTK_CONTAINER(align), button);
@@ -2104,7 +2106,7 @@
   gtk_box_pack_start(GTK_BOX(box), bbox, FALSE, FALSE, 0);
 
   button = gtk_stockbutton_new(GTK_STOCK_PREFERENCES,
-      _("Game _Options..."));
+      _("_More Game Options..."));
   gtk_container_add(GTK_CONTAINER(bbox), button);
   gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(bbox), button, TRUE);
   g_signal_connect(button, "clicked",
Index: client/gui-gtk-2.0/menu.c
===================================================================
--- client/gui-gtk-2.0/menu.c   (revision 14164)
+++ client/gui-gtk-2.0/menu.c   (working copy)
@@ -156,6 +156,7 @@
   MENU_REPORT_CITIES,
   MENU_REPORT_UNITS,
   MENU_REPORT_PLAYERS,
+  MENU_REPORT_MAP_VIEW,
   MENU_REPORT_ECONOMY,
   MENU_REPORT_SCIENCE,
   MENU_REPORT_WOW,
@@ -573,6 +574,9 @@
   case MENU_REPORT_PLAYERS:
     popup_players_dialog(TRUE);
     break;
+  case MENU_REPORT_MAP_VIEW:
+    map_canvas_focus();
+    break;
    case MENU_REPORT_ECONOMY:
     popup_economy_report_dialog(TRUE);
     break;
@@ -940,15 +944,17 @@
        NULL,                   0,                                      
"<Branch>"      },
   { "/" N_("Reports") "/tearoff1",                     NULL,
        NULL,                   0,                                      
"<Tearoff>"     },
-  { "/" N_("Reports") "/" N_("_Cities"),               "F1",
-       reports_menu_callback,  MENU_REPORT_CITIES                              
        },
+  { "/" N_("Reports") "/" N_("_View"),                 "F1",
+       reports_menu_callback,  MENU_REPORT_MAP_VIEW                            
        },
   { "/" N_("Reports") "/" N_("_Units"),                        "F2",
        reports_menu_callback,  MENU_REPORT_UNITS                               
        },
-  { "/" N_("Reports") "/" N_("_Players"),              "F3",
+  { "/" N_("Reports") "/" N_("_Nations"),              "F3",
        reports_menu_callback,  MENU_REPORT_PLAYERS                             
        },
+  { "/" N_("Reports") "/" N_("_Cities"),               "F4",
+       reports_menu_callback,  MENU_REPORT_CITIES                              
        },
   { "/" N_("Reports") "/" N_("_Economy"),              "F5",
        reports_menu_callback,  MENU_REPORT_ECONOMY                             
        },
-  { "/" N_("Reports") "/" N_("_Science"),              "F6",
+  { "/" N_("Reports") "/" N_("_Research"),             "F6",
        reports_menu_callback,  MENU_REPORT_SCIENCE                             
        },
   { "/" N_("Reports") "/sep1",                         NULL,
        NULL,                   0,                                      
"<Separator>"   },
@@ -960,7 +966,7 @@
        reports_menu_callback,  MENU_REPORT_MESSAGES                            
        },
   { "/" N_("Reports") "/" N_("_Demographics"),         "F11",
        reports_menu_callback,  MENU_REPORT_DEMOGRAPHIC                         
        },
-  { "/" N_("Reports") "/" N_("S_paceship"),            "F12",
+  { "/" N_("Reports") "/" N_("_Spaceship"),            "F12",
        reports_menu_callback,  MENU_REPORT_SPACESHIP                           
        },
 
   /* Help menu ... */
@@ -1349,9 +1355,9 @@
     menus_set_sensitive("<main>/_Reports/_Cities", attached_to_player);
     menus_set_sensitive("<main>/_Reports/_Units", attached_to_player);
     menus_set_sensitive("<main>/_Reports/_Economy", attached_to_player);
-    menus_set_sensitive("<main>/_Reports/_Science", attached_to_player);
+    menus_set_sensitive("<main>/_Reports/_Research", attached_to_player);
     menus_set_sensitive("<main>/_Reports/_Demographics", attached_to_player);
-    menus_set_sensitive("<main>/_Reports/S_paceship",
+    menus_set_sensitive("<main>/_Reports/_Spaceship",
                        (game.player_ptr
                         && game.player_ptr->spaceship.state != SSHIP_NONE));
 
Index: client/gui-gtk-2.0/dialogs.c
===================================================================
--- client/gui-gtk-2.0/dialogs.c        (revision 14164)
+++ client/gui-gtk-2.0/dialogs.c        (working copy)
@@ -746,7 +746,7 @@
   label = g_object_new(GTK_TYPE_LABEL,
       "use-underline", TRUE,
       "mnemonic-widget", nation_list,
-      "label", _("_Nations:"),
+      "label", _("Nation _Groups:"),
       "xalign", 0.0,
       "yalign", 0.5,
       NULL);
@@ -803,7 +803,7 @@
                                      0,
                                      GTK_STOCK_CANCEL,
                                      GTK_RESPONSE_CANCEL,
-                                     _("Random Nation"),
+                                     _("_Random Nation"),
                                      GTK_RESPONSE_NO, /* arbitrary */
                                      GTK_STOCK_OK,
                                      GTK_RESPONSE_ACCEPT,
@@ -892,7 +892,7 @@
   label = g_object_new(GTK_TYPE_LABEL,
       "use-underline", TRUE,
       "mnemonic-widget", list,
-      "label", _("_City Styles:"),
+      "label", _("City _Styles:"),
       "xalign", 0.0,
       "yalign", 0.5,
       NULL);
@@ -931,7 +931,7 @@
   }
 
   /* Legend pane. */
-  label = gtk_label_new_with_mnemonic(_("L_egend"));
+  label = gtk_label_new_with_mnemonic(_("_Description"));
 
   vbox = gtk_vbox_new(FALSE, 6);
   gtk_container_set_border_width(GTK_CONTAINER(vbox), 6);
Index: client/gui-gtk-2.0/plrdlg.c
===================================================================
--- client/gui-gtk-2.0/plrdlg.c (revision 14164)
+++ client/gui-gtk-2.0/plrdlg.c (working copy)
@@ -352,7 +352,7 @@
   enum ai_level level;
 
   gui_dialog_new(&players_dialog_shell, GTK_NOTEBOOK(top_notebook), NULL);
-  gui_dialog_set_title(players_dialog_shell, _("Players"));
+  gui_dialog_set_title(players_dialog_shell, _("Nations"));
 
   gui_dialog_add_button(players_dialog_shell,
       GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to