summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/gtk_util.cc
diff options
context:
space:
mode:
authorrafaelw@google.com <rafaelw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-25 17:51:47 +0000
committerrafaelw@google.com <rafaelw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-25 17:51:47 +0000
commitead554754ca0a23e0b132b3e84566be703456730 (patch)
tree6ebf4dcdc3fa6f60bae4bc07d18becf62b0512d5 /chrome/browser/gtk/gtk_util.cc
parent0b26c592f978b858fc6a9accf1e7d689df4cfd97 (diff)
downloadchromium_src-ead554754ca0a23e0b132b3e84566be703456730.zip
chromium_src-ead554754ca0a23e0b132b3e84566be703456730.tar.gz
chromium_src-ead554754ca0a23e0b132b3e84566be703456730.tar.bz2
Revert 50859 - GTK: First draft of the unified cut/copy/paste and +/-/Fullscreen menu items.
Adds special menu item types that allow shoving buttons into them, along with tracking which button is selected. We now are halfway to the mocks that the chrome-ui-leads sent out. BUG=45757 TEST=none Review URL: http://codereview.chromium.org/2800015 TBR=erg@chromium.org Review URL: http://codereview.chromium.org/2836029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50865 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/gtk_util.cc')
-rw-r--r--chrome/browser/gtk/gtk_util.cc19
1 files changed, 2 insertions, 17 deletions
diff --git a/chrome/browser/gtk/gtk_util.cc b/chrome/browser/gtk/gtk_util.cc
index 62f1af0..1bca63ed 100644
--- a/chrome/browser/gtk/gtk_util.cc
+++ b/chrome/browser/gtk/gtk_util.cc
@@ -449,12 +449,7 @@ GtkWidget* CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget,
return centering_vbox;
}
-namespace {
-
-// Common implementation of ConvertAcceleratorsFromWindowsStyle() and
-// RemoveWindowsStyleAccelerators().
-std::string ConvertAmperstandsTo(const std::string& label,
- const std::string& target) {
+std::string ConvertAcceleratorsFromWindowsStyle(const std::string& label) {
std::string ret;
ret.reserve(label.length() * 2);
for (size_t i = 0; i < label.length(); ++i) {
@@ -466,7 +461,7 @@ std::string ConvertAmperstandsTo(const std::string& label,
ret.push_back(label[i]);
++i;
} else {
- ret.append(target);
+ ret.push_back('_');
}
} else {
ret.push_back(label[i]);
@@ -476,16 +471,6 @@ std::string ConvertAmperstandsTo(const std::string& label,
return ret;
}
-} // namespace
-
-std::string ConvertAcceleratorsFromWindowsStyle(const std::string& label) {
- return ConvertAmperstandsTo(label, "_");
-}
-
-std::string RemoveWindowsStyleAccelerators(const std::string& label) {
- return ConvertAmperstandsTo(label, "");
-}
-
bool IsScreenComposited() {
GdkScreen* screen = gdk_screen_get_default();
return gdk_screen_is_composited(screen) == TRUE;