Commit ea85c5c6 authored by Bastien Nocera's avatar Bastien Nocera

settings-widget: Simplify row_inserted_cb() by using g_auto

parent e536ef06
......@@ -1624,8 +1624,9 @@ row_inserted_cb (GtkTreeModel *tree_model,
BluetoothSettingsWidget *self = user_data;
BluetoothSettingsWidgetPrivate *priv = BLUETOOTH_SETTINGS_WIDGET_GET_PRIVATE (user_data);
GDBusProxy *proxy;
char *name, *bdaddr;
g_autoptr(GDBusProxy) proxy = NULL;
g_autofree char *name = NULL;
g_autofree char *bdaddr = NULL;
BluetoothType type;
gboolean paired, trusted, connected, legacy_pairing;
GtkWidget *row;
......@@ -1635,7 +1636,6 @@ row_inserted_cb (GtkTreeModel *tree_model,
g_debug ("Not adding device '%s'", name);
g_free (name);
......@@ -1669,10 +1669,6 @@ row_inserted_cb (GtkTreeModel *tree_model,
gtk_container_add (GTK_CONTAINER (priv->device_list), row);
gtk_size_group_add_widget (priv->row_sizegroup, row);
g_object_unref (proxy);
g_free (name);
g_free (bdaddr);
gtk_stack_set_transition_type (GTK_STACK (priv->device_stack),
gtk_container_child_set (GTK_CONTAINER (WID ("vbox_bluetooth")),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment