[Freeciv-Dev] (PR#11555) [PATCH] change gui-gtk keyboard shortcuts to ma
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: |
[Freeciv-Dev] (PR#11555) [PATCH] change gui-gtk keyboard shortcuts to match helpdata.txt. |
From: |
"Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx> |
Date: |
Thu, 16 Dec 2004 12:46:54 -0800 |
Reply-to: |
bugs@xxxxxxxxxxx |
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11555 >
What the title says.
Index: client/gui-gtk/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/gui_main.c,v
retrieving revision 1.157
diff -u -r1.157 gui_main.c
--- client/gui-gtk/gui_main.c 7 Dec 2004 22:38:59 -0000 1.157
+++ client/gui-gtk/gui_main.c 16 Dec 2004 20:41:25 -0000
@@ -259,6 +259,38 @@
}
if (!client_is_observer()) {
+ if ((ev->state & GDK_SHIFT_MASK)) {
+ switch (ev->keyval) {
+ case GDK_Left:
+ scroll_mapview(DIR8_WEST);
+ break;
+
+ case GDK_Right:
+ scroll_mapview(DIR8_EAST);
+ break;
+
+ case GDK_Up:
+ scroll_mapview(DIR8_NORTH);
+ break;
+
+ case GDK_Down:
+ scroll_mapview(DIR8_SOUTH);
+ break;
+
+ case GDK_Home:
+ key_center_capital();
+ break;
+
+ case GDK_Return:
+ case GDK_KP_Enter:
+ key_end_turn();
+ break;
+
+ default:
+ break;
+ }
+ }
+
switch (ev->keyval) {
case GDK_KP_Up:
case GDK_8:
@@ -266,7 +298,6 @@
key_unit_move(DIR8_NORTH);
break;
- case GDK_Page_Up:
case GDK_KP_Page_Up:
case GDK_9:
case GDK_KP_9:
@@ -279,7 +310,6 @@
key_unit_move(DIR8_EAST);
break;
- case GDK_Page_Down:
case GDK_KP_Page_Down:
case GDK_3:
case GDK_KP_3:
@@ -292,7 +322,6 @@
key_unit_move(DIR8_SOUTH);
break;
- case GDK_End:
case GDK_KP_End:
case GDK_1:
case GDK_KP_1:
@@ -311,55 +340,30 @@
key_unit_move(DIR8_NORTHWEST);
break;
- case GDK_Left:
- scroll_mapview(DIR8_WEST);
- break;
-
- case GDK_Right:
- scroll_mapview(DIR8_EAST);
- break;
-
- case GDK_Up:
- scroll_mapview(DIR8_NORTH);
- break;
-
- case GDK_Down:
- scroll_mapview(DIR8_SOUTH);
- break;
-
- case GDK_Return:
- case GDK_KP_Enter:
- key_end_turn();
- break;
-
case GDK_5:
case GDK_KP_5:
case GDK_KP_Begin:
- key_recall_previous_focus_unit();
- break;
+ key_recall_previous_focus_unit();
+ break;
case GDK_Escape:
- key_cancel_action();
- break;
+ key_cancel_action();
+ break;
case GDK_t:
- key_city_workers(w, ev);
- break;
-
- case GDK_Home:
- key_center_capital();
- break;
+ key_city_workers(w, ev);
+ break;
case GDK_KP_Divide:
- key_quickselect(SELECT_SEA);
- break;
+ key_quickselect(SELECT_SEA);
+ break;
case GDK_KP_Multiply:
- key_quickselect(SELECT_LAND);
- break;
+ key_quickselect(SELECT_LAND);
+ break;
default:
- return FALSE;
+ return FALSE;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#11555) [PATCH] change gui-gtk keyboard shortcuts to match helpdata.txt.,
Vasco Alexandre da Silva Costa <=
|
|