| OLD | NEW |
| 1 // Copyright (c) 2011 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/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> |
| 11 | 11 |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "chrome/browser/google/google_util.h" | 13 #include "chrome/browser/google/google_util.h" |
| 14 #include "chrome/browser/platform_util.h" | |
| 15 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/ui/browser_list.h" | 15 #include "chrome/browser/ui/browser_list.h" |
| 17 #include "chrome/browser/ui/gtk/cairo_cached_surface.h" | 16 #include "chrome/browser/ui/gtk/cairo_cached_surface.h" |
| 18 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" | 17 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" |
| 19 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 18 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
| 20 #include "chrome/browser/ui/gtk/gtk_util.h" | 19 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 21 #include "chrome/common/chrome_constants.h" | 20 #include "chrome/common/chrome_constants.h" |
| 22 #include "chrome/common/chrome_version_info.h" | 21 #include "chrome/common/chrome_version_info.h" |
| 23 #include "chrome/common/url_constants.h" | 22 #include "chrome/common/url_constants.h" |
| 24 #include "grit/chromium_strings.h" | 23 #include "grit/chromium_strings.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 current_version += " ("; | 108 current_version += " ("; |
| 110 current_version += l10n_util::GetStringUTF8( | 109 current_version += l10n_util::GetStringUTF8( |
| 111 version_info.IsOfficialBuild() ? | 110 version_info.IsOfficialBuild() ? |
| 112 IDS_ABOUT_VERSION_OFFICIAL : IDS_ABOUT_VERSION_UNOFFICIAL); | 111 IDS_ABOUT_VERSION_OFFICIAL : IDS_ABOUT_VERSION_UNOFFICIAL); |
| 113 current_version += " "; | 112 current_version += " "; |
| 114 current_version += version_info.LastChange(); | 113 current_version += version_info.LastChange(); |
| 115 current_version += " "; | 114 current_version += " "; |
| 116 current_version += version_info.OSType(); | 115 current_version += version_info.OSType(); |
| 117 current_version += ")"; | 116 current_version += ")"; |
| 118 #endif | 117 #endif |
| 119 std::string channel = platform_util::GetVersionStringModifier(); | 118 std::string channel = chrome::VersionInfo::GetVersionStringModifier(); |
| 120 if (!channel.empty()) | 119 if (!channel.empty()) |
| 121 current_version += " " + channel; | 120 current_version += " " + channel; |
| 122 | 121 |
| 123 // Build the dialog. | 122 // Build the dialog. |
| 124 GtkWidget* dialog = gtk_dialog_new_with_buttons( | 123 GtkWidget* dialog = gtk_dialog_new_with_buttons( |
| 125 l10n_util::GetStringUTF8(IDS_ABOUT_CHROME_TITLE).c_str(), | 124 l10n_util::GetStringUTF8(IDS_ABOUT_CHROME_TITLE).c_str(), |
| 126 parent, | 125 parent, |
| 127 GTK_DIALOG_MODAL, | 126 GTK_DIALOG_MODAL, |
| 128 NULL); | 127 NULL); |
| 129 // Pick up the style set in gtk_util.cc:InitRCStyles(). | 128 // Pick up the style set in gtk_util.cc:InitRCStyles(). |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 gtk_util::kContentAreaBorder, 0, | 284 gtk_util::kContentAreaBorder, 0, |
| 286 gtk_util::kContentAreaBorder, gtk_util::kContentAreaBorder); | 285 gtk_util::kContentAreaBorder, gtk_util::kContentAreaBorder); |
| 287 gtk_container_add(GTK_CONTAINER(alignment), vbox); | 286 gtk_container_add(GTK_CONTAINER(alignment), vbox); |
| 288 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); | 287 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); |
| 289 | 288 |
| 290 g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), NULL); | 289 g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), NULL); |
| 291 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); | 290 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); |
| 292 gtk_widget_show_all(dialog); | 291 gtk_widget_show_all(dialog); |
| 293 gtk_widget_grab_focus(close_button); | 292 gtk_widget_grab_focus(close_button); |
| 294 } | 293 } |
| OLD | NEW |