X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmaemo%2Fmodest-account-settings-dialog.c;h=67bec94d0cd47ee4f7a0104ee8b9c4a991df8ea7;hp=b12390c1c07560ccfe0b56e410bf0d213452bcee;hb=882063a897449f5c8a9e26bf771ec9da440bd8dd;hpb=218279910d5755b996fcffbae20527f7e0679038 diff --git a/src/maemo/modest-account-settings-dialog.c b/src/maemo/modest-account-settings-dialog.c index b12390c..67bec94 100644 --- a/src/maemo/modest-account-settings-dialog.c +++ b/src/maemo/modest-account-settings-dialog.c @@ -429,7 +429,8 @@ static void on_button_signature (GtkButton *button, gpointer user_data) { ModestAccountSettingsDialog * self = MODEST_ACCOUNT_SETTINGS_DIALOG (user_data); - + gint response; + /* Create the window, if necessary: */ if (!(self->signature_dialog)) { self->signature_dialog = GTK_WIDGET (modest_signature_editor_dialog_new ()); @@ -447,19 +448,19 @@ on_button_signature (GtkButton *button, gpointer user_data) } /* Show the window: */ - gtk_window_set_transient_for (GTK_WINDOW (self->signature_dialog), GTK_WINDOW (self)); - gtk_window_set_modal (GTK_WINDOW (self->signature_dialog), TRUE); - const gint response = gtk_dialog_run (GTK_DIALOG (self->signature_dialog)); - gtk_widget_hide (self->signature_dialog); - if (response != GTK_RESPONSE_OK) { - /* Destroy the widget now, and its data: */ - gtk_widget_destroy (self->signature_dialog); - self->signature_dialog = NULL; - } - else { - /* Mark modified, so we use the dialog's data later: */ - self->modified = TRUE; - } + modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), + GTK_WINDOW (self->signature_dialog)); + + response = gtk_dialog_run (GTK_DIALOG (self->signature_dialog)); + gtk_widget_hide (self->signature_dialog); + if (response != GTK_RESPONSE_OK) { + /* Destroy the widget now, and its data: */ + gtk_widget_destroy (self->signature_dialog); + self->signature_dialog = NULL; + } else { + /* Mark modified, so we use the dialog's data later: */ + self->modified = TRUE; + } } static GtkWidget* @@ -1125,8 +1126,7 @@ on_response (GtkDialog *wizard_dialog, g_object_unref (store_settings); g_object_unref (transport_settings); - if (!self->save_password) - hildon_banner_show_information(NULL, NULL, _("mcen_ib_advsetup_settings_saved")); + hildon_banner_show_information(NULL, NULL, _("mcen_ib_advsetup_settings_saved")); } } else { hildon_banner_show_information (NULL, NULL, _("mail_ib_setting_failed")); @@ -1187,7 +1187,6 @@ modest_account_settings_dialog_init (ModestAccountSettingsDialog *self) G_CALLBACK (on_response), self); self->modified = FALSE; - self->save_password = FALSE; /* When this window is shown, hibernation should not be possible, * because there is no sensible way to save the state: */ @@ -1648,16 +1647,6 @@ modest_account_settings_dialog_set_modified (ModestAccountSettingsDialog *dialog } -void -modest_account_settings_dialog_save_password (ModestAccountSettingsDialog *dialog) -{ - g_return_if_fail (MODEST_IS_ACCOUNT_SETTINGS_DIALOG (dialog)); - - dialog->save_password = TRUE; - dialog->modified = TRUE; -} - - static void modest_account_settings_dialog_class_init (ModestAccountSettingsDialogClass *klass) {