diff options
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -276,6 +276,14 @@ static const char *downloadDir_App_(void) { | |||
276 | } | 276 | } |
277 | } | 277 | } |
278 | #endif | 278 | #endif |
279 | #if defined (iPlatformAppleMobile) | ||
280 | /* Save to a local cache directory from where the user can export to the cloud. */ | ||
281 | const iString *dlDir = cleanedCStr_Path("~/Library/Caches/Downloads"); | ||
282 | if (!fileExists_FileInfo(dlDir)) { | ||
283 | makeDirs_Path(dlDir); | ||
284 | } | ||
285 | return cstr_String(dlDir); | ||
286 | #endif | ||
279 | return defaultDownloadDir_App_; | 287 | return defaultDownloadDir_App_; |
280 | } | 288 | } |
281 | 289 | ||
@@ -313,6 +321,11 @@ static void loadPrefs_App_(iApp *d) { | |||
313 | d->initialWindowRect = init_Rect( | 321 | d->initialWindowRect = init_Rect( |
314 | pos.x, pos.y, argLabel_Command(cmd, "width"), argLabel_Command(cmd, "height")); | 322 | pos.x, pos.y, argLabel_Command(cmd, "width"), argLabel_Command(cmd, "height")); |
315 | } | 323 | } |
324 | #if !defined (LAGRANGE_DOWNLOAD_EDIT) | ||
325 | else if (equal_Command(cmd, "downloads")) { | ||
326 | continue; /* can't change downloads directory */ | ||
327 | } | ||
328 | #endif | ||
316 | else { | 329 | else { |
317 | postCommandString_App(&cmdStr); | 330 | postCommandString_App(&cmdStr); |
318 | } | 331 | } |
@@ -1311,6 +1324,8 @@ static iBool handlePrefsCommands_(iWidget *d, const char *cmd) { | |||
1311 | isSelected_Widget(findChild_Widget(d, "prefs.smoothscroll"))); | 1324 | isSelected_Widget(findChild_Widget(d, "prefs.smoothscroll"))); |
1312 | postCommandf_App("imageloadscroll arg:%d", | 1325 | postCommandf_App("imageloadscroll arg:%d", |
1313 | isSelected_Widget(findChild_Widget(d, "prefs.imageloadscroll"))); | 1326 | isSelected_Widget(findChild_Widget(d, "prefs.imageloadscroll"))); |
1327 | postCommandf_App("hidetoolbarscroll arg:%d", | ||
1328 | isSelected_Widget(findChild_Widget(d, "prefs.hidetoolbarscroll"))); | ||
1314 | postCommandf_App("ostheme arg:%d", | 1329 | postCommandf_App("ostheme arg:%d", |
1315 | isSelected_Widget(findChild_Widget(d, "prefs.ostheme"))); | 1330 | isSelected_Widget(findChild_Widget(d, "prefs.ostheme"))); |
1316 | postCommandf_App("decodeurls arg:%d", | 1331 | postCommandf_App("decodeurls arg:%d", |
@@ -1592,6 +1607,13 @@ iBool handleCommand_App(const char *cmd) { | |||
1592 | d->prefs.loadImageInsteadOfScrolling = arg_Command(cmd); | 1607 | d->prefs.loadImageInsteadOfScrolling = arg_Command(cmd); |
1593 | return iTrue; | 1608 | return iTrue; |
1594 | } | 1609 | } |
1610 | else if (equal_Command(cmd, "hidetoolbarscroll")) { | ||
1611 | d->prefs.hideToolbarOnScroll = arg_Command(cmd); | ||
1612 | if (!d->prefs.hideToolbarOnScroll) { | ||
1613 | showToolbars_Window(d->window, iTrue); | ||
1614 | } | ||
1615 | return iTrue; | ||
1616 | } | ||
1595 | else if (equal_Command(cmd, "theme.set")) { | 1617 | else if (equal_Command(cmd, "theme.set")) { |
1596 | const int isAuto = argLabel_Command(cmd, "auto"); | 1618 | const int isAuto = argLabel_Command(cmd, "auto"); |
1597 | d->prefs.theme = arg_Command(cmd); | 1619 | d->prefs.theme = arg_Command(cmd); |
@@ -1864,6 +1886,7 @@ iBool handleCommand_App(const char *cmd) { | |||
1864 | setToggle_Widget(findChild_Widget(dlg, "prefs.hoverlink"), d->prefs.hoverLink); | 1886 | setToggle_Widget(findChild_Widget(dlg, "prefs.hoverlink"), d->prefs.hoverLink); |
1865 | setToggle_Widget(findChild_Widget(dlg, "prefs.smoothscroll"), d->prefs.smoothScrolling); | 1887 | setToggle_Widget(findChild_Widget(dlg, "prefs.smoothscroll"), d->prefs.smoothScrolling); |
1866 | setToggle_Widget(findChild_Widget(dlg, "prefs.imageloadscroll"), d->prefs.loadImageInsteadOfScrolling); | 1888 | setToggle_Widget(findChild_Widget(dlg, "prefs.imageloadscroll"), d->prefs.loadImageInsteadOfScrolling); |
1889 | setToggle_Widget(findChild_Widget(dlg, "prefs.hidetoolbarscroll"), d->prefs.hideToolbarOnScroll); | ||
1867 | setToggle_Widget(findChild_Widget(dlg, "prefs.ostheme"), d->prefs.useSystemTheme); | 1890 | setToggle_Widget(findChild_Widget(dlg, "prefs.ostheme"), d->prefs.useSystemTheme); |
1868 | setToggle_Widget(findChild_Widget(dlg, "prefs.customframe"), d->prefs.customFrame); | 1891 | setToggle_Widget(findChild_Widget(dlg, "prefs.customframe"), d->prefs.customFrame); |
1869 | setToggle_Widget(findChild_Widget(dlg, "prefs.retainwindow"), d->prefs.retainWindowSize); | 1892 | setToggle_Widget(findChild_Widget(dlg, "prefs.retainwindow"), d->prefs.retainWindowSize); |