Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: chrome/browser/ui/views/frame/global_menu_bar_x11.cc

Issue 1103293004: Use ICU plural syntax in more place (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment in generated_strings.grd Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/views/frame/global_menu_bar_x11.h" 5 #include "chrome/browser/ui/views/frame/global_menu_bar_x11.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <glib-object.h> 8 #include <glib-object.h>
9 9
10 #include "base/debug/leak_annotations.h" 10 #include "base/debug/leak_annotations.h"
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 TabRestoreService::Window* entry_win = 754 TabRestoreService::Window* entry_win =
755 static_cast<TabRestoreService::Window*>(entry); 755 static_cast<TabRestoreService::Window*>(entry);
756 std::vector<TabRestoreService::Tab>& tabs = entry_win->tabs; 756 std::vector<TabRestoreService::Tab>& tabs = entry_win->tabs;
757 if (tabs.empty()) 757 if (tabs.empty())
758 continue; 758 continue;
759 759
760 // Create the item for the parent/window. 760 // Create the item for the parent/window.
761 HistoryItem* item = new HistoryItem(); 761 HistoryItem* item = new HistoryItem();
762 item->session_id = entry_win->id; 762 item->session_id = entry_win->id;
763 763
764 std::string title = tabs.size() == 1 ? 764 std::string title = l10n_util::GetPluralStringFUTF8(
765 l10n_util::GetStringUTF8( 765 IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW, tabs.size());
Peter Kasting 2015/05/01 21:11:29 Nit: Strange indenting here I'd probably just inl
766 IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_SINGLE) :
767 l10n_util::GetStringFUTF8(
768 IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_MULTIPLE,
769 base::IntToString16(tabs.size()));
770 DbusmenuMenuitem* parent_item = BuildMenuItem( 766 DbusmenuMenuitem* parent_item = BuildMenuItem(
771 title, TAG_RECENTLY_CLOSED); 767 title, TAG_RECENTLY_CLOSED);
772 menuitem_child_add_position(history_menu_, parent_item, index++); 768 menuitem_child_add_position(history_menu_, parent_item, index++);
773 g_object_unref(parent_item); 769 g_object_unref(parent_item);
774 770
775 // The mac version of this code allows the user to click on the parent 771 // The mac version of this code allows the user to click on the parent
776 // menu item to have the same effect as clicking the restore window 772 // menu item to have the same effect as clicking the restore window
777 // submenu item. GTK+ helpfully activates a menu item when it shows a 773 // submenu item. GTK+ helpfully activates a menu item when it shows a
778 // submenu so toss that feature out. 774 // submenu so toss that feature out.
779 DbusmenuMenuitem* restore_item = BuildMenuItem( 775 DbusmenuMenuitem* restore_item = BuildMenuItem(
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 int id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(sender), kProfileId)); 887 int id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(sender), kProfileId));
892 avatar_menu_->EditProfile(id); 888 avatar_menu_->EditProfile(id);
893 } 889 }
894 890
895 void GlobalMenuBarX11::OnCreateProfileItemActivated(DbusmenuMenuitem* sender, 891 void GlobalMenuBarX11::OnCreateProfileItemActivated(DbusmenuMenuitem* sender,
896 unsigned int timestamp) { 892 unsigned int timestamp) {
897 profiles::CreateAndSwitchToNewProfile(chrome::HOST_DESKTOP_TYPE_NATIVE, 893 profiles::CreateAndSwitchToNewProfile(chrome::HOST_DESKTOP_TYPE_NATIVE,
898 ProfileManager::CreateCallback(), 894 ProfileManager::CreateCallback(),
899 ProfileMetrics::ADD_NEW_USER_MENU); 895 ProfileMetrics::ADD_NEW_USER_MENU);
900 } 896 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698