[gtk+/gtk-2-24] Revert some over-eager deprecation removal
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] Revert some over-eager deprecation removal
- Date: Mon, 27 Dec 2010 23:17:10 +0000 (UTC)
commit c76b247da5194b165591a765b85e19dafba9c956
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 27 18:16:14 2010 -0500
Revert some over-eager deprecation removal
We can't replace drawable api with window api when the object
is actually a pixmap.
gdk/gdkdrawable.h | 4 +++-
gtk/gtkdnd.c | 7 +++----
2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gdk/gdkdrawable.h b/gdk/gdkdrawable.h
index bb92571..b363d49 100644
--- a/gdk/gdkdrawable.h
+++ b/gdk/gdkdrawable.h
@@ -255,14 +255,16 @@ void gdk_drawable_set_colormap (GdkDrawable *drawable,
GdkColormap* gdk_drawable_get_colormap (GdkDrawable *drawable);
gint gdk_drawable_get_depth (GdkDrawable *drawable);
-#ifndef GDK_DISABLE_DEPRECATED
+#if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
void gdk_drawable_get_size (GdkDrawable *drawable,
gint *width,
gint *height);
GdkVisual* gdk_drawable_get_visual (GdkDrawable *drawable);
GdkScreen* gdk_drawable_get_screen (GdkDrawable *drawable);
GdkDisplay* gdk_drawable_get_display (GdkDrawable *drawable);
+#endif /* GDK_DISABLE_DEPRECATED || GTK_COMPILATION */
+#ifndef GDK_DISABLE_DEPRECATED
GdkDrawable* gdk_drawable_ref (GdkDrawable *drawable);
void gdk_drawable_unref (GdkDrawable *drawable);
#endif /* GDK_DISABLE_DEPRECATED */
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 7d4ea21..c378668 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -3268,11 +3268,10 @@ gtk_drag_set_icon_pixmap (GdkDragContext *context,
screen = gdk_colormap_get_screen (colormap);
- g_return_if_fail (gdk_window_get_screen (pixmap) == screen);
+ g_return_if_fail (gdk_drawable_get_screen (pixmap) == screen);
g_return_if_fail (!mask || gdk_window_get_screen (mask) == screen);
-
- width = gdk_window_get_width (pixmap);
- height = gdk_window_get_height (pixmap);
+
+ gdk_drawable_get_size (pixmap, &width, &height);
gtk_widget_push_colormap (colormap);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]