OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/autofill/autofill_dialog.h" | 5 #include "chrome/browser/autofill/autofill_dialog.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 return state; | 605 return state; |
606 } | 606 } |
607 | 607 |
608 void AutoFillDialog::AddAddressToTree(const AutoFillProfile& profile, | 608 void AutoFillDialog::AddAddressToTree(const AutoFillProfile& profile, |
609 GtkTreeIter* iter) { | 609 GtkTreeIter* iter) { |
610 gtk_list_store_append(list_store_, iter); | 610 gtk_list_store_append(list_store_, iter); |
611 gtk_list_store_set( | 611 gtk_list_store_set( |
612 list_store_, iter, | 612 list_store_, iter, |
613 COL_WEIGHT, PANGO_WEIGHT_NORMAL, | 613 COL_WEIGHT, PANGO_WEIGHT_NORMAL, |
614 COL_WEIGHT_SET, TRUE, | 614 COL_WEIGHT_SET, TRUE, |
615 COL_TITLE, UTF16ToUTF8(profile.PreviewSummary()).c_str(), | 615 COL_TITLE, UTF16ToUTF8(profile.Label()).c_str(), |
616 -1); | 616 -1); |
617 } | 617 } |
618 | 618 |
619 void AutoFillDialog::AddCreditCardToTree(const CreditCard& credit_card, | 619 void AutoFillDialog::AddCreditCardToTree(const CreditCard& credit_card, |
620 GtkTreeIter* iter) { | 620 GtkTreeIter* iter) { |
621 gtk_list_store_append(list_store_, iter); | 621 gtk_list_store_append(list_store_, iter); |
622 gtk_list_store_set( | 622 gtk_list_store_set( |
623 list_store_, iter, | 623 list_store_, iter, |
624 COL_WEIGHT, PANGO_WEIGHT_NORMAL, | 624 COL_WEIGHT, PANGO_WEIGHT_NORMAL, |
625 COL_WEIGHT_SET, TRUE, | 625 COL_WEIGHT_SET, TRUE, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 | 660 |
661 void ShowAutoFillDialog(gfx::NativeView parent, | 661 void ShowAutoFillDialog(gfx::NativeView parent, |
662 AutoFillDialogObserver* observer, | 662 AutoFillDialogObserver* observer, |
663 Profile* profile) { | 663 Profile* profile) { |
664 DCHECK(profile); | 664 DCHECK(profile); |
665 | 665 |
666 if (!dialog) | 666 if (!dialog) |
667 dialog = new AutoFillDialog(profile, observer); | 667 dialog = new AutoFillDialog(profile, observer); |
668 dialog->Show(); | 668 dialog->Show(); |
669 } | 669 } |
OLD | NEW |