From 3c116eab7e35a4b85dd35ae8f2b09529218f31b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Forysiuk?= Date: Sun, 23 Oct 2011 19:23:03 +0200 Subject: [PATCH] Use versioned speed dial template filename --- midori/midori-view.c | 3 ++- wscript | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index f1be02ac..1eeeaf7e 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -3704,7 +3704,8 @@ prepare_speed_dial_html (MidoriView* view) if (!key_file) return g_strdup (""); - file_name = g_build_filename ("midori", "res", "speeddial-head.html", NULL); + file_name = g_build_filename ("midori", "res", + "speeddial-head-" MIDORI_VERSION ".html", NULL); file_path = sokoke_find_data_filename (file_name); g_free (file_name); diff --git a/wscript b/wscript index 7ff2a29b..6c3073a2 100644 --- a/wscript +++ b/wscript @@ -32,13 +32,13 @@ minor = 4 micro = 1 APPNAME = 'midori' -VERSION = str (major) + '.' + str (minor) + '.' + str (micro) +VERSION = VERSION_FULL = str (major) + '.' + str (minor) + '.' + str (micro) try: if os.path.isdir ('.git'): git = Utils.cmd_output (['git', 'describe'], silent=True) if git: - VERSION = git.strip () + VERSION_FULL = git.strip () except: pass @@ -272,11 +272,12 @@ def configure (conf): else: conf.check (header_name='signal.h') - conf.define ('PACKAGE_VERSION', VERSION) + conf.define ('PACKAGE_VERSION', VERSION_FULL) conf.define ('PACKAGE_NAME', APPNAME) conf.define ('PACKAGE_BUGREPORT', 'https://bugs.launchpad.net/midori') conf.define ('GETTEXT_PACKAGE', APPNAME) + conf.define ('MIDORI_VERSION', VERSION) conf.define ('MIDORI_MAJOR_VERSION', major) conf.define ('MIDORI_MINOR_VERSION', minor) conf.define ('MIDORI_MICRO_VERSION', micro) @@ -476,8 +477,11 @@ def build (bld): else: Utils.pprint ('BLUE', "logo-shade could not be rasterized.") - for res_file in ['error.html', 'speeddial-head.html', 'close.png']: + for res_file in ['error.html', 'close.png']: bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/' + res_file) + bld.install_as ( \ + '${MDATADIR}/' + APPNAME + '/res/speeddial-head-%s.html' % VERSION, \ + 'data/speeddial-head.html') if bld.env['addons']: bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/autosuggestcontrol.js')