[seahorse] Add "devel" CSS class when using a nightly build
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] Add "devel" CSS class when using a nightly build
- Date: Sun, 5 Jan 2020 13:28:13 +0000 (UTC)
commit 73ab9bbc1662a6add947efcb358625eb5feda5fb
Author: Niels De Graef <nielsdegraef gmail com>
Date: Sun Jan 5 14:27:57 2020 +0100
Add "devel" CSS class when using a nightly build
common/config.vapi | 2 ++
meson.build | 1 +
src/key-manager.vala | 4 ++++
3 files changed, 7 insertions(+)
---
diff --git a/common/config.vapi b/common/config.vapi
index 19d0b7cf..a04c8534 100644
--- a/common/config.vapi
+++ b/common/config.vapi
@@ -3,6 +3,8 @@ namespace Config
{
public const string APPLICATION_ID;
+ public const string PROFILE;
+
public const string PKGDATADIR;
public const string EXECDIR;
diff --git a/meson.build b/meson.build
index 15e3068c..0164fa6b 100644
--- a/meson.build
+++ b/meson.build
@@ -127,6 +127,7 @@ conf.set_quoted('PKGDATADIR', get_option('datadir') / meson.project_name())
conf.set_quoted('EXECDIR', libexecbindir)
conf.set_quoted('LOCALEDIR', seahorse_prefix / get_option('localedir'))
conf.set_quoted('APPLICATION_ID', application_id)
+conf.set_quoted('PROFILE', get_option('profile'))
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('G_LOG_DOMAIN', meson.project_name())
conf.set('WITH_DEBUG', buildtype.contains('debug'))
diff --git a/src/key-manager.vala b/src/key-manager.vala
index 8e616b74..cc19efca 100644
--- a/src/key-manager.vala
+++ b/src/key-manager.vala
@@ -132,6 +132,10 @@ public class Seahorse.KeyManager : Catalog {
});
provider.load_from_resource("/org/gnome/Seahorse/seahorse.css");
+
+ // Makes sure it's visible when people use nightlies
+ if (Config.PROFILE == "development")
+ get_style_context().add_class("devel");
}
[GtkCallback]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]