Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: chrome/browser/gtk/options/content_exceptions_window_gtk.cc

Issue 6044007: Remove wstring from TableModel.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/gtk/options/content_exceptions_window_gtk.h" 5 #include "chrome/browser/gtk/options/content_exceptions_window_gtk.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 gtk_util::ShowDialogWithLocalizedSize(dialog_, 177 gtk_util::ShowDialogWithLocalizedSize(dialog_,
178 IDS_CONTENT_EXCEPTION_DIALOG_WIDTH_CHARS, 178 IDS_CONTENT_EXCEPTION_DIALOG_WIDTH_CHARS,
179 -1, 179 -1,
180 true); 180 true);
181 181
182 g_signal_connect(dialog_, "response", G_CALLBACK(gtk_widget_destroy), NULL); 182 g_signal_connect(dialog_, "response", G_CALLBACK(gtk_widget_destroy), NULL);
183 g_signal_connect(dialog_, "destroy", G_CALLBACK(OnWindowDestroyThunk), this); 183 g_signal_connect(dialog_, "destroy", G_CALLBACK(OnWindowDestroyThunk), this);
184 } 184 }
185 185
186 void ContentExceptionsWindowGtk::SetColumnValues(int row, GtkTreeIter* iter) { 186 void ContentExceptionsWindowGtk::SetColumnValues(int row, GtkTreeIter* iter) {
187 std::wstring pattern = model_->GetText(row, IDS_EXCEPTIONS_PATTERN_HEADER); 187 string16 pattern = model_->GetText(row, IDS_EXCEPTIONS_PATTERN_HEADER);
188 gtk_list_store_set(list_store_, iter, COL_PATTERN, 188 gtk_list_store_set(list_store_, iter, COL_PATTERN,
189 WideToUTF8(pattern).c_str(), -1); 189 UTF16ToUTF8(pattern).c_str(), -1);
190 190
191 std::wstring action = model_->GetText(row, IDS_EXCEPTIONS_ACTION_HEADER); 191 string16 action = model_->GetText(row, IDS_EXCEPTIONS_ACTION_HEADER);
192 gtk_list_store_set(list_store_, iter, COL_ACTION, 192 gtk_list_store_set(list_store_, iter, COL_ACTION,
193 WideToUTF8(action).c_str(), -1); 193 UTF16ToUTF8(action).c_str(), -1);
194 194
195 bool is_off_the_record = model_->entry_is_off_the_record(row); 195 bool is_off_the_record = model_->entry_is_off_the_record(row);
196 PangoStyle style = 196 PangoStyle style =
197 is_off_the_record ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL; 197 is_off_the_record ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL;
198 gtk_list_store_set(list_store_, iter, COL_OTR, style, -1); 198 gtk_list_store_set(list_store_, iter, COL_OTR, style, -1);
199 } 199 }
200 200
201 void ContentExceptionsWindowGtk::AcceptExceptionEdit( 201 void ContentExceptionsWindowGtk::AcceptExceptionEdit(
202 const ContentSettingsPattern& pattern, 202 const ContentSettingsPattern& pattern,
203 ContentSetting setting, 203 ContentSetting setting,
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 327
328 void ContentExceptionsWindowGtk::OnWindowDestroy(GtkWidget* widget) { 328 void ContentExceptionsWindowGtk::OnWindowDestroy(GtkWidget* widget) {
329 instances[model_->content_type()] = NULL; 329 instances[model_->content_type()] = NULL;
330 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 330 MessageLoop::current()->DeleteSoon(FROM_HERE, this);
331 } 331 }
332 332
333 void ContentExceptionsWindowGtk::OnTreeSelectionChanged( 333 void ContentExceptionsWindowGtk::OnTreeSelectionChanged(
334 GtkWidget* selection) { 334 GtkWidget* selection) {
335 UpdateButtonState(); 335 UpdateButtonState();
336 } 336 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698