* cleanup the configuration system a bit:
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Sun, 24 Jun 2007 10:09:45 +0000 (10:09 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Sun, 24 Jun 2007 10:09:45 +0000 (10:09 +0000)
- don't have an overall 'hildon0' or 'hildon1' check, because this causes problems with sardine
- check for ogs, hildon-help, hildon-notify etc. separately
- turn on -Werr for *all* maemo builds

pmo-trunk-r2383

12 files changed:
configure.ac
src/Makefile.am
src/gnome/Makefile.am
src/gnome/modest-account-assistant.c
src/maemo/Makefile.am
src/maemo/easysetup/Makefile.am
src/maemo/modest-address-book.c
src/maemo/modest-hildon-includes.h
src/maemo/modest-platform.c
src/modest-init.c
src/modest-ui-actions.c
src/widgets/Makefile.am

index 822c38f..ca2e615 100644 (file)
@@ -71,7 +71,7 @@ AC_SUBST(MODEST_GSTUFF_LIBS)
 
 dnl dnl now, determine what to build
 AC_MSG_NOTICE([Determining what platform to build])
-PKG_CHECK_MODULES(LIBOSSO,libosso,[with_platform=maemo],true)
+PKG_CHECK_MODULES(MODEST_MAEMO_LIBS,libosso,[with_platform=maemo],true)
 
 AC_ARG_WITH(platform,
 [--with-platform=gnome         platform to build for [gnome]],
@@ -81,70 +81,229 @@ AC_ARG_WITH(platform,
        *)      MODEST_PLATFORM=${with_platform}
 esac], [MODEST_PLATFORM=gnome
                with_platform=gnome])
+
+
+if test "x$with_platform" == "xgnome"; then
+      PKG_CHECK_MODULES(MODEST_PLATFORM,libtinymail-gnome-desktop-1.0 libnm_glib glib-2.0 >= 2.8 gtk+-2.0 >= 2.10 libnotify)
+    AC_DEFINE_UNQUOTED(MODEST_PLATFORM_GNOME, 1, ["Whether modest is being built for the GNOME platform."])
+else
+    PKG_CHECK_MODULES(MODEST_PLATFORM,libosso conic libtinymail-maemo-1.0 osso-addressbook-1.0 libebook-1.2 libalarm)
+    AC_DEFINE_UNQUOTED(MODEST_PLATFORM_MAEMO, 1, ["Whether modest is being built for the MAEMO platform."])
+fi                 
+
+
+
 AC_SUBST(MODEST_PLATFORM)
 
 
-if test "x$with_platform" = "xmaemo"; then
-   
-   PKG_CHECK_MODULES(HILDON, hildon-1 >= 0.9.9, hildon1=yes, hildon1=no)       
-   if test "$hildon1" == "yes"; then   # the 'new' hildon                              
-      PKG_CHECK_MODULES(MODEST_LIBTINYMAIL_MAEMO, conic libtinymail-maemo-1.0 hildon-1 libosso libhildonmime osso-addressbook-1.0 wpeditor hildon-help libebook-1.2 libalarm hildon-notify libnotify)          
-   
-      GETTEXT_PACKAGE=osso-email
 
-    else     # the old hildon
-      PKG_CHECK_MODULES(MODEST_LIBTINYMAIL_MAEMO, conic libtinymail-maemo-1.0 hildon-libs >= 0.12.0 libosso libossomime libossohelp osso-addressbook-1.0 libwpeditor-plus libebook-1.2 libalarm gnome-vfs-module-2.0)
-      AC_DEFINE_UNQUOTED(MODEST_HILDON_VERSION_0, 1, ["The Hildon version we support."])   
 
-      GETTEXT_PACKAGE=modest
-    fi         
-   
-   AC_SUBST(MODEST_LIBTINYMAIL_MAEMO_CFLAGS)
-   AC_SUBST(MODEST_LIBTINYMAIL_MAEMO_LIBS) 
+
+
+
+
+#
+# check for wpeditor or libwpeditor-plus
+#
+PKG_CHECK_MODULES(MODEST_WPEDITOR,wpeditor,have_wpeditor=true,have_wpeditor=false)
+if test "x$have_wpeditor" == "xfalse"; then
+   PKG_CHECK_MODULES(MODEST_WPEDITOR,libwpeditor-plus,have_libwpeditorplus=true,have_libwpeditorplus=false)    
+   if test "x$have_libwpeditorplus" == "xtrue"; then
+       wpeditor="libwpeditor-plus"
+       AC_DEFINE_UNQUOTED(MODEST_HAVE_LIBWPEDITOR_PLUS, 1, ["Whether libwpeditor-plus is used."])              
+   else
+       AC_MSG_ERROR([you need to have either wpeditor or libwpeditor-plus installed])
+   fi
+else
+   wpeditor="wpeditor" 
+   AC_DEFINE_UNQUOTED(MODEST_HAVE_WPEDITOR, 1, ["Whether wpeditor is used."])          
+fi
+
+
+
+#
+# check the providers-data
+#
+PKG_CHECK_MODULES(MODEST_PROVIDERS_DATA,modest-providers-data,have_modest_providers_data=true,have_modest_providers_data=false)
+if test "x$have_modest_providers_data" == "xfalse"; then
+   PKG_CHECK_MODULES(MODEST_PROVIDERS_DATA,maemo-providers-data,have_maemo_providers_data=true,have_maemo_providers_data=false)
+   if test "x$have_maemo_providers_data" == "xfalse"; then
+       echo "x$have_maemo_providers_data"   
+               AC_MSG_ERROR([you need to have either modest-providers-data or maemo-providers-data installed])
+   else
+       AC_DEFINE_UNQUOTED(MODEST_HAVE_MAEMO_PROVIDERS_DATA, 1, ["Whether maemo-providers-data is used."])
+       AC_DEFINE_UNQUOTED([MODEST_PROVIDERS_DATA_PATH],["`$PKG_CONFIG --variable=path maemo-providers-data`"],[maemo-providers-data file path])
+       providers_data="maemo-providers-data"           
+   fi
+else
+  AC_DEFINE_UNQUOTED(MODEST_HAVE_MODEST_PROVIDERS_DATA, 1, ["Whether modest-providers-data is used."])
+  AC_DEFINE_UNQUOTED([MODEST_PROVIDERS_DATA_PATH],["`$PKG_CONFIG --variable=path modest-providers-data`"],[modest-providers-data file path])
+  providers_data="modest-providers-data"                                                               
+fi
+      
    
-   AC_DEFINE_UNQUOTED(MODEST_PLATFORM_MAEMO, 1, ["Whether modest is being built for the Maemo platform."])
-  desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir`
-  serviceentrydir=`$PKG_CONFIG dbus-glib-1 --variable=prefix`/share/dbus-1/services
-  localedir=`$PKG_CONFIG osso-af-settings --variable=localedir`
-  backupsettingsdir=/etc/osso-backup/applications
-  pixmapdir=`$PKG_CONFIG osso-af-settings --variable=hildonpixmapdir`
-  icon_26x26dir=$datadir/icons/hicolor/26x26/hildon
-  icon_34x34dir=$datadir/icons/hicolor/34x34/hildon
-  icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
-  icon_50x50dir=$datadir/icons/hicolor/50x50/hildon
-  icon_scalabledir=$datadir/icons/hicolor/scalable/hildon
-  pluginlibdir=`$PKG_CONFIG hildon-control-panel --variable=plugindir`
-  plugindesktopentrydir=`$PKG_CONFIG hildon-control-panel --variable=plugindesktopentrydir`
-
-  # Check for gettext support
-  AC_SUBST(GETTEXT_PACKAGE)
-  AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", ["Description"])
-
-  dbus_api="dbus_api"
-  AC_SUBST(dbus_api)
 
-  # Define as variables in Makefiles
-  AC_SUBST(desktopentrydir)
-  AC_SUBST(serviceentrydir)
-  AC_SUBST(backupsettingsdir)
-  AC_SUBST(localedir)
-  AC_SUBST(pixmapdir)
-  AC_SUBST(icon_26x26dir)
-  AC_SUBST(icon_34x34dir)
-  AC_SUBST(icon_40x40dir)
-  AC_SUBST(icon_50x50dir)
-  AC_SUBST(icon_scalabledir)
-  AC_SUBST(pluginlibdir)
-  AC_SUBST(plugindesktopentrydir)
+
+#
+# check hildon-help (only for maemo)
+#
+if test "x$with_platform" == "xmaemo"; then  
+   PKG_CHECK_MODULES(MODEST_HILDON_HELP,hildon-help,have_hildon_help=true,have_hildon_help=false)
+   if test "x$have_hildon_help" == "xfalse"; then
+      PKG_CHECK_MODULES(MODEST_HILDON_HELP,libossohelp,have_osso_help=true,have_osso_help=false)       
+      if test "x$have_osso_help" == "xtrue"; then
+       helplib="osso-help"
+       AC_DEFINE_UNQUOTED(MODEST_HAVE_OSSO_HELP, 1, ["Whether osso-help is used."])            
+      else
+       AC_MSG_ERROR([you need to have either osso-help or hildon-help installed])
+      fi
+   else
+     helplib="hildon-help"     
+     AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON_HELP, 1, ["Whether hildon-help is used."])          
+   fi
+fi
+
+
+
+#
+# check for the notification stuff (only maemo)
+#
+if test "x$with_platform" == "xmaemo"; then  
+   PKG_CHECK_MODULES(MODEST_HILDON_NOTIFY,hildon-notify libnotify,have_hildon_notify=true,have_hildon_notify=false)
+   if test "x$have_hildon_notify"="xtrue"; then
+      AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON_NOTIFY, 1, ["Whether hildon-notify is available"])      
+   fi
+fi
+
+
+#
+# check for the uri/mime stuff
+#
+if test "x$with_platform" == "xmaemo"; then  
+   PKG_CHECK_MODULES(MODEST_HILDON_MIME,libhildonmime,have_hildonmime=true,have_hildonmime=false)
+   if test "x$have_hildonmime" == "xfalse"; then
+      PKG_CHECK_MODULES(MODEST_HILDON_MIME,libossomime,have_ossomime=true,have_ossomime=false) 
+      if test "x$have_ossomime" == "xtrue"; then
+       mimelib="osso-mime"
+       AC_DEFINE_UNQUOTED(MODEST_HAVE_OSSO_MIME, 1, ["Whether osso-mime is used."])            
+      else
+       AC_MSG_ERROR([you need to have either osso-mime or hildon-mime installed])
+      fi
+   else
+     helplib="hildon-mime"     
+     AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON_MIME, 1, ["Whether hildon-mime is used."])          
+   fi
+fi
+
+
+
+#dnl wether we can and should build the 
+#dnl search plugin
+PKG_CHECK_MODULES(MODEST_OGS, libosso >= 0.8.5 libogs-1.2, have_ogs=true, have_ogs=false)
+have_ogs_support=false
+AC_ARG_ENABLE(ogs_support,
+AC_HELP_STRING([--enable-ogs-support],
+       [Build with osso global search support (yes, no)]),
+[case "${enableval}" in
+      yes)
+       if test x$have_ogs = xfalse; then
+          AC_MSG_ERROR([building of ogs support requested and libogs-1.2 not found])
+       fi
+       ;;
+      *) 
+       have_ogs_support=false
+       ;;
+esac],[have_ogs_support=$have_ogs])
+
+if test x$have_ogs_support = xtrue; then
+       AC_DEFINE_UNQUOTED(MODEST_HAVE_OGS, 1, ["Whether ogs is available."])
+fi
+
+
+
+#
+# check the version of the widgets on maemo
+#
+if test "x$with_platform" == "xmaemo"; then  
+PKG_CHECK_MODULES(MODEST_HILDON_WIDGETS, hildon-1 >= 0.9.9 hildon-fm-2, have_hildon1=true,have_hildon1=false)  
+if test "x$have_hildon1" == "xfalse"; then 
+   PKG_CHECK_MODULES(MODEST_HILDON_WIDGETS, hildon-libs >= 0.12.0 hildon-fm, have_hildon0=true,have_hildon0=false)     
+   if test "x$have_hildon0" == "xtrue"; then
+      AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON0_WIDGETS, 1, ["Whether hildon0 widgets are used."])                      
+   else
+      AC_MSG_ERROR([hildon widgets and/or hildon-fm not found])
+   fi
+else
+      AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON1_WIDGETS, 1, ["Whether hildon1 widgets are used."])                    
+fi
+fi
+
+
+
+#
+# check the version of the addressbook on maemo
+#
+if test "x$with_platform" == "xmaemo"; then  
+   PKG_CHECK_MODULES(MODEST_ABOOK, osso-addressbook-1.0 < 2.0, have_old_abook=true,have_old_abook=false)       
+   if test "x$have_old_abook" == "xtrue"; then
+      AC_DEFINE_UNQUOTED(MODEST_HAVE_OLD_ABOOK, 1, ["whether we have an old osso-addressbook"])
+   fi
+fi
+
+
+
+#FIXME: hack to set the right gettext package..
+if test "x$have_hildon1" == "xtrue"; then
+     GETTEXT_PACKAGE=osso-email
+else
+     GETTEXT_PACKAGE=modest    
+fi
+# Check for gettext support
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", ["gettext package"])
+
+
+#
+# settings for maemo platform
+#
+if test "x$with_platform" == "xmaemo"; then  
 
   # warnings are errors, but don't check format errors, because
   # it breaks with logical ids
   CFLAGS="$CFLAGS -Wno-format-extra-args -Werror"
+
+   desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir`
+   serviceentrydir=`$PKG_CONFIG dbus-glib-1 --variable=prefix`/share/dbus-1/services
+   localedir=`$PKG_CONFIG osso-af-settings --variable=localedir`
+   backupsettingsdir=/etc/osso-backup/applications
+   pixmapdir=`$PKG_CONFIG osso-af-settings --variable=hildonpixmapdir`
+   icon_26x26dir=$datadir/icons/hicolor/26x26/hildon
+   icon_34x34dir=$datadir/icons/hicolor/34x34/hildon
+   icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
+   icon_50x50dir=$datadir/icons/hicolor/50x50/hildon
+   icon_scalabledir=$datadir/icons/hicolor/scalable/hildon
+   pluginlibdir=`$PKG_CONFIG hildon-control-panel --variable=plugindir`
+   plugindesktopentrydir=`$PKG_CONFIG hildon-control-panel --variable=plugindesktopentrydir`
+
+   dbus_api="dbus_api"
+   AC_SUBST(dbus_api)
+
+   # Define as variables in Makefiles
+   AC_SUBST(desktopentrydir)
+   AC_SUBST(serviceentrydir)
+   AC_SUBST(backupsettingsdir)
+   AC_SUBST(localedir)
+   AC_SUBST(pixmapdir)
+   AC_SUBST(icon_26x26dir)
+   AC_SUBST(icon_34x34dir)
+   AC_SUBST(icon_40x40dir)
+   AC_SUBST(icon_50x50dir)
+   AC_SUBST(icon_scalabledir)
+   AC_SUBST(pluginlibdir)
+   AC_SUBST(plugindesktopentrydir)
+
 else
    # gnome frontend 
-   #AC_MSG_ERROR([Sorry, the GNOME Frontend is currently not working])
-
    PKG_CHECK_MODULES(MODEST_LIBTINYMAIL_GNOME_DESKTOP,libtinymail-gnome-desktop-1.0 libnm_glib glib-2.0 >= 2.8 gtk+-2.0 >= 2.10 libnotify)
    AC_SUBST(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS)
    AC_SUBST(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS)  
@@ -156,23 +315,6 @@ else
 
 fi
 
-dnl do we have the easy setup stuff?
-have_easysetup=false
-if test -d src/${with_platform}/easysetup; then        
-       have_easysetup=true
-       AC_DEFINE_UNQUOTED(MODEST_HAVE_EASYSETUP, 1, ["Whether the easysetup feature is available."])
-
-   if test "$hildon1" == "yes"; then   # the 'new' hildon                              
-       # Just check that the dependency exists:
-       PKG_CHECK_MODULES(MODEST_PROVIDERS_DATA, modest-providers-data)
-       AC_DEFINE_UNQUOTED([MODEST_PROVIDERS_DATA_PATH],["`$PKG_CONFIG --variable=path modest-providers-data`"],[modest-providers-data file path])
-   else
-       PKG_CHECK_MODULES(MODEST_PROVIDERS_DATA, maemo-providers-data)
-       AC_DEFINE_UNQUOTED([MODEST_PROVIDERS_DATA_PATH],["`$PKG_CONFIG --variable=path maemo-providers-data`"],[maemo-providers-data file path])
-   fi
-fi
-AM_CONDITIONAL(MODEST_HAVE_EASYSETUP,test x$have_easysetup = xtrue) 
-
 
 dnl ## setup the testing framework (ie., make check)
 build_tests=false
@@ -213,29 +355,6 @@ GTK_DOC_CHECK([1.0])
 dnl Intltool utility programs
 #AC_PROG_INTLTOOL([0.33.0],[no-xml])
 
-#dnl wether we can and should build the 
-#dnl search plugin
-PKG_CHECK_MODULES(OGS, libosso >= 0.8.5 libogs-1.2, have_ogs=true, have_ogs=false)
-
-have_ogs_support=false
-AC_ARG_ENABLE(ogs_support,
-AC_HELP_STRING([--enable-ogs-support],
-       [Build with osso global search support (yes, no)]),
-[case "${enableval}" in
-      yes)
-       if test x$have_ogs = xfalse; then
-               AC_MSG_ERROR([building of ogs support requested and libogs-1.2 not found])
-       fi
-       ;;
-      *) 
-       have_ogs_support=false
-       ;;
-esac],[have_ogs_support=$have_ogs])
-
-if test x$have_ogs_support = xtrue; then
-       AC_DEFINE_UNQUOTED(MODEST_HAVE_OGS, 1, ["Whether ogs is available."])
-fi
-
 AC_OUTPUT([
 po/Makefile.in
 Makefile
@@ -261,10 +380,17 @@ echo
 echo "modest configure results"
 echo "-----------------------------------"
 echo "Platform         : $with_platform"
-echo "Build easy setup : $have_easysetup"
+echo "Prefix           : ${prefix}"
 echo "Build tests      : $build_tests"
 echo "Build docs       : $build_docs"
-echo "libogs support   : $have_ogs_support"
+echo "Gettext Packages : $GETTEXT_PACKAGE"
+echo "Easysetup data   : $providers_data"
+echo "Editor lib       : $wpeditor"
+echo "Help lib         : $helplib"
+echo "Hildon-Notify    : $have_hildon_notify"    
+echo "LibOGS support   : $have_ogs_support"
+echo "CFLAGS           : $CFLAGS"
+echo "Gettext Packages : $GETTEXT_PACKAGE"
 echo "Debug version    : $with_debug"
 echo ""
 echo "NOTE: you should do a 'make clean' after changing architecture or platform (--with-platform=)"
index 531bd7c..a755674 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Makefile.am
-# Time-stamp: <2007-05-15 08:46:05 (djcb)>
+# Time-stamp: <2007-06-23 15:17:46 (djcb)>
 
 SUBDIRS=$(MODEST_PLATFORM) widgets $(dbus_api)
 
@@ -8,9 +8,8 @@ DIST_SUBDIRS = widgets gnome maemo dbus_api
 
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS)\
-       $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS) \
-       $(MODEST_LIBTINYMAIL_MAEMO_CFLAGS) \
-       $(OGS_CFLAGS) \
+       $(MODEST_PLATFORM_CFLAGS) \
+       $(MODEST_OGS_CFLAGS) \
        -I$(MODEST_PLATFORM) \
        -DPREFIX=\"@prefix@\" \
        -DMAEMO_CHANGES \
@@ -110,9 +109,8 @@ modest_LDFLAGS = $(MAEMO_LAUNCHER_LDFLAGS)
 
 modest_LDADD =                                                 \
        $(MODEST_GSTUFF_LIBS)                           \
-       $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS)        \
-       $(MODEST_LIBTINYMAIL_MAEMO_LIBS)                \
-       $(OGS_LIBS)                                     \
+       $(MODEST_PLATFORM_LIBS)                         \
+       $(MODEST_OGS_LIBS)                              \
        ${easysetupmaybe}                               \
        $(MODEST_PLATFORM)/libmodest-ui.la              \
        widgets/libmodest-widgets.la \
index d090eb7..1c453ee 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Makefile.am
-# Time-stamp: <2007-02-10 14:47:15 (djcb)>
+# Time-stamp: <2007-06-23 15:41:18 (djcb)>
 #
 #
 # use Automake 'trick' ==> convenience static libraries, which
@@ -8,8 +8,7 @@
 #
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
-       $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS) \
-       -DMODEST_PLATFORM_ID=$(MODEST_PLATFORM_ID) \
+       $(MODEST_PLATFORM_CFLAGS) \
        -I ${top_srcdir}/src  \
        -DPREFIX=\"@prefix@\" \
        -DPIXMAP_PREFIX=\"${datadir}/pixmaps/modest/\" \
@@ -46,7 +45,7 @@ libmodest_ui_la_SOURCES=              \
 
 LDADD = \
        $(MODEST_GSTUFF_LIBS) \
-       $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS)
+       $(MODEST_PLATFORM_LIBS)
 
 pixmapdir = $(datadir)/pixmaps/modest
 pixmap_DATA = $(PIXMAP_FILES)
index a45f376..f5bed16 100644 (file)
@@ -313,7 +313,8 @@ add_receiving_page (ModestAccountAssistant *self)
        /* Note: This ModestPairList* must exist for as long as the combo
         * that uses it, because the ModestComboBox uses the ID opaquely, 
         * so it can't know how to manage its memory. */
-       priv->receiving_transport_store_protos = modest_protocol_info_get_transport_store_protocol_pair_list (MODEST_PROTOCOL_TYPE_STORE);
+       priv->receiving_transport_store_protos = 
+               modest_protocol_info_get_transport_store_protocol_pair_list ();
        combo = modest_combo_box_new (priv->receiving_transport_store_protos, g_str_equal);
        
        g_signal_connect (G_OBJECT(combo), "changed",
index 73720f2..15d979b 100644 (file)
 SUBDIRS=easysetup
 
 INCLUDES=\
-       $(MODEST_GSTUFF_CFLAGS) \
-       $(MODEST_LIBTINYMAIL_MAEMO_CFLAGS) \
-       -I ${top_srcdir}/src/widgets  \
-       -I ${top_srcdir}/src  \
-       -DPREFIX=\"@prefix@\" \
-       -DMAEMO_CHANGES \
+       $(MODEST_GSTUFF_CFLAGS)             \
+       $(MODEST_WPEDITOR_CFLAGS)           \
+       $(MODEST_PLATFORM_CFLAGS)           \
+       $(MODEST_HILDON_WIDGETS_CFLAGS)     \
+       $(MODEST_HILDON_HELP_CFLAGS)        \
+       $(MODEST_HILDON_MIME_CFLAGS)        \
+       $(MODEST_HILDON_NOTIFY_CFLAGS)      \
+       -I ${top_srcdir}/src/widgets        \
+       -I ${top_srcdir}/src                \
+       -DPREFIX=\"@prefix@\"               \
+       -DMAEMO_CHANGES                     \
        -DPIXMAP_PREFIX=\"${datadir}/pixmaps/modest/\" \
        -DMODEST_UIDIR=\""$(datadir)/modest/ui/"\" \
        -Wall
@@ -79,7 +84,12 @@ libmodest_ui_la_SOURCES=              \
 
 libmodest_ui_la_LIBADD = \
        $(MODEST_GSTUFF_LIBS) \
-       $(MODEST_LIBTINYMAIL_MAEMO_LIBS) \
+       $(MODEST_PLATFORM_LIBS) \
+       $(MODEST_WPEDITOR_LIBS) \
+       $(MODEST_HILDON_WIDGETS_LIBS) \
+       $(MODEST_HILDON_MIME_LIBS) \
+       $(MODEST_HILDON_HELP_LIBS) \
+       $(MODEST_HILDON_NOTIFY_LIBS)\
        easysetup/libmodest-easysetup.la 
 
 PIXMAP_FILES=\
@@ -102,7 +112,7 @@ serviceentry_DATA   = com.nokia.modest.service
 desktopentry_DATA   = modest.desktop
 backupsettings_DATA = modest.conf
 
-icon_26x26_DATA    = pixmaps/modest-icon.png
+icon_26x26_DATA     = pixmaps/modest-icon.png
 
 EXTRA_DIST=\
        $(UI_FILES) \
index 2076f94..2ee68a9 100644 (file)
 # HACK_TOP_SRCDIR is temporary and should be remove.
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
-       $(MODEST_LIBTINYMAIL_MAEMO_CFLAGS) \
-       -DMODEST_PLATFORM_ID=$(MODEST_PLATFORM_ID) \
+       $(MODEST_PLATFORM_CFLAGS) \
+       $(MODEST_HILDON_WIDGETS_CFLAGS) \
+       $(MODEST_HILDON_HELP_CFLAGS) \
+       $(MODEST_HILDON_NOTIFY_CFLAGS)\
        -I ${top_srcdir}/src/widgets  \
        -I ${top_srcdir}/src  \
        -DPREFIX=\"@prefix@\" \
@@ -53,8 +55,11 @@ libmodest_easysetup_la_SOURCES=              \
        modest-easysetup-servertype-combo-box.h modest-easysetup-servertype-combo-box.c
 
 LDADD = \
+       $(MODEST_HILDON_HELP_LIBS) \
+       $(MODEST_HILDON_NOTIFY_LIBS)\
+       $(MODEST_HILDON_WIDGETS_LIBS) \
        $(MODEST_GSTUFF_LIBS) \
-       $(MODEST_LIBTINYMAIL_MAEMO_LIBS)
+       $(MODEST_PLATFORM_LIBS)
 
 # mcc_mapping will in future be provided by the operator-wizard-settings package:
 MMC_MAPPING_FILE=mcc_mapping
index a0c02d1..977357b 100644 (file)
@@ -325,10 +325,10 @@ commit_contact(EContact * contact)
        if (!contact || !book)
                return;
 
-#ifdef MODEST_HILDON_VERSION_0 
-       osso_abook_contact_commit(contact, FALSE, book);
-#else
+#ifdef MODEST_HAVE_OLD_ABOOK   
        osso_abook_contact_commit(contact, FALSE, book, NULL);
+#else
+       osso_abook_contact_commit(contact, FALSE, book);
 #endif /* MODEST_HILDON_VERSION_0 */
 }
 
index 43eff9c..03a66f3 100644 (file)
@@ -33,9 +33,33 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 #include <config.h>
 #endif
 
-#ifdef MODEST_HILDON_VERSION_0
+/* helplib to use */
+#ifdef MODEST_HAVE_OSSO_HELP
+#include <osso-helplib.h>
+#else
+#ifdef MODEST_HAVE_HILDON_HELP
+#include <hildon/hildon-help.h>
+#endif /*MODEST_HAVE_HILDON_HELP*/
+#endif /*MODEST_HAVE_OSSO_HELP*/
+
+/* mimelib to use */
+#ifdef MODEST_HAVE_OSSO_MIME
 #include <osso-mime.h>
 #include <osso-uri.h>
+#else
+#ifdef MODEST_HAVE_HILDON_MIME
+#include <hildon-mime.h>
+#include <hildon-uri.h>
+#endif /*MODEST_HAVE_HILDON_MIME*/
+#endif /*MODEST_HAVE_OSSO_MIME*/
+
+
+#ifdef MODEST_HAVE_HILDON_NOTIFY
+#include <hildon/hildon-notification.h>
+#endif /*MODEST_HILDON_NOTIFY*/
+
+
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
 #include <hildon-widgets/hildon-color-selector.h>
 #include <hildon-widgets/hildon-color-button.h>
 #include <hildon-widgets/hildon-banner.h>
@@ -49,8 +73,8 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 
 #else
 
-#include <hildon-mime.h>
-#include <hildon-uri.h>
+#ifdef MODEST_HAVE_HILDON1_WIDGETS
+
 #include <hildon/hildon-file-chooser-dialog.h>
 #include <hildon/hildon-color-chooser.h>
 #include <hildon/hildon-banner.h>
@@ -62,9 +86,8 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 #include <hildon/hildon-find-toolbar.h>
 #include <hildon/hildon-sort-dialog.h>
 #include <hildon/hildon-number-editor.h>
-#include <hildon/hildon-help.h>
-#include <hildon/hildon-notification.h>
 
+#endif /*__MODEST_HAVE_HILDON1_WIDGETS*/
+#endif /*__MODEST_HAVE_HILDON0_WIDGETS_*/
 
-#endif /*__MODEST_HILDON_VERSION_0_*/
 #endif /*__MODEST_HILDON_INCLUDES__*/
index 6e95fd6..1ee57ed 100644 (file)
@@ -202,11 +202,11 @@ modest_platform_get_file_icon_name (const gchar* name, const gchar* mime_type,
                mime_str = g_string_new (mime_type);
                g_string_ascii_down (mime_str);
        }
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_MIME
        icons = osso_mime_get_icon_names (mime_str->str, NULL);
 #else
        icons = hildon_mime_get_icon_names (mime_str->str, NULL);
-#endif /*MODEST_HILDON_VERSION_0*/
+#endif /*MODEST_HAVE_OSSO_MIME*/
        for (cursor = icons; cursor; ++cursor) {
                if (gtk_icon_theme_has_icon (gtk_icon_theme_get_default(), *cursor)) {
                        icon_name = g_strdup (*cursor);
@@ -226,8 +226,7 @@ modest_platform_get_file_icon_name (const gchar* name, const gchar* mime_type,
 
 
 
-#ifdef MODEST_HILDON_VERSION_0
-
+#ifdef MODEST_HAVE_OSSO_MIME
 gboolean 
 modest_platform_activate_uri (const gchar *uri)
 {
@@ -263,8 +262,7 @@ modest_platform_activate_uri (const gchar *uri)
        return result;
 }
 
-#else /* !MODEST_HILDON_VERSION_0*/
-
+#else /* !MODEST_HAVE_OSSO_MIME*/
 
 gboolean 
 modest_platform_activate_uri (const gchar *uri)
@@ -302,7 +300,7 @@ modest_platform_activate_uri (const gchar *uri)
 }
 
 
-#endif /* MODEST_HILDON_VERSION_0*/
+#endif /* MODEST_HAVE_OSSO_MIME*/
 
 gboolean 
 modest_platform_activate_file (const gchar *path, const gchar *mime_type)
@@ -322,7 +320,7 @@ modest_platform_activate_file (const gchar *path, const gchar *mime_type)
        uri_path = g_strconcat ("file://", path, NULL);
        
        con = osso_get_dbus_connection (osso_context);
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_MIME
        result = osso_mime_open_file_with_mime_type (con, uri_path, mime_str->str);
        g_string_free (mime_str, TRUE);
 
@@ -336,7 +334,7 @@ modest_platform_activate_file (const gchar *path, const gchar *mime_type)
        if (result != 1)
                hildon_banner_show_information (NULL, NULL, _("mcen_ni_noregistered_viewer"));
        return result != 1;
-#endif
+#endif /*MODEST_HAVE_OSSO_MIME*/
 
 }
 
@@ -353,11 +351,11 @@ delete_uri_popup (GtkWidget *menu,
        ModestPlatformPopupInfo *popup_info = (ModestPlatformPopupInfo *) userdata;
 
        g_free (popup_info->uri);
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_MIME
        osso_uri_free_actions (popup_info->actions);
 #else
        hildon_uri_free_actions (popup_info->actions);
-#endif
+#endif /*MODEST_HAVE_OSSO_MIME*/
        return FALSE;
 }
 
@@ -390,7 +388,7 @@ activate_uri_popup_item (GtkMenuItem *menu_item,
        
        /* now, the real uri-actions... */
        for (node = popup_info->actions; node != NULL; node = g_slist_next (node)) {
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_MIME
                OssoURIAction *action = (OssoURIAction *) node->data;
                if (strcmp (action_name, osso_uri_action_get_name (action))==0) {
                        osso_uri_open (popup_info->uri, action, NULL);
@@ -402,7 +400,7 @@ activate_uri_popup_item (GtkMenuItem *menu_item,
                        hildon_uri_open (popup_info->uri, action, NULL);
                        break;
                }
-#endif
+#endif /*MODEST_HAVE_OSSO_MIME*/
        }
 }
 
@@ -415,13 +413,13 @@ modest_platform_show_uri_popup (const gchar *uri)
        if (uri == NULL)
                return FALSE;
        
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_MIME
        scheme = osso_uri_get_scheme_from_uri (uri, NULL);
        actions_list = osso_uri_get_actions (scheme, NULL);
 #else
        scheme = hildon_uri_get_scheme_from_uri (uri, NULL);
        actions_list = hildon_uri_get_actions (scheme, NULL);
-#endif
+#endif /* MODEST_HAVE_OSSO_MIME */
        if (actions_list != NULL) {
                GSList *node;
                GtkWidget *menu = gtk_menu_new ();
@@ -434,7 +432,7 @@ modest_platform_show_uri_popup (const gchar *uri)
                        GtkWidget *menu_item;
                        const gchar *action_name;
                        const gchar *translation_domain;
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_MIME
                        OssoURIAction *action = (OssoURIAction *) node->data;
                        action_name = osso_uri_action_get_name (action);
                        translation_domain = osso_uri_action_get_translation_domain (action);
@@ -463,7 +461,7 @@ modest_platform_show_uri_popup (const gchar *uri)
                        } else {
                                gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
                        }
-#endif 
+#endif /*MODEST_HAVE_OSSO_MIME*/
                        gtk_widget_show (menu_item);
                }
 
@@ -963,7 +961,7 @@ modest_platform_get_global_settings_dialog ()
 void 
 modest_platform_on_new_msg (void)
 {
-#ifndef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON_NOTIFY
        HildonNotification *not;
 
        /* Create a new notification. FIXME put the right values, need
@@ -985,7 +983,7 @@ modest_platform_on_new_msg (void)
                g_error ("Failed to send notification");
                
        g_object_unref (not);
-#endif /*MODEST_HILDON_VERSION_0*/
+#endif /*MODEST_HAVE_HILDON_NOTIFY*/
 }
 
 
@@ -999,7 +997,7 @@ modest_platform_show_help (GtkWindow *parent_window,
        g_return_if_fail (osso_context);
 
        /* Show help */
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_HELP
        result = ossohelp_show (osso_context, help_id, OSSO_HELP_SHOW_DIALOG);
 #else
        result = hildon_help_show (osso_context, help_id, OSSO_HELP_SHOW_DIALOG);
index 442b590..47014e0 100644 (file)
@@ -109,7 +109,8 @@ static const FolderCols SENT_COLUMNS_TWOLINES[] = {
 static const TnyFolderType LOCAL_FOLDERS[] = {
 /*     TNY_FOLDER_TYPE_OUTBOX, */
        TNY_FOLDER_TYPE_DRAFTS,
-       TNY_FOLDER_TYPE_SENT
+       TNY_FOLDER_TYPE_SENT,
+       TNY_FOLDER_TYPE_ARCHIVE
 };
 #else
 static const TnyFolderType LOCAL_FOLDERS[] = {
@@ -133,7 +134,8 @@ static GList* new_cold_ids_gslist_from_array( const FolderCols* cols, guint col_
        return result;
 }
 
-GList * modest_init_get_default_header_view_column_ids (TnyFolderType folder_type, ModestHeaderViewStyle style)
+GList* 
+modest_init_get_default_header_view_column_ids (TnyFolderType folder_type, ModestHeaderViewStyle style)
 {
                GList *result = NULL;
                
@@ -204,7 +206,11 @@ modest_init_init_core (void)
        }
 
        /* based on the debug settings, we decide whether to overwrite old settings */
-       reset = modest_runtime_get_debug_flags () & MODEST_RUNTIME_DEBUG_FACTORY_SETTINGS;
+       /* FIXME: hack: overwrite the settings, so we're not going to see the invisble
+          headers problem -- however, this should be fixed more properly, maybe by ripping
+          out the header-column system, which is really overengineered for our modest needs */
+       //reset = modest_runtime_get_debug_flags () & MODEST_RUNTIME_DEBUG_FACTORY_SETTINGS;
+       reset = TRUE;
        if (!init_header_columns(modest_runtime_get_conf(), reset)) {
                modest_init_uninit ();
                g_printerr ("modest: failed to init header columns\n");
index ee23878..98d57c6 100644 (file)
@@ -345,10 +345,11 @@ modest_ui_actions_on_delete (GtkAction *action, ModestWindow *win)
 void
 modest_ui_actions_on_quit (GtkAction *action, ModestWindow *win)
 {
-       #ifdef MODEST_PLATFORM_MAEMO
+#ifdef MODEST_PLATFORM_MAEMO
        modest_osso_save_state();
-       #endif /* MODEST_PLATFORM_MAEMO */
-       
+#endif /* MODEST_PLATFORM_MAEMO */
+
+       g_message ("quiting...");       
        gtk_main_quit ();
 }
 
index 6efc4ba..62bfc5f 100644 (file)
@@ -1,15 +1,13 @@
 #
 # Makefile.am
-# Time-stamp: <2007-02-10 14:48:38 (djcb)>
+# Time-stamp: <2007-06-23 15:40:04 (djcb)>
 
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
-       $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS) \
-       $(MODEST_LIBTINYMAIL_MAEMO_CFLAGS) \
+       $(MODEST_PLATFORM_CFLAGS) \
        -I ${top_srcdir}/src/$(MODEST_PLATFORM) \
        -I ${top_srcdir}/src \
        -DPREFIX=\"@prefix@\" \
-       -DMODEST_PLATFORM_ID=$(MODEST_PLATFORM_ID) \
        -DPIXMAP_PREFIX=\"${datadir}/pixmaps/modest/\" \
        -Wall
 
@@ -70,5 +68,4 @@ libmodest_widgets_la_SOURCES=          \
 
 LDADD = \
        $(MODEST_GSTUFF_LIBS)                           \
-       $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS)        \
-       $(MODEST_LIBTINYMAIL_MAEMO_LIBS)                
+       $(MODEST_PLATFORM_LIBS)