1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-04 04:42:05 -04:00

core: add DL helper, apply to TrackArt OSD, DankLocationSearch

- unrelated change to add gsettingsOrDconf helpers
This commit is contained in:
bbedward
2026-02-10 15:42:40 -05:00
parent 2c360dc3e8
commit c783ff3dcf
12 changed files with 319 additions and 139 deletions

View File

@@ -853,7 +853,8 @@ Item {
icon: "folder",
priority: 4,
items: fileItems,
collapsed: collapsedSections["files"] || false
collapsed: collapsedSections["files"] || false,
flatStartIndex: 0
};
var newSections;
@@ -1284,7 +1285,11 @@ Item {
},
actions: [],
primaryAction: null,
_diskCached: true
_diskCached: true,
_hName: "",
_hSub: "",
_hRich: false,
_preScored: undefined
});
}
sectionsData.push({
@@ -1293,7 +1298,8 @@ Item {
icon: s.icon || "",
priority: s.priority || 0,
items: items,
collapsed: false
collapsed: false,
flatStartIndex: 0
});
}
return sectionsData;

View File

@@ -1,6 +1,6 @@
.pragma library
.import "ControllerUtils.js" as Utils
.import "ControllerUtils.js" as Utils
function transformApp(app, override, defaultActions, primaryActionLabel) {
var appId = app.id || app.execString || app.exec || "";
@@ -31,7 +31,11 @@ function transformApp(app, override, defaultActions, primaryActionLabel) {
name: primaryActionLabel,
icon: "open_in_new",
action: "launch"
}
},
_hName: "",
_hSub: "",
_hRich: false,
_preScored: undefined
};
}
@@ -66,7 +70,11 @@ function transformCoreApp(app, openLabel) {
name: openLabel,
icon: "open_in_new",
action: "launch"
}
},
_hName: "",
_hSub: "",
_hRich: false,
_preScored: undefined
};
}
@@ -100,7 +108,11 @@ function transformBuiltInLauncherItem(item, pluginId, openLabel) {
name: openLabel,
icon: "open_in_new",
action: "execute"
}
},
_hName: "",
_hSub: "",
_hRich: false,
_preScored: undefined
};
}
@@ -133,7 +145,11 @@ function transformFileResult(file, openLabel, openFolderLabel, copyPathLabel) {
name: openLabel,
icon: "open_in_new",
action: "open"
}
},
_hName: "",
_hSub: "",
_hRich: false,
_preScored: undefined
};
}
@@ -166,7 +182,11 @@ function transformPluginItem(item, pluginId, selectLabel) {
name: selectLabel,
icon: "check",
action: "execute"
}
},
_hName: "",
_hSub: "",
_hRich: false,
_preScored: undefined
};
}
@@ -188,7 +208,11 @@ function createCalculatorItem(calc, query, copyLabel) {
name: copyLabel,
icon: "content_copy",
action: "copy"
}
},
_hName: "",
_hSub: "",
_hRich: false,
_preScored: undefined
};
}
@@ -218,6 +242,10 @@ function createPluginBrowseItem(pluginId, plugin, trigger, isBuiltIn, isAllowed,
name: browseLabel,
icon: "arrow_forward",
action: "browse_plugin"
}
},
_hName: "",
_hSub: "",
_hRich: false,
_preScored: undefined
};
}

View File

@@ -187,7 +187,8 @@ function groupBySection(scoredItems, sectionOrder, sortAlphabetically, maxPerSec
icon: sectionOrder[i].icon,
priority: sectionOrder[i].priority,
items: [],
collapsed: false
collapsed: false,
flatStartIndex: 0
}
}
@@ -220,6 +221,7 @@ function groupBySection(scoredItems, sectionOrder, sortAlphabetically, maxPerSec
function flattenSections(sections) {
var flat = []
flat._sectionBounds = null
var bounds = {}
for (var i = 0; i < sections.length; i++) {