[gtk/print-editor: 2/2] printeditor: Add desktop file and appdata



commit 51ba36b3a148311efccc5439970e7b21b993064a
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jun 28 10:12:45 2020 -0400

    printeditor: Add desktop file and appdata
    
    All our installed demos have this.

 demos/print-editor/meson.build                     | 11 +++++--
 .../print-editor/org.gtk.PrintEditor4.appdata.xml  | 34 ++++++++++++++++++++++
 demos/print-editor/org.gtk.PrintEditor4.desktop    | 10 +++++++
 3 files changed, 53 insertions(+), 2 deletions(-)
---
diff --git a/demos/print-editor/meson.build b/demos/print-editor/meson.build
index baa86aed12..9b3e7910c5 100644
--- a/demos/print-editor/meson.build
+++ b/demos/print-editor/meson.build
@@ -1,7 +1,14 @@
-executable('print-editor',
+executable('gtk4-print-editor',
            ['print-editor.c'],
            c_args: common_cflags,
            dependencies: libgtk_dep,
            include_directories: confinc,
            gui_app: true,
-           link_args: extra_demo_ldflags)
+           link_args: extra_demo_ldflags,
+           install: true)
+
+# desktop file
+install_data('org.gtk.PrintEditor4.desktop', install_dir: gtk_applicationsdir)
+
+# appdata
+install_data('org.gtk.PrintEditor4.appdata.xml', install_dir: gtk_appdatadir)
diff --git a/demos/print-editor/org.gtk.PrintEditor4.appdata.xml 
b/demos/print-editor/org.gtk.PrintEditor4.appdata.xml
new file mode 100644
index 0000000000..2d60e80666
--- /dev/null
+++ b/demos/print-editor/org.gtk.PrintEditor4.appdata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop">
+  <id>org.gtk.PrintEditor4.desktop</id>
+  <metadata_license>CC0-1.0</metadata_license>
+  <project_license>LGPL-2.0+</project_license>
+  <name>GTK Print Editor</name>
+  <summary>Program to demonstrate GTK printing</summary>
+  <description>
+    <p>
+      GTK Print Editor is a simple editor to demonstrate GTK printing.
+    </p>
+  </description>
+  <screenshots>
+    <screenshot>
+      <image>https://static.gnome.org/appdata/gtk4-print-editor/gtk-print-editor1.png</image>
+      <caption>Print Editor</caption>
+    </screenshot>
+  </screenshots>
+  <kudos>
+    <kudo>HiDpiIcon</kudo>
+    <kudo>ModernToolkit</kudo>
+  </kudos>
+  <url type="homepage">https://www.gtk.org</url>
+  <translation type="gettext">gtk-4.0</translation>
+  <update_contact>matthias.clasen_at_gmail.com</update_contact>
+  <developer_name>Matthias Clasen and others</developer_name>
+  <releases>
+    <release version="3.99.0" date="2020">
+      <description>
+        <p>A new developers snapshot towards GTK 4.0.</p>
+      </description>
+    </release>
+  </releases>
+</component>
diff --git a/demos/print-editor/org.gtk.PrintEditor4.desktop b/demos/print-editor/org.gtk.PrintEditor4.desktop
new file mode 100644
index 0000000000..ad2ad9fd3c
--- /dev/null
+++ b/demos/print-editor/org.gtk.PrintEditor4.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Print Editor
+Comment=A simple editor demonstrating GTK printing
+Exec=gtk4-print-editor
+Icon=text-editor-symbolic
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Development;GTK;
+NoDisplay=true


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]