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

Unified Diff: ui/gfx/gtk_preserve_window.cc

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 | « ui/base/gtk/gtk_compat.h ('k') | webkit/plugins/npapi/gtk_plugin_container_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gtk_preserve_window.cc
diff --git a/ui/gfx/gtk_preserve_window.cc b/ui/gfx/gtk_preserve_window.cc
index 79ea8184faafef7f2c844f3e43356d81859f0cba..2706f1efea2786bf6389efe5c3b6c3ad9118eabf 100644
--- a/ui/gfx/gtk_preserve_window.cc
+++ b/ui/gfx/gtk_preserve_window.cc
@@ -52,7 +52,7 @@ static void gtk_preserve_window_init(GtkPreserveWindow* widget) {
priv->preserve_window = FALSE;
// These widgets always have their own window.
- gtk_fixed_set_has_window(GTK_FIXED(widget), TRUE);
+ gtk_widget_set_has_window(GTK_WIDGET(widget), TRUE);
}
GtkWidget* gtk_preserve_window_new() {
@@ -114,14 +114,10 @@ static void gtk_preserve_window_unrealize(GtkWidget* widget) {
GtkContainerClass* container_class =
GTK_CONTAINER_CLASS(gtk_preserve_window_parent_class);
- // Deprecated as of GTK 2.22. Used for compatibility.
- // It should be: gtk_widget_get_mapped()
- if (GTK_WIDGET_MAPPED(widget)) {
+ if (gtk_widget_get_mapped(widget)) {
widget_class->unmap(widget);
- // Deprecated as of GTK 2.22. Used for compatibility.
- // It should be: gtk_widget_set_mapped(widget, FALSE)
- GTK_WIDGET_UNSET_FLAGS(widget, GTK_MAPPED);
+ gtk_widget_set_mapped(widget, FALSE);
}
// This is the behavior from GtkWidget, inherited by GtkFixed.
@@ -136,9 +132,7 @@ static void gtk_preserve_window_unrealize(GtkWidget* widget) {
gtk_selection_remove_all(widget);
gdk_window_set_user_data(widget->window, NULL);
- // Deprecated as of GTK 2.22. Used for compatibility.
- // It should be: gtk_widget_set_realized(widget, FALSE)
- GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED);
+ gtk_widget_set_realized(widget, FALSE);
} else {
GTK_WIDGET_CLASS(gtk_preserve_window_parent_class)->unrealize(widget);
}
« no previous file with comments | « ui/base/gtk/gtk_compat.h ('k') | webkit/plugins/npapi/gtk_plugin_container_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698