The field required&filled status is now encapsulated in the valid property due to /r/2351.
This means that UIs no longer need to check that all required fields are filled.
So the page no longer needs to track required fields either.
Testing Done:
Compiled and ran `ninja test`. Also opened Request Fields from Demo protocol, removed the required string or entered an invalid email, and confirmed the OK button disabled correctly.
Reviewed at https://reviews.imfreedom.org/r/2352/
/* purple
*
* Purple is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#include<glib/gi18n-lib.h>
#include"purpleprivate.h"
#include"buddylist.h"
#include"core.h"
#include"debug.h"
#include"notify.h"
#include"prefs.h"
#include"purpleaccountpresence.h"
#include"purplebuddypresence.h"
#include"status.h"
/*
* A type of status.
*/
struct_PurpleStatusType
{
intbox_count;
PurpleStatusPrimitiveprimitive;
char*id;
char*name;
gbooleansaveable;
gbooleanuser_settable;
gbooleanindependent;
GList*attrs;
};
/*
* A status attribute.
*/
struct_PurpleStatusAttribute
{
char*id;
char*name;
GValue*value_type;
};
struct_PurpleStatus
{
GObjectparent;
PurpleStatusType*status_type;
PurplePresence*presence;
gbooleanactive;
/*
* The current values of the attributes for this status. The
* key is a string containing the name of the attribute. It is
* a borrowed reference from the list of attrs in the