* Changes in the autotools stuff affecting a lot of platform dependent
authorJose Dapena Paz <jdapena@igalia.com>
Tue, 30 Sep 2008 15:37:53 +0000 (15:37 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Tue, 30 Sep 2008 15:37:53 +0000 (15:37 +0000)
  code. Now we have a platform (maemo/gnome) and a toolkit (gtk, hildon1
  and hildon2).
* hildon2 is still pointing to maemo directory. But this change will
  enable us to begin the hildon2 port work in a different folder.
* The change is also important for MID compatibility, as it's platform
  would be gnome, and the toolkit a hildon flavor.
* Removed the HAVE_HILDON0_WIDGETS and similars. Now we have a
  MODEST_HILDON_API variable with the major number of the hildon
  library.

pmo-trunk-r5822

28 files changed:
configure.ac
src/Makefile.am
src/dbus_api/Makefile.am
src/gnome/Makefile.am
src/maemo/Makefile.am
src/maemo/easysetup/Makefile.am
src/maemo/easysetup/modest-easysetup-country-combo-box.c
src/maemo/easysetup/modest-easysetup-country-combo-box.h
src/maemo/easysetup/modest-easysetup-wizard-dialog.c
src/maemo/modest-hildon-includes.h
src/modest-defs.h
src/modest-dimming-rules-group.c
src/modest-init.c
src/modest-plugin-1.0.pc.in
src/modest-tny-account.c
src/modest-ui-actions.c
src/modest-widget-memory.c
src/widgets/Makefile.am
src/widgets/modest-global-settings-dialog.c
src/widgets/modest-gtkhtml-msg-view.c
src/widgets/modest-header-view.c
src/widgets/modest-recpt-editor.c
src/widgets/modest-ui-constants.h
src/widgets/modest-window-mgr.c
src/widgets/modest-window.c
src/widgets/modest-window.h
src/widgets/modest-wizard-dialog.c
tests/dbus_api/Makefile.am

index a5e2946..cf443cd 100644 (file)
@@ -145,6 +145,82 @@ elif test "$with_platform" = "gnome"; then
        MODEST_PLUGIN_DEFINES=" -DMODEST_PLATFORM_GNOME"
 fi
 
        MODEST_PLUGIN_DEFINES=" -DMODEST_PLATFORM_GNOME"
 fi
 
+#
+# check the widgets library
+#
+have_hildon2=false
+have_hildon1=false
+have_hildon0=false
+have_gtk=false
+PKG_CHECK_EXISTS(hildon-1, have_hildon1=true,have_hildon1=false)
+if test "$have_hildon1" = "true"; then
+   PKG_CHECK_EXISTS(hildon-1 >= 2.1.0, have_hildon2=true, have_hildon2=false)
+   PKG_CHECK_MODULES(MODEST_HILDON_WIDGETS,hildon-1 hildon-fm-2)
+   hildonpkgs="hildon-1 hildon-fm-2"
+   detected_toolkit=hildon1
+   echo "DETECTED HILDON 1 $have_hildon2."
+   if test "$have_hildon2" = "true"; then
+      echo "DETECTED HILDON 2 $have_hildon2."
+      detected_toolkit=hildon2
+   fi
+else
+   hildonpkgs="hildon-libs hildon-fm"
+   detected_toolkit=hildon1
+   PKG_CHECK_EXISTS(hildon-libs >= 0.12.0, have_hildon1=true, have_hildon1=false)
+   if test "$have_hildon1" = "false"; then
+      PKG_CHECK_EXISTS(hildon-libs, have_hildon0=true, have_hildon0=false)
+      if test "$have_hildon0" = "false"; then
+        have_gtk=true
+        detected_toolkit=gtk
+        hildonpkgs=
+      fi
+   fi
+   if test "$have_gtk" = "false"; then
+      PKG_CHECK_MODULES(MODEST_HILDON_WIDGETS,hildon-libs hildon-fm)
+   fi
+fi
+
+hildon_api=
+if test "$have_hildon0" = "true"; then
+   hildon_api=0
+elif test "$have_hildon1" = "true"; then
+   hildon_api=1
+elif test "$have_gtk" = "false"; then
+   hildon_api=`$PKG_CONFIG --modversion hildon-1 | cut -d. -f1`
+fi
+
+AC_DEFINE_UNQUOTED(MODEST_HILDON_API, $hildon_api, ["the API version of hildon"])
+MODEST_PLUGIN_DEFINES="$MODEST_PLUGIN_DEFINES -DMODEST_HILDON_API=$hildon_api"
+
+AC_ARG_WITH(toolkit, [
+Target toolkit:
+  --with-toolkit=detect  detect target toolkit (default)
+  --with-toolkit=gtk   build for Gnome
+  --with-toolkit=hildon1   build for Hildon 1.x
+  --with-toolkit=hildon2   build for Hildon 2.x
+],
+[case "${with_toolkit}" in
+       gtk|hildon1|hildon2|detect)    MODEST_TOOLKIT=${with_toolkit};;
+       *)        AC_MSG_ERROR([Unknown platform selected]);;
+esac], [MODEST_TOOLKIT=detect])
+
+if test "$MODEST_TOOLKIT" = "detect"; then
+       MODEST_TOOLKIT="$detected_toolkit"
+       with_toolkit=$detected_toolkit
+fi
+
+if test "$with_toolkit" = "hildon1"; then
+       MODEST_PLUGIN_DEFINES="$MODEST_PLUGIN_DEFINES -DMODEST_TOOLKIT_HILDON1"
+elif test "$with_platform" = "hildon2"; then
+       MODEST_PLUGIN_DEFINES="$MODEST_PLUGIN_DEFINES -DMODEST_TOOLKIT_HILDON2"
+elif test "$with_platform" = "gtk"; then
+       MODEST_PLUGIN_DEFINES="$MODEST_PLUGIN_DEFINES -DMODEST_TOOLKIT_GNOME"
+fi
+
+AC_SUBST(hildonpkgs)
+AC_SUBST(MODEST_PLUGIN_DEFINES)
+
+
 dnl Whether to use maemo-launcher or not
 AC_ARG_ENABLE([maemo-launcher],
              [AS_HELP_STRING([--enable-maemo-launcher],
 dnl Whether to use maemo-launcher or not
 AC_ARG_ENABLE([maemo-launcher],
              [AS_HELP_STRING([--enable-maemo-launcher],
@@ -162,19 +238,35 @@ then
 fi
 
 have_easysetup=false
 fi
 
 have_easysetup=false
+if test "x$with_toolkit" == "xgtk"; then
+   PKG_CHECK_MODULES(MODEST_TOOLKIT,glib-2.0 >= 2.8 gtk+-2.0 >= 2.10 libnotify)
+   AC_DEFINE_UNQUOTED(MODEST_TOOLKIT_GTK, 1, ["Whether modest is being build for the gtk toolkit."])
+   MODEST_TOOLKIT_DIR=gnome
+else
+   have_easysetup=true
+   PKG_CHECK_MODULES(MODEST_TOOLKIT,$hildonpkgs)
+   if test "$with_toolkit" = "hildon2"; then
+      AC_DEFINE_UNQUOTED(MODEST_TOOLKIT_HILDON2, 1, ["Whether modest is being build for the hildon2 toolkit."])
+      MODEST_TOOLKIT_DIR=maemo
+   else
+      AC_DEFINE_UNQUOTED(MODEST_TOOLKIT_HILDON1, 1, ["Whether modest is being build for the hildon2 toolkit."])
+      MODEST_TOOLKIT_DIR=maemo
+   fi
+    AC_DEFINE_UNQUOTED(MODEST_HAVE_EASYSETUP, 1, ["Whether we have the easysetup feature"])
+fi
+AM_CONDITIONAL(MODEST_HAVE_EASYSETUP,test "x$have_easysetup" == "xtrue")
+AC_SUBST(MODEST_TOOLKIT)
+AC_SUBST(MODEST_TOOLKIT_DIR)
+
 if test "x$with_platform" == "xgnome"; then
 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)
+      PKG_CHECK_MODULES(MODEST_PLATFORM,libtinymail-gnome-desktop-1.0 libnm_glib glib-2.0 >= 2.8 libnotify)
     AC_DEFINE_UNQUOTED(MODEST_PLATFORM_GNOME, 1, ["Whether modest is being built for the GNOME platform."])
 dnl     AC_MSG_ERROR([The GNOME Build is currently broken; please try the Maemo build instead])
 else
     AC_DEFINE_UNQUOTED(MODEST_PLATFORM_GNOME, 1, ["Whether modest is being built for the GNOME platform."])
 dnl     AC_MSG_ERROR([The GNOME Build is currently broken; please try the Maemo build instead])
 else
-    have_easysetup=true
     have_dbusapi=true
     PKG_CHECK_MODULES(MODEST_PLATFORM,libosso dbus-1 libtinymail-maemo-1.0 libebook-1.2 )
     AC_DEFINE_UNQUOTED(MODEST_PLATFORM_MAEMO, 1, ["Whether modest is being built for the MAEMO platform."])
     have_dbusapi=true
     PKG_CHECK_MODULES(MODEST_PLATFORM,libosso dbus-1 libtinymail-maemo-1.0 libebook-1.2 )
     AC_DEFINE_UNQUOTED(MODEST_PLATFORM_MAEMO, 1, ["Whether modest is being built for the MAEMO platform."])
-    AC_DEFINE_UNQUOTED(MODEST_HAVE_EASYSETUP, 1, ["Whether we have the easysetup feature"])
-fi                 
-
-AM_CONDITIONAL(MODEST_HAVE_EASYSETUP,test "x$have_easysetup" == "xtrue")
+fi
 AM_CONDITIONAL(MODEST_HAVE_DBUS_API,test "x$have_dbusapi" == "xtrue")
 AC_SUBST(MODEST_PLATFORM)
 
 AM_CONDITIONAL(MODEST_HAVE_DBUS_API,test "x$have_dbusapi" == "xtrue")
 AC_SUBST(MODEST_PLATFORM)
 
@@ -183,7 +275,7 @@ AC_SUBST(MODEST_PLATFORM)
 #
 # check for wpeditor or libwpeditor-plus (on maemo)
 #
 #
 # check for wpeditor or libwpeditor-plus (on maemo)
 #
-if test "x$with_platform" == "xmaemo"; then  
+if test "x$with_toolkit" != "xgtk"; then  
 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)    
 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)    
@@ -251,7 +343,7 @@ fi
 #
 # check hildon-help (only for maemo)
 #
 #
 # check hildon-help (only for maemo)
 #
-if test "x$with_platform" == "xmaemo"; then  
+if test "x$with_toolkit" != "xgtk"; 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)       
    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)       
@@ -272,7 +364,7 @@ fi
 #
 # check for the notification stuff (only maemo)
 #
 #
 # check for the notification stuff (only maemo)
 #
-if test "x$with_platform" == "xmaemo"; then  
+if test "x$with_toolkit" != "xgtk"; 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"])      
    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"])      
@@ -283,7 +375,7 @@ fi
 #
 # check for the uri/mime stuff
 #
 #
 # check for the uri/mime stuff
 #
-if test "x$with_platform" == "xmaemo"; then  
+if test "x$with_toolkit" != "xgtk"; 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) 
    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) 
@@ -347,30 +439,6 @@ fi
 
 
 
 
 
 
-#
-# check the version of the widgets on maemo
-#
-hildonpkgs=
-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)  
-hildonpkgs=hildon-1
-
-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)     
-   hildonpkgs=hildon-libs
-   if test "x$have_hildon0" == "xtrue"; then
-      AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON0_WIDGETS, 1, ["Whether hildon0 widgets are used."])                      
-      MODEST_PLUGIN_DEFINES+=" -DMODEST_HAVE_HILDON0_WIDGETS"
-   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
-
-AC_SUBST(hildonpkgs)
-AC_SUBST(MODEST_PLUGIN_DEFINES)
 
 #
 # check the version of the addressbook on maemo
 
 #
 # check the version of the addressbook on maemo
@@ -444,20 +512,8 @@ if test "x$with_platform" == "xmaemo"; then
    AC_SUBST(pluginlibdir)
    AC_SUBST(plugindesktopentrydir)
 
    AC_SUBST(pluginlibdir)
    AC_SUBST(plugindesktopentrydir)
 
-else
-   # gnome frontend 
-   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)  
-   AC_DEFINE_UNQUOTED(MODEST_PLATFORM_GNOME, 1, ["Whether modest is being built for the GNOME platform."])
-
-  # no dbus api for gnome
-  dbus_api=""
-  AC_SUBST(dbus_api)
-
 fi
 
 fi
 
-
 dnl ## setup the testing framework (ie., make check)
 build_tests=false
 AC_ARG_ENABLE(tests,
 dnl ## setup the testing framework (ie., make check)
 build_tests=false
 AC_ARG_ENABLE(tests,
@@ -520,6 +576,7 @@ echo
 echo "modest configure results"
 echo "-----------------------------------"
 echo "Platform         : $with_platform"
 echo "modest configure results"
 echo "-----------------------------------"
 echo "Platform         : $with_platform"
+echo "Toolkit          : $with_toolkit"
 echo "Prefix           : ${prefix}"
 echo "Build tests      : $build_tests"
 echo "Build docs       : $build_docs"
 echo "Prefix           : ${prefix}"
 echo "Build tests      : $build_tests"
 echo "Build docs       : $build_docs"
index 8144eb6..379915e 100644 (file)
@@ -2,14 +2,13 @@
 # Makefile.am
 # Time-stamp: <2008-01-06 10:18:49 (djcb)>
 
 # Makefile.am
 # Time-stamp: <2008-01-06 10:18:49 (djcb)>
 
-SUBDIRS= $(MODEST_PLATFORM) widgets $(dbus_api)
-
+SUBDIRS= $(MODEST_TOOLKIT_DIR) widgets $(dbus_api)
 DIST_SUBDIRS = widgets gnome maemo dbus_api
 
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS)                                 \
        $(MODEST_PLATFORM_CFLAGS)                               \
 DIST_SUBDIRS = widgets gnome maemo dbus_api
 
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS)                                 \
        $(MODEST_PLATFORM_CFLAGS)                               \
-       $(MODEST_HILDON_WIDGETS_CFLAGS)                         \
+       $(MODEST_TOOLKIT_CFLAGS)                                \
        $(MODEST_OGS_CFLAGS)                                    \
        $(MODEST_HILDON_HELP_CFLAGS)                            \
        $(MODEST_LIBCONIC_CFLAGS)                               \
        $(MODEST_OGS_CFLAGS)                                    \
        $(MODEST_HILDON_HELP_CFLAGS)                            \
        $(MODEST_LIBCONIC_CFLAGS)                               \
@@ -155,7 +154,7 @@ libmodest_la_SOURCES=\
 
 if MODEST_USE_DUMMY_ADDRESS_BOOK
 libmodest_la_SOURCES += modest-address-book-dummy.c
 
 if MODEST_USE_DUMMY_ADDRESS_BOOK
 libmodest_la_SOURCES += modest-address-book-dummy.c
-endif 
+endif
 
 
 libmodest_la_CFLAGS  = $(MAEMO_LAUNCHER_CFLAGS)
 
 
 libmodest_la_CFLAGS  = $(MAEMO_LAUNCHER_CFLAGS)
@@ -164,7 +163,7 @@ libmodest_la_LIBADD =                                               \
        $(MODEST_GSTUFF_LIBS)                           \
        $(MODEST_MOZEMBED_LIBS)                         \
        $(MODEST_PLATFORM_LIBS)                         \
        $(MODEST_GSTUFF_LIBS)                           \
        $(MODEST_MOZEMBED_LIBS)                         \
        $(MODEST_PLATFORM_LIBS)                         \
-       $(MODEST_HILDON_WIDGETS_LIBS)                   \
+       $(MODEST_TOOLKIT_LIBS)                  \
        $(MODEST_HILDON_HELP_LIBS)                      \
        $(MODEST_HILDON_NOTIFY_LIBS)                    \
        $(MODEST_OGS_LIBS)                              \
        $(MODEST_HILDON_HELP_LIBS)                      \
        $(MODEST_HILDON_NOTIFY_LIBS)                    \
        $(MODEST_OGS_LIBS)                              \
@@ -192,7 +191,7 @@ modest_LDADD = \
        $(MODEST_GSTUFF_LIBS)                           \
        $(MODEST_MOZEMBED_LIBS)                         \
        $(MODEST_PLATFORM_LIBS)                         \
        $(MODEST_GSTUFF_LIBS)                           \
        $(MODEST_MOZEMBED_LIBS)                         \
        $(MODEST_PLATFORM_LIBS)                         \
-       $(MODEST_HILDON_WIDGETS_LIBS)                   \
+       $(MODEST_TOOLKIT_LIBS)                  \
        $(MODEST_HILDON_HELP_LIBS)                      \
        $(MODEST_HILDON_NOTIFY_LIBS)                    \
        $(MODEST_OGS_LIBS)                              \
        $(MODEST_HILDON_HELP_LIBS)                      \
        $(MODEST_HILDON_NOTIFY_LIBS)                    \
        $(MODEST_OGS_LIBS)                              \
index b5b31f8..2b6f2d1 100644 (file)
@@ -30,7 +30,7 @@
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
        $(MODEST_PLATFORM_CFLAGS) \
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
        $(MODEST_PLATFORM_CFLAGS) \
-       $(MODEST_HILDON_WIDGETS_CFLAGS)\
+       $(MODEST_TOOLKIT_CFLAGS)\
        $(MODEST_OGS_CFLAGS) \
        -I ${top_srcdir}/src/widgets  \
        -I ${top_srcdir}/src  \
        $(MODEST_OGS_CFLAGS) \
        -I ${top_srcdir}/src/widgets  \
        -I ${top_srcdir}/src  \
@@ -51,6 +51,6 @@ libmodest_dbus_api_la_SOURCES=              \
 LDADD = \
        $(MODEST_GSTUFF_LIBS) \
        $(MODEST_PLATFORM_LIBS) \
 LDADD = \
        $(MODEST_GSTUFF_LIBS) \
        $(MODEST_PLATFORM_LIBS) \
-       $(MODEST_HILDON_WIDGETS_LIBS) \
+       $(MODEST_TOOLKIT_LIBS) \
        $(MODEST_OGS_LIBS)
 
        $(MODEST_OGS_LIBS)
 
index fe15b23..e7c8c75 100644 (file)
@@ -9,6 +9,7 @@
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
        $(MODEST_PLATFORM_CFLAGS) \
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
        $(MODEST_PLATFORM_CFLAGS) \
+       $(MODEST_TOOLKIT_CFLAGS) \
        -I ${top_srcdir}/src  \
        -DPREFIX=\"@prefix@\" \
        -DPIXMAP_PREFIX=\"${datadir}/pixmaps/modest/\" \
        -I ${top_srcdir}/src  \
        -DPREFIX=\"@prefix@\" \
        -DPIXMAP_PREFIX=\"${datadir}/pixmaps/modest/\" \
@@ -45,7 +46,8 @@ libmodest_ui_la_SOURCES=              \
 
 LDADD = \
        $(MODEST_GSTUFF_LIBS) \
 
 LDADD = \
        $(MODEST_GSTUFF_LIBS) \
-       $(MODEST_PLATFORM_LIBS)
+       $(MODEST_PLATFORM_LIBS) \
+       $(MODEST_TOOKIT_LIBS)
 
 pixmapdir = $(datadir)/pixmaps/modest
 pixmap_DATA = $(PIXMAP_FILES)
 
 pixmapdir = $(datadir)/pixmaps/modest
 pixmap_DATA = $(PIXMAP_FILES)
index 6405431..f4a8a34 100644 (file)
@@ -32,8 +32,8 @@ INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS)             \
        $(MODEST_WPEDITOR_CFLAGS)           \
        $(MODEST_PLATFORM_CFLAGS)           \
        $(MODEST_GSTUFF_CFLAGS)             \
        $(MODEST_WPEDITOR_CFLAGS)           \
        $(MODEST_PLATFORM_CFLAGS)           \
+       $(MODEST_TOOLKIT_CFLAGS)           \
        $(MODEST_ABOOK_CFLAGS)              \
        $(MODEST_ABOOK_CFLAGS)              \
-       $(MODEST_HILDON_WIDGETS_CFLAGS)     \
        $(MODEST_HILDON_HELP_CFLAGS)        \
        $(MODEST_LIBCONIC_CFLAGS)           \
        $(MODEST_HILDON_MIME_CFLAGS)        \
        $(MODEST_HILDON_HELP_CFLAGS)        \
        $(MODEST_LIBCONIC_CFLAGS)           \
        $(MODEST_HILDON_MIME_CFLAGS)        \
@@ -88,8 +88,8 @@ libmodest_ui_la_LIBADD = \
        $(MODEST_GSTUFF_LIBS) \
        $(MODEST_ABOOK_LIBS) \
        $(MODEST_PLATFORM_LIBS) \
        $(MODEST_GSTUFF_LIBS) \
        $(MODEST_ABOOK_LIBS) \
        $(MODEST_PLATFORM_LIBS) \
+       $(MODEST_TOOLKIT_LIBS) \
        $(MODEST_WPEDITOR_LIBS) \
        $(MODEST_WPEDITOR_LIBS) \
-       $(MODEST_HILDON_WIDGETS_LIBS) \
        $(MODEST_HILDON_MIME_LIBS) \
        $(MODEST_LIBCONIC_LIBS) \
        $(MODEST_HILDON_HELP_LIBS) \
        $(MODEST_HILDON_MIME_LIBS) \
        $(MODEST_LIBCONIC_LIBS) \
        $(MODEST_HILDON_HELP_LIBS) \
index 31d60f5..b921c7c 100644 (file)
@@ -30,7 +30,7 @@
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
        $(MODEST_PLATFORM_CFLAGS) \
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
        $(MODEST_PLATFORM_CFLAGS) \
-       $(MODEST_HILDON_WIDGETS_CFLAGS) \
+       $(MODEST_TOOLKIT_CFLAGS) \
        $(MODEST_HILDON_HELP_CFLAGS) \
        $(MODEST_HILDON_NOTIFY_CFLAGS)\
        -I ${top_srcdir}/src/widgets  \
        $(MODEST_HILDON_HELP_CFLAGS) \
        $(MODEST_HILDON_NOTIFY_CFLAGS)\
        -I ${top_srcdir}/src/widgets  \
@@ -56,7 +56,7 @@ libmodest_easysetup_la_SOURCES=              \
 LDADD = \
        $(MODEST_HILDON_HELP_LIBS) \
        $(MODEST_HILDON_NOTIFY_LIBS)\
 LDADD = \
        $(MODEST_HILDON_HELP_LIBS) \
        $(MODEST_HILDON_NOTIFY_LIBS)\
-       $(MODEST_HILDON_WIDGETS_LIBS) \
+       $(MODEST_TOOLKIT_LIBS) \
        $(MODEST_GSTUFF_LIBS) \
        $(MODEST_PLATFORM_LIBS)
 
        $(MODEST_GSTUFF_LIBS) \
        $(MODEST_PLATFORM_LIBS)
 
index 6d64626..0f7b3dc 100644 (file)
 
 #define MAX_LINE_LEN 128 /* max length of a line in MCC file */
 
 
 #define MAX_LINE_LEN 128 /* max length of a line in MCC file */
 
+#if MODEST_HILDON_API < 2
 G_DEFINE_TYPE (EasysetupCountryComboBox, easysetup_country_combo_box, GTK_TYPE_COMBO_BOX);
 G_DEFINE_TYPE (EasysetupCountryComboBox, easysetup_country_combo_box, GTK_TYPE_COMBO_BOX);
+#else
+G_DEFINE_TYPE (EasysetupCountryComboBox, easysetup_country_combo_box, HILDON_TYPE_PICKER_BUTTON);
+#endif
 
 typedef struct
 {
 
 typedef struct
 {
@@ -274,28 +278,47 @@ easysetup_country_combo_box_load_data(EasysetupCountryComboBox *self)
         */
        model = gtk_list_store_new (2,  G_TYPE_STRING, G_TYPE_INT);
        
         */
        model = gtk_list_store_new (2,  G_TYPE_STRING, G_TYPE_INT);
        
-       /* Setup the combo box: */
-       GtkComboBox *combobox = GTK_COMBO_BOX (self);
-       
        /* Country column:
         * The ID model column in not shown in the view. */
        GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
        g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
        /* Country column:
         * The ID model column in not shown in the view. */
        GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
        g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
-       gtk_cell_layout_pack_start(GTK_CELL_LAYOUT (combobox), renderer, TRUE);
-       gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer, 
-       "text", MODEL_COL_NAME, NULL);
+
+#if MODEST_HILDON_API < 2
+       gtk_cell_layout_pack_start(GTK_CELL_LAYOUT (self), renderer, TRUE);
+       gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (self), renderer, 
+                                       "text", MODEL_COL_NAME, NULL);
+#else
+       GtkWidget *selector = hildon_touch_selector_new ();
+       hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (self), HILDON_TOUCH_SELECTOR (selector));
+       hildon_touch_selector_append_column (hildon_picker_button_get_selector (HILDON_PICKER_BUTTON (self)),
+                                            GTK_TREE_MODEL (model),
+                                            renderer, "text", MODEL_COL_NAME, NULL);
+#endif
 
        /* Fill the model with rows: */
        load_from_file (self, model);
 
        /* Set this _after_ loading from file, it makes loading faster */
 
        /* Fill the model with rows: */
        load_from_file (self, model);
 
        /* Set this _after_ loading from file, it makes loading faster */
-       gtk_combo_box_set_model (combobox, GTK_TREE_MODEL (model));
+#if MODEST_HILDON_API < 2
+       gtk_combo_box_set_model (GTK_COMBO_BOX (self), GTK_TREE_MODEL (model));
+#else
+       hildon_touch_selector_set_model (hildon_picker_button_get_selector (HILDON_PICKER_BUTTON (self)),
+                                        0, GTK_TREE_MODEL (model));
+#endif
 }
 
 EasysetupCountryComboBox*
 easysetup_country_combo_box_new (void)
 {
 }
 
 EasysetupCountryComboBox*
 easysetup_country_combo_box_new (void)
 {
-       return g_object_new (MODEST_EASYSETUP_TYPE_COUNTRY_COMBO_BOX, NULL);
+#if MODEST_HILDON_API >= 2
+       return g_object_new (MODEST_EASYSETUP_TYPE_COUNTRY_COMBO_BOX, 
+                            "arrangement", HILDON_BUTTON_ARRANGEMENT_VERTICAL,
+                            "size", HILDON_SIZE_AUTO,
+                            NULL);
+#else
+       return g_object_new (MODEST_EASYSETUP_TYPE_COUNTRY_COMBO_BOX, 
+                            NULL);
+#endif
 }
 
 /**
 }
 
 /**
@@ -305,11 +328,25 @@ gint
 easysetup_country_combo_box_get_active_country_mcc (EasysetupCountryComboBox *self)
 {
        GtkTreeIter active;
 easysetup_country_combo_box_get_active_country_mcc (EasysetupCountryComboBox *self)
 {
        GtkTreeIter active;
-       const gboolean found = gtk_combo_box_get_active_iter (GTK_COMBO_BOX (self), &active);
+       gboolean found;
+
+#if MODEST_HILDON_API < 2
+       found = gtk_combo_box_get_active_iter (GTK_COMBO_BOX (self), &active);
+#else
+       found = hildon_touch_selector_get_selected (hildon_picker_button_get_selector
+                                                   (HILDON_PICKER_BUTTON (self)), 0, &active);
+#endif
        if (found) {
                gint mcc = 0;
        if (found) {
                gint mcc = 0;
+#if MODEST_HILDON_API < 2
                gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (self)), 
                                    &active, MODEL_COL_MCC, &mcc, -1);
                gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (self)), 
                                    &active, MODEL_COL_MCC, &mcc, -1);
+#else
+               gtk_tree_model_get (hildon_touch_selector_get_model (hildon_picker_button_get_selector
+                                                                    (HILDON_PICKER_BUTTON (self)), 
+                                                                    0), 
+                                   &active, MODEL_COL_MCC, &mcc, -1);
+#endif
                return mcc;     
        }
        return 0; /* Failed. */
                return mcc;     
        }
        return 0; /* Failed. */
@@ -328,13 +365,26 @@ easysetup_country_combo_box_set_active_country_locale (EasysetupCountryComboBox
        gint current_mcc;
        GtkTreeModel *model;
 
        gint current_mcc;
        GtkTreeModel *model;
 
+#if MODEST_HILDON_API < 2
        model = gtk_combo_box_get_model (GTK_COMBO_BOX (self));
        model = gtk_combo_box_get_model (GTK_COMBO_BOX (self));
+       g_message ("HILDON < 2");
+#else
+       model = hildon_touch_selector_get_model (hildon_picker_button_get_selector 
+                                                (HILDON_PICKER_BUTTON (self)), 0);
+       g_message ("HILDON >= 2");
+#endif
        if (!gtk_tree_model_get_iter_first (model, &iter))
                return FALSE;
        do {
                gtk_tree_model_get (model, &iter, MODEL_COL_MCC, &current_mcc, -1);
                if (priv->locale_mcc == current_mcc) {
        if (!gtk_tree_model_get_iter_first (model, &iter))
                return FALSE;
        do {
                gtk_tree_model_get (model, &iter, MODEL_COL_MCC, &current_mcc, -1);
                if (priv->locale_mcc == current_mcc) {
+#if MODEST_HILDON_API < 2
                        gtk_combo_box_set_active_iter (GTK_COMBO_BOX (self), &iter);
                        gtk_combo_box_set_active_iter (GTK_COMBO_BOX (self), &iter);
+#else
+                       hildon_touch_selector_select_iter (hildon_picker_button_get_selector 
+                                                          (HILDON_PICKER_BUTTON (self)), 0, 
+                                                          &iter, TRUE);
+#endif
                        return TRUE;
                }
        } while (gtk_tree_model_iter_next (model, &iter));
                        return TRUE;
                }
        } while (gtk_tree_model_iter_next (model, &iter));
index f8aa457..56f1741 100644 (file)
 #ifndef _MODEST_EASYSETUP_COUNTRY_COMBO_BOX
 #define _MODEST_EASYSETUP_COUNTRY_COMBO_BOX
 
 #ifndef _MODEST_EASYSETUP_COUNTRY_COMBO_BOX
 #define _MODEST_EASYSETUP_COUNTRY_COMBO_BOX
 
+#if MODEST_HILDON_API < 2
 #include <gtk/gtkcombobox.h>
 #include <gtk/gtkcombobox.h>
+#else
+#include <hildon/hildon-picker-button.h>
+#endif
 
 G_BEGIN_DECLS
 
 
 G_BEGIN_DECLS
 
@@ -56,6 +60,7 @@ G_BEGIN_DECLS
        (G_TYPE_INSTANCE_GET_CLASS ((obj), \
        MODEST_EASYSETUP_TYPE_COUNTRY_COMBO_BOX, EasysetupCountryComboBoxClass))
 
        (G_TYPE_INSTANCE_GET_CLASS ((obj), \
        MODEST_EASYSETUP_TYPE_COUNTRY_COMBO_BOX, EasysetupCountryComboBoxClass))
 
+#if MODEST_HILDON_API < 2
 typedef struct {
        GtkComboBox parent;
 } EasysetupCountryComboBox;
 typedef struct {
        GtkComboBox parent;
 } EasysetupCountryComboBox;
@@ -63,7 +68,15 @@ typedef struct {
 typedef struct {
        GtkComboBoxClass parent_class;
 } EasysetupCountryComboBoxClass;
 typedef struct {
        GtkComboBoxClass parent_class;
 } EasysetupCountryComboBoxClass;
+#else
+typedef struct {
+       HildonPickerButton parent;
+} EasysetupCountryComboBox;
 
 
+typedef struct {
+       HildonPickerButtonClass parent_class;
+} EasysetupCountryComboBoxClass;
+#endif
 GType easysetup_country_combo_box_get_type (void);
 
 EasysetupCountryComboBox* easysetup_country_combo_box_new (void);
 GType easysetup_country_combo_box_get_type (void);
 
 EasysetupCountryComboBox* easysetup_country_combo_box_new (void);
index 24b8ef7..9e61d43 100644 (file)
@@ -28,7 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
  
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
  
-
+#include <config.h>
 #include "modest-easysetup-wizard-dialog.h"
 #include <glib/gi18n.h>
 #include <gtk/gtknotebook.h>
 #include "modest-easysetup-wizard-dialog.h"
 #include <glib/gi18n.h>
 #include <gtk/gtknotebook.h>
@@ -390,8 +390,13 @@ create_page_welcome (ModestEasysetupWizardDialog *self)
        return GTK_WIDGET (box);
 }
 
        return GTK_WIDGET (box);
 }
 
+#if MODEST_HILDON_API < 2
 static void
 on_combo_account_country (GtkComboBox *widget, gpointer user_data)
 static void
 on_combo_account_country (GtkComboBox *widget, gpointer user_data)
+#else
+static void
+on_combo_account_country (HildonTouchSelector *widget, gint column, gpointer user_data)
+#endif
 {
        ModestEasysetupWizardDialog *self = MODEST_EASYSETUP_WIZARD_DIALOG (user_data);
        g_assert(self);
 {
        ModestEasysetupWizardDialog *self = MODEST_EASYSETUP_WIZARD_DIALOG (user_data);
        g_assert(self);
@@ -469,8 +474,15 @@ create_page_account_details (ModestEasysetupWizardDialog *self)
        gtk_widget_show (caption);
        
        /* connect to country combo's changed signal, so we can fill the provider combo: */
        gtk_widget_show (caption);
        
        /* connect to country combo's changed signal, so we can fill the provider combo: */
+#if MODEST_HILDON_API < 2
        g_signal_connect (G_OBJECT (priv->combo_account_country), "changed",
                          G_CALLBACK (on_combo_account_country), self);
        g_signal_connect (G_OBJECT (priv->combo_account_country), "changed",
                          G_CALLBACK (on_combo_account_country), self);
+#else
+       g_signal_connect (G_OBJECT (hildon_picker_button_get_selector 
+                                   (HILDON_PICKER_BUTTON (priv->combo_account_country))),
+                         "changed",
+                         G_CALLBACK (on_combo_account_country), self);
+#endif
             
        GtkWidget *separator = gtk_hseparator_new ();
        gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, MODEST_MARGIN_HALF);
             
        GtkWidget *separator = gtk_hseparator_new ();
        gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, MODEST_MARGIN_HALF);
index fb69e86..6dd1306 100644 (file)
@@ -58,7 +58,7 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 #include <hildon/hildon-notification.h>
 #endif /*MODEST_HILDON_NOTIFY*/
 
 #include <hildon/hildon-notification.h>
 #endif /*MODEST_HILDON_NOTIFY*/
 
-#ifdef MODEST_HAVE_HILDON0_WIDGETS
+#if MODEST_HILDON_API == 0
 #include <hildon-widgets/hildon-color-selector.h>
 #include <hildon-widgets/hildon-color-button.h>
 #include <hildon-widgets/hildon-banner.h>
 #include <hildon-widgets/hildon-color-selector.h>
 #include <hildon-widgets/hildon-color-button.h>
 #include <hildon-widgets/hildon-banner.h>
@@ -73,7 +73,7 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 
 #else
 
 
 #else
 
-#ifdef MODEST_HAVE_HILDON1_WIDGETS
+#if MODEST_HILDON_API >= 1
 #include <hildon/hildon-helper.h>
 #include <hildon/hildon-file-chooser-dialog.h>
 #include <hildon/hildon-color-chooser.h>
 #include <hildon/hildon-helper.h>
 #include <hildon/hildon-file-chooser-dialog.h>
 #include <hildon/hildon-color-chooser.h>
index 48620f2..4927cbb 100644 (file)
@@ -80,7 +80,7 @@
 #define MODEST_MAEMO_PROVIDER_DATA_FILE          PREFIX "/share/modest/provider-data/maemo-provider-data.keyfile"  
 
 
 #define MODEST_MAEMO_PROVIDER_DATA_FILE          PREFIX "/share/modest/provider-data/maemo-provider-data.keyfile"  
 
 
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
 #define MODEST_ICON_SIZE_SMALL            26
 #define MODEST_ICON_SIZE_BIG             64
 #else
 #define MODEST_ICON_SIZE_SMALL            26
 #define MODEST_ICON_SIZE_BIG             64
 #else
index 89c388f..14ea232 100644 (file)
@@ -37,7 +37,7 @@ static void modest_dimming_rules_group_class_init (ModestDimmingRulesGroupClass
 static void modest_dimming_rules_group_init       (ModestDimmingRulesGroup *obj);
 static void modest_dimming_rules_group_finalize   (GObject *obj);
 
 static void modest_dimming_rules_group_init       (ModestDimmingRulesGroup *obj);
 static void modest_dimming_rules_group_finalize   (GObject *obj);
 
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
 static void _insensitive_press_callback (GtkWidget *widget, gpointer user_data);
 #endif
 
 static void _insensitive_press_callback (GtkWidget *widget, gpointer user_data);
 #endif
 
@@ -191,7 +191,7 @@ _add_rule (ModestDimmingRulesGroup *self,
        priv->window = MODEST_WINDOW (window);
 
        widget = modest_dimming_rule_get_widget (rule);
        priv->window = MODEST_WINDOW (window);
 
        widget = modest_dimming_rule_get_widget (rule);
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        /* Connect insensitive-presss handler to show notifications */
        g_signal_connect (G_OBJECT (widget), "insensitive-press", 
                          G_CALLBACK (_insensitive_press_callback), 
        /* Connect insensitive-presss handler to show notifications */
        g_signal_connect (G_OBJECT (widget), "insensitive-press", 
                          G_CALLBACK (_insensitive_press_callback), 
@@ -334,7 +334,7 @@ _execute_widget_dimming_rule (gpointer data, gpointer user_data)
        modest_dimming_rule_process (MODEST_DIMMING_RULE(data));
 }
 
        modest_dimming_rule_process (MODEST_DIMMING_RULE(data));
 }
 
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
 static void
 _insensitive_press_callback (GtkWidget *widget, gpointer user_data)
 {
 static void
 _insensitive_press_callback (GtkWidget *widget, gpointer user_data)
 {
index 2c00d84..976c2e2 100644 (file)
@@ -51,7 +51,7 @@
 #include <libgnomevfs/gnome-vfs.h>
 #include <string.h>
 
 #include <libgnomevfs/gnome-vfs.h>
 #include <string.h>
 
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
 #include "modest-hildon-includes.h"
 #endif
 #include <locale.h>
 #include "modest-hildon-includes.h"
 #endif
 #include <locale.h>
@@ -111,7 +111,7 @@ static const FolderCols SENT_COLUMNS_TWOLINES[] = {
        {MODEST_HEADER_VIEW_COLUMN_COMPACT_HEADER_OUT,180, 0},
 };
 
        {MODEST_HEADER_VIEW_COLUMN_COMPACT_HEADER_OUT,180, 0},
 };
 
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
 static const TnyFolderType LOCAL_FOLDERS[] = {
 /*     TNY_FOLDER_TYPE_OUTBOX, */
        TNY_FOLDER_TYPE_DRAFTS,
 static const TnyFolderType LOCAL_FOLDERS[] = {
 /*     TNY_FOLDER_TYPE_OUTBOX, */
        TNY_FOLDER_TYPE_DRAFTS,
@@ -125,7 +125,7 @@ static const TnyFolderType LOCAL_FOLDERS[] = {
        TNY_FOLDER_TYPE_TRASH,
        TNY_FOLDER_TYPE_ARCHIVE 
 };
        TNY_FOLDER_TYPE_TRASH,
        TNY_FOLDER_TYPE_ARCHIVE 
 };
-#endif /* MODEST_PLATFORM_MAEMO */
+#endif /* MODEST_TOOLKIT_GTK */
 
 static GList*
 new_cold_ids_gslist_from_array( const FolderCols* cols, guint col_num)
 
 static GList*
 new_cold_ids_gslist_from_array( const FolderCols* cols, guint col_num)
@@ -625,10 +625,10 @@ init_stock_icons (void)
                gint i;
 
                static GtkStockItem items[] = {
                gint i;
 
                static GtkStockItem items[] = {
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
                        { MODEST_STOCK_SORT, "sort mail", 0, 0, NULL },
                        { MODEST_STOCK_REFRESH, "refresh mail", 0, 0, NULL },
                        { MODEST_STOCK_SORT, "sort mail", 0, 0, NULL },
                        { MODEST_STOCK_REFRESH, "refresh mail", 0, 0, NULL },
-#endif /*MODEST_PLATFORM_MAEMO*/
+#endif /*MODEST_TOOLKIT_GTK*/
                        { MODEST_STOCK_SPLIT_VIEW, "split view", 0, 0, NULL },
                        { MODEST_STOCK_MAIL_SEND, "send mail", 0, 0, NULL },
                        { MODEST_STOCK_NEW_MAIL, "new mail", 0, 0, NULL },
                        { MODEST_STOCK_SPLIT_VIEW, "split view", 0, 0, NULL },
                        { MODEST_STOCK_MAIL_SEND, "send mail", 0, 0, NULL },
                        { MODEST_STOCK_NEW_MAIL, "new mail", 0, 0, NULL },
@@ -643,10 +643,10 @@ init_stock_icons (void)
                };
       
                static gchar *items_names [] = {
                };
       
                static gchar *items_names [] = {
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
                        MODEST_TOOLBAR_ICON_SORT,
                        MODEST_TOOLBAR_ICON_REFRESH,
                        MODEST_TOOLBAR_ICON_SORT,
                        MODEST_TOOLBAR_ICON_REFRESH,
-#endif /*MODEST_PLATFORM_MAEMO*/
+#endif /*MODEST_TOOLKIT_GTK*/
                        MODEST_TOOLBAR_ICON_SPLIT_VIEW,
                        MODEST_TOOLBAR_ICON_MAIL_SEND,
                        MODEST_TOOLBAR_ICON_NEW_MAIL,
                        MODEST_TOOLBAR_ICON_SPLIT_VIEW,
                        MODEST_TOOLBAR_ICON_MAIL_SEND,
                        MODEST_TOOLBAR_ICON_NEW_MAIL,
@@ -675,7 +675,7 @@ init_stock_icons (void)
                /* Register icons to accompany stock items */
                for (i = 0; i < G_N_ELEMENTS (items); i++) {
 
                /* Register icons to accompany stock items */
                for (i = 0; i < G_N_ELEMENTS (items); i++) {
 
-#ifdef MODEST_PLATFORM_MAEMO  /* MODES_PLATFORM_ID: 1 ==> gnome, 2==> maemo */ 
+#ifndef MODEST_PLATFORM_GTK  
                        pixbuf = gtk_icon_theme_load_icon (current_theme,
                                                           items_names[i],
                                                           26,
                        pixbuf = gtk_icon_theme_load_icon (current_theme,
                                                           items_names[i],
                                                           26,
index 63d5543..ca07b08 100644 (file)
@@ -13,6 +13,7 @@ Cflags: -I${includedir}/modest-plugin-1.0 @MODEST_PLUGIN_DEFINES@
        $(MODEST_GSTUFF_LIBS)                           \
        $(MODEST_MOZEMBED_LIBS)                         \
        $(MODEST_PLATFORM_LIBS)                         \
        $(MODEST_GSTUFF_LIBS)                           \
        $(MODEST_MOZEMBED_LIBS)                         \
        $(MODEST_PLATFORM_LIBS)                         \
+       $(MODEST_TOOLKIT_LIBS)                          \
        $(MODEST_HILDON_WIDGETS_LIBS)                   \
        $(MODEST_HILDON_HELP_LIBS)                      \
        $(MODEST_HILDON_NOTIFY_LIBS)                    \
        $(MODEST_HILDON_WIDGETS_LIBS)                   \
        $(MODEST_HILDON_HELP_LIBS)                      \
        $(MODEST_HILDON_NOTIFY_LIBS)                    \
index ac6810d..63e87ec 100644 (file)
@@ -48,8 +48,8 @@
 #include <tny-merge-folder.h>
 #include <modest-debug.h>
 #include <string.h>
 #include <tny-merge-folder.h>
 #include <modest-debug.h>
 #include <string.h>
-#ifdef MODEST_PLATFORM_MAEMO
-#ifdef MODEST_HAVE_HILDON0_WIDGETS
+#ifndef MODEST_TOOLKIT_GTK
+#if MODEST_HILDON_API == 0
 #include <hildon-widgets/hildon-file-system-info.h>
 #else
 #include <hildon/hildon-file-system-info.h>
 #include <hildon-widgets/hildon-file-system-info.h>
 #else
 #include <hildon/hildon-file-system-info.h>
@@ -591,7 +591,7 @@ typedef struct
 
 
 
 
 
 
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
 /* Gets the memory card name: */
 static void 
 on_modest_file_system_info (HildonFileSystemInfoHandle *handle,
 /* Gets the memory card name: */
 static void 
 on_modest_file_system_info (HildonFileSystemInfoHandle *handle,
@@ -632,7 +632,7 @@ on_modest_file_system_info (HildonFileSystemInfoHandle *handle,
 
 void modest_tny_account_get_mmc_account_name (TnyStoreAccount* self, ModestTnyAccountGetMmcAccountNameCallback callback, gpointer user_data)
 {
 
 void modest_tny_account_get_mmc_account_name (TnyStoreAccount* self, ModestTnyAccountGetMmcAccountNameCallback callback, gpointer user_data)
 {
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        /* Just use the hard-coded path for the single memory card,
         * rather than try to figure out the path to the specific card by 
         * looking at the maildir URI:
        /* Just use the hard-coded path for the single memory card,
         * rather than try to figure out the path to the specific card by 
         * looking at the maildir URI:
index 6890a4e..2239f56 100644 (file)
 
 #ifdef MODEST_PLATFORM_MAEMO
 #include "maemo/modest-osso-state-saving.h"
 
 #ifdef MODEST_PLATFORM_MAEMO
 #include "maemo/modest-osso-state-saving.h"
+#endif /* MODEST_PLATFORM_MAEMO */
+#ifndef MODEST_TOOLKIT_GTK
 #include "maemo/modest-hildon-includes.h"
 #include "maemo/modest-connection-specific-smtp-window.h"
 #include "maemo/modest-hildon-includes.h"
 #include "maemo/modest-connection-specific-smtp-window.h"
-#endif /* MODEST_PLATFORM_MAEMO */
+#endif /* !MODEST_TOOLKIT_GTK */
 #include <modest-utils.h>
 
 #include "widgets/modest-ui-constants.h"
 #include <modest-utils.h>
 
 #include "widgets/modest-ui-constants.h"
@@ -673,7 +675,7 @@ modest_ui_actions_on_smtp_servers (GtkAction *action, ModestWindow *win)
         * because it requires an API (libconic) to detect different connection 
         * possiblities.
         */
         * because it requires an API (libconic) to detect different connection 
         * possiblities.
         */
-#ifdef MODEST_PLATFORM_MAEMO /* Defined in config.h */
+#ifndef MODEST_TOOLKIT_GTK /* Defined in config.h */
        
        /* Create the window if necessary: */
        GtkWidget *specific_window = GTK_WIDGET (modest_connection_specific_smtp_window_new ());
        
        /* Create the window if necessary: */
        GtkWidget *specific_window = GTK_WIDGET (modest_connection_specific_smtp_window_new ());
@@ -685,7 +687,7 @@ modest_ui_actions_on_smtp_servers (GtkAction *action, ModestWindow *win)
        modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), 
                                     GTK_WINDOW (specific_window));
        gtk_widget_show (specific_window);
        modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), 
                                     GTK_WINDOW (specific_window));
        gtk_widget_show (specific_window);
-#endif /* MODEST_PLATFORM_MAEMO */
+#endif /* !MODEST_TOOLKIT_GTK */
 }
 
 void
 }
 
 void
@@ -2452,7 +2454,7 @@ modest_ui_actions_on_folder_selection_changed (ModestFolderView *folder_view,
                           already being done by the sort
                           dialog. Remove it when the GNOME version
                           has the same behaviour */
                           already being done by the sort
                           dialog. Remove it when the GNOME version
                           has the same behaviour */
-#ifdef MODEST_PLATFORM_GNOME
+#ifdef MODEST_TOOLKIT_GTK
                        if (modest_main_window_get_contents_style (main_window) ==
                            MODEST_MAIN_WINDOW_CONTENTS_STYLE_HEADERS)
                                modest_widget_memory_save (conf, G_OBJECT (header_view), 
                        if (modest_main_window_get_contents_style (main_window) ==
                            MODEST_MAIN_WINDOW_CONTENTS_STYLE_HEADERS)
                                modest_widget_memory_save (conf, G_OBJECT (header_view), 
@@ -3032,7 +3034,7 @@ modest_ui_actions_on_remove_attachments (GtkAction *action,
 }
 
 
 }
 
 
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
 typedef struct {
        guint handler;
        gchar *name;
 typedef struct {
        guint handler;
        gchar *name;
@@ -3087,7 +3089,7 @@ do_create_folder_cb (ModestMailOperation *mail_op,
                /* Try again. Do *NOT* show any error because the mail
                   operations system will do it for us because we
                   created the mail_op with new_with_error_handler */
                /* Try again. Do *NOT* show any error because the mail
                   operations system will do it for us because we
                   created the mail_op with new_with_error_handler */
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
                CreateFolderHelper *helper;
                helper = g_slice_new0 (CreateFolderHelper);
                helper->name = g_strdup (suggested_name);
                CreateFolderHelper *helper;
                helper = g_slice_new0 (CreateFolderHelper);
                helper->name = g_strdup (suggested_name);
@@ -3538,7 +3540,7 @@ modest_ui_actions_on_password_requested (TnyAccountStore *account_store,
        if (remember)
                *remember = TRUE;
                
        if (remember)
                *remember = TRUE;
                
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        /* Maemo uses a different (awkward) button order,
         * It should probably just use gtk_alternative_dialog_button_order ().
         */
        /* Maemo uses a different (awkward) button order,
         * It should probably just use gtk_alternative_dialog_button_order ().
         */
@@ -3559,7 +3561,7 @@ modest_ui_actions_on_password_requested (TnyAccountStore *account_store,
                                              GTK_STOCK_OK,
                                              GTK_RESPONSE_ACCEPT,
                                              NULL);
                                              GTK_STOCK_OK,
                                              GTK_RESPONSE_ACCEPT,
                                              NULL);
-#endif /* MODEST_PLATFORM_MAEMO */
+#endif /* !MODEST_TOOLKIT_GTK */
 
        modest_window_mgr_set_modal (modest_runtime_get_window_mgr(), GTK_WINDOW (dialog));
        
 
        modest_window_mgr_set_modal (modest_runtime_get_window_mgr(), GTK_WINDOW (dialog));
        
@@ -3600,7 +3602,7 @@ modest_ui_actions_on_password_requested (TnyAccountStore *account_store,
         */
        gtk_widget_set_sensitive (entry_username, FALSE);
 
         */
        gtk_widget_set_sensitive (entry_username, FALSE);
 
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        /* Auto-capitalization is the default, so let's turn it off: */
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (entry_username), HILDON_GTK_INPUT_MODE_FULL);
        
        /* Auto-capitalization is the default, so let's turn it off: */
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (entry_username), HILDON_GTK_INPUT_MODE_FULL);
        
@@ -3618,14 +3620,14 @@ modest_ui_actions_on_password_requested (TnyAccountStore *account_store,
 #else 
        gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox), entry_username,
                            TRUE, FALSE, 0);
 #else 
        gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox), entry_username,
                            TRUE, FALSE, 0);
-#endif /* MODEST_PLATFORM_MAEMO */     
+#endif /* !MODEST_TOOLKIT_GTK */       
                            
        /* password: */
        GtkWidget *entry_password = gtk_entry_new ();
        gtk_entry_set_visibility (GTK_ENTRY(entry_password), FALSE);
        /* gtk_entry_set_invisible_char (GTK_ENTRY(entry_password), "*"); */
        
                            
        /* password: */
        GtkWidget *entry_password = gtk_entry_new ();
        gtk_entry_set_visibility (GTK_ENTRY(entry_password), FALSE);
        /* gtk_entry_set_invisible_char (GTK_ENTRY(entry_password), "*"); */
        
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        /* Auto-capitalization is the default, so let's turn it off: */
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (entry_password), 
                HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE);
        /* Auto-capitalization is the default, so let's turn it off: */
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (entry_password), 
                HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE);
@@ -3640,7 +3642,7 @@ modest_ui_actions_on_password_requested (TnyAccountStore *account_store,
 #else 
        gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox), entry_password,
                            TRUE, FALSE, 0);
 #else 
        gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox), entry_password,
                            TRUE, FALSE, 0);
-#endif /* MODEST_PLATFORM_MAEMO */     
+#endif /* !MODEST_TOOLKIT_GTK */       
 
        if (initial_username != NULL)
                gtk_widget_grab_focus (GTK_WIDGET (entry_password));
 
        if (initial_username != NULL)
                gtk_widget_grab_focus (GTK_WIDGET (entry_password));
@@ -4465,7 +4467,7 @@ on_move_to_dialog_folder_selection_changed (ModestFolderView* self,
                return;
 
        children = gtk_container_get_children (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area));
                return;
 
        children = gtk_container_get_children (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area));
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        ok_button = GTK_WIDGET (children->next->next->data);
        new_button = GTK_WIDGET (children->next->data);
 #else
        ok_button = GTK_WIDGET (children->next->next->data);
        new_button = GTK_WIDGET (children->next->data);
 #else
@@ -4610,7 +4612,7 @@ create_move_to_dialog (GtkWindow *win,
                                              GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR | GTK_DIALOG_DESTROY_WITH_PARENT,
                                              NULL);
 
                                              GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR | GTK_DIALOG_DESTROY_WITH_PARENT,
                                              NULL);
 
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        gtk_dialog_add_button (GTK_DIALOG (dialog), _("mcen_bd_dialog_ok"), GTK_RESPONSE_ACCEPT);
        /* We do this manually so GTK+ does not associate a response ID for
         * the button. */
        gtk_dialog_add_button (GTK_DIALOG (dialog), _("mcen_bd_dialog_ok"), GTK_RESPONSE_ACCEPT);
        /* We do this manually so GTK+ does not associate a response ID for
         * the button. */
@@ -4635,7 +4637,7 @@ create_move_to_dialog (GtkWindow *win,
                                         GTK_POLICY_AUTOMATIC,
                                         GTK_POLICY_AUTOMATIC);
 
                                         GTK_POLICY_AUTOMATIC,
                                         GTK_POLICY_AUTOMATIC);
 
-#ifndef MODEST_PLATFORM_MAEMO
+#ifdef MODEST_TOOLKIT_GTK
        gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
 #endif
 
        gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
 #endif
 
@@ -4718,7 +4720,7 @@ create_move_to_dialog (GtkWindow *win,
                            scroll, TRUE, TRUE, 0);
 
        gtk_widget_show_all (GTK_WIDGET(GTK_DIALOG(dialog)->vbox));
                            scroll, TRUE, TRUE, 0);
 
        gtk_widget_show_all (GTK_WIDGET(GTK_DIALOG(dialog)->vbox));
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        gtk_window_set_default_size (GTK_WINDOW (dialog), 300, 300);
 #else
        gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 400);
        gtk_window_set_default_size (GTK_WINDOW (dialog), 300, 300);
 #else
        gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 400);
index 56ab18a..1409a97 100644 (file)
@@ -194,7 +194,7 @@ restore_settings_window (ModestConf *conf, GtkWindow *win, const gchar *name)
           gtk_window_set_default_size() makes "drag-motion" signal
           report bad coordinates, so drag-and-drop do not work
           properly */
           gtk_window_set_default_size() makes "drag-motion" signal
           report bad coordinates, so drag-and-drop do not work
           properly */
-#ifdef MODEST_PLATFORM_GNOME
+#ifdef MODEST_TOOLKIT_GTK
        if (height && width)
                gtk_window_set_default_size (win, width, height);
 #endif
        if (height && width)
                gtk_window_set_default_size (win, width, height);
 #endif
index 535adc8..ccdef8f 100644 (file)
@@ -5,7 +5,7 @@
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
        $(MODEST_PLATFORM_CFLAGS) \
 INCLUDES=\
        $(MODEST_GSTUFF_CFLAGS) \
        $(MODEST_PLATFORM_CFLAGS) \
-       $(MODEST_HILDON_WIDGETS_CFLAGS) \
+       $(MODEST_TOOLKIT_CFLAGS) \
        $(MODEST_HILDON_HELP_CFLAGS)    \
        $(MODEST_MOZEMBED_CFLAGS) \
        $(MODEST_HILDON_NOTIFY_CFLAGS) \
        $(MODEST_HILDON_HELP_CFLAGS)    \
        $(MODEST_MOZEMBED_CFLAGS) \
        $(MODEST_HILDON_NOTIFY_CFLAGS) \
@@ -128,4 +128,4 @@ LDADD = \
        $(MODEST_GSTUFF_LIBS)                           \
        $(MODEST_MOZEMBED_LIBS)                         \
        $(MODEST_PLATFORM_LIBS)                         \
        $(MODEST_GSTUFF_LIBS)                           \
        $(MODEST_MOZEMBED_LIBS)                         \
        $(MODEST_PLATFORM_LIBS)                         \
-       $(MODEST_HILDON_WIDGETS_LIBS) 
+       $(MODEST_TOOLKIT_LIBS) 
index 0c18ea7..69b0ef5 100644 (file)
 #include "modest-tny-msg.h"
 #include "modest-platform.h"
 #include "widgets/modest-combo-box.h"
 #include "modest-tny-msg.h"
 #include "modest-platform.h"
 #include "widgets/modest-combo-box.h"
-#ifdef MODEST_PLATFORM_MAEMO
-#ifdef MODEST_HAVE_HILDON0_WIDGETS
+#ifndef MODEST_TOOLKIT_GTK
+#if MODEST_HILDON_API == 0
 #include <hildon-widgets/hildon-number-editor.h>
 #else
 #include <hildon/hildon-number-editor.h>
 #include <hildon-widgets/hildon-number-editor.h>
 #else
 #include <hildon/hildon-number-editor.h>
-#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
+#endif /*MODEST_HILDON_API = 0*/
 #endif
 /* include other impl specific header files */
 
 #endif
 /* include other impl specific header files */
 
@@ -168,7 +168,7 @@ _modest_global_settings_dialog_get_connected_via (void)
        GSList *list = NULL;
        const gchar *message;
 
        GSList *list = NULL;
        const gchar *message;
 
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        const gchar *env_var = getenv ("OSSO_PRODUCT_HARDWARE");
        /* Check if WIMAX is available */
        if (env_var && !strncmp (env_var, "RX-48", 5))
        const gchar *env_var = getenv ("OSSO_PRODUCT_HARDWARE");
        /* Check if WIMAX is available */
        if (env_var && !strncmp (env_var, "RX-48", 5))
@@ -290,7 +290,7 @@ _modest_global_settings_dialog_load_conf (ModestGlobalSettingsDialog *self)
        }
        /* It's better to do this in the subclasses, but it's just one
           line, so we'll leave it here for the moment */
        }
        /* It's better to do this in the subclasses, but it's just one
           line, so we'll leave it here for the moment */
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        hildon_number_editor_set_value (HILDON_NUMBER_EDITOR (priv->size_limit), value);
 #else
        gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->size_limit), value);
        hildon_number_editor_set_value (HILDON_NUMBER_EDITOR (priv->size_limit), value);
 #else
        gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->size_limit), value);
@@ -330,7 +330,7 @@ get_current_settings (ModestGlobalSettingsDialogPrivate *priv,
        state->auto_update = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->auto_update));
        id = modest_combo_box_get_active_id (MODEST_COMBO_BOX (priv->connect_via));
        state->connect_via = *id;
        state->auto_update = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->auto_update));
        id = modest_combo_box_get_active_id (MODEST_COMBO_BOX (priv->connect_via));
        state->connect_via = *id;
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        state->size_limit = hildon_number_editor_get_value (HILDON_NUMBER_EDITOR (priv->size_limit));
 #else
        state->size_limit = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->size_limit));
        state->size_limit = hildon_number_editor_get_value (HILDON_NUMBER_EDITOR (priv->size_limit));
 #else
        state->size_limit = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->size_limit));
index 3bacb9b..75c5526 100644 (file)
@@ -50,9 +50,9 @@
 #include <widgets/modest-ui-constants.h>
 
 /* FIXNE: we should have no maemo-deps in widgets/ */
 #include <widgets/modest-ui-constants.h>
 
 /* FIXNE: we should have no maemo-deps in widgets/ */
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
 #include "maemo/modest-hildon-includes.h"
 #include "maemo/modest-hildon-includes.h"
-#endif /*MODEST_PLATFORM_MAEMO*/
+#endif /*!MODEST_TOOLKIT_GTK*/
 
 
 /* 'private'/'protected' functions */
 
 
 /* 'private'/'protected' functions */
index bd101d9..78ec1b3 100644 (file)
@@ -379,7 +379,7 @@ modest_header_view_set_columns (ModestHeaderView *self, const GList *columns, Tn
        g_object_set_data (G_OBJECT (renderer_recpt_box), "date-renderer", renderer_compact_date_or_status);
 
        g_object_set (G_OBJECT (renderer_subject_box), "yalign", 1.0, NULL);
        g_object_set_data (G_OBJECT (renderer_recpt_box), "date-renderer", renderer_compact_date_or_status);
 
        g_object_set (G_OBJECT (renderer_subject_box), "yalign", 1.0, NULL);
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        gtk_cell_renderer_set_fixed_size (renderer_subject_box, -1, 32);
        gtk_cell_renderer_set_fixed_size (renderer_recpt_box, -1, 32);
 #endif
        gtk_cell_renderer_set_fixed_size (renderer_subject_box, -1, 32);
        gtk_cell_renderer_set_fixed_size (renderer_recpt_box, -1, 32);
 #endif
@@ -404,7 +404,7 @@ modest_header_view_set_columns (ModestHeaderView *self, const GList *columns, Tn
        g_object_set (G_OBJECT (renderer_attach),
                      "yalign", 0.0, NULL);
 
        g_object_set (G_OBJECT (renderer_attach),
                      "yalign", 0.0, NULL);
 
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        gtk_cell_renderer_set_fixed_size (renderer_attach, 32, 26);
        gtk_cell_renderer_set_fixed_size (renderer_priority, 32, 26);
        gtk_cell_renderer_set_fixed_size (renderer_compact_header, -1, 64);
        gtk_cell_renderer_set_fixed_size (renderer_attach, 32, 26);
        gtk_cell_renderer_set_fixed_size (renderer_priority, 32, 26);
        gtk_cell_renderer_set_fixed_size (renderer_compact_header, -1, 64);
@@ -787,7 +787,7 @@ modest_header_view_get_selected_headers (ModestHeaderView *self)
 static void
 scroll_to_selected (ModestHeaderView *self, GtkTreeIter *iter, gboolean up)
 {
 static void
 scroll_to_selected (ModestHeaderView *self, GtkTreeIter *iter, gboolean up)
 {
-#ifdef MODEST_PLATFORM_GNOME 
+#ifdef MODEST_TOOLKIT_GTK 
 
        GtkTreePath *selected_path;
        GtkTreePath *start, *end;
 
        GtkTreePath *selected_path;
        GtkTreePath *start, *end;
@@ -812,7 +812,7 @@ scroll_to_selected (ModestHeaderView *self, GtkTreeIter *iter, gboolean up)
        gtk_tree_path_free (start);
        gtk_tree_path_free (end);
 
        gtk_tree_path_free (start);
        gtk_tree_path_free (end);
 
-#endif /* MODEST_PLATFORM_GNOME */
+#endif /* MODEST_TOOLKIT_GTK */
 }
 
 
 }
 
 
index a1d408e..11e1232 100644 (file)
@@ -45,9 +45,9 @@
 #include <gtk/gtk.h>
 
 /* FIXNE: we should have no maemo-deps in widgets/ */
 #include <gtk/gtk.h>
 
 /* FIXNE: we should have no maemo-deps in widgets/ */
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
 #include "maemo/modest-hildon-includes.h"
 #include "maemo/modest-hildon-includes.h"
-#endif /*MODEST_PLATFORM_MAEMO*/
+#endif /*!MODEST_TOOLKIT_GTK*/
 
 
 static GObjectClass *parent_class = NULL;
 
 
 static GObjectClass *parent_class = NULL;
index 7eb9ffb..a16ed12 100644 (file)
@@ -35,7 +35,7 @@
  * title "RE: Standard widget spacing and padding?":
  */
 
  * title "RE: Standard widget spacing and padding?":
  */
 
-#ifdef MODEST_PLATFORM_MAEMO 
+#ifndef MODEST_TOOLKIT_GTK 
 #define MODEST_MARGIN_DEFAULT 6
 #define MODEST_MARGIN_DOUBLE 12
 #define MODEST_MARGIN_TRIPLE 18
 #define MODEST_MARGIN_DEFAULT 6
 #define MODEST_MARGIN_DOUBLE 12
 #define MODEST_MARGIN_TRIPLE 18
@@ -45,8 +45,8 @@
 #define MODEST_DIALOG_WINDOW_MIN_HEIGHT 172
 #define MODEST_DIALOG_WINDOW_MAX_WIDTH 642
 #define MODEST_DIALOG_WINDOW_MIN_WIDTH 172
 #define MODEST_DIALOG_WINDOW_MIN_HEIGHT 172
 #define MODEST_DIALOG_WINDOW_MAX_WIDTH 642
 #define MODEST_DIALOG_WINDOW_MIN_WIDTH 172
+#else /* MODEST_TOOLKIT_GTK */
 /* TODO: review this values with GNOME HIG */
 /* TODO: review this values with GNOME HIG */
-#else
 #define MODEST_MARGIN_DEFAULT 6
 #define MODEST_MARGIN_DOUBLE 12
 #define MODEST_MARGIN_TRIPLE 18
 #define MODEST_MARGIN_DEFAULT 6
 #define MODEST_MARGIN_DOUBLE 12
 #define MODEST_MARGIN_TRIPLE 18
index 1d84505..fb88abf 100644 (file)
@@ -546,7 +546,7 @@ get_show_toolbar_key (GType window_type,
        return key;
 }
 
        return key;
 }
 
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
 static void
 on_window_is_topmost (GObject    *gobject,
                      GParamSpec *arg1,
 static void
 on_window_is_topmost (GObject    *gobject,
                      GParamSpec *arg1,
@@ -672,7 +672,7 @@ modest_window_mgr_register_window (ModestWindowMgr *self,
        /* Listen to window state changes. Unfortunately
           window-state-event does not properly work for the Maemo
           version, so we need to use is-topmost and the ifdef */
        /* Listen to window state changes. Unfortunately
           window-state-event does not properly work for the Maemo
           version, so we need to use is-topmost and the ifdef */
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
        priv->window_state_uids = 
                modest_signal_mgr_connect (priv->window_state_uids, 
                                           G_OBJECT (window), 
        priv->window_state_uids = 
                modest_signal_mgr_connect (priv->window_state_uids, 
                                           G_OBJECT (window), 
@@ -904,7 +904,7 @@ modest_window_mgr_unregister_window (ModestWindowMgr *self,
 
        /* Disconnect the "window-state-event" handler, we won't need it anymore */
        if (priv->window_state_uids) {
 
        /* Disconnect the "window-state-event" handler, we won't need it anymore */
        if (priv->window_state_uids) {
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
                priv->window_state_uids = 
                        modest_signal_mgr_disconnect (priv->window_state_uids, 
                                                      G_OBJECT (window), 
                priv->window_state_uids = 
                        modest_signal_mgr_disconnect (priv->window_state_uids, 
                                                      G_OBJECT (window), 
index 32b415e..acf9d90 100644 (file)
@@ -88,7 +88,7 @@ modest_window_get_type (void)
                        (GInstanceInitFunc) modest_window_init,
                        NULL
                };
                        (GInstanceInitFunc) modest_window_init,
                        NULL
                };
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
                parent_type = HILDON_TYPE_WINDOW;
 #else
                parent_type = GTK_TYPE_WINDOW;
                parent_type = HILDON_TYPE_WINDOW;
 #else
                parent_type = GTK_TYPE_WINDOW;
index 03acc1c..cd159d4 100644 (file)
@@ -45,18 +45,16 @@ G_BEGIN_DECLS
  * admittedly, the ifdefs for gtk and maemo are rather ugly; still
  * this way is probably the easiest to maintain
  */
  * admittedly, the ifdefs for gtk and maemo are rather ugly; still
  * this way is probably the easiest to maintain
  */
-#ifdef MODEST_PLATFORM_GNOME
+#ifdef MODEST_TOOLKIT_GTK
 #include <gtk/gtkwindow.h>
 typedef GtkWindow      ModestWindowParent;
 typedef GtkWindowClass ModestWindowParentClass;
 #include <gtk/gtkwindow.h>
 typedef GtkWindow      ModestWindowParent;
 typedef GtkWindowClass ModestWindowParentClass;
-#endif /* MODEST_PLATFORM_GNOME */
-
-#ifdef MODEST_PLATFORM_MAEMO
-#ifdef MODEST_HAVE_HILDON0_WIDGETS
+#else
+#if MODEST_HILDON_API == 0
 #include <hildon-widgets/hildon-window.h>
 #else
 #include <hildon/hildon-window.h>
 #include <hildon-widgets/hildon-window.h>
 #else
 #include <hildon/hildon-window.h>
-#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
+#endif /*MODEST_HILDON_API == 0*/
 typedef HildonWindow      ModestWindowParent;
 typedef HildonWindowClass ModestWindowParentClass;
 
 typedef HildonWindow      ModestWindowParent;
 typedef HildonWindowClass ModestWindowParentClass;
 
@@ -64,7 +62,7 @@ typedef HildonWindowClass ModestWindowParentClass;
 #define GTK_STOCK_FULLSCREEN ""
 #endif /*GTK_STOCK_FULLSCREEN*/
 
 #define GTK_STOCK_FULLSCREEN ""
 #endif /*GTK_STOCK_FULLSCREEN*/
 
-#endif /*MODEST_PLATFORM_MAEMO */
+#endif /*!MODEST_TOOLKIT_GTK */
 
 /* Dimmed state variables */
 typedef struct _DimmedState {  
 
 /* Dimmed state variables */
 typedef struct _DimmedState {  
index ce595ae..2e8ce6e 100644 (file)
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#ifdef MODEST_PLATFORM_MAEMO
-#ifdef MODEST_HAVE_HILDON0_WIDGETS
+#ifndef MODEST_TOOLKIT_GTK
+#if MODEST_HILDON_API == 0
 #include <hildon-widgets/hildon-defines.h>
 #else
 #include <hildon/hildon-defines.h>
 #include <hildon-widgets/hildon-defines.h>
 #else
 #include <hildon/hildon-defines.h>
-#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
-#endif /*MODEST_PLATFORM_MAEMO*/
+#endif /*MODEST_HILDON_API == 0*/
+#endif /*!MODEST_TOOLKIT_GTK*/
 
 #include "modest-wizard-dialog.h"
 #include "modest-debug.h"
 
 #include "modest-wizard-dialog.h"
 #include "modest-debug.h"
@@ -249,8 +249,8 @@ init (ModestWizardDialog *wizard_dialog)
     gtk_dialog_set_has_separator (dialog, FALSE);
     wizard_dialog->priv = priv;
     priv->box = GTK_BOX (gtk_hbox_new (FALSE, 0));
     gtk_dialog_set_has_separator (dialog, FALSE);
     wizard_dialog->priv = priv;
     priv->box = GTK_BOX (gtk_hbox_new (FALSE, 0));
-#ifdef MODEST_PLATFORM_MAEMO
-#ifdef MODEST_HAVE_HILDON0_WIDGETS
+#ifndef MODEST_TOOLKIT_GTK
+#if MODEST_HILDON_API == 0
     priv->image = gtk_image_new_from_icon_name ("qgn_widg_wizard",
                                                HILDON_ICON_SIZE_WIDG_WIZARD);
 #else      
     priv->image = gtk_image_new_from_icon_name ("qgn_widg_wizard",
                                                HILDON_ICON_SIZE_WIDG_WIZARD);
 #else      
@@ -259,10 +259,10 @@ init (ModestWizardDialog *wizard_dialog)
            icon_size = gtk_icon_size_register("modest_wizard", 50, 50);
     priv->image = gtk_image_new_from_icon_name ("qgn_widg_wizard",
                                                icon_size);
            icon_size = gtk_icon_size_register("modest_wizard", 50, 50);
     priv->image = gtk_image_new_from_icon_name ("qgn_widg_wizard",
                                                icon_size);
-#endif /*MODEST_HILDON_VERSION_0*/
-#else /*MODEST_PLATFORM_MAEMO*/
+#endif /*MODEST_HILDON_API == 0*/
+#else /*MODEST_TOOLKIT_GTK*/
     priv->image = gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_DIALOG);
     priv->image = gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_DIALOG);
-#endif /*MODEST_PLATFORM_MAEMO*/
+#endif /*!MODEST_TOOLKIT_GTK*/
     /* Default values for user provided properties */
     priv->notebook = NULL;
     priv->wizard_name = NULL;
     /* Default values for user provided properties */
     priv->notebook = NULL;
     priv->wizard_name = NULL;
@@ -274,7 +274,7 @@ init (ModestWizardDialog *wizard_dialog)
     gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (priv->image), FALSE, FALSE, 0);
 
     /* Add response buttons: finish, previous, next, cancel */
     gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (priv->image), FALSE, FALSE, 0);
 
     /* Add response buttons: finish, previous, next, cancel */
-#ifdef MODEST_PLATFORM_MAEMO
+#ifndef MODEST_TOOLKIT_GTK
     gtk_dialog_add_button (dialog, _HL("ecdg_bd_wizard_finish"), MODEST_WIZARD_DIALOG_FINISH);
     gtk_dialog_add_button (dialog, _HL("ecdg_bd_wizard_previous"), MODEST_WIZARD_DIALOG_PREVIOUS);
     gtk_dialog_add_button (dialog, _HL("ecdg_bd_wizard_next"), MODEST_WIZARD_DIALOG_NEXT);
     gtk_dialog_add_button (dialog, _HL("ecdg_bd_wizard_finish"), MODEST_WIZARD_DIALOG_FINISH);
     gtk_dialog_add_button (dialog, _HL("ecdg_bd_wizard_previous"), MODEST_WIZARD_DIALOG_PREVIOUS);
     gtk_dialog_add_button (dialog, _HL("ecdg_bd_wizard_next"), MODEST_WIZARD_DIALOG_NEXT);
index 07bea5f..01fa744 100644 (file)
@@ -8,17 +8,17 @@ INCLUDES=\
        -I$(top_srcdir) \
        -DPREFIX=\"@prefix@\" \
        -DMODESTLOCALEDIR=\""$(modestlocaledir)"\"
        -I$(top_srcdir) \
        -DPREFIX=\"@prefix@\" \
        -DMODESTLOCALEDIR=\""$(modestlocaledir)"\"
-       
+
 objects=\
        @CHECK_LIBS@ \
        $(MODEST_GSTUFF_LIBS) \
        $(MODEST_PLATFORM_LIBS) \
 objects=\
        @CHECK_LIBS@ \
        $(MODEST_GSTUFF_LIBS) \
        $(MODEST_PLATFORM_LIBS) \
-       $(MODEST_HILDON_WIDGETS_LIBS) \
+       $(MODEST_TOOLKIT_LIBS) \
        $(MODEST_HILDON_HELP_LIBS) \
        $(MODEST_HILDON_NOTIFY_LIBS) \
        $(MODEST_OGS_LIBS) \
        ${top_srcdir}/libmodest-dbus-client/libmodest-dbus-client-1.0.la
        $(MODEST_HILDON_HELP_LIBS) \
        $(MODEST_HILDON_NOTIFY_LIBS) \
        $(MODEST_OGS_LIBS) \
        ${top_srcdir}/libmodest-dbus-client/libmodest-dbus-client-1.0.la
-        
+
 noinst_PROGRAMS = \
        test_mail_to \
        test_open_message   \
 noinst_PROGRAMS = \
        test_mail_to \
        test_open_message   \