diff options
author | mmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-15 21:40:29 +0000 |
---|---|---|
committer | mmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-15 21:40:29 +0000 |
commit | 01de0ce020b982f597ef6afe2b73cc2f275a7227 (patch) | |
tree | 810f92b3c468e6dc0aad3a09886c92b8c4bee06d /chrome/browser | |
parent | 5ef3f544a256a572d90dd9aae0eba58a08667eef (diff) | |
download | chromium_src-01de0ce020b982f597ef6afe2b73cc2f275a7227.zip chromium_src-01de0ce020b982f597ef6afe2b73cc2f275a7227.tar.gz chromium_src-01de0ce020b982f597ef6afe2b73cc2f275a7227.tar.bz2 |
Support custom Linux version strings (e.g. release channel, downstream vendor name, etc.).
Also reformat the Mac/Win version strings as per comments in
http://codereview.chromium.org/506007.
Review URL: http://codereview.chromium.org/506016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34609 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/cocoa/about_window_controller.mm | 4 | ||||
-rw-r--r-- | chrome/browser/gtk/about_chrome_dialog.cc | 8 | ||||
-rw-r--r-- | chrome/browser/resources/about_version.html | 2 | ||||
-rwxr-xr-x | chrome/browser/views/about_chrome_view.cc | 9 |
4 files changed, 14 insertions, 9 deletions
diff --git a/chrome/browser/cocoa/about_window_controller.mm b/chrome/browser/cocoa/about_window_controller.mm index ae71983..77c3272 100644 --- a/chrome/browser/cocoa/about_window_controller.mm +++ b/chrome/browser/cocoa/about_window_controller.mm @@ -138,8 +138,8 @@ static BOOL recentShownUserActionFailedStatus = NO; // is built on Windows too. NSString* svnRevision = [bundle objectForInfoDictionaryKey:@"SVNRevision"]; NSString* version = - [NSString stringWithFormat:@"%@%@ (%@)", - chromeVersion, versionModifier, svnRevision]; + [NSString stringWithFormat:@"%@ (%@)%@", + chromeVersion, svnRevision, versionModifier]; [version_ setStringValue:version]; diff --git a/chrome/browser/gtk/about_chrome_dialog.cc b/chrome/browser/gtk/about_chrome_dialog.cc index d840d9e..34195e8 100644 --- a/chrome/browser/gtk/about_chrome_dialog.cc +++ b/chrome/browser/gtk/about_chrome_dialog.cc @@ -17,6 +17,7 @@ #include "chrome/browser/profile.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/gtk_util.h" +#include "chrome/common/platform_util.h" #include "chrome/common/url_constants.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -105,11 +106,14 @@ void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) { scoped_ptr<FileVersionInfo> version_info( FileVersionInfo::CreateFileVersionInfoForCurrentModule()); std::wstring current_version = version_info->file_version(); -#if !defined(GOOGLE_CHROME_BUILD) current_version += L" ("; current_version += version_info->last_change(); current_version += L")"; -#endif + string16 version_modifier = platform_util::GetVersionStringModifier(); + if (version_modifier.length()) { + current_version += L" "; + current_version += UTF16ToWide(version_modifier); + } // Build the dialog. GtkWidget* dialog = gtk_dialog_new_with_buttons( diff --git a/chrome/browser/resources/about_version.html b/chrome/browser/resources/about_version.html index dc87c24..cdc5235 100644 --- a/chrome/browser/resources/about_version.html +++ b/chrome/browser/resources/about_version.html @@ -74,7 +74,7 @@ about:version template page <td class="version" id="os_version"><span i18n-content="os_version"></span></td> </tr> <tr><td class="label" valign="top" id="name" i18n-content="name"></td> - <td class="version" id="version"><span i18n-content="version"></span> <span i18n-content="version_modifier"></span> (<span i18n-content="official"></span> <span i18n-content="cl"></span>)</td> + <td class="version" id="version"><span i18n-content="version"></span> (<span i18n-content="official"></span> <span i18n-content="cl"></span>) <span i18n-content="version_modifier"></span></td> </tr> <tr><td class="label" valign="top">WebKit</td> <td class="version" id="webkit_version" i18n-content="webkit_version"></td> diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc index 0e8b79c..b73d878 100755 --- a/chrome/browser/views/about_chrome_view.cc +++ b/chrome/browser/views/about_chrome_view.cc @@ -136,15 +136,16 @@ void AboutChromeView::Init() { return; } + current_version_ = version_info->file_version(); + current_version_ += L" ("; + current_version_ += version_info->last_change(); + current_version_ += L")"; + string16 version_modifier = platform_util::GetVersionStringModifier(); if (version_modifier.length()) { current_version_ += L" "; current_version_ += UTF16ToWide(version_modifier); } - current_version_ = version_info->file_version(); - current_version_ += L" ("; - current_version_ += version_info->last_change(); - current_version_ += L")"; // Views we will add to the *parent* of this dialog, since it will display // next to the buttons which we don't draw ourselves. |