mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 14:08:06 +01:00
WPrefs: reorganised the Preference panel for better look
As many option have been added to it, the panel started to look overloaded. With a little rework, it now displays the same options in a cleaner way. Took opportunity to include some balloon help for the AppIcon option to try to be clearer than what the short label allows. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
03a7771c86
commit
753f44ca83
@@ -37,10 +37,16 @@ static const struct {
|
|||||||
const char *db_key;
|
const char *db_key;
|
||||||
int default_value;
|
int default_value;
|
||||||
const char *label;
|
const char *label;
|
||||||
|
const char *balloon_msg;
|
||||||
} appicon_bouncing[] = {
|
} appicon_bouncing[] = {
|
||||||
{ "DoNotMakeAppIconsBounce", False, N_("Disable AppIcon bounce.") },
|
{ "DoNotMakeAppIconsBounce", False, N_("Disable AppIcon bounce"),
|
||||||
{ "BounceAppIconsWhenUrgent", True, N_("Bounce AppIcon when the application wants attention.") },
|
N_("By default, the AppIcon bounces when the application is launched") },
|
||||||
{ "RaiseAppIconsWhenBouncing", False, N_("Raise AppIcons when bouncing.") }
|
|
||||||
|
{ "BounceAppIconsWhenUrgent", True, N_("Bounce when the application wants attention"),
|
||||||
|
NULL },
|
||||||
|
|
||||||
|
{ "RaiseAppIconsWhenBouncing", False, N_("Raise AppIcon when bouncing"),
|
||||||
|
N_("Otherwise you will not see it bouncing if\nthere is a window in front of the AppIcon") }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
@@ -229,16 +235,16 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
/***************** Size Display ****************/
|
/***************** Size Display ****************/
|
||||||
panel->sizeF = WMCreateFrame(panel->box);
|
panel->sizeF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->sizeF, 240, 60);
|
WMResizeWidget(panel->sizeF, 255, 52);
|
||||||
WMMoveWidget(panel->sizeF, 15, 10);
|
WMMoveWidget(panel->sizeF, 15, 7);
|
||||||
WMSetFrameTitle(panel->sizeF, _("Size Display"));
|
WMSetFrameTitle(panel->sizeF, _("Size Display"));
|
||||||
|
|
||||||
WMSetBalloonTextForView(_("The position or style of the window size\n"
|
WMSetBalloonTextForView(_("The position or style of the window size\n"
|
||||||
"display that's shown when a window is resized."), WMWidgetView(panel->sizeF));
|
"display that's shown when a window is resized."), WMWidgetView(panel->sizeF));
|
||||||
|
|
||||||
panel->sizeP = WMCreatePopUpButton(panel->sizeF);
|
panel->sizeP = WMCreatePopUpButton(panel->sizeF);
|
||||||
WMResizeWidget(panel->sizeP, 200, 20);
|
WMResizeWidget(panel->sizeP, 227, 20);
|
||||||
WMMoveWidget(panel->sizeP, 20, 24);
|
WMMoveWidget(panel->sizeP, 14, 20);
|
||||||
WMAddPopUpButtonItem(panel->sizeP, _("Corner of screen"));
|
WMAddPopUpButtonItem(panel->sizeP, _("Corner of screen"));
|
||||||
WMAddPopUpButtonItem(panel->sizeP, _("Center of screen"));
|
WMAddPopUpButtonItem(panel->sizeP, _("Center of screen"));
|
||||||
WMAddPopUpButtonItem(panel->sizeP, _("Center of resized window"));
|
WMAddPopUpButtonItem(panel->sizeP, _("Center of resized window"));
|
||||||
@@ -249,16 +255,16 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
/***************** Position Display ****************/
|
/***************** Position Display ****************/
|
||||||
panel->posiF = WMCreateFrame(panel->box);
|
panel->posiF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->posiF, 240, 60);
|
WMResizeWidget(panel->posiF, 255, 52);
|
||||||
WMMoveWidget(panel->posiF, 15, 75);
|
WMMoveWidget(panel->posiF, 15, 66);
|
||||||
WMSetFrameTitle(panel->posiF, _("Position Display"));
|
WMSetFrameTitle(panel->posiF, _("Position Display"));
|
||||||
|
|
||||||
WMSetBalloonTextForView(_("The position or style of the window position\n"
|
WMSetBalloonTextForView(_("The position or style of the window position\n"
|
||||||
"display that's shown when a window is moved."), WMWidgetView(panel->posiF));
|
"display that's shown when a window is moved."), WMWidgetView(panel->posiF));
|
||||||
|
|
||||||
panel->posiP = WMCreatePopUpButton(panel->posiF);
|
panel->posiP = WMCreatePopUpButton(panel->posiF);
|
||||||
WMResizeWidget(panel->posiP, 200, 20);
|
WMResizeWidget(panel->posiP, 227, 20);
|
||||||
WMMoveWidget(panel->posiP, 20, 24);
|
WMMoveWidget(panel->posiP, 14, 20);
|
||||||
WMAddPopUpButtonItem(panel->posiP, _("Corner of screen"));
|
WMAddPopUpButtonItem(panel->posiP, _("Corner of screen"));
|
||||||
WMAddPopUpButtonItem(panel->posiP, _("Center of screen"));
|
WMAddPopUpButtonItem(panel->posiP, _("Center of screen"));
|
||||||
WMAddPopUpButtonItem(panel->posiP, _("Center of resized window"));
|
WMAddPopUpButtonItem(panel->posiP, _("Center of resized window"));
|
||||||
@@ -268,14 +274,14 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
/***************** Balloon Text ****************/
|
/***************** Balloon Text ****************/
|
||||||
panel->ballF = WMCreateFrame(panel->box);
|
panel->ballF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->ballF, 240, 126);
|
WMResizeWidget(panel->ballF, 220, 132);
|
||||||
WMMoveWidget(panel->ballF, 265, 10);
|
WMMoveWidget(panel->ballF, 285, 7);
|
||||||
WMSetFrameTitle(panel->ballF, _("Show balloon for..."));
|
WMSetFrameTitle(panel->ballF, _("Show balloon for..."));
|
||||||
|
|
||||||
for (i = 0; i < wlengthof(balloon_choices); i++) {
|
for (i = 0; i < wlengthof(balloon_choices); i++) {
|
||||||
panel->ballB[i] = WMCreateSwitchButton(panel->ballF);
|
panel->ballB[i] = WMCreateSwitchButton(panel->ballF);
|
||||||
WMResizeWidget(panel->ballB[i], 210, 20);
|
WMResizeWidget(panel->ballB[i], 198, 20);
|
||||||
WMMoveWidget(panel->ballB[i], 15, 16 + i * 22);
|
WMMoveWidget(panel->ballB[i], 11, 16 + i * 22);
|
||||||
WMSetButtonText(panel->ballB[i], _(balloon_choices[i].label));
|
WMSetButtonText(panel->ballB[i], _(balloon_choices[i].label));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,47 +289,51 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
/***************** Options ****************/
|
/***************** Options ****************/
|
||||||
panel->optF = WMCreateFrame(panel->box);
|
panel->optF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->optF, 240, 91);
|
WMResizeWidget(panel->optF, 255, 94);
|
||||||
WMMoveWidget(panel->optF, 265, 136);
|
WMMoveWidget(panel->optF, 15, 125);
|
||||||
WMSetFrameTitle(panel->optF, _("AppIcon bouncing"));
|
WMSetFrameTitle(panel->optF, _("AppIcon bouncing"));
|
||||||
|
|
||||||
for (i = 0; i < wlengthof(appicon_bouncing); i++) {
|
for (i = 0; i < wlengthof(appicon_bouncing); i++) {
|
||||||
panel->bounceB[i] = WMCreateSwitchButton(panel->optF);
|
panel->bounceB[i] = WMCreateSwitchButton(panel->optF);
|
||||||
WMResizeWidget(panel->bounceB[i], 210, 26);
|
WMResizeWidget(panel->bounceB[i], 237, 26);
|
||||||
WMMoveWidget(panel->bounceB[i], 15, 12 + i * 25);
|
WMMoveWidget(panel->bounceB[i], 9, 14 + i * 25);
|
||||||
WMSetButtonText(panel->bounceB[i], _(appicon_bouncing[i].label));
|
WMSetButtonText(panel->bounceB[i], _(appicon_bouncing[i].label));
|
||||||
|
|
||||||
if (appicon_bouncing[i].default_value)
|
if (appicon_bouncing[i].default_value)
|
||||||
WMSetButtonSelected(panel->bounceB[i], True);
|
WMSetButtonSelected(panel->bounceB[i], True);
|
||||||
|
|
||||||
|
if (appicon_bouncing[i].balloon_msg)
|
||||||
|
WMSetBalloonTextForView(_(appicon_bouncing[i].balloon_msg),
|
||||||
|
WMWidgetView(panel->bounceB[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
WMMapSubwidgets(panel->optF);
|
WMMapSubwidgets(panel->optF);
|
||||||
|
|
||||||
/***************** Workspace border ****************/
|
/***************** Workspace border ****************/
|
||||||
panel->borderF = WMCreateFrame(panel->box);
|
panel->borderF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->borderF, 240, 82);
|
WMResizeWidget(panel->borderF, 220, 75);
|
||||||
WMMoveWidget(panel->borderF, 15, 145);
|
WMMoveWidget(panel->borderF, 285, 144);
|
||||||
WMSetFrameTitle(panel->borderF, _("Workspace border"));
|
WMSetFrameTitle(panel->borderF, _("Workspace border"));
|
||||||
|
|
||||||
panel->borderS = WMCreateSlider(panel->borderF);
|
panel->borderS = WMCreateSlider(panel->borderF);
|
||||||
WMResizeWidget(panel->borderS, 80, 15);
|
WMResizeWidget(panel->borderS, 80, 15);
|
||||||
WMMoveWidget(panel->borderS, 20, 20);
|
WMMoveWidget(panel->borderS, 11, 22);
|
||||||
WMSetSliderMinValue(panel->borderS, 0);
|
WMSetSliderMinValue(panel->borderS, 0);
|
||||||
WMSetSliderMaxValue(panel->borderS, 5);
|
WMSetSliderMaxValue(panel->borderS, 5);
|
||||||
WMSetSliderAction(panel->borderS, borderCallback, panel);
|
WMSetSliderAction(panel->borderS, borderCallback, panel);
|
||||||
|
|
||||||
panel->borderL = WMCreateLabel(panel->borderF);
|
panel->borderL = WMCreateLabel(panel->borderF);
|
||||||
WMResizeWidget(panel->borderL, 100, 15);
|
WMResizeWidget(panel->borderL, 100, 15);
|
||||||
WMMoveWidget(panel->borderL, 105, 20);
|
WMMoveWidget(panel->borderL, 105, 22);
|
||||||
|
|
||||||
panel->lrB = WMCreateSwitchButton(panel->borderF);
|
panel->lrB = WMCreateSwitchButton(panel->borderF);
|
||||||
WMMoveWidget(panel->lrB, 20, 40);
|
WMMoveWidget(panel->lrB, 11, 40);
|
||||||
WMResizeWidget(panel->lrB, 100, 30);
|
WMResizeWidget(panel->lrB, 95, 30);
|
||||||
WMSetButtonText(panel->lrB, _("Left/Right"));
|
WMSetButtonText(panel->lrB, _("Left/Right"));
|
||||||
|
|
||||||
panel->tbB = WMCreateSwitchButton(panel->borderF);
|
panel->tbB = WMCreateSwitchButton(panel->borderF);
|
||||||
WMMoveWidget(panel->tbB, 120, 40);
|
WMMoveWidget(panel->tbB, 110, 40);
|
||||||
WMResizeWidget(panel->tbB, 100, 30);
|
WMResizeWidget(panel->tbB, 105, 30);
|
||||||
WMSetButtonText(panel->tbB, _("Top/Bottom"));
|
WMSetButtonText(panel->tbB, _("Top/Bottom"));
|
||||||
|
|
||||||
WMMapSubwidgets(panel->borderF);
|
WMMapSubwidgets(panel->borderF);
|
||||||
|
|||||||
@@ -1865,16 +1865,16 @@ msgid "AppIcon bouncing"
|
|||||||
msgstr "Appikon pattogás"
|
msgstr "Appikon pattogás"
|
||||||
|
|
||||||
#: ../../../wmaker-crm/WPrefs.app/Preferences.c:279
|
#: ../../../wmaker-crm/WPrefs.app/Preferences.c:279
|
||||||
msgid "Disable AppIcon bounce."
|
msgid "Disable AppIcon bounce"
|
||||||
msgstr "Patogás letiltása."
|
msgstr "Patogás letiltása"
|
||||||
|
|
||||||
#: ../../../wmaker-crm/WPrefs.app/Preferences.c:284
|
#: ../../../wmaker-crm/WPrefs.app/Preferences.c:284
|
||||||
msgid "Bounce AppIcon when the application wants attention."
|
msgid "Bounce when the application wants attention"
|
||||||
msgstr "Az appikon pattog ha az alkalmazás figyelmet kér."
|
msgstr "Az appikon pattog ha az alkalmazás figyelmet kér"
|
||||||
|
|
||||||
#: ../../../wmaker-crm/WPrefs.app/Preferences.c:290
|
#: ../../../wmaker-crm/WPrefs.app/Preferences.c:290
|
||||||
msgid "Raise AppIcons when bouncing."
|
msgid "Raise AppIcon when bouncing"
|
||||||
msgstr "Ikonok előre hozása pattogáskor."
|
msgstr "Ikonok előre hozása pattogáskor"
|
||||||
|
|
||||||
#: ../../../wmaker-crm/WPrefs.app/Preferences.c:298
|
#: ../../../wmaker-crm/WPrefs.app/Preferences.c:298
|
||||||
msgid "Workspace border"
|
msgid "Workspace border"
|
||||||
|
|||||||
@@ -387,11 +387,11 @@ msgid "Show workspace title on Clip."
|
|||||||
msgstr "ワークスペースのタイトルをクリップに表示する"
|
msgstr "ワークスペースのタイトルをクリップに表示する"
|
||||||
|
|
||||||
#: ../../WPrefs.app/Expert.c:97
|
#: ../../WPrefs.app/Expert.c:97
|
||||||
msgid "Bounce AppIcon when the application wants attention."
|
msgid "Bounce when the application wants attention"
|
||||||
msgstr "注意喚起のためにアイコンが飛び跳ねるようにする"
|
msgstr "注意喚起のためにアイコンが飛び跳ねるようにする"
|
||||||
|
|
||||||
#: ../../WPrefs.app/Expert.c:98
|
#: ../../WPrefs.app/Expert.c:98
|
||||||
msgid "Raise AppIcons when bouncing."
|
msgid "Raise AppIcon when bouncing"
|
||||||
msgstr "アイコンが飛び跳ねる時に前面表示にする"
|
msgstr "アイコンが飛び跳ねる時に前面表示にする"
|
||||||
|
|
||||||
#: ../../WPrefs.app/Expert.c:99
|
#: ../../WPrefs.app/Expert.c:99
|
||||||
|
|||||||
@@ -1784,16 +1784,16 @@ msgid "AppIcon bouncing"
|
|||||||
msgstr "앱 아이콘 튕김"
|
msgstr "앱 아이콘 튕김"
|
||||||
|
|
||||||
#: ../../WPrefs.app/Preferences.c:276
|
#: ../../WPrefs.app/Preferences.c:276
|
||||||
msgid "Disable AppIcon bounce."
|
msgid "Disable AppIcon bounce"
|
||||||
msgstr "앱 아이콘 튕김 효과 끄기"
|
msgstr "앱 아이콘 튕김 효과 끄기"
|
||||||
|
|
||||||
#: ../../WPrefs.app/Preferences.c:281
|
#: ../../WPrefs.app/Preferences.c:281
|
||||||
msgid "Bounce AppIcon when the application wants attention."
|
msgid "Bounce when the application wants attention"
|
||||||
msgstr "응용프로그램에서 메시지가 있으면 앱 아이콘을 튕깁니다."
|
msgstr "응용프로그램에서 메시지가 있으면 앱 아이콘을 튕깁니다"
|
||||||
|
|
||||||
#: ../../WPrefs.app/Preferences.c:287
|
#: ../../WPrefs.app/Preferences.c:287
|
||||||
msgid "Raise AppIcons when bouncing."
|
msgid "Raise AppIcon when bouncing"
|
||||||
msgstr "튕기는 앱 아아콘을 엽니다."
|
msgstr "튕기는 앱 아아콘을 엽니다"
|
||||||
|
|
||||||
#: ../../WPrefs.app/Preferences.c:295
|
#: ../../WPrefs.app/Preferences.c:295
|
||||||
msgid "Workspace border"
|
msgid "Workspace border"
|
||||||
|
|||||||
@@ -1931,16 +1931,16 @@ msgid "AppIcon bouncing"
|
|||||||
msgstr "Stuiteren van programma-iconen"
|
msgstr "Stuiteren van programma-iconen"
|
||||||
|
|
||||||
#: ../../WPrefs.app/Preferences.c:282
|
#: ../../WPrefs.app/Preferences.c:282
|
||||||
msgid "Disable AppIcon bounce."
|
msgid "Disable AppIcon bounce"
|
||||||
msgstr "Schakel stuiteren iconen uit."
|
msgstr "Schakel stuiteren iconen uit"
|
||||||
|
|
||||||
#: ../../WPrefs.app/Preferences.c:287
|
#: ../../WPrefs.app/Preferences.c:287
|
||||||
msgid "Bounce AppIcon when the application wants attention."
|
msgid "Bounce when the application wants attention"
|
||||||
msgstr "Stuiter icoon als 't programma aandacht wil."
|
msgstr "Stuiter icoon als 't programma aandacht wil"
|
||||||
|
|
||||||
#: ../../WPrefs.app/Preferences.c:293
|
#: ../../WPrefs.app/Preferences.c:293
|
||||||
msgid "Raise AppIcons when bouncing."
|
msgid "Raise AppIcon when bouncing"
|
||||||
msgstr "Verhoog iconen bij stuiteren."
|
msgstr "Verhoog iconen bij stuiteren"
|
||||||
|
|
||||||
#: ../../WPrefs.app/Preferences.c:301
|
#: ../../WPrefs.app/Preferences.c:301
|
||||||
msgid "Workspace border"
|
msgid "Workspace border"
|
||||||
|
|||||||
Reference in New Issue
Block a user