| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/about_chrome_dialog.h" | 5 #include "chrome/browser/gtk/about_chrome_dialog.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| 11 #include "base/file_version_info.h" | 11 #include "base/file_version_info.h" |
| 12 #include "chrome/app/chrome_version_info.h" |
| 12 #include "chrome/browser/browser_list.h" | 13 #include "chrome/browser/browser_list.h" |
| 13 #include "chrome/browser/gtk/cairo_cached_surface.h" | 14 #include "chrome/browser/gtk/cairo_cached_surface.h" |
| 14 #include "chrome/browser/gtk/gtk_chrome_link_button.h" | 15 #include "chrome/browser/gtk/gtk_chrome_link_button.h" |
| 15 #include "chrome/browser/gtk/gtk_theme_provider.h" | 16 #include "chrome/browser/gtk/gtk_theme_provider.h" |
| 16 #include "chrome/browser/gtk/gtk_util.h" | 17 #include "chrome/browser/gtk/gtk_util.h" |
| 17 #include "chrome/browser/profile.h" | 18 #include "chrome/browser/profile.h" |
| 18 #include "chrome/common/chrome_constants.h" | 19 #include "chrome/common/chrome_constants.h" |
| 19 #include "chrome/common/platform_util.h" | 20 #include "chrome/common/platform_util.h" |
| 20 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
| 21 #include "gfx/gtk_util.h" | 22 #include "gfx/gtk_util.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 cairo_destroy(cr); | 98 cairo_destroy(cr); |
| 98 return FALSE; | 99 return FALSE; |
| 99 } | 100 } |
| 100 | 101 |
| 101 } // namespace | 102 } // namespace |
| 102 | 103 |
| 103 void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) { | 104 void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) { |
| 104 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 105 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 105 static GdkPixbuf* background = rb.GetPixbufNamed(IDR_ABOUT_BACKGROUND); | 106 static GdkPixbuf* background = rb.GetPixbufNamed(IDR_ABOUT_BACKGROUND); |
| 106 scoped_ptr<FileVersionInfo> version_info( | 107 scoped_ptr<FileVersionInfo> version_info( |
| 107 FileVersionInfo::CreateFileVersionInfoForCurrentModule()); | 108 chrome_app::GetChromeVersionInfo()); |
| 108 std::wstring current_version = version_info->file_version(); | 109 std::wstring current_version = version_info->file_version(); |
| 109 #if !defined(GOOGLE_CHROME_BUILD) | 110 #if !defined(GOOGLE_CHROME_BUILD) |
| 110 current_version += L" ("; | 111 current_version += L" ("; |
| 111 current_version += version_info->last_change(); | 112 current_version += version_info->last_change(); |
| 112 current_version += L")"; | 113 current_version += L")"; |
| 113 #endif | 114 #endif |
| 114 string16 version_modifier = platform_util::GetVersionStringModifier(); | 115 string16 version_modifier = platform_util::GetVersionStringModifier(); |
| 115 if (version_modifier.length()) { | 116 if (version_modifier.length()) { |
| 116 current_version += L" "; | 117 current_version += L" "; |
| 117 current_version += UTF16ToWide(version_modifier); | 118 current_version += UTF16ToWide(version_modifier); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 gtk_util::kContentAreaBorder, 0, | 283 gtk_util::kContentAreaBorder, 0, |
| 283 gtk_util::kContentAreaBorder, gtk_util::kContentAreaBorder); | 284 gtk_util::kContentAreaBorder, gtk_util::kContentAreaBorder); |
| 284 gtk_container_add(GTK_CONTAINER(alignment), vbox); | 285 gtk_container_add(GTK_CONTAINER(alignment), vbox); |
| 285 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); | 286 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); |
| 286 | 287 |
| 287 g_signal_connect(dialog, "response", G_CALLBACK(OnDialogResponse), NULL); | 288 g_signal_connect(dialog, "response", G_CALLBACK(OnDialogResponse), NULL); |
| 288 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); | 289 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); |
| 289 gtk_widget_show_all(dialog); | 290 gtk_widget_show_all(dialog); |
| 290 gtk_widget_grab_focus(close_button); | 291 gtk_widget_grab_focus(close_button); |
| 291 } | 292 } |
| OLD | NEW |