mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-01 19:42:32 +01:00
WPrefs: grouped the balloon text for the dock configuration with the rest of the struct
As the data to create the icons for the dock configuration was already grouped in a structure, it is a good idea to also include the balloon text which is linked to them in the array, so the code is simpler and safer. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
68e550b924
commit
17c3404bef
@@ -42,10 +42,14 @@ static char *autoDelayPresetValues[5] = { "0", "100", "250", "600", "1000" };
|
|||||||
static const struct {
|
static const struct {
|
||||||
const char *disable_key;
|
const char *disable_key;
|
||||||
const char *icon_file;
|
const char *icon_file;
|
||||||
|
const char *balloon_text;
|
||||||
} dock_config[] = {
|
} dock_config[] = {
|
||||||
{ "DisableDock", "dock" },
|
{ "DisableDock", "dock",
|
||||||
{ "DisableClip", "clip" },
|
N_("Disable/enable the application Dock (the\nvertical icon bar in the side of the screen).") },
|
||||||
{ "DisableDrawers", "drawer" }
|
{ "DisableClip", "clip",
|
||||||
|
N_("Disable/enable the Clip (that thing with\na paper clip icon).") },
|
||||||
|
{ "DisableDrawers", "drawer",
|
||||||
|
N_("Disable/enable Drawers (a dock that stores\napplication icons horizontally). The dock is required.") }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
@@ -261,21 +265,7 @@ static void createPanel(Panel *p)
|
|||||||
WMSetButtonAltImage(panel->docksB[i], icon1);
|
WMSetButtonAltImage(panel->docksB[i], icon1);
|
||||||
WMReleasePixmap(icon1);
|
WMReleasePixmap(icon1);
|
||||||
}
|
}
|
||||||
switch(i)
|
WMSetBalloonTextForView(_(dock_config[i].balloon_text), WMWidgetView(panel->docksB[i]));
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
WMSetBalloonTextForView(_("Disable/enable the application Dock (the\n"
|
|
||||||
"vertical icon bar in the side of the screen)."), WMWidgetView(panel->docksB[i]));
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
WMSetBalloonTextForView(_("Disable/enable the Clip (that thing with\n"
|
|
||||||
"a paper clip icon)."), WMWidgetView(panel->docksB[i]));
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
WMSetBalloonTextForView(_("Disable/enable Drawers (a dock that stores\n"
|
|
||||||
"application icons horizontally). The dock is required."), WMWidgetView(panel->docksB[i]));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
WMSetButtonAction(panel->docksB[i], pushDockButton, panel);
|
WMSetButtonAction(panel->docksB[i], pushDockButton, panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user