[libpeas] libpeas-gtk: use gtk_widget_destroy directly



commit bf4ae9bdfab574154ccdbc3e2fa809b7396446ae
Author: Christian Hergert <chergert redhat com>
Date:   Mon Aug 5 14:03:44 2019 -0700

    libpeas-gtk: use gtk_widget_destroy directly
    
    g_clear_pointer() passes through functions directly to avoid type
    conversions. We can use that and fix the warning.

 libpeas-gtk/peas-gtk-plugin-manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libpeas-gtk/peas-gtk-plugin-manager.c b/libpeas-gtk/peas-gtk-plugin-manager.c
index e518fde..fc2508a 100644
--- a/libpeas-gtk/peas-gtk-plugin-manager.c
+++ b/libpeas-gtk/peas-gtk-plugin-manager.c
@@ -148,7 +148,7 @@ show_about_cb (GtkWidget            *widget,
   modal = toplevel == NULL ? FALSE : gtk_window_get_modal (toplevel);
 
   /* If there is another about dialog already open destroy it */
-  g_clear_pointer (&priv->about, (GDestroyNotify) gtk_widget_destroy);
+  g_clear_pointer (&priv->about, gtk_widget_destroy);
 
   priv->about = GTK_WIDGET (g_object_new (GTK_TYPE_ABOUT_DIALOG,
                                           "program-name", peas_plugin_info_get_name (info),
@@ -529,7 +529,7 @@ peas_gtk_plugin_manager_dispose (GObject *object)
   PeasGtkPluginManagerPrivate *priv = peas_gtk_plugin_manager_get_instance_private (pm);
 
   g_clear_object (&priv->engine);
-  g_clear_pointer (&priv->about, (GDestroyNotify) gtk_widget_destroy);
+  g_clear_pointer (&priv->about, gtk_widget_destroy);
 
   G_OBJECT_CLASS (peas_gtk_plugin_manager_parent_class)->dispose (object);
 }


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