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