[Commits] [SCM] claws branch, master, updated. 3.17.0-137-gf3e9831

claws at claws-mail.org claws at claws-mail.org
Thu Oct 25 18:09:21 CEST 2018


The branch, master has been updated
       via  f3e983117a19000ad623f2c6f44bb8d3dfb3df03 (commit)
      from  4d6cfbf4564623d041489a61dff4bf6ef04f6096 (commit)

Summary of changes:
 src/prefs_account.c |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)


- Log -----------------------------------------------------------------
commit f3e983117a19000ad623f2c6f44bb8d3dfb3df03
Author: Paul <paul at claws-mail.org>
Date:   Thu Oct 25 17:09:16 2018 +0100

    add error checking on account prefs Advanced page

diff --git a/src/prefs_account.c b/src/prefs_account.c
index f4c17e5..29eeae6 100644
--- a/src/prefs_account.c
+++ b/src/prefs_account.c
@@ -3466,6 +3466,32 @@ static gint prefs_proxy_apply(void)
 
 static gint prefs_advanced_apply(void)
 {
+	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(advanced_page.domain_checkbtn)) &&
+	    *gtk_entry_get_text(GTK_ENTRY(advanced_page.domain_entry)) == '\0') {
+		alertpanel_error(_("domain is not specified."));
+		return -1;
+	}
+	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(advanced_page.sent_folder_checkbtn)) &&
+	    *gtk_entry_get_text(GTK_ENTRY(advanced_page.sent_folder_entry)) == '\0') {
+		alertpanel_error(_("sent folder is not selected."));
+		return -1;
+	}
+	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(advanced_page.queue_folder_checkbtn)) &&
+	    *gtk_entry_get_text(GTK_ENTRY(advanced_page.queue_folder_entry)) == '\0') {
+		alertpanel_error(_("queue folder is not selected."));
+		return -1;
+	}
+	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(advanced_page.draft_folder_checkbtn)) &&
+	    *gtk_entry_get_text(GTK_ENTRY(advanced_page.draft_folder_entry)) == '\0') {
+		alertpanel_error(_("draft folder is not selected."));
+		return -1;
+	}
+	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(advanced_page.trash_folder_checkbtn)) &&
+	    *gtk_entry_get_text(GTK_ENTRY(advanced_page.trash_folder_entry)) == '\0') {
+		alertpanel_error(_("trash folder is not selected."));
+		return -1;
+	}
+
 	prefs_set_data_from_dialog(advanced_param);
 	return 0;
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list