[meld/flatpak-ci] Make application ID (partly) configurable



commit 32e395f53a656fc33beee9e406f867d9af74a71c
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Mon Oct 7 07:39:28 2019 +1000

    Make application ID (partly) configurable

 meld/conf.py                      | 6 ++++--
 meld/meldapp.py                   | 3 ++-
 meld/resources/ui/about-dialog.ui | 1 -
 meld/resources/ui/appwindow.ui    | 1 -
 meld/settings.py                  | 2 +-
 5 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/meld/conf.py b/meld/conf.py
index c358738d..69763ad3 100644
--- a/meld/conf.py
+++ b/meld/conf.py
@@ -6,8 +6,10 @@ from pathlib import Path
 __package__ = "meld"
 __version__ = "3.21.0"
 
-APPLICATION_ID = "org.gnome.Meld"
-RESOURCE_BASE = '/org/gnome/meld'
+APPLICATION_NAME = 'Meld'
+APPLICATION_ID = 'org.gnome.Meld'
+SETTINGS_SCHEMA_ID = 'org.gnome.meld'
+RESOURCE_BASE = '/org/gnome/Meld'
 
 # START; these paths are clobbered on install by meld.build_helpers
 DATADIR = Path(sys.prefix) / "share" / "meld"
diff --git a/meld/meldapp.py b/meld/meldapp.py
index a3def9ce..12f13641 100644
--- a/meld/meldapp.py
+++ b/meld/meldapp.py
@@ -44,9 +44,10 @@ class MeldApp(Gtk.Application):
           application_id=meld.conf.APPLICATION_ID,
           flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE,
         )
-        GLib.set_application_name("Meld")
+        GLib.set_application_name(meld.conf.APPLICATION_NAME)
         GLib.set_prgname(meld.conf.APPLICATION_ID)
         Gtk.Window.set_default_icon_name("org.gnome.meld")
+        self.set_resource_base_path(meld.conf.RESOURCE_BASE)
 
     def do_startup(self):
         Gtk.Application.do_startup(self)
diff --git a/meld/resources/ui/about-dialog.ui b/meld/resources/ui/about-dialog.ui
index 26a7b1c0..e24e1117 100644
--- a/meld/resources/ui/about-dialog.ui
+++ b/meld/resources/ui/about-dialog.ui
@@ -6,7 +6,6 @@
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">About Meld</property>
-    <property name="icon_name">org.gnome.meld</property>
     <property name="type_hint">dialog</property>
     <property name="program_name">Meld</property>
     <property name="copyright" translatable="yes">Copyright © 2002-2009 Stephen Kennedy
diff --git a/meld/resources/ui/appwindow.ui b/meld/resources/ui/appwindow.ui
index 4adc26f7..bd18b640 100644
--- a/meld/resources/ui/appwindow.ui
+++ b/meld/resources/ui/appwindow.ui
@@ -7,7 +7,6 @@
     <property name="height_request">400</property>
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">Meld</property>
-    <property name="icon_name">org.gnome.meld</property>
     <property name="show-menubar">false</property>
     <signal name="delete-event" handler="on_delete_event" swapped="no"/>
 
diff --git a/meld/settings.py b/meld/settings.py
index fc68e3da..d68bf00b 100644
--- a/meld/settings.py
+++ b/meld/settings.py
@@ -93,7 +93,7 @@ def load_settings_schema(schema_id):
 def create_settings():
     global settings, interface_settings, _meldsettings
 
-    settings = load_settings_schema(meld.conf.APPLICATION_ID)
+    settings = load_settings_schema(meld.conf.SETTINGS_SCHEMA_ID)
     interface_settings = Gio.Settings.new('org.gnome.desktop.interface')
     _meldsettings = MeldSettings()
 


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