mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
WPrefs: Make Dock preferences pane less busy and fix up some strings
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
This commit is contained in:
committed by
Carlos R. Mafra
parent
6d5ffca076
commit
3a24237a8d
@@ -204,9 +204,6 @@ static void createPanel(Panel *p)
|
|||||||
WMResizeWidget(panel->smoF, 94, 100);
|
WMResizeWidget(panel->smoF, 94, 100);
|
||||||
WMMoveWidget(panel->smoF, 420, 10);
|
WMMoveWidget(panel->smoF, 420, 10);
|
||||||
WMSetFrameTitle(panel->smoF, _("Smooth Scaling"));
|
WMSetFrameTitle(panel->smoF, _("Smooth Scaling"));
|
||||||
WMSetBalloonTextForView(_("Smooth scaled background images, neutralizing\n"
|
|
||||||
"the `pixelization' effect. This will slow\n"
|
|
||||||
"down loading of background images considerably."), WMWidgetView(panel->smoF));
|
|
||||||
|
|
||||||
panel->smoB = WMCreateButton(panel->smoF, WBTToggle);
|
panel->smoB = WMCreateButton(panel->smoF, WBTToggle);
|
||||||
WMResizeWidget(panel->smoB, 64, 64);
|
WMResizeWidget(panel->smoB, 64, 64);
|
||||||
@@ -237,6 +234,9 @@ static void createPanel(Panel *p)
|
|||||||
|
|
||||||
RReleaseImage(image);
|
RReleaseImage(image);
|
||||||
}
|
}
|
||||||
|
WMSetBalloonTextForView(_("Smooth scaled background images, neutralizing\n"
|
||||||
|
"the `pixelization' effect. This will slow\n"
|
||||||
|
"down loading of background images considerably."), WMWidgetView(panel->smoB));
|
||||||
|
|
||||||
WMMapSubwidgets(panel->smoF);
|
WMMapSubwidgets(panel->smoF);
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ typedef struct _Panel {
|
|||||||
WMLabel *autoDelayL[4];
|
WMLabel *autoDelayL[4];
|
||||||
WMButton *autoDelayB[4][5];
|
WMButton *autoDelayB[4][5];
|
||||||
WMTextField *autoDelayT[4];
|
WMTextField *autoDelayT[4];
|
||||||
|
WMLabel *autoDelayMsL[4];
|
||||||
|
|
||||||
WMFrame *dockF;
|
WMFrame *dockF;
|
||||||
WMButton *docksB[3];
|
WMButton *docksB[3];
|
||||||
@@ -51,10 +52,10 @@ static const struct {
|
|||||||
const char *key;
|
const char *key;
|
||||||
const char *string;
|
const char *string;
|
||||||
} auto_delay[] = {
|
} auto_delay[] = {
|
||||||
{ "ClipAutoexpandDelay", N_("Delay before auto-expansion") },
|
{ "ClipAutoexpandDelay", N_("Before auto-expansion") },
|
||||||
{ "ClipAutocollapseDelay", N_("Delay before auto-collapsing") },
|
{ "ClipAutocollapseDelay", N_("Before auto-collapsing") },
|
||||||
{ "ClipAutoraiseDelay", N_("Delay before auto-raise") },
|
{ "ClipAutoraiseDelay", N_("Before auto-raise") },
|
||||||
{ "ClipAutolowerDelay", N_("Delay before auto-lowering") }
|
{ "ClipAutolowerDelay", N_("Before auto-lowering") }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -149,6 +150,8 @@ static void createPanel(Panel *p)
|
|||||||
char *path;
|
char *path;
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
char *buf1, *buf2;
|
char *buf1, *buf2;
|
||||||
|
WMColor *color;
|
||||||
|
WMFont *font;
|
||||||
|
|
||||||
path = LocateImage(ARQUIVO_XIS);
|
path = LocateImage(ARQUIVO_XIS);
|
||||||
if (path) {
|
if (path) {
|
||||||
@@ -172,23 +175,23 @@ static void createPanel(Panel *p)
|
|||||||
WMResizeWidget(panel->autoDelayF[k], 370, 100);
|
WMResizeWidget(panel->autoDelayF[k], 370, 100);
|
||||||
WMMoveWidget(panel->autoDelayF[k], 15, 10 + k * 110);
|
WMMoveWidget(panel->autoDelayF[k], 15, 10 + k * 110);
|
||||||
if (k == 0)
|
if (k == 0)
|
||||||
WMSetFrameTitle(panel->autoDelayF[k], _("Delays in milliseconds for autocollapsing clips"));
|
WMSetFrameTitle(panel->autoDelayF[k], _("Clip autocollapsing delays"));
|
||||||
else
|
else
|
||||||
WMSetFrameTitle(panel->autoDelayF[k], _("Delays in milliseconds for autoraising clips"));
|
WMSetFrameTitle(panel->autoDelayF[k], _("Clip autoraising delays"));
|
||||||
|
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
panel->autoDelayL[i + k * 2] = WMCreateLabel(panel->autoDelayF[k]);
|
panel->autoDelayL[i + k * 2] = WMCreateLabel(panel->autoDelayF[k]);
|
||||||
WMResizeWidget(panel->autoDelayL[i + k * 2], 175, 20);
|
WMResizeWidget(panel->autoDelayL[i + k * 2], 155, 20);
|
||||||
WMMoveWidget(panel->autoDelayL[i + k * 2], 10, 27 + 40 * i);
|
WMMoveWidget(panel->autoDelayL[i + k * 2], 10, 27 + 40 * i);
|
||||||
WMSetLabelText(panel->autoDelayL[i + k * 2], _(auto_delay[i + k * 2].string));
|
WMSetLabelText(panel->autoDelayL[i + k * 2], _(auto_delay[i + k * 2].string));
|
||||||
WMSetLabelTextAlignment(panel->autoDelayL[i + k * 2], WARight);
|
/* WMSetLabelTextAlignment(panel->autoDelayL[i + k * 2], WARight); */
|
||||||
|
|
||||||
for (j = 0; j < 5; j++)
|
for (j = 0; j < 5; j++)
|
||||||
{
|
{
|
||||||
panel->autoDelayB[i + k * 2][j] = WMCreateCustomButton(panel->autoDelayF[k], WBBStateChangeMask);
|
panel->autoDelayB[i + k * 2][j] = WMCreateCustomButton(panel->autoDelayF[k], WBBStateChangeMask);
|
||||||
WMResizeWidget(panel->autoDelayB[i + k * 2][j], 25, 25);
|
WMResizeWidget(panel->autoDelayB[i + k * 2][j], 25, 25);
|
||||||
WMMoveWidget(panel->autoDelayB[i + k * 2][j], 185 + (25 * j), 25 + 40 * i);
|
WMMoveWidget(panel->autoDelayB[i + k * 2][j], 145 + (28 * j), 25 + 40 * i);
|
||||||
WMSetButtonBordered(panel->autoDelayB[i + k * 2][j], False);
|
WMSetButtonBordered(panel->autoDelayB[i + k * 2][j], False);
|
||||||
WMSetButtonImagePosition(panel->autoDelayB[i + k * 2][j], WIPImageOnly);
|
WMSetButtonImagePosition(panel->autoDelayB[i + k * 2][j], WIPImageOnly);
|
||||||
WMSetButtonAction(panel->autoDelayB[i + k * 2][j], pushAutoDelayButton, panel);
|
WMSetButtonAction(panel->autoDelayB[i + k * 2][j], pushAutoDelayButton, panel);
|
||||||
@@ -213,9 +216,20 @@ static void createPanel(Panel *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
panel->autoDelayT[i + k * 2] = WMCreateTextField(panel->autoDelayF[k]);
|
panel->autoDelayT[i + k * 2] = WMCreateTextField(panel->autoDelayF[k]);
|
||||||
WMResizeWidget(panel->autoDelayT[i + k * 2], 40, 20);
|
WMResizeWidget(panel->autoDelayT[i + k * 2], 36, 20);
|
||||||
WMMoveWidget(panel->autoDelayT[i + k * 2], 315, 27 + 40 * i);
|
WMMoveWidget(panel->autoDelayT[i + k * 2], 287, 27 + 40 * i);
|
||||||
WMAddNotificationObserver(autoDelayChanged, panel, WMTextDidChangeNotification, panel->autoDelayT[i + k * 2]);
|
WMAddNotificationObserver(autoDelayChanged, panel, WMTextDidChangeNotification, panel->autoDelayT[i + k * 2]);
|
||||||
|
|
||||||
|
color = WMDarkGrayColor(scr);
|
||||||
|
font = WMSystemFontOfSize(scr, 10);
|
||||||
|
panel->autoDelayMsL[i + k * 2] = WMCreateLabel(panel->autoDelayF[k]);
|
||||||
|
WMResizeWidget(panel->autoDelayMsL[i + k * 2], 36, 16);
|
||||||
|
WMMoveWidget(panel->autoDelayMsL[i + k * 2], 327, 33 + 40 *i);
|
||||||
|
WMSetLabelText(panel->autoDelayMsL[i + k * 2], _("msec"));
|
||||||
|
WMSetLabelTextColor(panel->autoDelayMsL[i + k * 2], color);
|
||||||
|
WMSetLabelFont(panel->autoDelayMsL[i + k * 2], font);
|
||||||
|
WMReleaseColor(color);
|
||||||
|
WMReleaseFont(font);
|
||||||
}
|
}
|
||||||
|
|
||||||
WMMapSubwidgets(panel->autoDelayF[k]);
|
WMMapSubwidgets(panel->autoDelayF[k]);
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ static void pushDelayButton(WMWidget * w, void *data)
|
|||||||
|
|
||||||
panel->raiseDelaySelected = 1;
|
panel->raiseDelaySelected = 1;
|
||||||
if (w == panel->raisB[0]) {
|
if (w == panel->raisB[0]) {
|
||||||
WMSetTextFieldText(panel->raisT, "OFF");
|
WMSetTextFieldText(panel->raisT, _("OFF"));
|
||||||
} else if (w == panel->raisB[1]) {
|
} else if (w == panel->raisB[1]) {
|
||||||
WMSetTextFieldText(panel->raisT, "10");
|
WMSetTextFieldText(panel->raisT, "10");
|
||||||
} else if (w == panel->raisB[2]) {
|
} else if (w == panel->raisB[2]) {
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ static void resistanceCallback(WMWidget * w, void *data)
|
|||||||
i = WMGetSliderValue(panel->resS);
|
i = WMGetSliderValue(panel->resS);
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
WMSetLabelText(panel->resL, "OFF");
|
WMSetLabelText(panel->resL, _("OFF"));
|
||||||
else {
|
else {
|
||||||
sprintf(buffer, "%i", i);
|
sprintf(buffer, "%i", i);
|
||||||
WMSetLabelText(panel->resL, buffer);
|
WMSetLabelText(panel->resL, buffer);
|
||||||
@@ -139,7 +139,7 @@ static void resizeCallback(WMWidget * w, void *data)
|
|||||||
i = WMGetSliderValue(panel->resizeS);
|
i = WMGetSliderValue(panel->resizeS);
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
WMSetLabelText(panel->resizeL, "OFF");
|
WMSetLabelText(panel->resizeL, _("OFF"));
|
||||||
else {
|
else {
|
||||||
sprintf(buffer, "%i", i);
|
sprintf(buffer, "%i", i);
|
||||||
WMSetLabelText(panel->resizeL, buffer);
|
WMSetLabelText(panel->resizeL, buffer);
|
||||||
@@ -450,7 +450,7 @@ static void createPanel(Panel * p)
|
|||||||
WMMoveWidget(panel->resizeL, 60, 74);
|
WMMoveWidget(panel->resizeL, 60, 74);
|
||||||
|
|
||||||
panel->resizeTextL = WMCreateLabel(panel->maxiF);
|
panel->resizeTextL = WMCreateLabel(panel->maxiF);
|
||||||
WMSetLabelText(panel->resizeTextL, "Mod+Wheel\nresize increment");
|
WMSetLabelText(panel->resizeTextL, _("Mod+Wheel\nresize increment"));
|
||||||
WMResizeWidget(panel->resizeTextL, 110, 30);
|
WMResizeWidget(panel->resizeTextL, 110, 30);
|
||||||
WMMoveWidget(panel->resizeTextL, 90, 66);
|
WMMoveWidget(panel->resizeTextL, 90, 66);
|
||||||
|
|
||||||
|
|||||||
@@ -223,8 +223,8 @@ Panel *InitWorkspace(WMWidget *parent)
|
|||||||
|
|
||||||
panel->sectionName = _("Workspace Preferences");
|
panel->sectionName = _("Workspace Preferences");
|
||||||
|
|
||||||
panel->description = _("Workspace navigation features.\n"
|
panel->description = _("Workspace navigation features\n"
|
||||||
"You can also enable/disable the Dock and Clip here.");
|
"and workspace name display settings.");
|
||||||
|
|
||||||
panel->parent = parent;
|
panel->parent = parent;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user