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> |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 } // namespace | 101 } // namespace |
102 | 102 |
103 void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) { | 103 void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) { |
104 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 104 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
105 static GdkPixbuf* background = rb.GetNativeImageNamed(IDR_ABOUT_BACKGROUND); | 105 static GdkPixbuf* background = rb.GetNativeImageNamed(IDR_ABOUT_BACKGROUND); |
106 chrome::VersionInfo version_info; | 106 chrome::VersionInfo version_info; |
107 std::string current_version = version_info.Version(); | 107 std::string current_version = version_info.Version(); |
108 #if !defined(GOOGLE_CHROME_BUILD) | 108 #if !defined(GOOGLE_CHROME_BUILD) |
109 current_version += " ("; | 109 current_version += " ("; |
| 110 current_version += l10n_util::GetStringUTF8( |
| 111 version_info.IsOfficialBuild() ? |
| 112 IDS_ABOUT_VERSION_OFFICIAL : IDS_ABOUT_VERSION_UNOFFICIAL); |
| 113 current_version += " "; |
110 current_version += version_info.LastChange(); | 114 current_version += version_info.LastChange(); |
| 115 current_version += " "; |
| 116 current_version += version_info.OSType(); |
111 current_version += ")"; | 117 current_version += ")"; |
112 #endif | 118 #endif |
113 std::string channel = platform_util::GetVersionStringModifier(); | 119 std::string channel = platform_util::GetVersionStringModifier(); |
114 if (!channel.empty()) | 120 if (!channel.empty()) |
115 current_version += " " + channel; | 121 current_version += " " + channel; |
116 | 122 |
117 // Build the dialog. | 123 // Build the dialog. |
118 GtkWidget* dialog = gtk_dialog_new_with_buttons( | 124 GtkWidget* dialog = gtk_dialog_new_with_buttons( |
119 l10n_util::GetStringUTF8(IDS_ABOUT_CHROME_TITLE).c_str(), | 125 l10n_util::GetStringUTF8(IDS_ABOUT_CHROME_TITLE).c_str(), |
120 parent, | 126 parent, |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 gtk_util::kContentAreaBorder, 0, | 285 gtk_util::kContentAreaBorder, 0, |
280 gtk_util::kContentAreaBorder, gtk_util::kContentAreaBorder); | 286 gtk_util::kContentAreaBorder, gtk_util::kContentAreaBorder); |
281 gtk_container_add(GTK_CONTAINER(alignment), vbox); | 287 gtk_container_add(GTK_CONTAINER(alignment), vbox); |
282 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); | 288 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); |
283 | 289 |
284 g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), NULL); | 290 g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), NULL); |
285 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); | 291 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); |
286 gtk_widget_show_all(dialog); | 292 gtk_widget_show_all(dialog); |
287 gtk_widget_grab_focus(close_button); | 293 gtk_widget_grab_focus(close_button); |
288 } | 294 } |
OLD | NEW |