diff options
author | Gaël Bonithon <gael@xfce.org> | 2021-12-12 11:39:37 +0100 |
---|---|---|
committer | Gaël Bonithon <gael@xfce.org> | 2021-12-12 19:25:14 +0100 |
commit | 88dd43a1026d8a0c56dd1ccf3babf6f8ac275ebb (patch) | |
tree | 8b608d9ccd36e55f19df4bda27587a60081dee13 /tumblerd | |
parent | 932e2e268d94b83593d5582557b2d70973ffcb01 (diff) | |
download | tumbler-88dd43a1026d8a0c56dd1ccf3babf6f8ac275ebb.tar.gz |
Fix some priority issues
* Preserve the directory order in $XDG_DATA_DIRS and the priority of
$XDG_DATA_HOME over $XDG_DATA_DIRS for desktop thumbnailers.
* Fix some logical errors in `tumbler_registry_compare()`.
* Keep the priority of the pixbuf thumbnailer plugin higher than that of
the desktop thumbnailer plugin by default in `tumbler.rc` (it was
lowered in 6935184665902097511db1708eaaf78015ff61ac).
Diffstat (limited to 'tumblerd')
-rw-r--r-- | tumblerd/tumbler-registry.c | 9 | ||||
-rw-r--r-- | tumblerd/tumbler.rc | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/tumblerd/tumbler-registry.c b/tumblerd/tumbler-registry.c index 4e5fad1..d605190 100644 --- a/tumblerd/tumbler-registry.c +++ b/tumblerd/tumbler-registry.c @@ -179,7 +179,7 @@ tumbler_registry_compare (TumblerThumbnailer *a, /* sort by priority */ insert_a_before_b = tumbler_thumbnailer_get_priority (a) >= tumbler_thumbnailer_get_priority (b); } - else if (TUMBLER_IS_SPECIALIZED_THUMBNAILER (b)) + else { a_specialized = TUMBLER_SPECIALIZED_THUMBNAILER (a); b_specialized = TUMBLER_SPECIALIZED_THUMBNAILER (b); @@ -195,8 +195,8 @@ tumbler_registry_compare (TumblerThumbnailer *a, } else { - b_modified = tumbler_specialized_thumbnailer_get_modified (a_specialized); a_modified = tumbler_specialized_thumbnailer_get_modified (a_specialized); + b_modified = tumbler_specialized_thumbnailer_get_modified (b_specialized); if (a_modified > b_modified) { @@ -206,11 +206,6 @@ tumbler_registry_compare (TumblerThumbnailer *a, } } } - else - { - /* we have no other thumbnailer types at the moment */ - g_assert_not_reached (); - } return insert_a_before_b ? -1 : 1; } diff --git a/tumblerd/tumbler.rc b/tumblerd/tumbler.rc index 425e783..b13814d 100644 --- a/tumblerd/tumbler.rc +++ b/tumblerd/tumbler.rc @@ -37,7 +37,7 @@ MaxFileSize=209715200 # broken, hence the priority) [RawThumbnailer] Disabled=false -Priority=2 +Priority=3 Locations= Excludes= MaxFileSize=209715200 @@ -45,7 +45,7 @@ MaxFileSize=209715200 # Supports all type GdkPixbuf supports [PixbufThumbnailer] Disabled=false -Priority=1 +Priority=2 Locations= Excludes= MaxFileSize=209715200 |