parent
585aafa516
commit
017f986cd8
14
src/aclass.c
14
src/aclass.c
|
@ -97,7 +97,7 @@ ActionCreate(char event, char anymod, int mod, int anybut, int but,
|
|||
aa->key = XKeysymToKeycode(disp, XStringToKeysym(key));
|
||||
aa->key_str = (aa->key) ? Estrdup(key) : NULL;
|
||||
aa->tooltipstring =
|
||||
(tooltipstring) ? Estrdup((tooltipstring[0]) ? _(tooltipstring) : "?!?") :
|
||||
(tooltipstring) ? Estrdup((tooltipstring[0]) ? tooltipstring : "?!?") :
|
||||
NULL;
|
||||
|
||||
return aa;
|
||||
|
@ -271,7 +271,7 @@ AclassConfigLoad(FILE * fs)
|
|||
case CONFIG_CLOSE:
|
||||
ac->tooltipstring =
|
||||
(aclass_tooltipstring) ? Estrdup((aclass_tooltipstring[0]) ?
|
||||
_(aclass_tooltipstring) :
|
||||
aclass_tooltipstring :
|
||||
"?!?") : NULL;
|
||||
_EFREE(aclass_tooltipstring);
|
||||
_EFREE(action_tooltipstring);
|
||||
|
@ -660,15 +660,13 @@ AclassConfigLoad2(FILE * fs)
|
|||
/* FIXME - Multiple line strings may break */
|
||||
if (aa)
|
||||
{
|
||||
ss = Estrdupcat2(aa->tooltipstring, "\n", atword(s, 2));
|
||||
aa->tooltipstring = (ss && ss[0]) ? Estrdup(_(ss)) : NULL;
|
||||
_EFREE(ss);
|
||||
aa->tooltipstring =
|
||||
Estrdupcat2(aa->tooltipstring, "\n", atword(s, 2));
|
||||
}
|
||||
else if (ac)
|
||||
{
|
||||
ss = Estrdupcat2(ac->tooltipstring, "\n", atword(s, 2));
|
||||
ac->tooltipstring = (ss && ss[0]) ? Estrdup(_(ss)) : NULL;
|
||||
_EFREE(ss);
|
||||
ac->tooltipstring =
|
||||
Estrdupcat2(ac->tooltipstring, "\n", atword(s, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
15
src/menus.c
15
src/menus.c
|
@ -369,7 +369,7 @@ MenuItemCreate(const char *text, ImageClass * iclass,
|
|||
if (iclass)
|
||||
iclass->ref_count++;
|
||||
|
||||
mi->text = (text) ? Estrdup((text[0]) ? _(text) : "?!?") : NULL;
|
||||
mi->text = (text) ? Estrdup((text[0]) ? text : "?!?") : NULL;
|
||||
mi->params = Estrdup(action_params);
|
||||
mi->child = child;
|
||||
mi->state = STATE_NORMAL;
|
||||
|
@ -390,9 +390,7 @@ MenuSetName(Menu * m, const char *name)
|
|||
void
|
||||
MenuSetTitle(Menu * m, const char *title)
|
||||
{
|
||||
if (m->title)
|
||||
Efree(m->title);
|
||||
m->title = (title) ? Estrdup(_(title)) : NULL;
|
||||
_EFDUP(m->title, title);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -604,7 +602,7 @@ MenuRealize(Menu * m)
|
|||
|
||||
if (m->title)
|
||||
{
|
||||
HintsSetWindowName(m->win, m->title);
|
||||
HintsSetWindowName(m->win, _(m->title));
|
||||
}
|
||||
|
||||
maxh = maxw = 0;
|
||||
|
@ -630,7 +628,8 @@ MenuRealize(Menu * m)
|
|||
|
||||
if ((m->style) && (m->style->tclass) && (m->items[i]->text))
|
||||
{
|
||||
TextSize(m->style->tclass, 0, 0, 0, m->items[i]->text, &w, &h, 17);
|
||||
TextSize(m->style->tclass, 0, 0, 0, _(m->items[i]->text), &w, &h,
|
||||
17);
|
||||
if (h > maxh)
|
||||
maxh = h;
|
||||
if (w > maxx1)
|
||||
|
@ -885,8 +884,8 @@ MenuDrawItem(Menu * m, MenuItem * mi, char shape)
|
|||
if (mi->text)
|
||||
{
|
||||
TextDraw(m->style->tclass, mi_pmm->pmap, 0, 0, mi->state,
|
||||
mi->text, mi->text_x, mi->text_y, mi->text_w, mi->text_h,
|
||||
17, m->style->tclass->justification);
|
||||
_(mi->text), mi->text_x, mi->text_y, mi->text_w,
|
||||
mi->text_h, 17, m->style->tclass->justification);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -291,6 +291,7 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
|
|||
tts = ActionGetTooltipString(aa);
|
||||
if (!tts)
|
||||
continue;
|
||||
tts = _(tts);
|
||||
|
||||
TextSize(tt->tclass, 0, 0, STATE_NORMAL, tts, &temp_w, &temp_h,
|
||||
17);
|
||||
|
@ -588,6 +589,7 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
|
|||
tts = ActionGetTooltipString(aa);
|
||||
if (!tts)
|
||||
continue;
|
||||
tts = _(tts);
|
||||
|
||||
if (ActionGetEvent(aa) == EVENT_DOUBLE_DOWN)
|
||||
{
|
||||
|
@ -742,6 +744,8 @@ ToolTipTimeout(int val __UNUSED__, void *data __UNUSED__)
|
|||
tts = ActionclassGetTooltipString(ac);
|
||||
if (tts)
|
||||
{
|
||||
tts = _(tts);
|
||||
|
||||
if (Conf_tooltips.showroottooltip)
|
||||
{
|
||||
TooltipShow(ttip, tts, ac, x, y);
|
||||
|
|
Loading…
Reference in New Issue