diff options
-rw-r--r-- | chrome/app/generated_resources.grd | 10 | ||||
-rw-r--r-- | chrome/app/theme/chromium/product_logo_16.png | bin | 0 -> 992 bytes | |||
-rw-r--r-- | chrome/app/theme/theme_resources.grd | 3 | ||||
-rw-r--r-- | chrome/browser/dom_ui/new_tab_ui.cc | 6 | ||||
-rw-r--r-- | chrome/browser/resources/new_tab.html | 28 |
5 files changed, 37 insertions, 10 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index f4e2a86..fdde01c 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -3336,9 +3336,13 @@ each locale. --> <ph name="END_LIST"></ul></ph> <ph name="BEGIN_LINK"><a href="$1"></ph>Learn more<ph name="END_LINK"></a></ph> about incognito browsing. </message> - <message name="IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW" - desc="Title of recently closed windows in the recently closed section of the new tab page"> - Window + <message name="IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_SINGLE" + desc="Title of recently closed windows in the recently closed section of the new tab page when the window has a single tab"> + 1 Tab + </message> + <message name="IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_MULTIPLE" + desc="Title of recently closed windows in the recently closed section of the new tab page when the window has more than one tab. The % is replaced by the number of tabs"> + % Tabs </message> <!-- SafeBrowsing --> diff --git a/chrome/app/theme/chromium/product_logo_16.png b/chrome/app/theme/chromium/product_logo_16.png Binary files differnew file mode 100644 index 0000000..82be28d --- /dev/null +++ b/chrome/app/theme/chromium/product_logo_16.png diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd index 2a461c1..4967888 100644 --- a/chrome/app/theme/theme_resources.grd +++ b/chrome/app/theme/theme_resources.grd @@ -322,6 +322,7 @@ <include name="IDR_O2_MORE" file="o2_more.png" type="BINDATA" /> <include name="IDR_O2_SEARCH" file="o2_search.png" type="BINDATA" /> <include name="IDR_O2_STAR" file="o2_star.png" type="BINDATA" /> + <include name="IDR_CLOSED_WINDOW" file="closed_window.png" type="BINDATA" /> <if expr="pp_ifdef('_google_chrome')"> <include name="IDR_ABOUT_BACKGROUND" file="google_chrome/about_background.png" type="BINDATA" /> @@ -330,6 +331,7 @@ <include name="IDR_DISTRIBUTOR_LOGO" file="google_chrome/distributor_logo.png" type="BINDATA" /> <include name="IDR_DISTRIBUTOR_LOGO_LIGHT" file="google_chrome/distributor_logo_light.png" type="BINDATA" /> <include name="IDR_PRODUCT_LOGO" file="google_chrome/product_logo.png" type="BINDATA" /> + <include name="IDR_PRODUCT_LOGO_16" file="google_chrome/product_logo_16.png" type="BINDATA" /> <include name="IDR_WIZARD_ICON" file="google_chrome/wizard_icon.png" type="BINDATA" /> <include name="IDR_WIZARD_ICON_RTL" file="google_chrome/wizard_icon_rtl.png" type="BINDATA" /> </if> @@ -339,6 +341,7 @@ <include name="IDR_ABOUT_BACKGROUND_RTL" file="chromium/about_background_rtl.png" type="BINDATA" /> <include name="IDR_ABOUT_BACKGROUND_COLOR" file="chromium/about_background_color.png" type="BINDATA" /> <include name="IDR_PRODUCT_LOGO" file="chromium/product_logo.png" type="BINDATA" /> + <include name="IDR_PRODUCT_LOGO_16" file="chromium/product_logo_16.png" type="BINDATA" /> <include name="IDR_WIZARD_ICON" file="chromium/wizard_icon.png" type="BINDATA" /> <include name="IDR_WIZARD_ICON_RTL" file="chromium/wizard_icon_rtl.png" type="BINDATA" /> </if> diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index 90bf3dc..9965b43 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -262,8 +262,10 @@ void NewTabHTMLSource::StartDataRequest(const std::string& path, localized_strings.SetString(L"mostvisitedintro", l10n_util::GetStringF(IDS_NEW_TAB_MOST_VISITED_INTRO, l10n_util::GetString(IDS_WELCOME_PAGE_URL))); - localized_strings.SetString(L"closedwindow", - l10n_util::GetString(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW)); + localized_strings.SetString(L"closedwindowsingle", + l10n_util::GetString(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_SINGLE)); + localized_strings.SetString(L"closedwindowmultiple", + l10n_util::GetString(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_MULTIPLE)); SetFontAndTextDirection(&localized_strings); diff --git a/chrome/browser/resources/new_tab.html b/chrome/browser/resources/new_tab.html index 55fd3bf..8eb0edc 100644 --- a/chrome/browser/resources/new_tab.html +++ b/chrome/browser/resources/new_tab.html @@ -280,6 +280,7 @@ a.thumbnail { line-height:16px; display:block; margin:3px 0px 3px 0px; + padding-left:22px; } .recent-window-container img { margin:0 3px -2px 3px; @@ -400,7 +401,8 @@ html[dir='rtl'] #searches input { <body onload="logEvent('body onload fired');" jsvalues=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> <div id="l10n" style="display:none;"> - <span id="closedwindow" jscontent="closedwindow">Window</span> + <span id="closedwindowsingle" jscontent="closedwindowsingle">1 Tab</span> + <span id="closedwindowmultiple" jscontent="closedwindowmultiple">% Tabs</span> </div> <script> // We apply the size class here so that we don't trigger layout animations onload. @@ -786,7 +788,7 @@ function renderRecentlyClosedTabs(entries) { var linkSpanContainer = DOM('div', { className: 'recent-window-container'}); var linkSpan = DOM('span'); - linkSpan.appendChild(document.createTextNode(" (")); + linkSpan.appendChild(document.createTextNode(" ")); for (var windowIndex = 0; windowIndex < entry.tabs.length; windowIndex++) { var tab = entry.tabs[windowIndex]; var tabImg = DOM('img', { @@ -796,12 +798,11 @@ function renderRecentlyClosedTabs(entries) { tabImg.onmousedown = function() { return false; } linkSpan.appendChild(tabImg); } - linkSpan.appendChild(document.createTextNode(")")); link = DOM('span', { className: 'recently-closed-window-link' } ); windowSpan = DOM('span', {className: 'recently-close-window-text'}); - windowSpan.appendChild( - document.createTextNode(localStrings.getString('closedwindow'))); + windowSpan.appendChild(document.createTextNode( + recentlyClosedWindowText(entry.tabs.length))); link.appendChild(windowSpan); link.appendChild(linkSpan); linkSpanContainer.appendChild(link); @@ -828,6 +829,19 @@ function renderRecentlyClosedTabs(entries) { } /** + * Returns the text used for a recently closed window. + * + * @param numTabs number of tabs in the window + * + * @return the text to use + */ +function recentlyClosedWindowText(numTabs) { + if (numTabs == 1) + return localStrings.getString('closedwindowsingle'); + return localStrings.getString('closedwindowmultiple').replace('%', numTabs); +} + +/** * Creates an item to go in the recent bookmarks or recently closed lists. * * @param {String} tagName Tagname for the DOM element to create. @@ -1033,6 +1047,10 @@ setTimeout(function(){document.getElementById('main').className = 'visible'}, .edit-mode div.edit-cross:active { background: url('../../app/theme/ntp_x_icon_active.png'); } +.recent-window-container { + background: url('../../app/theme/closed_window.png'); + background-repeat: no-repeat; +} </style> </html> |