summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2018-08-03 02:09:09 +0000
committerMatthias Clasen <mclasen@redhat.com>2018-08-03 02:09:09 +0000
commit877fffdd5efd55dc1067cd6e2b3a715197879f08 (patch)
treed8b545be6da04cd48d790f8810e63bbeedfe206c
parent8669d31c308eb8a8e28148000b8df6ccf091d7b1 (diff)
parent8fb8303ba0d70355a1af515a8f3100cbf2e496e1 (diff)
downloadgtk+-877fffdd5efd55dc1067cd6e2b3a715197879f08.tar.gz
Merge branch 'fix-app-id' into 'master'
Make xdg-shell's app_id match GApplication's application-id property Closes #653 See merge request GNOME/gtk!284
-rw-r--r--build-aux/flatpak/org.gtk.Demo.json1
-rw-r--r--build-aux/flatpak/org.gtk.WidgetFactory.json1
-rw-r--r--demos/gtk-demo/meson.build2
-rw-r--r--demos/gtk-demo/org.gtk.Demo.desktop (renamed from demos/gtk-demo/gtk4-demo.desktop)0
-rw-r--r--demos/icon-browser/meson.build2
-rw-r--r--demos/icon-browser/org.gtk.IconBrowser.desktop (renamed from demos/icon-browser/gtk4-icon-browser.desktop)0
-rw-r--r--demos/widget-factory/meson.build2
-rw-r--r--demos/widget-factory/org.gtk.WidgetFactory.desktop (renamed from demos/widget-factory/gtk4-widget-factory.desktop)0
-rw-r--r--docs/reference/gtk/getting_started.xml2
-rw-r--r--docs/reference/gtk/migrating-3to4.xml16
-rw-r--r--examples/application1/README4
-rw-r--r--examples/application1/org.gtk.exampleapp.desktop (renamed from examples/application1/exampleapp.desktop)0
-rw-r--r--gdk/wayland/gdksurface-wayland.c4
13 files changed, 25 insertions, 9 deletions
diff --git a/build-aux/flatpak/org.gtk.Demo.json b/build-aux/flatpak/org.gtk.Demo.json
index a0c5085591..ca655a7bd6 100644
--- a/build-aux/flatpak/org.gtk.Demo.json
+++ b/build-aux/flatpak/org.gtk.Demo.json
@@ -5,7 +5,6 @@
"sdk": "org.gnome.Sdk",
"command": "gtk4-demo",
"tags": ["devel", "development", "nightly"],
- "rename-desktop-file": "gtk4-demo.desktop",
"rename-icon": "gtk4-demo",
"desktop-file-name-prefix": "(Development) ",
"finish-args": [
diff --git a/build-aux/flatpak/org.gtk.WidgetFactory.json b/build-aux/flatpak/org.gtk.WidgetFactory.json
index c28acf426e..ea6aaa9938 100644
--- a/build-aux/flatpak/org.gtk.WidgetFactory.json
+++ b/build-aux/flatpak/org.gtk.WidgetFactory.json
@@ -5,7 +5,6 @@
"sdk": "org.gnome.Sdk",
"command": "gtk4-widget-factory",
"tags": ["devel", "development", "nightly"],
- "rename-desktop-file": "gtk4-widget-factory.desktop",
"rename-icon": "gtk4-widget-factory",
"desktop-file-name-prefix": "(Development) ",
"finish-args": [
diff --git a/demos/gtk-demo/meson.build b/demos/gtk-demo/meson.build
index e626fae503..93c2902575 100644
--- a/demos/gtk-demo/meson.build
+++ b/demos/gtk-demo/meson.build
@@ -129,7 +129,7 @@ foreach icon_size: [ '16x16', '22x22', '24x24', '32x32', '48x48', '256x256', ]
endforeach
# desktop file
-install_data('gtk4-demo.desktop', install_dir: gtk_applicationsdir)
+install_data('org.gtk.Demo.desktop', install_dir: gtk_applicationsdir)
# GSettings
install_data('org.gtk.Demo.gschema.xml', install_dir: gtk_schemasdir)
diff --git a/demos/gtk-demo/gtk4-demo.desktop b/demos/gtk-demo/org.gtk.Demo.desktop
index 3ccd28d6ab..3ccd28d6ab 100644
--- a/demos/gtk-demo/gtk4-demo.desktop
+++ b/demos/gtk-demo/org.gtk.Demo.desktop
diff --git a/demos/icon-browser/meson.build b/demos/icon-browser/meson.build
index 95b1c0f4e4..fcaca82d8d 100644
--- a/demos/icon-browser/meson.build
+++ b/demos/icon-browser/meson.build
@@ -17,4 +17,4 @@ executable('gtk4-icon-browser',
link_args: extra_demo_ldflags,
install: true)
-install_data('gtk4-icon-browser.desktop', install_dir: gtk_applicationsdir)
+install_data('org.gtk.IconBrowser.desktop', install_dir: gtk_applicationsdir)
diff --git a/demos/icon-browser/gtk4-icon-browser.desktop b/demos/icon-browser/org.gtk.IconBrowser.desktop
index 844de8cdd8..844de8cdd8 100644
--- a/demos/icon-browser/gtk4-icon-browser.desktop
+++ b/demos/icon-browser/org.gtk.IconBrowser.desktop
diff --git a/demos/widget-factory/meson.build b/demos/widget-factory/meson.build
index 2050d2e750..be7b5db57a 100644
--- a/demos/widget-factory/meson.build
+++ b/demos/widget-factory/meson.build
@@ -13,7 +13,7 @@ executable('gtk4-widget-factory',
install: true)
# desktop file
-install_data('gtk4-widget-factory.desktop', install_dir: gtk_applicationsdir)
+install_data('org.gtk.WidgetFactory.desktop', install_dir: gtk_applicationsdir)
# icons
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
diff --git a/demos/widget-factory/gtk4-widget-factory.desktop b/demos/widget-factory/org.gtk.WidgetFactory.desktop
index 685ebdc08f..685ebdc08f 100644
--- a/demos/widget-factory/gtk4-widget-factory.desktop
+++ b/demos/widget-factory/org.gtk.WidgetFactory.desktop
diff --git a/docs/reference/gtk/getting_started.xml b/docs/reference/gtk/getting_started.xml
index 036b9f471c..1808513419 100644
--- a/docs/reference/gtk/getting_started.xml
+++ b/docs/reference/gtk/getting_started.xml
@@ -388,7 +388,7 @@
</informalfigure>
<informalexample>
- <programlisting><xi:include href="../../../../examples/application1/exampleapp.desktop" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
+ <programlisting><xi:include href="../../../../examples/application1/org.gtk.exampleapp.desktop" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
</informalexample>
<para>Note that <replaceable>@<!-- -->bindir@</replaceable> needs to be replaced
diff --git a/docs/reference/gtk/migrating-3to4.xml b/docs/reference/gtk/migrating-3to4.xml
index cd113bb79b..6532974d3c 100644
--- a/docs/reference/gtk/migrating-3to4.xml
+++ b/docs/reference/gtk/migrating-3to4.xml
@@ -177,6 +177,22 @@
</para>
</section>
+ <section>
+ <title>Set a proper app_id</title>
+ <para>
+ In GTK+4 we want the application's #GApplication
+ 'application-id' (and therefore the D-Bus name), the desktop
+ file basename and Wayland's xdg-shell app_id to match. In
+ order to achieve this with GTK+3 call g_set_prgname() with the same
+ application id you passed to #GtkApplication. Rename your
+ desktop files to match the application id if needed.
+ </para>
+ <para>
+ The call to g_set_prgname() can be removed once you fully migrated
+ to GTK+4.
+ </para>
+ </section>
+
</section>
<section>
diff --git a/examples/application1/README b/examples/application1/README
index 4c4e75c4d9..739ecd967d 100644
--- a/examples/application1/README
+++ b/examples/application1/README
@@ -2,8 +2,8 @@ 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
+sed -e "s#@bindir@#$PWD#" org.gtk.exampleapp.desktop \
+ > ~/.local/share/applications/org.gtk.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/org.gtk.exampleapp.desktop
index 8deddfe22d..8deddfe22d 100644
--- a/examples/application1/exampleapp.desktop
+++ b/examples/application1/org.gtk.exampleapp.desktop
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 51eca561df..af5881007d 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -1515,7 +1515,9 @@ gdk_wayland_surface_create_xdg_toplevel (GdkSurface *surface)
impl->initial_fullscreen_output = NULL;
- app_id = g_get_prgname ();
+ app_id = impl->application.application_id;
+ if (app_id == NULL)
+ app_id = g_get_prgname ();
if (app_id == NULL)
app_id = "GTK+ Application";