* src/modest-platform.h, src/maemo/modest-platform.c:
authorJose Dapena Paz <jdapena@igalia.com>
Wed, 3 Oct 2007 16:55:20 +0000 (16:55 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Wed, 3 Oct 2007 16:55:20 +0000 (16:55 +0000)
        * Added method (modest_platform_set_dialog_help) and
          implementation for maemo using hildon/osso help. This method
          sets a topic for contextual help of a dialog.
* src/maemo/modest-account-view-window.c:
        * Attach help topic for accounts settings dialog. This fixes
          NB#64313 at modest side. We still need the topic help in
          help contents.

pmo-trunk-r3463

src/maemo/modest-account-settings-dialog.c
src/maemo/modest-account-view-window.c
src/maemo/modest-platform.c
src/modest-platform.h

index b5f25c4..875aea0 100644 (file)
@@ -1210,7 +1210,7 @@ modest_account_settings_dialog_init (ModestAccountSettingsDialog *self)
             G_CALLBACK (on_response), self); 
             
     self->modified = FALSE;
-    
+
     /* When this window is shown, hibernation should not be possible, 
         * because there is no sensible way to save the state: */
     modest_window_mgr_prevent_hibernation_while_window_is_shown (
index 3c92994..f6cb3d3 100644 (file)
@@ -34,6 +34,7 @@
 #include <widgets/modest-account-view.h>
 
 #include <modest-runtime.h>
+#include "modest-platform.h"
 #include <modest-account-mgr-helpers.h>
 #include <string.h>
 #include "modest-tny-platform-factory.h"
@@ -421,6 +422,7 @@ modest_account_view_window_init (ModestAccountViewWindow *obj)
                TRUE, TRUE, 2);
 
        gtk_window_set_title (GTK_WINDOW (obj), _("mcen_ti_emailsetup_accounts"));
+
 }
 
 GtkWidget*
@@ -428,5 +430,8 @@ modest_account_view_window_new (void)
 {
        GObject *obj = g_object_new(MODEST_TYPE_ACCOUNT_VIEW_WINDOW, NULL);
        
+       /* Attach dialog help */
+       modest_platform_set_dialog_help (GTK_DIALOG (obj), "applications_email_accountsettings");
+
        return GTK_WIDGET(obj);
 }
index f521639..f82ffb9 100644 (file)
@@ -1335,6 +1335,27 @@ modest_platform_show_help (GtkWindow *parent_window,
        }
 }
 
+void
+modest_platform_set_dialog_help (GtkDialog *parent_window, 
+                                const gchar *help_id)
+{
+       gboolean result;
+       g_return_if_fail (help_id);
+       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);
+
+}
+
 void 
 modest_platform_show_search_messages (GtkWindow *parent_window)
 {
index e897c87..e1f35ba 100644 (file)
@@ -289,6 +289,17 @@ void modest_platform_show_help (GtkWindow *parent_window,
                                const gchar *help_id);
 
 /**
+ * modest_platform_set_dialog_help:
+ * @dialog: a #GtkDialog
+ * @help_id: the help topic id to be shown on requesting
+ * help in the dialog
+ * 
+ * attachs a help topic to the dialog
+ **/
+void modest_platform_set_dialog_help (GtkDialog *parent_window, 
+                                     const gchar *help_id);
+
+/**
  * modest_platform_show_search_messages:
  * @parent_window: window the dialog will be child of
  *