This fixes NB#75543.
[modest] / src / maemo / modest-hildon-includes.h
index 59fc98f..2b056f4 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>
@@ -46,9 +70,11 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 #include <hildon-widgets/hildon-font-selection-dialog.h>
 #include <hildon-widgets/hildon-find-toolbar.h>
 #include <hildon-widgets/hildon-sort-dialog.h>
+
 #else
-#include <hildon-mime.h>
-#include <hildon-uri.h>
+
+#ifdef MODEST_HAVE_HILDON1_WIDGETS
+#include <hildon/hildon-helper.h>
 #include <hildon/hildon-file-chooser-dialog.h>
 #include <hildon/hildon-color-chooser.h>
 #include <hildon/hildon-banner.h>
@@ -58,8 +84,45 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 #include <hildon/hildon-font-selection-dialog.h>
 #include <hildon/hildon-caption.h>
 #include <hildon/hildon-find-toolbar.h>
+#include <hildon/hildon-sort-dialog.h>
 #include <hildon/hildon-number-editor.h>
-#endif /* MODEST_HILDON_VERSION_0*/
+
+#endif /*__MODEST_HAVE_HILDON1_WIDGETS*/
+#endif /*__MODEST_HAVE_HILDON0_WIDGETS_*/
+
+
+/* backward compatibility... */
+#ifdef MODEST_HAVE_OSSO_MIME
+#define hildon_mime_open_file_with_mime_type osso_mime_open_file_with_mime_type 
+#define hildon_mime_open_file                osso_mime_open_file                
+
+#define HildonURIAction                      OssoURIAction
+#define hildon_uri_get_scheme_from_uri       osso_uri_get_scheme_from_uri
+#define hildon_uri_get_actions               osso_uri_get_actions
+#define hildon_uri_get_actions_by_uri        osso_uri_get_actions_by_uri
+#define hildon_uri_action_get_translation    osso_uri_action_get_translation   
+#define hildon_uri_is_default_action         osso_uri_is_default_action
+#define hildon_uri_free_actions              osso_uri_free_actions
+
+/* service->name */
+#define hildon_uri_action_get_service        osso_uri_action_get_name
+#define hildon_uri_open                      osso_uri_open
+
+#define hildon_mime_get_icon_names           osso_mime_get_icon_names 
+#endif /*MODEST_HAVE_OSSO_MIME*/
+
+
+
+/* helplib to use */
+#ifdef MODEST_HAVE_OSSO_HELP
+#define hildon_help_show               ossohelp_show
+#define hildon_help_dialog_help_enable ossohelp_dialog_help_enable
+#define HILDON_HELP_SHOW_DIALOG        OSSO_HELP_SHOW_DIALOG
+#else
+#ifdef MODEST_HAVE_HILDON_HELP
+/* nothing */
+#endif /*MODEST_HAVE_HILDON_HELP*/
+#endif /*MODEST_HAVE_OSSO_HELP*/
 
 
 #endif /*__MODEST_HILDON_INCLUDES__*/