[glade3/glade-3-8] * plugins/gtk+/glade-label-editor.c: Dont add invisible properties to the editor, instead the in
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade3/glade-3-8] * plugins/gtk+/glade-label-editor.c: Dont add invisible properties to the editor, instead the in
- Date: Mon, 20 Dec 2010 08:07:53 +0000 (UTC)
commit b4ab27e2625cfd7f5cc0f218083e15877431ecc6
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Mon Dec 20 17:04:51 2010 +0900
* plugins/gtk+/glade-label-editor.c: Dont add invisible properties to the editor,
instead the invisible editor-property gets tied to the life-cycle of the table
it would have been added to (since recently glade_editor_property() explicitly
shows/hides properties according to if thier widget actually has an instance
of the property).
ChangeLog | 6 ++++++
plugins/gtk+/glade-label-editor.c | 14 ++++++--------
2 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4dd7b4c..042b11b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2010-12-20 Tristan Van Berkom <tristanvb openismus com>
+ * plugins/gtk+/glade-label-editor.c: Dont add invisible properties to the editor,
+ instead the invisible editor-property gets tied to the life-cycle of the table
+ it would have been added to (since recently glade_editor_property() explicitly
+ shows/hides properties according to if thier widget actually has an instance
+ of the property).
+
* plugins/gtk+/glade-gtk.c, plugins/gtk+/glade-column-types.[ch]: Added
glade_column_type_new() to create a GladeColumnType struct properly using
g_slice_new0(). An occurance of allocating the struct with g_new0 was causing
diff --git a/plugins/gtk+/glade-label-editor.c b/plugins/gtk+/glade-label-editor.c
index aaea77b..c1a9972 100644
--- a/plugins/gtk+/glade-label-editor.c
+++ b/plugins/gtk+/glade-label-editor.c
@@ -589,10 +589,9 @@ append_label_appearance (GladeLabelEditor *label_editor,
table_attach (table, GTK_WIDGET (eprop), 1, 3, label_editor->appearance_group);
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
- /* Add invisible eprops at the end of this table... */
- gtk_widget_set_no_show_all (GTK_WIDGET (markup_property), TRUE);
- gtk_widget_hide (GTK_WIDGET (markup_property));
- table_attach (table, GTK_WIDGET (markup_property), 0, 4, label_editor->appearance_group);
+ /* Tie the invisible editor property to the table's life-cycle */
+ g_object_set_data_full (G_OBJECT (table), "glade-markup-property-destroy-me",
+ markup_property, (GDestroyNotify)gtk_widget_destroy);
}
@@ -718,10 +717,9 @@ append_label_wrapping (GladeLabelEditor *label_editor,
table_attach (table, GTK_WIDGET (eprop), 1, row++, label_editor->wrap_group);
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
- /* Add invisible eprops at the end of this table... */
- gtk_widget_set_no_show_all (GTK_WIDGET (single_line_eprop), TRUE);
- gtk_widget_hide (GTK_WIDGET (single_line_eprop));
- table_attach (table, GTK_WIDGET (single_line_eprop), 0, row, label_editor->wrap_group);
+ /* Tie the invisible editor property to the table's life-cycle */
+ g_object_set_data_full (G_OBJECT (table), "glade-single-line-property-destroy-me",
+ single_line_eprop, (GDestroyNotify)gtk_widget_destroy);
}
GtkWidget *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]