Module ui.downloadmgr

This module displays a PathChooser widget to choose a download directory.

It can be used as a callback on a button or menu item.

Example:

callback = function()
    require("ui/downloadmgr"):new{
        title = _("Choose download directory"),
        onConfirm = function(path)
            logger.dbg("set download directory to", path)
            G_reader_settings:saveSetting("download_dir", path)
            UIManager:nextTick(function()
                -- reinitialize dialog
            end)
        end,
    }:chooseDir()
end

Functions

DownloadMgr:chooseDir (dir) Displays a PathChooser widget for picking a (download) directory.


Functions

DownloadMgr:chooseDir (dir)
Displays a PathChooser widget for picking a (download) directory.

Parameters:

  • dir

Returns:

    string path chosen by the user
generated by LDoc 1.5.0 Last updated 2024-12-19 07:44:17