OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/gtk/about_chrome_dialog.h" | 5 #include "chrome/browser/ui/gtk/about_chrome_dialog.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 GtkWidget* license_vbox = gtk_vbox_new(FALSE, 0); | 239 GtkWidget* license_vbox = gtk_vbox_new(FALSE, 0); |
240 gtk_box_pack_start(GTK_BOX(license_vbox), license_hbox, FALSE, FALSE, 0); | 240 gtk_box_pack_start(GTK_BOX(license_vbox), license_hbox, FALSE, FALSE, 0); |
241 gtk_box_pack_start(GTK_BOX(license_vbox), license_hbox2, FALSE, FALSE, 0); | 241 gtk_box_pack_start(GTK_BOX(license_vbox), license_hbox2, FALSE, FALSE, 0); |
242 gtk_box_pack_start(GTK_BOX(vbox), license_vbox, FALSE, FALSE, 0); | 242 gtk_box_pack_start(GTK_BOX(vbox), license_vbox, FALSE, FALSE, 0); |
243 | 243 |
244 #if defined(GOOGLE_CHROME_BUILD) | 244 #if defined(GOOGLE_CHROME_BUILD) |
245 // Spacing line. | 245 // Spacing line. |
246 gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new(""), FALSE, FALSE, 0); | 246 gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new(""), FALSE, FALSE, 0); |
247 | 247 |
248 std::vector<size_t> url_offsets; | 248 std::vector<size_t> url_offsets; |
249 string16 text = l10n_util::GetStringFUTF16(IDS_ABOUT_TERMS_OF_SERVICE, | 249 string16 text = l10n_util::GetStringFUTF16(IDS_ABOUT_OLD_TERMS_OF_SERVICE, |
250 string16(), | 250 string16(), |
251 string16(), | 251 string16(), |
252 &url_offsets); | 252 &url_offsets); |
253 | 253 |
254 GtkWidget* tos_chunk1 = gtk_label_new( | 254 GtkWidget* tos_chunk1 = gtk_label_new( |
255 UTF16ToUTF8(text.substr(0, url_offsets[0])).c_str()); | 255 UTF16ToUTF8(text.substr(0, url_offsets[0])).c_str()); |
256 gtk_misc_set_alignment(GTK_MISC(tos_chunk1), 0.0, 0.5); | 256 gtk_misc_set_alignment(GTK_MISC(tos_chunk1), 0.0, 0.5); |
257 GtkWidget* tos_link = gtk_chrome_link_button_new( | 257 GtkWidget* tos_link = gtk_chrome_link_button_new( |
258 l10n_util::GetStringUTF8(IDS_TERMS_OF_SERVICE).c_str()); | 258 l10n_util::GetStringUTF8(IDS_TERMS_OF_SERVICE).c_str()); |
259 GtkWidget* tos_chunk2 = gtk_label_new( | 259 GtkWidget* tos_chunk2 = gtk_label_new( |
(...skipping 15 matching lines...) Expand all Loading... |
275 ui::kContentAreaBorder, 0, | 275 ui::kContentAreaBorder, 0, |
276 ui::kContentAreaBorder, ui::kContentAreaBorder); | 276 ui::kContentAreaBorder, ui::kContentAreaBorder); |
277 gtk_container_add(GTK_CONTAINER(alignment), vbox); | 277 gtk_container_add(GTK_CONTAINER(alignment), vbox); |
278 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); | 278 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); |
279 | 279 |
280 g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), NULL); | 280 g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), NULL); |
281 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); | 281 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); |
282 gtk_widget_show_all(dialog); | 282 gtk_widget_show_all(dialog); |
283 gtk_widget_grab_focus(close_button); | 283 gtk_widget_grab_focus(close_button); |
284 } | 284 } |
OLD | NEW |