Optionally use Granite and show in about:version

See bzr branch lp:granite

See: https://bugs.launchpad.net/midori/+bug/898497
This commit is contained in:
Christian Dywan 2012-03-14 20:55:34 +01:00
parent 48368e9951
commit 09c041f740
4 changed files with 19 additions and 2 deletions

View file

@ -4078,6 +4078,7 @@ midori_view_set_uri (MidoriView* view,
"<tr><td>Glib</td><td>%d.%d.%d (%d.%d.%d)</td></tr>" "<tr><td>Glib</td><td>%d.%d.%d (%d.%d.%d)</td></tr>"
"<tr><td>libsoup</td><td>%s</td></tr>" "<tr><td>libsoup</td><td>%s</td></tr>"
"<tr><td>cairo</td><td>%s (%s)</td></tr>" "<tr><td>cairo</td><td>%s (%s)</td></tr>"
"<tr><td>granite</td><td>%s</td></tr>"
"<tr><td>libnotify</td><td>%s</td></tr>" "<tr><td>libnotify</td><td>%s</td></tr>"
"<tr><td>single instance</td><td>%s</td></tr>" "<tr><td>single instance</td><td>%s</td></tr>"
"<tr><td>Platform</td><td>%s %s %s</td></tr>" "<tr><td>Platform</td><td>%s %s %s</td></tr>"
@ -4099,6 +4100,7 @@ midori_view_set_uri (MidoriView* view,
glib_major_version, glib_minor_version, glib_micro_version, glib_major_version, glib_minor_version, glib_micro_version,
LIBSOUP_VERSION, LIBSOUP_VERSION,
CAIRO_VERSION_STRING, cairo_version_string (), CAIRO_VERSION_STRING, cairo_version_string (),
GRANITE_VERSION,
LIBNOTIFY_VERSION, LIBNOTIFY_VERSION,
#ifdef HAVE_HILDON_2_2 #ifdef HAVE_HILDON_2_2
"Hildon 2.2", "Hildon 2.2",

View file

@ -8,7 +8,7 @@ import platform
progressive = True progressive = True
libs = 'M UNIQUE LIBSOUP GMODULE GTHREAD LIBIDN GIO GTK SQLITE ' \ libs = 'M UNIQUE LIBSOUP GMODULE GTHREAD LIBIDN GIO GTK SQLITE ' \
'LIBNOTIFY WEBKIT JAVASCRIPTCOREGTK LIBXML X11 XSS WS2_32 HILDON' \ 'LIBNOTIFY WEBKIT JAVASCRIPTCOREGTK LIBXML X11 XSS WS2_32 HILDON' \
'HILDON_FM' 'HILDON_FM GRANITE'
if progressive or Options.commands['check']: if progressive or Options.commands['check']:
obj = bld.new_task_gen ('cc', 'staticlib') obj = bld.new_task_gen ('cc', 'staticlib')

View file

@ -35,6 +35,6 @@ for test in tests:
obj.source = source obj.source = source
obj.vapi_dirs = '../midori' obj.vapi_dirs = '../midori'
obj.packages = 'glib-2.0 gio-2.0 gtk+-2.0 libsoup-2.4 webkit-1.0 midori' obj.packages = 'glib-2.0 gio-2.0 gtk+-2.0 libsoup-2.4 webkit-1.0 midori'
obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML' obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML GRANITE'
obj.uselib_local = 'midori-core' obj.uselib_local = 'midori-core'
obj.unit_test = 1 obj.unit_test = 1

15
wscript
View file

@ -206,6 +206,20 @@ def configure (conf):
conf.define ('LIBNOTIFY_VERSION', 'No') conf.define ('LIBNOTIFY_VERSION', 'No')
conf.define ('HAVE_LIBNOTIFY', [0,1][libnotify == 'yes']) conf.define ('HAVE_LIBNOTIFY', [0,1][libnotify == 'yes'])
if option_enabled ('granite'):
if option_enabled('gtk3'):
option_checkfatal ('granite', 'granite requires --enable-gtk3')
check_pkg ('granite', '0.1', False)
granite = ['N/A', 'yes'][conf.env['HAVE_GRANITE'] == 1]
if granite != 'yes':
option_checkfatal ('granite', 'new notebook, pop-overs')
conf.define ('GRANITE_VERSION', 'No')
else:
conf.define ('GRANITE_VERSION', conf.check_cfg (modversion='granite'))
else:
granite = 'no '
conf.define ('GRANITE_VERSION', 'No')
conf.check (lib='m', mandatory=True) conf.check (lib='m', mandatory=True)
check_pkg ('gmodule-2.0', '2.8.0', False) check_pkg ('gmodule-2.0', '2.8.0', False)
check_pkg ('gthread-2.0', '2.8.0', False) check_pkg ('gthread-2.0', '2.8.0', False)
@ -394,6 +408,7 @@ def set_options (opt):
group = opt.add_option_group ('Optional features', '') group = opt.add_option_group ('Optional features', '')
add_enable_option ('unique', 'single instance support', group, disable=is_win32 (os.environ)) add_enable_option ('unique', 'single instance support', group, disable=is_win32 (os.environ))
add_enable_option ('libnotify', 'notification support', group) add_enable_option ('libnotify', 'notification support', group)
add_enable_option ('granite', 'new notebook, pop-overs', group)
add_enable_option ('addons', 'building of extensions', group) add_enable_option ('addons', 'building of extensions', group)
add_enable_option ('tests', 'building of tests', group, disable=True) add_enable_option ('tests', 'building of tests', group, disable=True)
add_enable_option ('hildon', 'Maemo integration', group, disable=not is_maemo ()) add_enable_option ('hildon', 'Maemo integration', group, disable=not is_maemo ())