summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-07-12 17:30:26 +0300
committerPaul Buetow <paul@buetow.org>2026-07-12 17:30:26 +0300
commit547b810eea19b0c72731e30ca3e2e339593c1833 (patch)
treee19fc9308d2f93ffd1d558ec705effc6d9ffb752 /data
parent1770b12d5d95476310c27ccf39a91b5ba4a3f119 (diff)
skeleton: GtkApplication, window, GSettings schema, desktop, tests (ft0)
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.
Diffstat (limited to 'data')
-rw-r--r--data/.gitkeep0
-rw-r--r--data/meson.build15
-rw-r--r--data/org.buetow.ggaze.desktop13
-rw-r--r--data/org.buetow.ggaze.gschema.xml106
4 files changed, 134 insertions, 0 deletions
diff --git a/data/.gitkeep b/data/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/data/.gitkeep
+++ /dev/null
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ggaze GSettings schema — org.buetow.ggaze.
+
+ ALL keys are declared up front (M0) with sensible defaults so later modules
+ just read them. See docs/tech-stack.md "Settings keys" for the intended
+ semantics; consumption lands with the matching milestones.
+
+ `window-geometry` is (iiib) = (width, height, fullscreen-as-int-0/1,
+ maximized). The width/height/maximized mapping is finalized in M10; the
+ shape is fixed here so the schema is stable.
+-->
+<schemalist>
+ <enum id="org.buetow.ggaze.sort">
+ <value nick="name" value="0"/>
+ <value nick="capture-time" value="1"/>
+ <value nick="size" value="2"/>
+ </enum>
+
+ <enum id="org.buetow.ggaze.background">
+ <value nick="black" value="0"/>
+ <value nick="dark" value="1"/>
+ <value nick="grey" value="2"/>
+ <value nick="checker" value="3"/>
+ </enum>
+
+ <enum id="org.buetow.ggaze.scroll-behavior">
+ <value nick="zoom" value="0"/>
+ <value nick="pan-when-zoomed" value="1"/>
+ <value nick="navigate" value="2"/>
+ </enum>
+
+ <schema id="org.buetow.ggaze" path="/org/buetow/ggaze/">
+ <key name="sort" enum="org.buetow.ggaze.sort">
+ <default>'name'</default>
+ <summary>Sort order</summary>
+ <description>Sort the folder by name, EXIF capture time, or size.</description>
+ </key>
+
+ <key name="wrap" type="b">
+ <default>true</default>
+ <summary>Wrap at folder ends</summary>
+ <description>Wrap prev/next at the first/last image.</description>
+ </key>
+
+ <key name="background" enum="org.buetow.ggaze.background">
+ <default>'dark'</default>
+ <summary>Viewer background</summary>
+ <description>Background behind the image in large view.</description>
+ </key>
+
+ <key name="scroll-behavior" enum="org.buetow.ggaze.scroll-behavior">
+ <default>'zoom'</default>
+ <summary>Scroll behavior</summary>
+ <description>What the mouse scroll wheel does in large view.</description>
+ </key>
+
+ <key name="slideshow-delay" type="d">
+ <default>3.0</default>
+ <summary>Slideshow delay</summary>
+ <description>Seconds between slides in slideshow mode.</description>
+ </key>
+
+ <key name="thumbnail-size" type="i">
+ <default>128</default>
+ <summary>Grid thumbnail size</summary>
+ <description>Pixel size of grid thumbnails (resizable via +/-).</description>
+ </key>
+
+ <key name="hide-trashed" type="b">
+ <default>false</default>
+ <summary>Hide trashed items</summary>
+ <description>Hide ./Trash/deleted items from the grid entirely.</description>
+ </key>
+
+ <key name="window-geometry" type="(iiib)">
+ <default>(800, 600, 0, false)</default>
+ <summary>Window geometry</summary>
+ <description>(width, height, fullscreen, maximized) restored on launch.</description>
+ </key>
+
+ <key name="destinations" type="a(ss)">
+ <default>[]</default>
+ <summary>Move destinations</summary>
+ <description>Ordered (name, path) pairs for the `m` move popup; order = hotkey order.</description>
+ </key>
+
+ <key name="editors" type="a(ss)">
+ <default>[]</default>
+ <summary>External editors</summary>
+ <description>Ordered (name, command) pairs for the `e` open-in popup; %f = current file.</description>
+ </key>
+
+ <key name="scripts" type="a(ss)">
+ <default>[]</default>
+ <summary>Shell scripts</summary>
+ <description>Ordered (name, command) pairs for the `!` run-script popup; %f/%d expanded, run via /bin/sh -c.</description>
+ </key>
+
+ <key name="enhance-presets" type="a(ss)">
+ <default>[]</default>
+ <summary>Enhance presets</summary>
+ <description>Ordered (name, gegl-graph) pairs for the `a` enhance popup (GEGL only).</description>
+ </key>
+ </schema>
+</schemalist> \ No newline at end of file