summaryrefslogtreecommitdiff
path: root/src/SearchFilter.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/SearchFilter.vala')
-rw-r--r--src/SearchFilter.vala14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/SearchFilter.vala b/src/SearchFilter.vala
index ad8b7ec..969591f 100644
--- a/src/SearchFilter.vala
+++ b/src/SearchFilter.vala
@@ -148,7 +148,7 @@ public abstract class SearchViewFilter : ViewFilter {
}
public void set_search_filter(string? text) {
- search_filter = !is_string_empty(text) ? text.down() : null;
+ search_filter = !is_string_empty(text) ? String.remove_diacritics(text.down()) : null;
search_filter_words = search_filter != null ? search_filter.split(" ") : null;
}
@@ -775,12 +775,13 @@ public class SearchFilterToolbar : Gtk.Revealer {
switch (filter) {
case RatingFilter.REJECTED_OR_HIGHER:
- icon = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
+ var box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
var image = new Gtk.Image.from_icon_name ("emblem-photos-symbolic", Gtk.IconSize.SMALL_TOOLBAR);
image.margin_end = 2;
- (icon as Gtk.Box).pack_start(image);
+ box.pack_start(image);
image = new Gtk.Image.from_icon_name ("window-close-symbolic", Gtk.IconSize.SMALL_TOOLBAR);
- (icon as Gtk.Box).pack_start(image);
+ box.pack_start(image);
+ icon = box;
icon.show_all();
break;
@@ -1015,7 +1016,8 @@ public class SearchFilterToolbar : Gtk.Revealer {
}
private SavedSearch get_search(Gtk.ListBoxRow row) {
- DataButton button = (row.get_children().first().data as Gtk.Box).get_children().last().data as DataButton;
+ var box = (Gtk.Box) row.get_children().first().data;
+ DataButton button = box.get_children().last().data as DataButton;
return button.search;
}
@@ -1191,7 +1193,7 @@ public class SearchFilterToolbar : Gtk.Revealer {
bool has_flagged) {
if (has_photos || has_raw)
// As a user, I would expect, that a raw photo is still a photo.
- // Let's enable the photo button even if there ar only raw photos.
+ // Let's enable the photo button even if there are only raw photos.
toolbtn_photos.set_icon_name("filter-photos-symbolic");
else
toolbtn_photos.set_icon_name("filter-photos-disabled-symbolic");