diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-05 13:14:02 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-05 13:15:20 +0200 |
commit | 71f3f34782aa6050ede4bf143fa6028653adae6d (patch) | |
tree | 1465b155b6c99ca48596263c2929da48b8795e23 /src/app.c | |
parent | 8417c4fb637351587e1527b94c69b752d9988323 (diff) |
Restructuring dialogs for mobile
On a phone, dialogs are restructured to be more vertical and full-width.
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1231,8 +1231,10 @@ static iBool handlePrefsCommands_(iWidget *d, const char *cmd) { | |||
1231 | postCommandf_App("proxy.http address:%s", | 1231 | postCommandf_App("proxy.http address:%s", |
1232 | cstr_String(text_InputWidget(findChild_Widget(d, "prefs.proxy.http")))); | 1232 | cstr_String(text_InputWidget(findChild_Widget(d, "prefs.proxy.http")))); |
1233 | const iWidget *tabs = findChild_Widget(d, "prefs.tabs"); | 1233 | const iWidget *tabs = findChild_Widget(d, "prefs.tabs"); |
1234 | postCommandf_App("prefs.dialogtab arg:%u", | 1234 | if (tabs) { |
1235 | tabPageIndex_Widget(tabs, currentTabPage_Widget(tabs))); | 1235 | postCommandf_App("prefs.dialogtab arg:%u", |
1236 | tabPageIndex_Widget(tabs, currentTabPage_Widget(tabs))); | ||
1237 | } | ||
1236 | destroy_Widget(d); | 1238 | destroy_Widget(d); |
1237 | postCommand_App("prefs.changed"); | 1239 | postCommand_App("prefs.changed"); |
1238 | return iTrue; | 1240 | return iTrue; |
@@ -1800,7 +1802,9 @@ iBool handleCommand_App(const char *cmd) { | |||
1800 | setText_InputWidget(findChild_Widget(dlg, "prefs.proxy.gopher"), &d->prefs.gopherProxy); | 1802 | setText_InputWidget(findChild_Widget(dlg, "prefs.proxy.gopher"), &d->prefs.gopherProxy); |
1801 | setText_InputWidget(findChild_Widget(dlg, "prefs.proxy.http"), &d->prefs.httpProxy); | 1803 | setText_InputWidget(findChild_Widget(dlg, "prefs.proxy.http"), &d->prefs.httpProxy); |
1802 | iWidget *tabs = findChild_Widget(dlg, "prefs.tabs"); | 1804 | iWidget *tabs = findChild_Widget(dlg, "prefs.tabs"); |
1803 | showTabPage_Widget(tabs, tabPage_Widget(tabs, d->prefs.dialogTab)); | 1805 | if (tabs) { |
1806 | showTabPage_Widget(tabs, tabPage_Widget(tabs, d->prefs.dialogTab)); | ||
1807 | } | ||
1804 | setCommandHandler_Widget(dlg, handlePrefsCommands_); | 1808 | setCommandHandler_Widget(dlg, handlePrefsCommands_); |
1805 | } | 1809 | } |
1806 | else if (equal_Command(cmd, "navigate.home")) { | 1810 | else if (equal_Command(cmd, "navigate.home")) { |