diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-10-30 15:03:09 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-10-30 15:03:09 +0200 |
commit | 114e52a60c789c5d1d885a994e8e1bd002b7cc93 (patch) | |
tree | 85c9e5281cb2f8066f18394a1db4dfe662dc5316 /src/ui/labelwidget.h | |
parent | f22ee7c9ac27fe05649219535a05c21281709607 (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.h | 9 |
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 | ||
29 | iDeclareWidgetClass(LabelWidget) | 29 | iDeclareWidgetClass(LabelWidget) |
30 | iDeclareObjectConstructionArgs(LabelWidget, const char *label, int key, int kmods, const char *command) | 30 | iDeclareObjectConstructionArgs(LabelWidget, const char *label, const char *command) |
31 | 31 | ||
32 | void setAlignVisually_LabelWidget(iLabelWidget *, iBool alignVisual); | 32 | void setAlignVisually_LabelWidget(iLabelWidget *, iBool alignVisual); |
33 | void setFont_LabelWidget (iLabelWidget *, int fontId); | 33 | void setFont_LabelWidget (iLabelWidget *, int fontId); |
@@ -41,13 +41,14 @@ void updateTextCStr_LabelWidget (iLabelWidget *, const char *text); /* not r | |||
41 | const iString *label_LabelWidget (const iLabelWidget *); | 41 | const iString *label_LabelWidget (const iLabelWidget *); |
42 | const iString *command_LabelWidget (const iLabelWidget *); | 42 | const iString *command_LabelWidget (const iLabelWidget *); |
43 | 43 | ||
44 | iLabelWidget *newColor_LabelWidget(const char *text, int color); | 44 | iLabelWidget *newKeyMods_LabelWidget(const char *label, int key, int kmods, const char *command); |
45 | iLabelWidget *newColor_LabelWidget (const char *text, int color); | ||
45 | 46 | ||
46 | iLocalDef iLabelWidget *newEmpty_LabelWidget(void) { | 47 | iLocalDef iLabelWidget *newEmpty_LabelWidget(void) { |
47 | return new_LabelWidget("", 0, 0, NULL); | 48 | return new_LabelWidget("", NULL); |
48 | } | 49 | } |
49 | iLocalDef iLabelWidget *newIcon_LabelWidget(const char *label, int key, int kmods, const char *command) { | 50 | iLocalDef 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 | } |