[epiphany] Add Epiphany Tech Preview branding



commit 5583b9646756e06c31c3a0b65e02683db904db33
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed Nov 15 20:24:37 2017 -0600

    Add Epiphany Tech Preview branding
    
    And use git describe to compute the version, so I can tell which commit
    I'm using.

 meson.build             |   14 ++++++++++++--
 meson_options.txt       |    6 ++++++
 org.gnome.Epiphany.json |    1 +
 src/window-commands.c   |    8 ++++++++
 4 files changed, 27 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index c452edf..5f861b2 100644
--- a/meson.build
+++ b/meson.build
@@ -31,11 +31,21 @@ conf.set_quoted('LOCALEDIR', localedir)
 conf.set_quoted('PKGDATADIR', pkgdatadir)
 conf.set_quoted('PKGLIBEXECDIR', pkglibexecdir)
 conf.set_quoted('SOURCE_ROOT', meson.source_root())
-conf.set_quoted('VERSION', meson.project_version())
 
-conf.set10('DEVELOPER_MODE', get_option('developer_mode'))
+# FIXME: Get rid of this option. This feature should be polished up and enabled unconditionally.
 conf.set10('ENABLE_HTTPS_EVERYWHERE', get_option('https_everywhere'))
 
+conf.set10('DEVELOPER_MODE', get_option('developer_mode'))
+
+tech_preview = get_option('tech_preview')
+conf.set10('TECH_PREVIEW', tech_preview)
+
+if tech_preview
+  conf.set_quoted('VERSION', run_command('git', 'describe').stdout().strip())
+else
+  conf.set_quoted('VERSION', meson.project_version())
+endif
+
 configure_file(
   output: 'config.h',
   configuration: conf
diff --git a/meson_options.txt b/meson_options.txt
index 5840586..4afbd84 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -16,6 +16,12 @@ option('https_everywhere',
   description: 'Enable experimental HTTPS Everywhere support'
 )
 
+option('tech_preview',
+  type: 'boolean',
+  value: false,
+  description: 'Enable Epiphany Tech Preview branding'
+)
+
 option('unit_tests',
   type: 'boolean',
   value: true,
diff --git a/org.gnome.Epiphany.json b/org.gnome.Epiphany.json
index bccc34a..426b7b4 100644
--- a/org.gnome.Epiphany.json
+++ b/org.gnome.Epiphany.json
@@ -64,6 +64,7 @@
         },
         {
             "name": "epiphany",
+            "config-opts": ["-Dtech_preview=true"],
             "buildsystem": "meson",
             "builddir": true,
             "sources": [
diff --git a/src/window-commands.c b/src/window-commands.c
index cbe03f6..6ea741c 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -639,7 +639,11 @@ window_cmd_show_about (GSimpleAction *action,
                               webkit_get_micro_version ());
 
   gtk_show_about_dialog (window ? GTK_WINDOW (window) : NULL,
+#if !TECH_PREVIEW
                          "program-name", _("Web"),
+#else
+                         "program-name", _("Epiphany Technology Preview"),
+#endif
                          "version", VERSION,
                          "copyright", "Copyright © 2002–2004 Marco Pesenti Gritti\n"
                          "Copyright © 2003–2017 The Web Developers",
@@ -658,7 +662,11 @@ window_cmd_show_about (GSimpleAction *action,
                          "translator-credits", _("translator-credits"),
                          "logo-icon-name", "org.gnome.Epiphany",
                          "website", "https://wiki.gnome.org/Apps/Web";,
+#if !TECH_PREVIEW
                          "website-label", _("Web Website"),
+#else
+                         "website-label", _("Website"),
+#endif
                          "license-type", GTK_LICENSE_GPL_3_0,
                          "wrap-license", TRUE,
                          NULL);


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