| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 // We use a separate box for the licensing etc. text. See the comment near | 169 // We use a separate box for the licensing etc. text. See the comment near |
| 170 // the top of this function about using a special layout for this dialog. | 170 // the top of this function about using a special layout for this dialog. |
| 171 GtkWidget* vbox = gtk_vbox_new(FALSE, 0); | 171 GtkWidget* vbox = gtk_vbox_new(FALSE, 0); |
| 172 | 172 |
| 173 GtkWidget* copyright_label = gtk_label_new( | 173 GtkWidget* copyright_label = gtk_label_new( |
| 174 l10n_util::GetStringUTF8(IDS_ABOUT_VERSION_COPYRIGHT).c_str()); | 174 l10n_util::GetStringUTF8(IDS_ABOUT_VERSION_COPYRIGHT).c_str()); |
| 175 gtk_misc_set_alignment(GTK_MISC(copyright_label), 0.0, 0.5); | 175 gtk_misc_set_alignment(GTK_MISC(copyright_label), 0.0, 0.5); |
| 176 gtk_box_pack_start(GTK_BOX(vbox), copyright_label, FALSE, FALSE, 5); | 176 gtk_box_pack_start(GTK_BOX(vbox), copyright_label, FALSE, FALSE, 5); |
| 177 | 177 |
| 178 std::string license = l10n_util::GetStringUTF8(IDS_ABOUT_VERSION_LICENSE); | 178 std::string license = l10n_util::GetStringUTF8(IDS_ABOUT_OLD_VERSION_LICENSE); |
| 179 bool chromium_url_appears_first = | 179 bool chromium_url_appears_first = |
| 180 license.find(kBeginLinkChr) < license.find(kBeginLinkOss); | 180 license.find(kBeginLinkChr) < license.find(kBeginLinkOss); |
| 181 size_t link1 = license.find(kBeginLink); | 181 size_t link1 = license.find(kBeginLink); |
| 182 DCHECK(link1 != std::string::npos); | 182 DCHECK(link1 != std::string::npos); |
| 183 size_t link1_end = license.find(kEndLink, link1); | 183 size_t link1_end = license.find(kEndLink, link1); |
| 184 DCHECK(link1_end != std::string::npos); | 184 DCHECK(link1_end != std::string::npos); |
| 185 size_t link2 = license.find(kBeginLink, link1_end); | 185 size_t link2 = license.find(kBeginLink, link1_end); |
| 186 DCHECK(link2 != std::string::npos); | 186 DCHECK(link2 != std::string::npos); |
| 187 size_t link2_end = license.find(kEndLink, link2); | 187 size_t link2_end = license.find(kEndLink, link2); |
| 188 DCHECK(link1_end != std::string::npos); | 188 DCHECK(link1_end != std::string::npos); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |