anastasis-gtk

Demonstrator GUI for Anastasis
Log | Files | Refs | README | LICENSE

commit fca62a91d78ba412911232006db5b237437557c2
parent 037cb52b8f14281267c621ba5c236f06350d3c25
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 16 Nov 2021 16:04:52 +0100

require + prefix for phone number, add message (#7081)

Diffstat:
Mcontrib/anastasis_gtk_auth_add_sms.glade | 17+++++++++++++++++
Msrc/anastasis/anastasis-gtk_handle-method-sms.c | 4++--
2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/contrib/anastasis_gtk_auth_add_sms.glade b/contrib/anastasis_gtk_auth_add_sms.glade @@ -152,6 +152,23 @@ code you will receive by SMS.</property> <property name="position">1</property> </packing> </child> + <child> + <object class="GtkLabel" id="phone_number_format_explainer_label"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="margin-start">20</property> + <property name="margin-end">20</property> + <property name="label" translatable="yes">Enter mobile number including +CC international dialing prefix.</property> + <attributes> + <attribute name="scale" value="0.80000000000000004"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> </object> <packing> <property name="expand">True</property> diff --git a/src/anastasis/anastasis-gtk_handle-method-sms.c b/src/anastasis/anastasis-gtk_handle-method-sms.c @@ -1,6 +1,6 @@ /* This file is part of anastasis-gtk. - Copyright (C) 2020 Anastasis SARL + Copyright (C) 2020-2021 Anastasis SARL Anastasis is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -193,7 +193,7 @@ anastasis_gtk_b_sms_dialog_phonenumber_entry_changed_cb (GtkEntry *entry, const char *qs; regex_t regex; int regex_result; - const char *regexp = "^\\+?[0-9]+$"; + const char *regexp = "^\\+[0-9]+$"; regex_result = regcomp (&regex, regexp,