summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-29 12:00:01 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-29 12:00:01 +0300
commit317614874b2bb4c2b3ac144bc99431d1abe58dc7 (patch)
tree04dae58d4dc024e0ea751c1f05bbd0d8c16e1a23
parent3d1a0f831ba401d6ea4b4dfa04b7af8ea94ec59a (diff)
Creating identity with email address
-rw-r--r--src/app.c3
-rw-r--r--src/ui/util.c12
2 files changed, 9 insertions, 6 deletions
diff --git a/src/app.c b/src/app.c
index e7f31dbe..43e69446 100644
--- a/src/app.c
+++ b/src/app.c
@@ -569,6 +569,7 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) {
569 if (equal_Command(cmd, "ident.accept") || equal_Command(cmd, "cancel")) { 569 if (equal_Command(cmd, "ident.accept") || equal_Command(cmd, "cancel")) {
570 if (equal_Command(cmd, "ident.accept")) { 570 if (equal_Command(cmd, "ident.accept")) {
571 const iString *commonName = text_InputWidget (findChild_Widget(dlg, "ident.common")); 571 const iString *commonName = text_InputWidget (findChild_Widget(dlg, "ident.common"));
572 const iString *email = text_InputWidget (findChild_Widget(dlg, "ident.email"));
572 const iString *userId = text_InputWidget (findChild_Widget(dlg, "ident.userid")); 573 const iString *userId = text_InputWidget (findChild_Widget(dlg, "ident.userid"));
573 const iString *domain = text_InputWidget (findChild_Widget(dlg, "ident.domain")); 574 const iString *domain = text_InputWidget (findChild_Widget(dlg, "ident.domain"));
574 const iString *organization = text_InputWidget (findChild_Widget(dlg, "ident.org")); 575 const iString *organization = text_InputWidget (findChild_Widget(dlg, "ident.org"));
@@ -616,7 +617,7 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) {
616 } 617 }
617 /* The input seems fine. */ 618 /* The input seems fine. */
618 newIdentity_GmCerts(d->certs, isTemp ? temporary_GmIdentityFlag : 0, 619 newIdentity_GmCerts(d->certs, isTemp ? temporary_GmIdentityFlag : 0,
619 until, commonName, userId, domain, organization, country); 620 until, commonName, email, userId, domain, organization, country);
620 postCommandf_App("sidebar.mode arg:%d show:1", identities_SidebarMode); 621 postCommandf_App("sidebar.mode arg:%d show:1", identities_SidebarMode);
621 postCommand_App("idents.changed"); 622 postCommand_App("idents.changed");
622 } 623 }
diff --git a/src/ui/util.c b/src/ui/util.c
index a24b3199..71146682 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -860,17 +860,19 @@ iWidget *makeIdentityCreation_Widget(void) {
860 page, iClob(new_Widget()), arrangeVertical_WidgetFlag | arrangeSize_WidgetFlag); 860 page, iClob(new_Widget()), arrangeVertical_WidgetFlag | arrangeSize_WidgetFlag);
861 iWidget *values = addChildFlags_Widget( 861 iWidget *values = addChildFlags_Widget(
862 page, iClob(new_Widget()), arrangeVertical_WidgetFlag | arrangeSize_WidgetFlag); 862 page, iClob(new_Widget()), arrangeVertical_WidgetFlag | arrangeSize_WidgetFlag);
863 iInputWidget *inputs[5]; 863 iInputWidget *inputs[6];
864 addChild_Widget(headings, iClob(makeHeading_Widget("Common name:"))); 864 addChild_Widget(headings, iClob(makeHeading_Widget("Common name:")));
865 setId_Widget(addChild_Widget(values, iClob(inputs[0] = new_InputWidget(0))), "ident.common"); 865 setId_Widget(addChild_Widget(values, iClob(inputs[0] = new_InputWidget(0))), "ident.common");
866 addChild_Widget(headings, iClob(makeHeading_Widget("Email:")));
867 setId_Widget(addChild_Widget(values, iClob(inputs[1] = newHint_InputWidget(0, "optional"))), "ident.email");
866 addChild_Widget(headings, iClob(makeHeading_Widget("User ID:"))); 868 addChild_Widget(headings, iClob(makeHeading_Widget("User ID:")));
867 setId_Widget(addChild_Widget(values, iClob(inputs[1] = newHint_InputWidget(0, "optional"))), "ident.userid"); 869 setId_Widget(addChild_Widget(values, iClob(inputs[2] = newHint_InputWidget(0, "optional"))), "ident.userid");
868 addChild_Widget(headings, iClob(makeHeading_Widget("Domain:"))); 870 addChild_Widget(headings, iClob(makeHeading_Widget("Domain:")));
869 setId_Widget(addChild_Widget(values, iClob(inputs[2] = newHint_InputWidget(0, "optional"))), "ident.domain"); 871 setId_Widget(addChild_Widget(values, iClob(inputs[3] = newHint_InputWidget(0, "optional"))), "ident.domain");
870 addChild_Widget(headings, iClob(makeHeading_Widget("Organization:"))); 872 addChild_Widget(headings, iClob(makeHeading_Widget("Organization:")));
871 setId_Widget(addChild_Widget(values, iClob(inputs[3] = newHint_InputWidget(0, "optional"))), "ident.org"); 873 setId_Widget(addChild_Widget(values, iClob(inputs[4] = newHint_InputWidget(0, "optional"))), "ident.org");
872 addChild_Widget(headings, iClob(makeHeading_Widget("Country:"))); 874 addChild_Widget(headings, iClob(makeHeading_Widget("Country:")));
873 setId_Widget(addChild_Widget(values, iClob(inputs[4] = newHint_InputWidget(0, "optional"))), "ident.country"); 875 setId_Widget(addChild_Widget(values, iClob(inputs[5] = newHint_InputWidget(0, "optional"))), "ident.country");
874 addChild_Widget(headings, iClob(makeHeading_Widget("Valid until:"))); 876 addChild_Widget(headings, iClob(makeHeading_Widget("Valid until:")));
875 setId_Widget(addChild_Widget(values, iClob(newHint_InputWidget(19, "YYYY-MM-DD HH:MM:SS"))), "ident.until"); 877 setId_Widget(addChild_Widget(values, iClob(newHint_InputWidget(19, "YYYY-MM-DD HH:MM:SS"))), "ident.until");
876 addChild_Widget(headings, iClob(makeHeading_Widget("Temporary:"))); 878 addChild_Widget(headings, iClob(makeHeading_Widget("Temporary:")));