From 1a92fa788d2bf9c05abae56c2720a081d9d2695c Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Thu, 30 Apr 2009 19:45:17 +0200 Subject: [PATCH] Replace usage of deprecated gtk api Fixes part of GNOME Bug #572332 --- src/include/ui.h | 2 +- src/ui/menu.c | 2 +- src/ui/preview-widget.c | 2 +- src/ui/testgradient.c | 28 ++++++++++++++-------------- src/ui/themewidget.c | 2 +- src/ui/ui.c | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/include/ui.h b/src/include/ui.h index a4d7fea7d..6d98de8b6 100644 --- a/src/include/ui.h +++ b/src/include/ui.h @@ -31,7 +31,7 @@ #include #include -/* This is between GTK_PRIORITY_RESIZE (+10) and GTK_PRIORITY_REDRAW (+20) */ +/* This is between GTK_PRIORITY_RESIZE (+10) and GDK_PRIORITY_REDRAW (+20) */ #define META_PRIORITY_RESIZE (G_PRIORITY_HIGH_IDLE + 15) typedef struct _MetaUI MetaUI; diff --git a/src/ui/menu.c b/src/ui/menu.c index dccbfd6d8..ebac6ebc3 100644 --- a/src/ui/menu.c +++ b/src/ui/menu.c @@ -473,7 +473,7 @@ meta_window_menu_new (MetaFrames *frames, gtk_signal_connect_full (GTK_OBJECT (mi), "activate", - GTK_SIGNAL_FUNC (activate_cb), + G_CALLBACK (activate_cb), NULL, md, g_free, FALSE, FALSE); diff --git a/src/ui/preview-widget.c b/src/ui/preview-widget.c index 32fbc7051..a6da36d5a 100644 --- a/src/ui/preview-widget.c +++ b/src/ui/preview-widget.c @@ -72,7 +72,7 @@ meta_preview_class_init (MetaPreviewClass *class) GtkWidgetClass *widget_class; widget_class = (GtkWidgetClass*) class; - parent_class = gtk_type_class (GTK_TYPE_BIN); + parent_class = g_type_class_peek (GTK_TYPE_BIN); gobject_class->finalize = meta_preview_finalize; diff --git a/src/ui/testgradient.c b/src/ui/testgradient.c index 28de317da..02c1364c6 100644 --- a/src/ui/testgradient.c +++ b/src/ui/testgradient.c @@ -194,13 +194,13 @@ render_multi (GdkDrawable *drawable, colors, N_COLORS, type); - gdk_pixbuf_render_to_drawable (pixbuf, - drawable, - gc, - 0, 0, - 0, 0, width, height, - GDK_RGB_DITHER_NORMAL, - 0, 0); + gdk_draw_pixbuf (drawable, + gc, + pixbuf, + 0, 0, + 0, 0, width, height, + GDK_RGB_DITHER_NORMAL, + 0, 0); g_object_unref (G_OBJECT (pixbuf)); #undef N_COLORS @@ -248,13 +248,13 @@ render_interwoven_func (GdkDrawable *drawable, colors, height / 10, colors + 2, height / 14); - gdk_pixbuf_render_to_drawable (pixbuf, - drawable, - gc, - 0, 0, - 0, 0, width, height, - GDK_RGB_DITHER_NORMAL, - 0, 0); + gdk_draw_pixbuf (drawable, + gc, + pixbuf, + 0, 0, + 0, 0, width, height, + GDK_RGB_DITHER_NORMAL, + 0, 0); g_object_unref (G_OBJECT (pixbuf)); } diff --git a/src/ui/themewidget.c b/src/ui/themewidget.c index 5eab87d6a..7ee9db087 100644 --- a/src/ui/themewidget.c +++ b/src/ui/themewidget.c @@ -69,7 +69,7 @@ meta_area_class_init (MetaAreaClass *class) object_class = (GtkObjectClass*) class; widget_class = (GtkWidgetClass*) class; - parent_class = gtk_type_class (gtk_misc_get_type ()); + parent_class = g_type_class_peek (gtk_misc_get_type ()); gobject_class->finalize = meta_area_finalize; diff --git a/src/ui/ui.c b/src/ui/ui.c index 6df289f62..6601b5c8e 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -648,7 +648,7 @@ meta_ui_window_should_not_cause_focus (Display *xdisplay, /* we shouldn't cause focus if we're an override redirect * toplevel which is not foreign */ - if (window && gdk_window_get_type (window) == GDK_WINDOW_TEMP) + if (window && gdk_window_get_window_type (window) == GDK_WINDOW_TEMP) return TRUE; else return FALSE;