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

Side by Side Diff: chrome/browser/gtk/first_run_dialog.cc

Issue 6322001: Remove wstring from TemplateURL and friends.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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) 2011 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/first_run_dialog.h" 5 #include "chrome/browser/gtk/first_run_dialog.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
11 #include "app/resource_bundle.h" 11 #include "app/resource_bundle.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 g_object_ref(pixbuf); 335 g_object_ref(pixbuf);
336 } 336 }
337 337
338 GtkWidget* image = gtk_image_new_from_pixbuf(pixbuf); 338 GtkWidget* image = gtk_image_new_from_pixbuf(pixbuf);
339 gtk_box_pack_start(GTK_BOX(vbox), image, FALSE, FALSE, 0); 339 gtk_box_pack_start(GTK_BOX(vbox), image, FALSE, FALSE, 0);
340 g_object_unref(pixbuf); 340 g_object_unref(pixbuf);
341 } else { 341 } else {
342 GtkWidget* logo_label = gtk_label_new(NULL); 342 GtkWidget* logo_label = gtk_label_new(NULL);
343 char* markup = g_markup_printf_escaped( 343 char* markup = g_markup_printf_escaped(
344 "<span weight='bold' size='x-large' color='black'>%s</span>", 344 "<span weight='bold' size='x-large' color='black'>%s</span>",
345 WideToUTF8((*search_engine_iter)->short_name()).c_str()); 345 UTF16ToUTF8((*search_engine_iter)->short_name()).c_str());
346 gtk_label_set_markup(GTK_LABEL(logo_label), markup); 346 gtk_label_set_markup(GTK_LABEL(logo_label), markup);
347 g_free(markup); 347 g_free(markup);
348 gtk_widget_set_size_request(logo_label, -1, 348 gtk_widget_set_size_request(logo_label, -1,
349 ballot_engines.size() > kNormalBallotSize ? kLogoLabelHeightSmall : 349 ballot_engines.size() > kNormalBallotSize ? kLogoLabelHeightSmall :
350 kLogoLabelHeight); 350 kLogoLabelHeight);
351 gtk_box_pack_start(GTK_BOX(vbox), logo_label, FALSE, FALSE, 0); 351 gtk_box_pack_start(GTK_BOX(vbox), logo_label, FALSE, FALSE, 0);
352 } 352 }
353 353
354 // Create the button. 354 // Create the button.
355 GtkWidget* button = gtk_button_new_with_label(choose_text.c_str()); 355 GtkWidget* button = gtk_button_new_with_label(choose_text.c_str());
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 } 417 }
418 418
419 void FirstRunDialog::FirstRunDone() { 419 void FirstRunDialog::FirstRunDone() {
420 FirstRun::SetShowWelcomePagePref(); 420 FirstRun::SetShowWelcomePagePref();
421 421
422 if (dialog_) 422 if (dialog_)
423 gtk_widget_destroy(dialog_); 423 gtk_widget_destroy(dialog_);
424 MessageLoop::current()->Quit(); 424 MessageLoop::current()->Quit();
425 delete this; 425 delete this;
426 } 426 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/edit_search_engine_dialog.cc ('k') | chrome/browser/gtk/keyword_editor_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698