[Xfce4-commits] <midori:master> Optionally use Granite and show in about:version

Christian Dywan noreply at xfce.org
Wed Mar 14 21:18:03 CET 2012


Updating branch refs/heads/master
         to 09c041f740c842c2a8ed5eba8d0ad554084c315e (commit)
       from 48368e9951171d5168ba36e506c0c45fb3fef292 (commit)

commit 09c041f740c842c2a8ed5eba8d0ad554084c315e
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Mar 14 20:55:34 2012 +0100

    Optionally use Granite and show in about:version
    
    See bzr branch lp:granite
    
    See: https://bugs.launchpad.net/midori/+bug/898497

 midori/midori-view.c |    2 ++
 midori/wscript_build |    2 +-
 tests/wscript_build  |    2 +-
 wscript              |   15 +++++++++++++++
 4 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 7b0efd3..a16deca 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -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>libsoup</td><td>%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>single instance</td><td>%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,
                     LIBSOUP_VERSION,
                     CAIRO_VERSION_STRING, cairo_version_string (),
+                    GRANITE_VERSION,
                     LIBNOTIFY_VERSION,
                     #ifdef HAVE_HILDON_2_2
                     "Hildon 2.2",
diff --git a/midori/wscript_build b/midori/wscript_build
index 51527bb..e0ee7e6 100644
--- a/midori/wscript_build
+++ b/midori/wscript_build
@@ -8,7 +8,7 @@ import platform
 progressive = True
 libs = 'M UNIQUE LIBSOUP GMODULE GTHREAD LIBIDN GIO GTK SQLITE ' \
        'LIBNOTIFY WEBKIT JAVASCRIPTCOREGTK LIBXML X11 XSS WS2_32 HILDON' \
-       'HILDON_FM'
+       'HILDON_FM GRANITE'
 
 if progressive or Options.commands['check']:
     obj = bld.new_task_gen ('cc', 'staticlib')
diff --git a/tests/wscript_build b/tests/wscript_build
index 58b2d8e..11f14b8 100644
--- a/tests/wscript_build
+++ b/tests/wscript_build
@@ -35,6 +35,6 @@ for test in tests:
     obj.source = source
     obj.vapi_dirs = '../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.unit_test = 1
diff --git a/wscript b/wscript
index 542a5d6..03ffe35 100644
--- a/wscript
+++ b/wscript
@@ -206,6 +206,20 @@ def configure (conf):
         conf.define ('LIBNOTIFY_VERSION', 'No')
     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)
     check_pkg ('gmodule-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', '')
     add_enable_option ('unique', 'single instance support', group, disable=is_win32 (os.environ))
     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 ('tests', 'building of tests', group, disable=True)
     add_enable_option ('hildon', 'Maemo integration', group, disable=not is_maemo ())


More information about the Xfce4-commits mailing list