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

Unified Diff: ui/base/gtk/gtk_compat.h

Issue 8897006: GTK: Remove deprecated methods and replace them with the new standard calls. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Oh, that's what the conflict was. Remove double gtk/gtk.h Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc ('k') | ui/gfx/gtk_preserve_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/gtk/gtk_compat.h
diff --git a/ui/base/gtk/gtk_compat.h b/ui/base/gtk/gtk_compat.h
index b9f7fd2a0ba8c89c2c0caece901323fa555382be..e5ef3262728d78173d2009bac6560bd34a57e886 100644
--- a/ui/base/gtk/gtk_compat.h
+++ b/ui/base/gtk/gtk_compat.h
@@ -17,6 +17,10 @@
// alphabetically by method.
#if !GTK_CHECK_VERSION(2, 20, 0)
+inline gboolean gtk_widget_get_mapped(GtkWidget* widget) {
+ return GTK_WIDGET_MAPPED(widget);
+}
+
inline gboolean gtk_widget_get_realized(GtkWidget* widget) {
return GTK_WIDGET_REALIZED(widget);
}
@@ -24,6 +28,22 @@ inline gboolean gtk_widget_get_realized(GtkWidget* widget) {
inline gboolean gtk_widget_is_toplevel(GtkWidget* widget) {
return GTK_WIDGET_TOPLEVEL(widget);
}
+
+inline void gtk_widget_set_mapped(GtkWidget* widget,
+ gboolean mapped) {
+ if (mapped)
+ GTK_WIDGET_SET_FLAGS(widget, GTK_MAPPED);
+ else
+ GTK_WIDGET_UNSET_FLAGS(widget, GTK_MAPPED);
+}
+
+inline void gtk_widget_set_realized(GtkWidget* widget,
+ gboolean realized) {
+ if (realized)
+ GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED);
+ else
+ GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED);
+}
#endif
#if !GTK_CHECK_VERSION(2, 22, 0)
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc ('k') | ui/gfx/gtk_preserve_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698