From 547b810eea19b0c72731e30ca3e2e339593c1833 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 12 Jul 2026 17:30:26 +0300 Subject: skeleton: GtkApplication, window, GSettings schema, desktop, tests (ft0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit M0 (task ft0): the app shell — no feature views yet (those are M1 large, M7 grid). - src/main.c: g_application_run + --version via handle-local-options (--help is GApplication's own); exits before activate so --version works headless. - src/app.{c,h}: GgazeApp : AdwApplication : GtkApplication (libadwaita styling, decision #29), single-instance (decision #32), G_APPLICATION_HANDLES_OPEN; activate + open reuse the active window (replace-on-new-open); ggaze_window_open remembers the GFile. - src/window.{c,h}: GgazeWindow : GtkApplicationWindow with AdwHeaderBar and a GtkStack (children 'grid'/'large', default 'grid'); dispose clears the file. - data/org.buetow.ggaze.desktop (image/* MIME, validated) and data/org.buetow.ggaze.gschema.xml (all keys + defaults, --strict clean). - meson: libggaze static lib shared by the executable and tests; install to bindir/applications/glib-2.0 schemas; gnome.post_install compiles schemas + updates desktop db. - tests: unit test_app (--version/--help/unknown via subprocess), integration test_window (offscreen stack checks + open-titles), bootstrap. 3/3 green. - docs/tech-stack.md: window-geometry shape corrected to (width,height, fullscreen,maximized) to match the schema. --- data/.gitkeep | 0 data/meson.build | 15 ++++++ data/org.buetow.ggaze.desktop | 13 +++++ data/org.buetow.ggaze.gschema.xml | 106 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 134 insertions(+) delete mode 100644 data/.gitkeep create mode 100644 data/meson.build create mode 100644 data/org.buetow.ggaze.desktop create mode 100644 data/org.buetow.ggaze.gschema.xml (limited to 'data') diff --git a/data/.gitkeep b/data/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 0000000..c12b619 --- /dev/null +++ b/data/meson.build @@ -0,0 +1,15 @@ +# ggaze data: .desktop entry + GSettings schema. Full AppStream/icon install +# lands in M10; this wires the basics so `meson install` lays out the app and +# compiles the schema. gnome.post_install also refreshes the desktop database. + +install_data('org.buetow.ggaze.desktop', + install_dir : join_paths(get_option('datadir'), 'applications')) + +install_data('org.buetow.ggaze.gschema.xml', + install_dir : join_paths(get_option('datadir'), 'glib-2.0', 'schemas')) + +gnome = import('gnome') +gnome.post_install( + glib_compile_schemas : true, + update_desktop_database : true, +) \ No newline at end of file diff --git a/data/org.buetow.ggaze.desktop b/data/org.buetow.ggaze.desktop new file mode 100644 index 0000000..c5c31d0 --- /dev/null +++ b/data/org.buetow.ggaze.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Application +Name=ggaze +GenericName=Image Viewer +Comment=Fast native image viewer for culling camera shoots +# M0 stub; full MIME/keywords/AppStream wiring lands in M10. +Exec=ggaze %f +Icon=ggaze +Terminal=false +StartupNotify=true +Categories=Graphics;Viewer;Photography; +MimeType=image/png;image/jpeg;image/gif;image/webp;image/tiff;image/avif;image/heif;image/heic;image/jxl; +Keywords=image;viewer;photo;camera;culling; \ No newline at end of file diff --git a/data/org.buetow.ggaze.gschema.xml b/data/org.buetow.ggaze.gschema.xml new file mode 100644 index 0000000..70ddfa4 --- /dev/null +++ b/data/org.buetow.ggaze.gschema.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 'name' + Sort order + Sort the folder by name, EXIF capture time, or size. + + + + true + Wrap at folder ends + Wrap prev/next at the first/last image. + + + + 'dark' + Viewer background + Background behind the image in large view. + + + + 'zoom' + Scroll behavior + What the mouse scroll wheel does in large view. + + + + 3.0 + Slideshow delay + Seconds between slides in slideshow mode. + + + + 128 + Grid thumbnail size + Pixel size of grid thumbnails (resizable via +/-). + + + + false + Hide trashed items + Hide ./Trash/deleted items from the grid entirely. + + + + (800, 600, 0, false) + Window geometry + (width, height, fullscreen, maximized) restored on launch. + + + + [] + Move destinations + Ordered (name, path) pairs for the `m` move popup; order = hotkey order. + + + + [] + External editors + Ordered (name, command) pairs for the `e` open-in popup; %f = current file. + + + + [] + Shell scripts + Ordered (name, command) pairs for the `!` run-script popup; %f/%d expanded, run via /bin/sh -c. + + + + [] + Enhance presets + Ordered (name, gegl-graph) pairs for the `a` enhance popup (GEGL only). + + + \ No newline at end of file -- cgit v1.2.3