From ed2b256407291d8edadfcea9380029633cc7d9d8 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Sun, 6 Dec 2020 14:47:40 -0500 Subject: fix more warnings --- gerrit-widget/gerrit.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'gerrit-widget') diff --git a/gerrit-widget/gerrit.lua b/gerrit-widget/gerrit.lua index cb1a460..682eb0f 100644 --- a/gerrit-widget/gerrit.lua +++ b/gerrit-widget/gerrit.lua @@ -33,7 +33,7 @@ local function worker(user_args) local icon = args.icons or HOME_DIR .. '/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_icon.svg' local host = args.host or naughty.notify{ - preset = naughty.config.presets.critical, + preset = naughty.config.presets.critical, title = 'Gerrit Widget', text = 'Gerrit host is unknown' } @@ -93,11 +93,12 @@ local function worker(user_args) if name_dict[user_id].username == nil then name_dict[user_id].username = '' - spawn.easy_async(string.format(GET_USER_CMD, host, user_id), function(stdout, stderr, reason, exit_code) + spawn.easy_async(string.format(GET_USER_CMD, host, user_id), function(stdout) local user = json.decode(stdout) name_dict[tonumber(user_id)].username = user.name if not gfs.file_readable(PATH_TO_AVATARS .. user_id) then - spawn.easy_async(string.format(DOWNLOAD_AVATAR_CMD, PATH_TO_AVATARS .. user_id, user.avatars[1].url)) + spawn.easy_async( + string.format(DOWNLOAD_AVATAR_CMD, PATH_TO_AVATARS .. user_id, user.avatars[1].url)) end end) return name_dict[user_id].username @@ -124,7 +125,8 @@ local function worker(user_args) naughty.notify{ icon = HOME_DIR ..'/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_icon.svg', title = 'New Incoming Review', - text = reviews[1].project .. '\n' .. get_name_by_user_id(reviews[1].owner._account_id) .. reviews[1].subject .. '\n', + text = reviews[1].project .. '\n' .. get_name_by_user_id(reviews[1].owner._account_id) .. + reviews[1].subject .. '\n', run = function() spawn.with_shell("xdg-open https://" .. host .. '/' .. reviews[1]._number) end } end @@ -174,7 +176,7 @@ local function worker(user_args) widget = wibox.container.background } - row:connect_signal("button::release", function(_, _, _, button) + row:connect_signal("button::release", function() spawn.with_shell("xdg-open " .. host .. '/' .. review._number) end) -- cgit v1.2.3