diff options
Diffstat (limited to 'src/ui/labelwidget.c')
-rw-r--r-- | src/ui/labelwidget.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index 2a1eb06a..8089445b 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c | |||
@@ -85,6 +85,10 @@ static iBool processEvent_LabelWidget_(iLabelWidget *d, const SDL_Event *ev) { | |||
85 | if (isMetricsChange_UserEvent(ev)) { | 85 | if (isMetricsChange_UserEvent(ev)) { |
86 | updateSize_LabelWidget(d); | 86 | updateSize_LabelWidget(d); |
87 | } | 87 | } |
88 | else if (isCommand_UserEvent(ev, "lang.changed")) { | ||
89 | setText_LabelWidget(d, &d->srcLabel); | ||
90 | return iFalse; | ||
91 | } | ||
88 | else if (isCommand_UserEvent(ev, "bindings.changed")) { | 92 | else if (isCommand_UserEvent(ev, "bindings.changed")) { |
89 | /* Update the key used to trigger this label. */ | 93 | /* Update the key used to trigger this label. */ |
90 | updateKey_LabelWidget_(d); | 94 | updateKey_LabelWidget_(d); |
@@ -474,6 +478,11 @@ const iString *text_LabelWidget(const iLabelWidget *d) { | |||
474 | return &d->label; | 478 | return &d->label; |
475 | } | 479 | } |
476 | 480 | ||
481 | const iString *sourceText_LabelWidget(const iLabelWidget *d) { | ||
482 | if (!d) return collectNew_String(); | ||
483 | return &d->srcLabel; | ||
484 | } | ||
485 | |||
477 | const iString *command_LabelWidget(const iLabelWidget *d) { | 486 | const iString *command_LabelWidget(const iLabelWidget *d) { |
478 | return &d->command; | 487 | return &d->command; |
479 | } | 488 | } |