diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-03 14:48:42 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-03 14:48:42 +0200 |
commit | 8ac461dbb8804f6e8b3638d8430b17fc7cf28075 (patch) | |
tree | 933f530445bfeb7d7e088aaa7d16924d6e41fd0e /src/ui | |
parent | 45018eefbf9d331c58009b6657081ff103c7b1fe (diff) |
XDG: Check XDG_CONFIG_HOME and the user's download directory
Also added a build option to disable changing the user download
directory within Lagrange, since that's set via XDG config.
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/inputwidget.c | 1 | ||||
-rw-r--r-- | src/ui/util.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 3f799e3c..1674040b 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -223,6 +223,7 @@ static void updateBuffered_InputWidget_(iInputWidget *d) { | |||
223 | } | 223 | } |
224 | 224 | ||
225 | void setText_InputWidget(iInputWidget *d, const iString *text) { | 225 | void setText_InputWidget(iInputWidget *d, const iString *text) { |
226 | if (!d) return; | ||
226 | if (d->inFlags & isUrl_InputWidgetFlag) { | 227 | if (d->inFlags & isUrl_InputWidgetFlag) { |
227 | /* If user wants URLs encoded, also Punycode the domain. */ | 228 | /* If user wants URLs encoded, also Punycode the domain. */ |
228 | if (!prefs_App()->decodeUserVisibleURLs) { | 229 | if (!prefs_App()->decodeUserVisibleURLs) { |
diff --git a/src/ui/util.c b/src/ui/util.c index 4d5ed916..d64a93b6 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -1023,6 +1023,7 @@ static void makeTwoColumnHeading_(const char *title, iWidget *headings, iWidget | |||
1023 | } | 1023 | } |
1024 | 1024 | ||
1025 | static void expandInputFieldWidth_(iInputWidget *input) { | 1025 | static void expandInputFieldWidth_(iInputWidget *input) { |
1026 | if (!input) return; | ||
1026 | iWidget *page = as_Widget(input)->parent->parent->parent->parent; /* tabs > page > values > input */ | 1027 | iWidget *page = as_Widget(input)->parent->parent->parent->parent; /* tabs > page > values > input */ |
1027 | as_Widget(input)->rect.size.x = | 1028 | as_Widget(input)->rect.size.x = |
1028 | right_Rect(bounds_Widget(page)) - left_Rect(bounds_Widget(constAs_Widget(input))); | 1029 | right_Rect(bounds_Widget(page)) - left_Rect(bounds_Widget(constAs_Widget(input))); |
@@ -1056,8 +1057,10 @@ iWidget *makePreferences_Widget(void) { | |||
1056 | iWidget *headings, *values; | 1057 | iWidget *headings, *values; |
1057 | /* General preferences. */ { | 1058 | /* General preferences. */ { |
1058 | appendTwoColumnPage_(tabs, "General", '1', &headings, &values); | 1059 | appendTwoColumnPage_(tabs, "General", '1', &headings, &values); |
1060 | #if defined (LAGRANGE_DOWNLOAD_EDIT) | ||
1059 | addChild_Widget(headings, iClob(makeHeading_Widget("Downloads folder:"))); | 1061 | addChild_Widget(headings, iClob(makeHeading_Widget("Downloads folder:"))); |
1060 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.downloads"); | 1062 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.downloads"); |
1063 | #endif | ||
1061 | addChild_Widget(headings, iClob(makeHeading_Widget("Show URL on hover:"))); | 1064 | addChild_Widget(headings, iClob(makeHeading_Widget("Show URL on hover:"))); |
1062 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.hoverlink"))); | 1065 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.hoverlink"))); |
1063 | addChild_Widget(headings, iClob(makeHeading_Widget("Smooth scrolling:"))); | 1066 | addChild_Widget(headings, iClob(makeHeading_Widget("Smooth scrolling:"))); |