* add help context id's for all dialogs
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Fri, 2 Nov 2007 14:22:17 +0000 (14:22 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Fri, 2 Nov 2007 14:22:17 +0000 (14:22 +0000)
* turned content-specific-smtp-window into a GtkDialog
  (instead of a GtkWindow), otherwise the help won't work.

This fixes NB#74670 (but we're still missing the actual help contents)

pmo-trunk-r3624

src/maemo/easysetup/modest-easysetup-wizard.c
src/maemo/modest-account-settings-dialog.c
src/maemo/modest-account-view-window.c
src/maemo/modest-connection-specific-smtp-edit-window.c
src/maemo/modest-connection-specific-smtp-window.c
src/maemo/modest-connection-specific-smtp-window.h
src/maemo/modest-maemo-global-settings-dialog.c
src/maemo/modest-signature-editor-dialog.c

index 304c585..bbee589 100644 (file)
@@ -1274,6 +1274,8 @@ modest_easysetup_wizard_dialog_init (ModestEasysetupWizardDialog *self)
        g_object_ref (self);
        g_thread_create (presets_loader, self, FALSE, NULL);
 
+       hildon_help_dialog_help_enable (GTK_DIALOG(self), "applications_email_wizardwelcome",
+                                       modest_maemo_utils_get_osso_context()); 
 }
 
 ModestEasysetupWizardDialog*
index 8607ea8..897b91e 100644 (file)
@@ -1214,6 +1214,9 @@ modest_account_settings_dialog_init (ModestAccountSettingsDialog *self)
         * because there is no sensible way to save the state: */
     modest_window_mgr_prevent_hibernation_while_window_is_shown (
        modest_runtime_get_window_mgr (), GTK_WINDOW (self)); 
+
+    hildon_help_dialog_help_enable (GTK_DIALOG(self), "applications_email_accountsettings",
+                                   modest_maemo_utils_get_osso_context());
 }
 
 ModestAccountSettingsDialog*
index 57ebd91..b48cdad 100644 (file)
@@ -477,8 +477,5 @@ 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 2faf2ac..f4047d1 100644 (file)
@@ -41,6 +41,7 @@
 #include <gtk/gtkvbox.h>
 #include <gtk/gtkstock.h>
 #include "modest-text-utils.h"
+#include "modest-maemo-utils.h"
 
 #include <glib/gi18n.h>
 
@@ -334,7 +335,11 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd
        /* 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 (
-       modest_runtime_get_window_mgr (), GTK_WINDOW (self)); 
+               modest_runtime_get_window_mgr (), GTK_WINDOW (self)); 
+       
+       hildon_help_dialog_help_enable (GTK_DIALOG(self),
+                                       "applications_email_connectionspecificsmtpconf",
+                                       modest_maemo_utils_get_osso_context());
 }
 
 ModestConnectionSpecificSmtpEditWindow*
index 2276fa4..68d9746 100644 (file)
 
 #include "modest-hildon-includes.h"
 #include "modest-platform.h"
+#include "modest-maemo-utils.h"
 
 #include <glib/gi18n.h>
 
-G_DEFINE_TYPE (ModestConnectionSpecificSmtpWindow, modest_connection_specific_smtp_window, GTK_TYPE_WINDOW);
+G_DEFINE_TYPE (ModestConnectionSpecificSmtpWindow, modest_connection_specific_smtp_window,
+              GTK_TYPE_DIALOG);
 
 #define CONNECTION_SPECIFIC_SMTP_WINDOW_GET_PRIVATE(o) \
        (G_TYPE_INSTANCE_GET_PRIVATE ((o), MODEST_TYPE_CONNECTION_SPECIFIC_SMTP_WINDOW, ModestConnectionSpecificSmtpWindowPrivate))
@@ -403,7 +405,8 @@ modest_connection_specific_smtp_window_init (ModestConnectionSpecificSmtpWindow
        
        /* The application must call modest_connection_specific_smtp_window_fill_with_connections(). */
        
-       GtkWidget *vbox = gtk_vbox_new (FALSE, MODEST_MARGIN_DEFAULT);
+       GtkWidget *vbox = GTK_DIALOG(self)->vbox;
+       //gtk_vbox_new (FALSE, MODEST_MARGIN_DEFAULT);
 
        /* Introductory note: */
        /* TODO: For some reason this label does not wrap. It is truncated. */
@@ -445,7 +448,7 @@ modest_connection_specific_smtp_window_init (ModestConnectionSpecificSmtpWindow
        g_signal_connect (G_OBJECT (button_cancel), "clicked",
                G_CALLBACK (on_button_cancel), self);
        
-       gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (vbox));
+       //gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (vbox));
        gtk_widget_show (vbox);
        
        /* Disable the Edit button when nothing is selected: */
@@ -467,6 +470,10 @@ modest_connection_specific_smtp_window_init (ModestConnectionSpecificSmtpWindow
        g_signal_connect (G_OBJECT (self), 
                          "key-press-event", 
                          G_CALLBACK (on_key_pressed), NULL);
+       
+       hildon_help_dialog_help_enable (GTK_DIALOG(self),
+                                       "applications_email_connectionsspecificsmtpconf",
+                                       modest_maemo_utils_get_osso_context());
 }
 
 ModestConnectionSpecificSmtpWindow*
index 1372cc5..279681e 100644 (file)
@@ -33,6 +33,7 @@
 #include <modest-account-mgr.h>
 #include <gtk/gtkwindow.h>
 #include <gtk/gtktreeview.h>
+#include <gtk/gtkdialog.h>
 
 G_BEGIN_DECLS
 
@@ -59,12 +60,12 @@ G_BEGIN_DECLS
        MODEST_TYPE_CONNECTION_SPECIFIC_SMTP_WINDOW, ModestConnectionSpecificSmtpWindowClass))
 
 typedef struct {
-       GtkWindow parent;
+       GtkDialog parent;
        
 } ModestConnectionSpecificSmtpWindow;
 
 typedef struct {
-       GtkWindowClass parent_class;
+       GtkDialogClass parent_class;
 } ModestConnectionSpecificSmtpWindowClass;
 
 GType modest_connection_specific_smtp_window_get_type (void);
index 5410612..9e48a69 100644 (file)
 #include <config.h>
 #endif /*HAVE_CONFIG_H*/
 
-#ifdef MODEST_HAVE_HILDON0_WIDGETS
-#include <hildon-widgets/hildon-caption.h>
-#include <hildon-widgets/hildon-number-editor.h>
-#include <hildon-widgets/hildon-banner.h>
-#else
-#include <hildon/hildon-caption.h>
-#include <hildon/hildon-number-editor.h>
-#include <hildon/hildon-banner.h>
-#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
+#include <modest-hildon-includes.h>
+#include <modest-maemo-utils.h>
 
 #include <glib/gi18n.h>
 #include <string.h>
@@ -57,6 +50,8 @@
 #include <tny-account-store.h>
 #include <tny-maemo-conic-device.h>
 
+
+
 #define MSG_SIZE_MAX_VAL 5000
 #define MSG_SIZE_DEF_VAL 1000
 #define MSG_SIZE_MIN_VAL 1
@@ -252,6 +247,9 @@ modest_maemo_global_settings_dialog_init (ModestMaemoGlobalSettingsDialog *self)
 
        /* Set first page */
        gtk_notebook_set_current_page (GTK_NOTEBOOK (ppriv->notebook), 0);
+
+       hildon_help_dialog_help_enable (GTK_DIALOG(self), "applications_email_options_dialog",
+                                       modest_maemo_utils_get_osso_context());
 }
 
 static void
index eef6429..1daf304 100644 (file)
@@ -42,8 +42,8 @@
 #include <gtk/gtklabel.h>
 #include <gtk/gtkscrolledwindow.h>
 #include <gtk/gtkstock.h>
-
 #include <glib/gi18n.h>
+#include <modest-maemo-utils.h>
 
 G_DEFINE_TYPE (ModestSignatureEditorDialog, modest_signature_editor_dialog, GTK_TYPE_DIALOG);
 
@@ -167,13 +167,15 @@ modest_signature_editor_dialog_init (ModestSignatureEditorDialog *self)
        gtk_dialog_add_button (GTK_DIALOG (self), _("mcen_bd_dialog_ok"), GTK_RESPONSE_OK);
        gtk_dialog_add_button (GTK_DIALOG (self), _("mcen_bd_dialog_cancel"), GTK_RESPONSE_CANCEL);
        
-       
        gtk_widget_show (box);
        
        /* 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 (
-       modest_runtime_get_window_mgr (), GTK_WINDOW (self)); 
+       modest_window_mgr_prevent_hibernation_while_window_is_shown (
+               modest_runtime_get_window_mgr (), GTK_WINDOW (self)); 
+       
+       hildon_help_dialog_help_enable (GTK_DIALOG(self), "applications_email_signatureeditor",
+                                       modest_maemo_utils_get_osso_context());
 }
 
 ModestSignatureEditorDialog*