diff options
-rw-r--r-- | gdk/Makefile.am | 3 | ||||
-rw-r--r-- | gdk/gdk.c | 2 | ||||
-rw-r--r-- | gdk/gdk.h | 5 | ||||
-rw-r--r-- | gdk/gdkcolor.c | 4 | ||||
-rw-r--r-- | gdk/gdkcolor.h | 25 | ||||
-rw-r--r-- | gdk/gdkdrawable.h | 9 | ||||
-rw-r--r-- | gdk/gdkfont.c | 2 | ||||
-rw-r--r-- | gdk/gdkfont.h | 28 | ||||
-rw-r--r-- | gdk/gdkrgb.c | 44 | ||||
-rw-r--r-- | gdk/gdkwindow.h | 3 | ||||
-rw-r--r-- | gdk/x11/Makefile.am | 3 | ||||
-rw-r--r-- | gdk/x11/gdkcolor-x11.c | 20 | ||||
-rw-r--r-- | gdk/x11/gdkfont-x11.c | 2 | ||||
-rw-r--r-- | gdk/x11/gdkx.h | 19 | ||||
-rw-r--r-- | gtk/Makefile.am | 1 | ||||
-rw-r--r-- | gtk/gtkclist.c | 2 | ||||
-rw-r--r-- | gtk/gtkctree.c | 2 | ||||
-rw-r--r-- | gtk/gtkhandlebox.c | 3 | ||||
-rw-r--r-- | gtk/gtkmain.c | 4 | ||||
-rw-r--r-- | gtk/gtkpixmap.c | 2 | ||||
-rw-r--r-- | gtk/gtkpreview.c | 2 | ||||
-rw-r--r-- | gtk/gtktext.c | 2 | ||||
-rw-r--r-- | gtk/gtktipsquery.c | 4 | ||||
-rw-r--r-- | gtk/gtktreeitem.c | 12 |
24 files changed, 109 insertions, 94 deletions
diff --git a/gdk/Makefile.am b/gdk/Makefile.am index bc40e7d95..2f3037ee9 100644 --- a/gdk/Makefile.am +++ b/gdk/Makefile.am @@ -14,14 +14,15 @@ EXTRA_DIST = \ common_includes = @STRIP_BEGIN@ \ -DG_LOG_DOMAIN=\"Gdk\" \ + -DGDK_COMPILATION \ -I$(top_srcdir) \ -I$(top_builddir)/gdk \ -I$(top_srcdir)/gdk-pixbuf \ -DG_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ @GTK_DEBUG_FLAGS@ \ @GDK_DEP_CFLAGS@ \ - -DGDK_COMPILATION \ @STRIP_END@ INCLUDES = $(common_includes) @@ -475,8 +475,6 @@ gdk_init (int *argc, char ***argv) void gdk_exit (gint errorcode) { - /* de-initialisation is done by the gdk_exit_funct(), - no need to do this here (Alex J.) */ exit (errorcode); } @@ -88,12 +88,15 @@ gboolean gdk_get_use_xshm (void); gchar* gdk_get_display (void); G_CONST_RETURN gchar* gdk_get_display_arg_name (void); -#ifndef GDK_DISABLE_DEPRECATED +#if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION) +/* Used by gtk_input_add_full () */ gint gdk_input_add_full (gint source, GdkInputCondition condition, GdkInputFunction function, gpointer data, GdkDestroyNotify destroy); +#endif /* !GDK_DISABLE_DEPRECATED || GTK_COMPILATION */ +#ifndef GDK_DISABLE_DEPRECATED gint gdk_input_add (gint source, GdkInputCondition condition, GdkInputFunction function, diff --git a/gdk/gdkcolor.c b/gdk/gdkcolor.c index a211ec9b9..8b9778d8a 100644 --- a/gdk/gdkcolor.c +++ b/gdk/gdkcolor.c @@ -170,7 +170,7 @@ gdk_color_white (GdkColormap *colormap, color->green = 65535; color->blue = 65535; - return_val = gdk_color_alloc (colormap, color); + return_val = gdk_colormap_alloc_color (colormap, color, FALSE, TRUE); } else return_val = FALSE; @@ -202,7 +202,7 @@ gdk_color_black (GdkColormap *colormap, color->green = 0; color->blue = 0; - return_val = gdk_color_alloc (colormap, color); + return_val = gdk_colormap_alloc_color (colormap, color, FALSE, TRUE); } else return_val = FALSE; diff --git a/gdk/gdkcolor.h b/gdk/gdkcolor.h index 87bfc80d7..d1835dd8c 100644 --- a/gdk/gdkcolor.h +++ b/gdk/gdkcolor.h @@ -74,7 +74,10 @@ GdkScreen *gdk_colormap_get_screen (GdkColormap *cmap); #ifndef GDK_DISABLE_DEPRECATED gint gdk_colormap_get_system_size (void); +#endif +#if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION) +/* Used by gdk_colors_store () */ void gdk_colormap_change (GdkColormap *colormap, gint ncolors); #endif @@ -113,6 +116,18 @@ GType gdk_color_get_type (void); void gdk_colors_store (GdkColormap *colormap, GdkColor *colors, gint ncolors); +gint gdk_color_white (GdkColormap *colormap, + GdkColor *color); +gint gdk_color_black (GdkColormap *colormap, + GdkColor *color); +gint gdk_color_alloc (GdkColormap *colormap, + GdkColor *color); +gint gdk_color_change (GdkColormap *colormap, + GdkColor *color); +#endif /* GDK_DISABLE_DEPRECATED */ + +#if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION) +/* Used by gdk_rgb_try_colormap () */ gint gdk_colors_alloc (GdkColormap *colormap, gboolean contiguous, gulong *planes, @@ -123,15 +138,7 @@ void gdk_colors_free (GdkColormap *colormap, gulong *pixels, gint npixels, gulong planes); -gint gdk_color_white (GdkColormap *colormap, - GdkColor *color); -gint gdk_color_black (GdkColormap *colormap, - GdkColor *color); -gint gdk_color_alloc (GdkColormap *colormap, - GdkColor *color); -gint gdk_color_change (GdkColormap *colormap, - GdkColor *color); -#endif /* GDK_DISABLE_DEPRECATED */ +#endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION */ #ifdef __cplusplus } diff --git a/gdk/gdkdrawable.h b/gdk/gdkdrawable.h index e81d3935d..f250f3ea0 100644 --- a/gdk/gdkdrawable.h +++ b/gdk/gdkdrawable.h @@ -236,13 +236,17 @@ void gdk_draw_polygon (GdkDrawable *drawable, gboolean filled, GdkPoint *points, gint npoints); -#ifndef GDK_DISABLE_DEPRECATED +#if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION) +/* Used by gtk_default_draw_string () */ void gdk_draw_string (GdkDrawable *drawable, GdkFont *font, GdkGC *gc, gint x, gint y, const gchar *string); +#endif /* !GDK_DISABLE_DEPRECATED || GTK_COMPILATION */ +#if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION) +/* Used by gdk_pixmap_draw_text (), gdk_window_draw_text() */ void gdk_draw_text (GdkDrawable *drawable, GdkFont *font, GdkGC *gc, @@ -250,6 +254,7 @@ void gdk_draw_text (GdkDrawable *drawable, gint y, const gchar *text, gint text_length); +/* Used by gdk_pixmap_draw_text_wc (), gdk_window_draw_text_wc () */ void gdk_draw_text_wc (GdkDrawable *drawable, GdkFont *font, GdkGC *gc, @@ -257,7 +262,7 @@ void gdk_draw_text_wc (GdkDrawable *drawable, gint y, const GdkWChar *text, gint text_length); -#endif /* GDK_DISABLE_DEPRECATED */ +#endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION */ void gdk_draw_drawable (GdkDrawable *drawable, GdkGC *gc, GdkDrawable *src, diff --git a/gdk/gdkfont.c b/gdk/gdkfont.c index c116851ab..02dd2f214 100644 --- a/gdk/gdkfont.c +++ b/gdk/gdkfont.c @@ -24,6 +24,8 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#undef GDK_DISABLE_DEPRECATED + #include "gdkdisplay.h" #include "gdkfont.h" #include "gdkinternals.h" diff --git a/gdk/gdkfont.h b/gdk/gdkfont.h index 5ff42873e..32d66e9d6 100644 --- a/gdk/gdkfont.h +++ b/gdk/gdkfont.h @@ -1,4 +1,4 @@ -#ifndef GDK_DISABLE_DEPRECATED +#if !defined(GDK_DISABLE_DEPRECATED) || defined(GDK_COMPILATION) || defined(GTK_COMPILATION) #ifndef __GDK_FONT_H__ #define __GDK_FONT_H__ @@ -31,11 +31,11 @@ struct _GdkFont GType gdk_font_get_type (void); -#ifndef GDK_MULTIHEAD_SAFE -GdkFont* gdk_font_load (const gchar *font_name); -GdkFont* gdk_fontset_load (const gchar *fontset_name); -GdkFont* gdk_font_from_description (PangoFontDescription *font_desc); -#endif +GdkFont* gdk_font_ref (GdkFont *font); +void gdk_font_unref (GdkFont *font); +gint gdk_font_id (const GdkFont *font); +gboolean gdk_font_equal (const GdkFont *fonta, + const GdkFont *fontb); GdkFont *gdk_font_load_for_display (GdkDisplay *display, const gchar *font_name); @@ -44,11 +44,13 @@ GdkFont *gdk_fontset_load_for_display (GdkDisplay *display, GdkFont *gdk_font_from_description_for_display (GdkDisplay *display, PangoFontDescription *font_desc); -GdkFont* gdk_font_ref (GdkFont *font); -void gdk_font_unref (GdkFont *font); -gint gdk_font_id (const GdkFont *font); -gboolean gdk_font_equal (const GdkFont *fonta, - const GdkFont *fontb); +#ifndef GDK_DISABLE_DEPRECATED + +#ifndef GDK_MULTIHEAD_SAFE +GdkFont* gdk_font_load (const gchar *font_name); +GdkFont* gdk_fontset_load (const gchar *fontset_name); +GdkFont* gdk_font_from_description (PangoFontDescription *font_desc); +#endif gint gdk_string_width (GdkFont *font, const gchar *string); @@ -103,10 +105,12 @@ void gdk_string_extents (GdkFont *font, GdkDisplay * gdk_font_get_display (GdkFont *font); +#endif /* GDK_DISABLE_DEPRECATED */ + #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GDK_FONT_H__ */ -#endif /* GDK_DISABLE_DEPRECATED */ +#endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION || GTK_COMPILATION */ diff --git a/gdk/gdkrgb.c b/gdk/gdkrgb.c index 9d80cd424..20f1eef31 100644 --- a/gdk/gdkrgb.c +++ b/gdk/gdkrgb.c @@ -146,7 +146,7 @@ static gboolean gdk_rgb_verbose = FALSE; static gint gdk_rgb_cmap_fail (const char *msg, GdkColormap *cmap, gulong *pixels) { - gulong free_pixels[256]; + GdkColor free_colors[256]; gint n_free; gint i; @@ -156,9 +156,9 @@ gdk_rgb_cmap_fail (const char *msg, GdkColormap *cmap, gulong *pixels) n_free = 0; for (i = 0; i < 256; i++) if (pixels[i] < 256) - free_pixels[n_free++] = pixels[i]; + free_colors[n_free++].pixel = pixels[i]; if (n_free) - gdk_colors_free (cmap, free_pixels, n_free, 0); + gdk_colormap_free_colors (cmap, free_colors, n_free); return 0; } @@ -257,18 +257,22 @@ gdk_rgb_try_colormap (GdkRgbInfo *image_info, gboolean force, b0 = bi * 255 / (nb - 1); idx = ((ri * nr) + gi) * nb + bi; d2 = (r - r0) * (r - r0) + (g - g0) * (g - g0) + (b - b0) * (b - b0); - if (d2 < best[idx]) { - if (pixels[idx] < 256) - gdk_colors_free (cmap, pixels + idx, 1, 0); - else - colors_needed--; - color = cmap->colors[i]; - if (!gdk_colormap_alloc_color (cmap, &color, FALSE, FALSE)) - return gdk_rgb_cmap_fail ("error allocating system color\n", - cmap, pixels); - pixels[idx] = color.pixel; /* which is almost certainly i */ - best[idx] = d2; - } + if (d2 < best[idx]) + { + if (pixels[idx] < 256) + { + color.pixel = pixels[idx]; + gdk_colormap_free_colors (cmap, &color, 1); + } + else + colors_needed--; + color = cmap->colors[i]; + if (!gdk_colormap_alloc_color (cmap, &color, FALSE, FALSE)) + return gdk_rgb_cmap_fail ("error allocating system color\n", + cmap, pixels); + pixels[idx] = color.pixel; /* which is almost certainly i */ + best[idx] = d2; + } } #endif @@ -3108,15 +3112,7 @@ gdk_draw_rgb_image_core (GdkRgbInfo *image_info, if (image_info->bitmap) { if (image_info->own_gc == NULL) - { - GdkColor color; - - image_info->own_gc = gdk_gc_new (drawable); - gdk_color_white (image_info->cmap, &color); - gdk_gc_set_foreground (image_info->own_gc, &color); - gdk_color_black (image_info->cmap, &color); - gdk_gc_set_background (image_info->own_gc, &color); - } + image_info->own_gc = gdk_gc_new (drawable); gc = image_info->own_gc; } for (y0 = 0; y0 < height; y0 += GDK_SCRATCH_IMAGE_HEIGHT) diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h index f8524c2ab..f8f944b44 100644 --- a/gdk/gdkwindow.h +++ b/gdk/gdkwindow.h @@ -449,7 +449,8 @@ gint gdk_window_get_origin (GdkWindow *window, gint *x, gint *y); -#ifndef GDK_DISABLE_DEPRECATED +#if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION) +/* Used by gtk_handle_box_button_changed () */ gboolean gdk_window_get_deskrelative_origin (GdkWindow *window, gint *x, gint *y); diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am index 3beac8434..a33987805 100644 --- a/gdk/x11/Makefile.am +++ b/gdk/x11/Makefile.am @@ -4,12 +4,13 @@ libgdkincludedir = $(includedir)/gtk-2.0/gdk INCLUDES = @STRIP_BEGIN@ \ -DG_LOG_DOMAIN=\"Gdk\" \ - -DINSIDE_GDK_X11 \ + -DGDK_COMPILATION \ -I$(top_srcdir) \ -I$(top_srcdir)/gdk \ -I$(top_builddir)/gdk \ -DG_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ @GTK_DEBUG_FLAGS@ \ @GDK_DEP_CFLAGS@ \ @STRIP_END@ diff --git a/gdk/x11/gdkcolor-x11.c b/gdk/x11/gdkcolor-x11.c index 57c84a952..57f78b44c 100644 --- a/gdk/x11/gdkcolor-x11.c +++ b/gdk/x11/gdkcolor-x11.c @@ -1072,26 +1072,6 @@ gint gdk_colormap_alloc_colors (GdkColormap *colormap, GdkColor *colors, gint ncolors, -/** - * gdk_colormap_alloc_colors: - * @colormap: a #GdkColormap. - * @colors: The color values to allocate. On return, the pixel - * values for allocated colors will be filled in. - * @ncolors: The number of colors in @colors. - * @writeable: If %TRUE, the colors are allocated writeable - * (their values can later be changed using gdk_color_change()). - * Writeable colors cannot be shared between applications. - * @best_match: If %TRUE, GDK will attempt to do matching against - * existing colors if the colors cannot be allocated as requested. - * @success: An array of length @ncolors. On return, this - * indicates whether the corresponding color in @colors was - * sucessfully allocated or not. - * - * Allocates colors from a colormap. - * - * Return value: The number of colors that were not sucessfully - * allocated. - **/ gboolean writeable, gboolean best_match, gboolean *success) diff --git a/gdk/x11/gdkfont-x11.c b/gdk/x11/gdkfont-x11.c index 78f2558c9..0b3a55a99 100644 --- a/gdk/x11/gdkfont-x11.c +++ b/gdk/x11/gdkfont-x11.c @@ -24,6 +24,8 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#undef GDK_DISABLE_DEPRECATED + #include <X11/Xlib.h> #include <X11/Xos.h> #include <locale.h> diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h index 93c5cdfca..7faf67e38 100644 --- a/gdk/x11/gdkx.h +++ b/gdk/x11/gdkx.h @@ -73,7 +73,7 @@ gint gdk_x11_get_default_screen (void); #define GDK_DISPLAY() gdk_display #endif -#ifdef INSIDE_GDK_X11 +#ifdef GDK_COMPILATION #include "gdkprivate-x11.h" #include "gdkscreen-x11.h" @@ -95,7 +95,7 @@ gint gdk_x11_get_default_screen (void); #define GDK_GC_GET_XGC(gc) (GDK_GC_X11(gc)->dirty_mask ? _gdk_x11_gc_flush (gc) : ((GdkGCX11 *)(gc))->xgc) #define GDK_WINDOW_XWINDOW GDK_DRAWABLE_XID -#else /* INSIDE_GDK_X11 */ +#else /* GDK_COMPILATION */ #ifndef GDK_MULTIHEAD_SAFE #define GDK_ROOT_WINDOW() (gdk_x11_get_default_root_xwindow ()) @@ -117,7 +117,7 @@ gint gdk_x11_get_default_screen (void); #define GDK_SCREEN_XNUMBER(screen) (gdk_x11_screen_get_screen_number (screen)) #define GDK_VISUAL_XVISUAL(visual) (gdk_x11_visual_get_xvisual (visual)) -#endif /* INSIDE_GDK_X11 */ +#endif /* GDK_COMPILATION */ GdkVisual* gdk_x11_screen_lookup_visual (GdkScreen *screen, VisualID xvisualid); @@ -172,22 +172,27 @@ G_CONST_RETURN gchar *gdk_x11_get_xatom_name (Atom xatom); void gdk_x11_display_grab (GdkDisplay *display); void gdk_x11_display_ungrab (GdkDisplay *display); +#if !defined(GDK_DISABLE_DEPRECATED) || defined(GDK_COMPILATION) + +gpointer gdk_x11_font_get_xfont (GdkFont *font); +#define GDK_FONT_XFONT(font) (gdk_x11_font_get_xfont (font)) + +#define gdk_font_lookup_for_display(display, xid) ((GdkFont*) gdk_xid_table_lookup_for_display (display, xid)) + +#endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION */ + #ifndef GDK_DISABLE_DEPRECATED Display * gdk_x11_font_get_xdisplay (GdkFont *font); -gpointer gdk_x11_font_get_xfont (GdkFont *font); G_CONST_RETURN char *gdk_x11_font_get_name (GdkFont *font); #define GDK_FONT_XDISPLAY(font) (gdk_x11_font_get_xdisplay (font)) -#define GDK_FONT_XFONT(font) (gdk_x11_font_get_xfont (font)) #ifndef GDK_MULTIHEAD_SAFE #define gdk_font_lookup(xid) ((GdkFont*) gdk_xid_table_lookup (xid)) #endif /* GDK_MULTIHEAD_SAFE */ -#define gdk_font_lookup_for_display(display, xid) ((GdkFont*) gdk_xid_table_lookup_for_display (display, xid)) - #endif /* GDK_DISABLE_DEPRECATED */ G_END_DECLS diff --git a/gtk/Makefile.am b/gtk/Makefile.am index cd284d8e5..d97e10bb7 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -18,6 +18,7 @@ INCLUDES = @STRIP_BEGIN@ \ -I$(top_srcdir)/gdk-pixbuf -I../gdk-pixbuf \ -DG_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ @GTK_DEBUG_FLAGS@ \ @GTK_DEP_CFLAGS@ \ @STRIP_END@ diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c index 9f7f0d9c0..05de8073f 100644 --- a/gtk/gtkclist.c +++ b/gtk/gtkclist.c @@ -25,6 +25,8 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#undef GDK_DISABLE_DEPRECATED + #include <stdlib.h> #include <string.h> #include "config.h" diff --git a/gtk/gtkctree.c b/gtk/gtkctree.c index 787dce207..4472a33fa 100644 --- a/gtk/gtkctree.c +++ b/gtk/gtkctree.c @@ -28,6 +28,8 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#undef GDK_DISABLE_DEPRECATED + #include <stdlib.h> #include "gtkctree.h" #include "gtkbindings.h" diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c index aa31060f5..9611d12de 100644 --- a/gtk/gtkhandlebox.c +++ b/gtk/gtkhandlebox.c @@ -1094,6 +1094,7 @@ gtk_handle_box_motion (GtkWidget *widget, gint snap_edge; gboolean is_snapped = FALSE; gint handle_position; + GdkGeometry geometry; hb = GTK_HANDLE_BOX (widget); if (!hb->in_drag) @@ -1260,7 +1261,7 @@ gtk_handle_box_motion (GtkWidget *widget, gdk_window_move_resize (hb->float_window, new_x, new_y, width, height); gdk_window_reparent (hb->bin_window, hb->float_window, 0, 0); - gdk_window_set_hints (hb->float_window, new_x, new_y, 0, 0, 0, 0, GDK_HINT_POS); + gdk_window_set_geometry_hints (hb->float_window, &geometry, GDK_HINT_POS); gdk_window_show (hb->float_window); hb->float_window_mapped = TRUE; #if 0 diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 0f0277726..267ef0cae 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -966,9 +966,7 @@ gtk_init_check_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof void gtk_exit (gint errorcode) { - /* Only if "gtk" has been initialized should we de-initialize. - */ - gdk_exit (errorcode); + exit (errorcode); } diff --git a/gtk/gtkpixmap.c b/gtk/gtkpixmap.c index d7f6a8619..765109f3b 100644 --- a/gtk/gtkpixmap.c +++ b/gtk/gtkpixmap.c @@ -27,6 +27,8 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#undef GDK_DISABLE_DEPRECATED + #include <math.h> #include "gtkcontainer.h" #include "gtkpixmap.h" diff --git a/gtk/gtkpreview.c b/gtk/gtkpreview.c index f4e3de138..ba8c06bc7 100644 --- a/gtk/gtkpreview.c +++ b/gtk/gtkpreview.c @@ -24,6 +24,8 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#undef GDK_DISABLE_DEPRECATED + #include "config.h" #include <math.h> diff --git a/gtk/gtktext.c b/gtk/gtktext.c index dce952a59..172302e8b 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -24,6 +24,8 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#undef GDK_DISABLE_DEPRECATED + #include <ctype.h> #include <string.h> #include "gdk/gdkkeysyms.h" diff --git a/gtk/gtktipsquery.c b/gtk/gtktipsquery.c index 98f1c0530..0e1177c35 100644 --- a/gtk/gtktipsquery.c +++ b/gtk/gtktipsquery.c @@ -353,7 +353,7 @@ gtk_tips_query_real_start_query (GtkTipsQuery *tips_query) GDK_CURRENT_TIME); if (failure) { - gdk_cursor_destroy (tips_query->query_cursor); + gdk_cursor_unref (tips_query->query_cursor); tips_query->query_cursor = NULL; } gtk_grab_add (GTK_WIDGET (tips_query)); @@ -369,7 +369,7 @@ gtk_tips_query_real_stop_query (GtkTipsQuery *tips_query) { gdk_display_pointer_ungrab (gtk_widget_get_display (GTK_WIDGET (tips_query)), GDK_CURRENT_TIME); - gdk_cursor_destroy (tips_query->query_cursor); + gdk_cursor_unref (tips_query->query_cursor); tips_query->query_cursor = NULL; } if (tips_query->last_crossed) diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c index c764a0d3f..989f21aac 100644 --- a/gtk/gtktreeitem.c +++ b/gtk/gtktreeitem.c @@ -382,7 +382,7 @@ gtk_tree_item_add_pixmaps (GtkTreeItem *tree_item) pixmap_node = g_new (GtkTreePixmaps, 1); pixmap_node->colormap = colormap; - gdk_colormap_ref (colormap); + g_object_ref (colormap); pixmap_node->refcount = 1; @@ -422,11 +422,11 @@ gtk_tree_item_remove_pixmaps (GtkTreeItem *tree_item) if (--pixmap_node->refcount == 0) { - gdk_colormap_unref (pixmap_node->colormap); - gdk_pixmap_unref (pixmap_node->pixmap_plus); - gdk_bitmap_unref (pixmap_node->mask_plus); - gdk_pixmap_unref (pixmap_node->pixmap_minus); - gdk_bitmap_unref (pixmap_node->mask_minus); + g_object_unref (pixmap_node->colormap); + g_object_unref (pixmap_node->pixmap_plus); + g_object_unref (pixmap_node->mask_plus); + g_object_unref (pixmap_node->pixmap_minus); + g_object_unref (pixmap_node->mask_minus); pixmaps = g_list_remove_link (pixmaps, tree_item->pixmaps); g_list_free_1 (tree_item->pixmaps); |