[shotwell/wip/gtk4: 46/94] Unbreak faces build
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/wip/gtk4: 46/94] Unbreak faces build
- Date: Thu, 28 Jul 2022 21:57:35 +0000 (UTC)
commit 2bf3e42023b38996295fd9d687fe22baf90dc744
Author: Jens Georg <mail jensge org>
Date: Sun Apr 10 08:42:28 2022 +0200
Unbreak faces build
src/Dialogs.vala | 4 ++--
src/PhotoPage.vala | 11 +++++------
src/faces/FacePage.vala | 7 +++++--
src/faces/FaceShape.vala | 2 +-
src/faces/Faces.vala | 4 ++--
src/meson.build | 9 +++++----
src/util/ui.vala | 5 ++++-
7 files changed, 24 insertions(+), 18 deletions(-)
---
diff --git a/src/Dialogs.vala b/src/Dialogs.vala
index fa2766da..4a466f5c 100644
--- a/src/Dialogs.vala
+++ b/src/Dialogs.vala
@@ -51,14 +51,14 @@ public bool confirm_warn_developer_changed(int number) {
#if ENABLE_FACES
-public bool confirm_delete_face(Face face) {
+public async bool confirm_delete_face(Face face) {
int count = face.get_sources_count();
string msg = ngettext(
"This will remove the face ā%sā from one photo. Continue?",
"This will remove the face ā%sā from %d photos. Continue?",
count).printf(face.get_name(), count);
- return AppWindow.negate_affirm_question(msg, _("_Cancel"), _("_Delete"),
+ return yield AppWindow.negate_affirm_question(msg, _("_Cancel"), _("_Delete"),
Resources.DELETE_FACE_TITLE);
}
diff --git a/src/PhotoPage.vala b/src/PhotoPage.vala
index be70f123..f3e9a15e 100644
--- a/src/PhotoPage.vala
+++ b/src/PhotoPage.vala
@@ -2393,7 +2393,7 @@ public class LibraryPhotoPage : EditingHostPage {
}
#if ENABLE_FACES
- private Gtk.ToggleToolButton faces_button = null;
+ private Gtk.ToggleButton faces_button = null;
#endif
private CollectionPage? return_page = null;
private bool return_to_collection_on_release = false;
@@ -3208,21 +3208,20 @@ public class LibraryPhotoPage : EditingHostPage {
#if ENABLE_FACES
private void on_faces_toggled() {
- on_tool_button_toggled(faces_button, FacesTool.factory);
+ //on_tool_button_toggled(faces_button, FacesTool.factory);
}
protected void toggle_faces() {
faces_button.set_active(!faces_button.get_active());
}
- protected override void insert_faces_button(Gtk.Toolbar toolbar) {
- faces_button = new Gtk.ToggleToolButton();
+ protected override void insert_faces_button(Gtk.Box toolbar) {
+ faces_button = new Gtk.ToggleButton();
faces_button.set_icon_name(Resources.ICON_FACES);
faces_button.set_label(Resources.FACES_LABEL);
faces_button.set_tooltip_text(Resources.FACES_TOOLTIP);
faces_button.toggled.connect(on_faces_toggled);
- faces_button.is_important = true;
- toolbar.insert(faces_button, -1);
+ toolbar.append(faces_button);
}
#endif
}
diff --git a/src/faces/FacePage.vala b/src/faces/FacePage.vala
index d238a5ae..12e7c361 100644
--- a/src/faces/FacePage.vala
+++ b/src/faces/FacePage.vala
@@ -119,8 +119,11 @@ public class FacePage : CollectionPage {
}
private void on_delete_face() {
- if (Dialogs.confirm_delete_face(face))
- AppWindow.get_command_manager().execute(new DeleteFaceCommand(face));
+ Dialogs.confirm_delete_face.begin(face, (source, res) => {
+ if (Dialogs.confirm_delete_face.end(res)) {
+ AppWindow.get_command_manager().execute(new DeleteFaceCommand(face));
+ }
+ });
}
private void on_remove_face_from_photos() {
diff --git a/src/faces/FaceShape.vala b/src/faces/FaceShape.vala
index b65a2398..57198416 100644
--- a/src/faces/FaceShape.vala
+++ b/src/faces/FaceShape.vala
@@ -17,7 +17,7 @@ public abstract class FaceShape : Object {
public signal void delete_me_requested();
protected FacesTool.EditingFaceToolWindow face_window;
- protected Gdk.CursorType current_cursor_type = Gdk.CursorType.BOTTOM_RIGHT_CORNER;
+ protected string current_cursor_type = "se-resize";
protected EditingTools.PhotoCanvas canvas;
protected string serialized = null;
protected double[] face_vec;
diff --git a/src/faces/Faces.vala b/src/faces/Faces.vala
index 3f0623a7..839e0ac0 100644
--- a/src/faces/Faces.vala
+++ b/src/faces/Faces.vala
@@ -9,11 +9,11 @@
namespace Faces {
public void init() throws Error {
- Faces.SidebarEntry.init();
+ //Faces.SidebarEntry.init();
}
public void terminate() {
- Faces.SidebarEntry.terminate();
+ //Faces.SidebarEntry.terminate();
}
}
diff --git a/src/meson.build b/src/meson.build
index 7c5dc1c1..8711b4f9 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -23,12 +23,13 @@ face_sources = []
face_obj = ''
if get_option('face_detection')
- face_sources = ([
+ face_sources = [
'faces/FacePage.vala',
- 'faces/FaceShape.vala',
+ #'faces/FaceShape.vala',
'faces/FaceDetect.vala',
- 'faces/Faces.vala',
- 'faces/FacesTool.vala'])
+ 'faces/Faces.vala'
+ #'faces/FacesTool.vala'
+ ]
endif
shotwell_deps = [gio, gee, sqlite, gtk, sqlite, posix, gphoto2,
diff --git a/src/util/ui.vala b/src/util/ui.vala
index e5a0657c..fc96b36d 100644
--- a/src/util/ui.vala
+++ b/src/util/ui.vala
@@ -101,7 +101,8 @@ public bool has_only_key_modifier(Gdk.ModifierType field, Gdk.ModifierType mask)
}
#if ENABLE_FACES
-bool is_pointer_over(Gdk.Window window) {
+bool is_pointer_over(Gtk.Window window) {
+ #if 0
var seat = window.get_display().get_default_seat();
if (seat == null) {
debug("No seat for display");
@@ -113,6 +114,8 @@ bool is_pointer_over(Gdk.Window window) {
seat.get_pointer().get_position(null, out x, out y);
return x >= 0 && y >= 0 && x < window.get_width() && y < window.get_height();
+ #endif
+ return false;
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]