Chromium Code Reviews| Index: views/examples/table2_example.h |
| diff --git a/views/examples/table2_example.h b/views/examples/table2_example.h |
| index c58b073c7b4e648e5055ff2901b13dc09b96020c..f055a64ec7098423f47cc149fb1a42509092d5de 100644 |
| --- a/views/examples/table2_example.h |
| +++ b/views/examples/table2_example.h |
| @@ -51,10 +51,14 @@ class Table2Example |
| container->SetLayoutManager(layout); |
| std::vector<TableColumn> columns; |
| - columns.push_back(TableColumn(0, L"Fruit", TableColumn::LEFT, 100)); |
| - columns.push_back(TableColumn(1, L"Color", TableColumn::LEFT, 100)); |
| - columns.push_back(TableColumn(2, L"Origin", TableColumn::LEFT, 100)); |
| - columns.push_back(TableColumn(3, L"Price", TableColumn::LEFT, 100)); |
| + columns.push_back(TableColumn(0, ASCIIToUTF16("Fruit"), TableColumn::LEFT, |
| + 100)); |
| + columns.push_back(TableColumn(1, ASCIIToUTF16("Color"), TableColumn::LEFT, |
| + 100)); |
| + columns.push_back(TableColumn(2, ASCIIToUTF16("Origin"), TableColumn::LEFT, |
| + 100)); |
| + columns.push_back(TableColumn(3, ASCIIToUTF16("Price"), TableColumn::LEFT, |
| + 100)); |
| const int options = (views::TableView2::SINGLE_SELECTION | |
| views::TableView2::RESIZABLE_COLUMNS | |
| views::TableView2::AUTOSIZE_COLUMNS | |
| @@ -102,15 +106,15 @@ class Table2Example |
| return 10; |
| } |
| - virtual std::wstring GetText(int row, int column_id) { |
| - std::wstring cells[5][5] = { |
| - { L"Orange", L"Orange", L"South america", L"$5" }, |
| - { L"Apple", L"Green", L"Canada", L"$3" }, |
| - { L"Blue berries", L"Blue", L"Mexico", L"$10.3" }, |
| - { L"Strawberries", L"Red", L"California", L"$7" }, |
| - { L"Cantaloupe", L"Orange", L"South america", L"$5" }, |
| + virtual string16 GetText(int row, int column_id) { |
| + std::string cells[5][5] = { |
|
viettrungluu
2010/12/30 05:21:16
Comment: This may as well be made a const char* co
sadrul
2010/12/30 05:33:49
Making it const char* const sounds like a good ide
|
| + { "Orange", "Orange", "South america", "$5" }, |
| + { "Apple", "Green", "Canada", "$3" }, |
| + { "Blue berries", "Blue", "Mexico", "$10.3" }, |
| + { "Strawberries", "Red", "California", "$7" }, |
| + { "Cantaloupe", "Orange", "South america", "$5" }, |
|
viettrungluu
2010/12/30 05:21:16
(And, strictly speaking, C++ doesn't allow the tra
sadrul
2010/12/30 05:33:49
Fixed.
|
| }; |
| - return cells[row % 5][column_id]; |
| + return ASCIIToUTF16(cells[row % 5][column_id]); |
| } |
| virtual SkBitmap GetIcon(int row) { |