prl wrote: ↑Tue Aug 28, 2018 12:43
I doubt it would be much of a performance hit. I can elaborate when you start a new topic.
Instead of elaboration, here's an implementation, but not of the tagging of the path in the screen title. That can be done with a similar test to the icon, but elsewhere in the code.
- Screen Shot 2018-08-29 at 10.37.49.png (66.83 KiB) Viewed 834 times
Code: Select all
diff --git a/lib/python/Components/MovieList.py b/lib/python/Components/MovieList.py
index 63a14f6..91e8ab9 100644
--- a/lib/python/Components/MovieList.py
+++ b/lib/python/Components/MovieList.py
@@ -260,6 +260,7 @@ class MovieList(GUIComponent):
self.iconUnwatched = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/part_unwatched.png"))
self.iconFolder = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/folder.png"))
self.iconTrash = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/trashcan.png"))
+ self.iconBookmark = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/bookmark.png"))
self.runningTimers = {}
self.updateRecordings()
self.updatePlayPosCache()
@@ -572,6 +573,8 @@ class MovieList(GUIComponent):
res.append(MultiContentEntryText(pos=(width - dateWidth - r, 0), size=(dateWidth, ih), font=1, flags=RT_HALIGN_RIGHT | RT_VALIGN_CENTER, text=_"Trash")))
return res
res.append(MultiContentEntryPixmapAlphaBlend(pos=(iconPos, self.dirShift), size=(iconSize, iconSize), png=self.iconFolder))
+ if pathName in config.movielist.videodirs.value:
+ res.append(MultiContentEntryPixmapAlphaBlend(pos=(iconPos, self.dirShift), size=(iconSize, iconSize), png=self.iconBookmark))
res.append(MultiContentEntryText(pos=(textPos, 0), size=(width - textPos - dateWidth - r, ih), font=0, flags = RT_HALIGN_LEFT | RT_VALIGN_CENTER, text=xt))
res.append(MultiContentEntryText(pos=(width - dateWidth - r, 0), size=(dateWidth, ih), font=1, flags=RT_HALIGN_RIGHT | RT_VALIGN_CENTER, text=_("Directry")))
return res
The code puts a bookmark icon on ".." if that directory is bookmarked, but not on the trashcan, even if it is bookmarked. The trashcan can be easily bookmarked if wanted, either with the same bookmark icon or one designed to go with the Trash icon.
The bookmark icon I've created is pretty rubbish. If someone wants to make a better one I'd be happy to use it.
Here's the bookmark icon I used:
- bookmark.png (258 Bytes) Viewed 834 times