Cleanup
This commit is contained in:
parent
ab21d2455a
commit
d87bb3e279
|
@ -13,7 +13,6 @@ local utils = require("menubar.utils")
|
|||
local pairs = pairs
|
||||
local ipairs = ipairs
|
||||
local table = table
|
||||
local gdebug = require("gears.debug")
|
||||
local lgi = require("lgi")
|
||||
local gio = lgi.Gio
|
||||
local protected_call = require("gears.protected_call")
|
||||
|
@ -146,8 +145,6 @@ function menu_gen.generate(callback)
|
|||
{ name = name, cmdline = cmdline, icon = icon, category = target_category }
|
||||
)
|
||||
unique_entries[unique_key] = true
|
||||
else
|
||||
gdebug.dump(entry, "entry not included")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -382,11 +382,11 @@ function utils.parse_dir(dir_path, callback)
|
|||
end
|
||||
|
||||
local result = {}
|
||||
local f = gio.File.new_for_path(dir_path)
|
||||
parser(f, result)
|
||||
local dir = gio.File.new_for_path(dir_path)
|
||||
parser(dir, result)
|
||||
for i, entry in ipairs(result) do
|
||||
local target = gio.File.new_for_path(entry.file)
|
||||
local relative_path = f:get_relative_path(target)
|
||||
local desktop_file = gio.File.new_for_path(entry.file)
|
||||
local relative_path = dir:get_relative_path(desktop_file)
|
||||
entry.desktop_file_id = string.gsub(relative_path, "/", "-")
|
||||
result[i] = entry
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue