[Freeciv-Dev] (PR#12379) unexpected behavior of 't' command
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12379 >
This patch turns the 't' command into a menu command.
I'm not sure if this is a good idea but it does have some advantages.
The user can see the command and try it out from the menu. But it
usually won't do anything when invoked from the menu since it depends on
the mouse position. Only when invoked through the shortcut will it have
a useful effect.
-jason
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.111
diff -u -r1.111 gui_main.c
--- client/gui-gtk-2.0/gui_main.c 28 Feb 2005 04:16:45 -0000 1.111
+++ client/gui-gtk-2.0/gui_main.c 1 Mar 2005 19:34:38 -0000
@@ -475,10 +475,6 @@
key_cancel_action();
break;
- case GDK_t:
- key_city_workers(w, ev);
- break;
-
case GDK_KP_Divide:
key_quickselect(SELECT_SEA);
break;
Index: client/gui-gtk-2.0/menu.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/menu.c,v
retrieving revision 1.65
diff -u -r1.65 menu.c
--- client/gui-gtk-2.0/menu.c 12 Feb 2005 17:51:53 -0000 1.65
+++ client/gui-gtk-2.0/menu.c 1 Mar 2005 19:34:39 -0000
@@ -112,6 +112,7 @@
MENU_VIEW_SHOW_FOCUS_UNIT,
MENU_VIEW_SHOW_FOG_OF_WAR,
MENU_VIEW_FULL_SCREEN,
+ MENU_VIEW_CITY_OVERLAY,
MENU_VIEW_CENTER_VIEW,
MENU_ORDER_BUILD_CITY, /* shared with BUILD_WONDER */
@@ -387,6 +388,9 @@
case MENU_VIEW_CENTER_VIEW:
center_on_unit();
break;
+ case MENU_VIEW_CITY_OVERLAY:
+ key_city_workers(NULL, NULL);
+ break;
}
}
@@ -782,6 +786,8 @@
view_menu_callback, MENU_VIEW_FULL_SCREEN,
"<CheckItem>" },
{ "/" N_("View") "/sep3", NULL,
NULL, 0,
"<Separator>" },
+ { "/" N_("View") "/" N_("Ci_ty Overlay"), "t",
+ view_menu_callback, MENU_VIEW_CITY_OVERLAY },
{ "/" N_("View") "/" N_("_Center View"), "c",
view_menu_callback, MENU_VIEW_CENTER_VIEW
},
/* Orders menu ... */
|
|