summaryrefslogtreecommitdiff
path: root/src/searches
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-05-23 07:44:24 +0200
committerJörg Frings-Fürst <debian@jff.email>2022-05-23 07:44:24 +0200
commitbeb8b0dad71871aa66b63901b3e6b6c047e1a646 (patch)
treef96b49e7dabca98306db6cf716592c62adcc9b77 /src/searches
parent2861a48339aa0756131008dfaf399426c97de34b (diff)
parent08f04632f65e109dae9bd554621e33454adacf41 (diff)
Merge branch 'release/debian/0.30.16-1'debian/0.30.16-1
Diffstat (limited to 'src/searches')
-rw-r--r--src/searches/SavedSearchDialog.vala2
-rw-r--r--src/searches/SearchBoolean.vala18
2 files changed, 6 insertions, 14 deletions
diff --git a/src/searches/SavedSearchDialog.vala b/src/searches/SavedSearchDialog.vala
index f5558bf..526da35 100644
--- a/src/searches/SavedSearchDialog.vala
+++ b/src/searches/SavedSearchDialog.vala
@@ -79,9 +79,7 @@ public class SavedSearchDialog : Gtk.Dialog {
case SearchCondition.SearchType.ANY_TEXT:
case SearchCondition.SearchType.EVENT_NAME:
case SearchCondition.SearchType.FILE_NAME:
-#if ENABLE_FACES
case SearchCondition.SearchType.FACE:
-#endif
case SearchCondition.SearchType.TAG:
case SearchCondition.SearchType.COMMENT:
case SearchCondition.SearchType.TITLE:
diff --git a/src/searches/SearchBoolean.vala b/src/searches/SearchBoolean.vala
index 2be8302..5e69e57 100644
--- a/src/searches/SearchBoolean.vala
+++ b/src/searches/SearchBoolean.vala
@@ -52,9 +52,7 @@ public abstract class SearchCondition {
TAG,
EVENT_NAME,
FILE_NAME,
-#if ENABLE_FACES
FACE,
-#endif
MEDIA_TYPE,
FLAG_STATE,
MODIFIED_STATE,
@@ -65,9 +63,7 @@ public abstract class SearchCondition {
public static SearchType[] as_array() {
return { ANY_TEXT, TITLE, TAG, COMMENT, EVENT_NAME, FILE_NAME,
-#if ENABLE_FACES
FACE,
-#endif
MEDIA_TYPE, FLAG_STATE, MODIFIED_STATE, RATING, DATE };
}
@@ -98,10 +94,10 @@ public abstract class SearchCondition {
case SearchType.FILE_NAME:
return "FILE_NAME";
-#if ENABLE_FACES
+
case SearchType.FACE:
return "FACE";
-#endif
+
case SearchType.MEDIA_TYPE:
return "MEDIA_TYPE";
@@ -140,10 +136,10 @@ public abstract class SearchCondition {
else if (str == "FILE_NAME")
return SearchType.FILE_NAME;
-#if ENABLE_FACES
+
else if (str == "FACE")
return SearchType.FACE;
-#endif
+
else if (str == "MEDIA_TYPE")
return SearchType.MEDIA_TYPE;
@@ -182,10 +178,10 @@ public abstract class SearchCondition {
case SearchType.FILE_NAME:
return _("File name");
-#if ENABLE_FACES
+
case SearchType.FACE:
return _("Face");
-#endif
+
case SearchType.MEDIA_TYPE:
return _("Media type");
@@ -361,7 +357,6 @@ public class SearchConditionText : SearchCondition {
ret |= string_match(text, String.remove_diacritics(source.get_basename().down()));
}
-#if ENABLE_FACES
if (SearchType.ANY_TEXT == search_type || SearchType.FACE == search_type) {
Gee.List<Face>? face_list = Face.global.fetch_for_source(source);
if (null != face_list) {
@@ -372,7 +367,6 @@ public class SearchConditionText : SearchCondition {
ret |= string_match(text, null); // for IS_NOT_SET
}
}
-#endif
return (context == Context.DOES_NOT_CONTAIN) ? !ret : ret;
}