diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app.c | 3 | ||||
-rw-r--r-- | src/ui/util.c | 5 |
2 files changed, 7 insertions, 1 deletions
@@ -659,6 +659,8 @@ static iBool handlePrefsCommands_(iWidget *d, const char *cmd) { | |||
659 | if (equal_Command(cmd, "prefs.dismiss") || equal_Command(cmd, "preferences")) { | 659 | if (equal_Command(cmd, "prefs.dismiss") || equal_Command(cmd, "preferences")) { |
660 | setUiScale_Window(get_Window(), | 660 | setUiScale_Window(get_Window(), |
661 | toFloat_String(text_InputWidget(findChild_Widget(d, "prefs.uiscale")))); | 661 | toFloat_String(text_InputWidget(findChild_Widget(d, "prefs.uiscale")))); |
662 | postCommandf_App("downloads path:%s", | ||
663 | cstr_String(text_InputWidget(findChild_Widget(d, "prefs.downloads")))); | ||
662 | postCommandf_App("window.retain arg:%d", | 664 | postCommandf_App("window.retain arg:%d", |
663 | isSelected_Widget(findChild_Widget(d, "prefs.retainwindow"))); | 665 | isSelected_Widget(findChild_Widget(d, "prefs.retainwindow"))); |
664 | postCommandf_App("ostheme arg:%d", | 666 | postCommandf_App("ostheme arg:%d", |
@@ -892,6 +894,7 @@ iBool handleCommand_App(const char *cmd) { | |||
892 | else if (equal_Command(cmd, "preferences")) { | 894 | else if (equal_Command(cmd, "preferences")) { |
893 | iWidget *dlg = makePreferences_Widget(); | 895 | iWidget *dlg = makePreferences_Widget(); |
894 | updatePrefsThemeButtons_(dlg); | 896 | updatePrefsThemeButtons_(dlg); |
897 | setText_InputWidget(findChild_Widget(dlg, "prefs.downloads"), &d->downloadDir); | ||
895 | setToggle_Widget(findChild_Widget(dlg, "prefs.ostheme"), d->useSystemTheme); | 898 | setToggle_Widget(findChild_Widget(dlg, "prefs.ostheme"), d->useSystemTheme); |
896 | setToggle_Widget(findChild_Widget(dlg, "prefs.retainwindow"), d->retainWindowSize); | 899 | setToggle_Widget(findChild_Widget(dlg, "prefs.retainwindow"), d->retainWindowSize); |
897 | setText_InputWidget(findChild_Widget(dlg, "prefs.uiscale"), | 900 | setText_InputWidget(findChild_Widget(dlg, "prefs.uiscale"), |
diff --git a/src/ui/util.c b/src/ui/util.c index 53016779..f1cab9ba 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -811,6 +811,8 @@ iWidget *makePreferences_Widget(void) { | |||
811 | page, iClob(new_Widget()), arrangeVertical_WidgetFlag | arrangeSize_WidgetFlag); | 811 | page, iClob(new_Widget()), arrangeVertical_WidgetFlag | arrangeSize_WidgetFlag); |
812 | iWidget *values = addChildFlags_Widget( | 812 | iWidget *values = addChildFlags_Widget( |
813 | page, iClob(new_Widget()), arrangeVertical_WidgetFlag | arrangeSize_WidgetFlag); | 813 | page, iClob(new_Widget()), arrangeVertical_WidgetFlag | arrangeSize_WidgetFlag); |
814 | addChild_Widget(headings, iClob(makeHeading_Widget("Downloads folder:"))); | ||
815 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.downloads"); | ||
814 | #if defined (iPlatformApple) || defined (iPlatformMSys) | 816 | #if defined (iPlatformApple) || defined (iPlatformMSys) |
815 | addChild_Widget(headings, iClob(makeHeading_Widget("Use system theme:"))); | 817 | addChild_Widget(headings, iClob(makeHeading_Widget("Use system theme:"))); |
816 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.ostheme"))); | 818 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.ostheme"))); |
@@ -835,8 +837,9 @@ iWidget *makePreferences_Widget(void) { | |||
835 | addChild_Widget(headings, iClob(makeHeading_Widget("HTTP proxy:"))); | 837 | addChild_Widget(headings, iClob(makeHeading_Widget("HTTP proxy:"))); |
836 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.proxy.http"); | 838 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.proxy.http"); |
837 | arrange_Widget(dlg); | 839 | arrange_Widget(dlg); |
838 | /* Text input widths. */ { | 840 | /* Set text input widths. */ { |
839 | const int inputWidth = width_Rect(page->rect) - width_Rect(headings->rect); | 841 | const int inputWidth = width_Rect(page->rect) - width_Rect(headings->rect); |
842 | as_Widget(findChild_Widget(values, "prefs.downloads"))->rect.size.x = inputWidth; | ||
840 | as_Widget(findChild_Widget(values, "prefs.proxy.http"))->rect.size.x = inputWidth; | 843 | as_Widget(findChild_Widget(values, "prefs.proxy.http"))->rect.size.x = inputWidth; |
841 | as_Widget(findChild_Widget(values, "prefs.proxy.gopher"))->rect.size.x = inputWidth; | 844 | as_Widget(findChild_Widget(values, "prefs.proxy.gopher"))->rect.size.x = inputWidth; |
842 | } | 845 | } |