This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.
The branch, next has been updated
via 8d7c725b7b7a09ebd0f1595cc3f07f362fe82c6f (commit)
from 8f724f65aa59e6db003fead2fcc56abfd569c310 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/8d7c725b7b7a09ebd0f1595cc3f07f362fe82c6f
commit 8d7c725b7b7a09ebd0f1595cc3f07f362fe82c6f
Author: Iain Patterson <[email protected]>
Date: Fri Feb 10 11:02:25 2012 +0000
Made ARROWLESS_KBD a preference.
Replace the ARROWLESS_KBD #define with the ViKeyMenus preference.
When ViKeyMenus is TRUE, users can type h/j/k/l to scroll around menus.
Since ARROWLESS_KBD was previously undefined by default, ViKeyMenus is
FALSE by default.
diff --git a/WPrefs.app/MenuPreferences.c b/WPrefs.app/MenuPreferences.c
index 8d270ab..a579858 100644
--- a/WPrefs.app/MenuPreferences.c
+++ b/WPrefs.app/MenuPreferences.c
@@ -41,6 +41,7 @@ typedef struct _Panel {
WMFrame *optF;
WMButton *autoB;
+ WMButton *autoC;
WMButton *wrapB;
} _Panel;
@@ -64,6 +65,8 @@ static void showData(_Panel * panel)
WMSetButtonSelected(panel->wrapB, GetBoolForKey("WrapMenus"));
WMSetButtonSelected(panel->autoB, GetBoolForKey("ScrollableMenus"));
+
+ WMSetButtonSelected(panel->autoC, GetBoolForKey("ViKeyMenus"));
}
static void storeData(_Panel * panel)
@@ -80,6 +83,7 @@ static void storeData(_Panel * panel)
SetBoolForKey(WMGetButtonSelected(panel->wrapB), "WrapMenus");
SetBoolForKey(WMGetButtonSelected(panel->autoB), "ScrollableMenus");
+ SetBoolForKey(WMGetButtonSelected(panel->autoC), "ViKeyMenus");
}
static void createPanel(Panel * p)
@@ -184,8 +188,8 @@ static void createPanel(Panel * p)
/***************** Options ****************/
panel->optF = WMCreateFrame(panel->box);
- WMResizeWidget(panel->optF, 475, 80);
- WMMoveWidget(panel->optF, 25, 130);
+ WMResizeWidget(panel->optF, 475, 96);
+ WMMoveWidget(panel->optF, 25, 120);
panel->wrapB = WMCreateSwitchButton(panel->optF);
WMResizeWidget(panel->wrapB, 440, 32);
@@ -196,8 +200,12 @@ static void createPanel(Panel * p)
panel->autoB = WMCreateSwitchButton(panel->optF);
WMResizeWidget(panel->autoB, 440, 32);
- WMMoveWidget(panel->autoB, 25, 45);
+ WMMoveWidget(panel->autoB, 25, 34);
WMSetButtonText(panel->autoB, _("Scroll off-screen menus when pointer
is moved over them."));
+ panel->autoC = WMCreateSwitchButton(panel->optF);
+ WMResizeWidget(panel->autoC, 440, 32);
+ WMMoveWidget(panel->autoC, 25, 58);
+ WMSetButtonText(panel->autoC, _("Use h/j/k/l keys to select menu
options."));
WMMapSubwidgets(panel->optF);
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 5168910..c0560a7 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -324,6 +324,7 @@ typedef struct WPreferences {
char opaque_move_resize_keyboard; /* update window position during
move,resize with keyboard */
char wrap_menus; /* wrap menus at edge of screen */
char scrollable_menus; /* let them be scrolled */
+ char vi_key_menus; /* use h/j/k/l to select */
char align_menus; /* align menu with their parents */
char use_saveunders; /* turn on SaveUnders for menus, icons
etc. */
char no_window_over_dock;
diff --git a/src/defaults.c b/src/defaults.c
index 70a372a..2b6efd6 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -391,6 +391,8 @@ WDefaultEntry optionList[] = {
&wPreferences.dblclick_time, getInt, setDoubleClick, NULL, NULL},
{"AlignSubmenus", "NO", NULL,
&wPreferences.align_menus, getBool, NULL, NULL, NULL},
+ {"ViKeyMenus", "NO", NULL,
+ &wPreferences.vi_key_menus, getBool, NULL, NULL, NULL},
{"OpenTransientOnOwnerWorkspace", "NO", NULL,
&wPreferences.open_transients_with_parent, getBool, NULL, NULL,
NULL},
{"WindowPlacement", "auto", sePlacements,
diff --git a/src/menu.c b/src/menu.c
index dd84ca2..5286899 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -892,6 +892,26 @@ static int keyboardMenu(WMenu * menu)
switch (event.type) {
case KeyPress:
ksym = XLookupKeysym(&event.xkey, 0);
+ if (wPreferences.vi_key_menus) {
+ switch (ksym) {
+ case XK_h:
+ ksym = XK_Left;
+ break;
+
+ case XK_j:
+ ksym = XK_Down;
+ break;
+
+ case XK_k:
+ ksym = XK_Up;
+ break;
+
+ case XK_l:
+ ksym = XK_Right;
+ break;
+
+ }
+ }
switch (ksym) {
case XK_Escape:
done = 1;
@@ -914,9 +934,6 @@ static int keyboardMenu(WMenu * menu)
break;
case XK_Up:
-#ifdef ARROWLESS_KBD
- case XK_k:
-#endif
#ifdef XK_KP_Up
case XK_KP_Up:
#endif
@@ -928,9 +945,6 @@ static int keyboardMenu(WMenu * menu)
break;
case XK_Down:
-#ifdef ARROWLESS_KBD
- case XK_j:
-#endif
#ifdef XK_KP_Down
case XK_KP_Down:
#endif
@@ -944,9 +958,6 @@ static int keyboardMenu(WMenu * menu)
break;
case XK_Right:
-#ifdef ARROWLESS_KBD
- case XK_l:
-#endif
#ifdef XK_KP_Right
case XK_KP_Right:
#endif
@@ -970,9 +981,6 @@ static int keyboardMenu(WMenu * menu)
break;
case XK_Left:
-#ifdef ARROWLESS_KBD
- case XK_h:
-#endif
#ifdef XK_KP_Left
case XK_KP_Left:
#endif
diff --git a/src/wconfig.h.in b/src/wconfig.h.in
index 5b70e53..855d7df 100644
--- a/src/wconfig.h.in
+++ b/src/wconfig.h.in
@@ -348,9 +348,6 @@
#define KEY_CONTROL_WINDOW_WEIGHT 1
-/* if your keyboard don't have arrow keys */
-#undef ARROWLESS_KBD
-
/* don't put titles in miniwindows */
#undef NO_MINIWINDOW_TITLES
-----------------------------------------------------------------------
Summary of changes:
WPrefs.app/MenuPreferences.c | 14 +++++++++++---
src/WindowMaker.h | 1 +
src/defaults.c | 2 ++
src/menu.c | 32 ++++++++++++++++++++------------
src/wconfig.h.in | 3 ---
5 files changed, 34 insertions(+), 18 deletions(-)
repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")
--
To unsubscribe, send mail to [email protected].