summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorManish Singh <yosh@gimp.org>2002-11-17 22:04:03 +0000
committerManish Singh <yosh@src.gnome.org>2002-11-17 22:04:03 +0000
commit89fd6ad3de860129877c65a95b68ba6a6c503706 (patch)
tree0ab6fea0e35535806a748d3b76bb94f3fbcad5f5 /gtk
parent1d2c2268be0179b534e390e954a173c553ff091a (diff)
downloadgdk-pixbuf-89fd6ad3de860129877c65a95b68ba6a6c503706.tar.gz
add -DGDK_DISABLE_DEPRECATED
Sun Nov 17 13:45:08 2002 Manish Singh <yosh@gimp.org> * gdk/Makefile.am: add -DGDK_DISABLE_DEPRECATED * gdk/gdk.c (gdk_exit): remove obsolete comment * gdk/gdk.h: declare gdk_input_add_full if GTK_COMPILATION for gtk_input_add_full * gdk/gdkcolor.c (gdk_color_white, gdk_color_black): use gdk_colormap_alloc_color instead of gdk_color_alloc * gdk/gdkcolor.h: declare gdk_colormap_change if GDK_COMPILATION for gdk_colors_store. Also, gdk_colors_{alloc,free} for gdk_rgb_try_colormap * gdk/gdkdrawable.h: declare gdk_draw_string if GTK_COMPILATION for gtk_default_draw_string. Also, gdk_draw_text and gdk_draw_text_wc if GDK_COMPILATION for the respective gdk_window_ and gdk_pixmap_ functions. * gdk/gdkfont.c: #undef GDK_DISABLE_DEPRECATED, completely compat code here * gdk/gdkfont.h: allow the GdkFont structure and a few gdk_font_ functions for compat code in GDK_COMPILATION and GTK_COMPILATION. * gdk/gdkrgb.c (gdk_rgb_cmap_fail, gdk_rgb_try_colormap): use gdk_colormap_free_colors instead of gdk_colors_free. * gdk/gdkrgb.c (gdk_draw_rgb_image_core): no need to set fg/bg for own_gc, unused. * gdk/gdkwindow.h: declare gdk_window_get_deskrelative_origin if GTK_COMPILATION for gtk_handle_box_button_changed. * gdk/x11/Makefile.am: add -DGDK_DISABLE_DEPRECATED, renmae -DINSIDE_GDK_X11 to -DGDK_COMPILATION * gdk/x11/gdkcolor-x11.c: remove duplicate doc string for gdk_colormap_alloc_colors. * gdk/x11/gdkfont-x11.c: #undef GDK_DISABLE_DEPRECATED, completely compat code here * gdk/x11/gdkx.h: use GDK_COMPILATION instead of INSIDE_GDK_X11, allow a few gdk_x11_font_ functions if GDK_COMPILATION for compat code * gtk/Makefile.am: add -DGDK_DISABLE_DEPRECATED * gtk/gtkclist.c * gtk/gtkctree.c * gtk/gtkpixmap.c * gtk/gtkpreview.c * gtk/gtktext.c: #undef GDK_DISABLE_DEPRECATED, deprecated widget * gtk/gtkhandlebox.c (gtk_handle_box_motion): use gdk_window_set_geometry_hints instead of gdk_window_set_hints. * gtk/gtkmain.c (gtk_exit): call exit directly * gtktipsquery.c (gtk_tips_query_real_start_query) * gtk/gtktreeitem.c (gtk_tree_item_add_pixmaps): remove some deprecated GDK usage.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/Makefile.am1
-rw-r--r--gtk/gtkclist.c2
-rw-r--r--gtk/gtkctree.c2
-rw-r--r--gtk/gtkhandlebox.c3
-rw-r--r--gtk/gtkmain.c4
-rw-r--r--gtk/gtkpixmap.c2
-rw-r--r--gtk/gtkpreview.c2
-rw-r--r--gtk/gtktext.c2
-rw-r--r--gtk/gtktipsquery.c4
-rw-r--r--gtk/gtktreeitem.c12
10 files changed, 22 insertions, 12 deletions
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);