diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-21 13:48:15 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-21 13:48:15 +0300 |
commit | 7fefd2ca4f1be52c1bef3bc87cc8972a57cab396 (patch) | |
tree | 111a6a295072eb89ab49d21add9e44e496447733 /src/ui/util.c | |
parent | bbbbc8e18879a5495be1cff78ca78be7a44ac25b (diff) |
Mobile: Autoreload intervals are missing
Diffstat (limited to 'src/ui/util.c')
-rw-r--r-- | src/ui/util.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index c518d5db..fb12dd7c 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -1685,6 +1685,9 @@ iWidget *makeDialogButtons_Widget(const iMenuItem *actions, size_t numActions) { | |||
1685 | int key = actions[i].key; | 1685 | int key = actions[i].key; |
1686 | int kmods = actions[i].kmods; | 1686 | int kmods = actions[i].kmods; |
1687 | const iBool isDefault = (i == numActions - 1); | 1687 | const iBool isDefault = (i == numActions - 1); |
1688 | if (*label == '=' || *label == '-') { | ||
1689 | continue; /* Special value selection items for a Question dialog. */ | ||
1690 | } | ||
1688 | if (!iCmpStr(label, "---")) { | 1691 | if (!iCmpStr(label, "---")) { |
1689 | /* Separator.*/ | 1692 | /* Separator.*/ |
1690 | addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); | 1693 | addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); |
@@ -1792,6 +1795,20 @@ iWidget *makeQuestion_Widget(const char *title, const char *msg, | |||
1792 | setCommandHandler_Widget(dlg, messageHandler_); | 1795 | setCommandHandler_Widget(dlg, messageHandler_); |
1793 | addChildFlags_Widget(dlg, iClob(new_LabelWidget(title, NULL)), frameless_WidgetFlag); | 1796 | addChildFlags_Widget(dlg, iClob(new_LabelWidget(title, NULL)), frameless_WidgetFlag); |
1794 | addChildFlags_Widget(dlg, iClob(new_LabelWidget(msg, NULL)), frameless_WidgetFlag); | 1797 | addChildFlags_Widget(dlg, iClob(new_LabelWidget(msg, NULL)), frameless_WidgetFlag); |
1798 | /* Check for value selections. */ | ||
1799 | for (size_t i = 0; i < numItems; i++) { | ||
1800 | const iMenuItem *item = &items[i]; | ||
1801 | const char first = item->label[0]; | ||
1802 | if (first == '-' || first == '=') { | ||
1803 | addChildFlags_Widget(dlg, | ||
1804 | iClob(newKeyMods_LabelWidget(item->label + 1, | ||
1805 | item->key, | ||
1806 | item->kmods, | ||
1807 | item->command)), | ||
1808 | resizeToParentWidth_WidgetFlag | | ||
1809 | (first == '=' ? selected_WidgetFlag : 0)); | ||
1810 | } | ||
1811 | } | ||
1795 | addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI))); | 1812 | addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI))); |
1796 | addChild_Widget(dlg, iClob(makeDialogButtons_Widget(items, numItems))); | 1813 | addChild_Widget(dlg, iClob(makeDialogButtons_Widget(items, numItems))); |
1797 | addChild_Widget(get_Window()->root, iClob(dlg)); | 1814 | addChild_Widget(get_Window()->root, iClob(dlg)); |