12
167
Fork
You've already forked fnott
32

Load all icon theme instances #18

Manually merged
dnkl merged 4 commits from search-all-theme-instances into master 2021年07月21日 09:47:45 +02:00
Owner
Copy link

When loading the icon themes, we scan all XDG_DATA_DIRS directories. Up until now, we've stopped scanning the XDG data dirs as soon as we found the theme we're looking for.

However, the same theme may exist in multiple XDG data dirs, and they may complement each other. In this case, loading just the first instance is wrong, and results in icons not being found.

This patch fixes this, by always searching all XDG data directories. Each theme instance is treated as a separate theme, to ensure each instance's directories are all searched before another instance's directories, when loading icons.

Closes #17

When loading the icon themes, we scan all `XDG_DATA_DIRS` directories. Up until now, we've stopped scanning the XDG data dirs as soon as we found the theme we're looking for. However, the same theme may exist in multiple XDG data dirs, and they may complement each other. In this case, loading just the first instance is wrong, and results in icons not being found. This patch fixes this, by always searching all XDG data directories. Each theme instance is treated as a separate theme, to ensure each instance's directories are all searched before another instance's directories, when loading icons. Closes #17
* Log themes loaded, and their directories
* Log theme and directories we’re going to search when loading an icon
When searching all XDG_DATA_DIRS, don’t stop after we’ve found our
first theme instance.
There may be multiple instances that complement each other, and we
want to make sure we search all of them when loading icons.
However, we treat each instance as a separate theme. I.e. each
instance is loaded into its own struct icon_theme instance.
This ensures *all* directories for a specific theme instance is
searched before directories from other theme instances are searched.
Closes #17 
dnkl manually merged commit 5690a9ce98 into master 2021年07月21日 09:47:45 +02:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/fnott!18
Reference in a new issue
dnkl/fnott
No description provided.
Delete branch "search-all-theme-instances"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?