summaryrefslogtreecommitdiff
path: root/examples/application1
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-07-23 23:16:54 -0400
committerMatthias Clasen <mclasen@redhat.com>2013-07-24 07:31:05 -0400
commit9029914815256ad92648049809d8346b1ad643fd (patch)
tree81b5c5f9f6a61c6a532666f10f4ad01f817b1455 /examples/application1
parent4af588e477fd2462e677543a8680a9d5590ebc40 (diff)
downloadgtk+-9029914815256ad92648049809d8346b1ad643fd.tar.gz
Getting started: Add icon and desktop file
Setting up the icon and desktop file is a pretty central part of making an application work, so we should do it for our example. The fact that the examples are uninstalled makes this a little more complicated.
Diffstat (limited to 'examples/application1')
-rw-r--r--examples/application1/README9
-rw-r--r--examples/application1/exampleapp.desktop6
-rw-r--r--examples/application1/exampleapp.pngbin0 -> 4117 bytes
3 files changed, 15 insertions, 0 deletions
diff --git a/examples/application1/README b/examples/application1/README
new file mode 100644
index 0000000000..4c4e75c4d9
--- /dev/null
+++ b/examples/application1/README
@@ -0,0 +1,9 @@
+To make gnome-shell use the desktop file and icon for this example
+while running it uninstalled, do the following:
+
+mkdir -p ~/.local/share/applications
+sed -e "s#@bindir@#$PWD#" exampleapp.desktop \
+ > ~/.local/share/applications/lt-exampleapp.desktop
+
+mkdir -p ~/.local/share/icons/hicolor/48x48/apps
+cp exampleapp.png ~/.local/share/icons/hicolor/48x48/apps
diff --git a/examples/application1/exampleapp.desktop b/examples/application1/exampleapp.desktop
new file mode 100644
index 0000000000..8deddfe22d
--- /dev/null
+++ b/examples/application1/exampleapp.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Application
+Name=Example
+Icon=exampleapp
+StartupNotify=true
+Exec=@bindir@/exampleapp
diff --git a/examples/application1/exampleapp.png b/examples/application1/exampleapp.png
new file mode 100644
index 0000000000..8beb54eae4
--- /dev/null
+++ b/examples/application1/exampleapp.png
Binary files differ