From 114e52a60c789c5d1d885a994e8e1bd002b7cc93 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 30 Oct 2020 15:03:09 +0200 Subject: Updating LabelWidget command key If the key bindings have a key for a command, LabelWidget will use it. --- src/ui/labelwidget.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/ui/labelwidget.h') 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. */ #include "widget.h" iDeclareWidgetClass(LabelWidget) -iDeclareObjectConstructionArgs(LabelWidget, const char *label, int key, int kmods, const char *command) +iDeclareObjectConstructionArgs(LabelWidget, const char *label, const char *command) void setAlignVisually_LabelWidget(iLabelWidget *, iBool alignVisual); void setFont_LabelWidget (iLabelWidget *, int fontId); @@ -41,13 +41,14 @@ void updateTextCStr_LabelWidget (iLabelWidget *, const char *text); /* not r const iString *label_LabelWidget (const iLabelWidget *); const iString *command_LabelWidget (const iLabelWidget *); -iLabelWidget *newColor_LabelWidget(const char *text, int color); +iLabelWidget *newKeyMods_LabelWidget(const char *label, int key, int kmods, const char *command); +iLabelWidget *newColor_LabelWidget (const char *text, int color); iLocalDef iLabelWidget *newEmpty_LabelWidget(void) { - return new_LabelWidget("", 0, 0, NULL); + return new_LabelWidget("", NULL); } iLocalDef iLabelWidget *newIcon_LabelWidget(const char *label, int key, int kmods, const char *command) { - iLabelWidget *d = new_LabelWidget(label, key, kmods, command); + iLabelWidget *d = newKeyMods_LabelWidget(label, key, kmods, command); setAlignVisually_LabelWidget(d, iTrue); return d; } -- cgit v1.2.3