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

Side by Side Diff: chrome/browser/gtk/gtk_util.cc

Issue 3235010: reland r57885 with a fix for linux/views. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: . Created 10 years, 3 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
« no previous file with comments | « chrome/browser/gtk/gtk_util.h ('k') | chrome/browser/login_prompt_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 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/gtk_util.h" 5 #include "chrome/browser/gtk/gtk_util.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 #include <gdk/gdkx.h> 8 #include <gdk/gdkx.h>
9 9
10 #include <cstdarg> 10 #include <cstdarg>
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 string16 GetStockPreferencesMenuLabel() { 1052 string16 GetStockPreferencesMenuLabel() {
1053 GtkStockItem stock_item; 1053 GtkStockItem stock_item;
1054 string16 preferences; 1054 string16 preferences;
1055 if (gtk_stock_lookup(GTK_STOCK_PREFERENCES, &stock_item)) { 1055 if (gtk_stock_lookup(GTK_STOCK_PREFERENCES, &stock_item)) {
1056 const char16 kUnderscore[] = { '_', 0 }; 1056 const char16 kUnderscore[] = { '_', 0 };
1057 RemoveChars(UTF8ToUTF16(stock_item.label), kUnderscore, &preferences); 1057 RemoveChars(UTF8ToUTF16(stock_item.label), kUnderscore, &preferences);
1058 } 1058 }
1059 return preferences; 1059 return preferences;
1060 } 1060 }
1061 1061
1062 bool IsWidgetAncestryVisible(GtkWidget* widget) {
1063 GtkWidget* parent = widget;
1064 while (parent && GTK_WIDGET_VISIBLE(parent))
1065 parent = parent->parent;
1066 return !parent;
1067 }
1068
1062 } // namespace gtk_util 1069 } // namespace gtk_util
OLDNEW
« no previous file with comments | « chrome/browser/gtk/gtk_util.h ('k') | chrome/browser/login_prompt_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698