[meld/flatpak-ci] Make icon name a new configuration constant



commit 4b533c8d59d71f3da36e5c731e7403b9498b341a
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Mon Oct 7 08:58:24 2019 +1000

    Make icon name a new configuration constant
    
    This is another step towards being able to ship an application-id-based
    development version of everything.

 meld/conf.py                      | 2 ++
 meld/meldapp.py                   | 3 ++-
 meld/resources/ui/about-dialog.ui | 1 -
 3 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/meld/conf.py b/meld/conf.py
index 69763ad3..36d9879d 100644
--- a/meld/conf.py
+++ b/meld/conf.py
@@ -8,6 +8,8 @@ __version__ = "3.21.0"
 
 APPLICATION_NAME = 'Meld'
 APPLICATION_ID = 'org.gnome.Meld'
+# TODO: Ideally this would be the application ID, but we need a MeldDevel icon
+ICON_NAME = 'org.gnome.meld'
 SETTINGS_SCHEMA_ID = 'org.gnome.meld'
 RESOURCE_BASE = '/org/gnome/Meld'
 
diff --git a/meld/meldapp.py b/meld/meldapp.py
index 12f13641..43123a59 100644
--- a/meld/meldapp.py
+++ b/meld/meldapp.py
@@ -46,7 +46,7 @@ class MeldApp(Gtk.Application):
         )
         GLib.set_application_name(meld.conf.APPLICATION_NAME)
         GLib.set_prgname(meld.conf.APPLICATION_ID)
-        Gtk.Window.set_default_icon_name("org.gnome.meld")
+        Gtk.Window.set_default_icon_name(meld.conf.ICON_NAME)
         self.set_resource_base_path(meld.conf.RESOURCE_BASE)
 
     def do_startup(self):
@@ -115,6 +115,7 @@ class MeldApp(Gtk.Application):
             '/org/gnome/meld/ui/about-dialog.ui')
         dialog = builder.get_object('about-dialog')
         dialog.set_version(meld.conf.__version__)
+        dialog.set_logo_icon_name(meld.conf.ICON_NAME)
         dialog.set_transient_for(self.get_active_window())
         dialog.run()
         dialog.destroy()
diff --git a/meld/resources/ui/about-dialog.ui b/meld/resources/ui/about-dialog.ui
index 2bf7a02d..13ac88ef 100644
--- a/meld/resources/ui/about-dialog.ui
+++ b/meld/resources/ui/about-dialog.ui
@@ -14,7 +14,6 @@ Vincent Legoll</property>
     <property name="translator_credits" translatable="yes">translator-credits</property>
     <property name="artists">GNOME Project
 Josef Vybíral</property>
-    <property name="logo_icon_name">org.gnome.meld</property>
     <property name="license_type">gpl-2-0</property>
   </object>
 </interface>


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