[gnome-software: 1/2] Export desktop file & icon in development builds




commit 512feeb74618a6791c588d365174b5e63c0b0823
Author: Will Thompson <wjt endlessos org>
Date:   Tue Apr 20 10:38:57 2021 +0100

    Export desktop file & icon in development builds
    
    Previously, no desktop file, app icon or D-Bus service would be
    exported, because org.gnome.Software is not within the
    org.gnome.SoftwareDevel namespace of the Flatpak.
    
    With this change, the development build shows up in the app grid &
    search and on the dash, with the "devel" icon already present in the
    source tree.

 data/icons/hicolor/meson.build                                       | 2 +-
 .../{org.gnome.Software.Devel.svg => org.gnome.SoftwareDevel.svg}    | 0
 src/gs-application.c                                                 | 2 +-
 src/meson.build                                                      | 5 +++--
 src/org.gnome.Software.desktop.in                                    | 2 +-
 src/org.gnome.Software.service.in                                    | 2 +-
 6 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/data/icons/hicolor/meson.build b/data/icons/hicolor/meson.build
index 933ae5ad8..7e56ac19a 100644
--- a/data/icons/hicolor/meson.build
+++ b/data/icons/hicolor/meson.build
@@ -1,4 +1,4 @@
-install_data('scalable/org.gnome.Software.svg',
+install_data('scalable/' + application_id + '.svg',
              install_dir : 'share/icons/hicolor/scalable/apps')
 install_data('scalable/carousel-arrow-next-symbolic.svg',
              install_dir : 'share/icons/hicolor/scalable/actions')
diff --git a/data/icons/hicolor/scalable/org.gnome.Software.Devel.svg 
b/data/icons/hicolor/scalable/org.gnome.SoftwareDevel.svg
similarity index 100%
rename from data/icons/hicolor/scalable/org.gnome.Software.Devel.svg
rename to data/icons/hicolor/scalable/org.gnome.SoftwareDevel.svg
diff --git a/src/gs-application.c b/src/gs-application.c
index 32dc8506c..c5bbda074 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -355,7 +355,7 @@ about_activated (GSimpleAction *action,
        gtk_about_dialog_set_authors (dialog, authors);
        gtk_about_dialog_set_copyright (dialog, copyright);
        gtk_about_dialog_set_license_type (dialog, GTK_LICENSE_GPL_2_0);
-       gtk_about_dialog_set_logo_icon_name (dialog, "org.gnome.Software");
+       gtk_about_dialog_set_logo_icon_name (dialog, APPLICATION_ID);
        gtk_about_dialog_set_translator_credits (dialog, _("translator-credits"));
        gtk_about_dialog_set_version (dialog, get_version());
 
diff --git a/src/meson.build b/src/meson.build
index df918440b..ef8033937 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -166,11 +166,12 @@ if (get_option('snap'))
 else
   cdata.set('snaphandler', '')
 endif
+cdata.set('application_id', application_id)
 
 # replace @bindir@
 configure_file(
   input : 'org.gnome.Software.service.in',
-  output : 'org.gnome.Software.service',
+  output : application_id + '.service',
   install_dir: join_paths(get_option('datadir'), 'dbus-1/services'),
   configuration : cdata
 )
@@ -191,7 +192,7 @@ i18n.merge_file(
       output : 'org.gnome.Software.desktop.tmp',
       configuration : cdata
     ),
-  output: 'org.gnome.Software.desktop',
+  output: application_id + '.desktop',
   type: 'desktop',
   po_dir: join_paths(meson.source_root(), 'po'),
   install: true,
diff --git a/src/org.gnome.Software.desktop.in b/src/org.gnome.Software.desktop.in
index 71dcb1524..318c243af 100644
--- a/src/org.gnome.Software.desktop.in
+++ b/src/org.gnome.Software.desktop.in
@@ -2,7 +2,7 @@
 Name=Software
 Comment=Add, remove or update software on this computer
 # Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=org.gnome.Software
+Icon=@application_id@
 Exec=gnome-software %U
 Terminal=false
 Type=Application
diff --git a/src/org.gnome.Software.service.in b/src/org.gnome.Software.service.in
index ed3a53d74..5c39f0c73 100644
--- a/src/org.gnome.Software.service.in
+++ b/src/org.gnome.Software.service.in
@@ -1,3 +1,3 @@
 [D-BUS Service]
-Name=org.gnome.Software
+Name=@application_id@
 Exec=@bindir@/gnome-software --gapplication-service


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