Replace gtk_style_unref()
authorRalph Sennhauser <ralph.sennhauser@gmail.com>
Wed, 8 Nov 2017 19:12:32 +0000 (20:12 +0100)
committerAndrej Kacian <ticho@claws-mail.org>
Tue, 6 Feb 2018 19:30:22 +0000 (20:30 +0100)
gtk_style_unref() is a remnant from gtk+1 and the compatibility function
in gtk+2 is gone in gtk+3, use g_object_unref() instead.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
src/gtk/gtkutils.c
src/prefs_msg_colors.c

index e94d063..7aa5167 100644 (file)
@@ -863,7 +863,7 @@ void gtkut_set_widget_bgcolor_rgb(GtkWidget *widget, guint rgbvalue)
        newstyle->bg[GTK_STATE_PRELIGHT] = gdk_color;
        newstyle->bg[GTK_STATE_ACTIVE]   = gdk_color;
        gtk_widget_set_style(widget, newstyle);
-       gtk_style_unref(newstyle);
+       g_object_unref(newstyle);
 }
   
 /*!
@@ -1254,7 +1254,7 @@ GtkWidget *gtkut_get_link_btn(GtkWidget *window, const gchar *url, const gchar *
                style->fg[GTK_STATE_ACTIVE]   = uri_color[1];
                style->fg[GTK_STATE_PRELIGHT] = uri_color[0];
                gtk_widget_set_style(btn_label, style);
-               gtk_style_unref(style);
+               g_object_unref(style);
 #if !GTK_CHECK_VERSION(3, 0, 0)
        } else
                g_warning("color allocation failed");
index 10c94d9..76f73b9 100644 (file)
@@ -666,7 +666,7 @@ static void set_button_bg_color(GtkWidget *widget, gint rgbvalue)
        newstyle->bg[GTK_STATE_ACTIVE]   = color;
 
        gtk_widget_set_style(GTK_WIDGET(widget), newstyle);
-       gtk_style_unref(newstyle);
+       g_object_unref(newstyle);
 }
 
 static void prefs_msg_colors_save(PrefsPage *_page)