summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 23:37:32 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 23:37:32 +0000
commit6647bd9cac9644507458dfee7e0ce6142371c743 (patch)
treee500fdecdb64990c48a881f5a656260efbe3c4df /chrome/browser/autofill
parent5e1a7a80e169ba8ce636b3960d068addb1bb7f4a (diff)
downloadchromium_src-6647bd9cac9644507458dfee7e0ce6142371c743.zip
chromium_src-6647bd9cac9644507458dfee7e0ce6142371c743.tar.gz
chromium_src-6647bd9cac9644507458dfee7e0ce6142371c743.tar.bz2
gtk: Coalesce the three name fields into a Full Name field in the AutoFill
dialog. BUG=none TEST=none Review URL: http://codereview.chromium.org/2799011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50054 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/autofill_dialog_gtk.cc28
1 files changed, 7 insertions, 21 deletions
diff --git a/chrome/browser/autofill/autofill_dialog_gtk.cc b/chrome/browser/autofill/autofill_dialog_gtk.cc
index 1b9307d..e1f32fa 100644
--- a/chrome/browser/autofill/autofill_dialog_gtk.cc
+++ b/chrome/browser/autofill/autofill_dialog_gtk.cc
@@ -47,9 +47,7 @@ const gint kAutoFillDialogLearnMoreLink = 1;
// All of these widgets are GtkEntrys.
typedef struct _AddressWidgets {
GtkWidget* label;
- GtkWidget* first_name;
- GtkWidget* middle_name;
- GtkWidget* last_name;
+ GtkWidget* full_name;
GtkWidget* email;
GtkWidget* company_name;
GtkWidget* address_line1;
@@ -406,12 +404,8 @@ static AutoFillProfile AutoFillProfileFromWidgetValues(
const AddressWidgets& widgets) {
// TODO(jhawkins): unique id?
AutoFillProfile profile(GetEntryText(widgets.label), 0);
- profile.SetInfo(AutoFillType(NAME_FIRST),
- GetEntryText(widgets.first_name));
- profile.SetInfo(AutoFillType(NAME_MIDDLE),
- GetEntryText(widgets.middle_name));
- profile.SetInfo(AutoFillType(NAME_LAST),
- GetEntryText(widgets.last_name));
+ profile.SetInfo(AutoFillType(NAME_FULL),
+ GetEntryText(widgets.full_name));
profile.SetInfo(AutoFillType(EMAIL_ADDRESS),
GetEntryText(widgets.email));
profile.SetInfo(AutoFillType(COMPANY_NAME),
@@ -785,12 +779,8 @@ GtkWidget* AutoFillDialog::AddNewAddress(bool expand) {
widgets.label = FormTableAddLabelEntry(table, 0, 0, 1,
IDS_AUTOFILL_DIALOG_LABEL,
address, G_CALLBACK(OnLabelChanged));
- widgets.first_name = FormTableAddEntry(table, 1, 0, 1,
- IDS_AUTOFILL_DIALOG_FIRST_NAME);
- widgets.middle_name = FormTableAddEntry(table, 1, 1, 1,
- IDS_AUTOFILL_DIALOG_MIDDLE_NAME);
- widgets.last_name = FormTableAddEntry(table, 1, 2, 1,
- IDS_AUTOFILL_DIALOG_LAST_NAME);
+ widgets.full_name = FormTableAddEntry(table, 1, 0, 1,
+ IDS_AUTOFILL_DIALOG_FULL_NAME);
widgets.email = FormTableAddEntry(table, 2, 0, 1,
IDS_AUTOFILL_DIALOG_EMAIL);
widgets.company_name = FormTableAddEntry(table, 2, 1, 1,
@@ -913,12 +903,8 @@ void AutoFillDialog::AddAddress(const AutoFillProfile& profile) {
// We just pushed the widgets to the back of the vector.
const AddressWidgets& widgets = address_widgets_.back();
SetEntryText(widgets.label, profile.Label());
- SetEntryText(widgets.first_name,
- profile.GetFieldText(AutoFillType(NAME_FIRST)));
- SetEntryText(widgets.middle_name,
- profile.GetFieldText(AutoFillType(NAME_MIDDLE)));
- SetEntryText(widgets.last_name,
- profile.GetFieldText(AutoFillType(NAME_LAST)));
+ SetEntryText(widgets.full_name,
+ profile.GetFieldText(AutoFillType(NAME_FULL)));
SetEntryText(widgets.email,
profile.GetFieldText(AutoFillType(EMAIL_ADDRESS)));
SetEntryText(widgets.company_name,