[shotwell/wip/gtk4: 47/88] Add Events Branch
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/wip/gtk4: 47/88] Add Events Branch
- Date: Mon, 30 May 2022 17:34:43 +0000 (UTC)
commit def47ec06cfcc2093869f77a418a509930e50754
Author: Jens Georg <mail jensge org>
Date: Sun Apr 10 11:52:09 2022 +0200
Add Events Branch
src/events/Events.vala | 4 ++--
src/events/EventsBranch.vala | 2 ++
src/library/LibraryWindow.vala | 16 +++++++---------
src/meson.build | 13 +++++++------
4 files changed, 18 insertions(+), 17 deletions(-)
---
diff --git a/src/events/Events.vala b/src/events/Events.vala
index 9333b214..1cc3fd20 100644
--- a/src/events/Events.vala
+++ b/src/events/Events.vala
@@ -7,11 +7,11 @@
namespace Events {
public void init() throws Error {
- //Events.Branch.init();
+ Events.Branch.init();
}
public void terminate() {
- //Events.Branch.terminate();
+ Events.Branch.terminate();
}
}
diff --git a/src/events/EventsBranch.vala b/src/events/EventsBranch.vala
index 097a6640..7a04dc5b 100644
--- a/src/events/EventsBranch.vala
+++ b/src/events/EventsBranch.vala
@@ -506,9 +506,11 @@ public class Events.EventEntry : Sidebar.SimplePageEntry, Sidebar.RenameableEntr
return true;
}
+ #if 0
public bool internal_drop_received_arbitrary(Gtk.SelectionData data) {
return false;
}
+ #endif
}
diff --git a/src/library/LibraryWindow.vala b/src/library/LibraryWindow.vala
index 6dee3e3b..15df5441 100644
--- a/src/library/LibraryWindow.vala
+++ b/src/library/LibraryWindow.vala
@@ -108,10 +108,10 @@ public class LibraryWindow : AppWindow {
private Sidebar.Tree sidebar_tree;
private Library.Branch library_branch = new Library.Branch();
private Tags.Branch tags_branch = new Tags.Branch();
+ private Events.Branch events_branch = new Events.Branch();
#if DOES_NOT_WORK_WITH_GTK4
private Folders.Branch folders_branch = new Folders.Branch();
private Faces.Branch faces_branch = new Faces.Branch();
- private Events.Branch events_branch = new Events.Branch();
private Camera.Branch camera_branch = new Camera.Branch();
private Searches.Branch saved_search_branch = new Searches.Branch();
private ImportRoll.Branch import_roll_branch = new ImportRoll.Branch();
@@ -165,9 +165,11 @@ public class LibraryWindow : AppWindow {
sidebar_tree.graft(folders_branch, SidebarRootPosition.FOLDERS);
#if ENABLE_FACES
sidebar_tree.graft(faces_branch, SidebarRootPosition.FACES);
+#endif
#endif
sidebar_tree.graft(events_branch, SidebarRootPosition.EVENTS);
+ #if 0
sidebar_tree.graft(camera_branch, SidebarRootPosition.CAMERAS);
sidebar_tree.graft(saved_search_branch, SidebarRootPosition.SAVED_SEARCH);
sidebar_tree.graft(import_roll_branch, SidebarRootPosition.IMPORT_ROLL);
@@ -389,13 +391,11 @@ public class LibraryWindow : AppWindow {
}
public void rename_event_in_sidebar(Event event) {
- #if 0
Events.EventEntry? entry = events_branch.get_entry_for_event(event);
if (entry != null)
sidebar_tree.rename_entry_in_place(entry);
else
debug("No event entry found for rename");
- #endif
}
public void rename_search_in_sidebar(SavedSearch search) {
@@ -469,7 +469,6 @@ public class LibraryWindow : AppWindow {
if (event == null)
return false;
-#if 0
Events.EventEntry? entry = events_branch.get_entry_for_event(event);
if (entry == null)
return false;
@@ -481,7 +480,6 @@ public class LibraryWindow : AppWindow {
start = photo;
view_collection = null;
- #endif
return false;
}
@@ -933,9 +931,9 @@ public class LibraryWindow : AppWindow {
}
public void switch_to_event(Event event) {
- //Events.EventEntry? entry = events_branch.get_entry_for_event(event);
- //if (entry != null)
- // switch_to_page(entry.get_page());
+ Events.EventEntry? entry = events_branch.get_entry_for_event(event);
+ if (entry != null)
+ switch_to_page(entry.get_page());
}
public void switch_to_tag(Tag tag) {
@@ -1304,6 +1302,7 @@ public class LibraryWindow : AppWindow {
return;
}
+ #endif
// Event page -> Events (master event directory)
if (selectable is Events.EventEntry && events_branch.get_show_branch()) {
@@ -1318,7 +1317,6 @@ public class LibraryWindow : AppWindow {
return;
}
- #endif
// basic all-around default: jump to the Library page
switch_to_page(library_branch.photos_entry.get_page());
diff --git a/src/meson.build b/src/meson.build
index 8711b4f9..22d7cff3 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -92,15 +92,10 @@ executable(
'publishing/PublishingUI.vala',
'publishing/PublishingPluginHost.vala',
'publishing/APIGlue.vala',
- 'sidebar/Branch.vala',
- 'sidebar/Sidebar.vala',
- 'sidebar/common.vala',
- 'sidebar/Entry.vala',
- 'sidebar/Tree.vala',
'library/BackgroundProgressBar.vala',
'library/Library.vala',
- 'library/LibraryBranch.vala',
'library/LibraryWindow.vala',
+ 'library/LibraryBranch.vala',
'library/FlaggedPage.vala',
'library/ImportQueuePage.vala',
'library/LastImportPage.vala',
@@ -128,7 +123,13 @@ executable(
'core/DataViewTypes.vala',
'core/Tracker.vala',
'core/SourceInterfaces.vala',
+ 'sidebar/Sidebar.vala',
+ 'sidebar/Branch.vala',
+ 'sidebar/Entry.vala',
+ 'sidebar/Tree.vala',
+ 'sidebar/common.vala',
'events/Events.vala',
+ 'events/EventsBranch.vala',
'events/EventsDirectoryPage.vala',
'events/EventPage.vala',
'events/EventDirectoryItem.vala',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]