[balsa/gtk4: 115/311] misc: Do not leak the GtkSizeGroup
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 115/311] misc: Do not leak the GtkSizeGroup
- Date: Fri, 17 Dec 2021 19:53:43 +0000 (UTC)
commit 77bd94637de75cb5235214328aa5c4d39120edf4
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Aug 30 14:01:30 2020 -0400
misc: Do not leak the GtkSizeGroup
Also fix indentation in both files.
modified: libbalsa/misc.c
modified: libbalsa/misc.h
libbalsa/misc.c | 6 +++---
libbalsa/misc.h | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libbalsa/misc.c b/libbalsa/misc.c
index 93fca39e0..d7a108fe3 100644
--- a/libbalsa/misc.c
+++ b/libbalsa/misc.c
@@ -1283,8 +1283,8 @@ libbalsa_parser_options(void)
GtkWidget *
libbalsa_add_mnemonic_button_to_box(const gchar *markup,
- GtkWidget *box,
- GtkAlign align)
+ GtkWidget *box,
+ GtkAlign align)
{
GtkSizeGroup *size_group;
GtkWidget *label;
@@ -1293,7 +1293,7 @@ libbalsa_add_mnemonic_button_to_box(const gchar *markup,
size_group = g_object_get_data(G_OBJECT(box), LIBBALSA_SIZE_GROUP_KEY);
if (size_group == NULL) {
size_group = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
- g_object_set_data(G_OBJECT(box), LIBBALSA_SIZE_GROUP_KEY, size_group);
+ g_object_set_data_full(G_OBJECT(box), LIBBALSA_SIZE_GROUP_KEY, size_group, g_object_unref);
}
label = gtk_label_new(NULL);
diff --git a/libbalsa/misc.h b/libbalsa/misc.h
index a4983de09..93b9e3c22 100644
--- a/libbalsa/misc.h
+++ b/libbalsa/misc.h
@@ -164,8 +164,8 @@ void libbalsa_parser_options_init(void);
GMimeParserOptions *libbalsa_parser_options(void);
GtkWidget * libbalsa_add_mnemonic_button_to_box(const gchar *markup,
- GtkWidget *box,
- GtkAlign align);
+ GtkWidget *box,
+ GtkAlign align);
#endif /* __LIBBALSA_MISC_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]