summaryrefslogtreecommitdiff
path: root/src/ui/labelwidget.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-10-30 15:03:09 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-10-30 15:03:09 +0200
commit114e52a60c789c5d1d885a994e8e1bd002b7cc93 (patch)
tree85c9e5281cb2f8066f18394a1db4dfe662dc5316 /src/ui/labelwidget.h
parentf22ee7c9ac27fe05649219535a05c21281709607 (diff)
Updating LabelWidget command key
If the key bindings have a key for a command, LabelWidget will use it.
Diffstat (limited to 'src/ui/labelwidget.h')
-rw-r--r--src/ui/labelwidget.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/labelwidget.h b/src/ui/labelwidget.h
index c55ecd08..066c9b33 100644
--- a/src/ui/labelwidget.h
+++ b/src/ui/labelwidget.h
@@ -27,7 +27,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
27#include "widget.h" 27#include "widget.h"
28 28
29iDeclareWidgetClass(LabelWidget) 29iDeclareWidgetClass(LabelWidget)
30iDeclareObjectConstructionArgs(LabelWidget, const char *label, int key, int kmods, const char *command) 30iDeclareObjectConstructionArgs(LabelWidget, const char *label, const char *command)
31 31
32void setAlignVisually_LabelWidget(iLabelWidget *, iBool alignVisual); 32void setAlignVisually_LabelWidget(iLabelWidget *, iBool alignVisual);
33void setFont_LabelWidget (iLabelWidget *, int fontId); 33void setFont_LabelWidget (iLabelWidget *, int fontId);
@@ -41,13 +41,14 @@ void updateTextCStr_LabelWidget (iLabelWidget *, const char *text); /* not r
41const iString *label_LabelWidget (const iLabelWidget *); 41const iString *label_LabelWidget (const iLabelWidget *);
42const iString *command_LabelWidget (const iLabelWidget *); 42const iString *command_LabelWidget (const iLabelWidget *);
43 43
44iLabelWidget *newColor_LabelWidget(const char *text, int color); 44iLabelWidget *newKeyMods_LabelWidget(const char *label, int key, int kmods, const char *command);
45iLabelWidget *newColor_LabelWidget (const char *text, int color);
45 46
46iLocalDef iLabelWidget *newEmpty_LabelWidget(void) { 47iLocalDef iLabelWidget *newEmpty_LabelWidget(void) {
47 return new_LabelWidget("", 0, 0, NULL); 48 return new_LabelWidget("", NULL);
48} 49}
49iLocalDef iLabelWidget *newIcon_LabelWidget(const char *label, int key, int kmods, const char *command) { 50iLocalDef iLabelWidget *newIcon_LabelWidget(const char *label, int key, int kmods, const char *command) {
50 iLabelWidget *d = new_LabelWidget(label, key, kmods, command); 51 iLabelWidget *d = newKeyMods_LabelWidget(label, key, kmods, command);
51 setAlignVisually_LabelWidget(d, iTrue); 52 setAlignVisually_LabelWidget(d, iTrue);
52 return d; 53 return d;
53} 54}