[Xfce4-commits] <postler:master> Allow disabling libindicate and update README

Christian Dywan noreply at xfce.org
Mon Jan 24 21:46:01 CET 2011


Updating branch refs/heads/master
         to c600ff30715484f7ea56535e04f2338e3bb0dcd4 (commit)
       from 83d95f95d8cb57e4eb2909e1815ca03246bb7624 (commit)

commit c600ff30715484f7ea56535e04f2338e3bb0dcd4
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Jan 24 21:44:51 2011 +0100

    Allow disabling libindicate and update README

 README                       |    9 +++++----
 postler/postler-service.vala |    2 ++
 postler/wscript_build        |    5 ++++-
 tests/wscript_build          |    5 +++--
 wscript                      |   15 ++++++++++++++-
 5 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/README b/README
index 4dddf05..a0b22f5 100644
--- a/README
+++ b/README
@@ -4,11 +4,12 @@ Postler is a lean mail interface. Messages are read from Maildir folders, HTML
 is rendered, composed and spell-checked with WebKitGTK+. The application
 consists of independent modules, the reader, viewer and the composer. Each
 module runs separately. No network access occurs from within the user interface
-by default, offline access is integral. Access to contacts and calendaring is
-available but not a core part of the application.
+by default, offline access is integral. Contact completion and address book
+integration are provided by Dexter.
 
-Requirements: GIO 2.26, GTK+ 2.16, WebkitGTK+ 1.1.18, Unique 0.9, libnotify,
-              libcanberra, libindicate
+Requirements: GIO 2.26, GTK+ 2.16, WebkitGTK+ 1.1.18, Unique 0.9, libnotify, libcanberra
+
+Recommended: libindicate, Dexter, lynx
 
 For installation instructions read INSTALL.
 
diff --git a/postler/postler-service.vala b/postler/postler-service.vala
index 34aecff..6bb5bef 100644
--- a/postler/postler-service.vala
+++ b/postler/postler-service.vala
@@ -15,6 +15,7 @@ namespace Postler {
         double total = 0;
         int unread = 0;
         string folder = "";
+#if HAVE_INDICATE
         Indicate.Server indicator;
         List<Indicate.Indicator> items;
 
@@ -92,6 +93,7 @@ namespace Postler {
                 add_inbox_indicator (info);
             indicator.show ();
         }
+#endif
 
         bool execute_command_with_status (string command, IOFunc io_callback) {
             try {
diff --git a/postler/wscript_build b/postler/wscript_build
index 7cb5ce2..7d9331b 100644
--- a/postler/wscript_build
+++ b/postler/wscript_build
@@ -15,6 +15,9 @@ obj.includes = '. ..'
 obj.find_sources_in_dirs ('.')
 obj.uselib = 'GIO GTHREAD GTK LIBNOTIFY LIBCANBERRA INDICATE UNIQUE WEBKIT'
 obj.packages = 'config postler posix gio-2.0 gtk+-2.0 libnotify libcanberra ' \
-               'indicate unique-1.0 webkit-1.0'
+               'unique-1.0 webkit-1.0'
 obj.vapi_dirs = '.'
 
+if bld.env['HAVE_INDICATE']:
+    obj.packages += ' indicate'
+
diff --git a/tests/wscript_build b/tests/wscript_build
index 3d6de9f..bb5163e 100644
--- a/tests/wscript_build
+++ b/tests/wscript_build
@@ -34,10 +34,11 @@ for test in tests:
     obj.target = 'test-' + target
     obj.includes = '. ..'
     obj.source = source
-    obj.find_sources_in_dirs ('../postler', excludes=['postler-reader.vala'])
+    obj.find_sources_in_dirs ('../postler',
+        excludes=['postler-reader.vala', 'postler-service.vala'])
     obj.vapi_dirs = '../postler'
     obj.uselib = 'GIO GTHREAD GTK LIBNOTIFY LIBCANBERRA INDICATE UNIQUE WEBKIT'
     obj.packages = 'config postler posix gio-2.0 gtk+-2.0 libnotify libcanberra ' \
-                   'indicate unique-1.0 webkit-1.0'
+                   'unique-1.0 webkit-1.0'
     obj.unit_test = 1
 
diff --git a/wscript b/wscript
index 4e6f5f2..02036f8 100644
--- a/wscript
+++ b/wscript
@@ -113,7 +113,18 @@ def configure (conf):
     check_pkg ('webkit-1.0', '1.1.18')
     check_pkg ('libnotify', var='LIBNOTIFY')
     check_pkg ('libcanberra', var='LIBCANBERRA')
-    check_pkg ('indicate')
+
+    if option_enabled ('libindicate'):
+        check_pkg ('indicate', mandatory=False)
+        if conf.env['HAVE_INDICATE']:
+            conf.env.append_value ('VALAFLAGS', '-D HAVE_INDICATE')
+        else:
+            Utils.pprint ('RED', 'libindicate is needed for Postler to show ' \
+                'up in the Messaging Menu (Ayatana).\n' \
+                'If you want to build without it, pass --disable-libindicate.')
+            sys.exit (1)
+    else:
+        Utils.pprint ('YELLOW', 'Building without libindicate.')
 
     # isync
     conf.check (header_name='sys/filio.h')
@@ -244,6 +255,8 @@ def set_options (opt):
         help='Update localization files', dest='update_po')
     add_enable_option ('docs', 'informational text files', group)
 
+    add_enable_option ('libindicate', 'Messaging Menu support (Ayatana)')
+
 # Taken from Geany's wscript, modified to support LINGUAS variable
 def write_linguas_file (self):
     linguas = ''



More information about the Xfce4-commits mailing list