=> 114e52a60c789c5d1d885a994e8e1bd002b7cc93
[1mdiff --git a/src/ui/keys.c b/src/ui/keys.c[m [1mindex 4d52b0a4..85304ef7 100644[m [1m--- a/src/ui/keys.c[m [1m+++ b/src/ui/keys.c[m [36m@@ -27,14 +27,6 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m #include[m [m iDeclareType(Keys)[m [31m-iDeclareType(Binding)[m [31m-[m [31m-struct Impl_Binding {[m [31m- int key;[m [31m- int mods;[m [31m- iString command;[m [31m- iString label;[m [31m-};[m [m static int cmp_Binding_(const void *a, const void *b) {[m const iBinding *d = a, *other = b;[m [36m@@ -151,3 +143,7 @@[m [miBool processEvent_Keys(const SDL_Event *ev) {[m }[m return iFalse;[m }[m [32m+[m [32m+[m[32mconst iBinding *findCommand_Keys(const char *command) {[m [32m+[m[32m return findCommand_Keys_(&keys_, command);[m [32m+[m[32m}[m [1mdiff --git a/src/ui/keys.h b/src/ui/keys.h[m [1mindex 157ddea5..0892bd81 100644[m [1m--- a/src/ui/keys.h[m [1m+++ b/src/ui/keys.h[m [36m@@ -43,6 +43,15 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m # define byLine_KeyModifier 0[m #endif[m [m [32m+[m[32miDeclareType(Binding)[m [32m+[m [32m+[m[32mstruct Impl_Binding {[m [32m+[m[32m int key;[m [32m+[m[32m int mods;[m [32m+[m[32m iString command;[m [32m+[m[32m iString label;[m [32m+[m[32m};[m [32m+[m void init_Keys (void);[m void deinit_Keys (void);[m [m [36m@@ -51,6 +60,7 @@[m [mvoid save_Keys (const char *saveDir);[m [m void bind_Keys (const char *command, int key, int mods);[m void setLabel_Keys (const char *command, const char *label);[m [32m+[m[32mconst iBinding *findCommand_Keys (const char *command);[m [m //const iString * label_Keys (const char *command);[m //const char * shortcutLabel_Keys (const char *command);[m [1mdiff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c[m [1mindex 0555bc4d..b4ba79fe 100644[m [1m--- a/src/ui/labelwidget.c[m [1m+++ b/src/ui/labelwidget.c[m [36m@@ -26,6 +26,7 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m #include "paint.h"[m #include "app.h"[m #include "util.h"[m [32m+[m[32m#include "keys.h"[m [m iLocalDef iInt2 padding_(int flags) {[m return init_I2(flags & tight_WidgetFlag ? 3 * gap_UI / 2 : (3 * gap_UI), gap_UI);[m [36m@@ -43,8 +44,8 @@[m [mstruct Impl_LabelWidget {[m };[m [m iDefineObjectConstructionArgs(LabelWidget,[m [31m- (const char *label, int key, int kmods, const char *cmd),[m [31m- label, key, kmods, cmd)[m [32m+[m[32m (const char *label, const char *cmd),[m [32m+[m[32m label, cmd)[m [m static iBool checkModifiers_(int have, int req) {[m return keyMods_Sym(req) == keyMods_Sym(have);[m [36m@@ -60,11 +61,26 @@[m [mstatic void trigger_LabelWidget_(const iLabelWidget *d) {[m }[m }[m [m [32m+[m[32mstatic void updateKey_LabelWidget_(iLabelWidget *d) {[m [32m+[m[32m if (!isEmpty_String(&d->command)) {[m [32m+[m[32m const iBinding *bind = findCommand_Keys(cstr_String(&d->command));[m [32m+[m[32m if (bind) {[m [32m+[m[32m d->key = bind->key;[m [32m+[m[32m d->kmods = bind->mods;[m [32m+[m[32m }[m [32m+[m[32m }[m [32m+[m[32m}[m [32m+[m static iBool processEvent_LabelWidget_(iLabelWidget *d, const SDL_Event *ev) {[m iWidget *w = &d->widget;[m if (isCommand_UserEvent(ev, "metrics.changed")) {[m updateSize_LabelWidget(d);[m }[m [32m+[m[32m else if (isCommand_UserEvent(ev, "bindings.changed")) {[m [32m+[m[32m /* Update the key used to trigger this label. */[m [32m+[m[32m updateKey_LabelWidget_(d);[m [32m+[m[32m return iFalse;[m [32m+[m[32m }[m if (!isEmpty_String(&d->command)) {[m switch (processEvent_Click(&d->click, ev)) {[m case started_ClickResult:[m [36m@@ -229,6 +245,18 @@[m [mstatic void draw_LabelWidget_(const iLabelWidget *d) {[m unsetClip_Paint(&p);[m }[m [m [32m+[m[32mstatic void sizeChanged_LabelWidget_(iLabelWidget *d) {[m [32m+[m[32m iWidget *w = as_Widget(d);[m [32m+[m[32m if (flags_Widget(w) & wrapText_WidgetFlag) {[m [32m+[m[32m if (flags_Widget(w) & fixedHeight_WidgetFlag) {[m [32m+[m[32m /* Calculate a new height based on the wrapping. */[m [32m+[m[32m w->rect.size.y = advanceWrapRange_Text([m [32m+[m[32m d->font, innerBounds_Widget(w).size.x, range_String(&d->label))[m [32m+[m[32m .y;[m [32m+[m[32m }[m [32m+[m[32m }[m [32m+[m[32m}[m [32m+[m void updateSize_LabelWidget(iLabelWidget *d) {[m iWidget *w = as_Widget(d);[m const int flags = flags_Widget(w);[m [36m@@ -249,19 +277,7 @@[m [mvoid updateSize_LabelWidget(iLabelWidget *d) {[m }[m }[m [m [31m-static void sizeChanged_LabelWidget_(iLabelWidget *d) {[m [31m- iWidget *w = as_Widget(d);[m [31m- if (flags_Widget(w) & wrapText_WidgetFlag) {[m [31m- if (flags_Widget(w) & fixedHeight_WidgetFlag) {[m [31m- /* Calculate a new height based on the wrapping. */[m [31m- w->rect.size.y = advanceWrapRange_Text([m [31m- d->font, innerBounds_Widget(w).size.x, range_String(&d->label))[m [31m- .y;[m [31m- }[m [31m- }[m [31m-}[m [31m-[m [31m-void init_LabelWidget(iLabelWidget *d, const char *label, int key, int kmods, const char *cmd) {[m [32m+[m[32mvoid init_LabelWidget(iLabelWidget *d, const char *label, const char *cmd) {[m init_Widget(&d->widget);[m d->font = uiLabel_FontId;[m initCStr_String(&d->label, label);[m [36m@@ -271,12 +287,13 @@[m [mvoid init_LabelWidget(iLabelWidget *d, const char *label, int key, int kmods, co[m else {[m init_String(&d->command);[m }[m [31m- d->key = key;[m [31m- d->kmods = kmods;[m [32m+[m[32m d->key = 0;[m [32m+[m[32m d->kmods = 0;[m init_Click(&d->click, d, !isEmpty_String(&d->command) ? SDL_BUTTON_LEFT : 0);[m setFlags_Widget(&d->widget, hover_WidgetFlag, d->click.button != 0);[m d->alignVisual = iFalse;[m updateSize_LabelWidget(d);[m [32m+[m[32m updateKey_LabelWidget_(d);[m }[m [m void deinit_LabelWidget(iLabelWidget *d) {[m [36m@@ -321,8 +338,15 @@[m [mconst iString *command_LabelWidget(const iLabelWidget *d) {[m return &d->command;[m }[m [m [32m+[m[32miLabelWidget *newKeyMods_LabelWidget(const char *label, int key, int kmods, const char *command) {[m [32m+[m[32m iLabelWidget *d = new_LabelWidget(label, command);[m [32m+[m[32m d->key = key;[m [32m+[m[32m d->kmods = kmods;[m [32m+[m[32m return d;[m [32m+[m[32m}[m [32m+[m iLabelWidget *newColor_LabelWidget(const char *text, int color) {[m [31m- iLabelWidget *d = new_LabelWidget(format_CStr("%s%s", escape_Color(color), text), 0, 0, NULL);[m [32m+[m[32m iLabelWidget *d = new_LabelWidget(format_CStr("%s%s", escape_Color(color), text), NULL);[m setFlags_Widget(as_Widget(d), frameless_WidgetFlag, iTrue);[m return d;[m }[m [1mdiff --git a/src/ui/labelwidget.h b/src/ui/labelwidget.h[m [1mindex c55ecd08..066c9b33 100644[m [1m--- a/src/ui/labelwidget.h[m [1m+++ b/src/ui/labelwidget.h[m [36m@@ -27,7 +27,7 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m #include "widget.h"[m [m iDeclareWidgetClass(LabelWidget)[m [31m-iDeclareObjectConstructionArgs(LabelWidget, const char *label, int key, int kmods, const char *command)[m [32m+[m[32miDeclareObjectConstructionArgs(LabelWidget, const char *label, const char *command)[m [m void setAlignVisually_LabelWidget(iLabelWidget *, iBool alignVisual);[m void setFont_LabelWidget (iLabelWidget *, int fontId);[m [36m@@ -41,13 +41,14 @@[m [mvoid updateTextCStr_LabelWidget (iLabelWidget *, const char *text); /* not r[m const iString *label_LabelWidget (const iLabelWidget *);[m const iString *command_LabelWidget (const iLabelWidget *);[m [m [31m-iLabelWidget *newColor_LabelWidget(const char *text, int color);[m [32m+[m[32miLabelWidget *newKeyMods_LabelWidget(const char *label, int key, int kmods, const char *command);[m [32m+[m[32miLabelWidget *newColor_LabelWidget (const char *text, int color);[m [m iLocalDef iLabelWidget *newEmpty_LabelWidget(void) {[m [31m- return new_LabelWidget("", 0, 0, NULL);[m [32m+[m[32m return new_LabelWidget("", NULL);[m }[m iLocalDef iLabelWidget *newIcon_LabelWidget(const char *label, int key, int kmods, const char *command) {[m [31m- iLabelWidget *d = new_LabelWidget(label, key, kmods, command);[m [32m+[m[32m iLabelWidget *d = newKeyMods_LabelWidget(label, key, kmods, command);[m setAlignVisually_LabelWidget(d, iTrue);[m return d;[m }[m [1mdiff --git a/src/ui/listwidget.h b/src/ui/listwidget.h[m [1mindex 3e1c6777..da6303e9 100644[m [1m--- a/src/ui/listwidget.h[m [1m+++ b/src/ui/listwidget.h[m [36m@@ -73,6 +73,6 @@[m [msize_t itemIndex_ListWidget (const iListWidget *, iInt2 pos)[m const iAnyObject * constItem_ListWidget (const iListWidget *, size_t index);[m const iAnyObject * constHoverItem_ListWidget (const iListWidget *);[m [m [31m-iLocalDef isEmpty_ListWidget(const iListWidget *d) { return numItems_ListWidget(d) == 0; }[m [32m+[m[32miLocalDef iBool isEmpty_ListWidget(const iListWidget *d) { return numItems_ListWidget(d) == 0; }[m [m iBool isMouseDown_ListWidget (const iListWidget *);[m [1mdiff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c[m [1mindex f089f48d..d6292f5b 100644[m [1m--- a/src/ui/sidebarwidget.c[m [1m+++ b/src/ui/sidebarwidget.c[m [36m@@ -252,18 +252,16 @@[m [mstatic void updateItems_SidebarWidget_(iSidebarWidget *d) {[m iWidget *div = makeVDiv_Widget();[m setPadding_Widget(div, 3 * gap_UI, 0, 3 * gap_UI, 2 * gap_UI);[m addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); /* pad */[m [31m- iLabelWidget *msg = new_LabelWidget("No Identities", 0, 0, NULL);[m [32m+[m[32m iLabelWidget *msg = new_LabelWidget("No Identities", NULL);[m setFont_LabelWidget(msg, uiLabelLarge_FontId);[m addChildFlags_Widget(div, iClob(msg), frameless_WidgetFlag);[m addChild_Widget(div, iClob(makePadding_Widget(3 * gap_UI)));[m [31m- addChild_Widget(div, iClob(new_LabelWidget("New Identity...", 0, 0, "ident.new")));[m [32m+[m[32m addChild_Widget(div, iClob(new_LabelWidget("New Identity...", "ident.new")));[m addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); /* pad */[m addChildFlags_Widget([m div,[m iClob(new_LabelWidget("See " uiTextStrong_ColorEscape "Help" uiText_ColorEscape[m " for more information about TLS client certificates.",[m [31m- 0,[m [31m- 0,[m "!open newtab:1 gotoheading:Identities url:about:help")),[m frameless_WidgetFlag | fixedHeight_WidgetFlag | wrapText_WidgetFlag);[m addChild_Widget(d->blank, iClob(div));[m [36m@@ -336,7 +334,7 @@[m [mvoid init_SidebarWidget(iSidebarWidget *d) {[m d->modeButtons[i] = addChildFlags_Widget([m buttons,[m iClob([m [31m- new_LabelWidget(tightModeLabels_[i], 0, 0, format_CStr("sidebar.mode arg:%d", i))),[m [32m+[m[32m new_LabelWidget(tightModeLabels_[i], format_CStr("sidebar.mode arg:%d", i))),[m frameless_WidgetFlag);[m d->maxButtonLabelWidth =[m iMaxi(d->maxButtonLabelWidth,[m [1mdiff --git a/src/ui/util.c b/src/ui/util.c[m [1mindex 16dea8d9..3c40d4a5 100644[m [1m--- a/src/ui/util.c[m [1m+++ b/src/ui/util.c[m [36m@@ -319,7 +319,7 @@[m [miWidget *makePadding_Widget(int size) {[m }[m [m iLabelWidget *makeHeading_Widget(const char *text) {[m [31m- iLabelWidget *heading = new_LabelWidget(text, 0, 0, NULL);[m [32m+[m[32m iLabelWidget *heading = new_LabelWidget(text, NULL);[m setFlags_Widget(as_Widget(heading), frameless_WidgetFlag | fixedSize_WidgetFlag, iTrue);[m setBackgroundColor_Widget(as_Widget(heading), none_ColorId);[m return heading;[m [36m@@ -338,7 +338,7 @@[m [miWidget *makeHDiv_Widget(void) {[m }[m [m iWidget *addAction_Widget(iWidget *parent, int key, int kmods, const char *command) {[m [31m- iLabelWidget *action = new_LabelWidget("", key, kmods, command);[m [32m+[m[32m iLabelWidget *action = newKeyMods_LabelWidget("", key, kmods, command);[m setSize_Widget(as_Widget(action), zero_I2());[m addChildFlags_Widget(parent, iClob(action), hidden_WidgetFlag);[m return as_Widget(action);[m [36m@@ -394,7 +394,7 @@[m [miWidget *makeMenu_Widget(iWidget *parent, const iMenuItem *items, size_t n) {[m else {[m iLabelWidget *label = addChildFlags_Widget([m menu,[m [31m- iClob(new_LabelWidget(item->label, item->key, item->kmods, item->command)),[m [32m+[m[32m iClob(newKeyMods_LabelWidget(item->label, item->key, item->kmods, item->command)),[m frameless_WidgetFlag | alignLeft_WidgetFlag | drawKey_WidgetFlag);[m updateSize_LabelWidget(label); /* drawKey was set */[m }[m [36m@@ -462,7 +462,7 @@[m [mint checkContextMenu_Widget(iWidget *menu, const SDL_Event *ev) {[m }[m [m iLabelWidget *makeMenuButton_LabelWidget(const char *label, const iMenuItem *items, size_t n) {[m [31m- iLabelWidget *button = new_LabelWidget(label, 0, 0, "menu.open");[m [32m+[m[32m iLabelWidget *button = new_LabelWidget(label, "menu.open");[m iWidget *menu = makeMenu_Widget(as_Widget(button), items, n);[m setId_Widget(menu, "menu");[m return button;[m [36m@@ -538,7 +538,7 @@[m [mstatic void addTabPage_Widget_(iWidget *tabs, enum iWidgetAddPos addPos, iWidget[m iWidget * buttons = findChild_Widget(tabs, "tabs.buttons");[m iWidget * button = addChildPos_Widget([m buttons,[m [31m- iClob(new_LabelWidget(label, key, kmods, format_CStr("tabs.switch page:%p", page))),[m [32m+[m[32m iClob(newKeyMods_LabelWidget(label, key, kmods, format_CStr("tabs.switch page:%p", page))),[m addPos);[m setFlags_Widget(buttons, hidden_WidgetFlag, iFalse);[m setFlags_Widget(button, selected_WidgetFlag, isSel);[m [36m@@ -732,7 +732,7 @@[m [mvoid makeFilePath_Widget(iWidget * parent,[m iWidget *dlg = makeSheet_Widget(command);[m setCommandHandler_Widget(dlg, filePathHandler_);[m addChild_Widget(parent, iClob(dlg));[m [31m- addChildFlags_Widget(dlg, iClob(new_LabelWidget(title, 0, 0, NULL)), frameless_WidgetFlag);[m [32m+[m[32m addChildFlags_Widget(dlg, iClob(new_LabelWidget(title, NULL)), frameless_WidgetFlag);[m iInputWidget *input = addChild_Widget(dlg, iClob(new_InputWidget(0)));[m if (initialPath) {[m setText_InputWidget(input, collect_String(makeRelative_Path(initialPath)));[m [36m@@ -742,8 +742,8 @@[m [mvoid makeFilePath_Widget(iWidget * parent,[m addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI)));[m iWidget *div = new_Widget(); {[m setFlags_Widget(div, arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag, iTrue);[m [31m- addChild_Widget(div, iClob(new_LabelWidget("Cancel", SDLK_ESCAPE, 0, "filepath.cancel")));[m [31m- addChild_Widget(div, iClob(new_LabelWidget(acceptLabel, SDLK_RETURN, 0, "filepath.accept")));[m [32m+[m[32m addChild_Widget(div, iClob(newKeyMods_LabelWidget("Cancel", SDLK_ESCAPE, 0, "filepath.cancel")));[m [32m+[m[32m addChild_Widget(div, iClob(newKeyMods_LabelWidget(acceptLabel, SDLK_RETURN, 0, "filepath.accept")));[m }[m addChild_Widget(dlg, iClob(div));[m centerSheet_Widget(dlg);[m [36m@@ -818,10 +818,10 @@[m [miWidget *makeValueInput_Widget(iWidget *parent, const iString *initialValue, con[m addChild_Widget(parent, iClob(dlg));[m }[m setId_Widget([m [31m- addChildFlags_Widget(dlg, iClob(new_LabelWidget(title, 0, 0, NULL)), frameless_WidgetFlag),[m [32m+[m[32m addChildFlags_Widget(dlg, iClob(new_LabelWidget(title, NULL)), frameless_WidgetFlag),[m "valueinput.title");[m setId_Widget([m [31m- addChildFlags_Widget(dlg, iClob(new_LabelWidget(prompt, 0, 0, NULL)), frameless_WidgetFlag),[m [32m+[m[32m addChildFlags_Widget(dlg, iClob(new_LabelWidget(prompt, NULL)), frameless_WidgetFlag),[m "valueinput.prompt");[m iInputWidget *input = addChild_Widget(dlg, iClob(new_InputWidget(0)));[m if (initialValue) {[m [36m@@ -832,12 +832,13 @@[m [miWidget *makeValueInput_Widget(iWidget *parent, const iString *initialValue, con[m addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI)));[m iWidget *div = new_Widget(); {[m setFlags_Widget(div, arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag, iTrue);[m [31m- addChild_Widget(div, iClob(new_LabelWidget("Cancel", SDLK_ESCAPE, 0, "cancel")));[m [31m- addChild_Widget(div,[m [31m- iClob(new_LabelWidget(acceptLabel ? acceptLabel : uiTextAction_ColorEscape "OK",[m [31m- SDLK_RETURN,[m [31m- 0,[m [31m- "valueinput.accept")));[m [32m+[m[32m addChild_Widget(div, iClob(newKeyMods_LabelWidget("Cancel", SDLK_ESCAPE, 0, "cancel")));[m [32m+[m[32m addChild_Widget([m [32m+[m[32m div,[m [32m+[m[32m iClob(newKeyMods_LabelWidget(acceptLabel ? acceptLabel : uiTextAction_ColorEscape "OK",[m [32m+[m[32m SDLK_RETURN,[m [32m+[m[32m 0,[m [32m+[m[32m "valueinput.accept")));[m }[m addChild_Widget(dlg, iClob(div));[m centerSheet_Widget(dlg);[m [36m@@ -874,15 +875,15 @@[m [miWidget *makeQuestion_Widget(const char *title, const char *msg, const char *lab[m processEvents_App(postedEventsOnly_AppEventMode);[m iWidget *dlg = makeSheet_Widget("");[m setCommandHandler_Widget(dlg, messageHandler_);[m [31m- addChildFlags_Widget(dlg, iClob(new_LabelWidget(title, 0, 0, NULL)), frameless_WidgetFlag);[m [31m- addChildFlags_Widget(dlg, iClob(new_LabelWidget(msg, 0, 0, NULL)), frameless_WidgetFlag);[m [32m+[m[32m addChildFlags_Widget(dlg, iClob(new_LabelWidget(title, NULL)), frameless_WidgetFlag);[m [32m+[m[32m addChildFlags_Widget(dlg, iClob(new_LabelWidget(msg, NULL)), frameless_WidgetFlag);[m addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI)));[m iWidget *div = new_Widget(); {[m setFlags_Widget(div, arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag, iTrue);[m for (size_t i = 0; i < count; ++i) {[m /* The last one is the default option. */[m const int key = (i == count - 1 ? SDLK_RETURN : 0);[m [31m- addChild_Widget(div, iClob(new_LabelWidget(labels[i], key, 0, commands[i])));[m [32m+[m[32m addChild_Widget(div, iClob(newKeyMods_LabelWidget(labels[i], key, 0, commands[i])));[m }[m }[m addChild_Widget(dlg, iClob(div));[m [36m@@ -912,7 +913,7 @@[m [mstatic iBool toggleHandler_(iWidget *d, const char *cmd) {[m }[m [m iWidget *makeToggle_Widget(const char *id) {[m [31m- iWidget *toggle = as_Widget(new_LabelWidget("YES", 0, 0, "toggle")); /* "YES" for sizing */[m [32m+[m[32m iWidget *toggle = as_Widget(new_LabelWidget("YES", "toggle")); /* "YES" for sizing */[m setId_Widget(toggle, id);[m updateTextCStr_LabelWidget((iLabelWidget *) toggle, "NO"); /* actual initial value */[m setCommandHandler_Widget(toggle, toggleHandler_);[m [36m@@ -950,7 +951,7 @@[m [mstatic void expandInputFieldWidth_(iInputWidget *input) {[m [m static void addRadioButton_(iWidget *parent, const char *id, const char *label, const char *cmd) {[m setId_Widget([m [31m- addChildFlags_Widget(parent, iClob(new_LabelWidget(label, 0, 0, cmd)), radio_WidgetFlag),[m [32m+[m[32m addChildFlags_Widget(parent, iClob(new_LabelWidget(label, cmd)), radio_WidgetFlag),[m id);[m }[m [m [36m@@ -969,7 +970,7 @@[m [mstatic void addFontButtons_(iWidget *parent, const char *id) {[m iWidget *makePreferences_Widget(void) {[m iWidget *dlg = makeSheet_Widget("prefs");[m addChildFlags_Widget(dlg,[m [31m- iClob(new_LabelWidget(uiHeading_ColorEscape "PREFERENCES", 0, 0, NULL)),[m [32m+[m[32m iClob(new_LabelWidget(uiHeading_ColorEscape "PREFERENCES", NULL)),[m frameless_WidgetFlag);[m iWidget *tabs = makeTabs_Widget(dlg);[m setId_Widget(tabs, "prefs.tabs");[m [36m@@ -988,10 +989,10 @@[m [miWidget *makePreferences_Widget(void) {[m addChild_Widget(headings, iClob(makeHeading_Widget("Theme:")));[m iWidget *themes = new_Widget();[m /* Themes. */ {[m [31m- setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("Pure Black", 0, 0, "theme.set arg:0"))), "prefs.theme.0");[m [31m- setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("Dark", 0, 0, "theme.set arg:1"))), "prefs.theme.1");[m [31m- setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("Light", 0, 0, "theme.set arg:2"))), "prefs.theme.2");[m [31m- setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("Pure White", 0, 0, "theme.set arg:3"))), "prefs.theme.3");[m [32m+[m[32m setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("Pure Black", "theme.set arg:0"))), "prefs.theme.0");[m [32m+[m[32m setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("Dark", "theme.set arg:1"))), "prefs.theme.1");[m [32m+[m[32m setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("Light", "theme.set arg:2"))), "prefs.theme.2");[m [32m+[m[32m setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("Pure White", "theme.set arg:3"))), "prefs.theme.3");[m }[m addChildFlags_Widget(values, iClob(themes), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);[m addChild_Widget(headings, iClob(makeHeading_Widget("Retain window size:")));[m [36m@@ -1084,7 +1085,7 @@[m [miWidget *makePreferences_Widget(void) {[m }[m iWidget *div = new_Widget(); {[m setFlags_Widget(div, arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag, iTrue);[m [31m- addChild_Widget(div, iClob(new_LabelWidget("Dismiss", SDLK_ESCAPE, 0, "prefs.dismiss")));[m [32m+[m[32m addChild_Widget(div, iClob(newKeyMods_LabelWidget("Dismiss", SDLK_ESCAPE, 0, "prefs.dismiss")));[m }[m addChild_Widget(dlg, iClob(div));[m addAction_Widget(dlg, prevTab_KeyShortcut, "tabs.prev");[m [36m@@ -1098,7 +1099,7 @@[m [miWidget *makeBookmarkEditor_Widget(void) {[m iWidget *dlg = makeSheet_Widget("bmed");[m setId_Widget(addChildFlags_Widget([m dlg,[m [31m- iClob(new_LabelWidget(uiHeading_ColorEscape "EDIT BOOKMARK", 0, 0, NULL)),[m [32m+[m[32m iClob(new_LabelWidget(uiHeading_ColorEscape "EDIT BOOKMARK", NULL)),[m frameless_WidgetFlag),[m "bmed.heading");[m iWidget *page = new_Widget();[m [36m@@ -1121,10 +1122,10 @@[m [miWidget *makeBookmarkEditor_Widget(void) {[m }[m iWidget *div = new_Widget(); {[m setFlags_Widget(div, arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag, iTrue);[m [31m- addChild_Widget(div, iClob(new_LabelWidget("Cancel", SDLK_ESCAPE, 0, "cancel")));[m [32m+[m[32m addChild_Widget(div, iClob(newKeyMods_LabelWidget("Cancel", SDLK_ESCAPE, 0, "cancel")));[m addChild_Widget([m div,[m [31m- iClob(new_LabelWidget([m [32m+[m[32m iClob(newKeyMods_LabelWidget([m uiTextCaution_ColorEscape "Save Bookmark", SDLK_RETURN, KMOD_PRIMARY, "bmed.accept")));[m }[m addChild_Widget(dlg, iClob(div));[m [36m@@ -1165,7 +1166,7 @@[m [miWidget *makeBookmarkCreation_Widget(const iString *url, const iString *title, i[m setId_Widget([m addChildFlags_Widget([m dlg,[m [31m- iClob(new_LabelWidget(cstrCollect_String(newUnicodeN_String(&icon, 1)), 0, 0, NULL)),[m [32m+[m[32m iClob(new_LabelWidget(cstrCollect_String(newUnicodeN_String(&icon, 1)), NULL)),[m collapse_WidgetFlag | hidden_WidgetFlag | disabled_WidgetFlag),[m "bmed.icon");[m setCommandHandler_Widget(dlg, handleBookmarkCreationCommands_SidebarWidget_);[m [36m@@ -1176,14 +1177,14 @@[m [miWidget *makeIdentityCreation_Widget(void) {[m iWidget *dlg = makeSheet_Widget("ident");[m setId_Widget(addChildFlags_Widget([m dlg,[m [31m- iClob(new_LabelWidget(uiHeading_ColorEscape "NEW IDENTITY", 0, 0, NULL)),[m [32m+[m[32m iClob(new_LabelWidget(uiHeading_ColorEscape "NEW IDENTITY", NULL)),[m frameless_WidgetFlag),[m "ident.heading");[m iWidget *page = new_Widget();[m addChildFlags_Widget([m dlg,[m iClob([m [31m- new_LabelWidget("Creating a 2048-bit self-signed RSA certificate.", 0, 0, NULL)),[m [32m+[m[32m new_LabelWidget("Creating a 2048-bit self-signed RSA certificate.", NULL)),[m frameless_WidgetFlag);[m addChild_Widget(dlg, iClob(page));[m setFlags_Widget(page, arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag, iTrue);[m [36m@@ -1214,10 +1215,10 @@[m [miWidget *makeIdentityCreation_Widget(void) {[m }[m iWidget *div = new_Widget(); {[m setFlags_Widget(div, arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag, iTrue);[m [31m- addChild_Widget(div, iClob(new_LabelWidget("Cancel", SDLK_ESCAPE, 0, "cancel")));[m [32m+[m[32m addChild_Widget(div, iClob(newKeyMods_LabelWidget("Cancel", SDLK_ESCAPE, 0, "cancel")));[m addChild_Widget([m div,[m [31m- iClob(new_LabelWidget([m [32m+[m[32m iClob(newKeyMods_LabelWidget([m uiTextAction_ColorEscape "Create Identity", SDLK_RETURN, KMOD_PRIMARY, "ident.accept")));[m }[m addChild_Widget(dlg, iClob(div));[m [1mdiff --git a/src/ui/window.c b/src/ui/window.c[m [1mindex fe731ecf..3ec4ff4f 100644[m [1m--- a/src/ui/window.c[m [1m+++ b/src/ui/window.c[m [36m@@ -388,7 +388,7 @@[m [mstatic void setupUserInterface_Window(iWindow *d) {[m addChildFlags_Widget(navBar, iClob(url), expand_WidgetFlag);[m /* Download progress indicator is inside the input field, but hidden normally. */[m setPadding_Widget(as_Widget(url),0, 0, gap_UI * 1, 0);[m [31m- iLabelWidget *progress = new_LabelWidget(uiTextCaution_ColorEscape "00.000 MB", 0, 0, NULL);[m [32m+[m[32m iLabelWidget *progress = new_LabelWidget(uiTextCaution_ColorEscape "00.000 MB", NULL);[m setId_Widget(as_Widget(progress), "document.progress");[m setAlignVisually_LabelWidget(progress, iTrue);[m shrink_Rect(&as_Widget(progress)->rect, init_I2(0, gap_UI));[m [36m@@ -448,7 +448,7 @@[m [mstatic void setupUserInterface_Window(iWindow *d) {[m setBackgroundColor_Widget(searchBar, uiBackground_ColorId);[m setCommandHandler_Widget(searchBar, handleSearchBarCommands_);[m addChildFlags_Widget([m [31m- searchBar, iClob(new_LabelWidget("\U0001f50d Text", 0, 0, NULL)), frameless_WidgetFlag);[m [32m+[m[32m searchBar, iClob(new_LabelWidget("\U0001f50d Text", NULL)), frameless_WidgetFlag);[m iInputWidget *input = new_InputWidget(0);[m setId_Widget(addChildFlags_Widget(searchBar, iClob(input), expand_WidgetFlag),[m "find.input");[m [36m@@ -597,6 +597,7 @@[m [mvoid init_Window(iWindow *d, iRect rect) {[m setId_Widget(d->root, "root");[m init_Text(d->render);[m setupUserInterface_Window(d);[m [32m+[m[32m postCommand_App("bindings.changed"); /* update from bindings */[m updateRootSize_Window_(d);[m }[m [m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).