[gtk/gbsneto/filechooser-column-view: 63/82] filechooserentry: Trivial cleanups
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gbsneto/filechooser-column-view: 63/82] filechooserentry: Trivial cleanups
- Date: Tue, 11 Oct 2022 22:04:06 +0000 (UTC)
commit 0567068a71e54843c626b4b58e9fac907efc0314
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Oct 9 17:25:09 2022 -0300
filechooserentry: Trivial cleanups
Use g_clear_object() in a couple of places. No functional changes.
gtk/gtkfilechooserentry.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index b9861d05b9..2c417614ff 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -544,8 +544,7 @@ discard_completion_store (GtkFileChooserEntry *chooser_entry)
gtk_entry_completion_set_model (gtk_entry_get_completion (GTK_ENTRY (chooser_entry)), NULL);
update_inline_completion (chooser_entry);
- g_object_unref (chooser_entry->completion_store);
- chooser_entry->completion_store = NULL;
+ g_clear_object (&chooser_entry->completion_store);
}
static gboolean
@@ -656,11 +655,7 @@ set_completion_folder (GtkFileChooserEntry *chooser_entry,
return;
}
- if (chooser_entry->current_folder_file)
- {
- g_object_unref (chooser_entry->current_folder_file);
- chooser_entry->current_folder_file = NULL;
- }
+ g_clear_object (&chooser_entry->current_folder_file);
g_free (chooser_entry->dir_part);
chooser_entry->dir_part = g_strdup (dir_part);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]