[gtk+/gtk-2.90] Use g_object_ref/unref instead deprecated gdk_*_ref/unref functions



commit b0f96af47251f4b75b8e28892dc7a2230c80f21b
Author: Javier Jardón <jjardon gnome org>
Date:   Wed Oct 14 03:02:14 2009 +0200

    Use g_object_ref/unref instead deprecated gdk_*_ref/unref functions
    
    Substitute deprecated reference counting functions for
    g_object_ref/unref in documentation and in internal code
    
    https://bugzilla.gnome.org/show_bug.cgi?id=598217

 docs/faq/gtk-faq.sgml            |    4 ++--
 docs/tutorial/gtk_tut.sgml       |    8 ++++----
 docs/tutorial/gtk_tut_12.es.sgml |    6 +++---
 docs/widget_system.txt           |    2 +-
 gdk/gdkwindow.h                  |    4 ++--
 gdk/x11/gdkcursor-x11.c          |    4 ++--
 6 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/docs/faq/gtk-faq.sgml b/docs/faq/gtk-faq.sgml
index 785d877..b90f540 100644
--- a/docs/faq/gtk-faq.sgml
+++ b/docs/faq/gtk-faq.sgml
@@ -2307,8 +2307,8 @@ used, as in:</para>
                NULL, gtk_widget_get_colormap(top),
                &amp;pixmap_mask, NULL, pixfile);
   pixw = gtk_pixmap_new (pixmap, pixmap_mask);
-  gdk_drawable_unref (pixmap);
-  gdk_drawable_unref (pixmap_mask);
+  g_object_unref (pixmap);
+  g_object_unref (pixmap_mask);
 </programlisting>
 
 </sect1>
diff --git a/docs/tutorial/gtk_tut.sgml b/docs/tutorial/gtk_tut.sgml
index 605b318..63fb0f4 100644
--- a/docs/tutorial/gtk_tut.sgml
+++ b/docs/tutorial/gtk_tut.sgml
@@ -4112,7 +4112,7 @@ static const char * xpm_data[] = {
 
 When we're done using a pixmap and not likely to reuse it again soon,
 it is a good idea to release the resource using
-gdk_drawable_unref(). Pixmaps should be considered a precious resource,
+g_object_unref(). Pixmaps should be considered a precious resource,
 because they take up memory in the end-user's X server process. Even
 though the X client you write may run on a powerful "server" computer,
 the user may be running the X server on a small personal computer.
@@ -14464,7 +14464,7 @@ static gint
 configure_event (GtkWidget *widget, GdkEventConfigure *event)
 {
   if (pixmap)
-    gdk_drawable_unref(pixmap);
+    g_object_unref(pixmap);
 
   pixmap = gdk_pixmap_new(widget->window,
 			  widget->allocation.width,
@@ -17394,7 +17394,7 @@ static gint configure_event( GtkWidget         *widget,
                              GdkEventConfigure *event )
 {
   if (pixmap)
-    gdk_drawable_unref(pixmap);
+    g_object_unref(pixmap);
 
   pixmap = gdk_pixmap_new(widget->window,
 			  widget->allocation.width,
@@ -17580,7 +17580,7 @@ static gint
 configure_event (GtkWidget *widget, GdkEventConfigure *event)
 {
   if (pixmap)
-     gdk_drawable_unref(pixmap);
+     g_object_unref(pixmap);
 
   pixmap = gdk_pixmap_new(widget->window,
                           widget->allocation.width,
diff --git a/docs/tutorial/gtk_tut_12.es.sgml b/docs/tutorial/gtk_tut_12.es.sgml
index ea72c84..fdfeffb 100755
--- a/docs/tutorial/gtk_tut_12.es.sgml
+++ b/docs/tutorial/gtk_tut_12.es.sgml
@@ -4059,7 +4059,7 @@ static const char * xpm_data[] = {
 
 Cuando hayamos acabado de usar un <em/pixmap/ y no lo vayamos a usar
 durante un tiempo suele ser conveniente liberar el recurso mediante
-gdk_drawable_unref(). (Los <em/pixmaps/ deben ser considerados recursos
+g_object_unref(). (Los <em/pixmaps/ deben ser considerados recursos
 preciosos).
 
 Una vez que hemos creado el <em/pixmap/ lo podemos mostrar como un
@@ -13961,7 +13961,7 @@ static gint
 configure_event (GtkWidget *widget, GdkEventConfigure *event)
 {
   if (pixmap)
-    gdk_drawable_unref(pixmap);
+    g_object_unref(pixmap);
 
   pixmap = gdk_pixmap_new(widget->window,
 			  widget->allocation.width,
@@ -16849,7 +16849,7 @@ static gint
 configure_event (GtkWidget *widget, GdkEventConfigure *event)
 {
   if (pixmap)
-    gdk_drawable_unref(pixmap);
+    g_object_unref(pixmap);
 
   pixmap = gdk_pixmap_new(widget->window,
 			  widget->allocation.width,
diff --git a/docs/widget_system.txt b/docs/widget_system.txt
index e60ac32..1c2867c 100644
--- a/docs/widget_system.txt
+++ b/docs/widget_system.txt
@@ -365,7 +365,7 @@ When a widget receives the "realize" signal it should:
   1) set the realized flag
   2) set widget->window
       widget->window = gtk_widget_get_parent_window (widget);
-      gdk_window_ref (widget->window);
+      g_object_ref (widget->window);
   3) attach the widget's style
 
   widget->style = gtk_style_attach (widget->style, widget->window);
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index b850275..1a42ed5 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -693,8 +693,8 @@ void       gdk_window_remove_redirection     (GdkWindow     *window);
 #define gdk_window_get_colormap        gdk_drawable_get_colormap
 #define gdk_window_set_colormap        gdk_drawable_set_colormap
 #define gdk_window_get_visual          gdk_drawable_get_visual
-#define gdk_window_ref                 gdk_drawable_ref
-#define gdk_window_unref               gdk_drawable_unref
+#define gdk_window_ref                 g_object_ref
+#define gdk_window_unref               g_object_unref
 
 #define gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height) \
    gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,x,y,width,height)
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
index 9699680..19d79cf 100644
--- a/gdk/x11/gdkcursor-x11.c
+++ b/gdk/x11/gdkcursor-x11.c
@@ -347,8 +347,8 @@ gdk_cursor_new_for_display (GdkDisplay    *display,
  *  mask = gdk_bitmap_create_from_data (NULL, cursor1mask_bits,
  *                                      cursor1_width, cursor1_height);
  *  cursor = gdk_cursor_new_from_pixmap (source, mask, &amp;fg, &amp;bg, 8, 8);
- *  gdk_drawable_unref (source);
- *  gdk_drawable_unref (mask);
+ *  g_object_unref (source);
+ *  g_object_unref (mask);
  *  
  *  
  *  gdk_window_set_cursor (widget->window, cursor);



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