diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c index b14f5490..5d539fca 100644 --- a/WPrefs.app/Expert.c +++ b/WPrefs.app/Expert.c @@ -21,6 +21,12 @@ #include "WPrefs.h" +#ifdef XKB_MODELOCK +#define NUMITEMS 12 +#else +#define NUMITEMS 11 +#endif + typedef struct _Panel { WMBox *box; char *sectionName; @@ -31,7 +37,7 @@ typedef struct _Panel { WMWidget *parent; - WMButton *swi[14]; + WMButton *swi[NUMITEMS]; } _Panel; @@ -51,10 +57,10 @@ static void showData(_Panel * panel) WMSetButtonSelected(panel->swi[7], GetBoolForKey("SingleClickLaunch")); WMSetButtonSelected(panel->swi[8], GetBoolForKey("CycleActiveHeadOnly")); WMSetButtonSelected(panel->swi[9], GetBoolForKey("ShowClipTitle")); - WMSetButtonSelected(panel->swi[10], GetBoolForKey("BounceAppIconsWhenUrgent")); - WMSetButtonSelected(panel->swi[11], GetBoolForKey("RaiseAppIconsWhenBouncing")); - WMSetButtonSelected(panel->swi[12], GetBoolForKey("OpaqueMoveResizeKeyboard")); - WMSetButtonSelected(panel->swi[13], GetBoolForKey("DoNotMakeAppIconsBounce")); + WMSetButtonSelected(panel->swi[10], GetBoolForKey("OpaqueMoveResizeKeyboard")); +#ifdef XKB_MODELOCK + WMSetButtonSelected(panel->swi[11], GetBoolForKey("KbdModeLock")); +#endif /* XKB_MODELOCK */ } static void createPanel(Panel * p) @@ -75,10 +81,10 @@ static void createPanel(Panel * p) WMSetScrollViewHasHorizontalScroller(sv, False); f = WMCreateFrame(panel->box); - WMResizeWidget(f, 495, sizeof(panel->swi) / sizeof(char *) * 25 + 8); + WMResizeWidget(f, 495, NUMITEMS * 25 + 8); WMSetFrameRelief(f, WRFlat); - for (i = 0; i < sizeof(panel->swi) / sizeof(char *); i++) { + for (i = 0; i < NUMITEMS; i++) { panel->swi[i] = WMCreateSwitchButton(f); WMResizeWidget(panel->swi[i], FRAME_WIDTH - 40, 25); WMMoveWidget(panel->swi[i], 5, 5 + i * 25); @@ -95,15 +101,14 @@ static void createPanel(Panel * p) WMSetButtonText(panel->swi[7], _("Launch applications and restore windows with a single click.")); WMSetButtonText(panel->swi[8], _("Cycle windows only on the active head.")); WMSetButtonText(panel->swi[9], _("Show workspace title on Clip.")); - WMSetButtonText(panel->swi[10], _("Bounce AppIcons when the application wants attention.")); - WMSetButtonText(panel->swi[11], _("Raise AppIcons when bouncing.")); - WMSetButtonText(panel->swi[12], _("Opaque Move,Resize with keyboard.")); - WMSetButtonText(panel->swi[13], _("Do not make AppIcons bounce.")); + WMSetButtonText(panel->swi[10], _("Opaque Move,Resize with keyboard.")); +#ifdef XKB_MODELOCK + WMSetButtonText(panel->swi[11], _("Enable keyboard language switch button in window titlebars.")); +#endif /* XKB_MODELOCK */ /* If the item is default true, enable the button here */ WMSetButtonEnabled(panel->swi[6], True); WMSetButtonEnabled(panel->swi[9], True); - WMSetButtonEnabled(panel->swi[10], True); WMMapSubwidgets(panel->box); WMSetScrollViewContentView(sv, WMWidgetView(f)); @@ -128,10 +133,10 @@ static void storeDefaults(_Panel * panel) SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch"); SetBoolForKey(WMGetButtonSelected(panel->swi[8]), "CycleActiveHeadOnly"); SetBoolForKey(WMGetButtonSelected(panel->swi[9]), "ShowClipTitle"); - SetBoolForKey(WMGetButtonSelected(panel->swi[10]), "BounceAppIconsWhenUrgent"); - SetBoolForKey(WMGetButtonSelected(panel->swi[11]), "RaiseAppIconsWhenBouncing"); - SetBoolForKey(WMGetButtonSelected(panel->swi[12]), "OpaqueMoveResizeKeyboard"); - SetBoolForKey(WMGetButtonSelected(panel->swi[13]), "DoNotMakeAppIconsBounce"); + SetBoolForKey(WMGetButtonSelected(panel->swi[10]), "OpaqueMoveResizeKeyboard"); +#ifdef XKB_MODELOCK + SetBoolForKey(WMGetButtonSelected(panel->swi[11]), "KbdModeLock"); +#endif /* XKB_MODELOCK */ } Panel *InitExpert(WMScreen * scr, WMWidget * parent) @@ -143,7 +148,7 @@ Panel *InitExpert(WMScreen * scr, WMWidget * parent) panel->sectionName = _("Expert User Preferences"); panel->description = _("Options for people who know what they're doing...\n" - "Also have some other misc. options."); + "Also has some other misc. options."); panel->parent = parent; diff --git a/WPrefs.app/Focus.c b/WPrefs.app/Focus.c index 8a37af58..8d8eb392 100644 --- a/WPrefs.app/Focus.c +++ b/WPrefs.app/Focus.c @@ -47,6 +47,7 @@ typedef struct _Panel { WMFrame *optF; WMButton *ignB; WMButton *newB; + WMButton *craisB; char raiseDelaySelected; } _Panel; @@ -112,6 +113,7 @@ static void showData(_Panel * panel) /**/ WMSetButtonSelected(panel->ignB, GetBoolForKey("IgnoreFocusClick")); WMSetButtonSelected(panel->newB, GetBoolForKey("AutoFocus")); + WMSetButtonSelected(panel->craisB, GetBoolForKey("CirculateRaise")); } static void storeData(_Panel * panel) @@ -139,6 +141,7 @@ static void storeData(_Panel * panel) SetBoolForKey(WMGetButtonSelected(panel->ignB), "IgnoreFocusClick"); SetBoolForKey(WMGetButtonSelected(panel->newB), "AutoFocus"); + SetBoolForKey(WMGetButtonSelected(panel->craisB), "CirculateRaise"); } static void pushDelayButton(WMWidget * w, void *data) @@ -306,14 +309,19 @@ static void createPanel(Panel * p) panel->ignB = WMCreateSwitchButton(panel->optF); WMResizeWidget(panel->ignB, 225, 50); - WMMoveWidget(panel->ignB, 10, 10); + WMMoveWidget(panel->ignB, 10, 4); WMSetButtonText(panel->ignB, _("Do not let applications receive " "the click used to focus windows.")); panel->newB = WMCreateSwitchButton(panel->optF); WMResizeWidget(panel->newB, 225, 35); - WMMoveWidget(panel->newB, 10, 70); + WMMoveWidget(panel->newB, 10, 44); WMSetButtonText(panel->newB, _("Automatically focus new windows.")); + panel->craisB = WMCreateSwitchButton(panel->optF); + WMResizeWidget(panel->craisB, 225, 36); + WMMoveWidget(panel->craisB, 10, 75); + WMSetButtonText(panel->craisB, _("Raise window when switching\nfocus with keyboard.")); + WMMapSubwidgets(panel->optF); WMRealizeWidget(panel->box); diff --git a/WPrefs.app/Preferences.c b/WPrefs.app/Preferences.c index 6d0217db..91b04db5 100644 --- a/WPrefs.app/Preferences.c +++ b/WPrefs.app/Preferences.c @@ -1,4 +1,4 @@ -/* Preferences.c- misc personal preferences +/* Preferences.c- misc ergonomic preferences * * WPrefs - Window Maker Preferences Program * @@ -42,10 +42,9 @@ typedef struct _Panel { WMButton *ballB[4]; WMFrame *optF; - WMButton *raisB; -#ifdef XKB_MODELOCK - WMButton *modeB; -#endif /* XKB_MODELOCK */ + WMButton *bounceB; + WMButton *bounceUrgB; + WMButton *bounceRaisB; WMFrame *borderF; WMSlider *borderS; @@ -127,10 +126,9 @@ static void showData(_Panel * panel) WMSetButtonSelected(panel->lrB, True); } - WMSetButtonSelected(panel->raisB, GetBoolForKey("CirculateRaise")); -#ifdef XKB_MODELOCK - WMSetButtonSelected(panel->modeB, GetBoolForKey("KbdModeLock")); -#endif /* XKB_MODELOCK */ + WMSetButtonSelected(panel->bounceB, GetBoolForKey("DoNotMakeAppIconsBounce")); + WMSetButtonSelected(panel->bounceUrgB, GetBoolForKey("BounceAppIconsWhenUrgent")); + WMSetButtonSelected(panel->bounceRaisB, GetBoolForKey("RaiseAppIconsWhenBouncing")); WMSetButtonSelected(panel->ballB[0], GetBoolForKey("WindowTitleBalloons")); WMSetButtonSelected(panel->ballB[1], GetBoolForKey("MiniwindowTitleBalloons")); @@ -191,10 +189,9 @@ static void storeData(_Panel * panel) SetStringForKey(str, "WorkspaceBorder"); SetIntegerForKey(WMGetSliderValue(panel->borderS), "WorkspaceBorderSize"); - SetBoolForKey(WMGetButtonSelected(panel->raisB), "CirculateRaise"); -#ifdef XKB_MODELOCK - SetBoolForKey(WMGetButtonSelected(panel->modeB), "KbdModeLock"); -#endif /* XKB_MODELOCK */ + SetBoolForKey(WMGetButtonSelected(panel->bounceB), "DoNotMakeAppIconsBounce"); + SetBoolForKey(WMGetButtonSelected(panel->bounceUrgB), "BounceAppIconsWhenUrgent"); + SetBoolForKey(WMGetButtonSelected(panel->bounceRaisB), "RaiseAppIconsWhenBouncing"); SetBoolForKey(WMGetButtonSelected(panel->ballB[0]), "WindowTitleBalloons"); SetBoolForKey(WMGetButtonSelected(panel->ballB[1]), "MiniwindowTitleBalloons"); SetBoolForKey(WMGetButtonSelected(panel->ballB[2]), "AppIconBalloons"); @@ -271,17 +268,21 @@ static void createPanel(Panel * p) WMResizeWidget(panel->optF, 235, 97); WMMoveWidget(panel->optF, 270, 128); - panel->raisB = WMCreateSwitchButton(panel->optF); - WMResizeWidget(panel->raisB, 210, 36); - WMMoveWidget(panel->raisB, 15, 5); - WMSetButtonText(panel->raisB, _("Raise window when switching\nfocus with keyboard.")); + panel->bounceB = WMCreateSwitchButton(panel->optF); + WMResizeWidget(panel->bounceB, 210, 25); + WMMoveWidget(panel->bounceB, 15, 8); + WMSetButtonText(panel->bounceB, _("Do not make AppIcons bounce.")); -#ifdef XKB_MODELOCK - panel->modeB = WMCreateSwitchButton(panel->optF); - WMResizeWidget(panel->modeB, 210, 40); - WMMoveWidget(panel->modeB, 15, 44); - WMSetButtonText(panel->modeB, _("Enable keyboard language\nswitch button in window titlebars.")); -#endif + panel->bounceUrgB = WMCreateSwitchButton(panel->optF); + WMResizeWidget(panel->bounceUrgB, 210, 30); + WMMoveWidget(panel->bounceUrgB, 15, 33); + WMSetButtonText(panel->bounceUrgB, _("Bounce AppIcons when the application wants attention.")); + WMSetButtonEnabled(panel->bounceUrgB, True); /* defaults to true */ + + panel->bounceRaisB = WMCreateSwitchButton(panel->optF); + WMResizeWidget(panel->bounceRaisB, 210, 25); + WMMoveWidget(panel->bounceRaisB, 15, 64); + WMSetButtonText(panel->bounceRaisB, _("Raise AppIcons when bouncing.")); WMMapSubwidgets(panel->optF);