1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +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:
BALATON Zoltan
2014-02-17 20:06:48 +01:00
committed by Carlos R. Mafra
parent 6d5ffca076
commit 3a24237a8d
5 changed files with 34 additions and 20 deletions

View File

@@ -204,9 +204,6 @@ static void createPanel(Panel *p)
WMResizeWidget(panel->smoF, 94, 100);
WMMoveWidget(panel->smoF, 420, 10);
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);
WMResizeWidget(panel->smoB, 64, 64);
@@ -237,6 +234,9 @@ static void createPanel(Panel *p)
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);

View File

@@ -36,6 +36,7 @@ typedef struct _Panel {
WMLabel *autoDelayL[4];
WMButton *autoDelayB[4][5];
WMTextField *autoDelayT[4];
WMLabel *autoDelayMsL[4];
WMFrame *dockF;
WMButton *docksB[3];
@@ -51,10 +52,10 @@ static const struct {
const char *key;
const char *string;
} auto_delay[] = {
{ "ClipAutoexpandDelay", N_("Delay before auto-expansion") },
{ "ClipAutocollapseDelay", N_("Delay before auto-collapsing") },
{ "ClipAutoraiseDelay", N_("Delay before auto-raise") },
{ "ClipAutolowerDelay", N_("Delay before auto-lowering") }
{ "ClipAutoexpandDelay", N_("Before auto-expansion") },
{ "ClipAutocollapseDelay", N_("Before auto-collapsing") },
{ "ClipAutoraiseDelay", N_("Before auto-raise") },
{ "ClipAutolowerDelay", N_("Before auto-lowering") }
};
@@ -149,6 +150,8 @@ static void createPanel(Panel *p)
char *path;
int i, j, k;
char *buf1, *buf2;
WMColor *color;
WMFont *font;
path = LocateImage(ARQUIVO_XIS);
if (path) {
@@ -172,23 +175,23 @@ static void createPanel(Panel *p)
WMResizeWidget(panel->autoDelayF[k], 370, 100);
WMMoveWidget(panel->autoDelayF[k], 15, 10 + k * 110);
if (k == 0)
WMSetFrameTitle(panel->autoDelayF[k], _("Delays in milliseconds for autocollapsing clips"));
WMSetFrameTitle(panel->autoDelayF[k], _("Clip autocollapsing delays"));
else
WMSetFrameTitle(panel->autoDelayF[k], _("Delays in milliseconds for autoraising clips"));
WMSetFrameTitle(panel->autoDelayF[k], _("Clip autoraising delays"));
for (i = 0; i < 2; i++)
{
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);
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++)
{
panel->autoDelayB[i + k * 2][j] = WMCreateCustomButton(panel->autoDelayF[k], WBBStateChangeMask);
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);
WMSetButtonImagePosition(panel->autoDelayB[i + k * 2][j], WIPImageOnly);
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]);
WMResizeWidget(panel->autoDelayT[i + k * 2], 40, 20);
WMMoveWidget(panel->autoDelayT[i + k * 2], 315, 27 + 40 * i);
WMResizeWidget(panel->autoDelayT[i + k * 2], 36, 20);
WMMoveWidget(panel->autoDelayT[i + k * 2], 287, 27 + 40 * i);
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]);

View File

@@ -150,7 +150,7 @@ static void pushDelayButton(WMWidget * w, void *data)
panel->raiseDelaySelected = 1;
if (w == panel->raisB[0]) {
WMSetTextFieldText(panel->raisT, "OFF");
WMSetTextFieldText(panel->raisT, _("OFF"));
} else if (w == panel->raisB[1]) {
WMSetTextFieldText(panel->raisT, "10");
} else if (w == panel->raisB[2]) {

View File

@@ -120,7 +120,7 @@ static void resistanceCallback(WMWidget * w, void *data)
i = WMGetSliderValue(panel->resS);
if (i == 0)
WMSetLabelText(panel->resL, "OFF");
WMSetLabelText(panel->resL, _("OFF"));
else {
sprintf(buffer, "%i", i);
WMSetLabelText(panel->resL, buffer);
@@ -139,7 +139,7 @@ static void resizeCallback(WMWidget * w, void *data)
i = WMGetSliderValue(panel->resizeS);
if (i == 0)
WMSetLabelText(panel->resizeL, "OFF");
WMSetLabelText(panel->resizeL, _("OFF"));
else {
sprintf(buffer, "%i", i);
WMSetLabelText(panel->resizeL, buffer);
@@ -450,7 +450,7 @@ static void createPanel(Panel * p)
WMMoveWidget(panel->resizeL, 60, 74);
panel->resizeTextL = WMCreateLabel(panel->maxiF);
WMSetLabelText(panel->resizeTextL, "Mod+Wheel\nresize increment");
WMSetLabelText(panel->resizeTextL, _("Mod+Wheel\nresize increment"));
WMResizeWidget(panel->resizeTextL, 110, 30);
WMMoveWidget(panel->resizeTextL, 90, 66);

View File

@@ -223,8 +223,8 @@ Panel *InitWorkspace(WMWidget *parent)
panel->sectionName = _("Workspace Preferences");
panel->description = _("Workspace navigation features.\n"
"You can also enable/disable the Dock and Clip here.");
panel->description = _("Workspace navigation features\n"
"and workspace name display settings.");
panel->parent = parent;