* don't implicitly depend on ossohelp (OSSO_HELP_SHOW_DIALOG)
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Thu, 11 Oct 2007 12:08:08 +0000 (12:08 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Thu, 11 Oct 2007 12:08:08 +0000 (12:08 +0000)
* clean up helplib usage in modest-platform

pmo-trunk-r3492

src/maemo/modest-hildon-includes.h
src/maemo/modest-platform.c

index a67cdf8..bef1283 100644 (file)
@@ -109,8 +109,21 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 #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__*/
index 9b0e498..5f32af6 100644 (file)
@@ -36,7 +36,6 @@
 #include "maemo/modest-maemo-global-settings-dialog.h"
 #include "modest-widget-memory.h"
 #include <modest-hildon-includes.h>
-#include <osso-helplib.h>
 #include <modest-maemo-utils.h>
 #include <dbus_api/modest-dbus-callbacks.h>
 #include <libosso-abook/osso-abook.h>
@@ -1291,12 +1290,7 @@ modest_platform_show_help (GtkWindow *parent_window,
        g_return_if_fail (help_id);
        g_return_if_fail (osso_context);
 
-       /* Show help */
-#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);
-#endif
+       result = hildon_help_show (osso_context, help_id, HILDON_HELP_SHOW_DIALOG);
 
        if (result != OSSO_OK) {
                gchar *error_msg;
@@ -1317,12 +1311,7 @@ modest_platform_set_dialog_help (GtkDialog *parent_window,
        g_return_if_fail (osso_context);
        g_return_if_fail (GTK_IS_DIALOG (parent_window));
 
-       /* Show help */
-#ifdef MODEST_HAVE_OSSO_HELP
-       result = ossohelp_dialog_help_enable (parent_window, help_id, osso_context);
-#else
        result = hildon_help_dialog_help_enable (parent_window, help_id, osso_context);
-#endif
 
        if (!result)
                g_warning ("Help topic %s not found", help_id);