From: Dirk-Jan C. Binnema Date: Fri, 2 Nov 2007 14:22:17 +0000 (+0000) Subject: * add help context id's for all dialogs X-Git-Tag: git_migration_finished~2181 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=30ec701bc2d1c270022e3543994f0221f6fb8b8c * add help context id's for all dialogs * 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 --- diff --git a/src/maemo/easysetup/modest-easysetup-wizard.c b/src/maemo/easysetup/modest-easysetup-wizard.c index 304c585..bbee589 100644 --- a/src/maemo/easysetup/modest-easysetup-wizard.c +++ b/src/maemo/easysetup/modest-easysetup-wizard.c @@ -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* diff --git a/src/maemo/modest-account-settings-dialog.c b/src/maemo/modest-account-settings-dialog.c index 8607ea8..897b91e 100644 --- a/src/maemo/modest-account-settings-dialog.c +++ b/src/maemo/modest-account-settings-dialog.c @@ -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* diff --git a/src/maemo/modest-account-view-window.c b/src/maemo/modest-account-view-window.c index 57ebd91..b48cdad 100644 --- a/src/maemo/modest-account-view-window.c +++ b/src/maemo/modest-account-view-window.c @@ -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); } diff --git a/src/maemo/modest-connection-specific-smtp-edit-window.c b/src/maemo/modest-connection-specific-smtp-edit-window.c index 2faf2ac..f4047d1 100644 --- a/src/maemo/modest-connection-specific-smtp-edit-window.c +++ b/src/maemo/modest-connection-specific-smtp-edit-window.c @@ -41,6 +41,7 @@ #include #include #include "modest-text-utils.h" +#include "modest-maemo-utils.h" #include @@ -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* diff --git a/src/maemo/modest-connection-specific-smtp-window.c b/src/maemo/modest-connection-specific-smtp-window.c index 2276fa4..68d9746 100644 --- a/src/maemo/modest-connection-specific-smtp-window.c +++ b/src/maemo/modest-connection-specific-smtp-window.c @@ -46,10 +46,12 @@ #include "modest-hildon-includes.h" #include "modest-platform.h" +#include "modest-maemo-utils.h" #include -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* diff --git a/src/maemo/modest-connection-specific-smtp-window.h b/src/maemo/modest-connection-specific-smtp-window.h index 1372cc5..279681e 100644 --- a/src/maemo/modest-connection-specific-smtp-window.h +++ b/src/maemo/modest-connection-specific-smtp-window.h @@ -33,6 +33,7 @@ #include #include #include +#include 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); diff --git a/src/maemo/modest-maemo-global-settings-dialog.c b/src/maemo/modest-maemo-global-settings-dialog.c index 5410612..9e48a69 100644 --- a/src/maemo/modest-maemo-global-settings-dialog.c +++ b/src/maemo/modest-maemo-global-settings-dialog.c @@ -31,15 +31,8 @@ #include #endif /*HAVE_CONFIG_H*/ -#ifdef MODEST_HAVE_HILDON0_WIDGETS -#include -#include -#include -#else -#include -#include -#include -#endif /*MODEST_HAVE_HILDON0_WIDGETS*/ +#include +#include #include #include @@ -57,6 +50,8 @@ #include #include + + #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 diff --git a/src/maemo/modest-signature-editor-dialog.c b/src/maemo/modest-signature-editor-dialog.c index eef6429..1daf304 100644 --- a/src/maemo/modest-signature-editor-dialog.c +++ b/src/maemo/modest-signature-editor-dialog.c @@ -42,8 +42,8 @@ #include #include #include - #include +#include 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*