Remove dead code
This commit is contained in:
+10
-13
@@ -222,6 +222,14 @@ Item {
|
||||
return index === -1 ? [] : entries.slice(index + 1)
|
||||
}
|
||||
|
||||
function canonicalWidgetId(name) {
|
||||
switch (String(name)) {
|
||||
case "idle": return "idleInhibitor"
|
||||
case "weatherFlyout": return "weather"
|
||||
default: return String(name)
|
||||
}
|
||||
}
|
||||
|
||||
function builtinModuleComponent(name) {
|
||||
switch (String(name)) {
|
||||
case "omarchy": return omarchyModuleComponent
|
||||
@@ -459,18 +467,6 @@ Item {
|
||||
return ids
|
||||
}
|
||||
|
||||
function activeTrayItemCount() {
|
||||
var count = 0
|
||||
var values = SystemTray.items.values
|
||||
|
||||
for (var i = 0; i < values.length; i++) {
|
||||
if (values[i].status !== Status.Passive)
|
||||
count++
|
||||
}
|
||||
|
||||
return count
|
||||
}
|
||||
|
||||
function trayIconSource(icon) {
|
||||
var value = String(icon || "")
|
||||
var marker = "?path="
|
||||
@@ -939,7 +935,8 @@ Item {
|
||||
readonly property var registryComponent: {
|
||||
var w = root.barWidgetRegistry.widgets
|
||||
if (customType || builtinComponent) return null
|
||||
return w[moduleName] ? w[moduleName].component : null
|
||||
var registryName = root.canonicalWidgetId(moduleName)
|
||||
return w[registryName] ? w[registryName].component : null
|
||||
}
|
||||
readonly property bool qmlCustom: customType === "qml"
|
||||
readonly property bool commandCustom: customType === "command"
|
||||
|
||||
Reference in New Issue
Block a user