summaryrefslogtreecommitdiff
path: root/src/faces
diff options
context:
space:
mode:
Diffstat (limited to 'src/faces')
-rw-r--r--src/faces/Face.vala3
-rw-r--r--src/faces/FaceLocation.vala4
-rw-r--r--src/faces/FacePage.vala4
-rw-r--r--src/faces/FaceShape.vala4
-rw-r--r--src/faces/Faces.vala20
-rw-r--r--src/faces/FacesBranch.vala4
-rw-r--r--src/faces/FacesTool.vala13
7 files changed, 7 insertions, 45 deletions
diff --git a/src/faces/Face.vala b/src/faces/Face.vala
index 9be33c9..9304023 100644
--- a/src/faces/Face.vala
+++ b/src/faces/Face.vala
@@ -4,7 +4,6 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
-#if ENABLE_FACES
public class FaceSourceCollection : ContainerSourceCollection {
private Gee.HashMap<string, Face> name_map = new Gee.HashMap<string, Face>
((Gee.HashDataFunc)Face.hash_name_string, (Gee.EqualDataFunc)Face.equal_name_strings);
@@ -677,5 +676,3 @@ public class Face : DataSource, ContainerSource, Proxyable, Indexable {
base.destroy();
}
}
-
-#endif
diff --git a/src/faces/FaceLocation.vala b/src/faces/FaceLocation.vala
index cc5c4cf..e143b2e 100644
--- a/src/faces/FaceLocation.vala
+++ b/src/faces/FaceLocation.vala
@@ -4,8 +4,6 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
-#if ENABLE_FACES
-
public class FaceLocation : Object {
private static Gee.Map<FaceID?, Gee.Map<PhotoID?, FaceLocation>> face_photos_map;
@@ -205,5 +203,3 @@ public class FaceLocation : Object {
this.geometry = geometry;
}
}
-
-#endif
diff --git a/src/faces/FacePage.vala b/src/faces/FacePage.vala
index 41d1cef..f2512d5 100644
--- a/src/faces/FacePage.vala
+++ b/src/faces/FacePage.vala
@@ -4,8 +4,6 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
-#if ENABLE_FACES
-
public class FacePage : CollectionPage {
private Face face;
@@ -123,5 +121,3 @@ public class FacePage : CollectionPage {
}
}
}
-
-#endif
diff --git a/src/faces/FaceShape.vala b/src/faces/FaceShape.vala
index 21e85a9..1ff01fd 100644
--- a/src/faces/FaceShape.vala
+++ b/src/faces/FaceShape.vala
@@ -4,8 +4,6 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
-#if ENABLE_FACES
-
public abstract class FaceShape : Object {
public const string SHAPE_TYPE = null;
@@ -779,5 +777,3 @@ public class FaceRectangle : FaceShape {
return Math.sqrt((center_x - x) * (center_x - x) + (center_y - y) * (center_y - y));
}
}
-
-#endif
diff --git a/src/faces/Faces.vala b/src/faces/Faces.vala
index 3f0623a..595c3b6 100644
--- a/src/faces/Faces.vala
+++ b/src/faces/Faces.vala
@@ -4,8 +4,6 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
-#if ENABLE_FACES
-
namespace Faces {
public void init() throws Error {
@@ -17,21 +15,3 @@ public void terminate() {
}
}
-
-#else
-
-namespace Faces {
-
-public void init() throws Error {
- // do nothing; this method is here only
- // to make the unitizing mechanism happy
-}
-
-public void terminate() {
- // do nothing; this method is here only
- // to make the unitizing mechanism happy
-}
-
-}
-
-#endif
diff --git a/src/faces/FacesBranch.vala b/src/faces/FacesBranch.vala
index 1eb25cf..42fd921 100644
--- a/src/faces/FacesBranch.vala
+++ b/src/faces/FacesBranch.vala
@@ -4,8 +4,6 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
-#if ENABLE_FACES
-
public class Faces.Branch : Sidebar.Branch {
private Gee.HashMap<Face, Faces.SidebarEntry> entry_map = new Gee.HashMap<Face, Faces.SidebarEntry>();
@@ -142,5 +140,3 @@ public class Faces.SidebarEntry : Sidebar.SimplePageEntry, Sidebar.RenameableEnt
AppWindow.get_command_manager().execute(new DeleteFaceCommand(face));
}
}
-
-#endif
diff --git a/src/faces/FacesTool.vala b/src/faces/FacesTool.vala
index cf53736..9803787 100644
--- a/src/faces/FacesTool.vala
+++ b/src/faces/FacesTool.vala
@@ -4,7 +4,6 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
-#if ENABLE_FACES
public errordomain FaceShapeError {
CANT_CREATE
}
@@ -155,7 +154,9 @@ public class FacesTool : EditingTools.EditingTool {
help_layout.pack_start(help_text, true);
response_layout = new Gtk.Box(Gtk.Orientation.HORIZONTAL, CONTROL_SPACING);
+ #if ENABLE_FACE_DETECTION
response_layout.add(detection_button);
+ #endif
response_layout.add(cancel_button);
response_layout.add(ok_button);
@@ -348,10 +349,12 @@ public class FacesTool : EditingTools.EditingTool {
if (line.length == 0)
continue;
+ debug("shotwell-facedetect: %s", line);
+
string[] type_and_serialized = line.split(";");
if (type_and_serialized.length != 2) {
- critical("Wrong serialized line in face detection program output.");
- assert_not_reached();
+ // Pass on external helper log output as our debug log
+ continue;
}
switch (type_and_serialized[0]) {
@@ -373,7 +376,7 @@ public class FacesTool : EditingTools.EditingTool {
assert_not_reached();
default:
- assert_not_reached();
+ break;
}
}
}
@@ -973,5 +976,3 @@ public class FacesTool : EditingTools.EditingTool {
face_detection.cancel();
}
}
-
-#endif