summaryrefslogtreecommitdiff
path: root/mate-panel/libmate-panel-applet-private/panel-applet-container.c
diff options
context:
space:
mode:
Diffstat (limited to 'mate-panel/libmate-panel-applet-private/panel-applet-container.c')
-rw-r--r--mate-panel/libmate-panel-applet-private/panel-applet-container.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/mate-panel/libmate-panel-applet-private/panel-applet-container.c b/mate-panel/libmate-panel-applet-private/panel-applet-container.c
index 9a4945a0..bd2269e9 100644
--- a/mate-panel/libmate-panel-applet-private/panel-applet-container.c
+++ b/mate-panel/libmate-panel-applet-private/panel-applet-container.c
@@ -2,6 +2,7 @@
* panel-applet-container.c: a container for applets.
*
* Copyright (C) 2010 Carlos Garcia Campos <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -160,25 +161,15 @@ mate_panel_applet_container_dispose (GObject *object)
container->priv->pending_ops = NULL;
}
- if (container->priv->bus_name) {
- g_free (container->priv->bus_name);
- container->priv->bus_name = NULL;
- }
-
- if (container->priv->iid) {
- g_free (container->priv->iid);
- container->priv->iid = NULL;
- }
+ g_clear_pointer (&container->priv->bus_name, g_free);
+ g_clear_pointer (&container->priv->iid, g_free);
if (container->priv->name_watcher_id > 0) {
g_bus_unwatch_name (container->priv->name_watcher_id);
container->priv->name_watcher_id = 0;
}
- if (container->priv->applet_proxy) {
- g_object_unref (container->priv->applet_proxy);
- container->priv->applet_proxy = NULL;
- }
+ g_clear_object (&container->priv->applet_proxy);
G_OBJECT_CLASS (mate_panel_applet_container_parent_class)->dispose (object);
}
@@ -247,7 +238,7 @@ mate_panel_applet_container_class_init (MatePanelAppletContainerClass *klass)
static const AppletPropertyInfo *
mate_panel_applet_container_child_property_get_info (const gchar *property_name)
{
- gint i;
+ gsize i;
g_assert (property_name != NULL);
@@ -764,7 +755,7 @@ mate_panel_applet_container_child_get_finish (MatePanelAppletContainer *containe
{
g_return_val_if_fail (g_task_is_valid (result, container), NULL);
g_warn_if_fail (g_task_get_source_tag (G_TASK (result)) == mate_panel_applet_container_child_get);
-
+
return g_variant_ref (g_task_propagate_pointer (G_TASK (result), error));
}