Merge pull request #471 from mphe/fs_async_fix

Run fs widget update asynchronously
This commit is contained in:
Luca CPZ 2020-11-27 12:18:37 +00:00 committed by GitHub
commit ca49917f4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,7 +68,7 @@ local function factory(args)
} }
end end
function fs.update() local function update_synced()
local pathlen = 10 local pathlen = 10
fs_now = {} fs_now = {}
@ -131,6 +131,10 @@ local function factory(args)
fs.notification_preset.text = tconcat(notifytable) fs.notification_preset.text = tconcat(notifytable)
end end
function fs.update()
Gio.Async.start(update_synced)()
end
if showpopup == "on" then if showpopup == "on" then
fs.widget:connect_signal('mouse::enter', function () fs.show(0) end) fs.widget:connect_signal('mouse::enter', function () fs.show(0) end)
fs.widget:connect_signal('mouse::leave', function () fs.hide() end) fs.widget:connect_signal('mouse::leave', function () fs.hide() end)