[metacity] Replace usage of deprecated gtk api



commit 1a92fa788d2bf9c05abae56c2720a081d9d2695c
Author: Thomas Hindoe Paaboel Andersen <phomes gmail com>
Date:   Thu Apr 30 19:45:17 2009 +0200

    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 a4d7fea..6d98de8 100644
--- a/src/include/ui.h
+++ b/src/include/ui.h
@@ -31,7 +31,7 @@
 #include <glib.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
-/* 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 dccbfd6..ebac6eb 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 32fbc70..a6da36d 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 28de317..02c1364 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 5eab87d..7ee9db0 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 6df289f..6601b5c 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]