List recently opened projects under Open Recent

Projects opened or saved go into GTK's shared recent list, signed with the
effector application name, and the project menu lists the newest ten of
them. The GUI tests point XDG_DATA_HOME at a temporary folder so they leave
the user's own list alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Si
2026-09-24 01:07:08 +02:00
co-authored by Claude Opus 5.5
parent 9fb4428a3b
commit 431fcf9c58
4 changed files with 164 additions and 2 deletions
+7
View File
@@ -113,6 +113,11 @@ private:
void clearSources();
void onNewProject();
void onOpenProject();
void openProject(const std::string& path);
// Open Recent: the projects this program opened or saved, newest first,
// kept in the desktop's shared list of recently used files.
void rememberProject(const std::string& path);
void rebuildRecentMenu();
void onProjectChosen(const Glib::RefPtr<Gio::AsyncResult>& result,
const Glib::RefPtr<Gtk::FileDialog>& dialog);
void onSaveProject(); // falls back to Save As while the project is untitled
@@ -167,6 +172,8 @@ private:
Image result_;
std::uint64_t seed_ = 0;
std::string projectPath_; // empty until the project has been saved once
Glib::RefPtr<Gio::Menu> recentMenu_;
sigc::connection recentChanged_; // the recent list outlives the window
bool suspendRender_ = true;
// Source loading. Decoding a batch of large photographs takes seconds, so