From 91f2d10710c5dacf4fb5787bee31e6cffd255972 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 24 Jul 2013 00:07:41 -0400 Subject: [PATCH] Getting started: Add docs about desktop file and icon --- docs/reference/gtk/Makefile.am | 3 +- docs/reference/gtk/getting_started.xml | 48 +++++++++++++++++++++++ docs/reference/gtk/images/exampleapp.png | Bin 0 -> 4117 bytes 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 docs/reference/gtk/images/exampleapp.png diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am index e2fff14dc0..4848ee55a9 100644 --- a/docs/reference/gtk/Makefile.am +++ b/docs/reference/gtk/Makefile.am @@ -419,7 +419,8 @@ HTML_IMAGES = \ $(srcdir)/images/getting-started-app4.png \ $(srcdir)/images/getting-started-app6.png \ $(srcdir)/images/getting-started-app7.png \ - $(srcdir)/images/getting-started-app8.png + $(srcdir)/images/getting-started-app8.png \ + $(srcdir)/images/exampleapp.png # Extra options to supply to gtkdoc-fixref FIXXREF_OPTIONS=--extra-dir=../gdk/html \ diff --git a/docs/reference/gtk/getting_started.xml b/docs/reference/gtk/getting_started.xml index 2bd5006deb..9baa5b455f 100644 --- a/docs/reference/gtk/getting_started.xml +++ b/docs/reference/gtk/getting_started.xml @@ -263,6 +263,36 @@
Building applications + An application consists of a number of files: + + + The binary + This gets installed in /usr/bin. + + + A desktop file + The desktop file provides important information about the application to the desktop shell, such as its name, icon, D-Bus name, commandline to launch it, etc. It is installed in /usr/share/applications. + + + An icon + The icon gets installed in /usr/share/icons/hicolor/48x48/apps, where it will be found regardless of the current theme. + + + A settings schema + If the application uses GSettings, it will install its schema + in /usr/share/glib-2.0/schemas, so that tools + like dconf-editor can find it. + + + Other resources + Other files, such as GtkBuilder ui files, are best loaded from + resources stored in the application binary itself. This eliminates the + need for most of the files that would traditionally be installed in + an application-specific location in /usr/share. + + + + GTK+ includes application support that is built on top of #GApplication. In this tutorial we'll build a simple application by starting from scratch, adding more and more pieces over time. Along @@ -304,6 +334,24 @@ FIXME: MISSING XINCLUDE CONTENT + As part of the initial setup of our application, we also + create an icon and a desktop file. + + + + + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + Note that @bindir@ needs to be replaced + with the actual path to the binary before this desktop file can be used. + Here is what we've achieved so far: diff --git a/docs/reference/gtk/images/exampleapp.png b/docs/reference/gtk/images/exampleapp.png new file mode 100644 index 0000000000000000000000000000000000000000..8beb54eae42b5083f5786ea89adea1f0041bef12 GIT binary patch literal 4117 zcmV+w5bE!VP)2e`C(I*4}5IbM8I&X>xOKlACC9V;%}7R?{@q*cOZ}Z3U4c>W9+! zsSj!WAf-@51Eo+(u?R)_Acd%^Z4@8k#ALY@SA`0)!%7<`(SAXHF$N#$f zu@QLZ7Y}*=AK`-!+_a+ zmp}Ka6L|Q68;X05?RxOQ+TIUOrmuBle<$PN8z@KD((c+#Tq%f4p0o^cq_jm%-+kcOe|=*6RUz=%`)@sP z=k>RJKJNXwd)BXdGwGTekwYWgAw^aqF`E&JlE&6);wEK0&9r-tvVDPBb)Ifk(#bJ<&Sb9 z{1dbKNxE{KI4wzKgI0mmCPI~HXNm?Tw2-2a0;C8j^`l0J0qROf0Vdlpoj^Sk+6F9w z7efFsqphGRS)Xq4wrYzfejoxLe(00Mo9;gHh~M>`9j{6COd!qJ!at7KE8188}8MwiUt>2 z<@poBGfxSVvCuY-lrn??nIE#WT#yv%CNiD2%&L~Qi>RhPc$t5Lllcfpe|_gIL2wFA z1ro56a-CrvNMpDFZDk*7*3w^mPXfRHIegdf_-GHeSCw$~wD9<2!upycMu+z~3!@P$ zdsbN4yTWjBfoO?oGiAHnW?WC`VoS0JVmJ@Z3EnxJlO8e;8u0Vr2PzZ^vLr|V3r1}E zVz<(;)^Nf`SJ_P`o@q8;F@>J^1|M{L-0jc*i(^&_<1usrViJ6jv9L7a;Gu&Yx$#;K zU3ZAlt`W0PaeiZ!Y~8_jV%8W*1;ofafM=ruZ90fv-P?%7tkgHHcC<0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