Commit d76751a3 authored by Jens B's avatar Jens B Committed by Lucas Beeler

Uses sort-by-title as a fallback when the configuration system (GSettings or...

Uses sort-by-title as a fallback when the configuration system (GSettings or GConf) gives an invalid sort criteria value. This is a major improvement over the previous behavior where Shotwell would error out and crash. Closes #6253.
parent 87fe246a
......@@ -1199,7 +1199,10 @@ public abstract class MediaPage : CheckerboardPage {
break;
default:
error("Unknown sort criteria: %s", get_menu_sort_by().to_string());
debug("Unknown sort criteria: %s", get_menu_sort_by().to_string());
comparator = Thumbnail.title_descending_comparator;
predicate = Thumbnail.title_comparator_predicate;
break;
}
get_view().set_comparator(comparator, predicate);
......@@ -1217,7 +1220,8 @@ public abstract class MediaPage : CheckerboardPage {
return "/MenuBar/ViewMenu/SortPhotos/SortByRating";
default:
error("Unknown sort criteria: %d", sort_by);
debug("Unknown sort criteria: %d", sort_by);
return "/MenuBar/ViewMenu/SortPhotos/SortByTitle";
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment