From 465daa910f5fc247f7e22ea5f9b33757eebe4f0d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 21 Jul 2006 14:52:05 +0000 Subject: [PATCH] Replace gtk_rc_style_ref/unref by g_object_ref/unref. 2006-07-21 Matthias Clasen * gtk/gtkstyle.c: * gtk/gtkrc.c: * gtk/gtkwidget.c: Replace gtk_rc_style_ref/unref by g_object_ref/unref. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ gtk/gtkrc.c | 4 +--- gtk/gtkstyle.c | 4 ++-- gtk/gtkwidget.c | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 72af19b5fd..5ffe7b94f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-07-21 Matthias Clasen + * gtk/gtkstyle.c: + * gtk/gtkrc.c: + * gtk/gtkwidget.c: Replace gtk_rc_style_ref/unref by + g_object_ref/unref. + * gtk/gtkimcontextsimple.c (gtk_im_context_simple_get_preedit_string): 0-terminate outbuf in all cases. (#348227, Nguyen Thái Ngoc Duy) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 72af19b5fd..5ffe7b94f8 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,10 @@ 2006-07-21 Matthias Clasen + * gtk/gtkstyle.c: + * gtk/gtkrc.c: + * gtk/gtkwidget.c: Replace gtk_rc_style_ref/unref by + g_object_ref/unref. + * gtk/gtkimcontextsimple.c (gtk_im_context_simple_get_preedit_string): 0-terminate outbuf in all cases. (#348227, Nguyen Thái Ngoc Duy) diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index aa0b0e1a78..0b5280b001 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -2284,9 +2284,7 @@ gtk_rc_style_to_style (GtkRcContext *context, style = GTK_RC_STYLE_GET_CLASS (rc_style)->create_style (rc_style); _gtk_style_init_for_settings (style, context->settings); - style->rc_style = rc_style; - - gtk_rc_style_ref (rc_style); + style->rc_style = g_object_ref (rc_style); GTK_STYLE_GET_CLASS (style)->init_from_rc (style, rc_style); diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 7c25358c7e..7c461cf023 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -1614,10 +1614,10 @@ gtk_style_real_copy (GtkStyle *style, style->ythickness = src->ythickness; if (style->rc_style) - gtk_rc_style_unref (style->rc_style); + g_object_unref (style->rc_style); style->rc_style = src->rc_style; if (src->rc_style) - gtk_rc_style_ref (src->rc_style); + g_object_ref (src->rc_style); /* don't copy, just clear cache */ clear_property_cache (style); diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 45b9376f38..e7f6c0dcd6 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -4887,7 +4887,7 @@ gtk_widget_modify_style (GtkWidget *widget, * * Return value: the modifier style for the widget. This rc style is * owned by the widget. If you want to keep a pointer to value this - * around, you must add a refcount using gtk_rc_style_ref(). + * around, you must add a refcount using g_object_ref(). **/ GtkRcStyle * gtk_widget_get_modifier_style (GtkWidget *widget)