Commit 094588c1 authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

* gladeui/glade-editor-property.[ch]: Privatized members of GladeEditorProperty.

	* plugins/gtk+/*.c: updated all custom editors to used eprop accessors now
parent b5c5a76d
......@@ -18,6 +18,10 @@
* gladeui/glade-editor-table.[ch]: Privatized members of GladeEditorTable.
* gladeui/glade-editor-property.[ch]: Privatized members of GladeEditorProperty.
* plugins/gtk+/*.c: updated all custom editors to used eprop accessors now
2011-01-03 Tristan Van Berkom <tristanvb@openismus.com>
* gladeui/glade-app.[ch]:
......
......@@ -2070,8 +2070,8 @@ glade_base_editor_add_properties (GladeBaseEditor * editor,
glade_widget_create_editor_property (gchild, property, packing, TRUE);
if (eprop)
glade_base_editor_table_attach (editor,
GLADE_EDITOR_PROPERTY (eprop)->
item_label, GTK_WIDGET (eprop));
glade_editor_property_get_item_label (eprop),
GTK_WIDGET (eprop));
property = va_arg (args, gchar *);
}
va_end (args);
......
This diff is collapsed.
......@@ -74,60 +74,27 @@ GLADE_MAKE_EPROP_TYPE(func, type, GLADE_TYPE_EDITOR_PROPERTY)
typedef struct _GladeEditorProperty GladeEditorProperty;
typedef struct _GladeEditorPropertyClass GladeEditorPropertyClass;
typedef struct _GladeEditorPropertyPrivate GladeEditorPropertyPrivate;
struct _GladeEditorProperty
{
GtkHBox parent_instance;
GladePropertyClass *klass; /* The property class this GladeEditorProperty was created for
*/
GladeProperty *property; /* The currently loaded property
*/
GtkWidget *item_label; /* The property name portion of the eprop
*/
GtkWidget *label; /* The actual property name label
*/
GtkWidget *warning; /* Icon to show warnings
*/
GtkWidget *input; /* Input part of property (need to set sensitivity seperately)
*/
GtkWidget *check; /* Check button for optional properties.
*/
gulong tooltip_id; /* signal connection id for tooltip changes */
gulong sensitive_id; /* signal connection id for sensitivity changes */
gulong changed_id; /* signal connection id for value changes */
gulong enabled_id; /* signal connection id for enable/disable changes */
gulong state_id; /* signal connection id for state changes */
gboolean loading; /* True during glade_editor_property_load calls, this
* is used to avoid feedback from input widgets.
*/
gboolean committing; /* True while the editor property itself is applying
* the property with glade_editor_property_commit_no_callback ().
*/
gboolean use_command; /* Whether we should use the glade command interface
* or skip directly to GladeProperty interface.
* (used for query dialogs).
*/
GtkHBox parent_instance;
GladeEditorPropertyPrivate *priv;
};
struct _GladeEditorPropertyClass {
GtkHBoxClass parent_class;
void (* load) (GladeEditorProperty *, GladeProperty *);
GtkHBoxClass parent_class;
GtkWidget *(* create_input) (GladeEditorProperty *);
void (* load) (GladeEditorProperty *, GladeProperty *);
GtkWidget *(* create_input) (GladeEditorProperty *);
void (* commit) (GladeEditorProperty *, GValue *);
void *(* changed) (GladeEditorProperty *, GladeProperty *);
void (* commit) (GladeEditorProperty *, GValue *);
void *(* changed) (GladeEditorProperty *, GladeProperty *);
void (* glade_reserved1) (void);
void (* glade_reserved2) (void);
void (* glade_reserved3) (void);
void (* glade_reserved4) (void);
};
......@@ -146,6 +113,11 @@ void glade_editor_property_commit (GladeEditorProperty *
void glade_editor_property_commit_no_callback (GladeEditorProperty *eprop,
GValue *value);
GtkWidget *glade_editor_property_get_item_label (GladeEditorProperty *eprop);
GladePropertyClass *glade_editor_property_get_pclass (GladeEditorProperty *eprop);
GladeProperty *glade_editor_property_get_property (GladeEditorProperty *eprop);
gboolean glade_editor_property_loading (GladeEditorProperty *eprop);
gboolean glade_editor_property_show_i18n_dialog (GtkWidget *parent,
gchar **text,
gchar **context,
......
......@@ -370,9 +370,9 @@ append_item (GladeEditorTable * table,
}
gtk_widget_show (GTK_WIDGET (property));
gtk_widget_show_all (property->item_label);
gtk_widget_show_all (glade_editor_property_get_item_label (property));
glade_editor_table_attach (table, property->item_label, 0, table->priv->rows);
glade_editor_table_attach (table, glade_editor_property_get_item_label (property), 0, table->priv->rows);
glade_editor_table_attach (table, GTK_WIDGET (property), 1, table->priv->rows);
table->priv->rows++;
......
......@@ -202,7 +202,9 @@ glade_eprop_accel_populate_view (GladeEditorProperty * eprop,
{
GladeEPropAccel *eprop_accel = GLADE_EPROP_ACCEL (eprop);
GladeSignalClass *sclass;
GladeWidgetAdaptor *adaptor = glade_property_class_get_adaptor (eprop->klass);
GladePropertyClass *pclass = glade_editor_property_get_pclass (eprop);
GladeProperty *property = glade_editor_property_get_property (eprop);
GladeWidgetAdaptor *adaptor = glade_property_class_get_adaptor (pclass);
GtkTreeStore *model = (GtkTreeStore *) gtk_tree_view_get_model (view);
GtkTreeIter iter;
GladeEpropIterTab *parent_tab;
......@@ -211,7 +213,7 @@ glade_eprop_accel_populate_view (GladeEditorProperty * eprop,
gchar *name, *accel_text;
const GList *list;
accelerators = g_value_get_boxed (glade_property_inline_value (eprop->property));
accelerators = g_value_get_boxed (glade_property_inline_value (property));
/* First make parent iters...
*/
......@@ -338,10 +340,13 @@ accel_edited (GtkCellRendererAccel * accel,
gboolean key_was_set;
GtkTreeIter iter, parent_iter, new_iter;
gchar *accel_text;
GladeWidgetAdaptor *adaptor =
glade_property_class_get_adaptor (GLADE_EDITOR_PROPERTY (eprop_accel)->klass);
GladePropertyClass *pclass;
GladeWidgetAdaptor *adaptor;
gboolean is_action;
pclass = glade_editor_property_get_pclass (GLADE_EDITOR_PROPERTY (eprop_accel));
adaptor = glade_property_class_get_adaptor (pclass);
if (!gtk_tree_model_get_iter_from_string (eprop_accel->model,
&iter, path_string))
return;
......@@ -416,22 +421,23 @@ glade_eprop_accel_view (GladeEditorProperty * eprop)
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
eprop_accel->model = (GtkTreeModel *) gtk_tree_store_new (ACCEL_NUM_COLUMNS, G_TYPE_STRING, /* The GSignal name formatted for display */
G_TYPE_STRING, /* The GSignal name */
G_TYPE_STRING, /* The text to show in the accelerator cell */
G_TYPE_INT, /* PangoWeight attribute for bold headers */
G_TYPE_INT, /* PangoStyle attribute for italic grey unset items */
G_TYPE_STRING, /* Foreground colour for italic grey unset items */
G_TYPE_BOOLEAN, /* Visible attribute to hide items for header entries */
G_TYPE_BOOLEAN, /* Whether the key has been entered for this row */
G_TYPE_UINT, /* Hardware keycode */
G_TYPE_INT); /* GdkModifierType */
eprop_accel->model = (GtkTreeModel *)
gtk_tree_store_new (ACCEL_NUM_COLUMNS, G_TYPE_STRING, /* The GSignal name formatted for display */
G_TYPE_STRING, /* The GSignal name */
G_TYPE_STRING, /* The text to show in the accelerator cell */
G_TYPE_INT, /* PangoWeight attribute for bold headers */
G_TYPE_INT, /* PangoStyle attribute for italic grey unset items */
G_TYPE_STRING, /* Foreground colour for italic grey unset items */
G_TYPE_BOOLEAN, /* Visible attribute to hide items for header entries */
G_TYPE_BOOLEAN, /* Whether the key has been entered for this row */
G_TYPE_UINT, /* Hardware keycode */
G_TYPE_INT); /* GdkModifierType */
view_widget = gtk_tree_view_new_with_model (eprop_accel->model);
gtk_tree_view_set_show_expanders (GTK_TREE_VIEW (view_widget), FALSE);
gtk_tree_view_set_enable_search (GTK_TREE_VIEW (view_widget), FALSE);
/********************* signal name column *********************/
/********************* signal name column *********************/
renderer = gtk_cell_renderer_text_new ();
g_object_set (G_OBJECT (renderer), "editable", FALSE, NULL);
......@@ -443,7 +449,7 @@ glade_eprop_accel_view (GladeEditorProperty * eprop)
gtk_tree_view_column_set_expand (GTK_TREE_VIEW_COLUMN (column), TRUE);
gtk_tree_view_append_column (GTK_TREE_VIEW (view_widget), column);
/********************* accel editor column *********************/
/********************* accel editor column *********************/
renderer = gtk_cell_renderer_accel_new ();
g_object_set (G_OBJECT (renderer), "editable", TRUE, NULL);
......@@ -501,11 +507,13 @@ glade_eprop_accel_show_dialog (GtkWidget * dialog_button,
GladeEPropAccel *eprop_accel = GLADE_EPROP_ACCEL (eprop);
GtkWidget *dialog, *parent, *vbox, *sw, *tree_view;
GladeProject *project;
GladeProperty *property;
GValue value = { 0, };
GList *accelerators = NULL;
gint res;
project = glade_widget_get_project (glade_property_get_widget (eprop->property));
property = glade_editor_property_get_property (eprop);
project = glade_widget_get_project (glade_property_get_widget (property));
parent = gtk_widget_get_toplevel (GTK_WIDGET (eprop));
dialog = gtk_dialog_new_with_buttons (_("Choose accelerator keys..."),
......
......@@ -417,7 +417,7 @@ glade_activatable_editor_new (GladeWidgetAdaptor * adaptor,
eprop =
glade_widget_adaptor_create_eprop_by_name (adaptor, "related-action",
FALSE, TRUE);
table_attach (table, eprop->item_label, 0, row);
table_attach (table, glade_editor_property_get_item_label (eprop), 0, row);
table_attach (table, GTK_WIDGET (eprop), 1, row++);
activatable_editor->properties =
g_list_prepend (activatable_editor->properties, eprop);
......@@ -432,7 +432,7 @@ glade_activatable_editor_new (GladeWidgetAdaptor * adaptor,
glade_widget_adaptor_create_eprop_by_name (adaptor,
"use-action-appearance", FALSE,
TRUE);
table_attach (table, eprop->item_label, 0, row);
table_attach (table, glade_editor_property_get_item_label (eprop), 0, row);
table_attach (table, GTK_WIDGET (eprop), 1, row++);
activatable_editor->properties =
g_list_prepend (activatable_editor->properties, eprop);
......
......@@ -675,8 +675,10 @@ sync_object (GladeEPropAttrs * eprop_attrs, gboolean use_command)
}
else
{
glade_property_set (GLADE_EDITOR_PROPERTY (eprop_attrs)->property,
g_list_reverse (attributes));
GladeProperty *property =
glade_editor_property_get_property (GLADE_EDITOR_PROPERTY (eprop_attrs));
glade_property_set (property, g_list_reverse (attributes));
glade_attr_list_free (attributes);
}
}
......@@ -830,32 +832,33 @@ glade_eprop_attrs_view (GladeEditorProperty * eprop)
GtkTreeViewColumn *column;
GtkAdjustment *adjustment;
eprop_attrs->model = (GtkTreeModel *) gtk_list_store_new (NUM_COLUMNS,
/* Main Data */
G_TYPE_STRING, // COLUMN_NAME
G_TYPE_INT, // COLUMN_NAME_WEIGHT
G_TYPE_INT, // COLUMN_TYPE
G_TYPE_INT, // COLUMN_EDIT_TYPE
G_TYPE_POINTER, // COLUMN_VALUE
G_TYPE_UINT, // COLUMN_START
G_TYPE_UINT, // COLUMN_END
/* Editor renderer related */
G_TYPE_BOOLEAN, // COLUMN_TOGGLE_ACTIVE
G_TYPE_BOOLEAN, // COLUMN_TOGGLE_DOWN
G_TYPE_BOOLEAN, // COLUMN_BUTTON_ACTIVE
G_TYPE_STRING, // COLUMN_TEXT
G_TYPE_INT, // COLUMN_TEXT_STYLE
G_TYPE_STRING, // COLUMN_TEXT_FG
G_TYPE_BOOLEAN, // COLUMN_COMBO_ACTIVE
GTK_TYPE_LIST_STORE, // COLUMN_COMBO_MODEL
G_TYPE_BOOLEAN, // COLUMN_SPIN_ACTIVE
G_TYPE_UINT); // COLUMN_SPIN_DIGITS
eprop_attrs->model = (GtkTreeModel *)
gtk_list_store_new (NUM_COLUMNS,
/* Main Data */
G_TYPE_STRING, // COLUMN_NAME
G_TYPE_INT, // COLUMN_NAME_WEIGHT
G_TYPE_INT, // COLUMN_TYPE
G_TYPE_INT, // COLUMN_EDIT_TYPE
G_TYPE_POINTER, // COLUMN_VALUE
G_TYPE_UINT, // COLUMN_START
G_TYPE_UINT, // COLUMN_END
/* Editor renderer related */
G_TYPE_BOOLEAN, // COLUMN_TOGGLE_ACTIVE
G_TYPE_BOOLEAN, // COLUMN_TOGGLE_DOWN
G_TYPE_BOOLEAN, // COLUMN_BUTTON_ACTIVE
G_TYPE_STRING, // COLUMN_TEXT
G_TYPE_INT, // COLUMN_TEXT_STYLE
G_TYPE_STRING, // COLUMN_TEXT_FG
G_TYPE_BOOLEAN, // COLUMN_COMBO_ACTIVE
GTK_TYPE_LIST_STORE, // COLUMN_COMBO_MODEL
G_TYPE_BOOLEAN, // COLUMN_SPIN_ACTIVE
G_TYPE_UINT); // COLUMN_SPIN_DIGITS
view_widget = gtk_tree_view_new_with_model (eprop_attrs->model);
gtk_tree_view_set_show_expanders (GTK_TREE_VIEW (view_widget), FALSE);
gtk_tree_view_set_enable_search (GTK_TREE_VIEW (view_widget), FALSE);
/********************* attribute name column *********************/
/********************* attribute name column *********************/
renderer = gtk_cell_renderer_text_new ();
g_object_set (G_OBJECT (renderer), "editable", FALSE, NULL);
column = gtk_tree_view_column_new_with_attributes
......@@ -865,7 +868,7 @@ glade_eprop_attrs_view (GladeEditorProperty * eprop)
gtk_tree_view_column_set_expand (GTK_TREE_VIEW_COLUMN (column), TRUE);
gtk_tree_view_append_column (GTK_TREE_VIEW (view_widget), column);
/********************* attribute value column *********************/
/********************* attribute value column *********************/
column = gtk_tree_view_column_new ();
gtk_tree_view_column_set_title (column, _("Value"));
......@@ -949,9 +952,11 @@ glade_eprop_attrs_populate_view (GladeEditorProperty * eprop,
GtkListStore *model = (GtkListStore *) gtk_tree_view_get_model (view);
GtkTreeIter *iter;
GladeAttribute *gattr;
GladeProperty *property;
gchar *text;
attributes = g_value_get_boxed (glade_property_inline_value (eprop->property));
property = glade_editor_property_get_property (eprop);
attributes = g_value_get_boxed (glade_property_inline_value (property));
append_empty_row (model, PANGO_ATTR_LANGUAGE);
append_empty_row (model, PANGO_ATTR_STYLE);
......@@ -1009,15 +1014,17 @@ glade_eprop_attrs_show_dialog (GtkWidget * dialog_button,
GladeEPropAttrs *eprop_attrs = GLADE_EPROP_ATTRS (eprop);
GtkWidget *dialog, *parent, *vbox, *sw, *tree_view;
GladeProject *project;
GladeProperty *property;
GList *old_attributes;
gint res;
project = glade_widget_get_project (glade_property_get_widget (eprop->property));
parent = gtk_widget_get_toplevel (GTK_WIDGET (eprop));
property = glade_editor_property_get_property (eprop);
project = glade_widget_get_project (glade_property_get_widget (property));
parent = gtk_widget_get_toplevel (GTK_WIDGET (eprop));
/* Keep a copy for commit time... */
old_attributes = g_value_dup_boxed (glade_property_inline_value (eprop->property));
old_attributes = g_value_dup_boxed (glade_property_inline_value (property));
dialog = gtk_dialog_new_with_buttons (_("Setup Text Attributes"),
GTK_WINDOW (parent),
......@@ -1059,7 +1066,7 @@ glade_eprop_attrs_show_dialog (GtkWidget * dialog_button,
/* Update from old attributes so that there a property change
* sitting on the undo stack.
*/
glade_property_set (eprop->property, old_attributes);
glade_property_set (property, old_attributes);
sync_object (eprop_attrs, TRUE);
}
else if (res == GLADE_RESPONSE_CLEAR)
......
......@@ -508,14 +508,14 @@ glade_button_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
eprop =
glade_widget_adaptor_create_eprop_by_name (adaptor, "stock", FALSE, TRUE);
table_attach (table, eprop->item_label, 0, 0);
table_attach (table, glade_editor_property_get_item_label (eprop), 0, 0);
table_attach (table, GTK_WIDGET (eprop), 1, 0);
button_editor->properties = g_list_prepend (button_editor->properties, eprop);
eprop =
glade_widget_adaptor_create_eprop_by_name (adaptor, "image-position",
FALSE, TRUE);
table_attach (table, eprop->item_label, 0, 1);
table_attach (table, glade_editor_property_get_item_label (eprop), 0, 1);
table_attach (table, GTK_WIDGET (eprop), 1, 1);
button_editor->properties = g_list_prepend (button_editor->properties, eprop);
......@@ -538,27 +538,27 @@ glade_button_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
eprop =
glade_widget_adaptor_create_eprop_by_name (adaptor, "label", FALSE, TRUE);
table_attach (table, eprop->item_label, 0, 0);
table_attach (table, glade_editor_property_get_item_label (eprop), 0, 0);
table_attach (table, GTK_WIDGET (eprop), 1, 0);
button_editor->properties = g_list_prepend (button_editor->properties, eprop);
eprop =
glade_widget_adaptor_create_eprop_by_name (adaptor, "use-underline",
FALSE, TRUE);
table_attach (table, eprop->item_label, 0, 1);
table_attach (table, glade_editor_property_get_item_label (eprop), 0, 1);
table_attach (table, GTK_WIDGET (eprop), 1, 1);
button_editor->properties = g_list_prepend (button_editor->properties, eprop);
eprop =
glade_widget_adaptor_create_eprop_by_name (adaptor, "image", FALSE, TRUE);
table_attach (table, eprop->item_label, 0, 2);
table_attach (table, glade_editor_property_get_item_label (eprop), 0, 2);
table_attach (table, GTK_WIDGET (eprop), 1, 2);
button_editor->properties = g_list_prepend (button_editor->properties, eprop);
eprop =
glade_widget_adaptor_create_eprop_by_name (adaptor, "image-position",
FALSE, TRUE);
table_attach (table, eprop->item_label, 0, 3);
table_attach (table, glade_editor_property_get_item_label (eprop), 0, 3);
table_attach (table, GTK_WIDGET (eprop), 1, 3);
button_editor->properties = g_list_prepend (button_editor->properties, eprop);
......
......@@ -408,14 +408,14 @@ glade_cell_renderer_editor_new (GladeWidgetAdaptor * adaptor,
/* Edit property */
eprop = glade_widget_adaptor_create_eprop (adaptor, pclass, TRUE);
gtk_box_pack_start (GTK_BOX (hbox_left), eprop->item_label, TRUE,
gtk_box_pack_start (GTK_BOX (hbox_left), glade_editor_property_get_item_label (eprop), TRUE,
TRUE, 4);
gtk_box_pack_start (GTK_BOX (hbox_right), GTK_WIDGET (eprop), FALSE,
FALSE, 4);
renderer_editor->properties =
g_list_prepend (renderer_editor->properties, eprop);
tab->use_prop_label = eprop->item_label;
tab->use_prop_label = glade_editor_property_get_item_label (eprop);
tab->use_prop_eprop = GTK_WIDGET (eprop);
/* Edit attribute */
......@@ -429,7 +429,7 @@ glade_cell_renderer_editor_new (GladeWidgetAdaptor * adaptor,
gtk_grid_attach (GTK_GRID (grid), hbox_left, 0, row, 1, 1);
gtk_grid_attach (GTK_GRID (grid), hbox_right, 1, row++, 1, 1);
tab->use_attr_label = eprop->item_label;
tab->use_attr_label = glade_editor_property_get_item_label (eprop);
tab->use_attr_eprop = GTK_WIDGET (eprop);
g_signal_connect (G_OBJECT (tab->attributes_check), "toggled",
......@@ -584,7 +584,7 @@ combo_changed (GtkWidget * combo, GladeEditorProperty * eprop)
{
GValue val = { 0, };
if (eprop->loading)
if (glade_editor_property_loading (eprop))
return;
g_value_init (&val, G_TYPE_INT);
......@@ -600,7 +600,7 @@ spin_changed (GtkWidget * spin, GladeEditorProperty * eprop)
{
GValue val = { 0, };
if (eprop->loading)
if (glade_editor_property_loading (eprop))
return;
g_value_init (&val, G_TYPE_INT);
......@@ -619,7 +619,7 @@ glade_eprop_cell_attribute_create_input (GladeEditorProperty * eprop)
hbox = gtk_hbox_new (FALSE, 2);
adjustment = glade_property_class_make_adjustment (eprop->klass);
adjustment = glade_property_class_make_adjustment (glade_editor_property_get_pclass (eprop));
eprop_attribute->spin = gtk_spin_button_new (adjustment, 1.0, 0);
eprop_attribute->columns =
......
......@@ -285,9 +285,9 @@ eprop_column_adjust_rows (GladeEditorProperty * eprop, GList * columns)
{
GladeColumnType *column;
GNode *data_tree = NULL;
GladeWidget *widget = glade_property_get_widget (eprop->property);
GladeProperty *property, *prop = glade_editor_property_get_property (eprop);
GladeWidget *widget = glade_property_get_widget (prop);
GList *list;
GladeProperty *property;
gint idx;
property = glade_widget_get_property (widget, "data");
......@@ -326,15 +326,19 @@ eprop_column_adjust_rows (GladeEditorProperty * eprop, GList * columns)
}
static void
eprop_column_append (GladeEditorProperty * eprop,
const gchar * type_name, const gchar * column_name)
eprop_column_append (GladeEditorProperty *eprop,
const gchar *type_name,
const gchar *column_name)
{
GladeEPropColumnTypes *eprop_types = GLADE_EPROP_COLUMN_TYPES (eprop);
GList *columns = NULL;
GladeColumnType *data;
GValue value = { 0, };
GladeProperty *property;
property = glade_editor_property_get_property (eprop);
glade_property_get (eprop->property, &columns);
glade_property_get (property, &columns);
if (columns)
columns = glade_column_list_copy (columns);
......@@ -344,7 +348,7 @@ eprop_column_append (GladeEditorProperty * eprop,
eprop_types->adding_column = TRUE;
glade_command_push_group (_("Setting columns on %s"),
glade_widget_get_name (glade_property_get_widget (eprop->property)));
glade_widget_get_name (glade_property_get_widget (property)));
g_value_init (&value, GLADE_TYPE_COLUMN_TYPE_LIST);
g_value_take_boxed (&value, columns);
......@@ -359,8 +363,9 @@ eprop_column_append (GladeEditorProperty * eprop,
}
static gboolean
eprop_treeview_key_press (GtkWidget * treeview,
GdkEventKey * event, GladeEditorProperty * eprop)
eprop_treeview_key_press (GtkWidget *treeview,
GdkEventKey *event,
GladeEditorProperty *eprop)
{
/* Remove from list and commit value, dont touch the liststore except in load() */
GladeEPropColumnTypes *eprop_types = GLADE_EPROP_COLUMN_TYPES (eprop);
......@@ -369,6 +374,9 @@ eprop_treeview_key_press (GtkWidget * treeview,
GladeColumnType *column;
GValue value = { 0, };
gchar *column_name;
GladeProperty *property;
property = glade_editor_property_get_property (eprop);
if (event->keyval == GDK_KEY_Delete &&
gtk_tree_selection_get_selected (eprop_types->selection, NULL, &iter))
......@@ -380,7 +388,7 @@ eprop_treeview_key_press (GtkWidget * treeview,
if (!column_name)
return TRUE;
glade_property_get (eprop->property, &columns);
glade_property_get (property, &columns);
if (columns)
columns = glade_column_list_copy (columns);
g_assert (columns);
......@@ -392,7 +400,7 @@ eprop_treeview_key_press (GtkWidget * treeview,
glade_column_type_free (column);
glade_command_push_group (_("Setting columns on %s"),
glade_widget_get_name (glade_property_get_widget (eprop->property)));
glade_widget_get_name (glade_property_get_widget (property)));
eprop_types->want_focus = TRUE;
......@@ -422,8 +430,11 @@ columns_changed_idle (GladeEditorProperty * eprop)
GList *new_list = NULL, *columns = NULL, *list;
GtkTreeIter iter;
gchar *column_name;
GladeProperty *property;
glade_property_get (eprop->property, &columns);
property = glade_editor_property_get_property (eprop);
glade_property_get (property, &columns);
g_assert (columns);
columns = glade_column_list_copy (columns);
......@@ -457,7 +468,7 @@ columns_changed_idle (GladeEditorProperty * eprop)
g_list_free (columns);
glade_command_push_group (_("Setting columns on %s"),
glade_widget_get_name (glade_property_get_widget (eprop->property)));
glade_widget_get_name (glade_property_get_widget (property)));
g_value_init (&value, GLADE_TYPE_COLUMN_TYPE_LIST);
g_value_take_boxed (&value, g_list_reverse (new_list));
......@@ -474,7 +485,7 @@ static void
eprop_treeview_row_deleted (GtkTreeModel * tree_model,
GtkTreePath * path, GladeEditorProperty * eprop)
{
if (eprop->loading)
if (glade_editor_property_loading (eprop))
return;
g_idle_add ((GSourceFunc) columns_changed_idle, eprop);
......@@ -631,7 +642,9 @@ column_name_edited (GtkCellRendererText * cell,
GladeColumnType *column;
GValue value = { 0, };
GNode *data_tree = NULL;
GladeProperty *property;
GladeProperty *property, *prop;
prop = glade_editor_property_get_property (eprop);
if (eprop_types->adding_column)
return;
......@@ -648,7 +661,7 @@ column_name_edited (GtkCellRendererText * cell,
return;
/* Attempt to rename the column, and commit if successfull... */
glade_property_get (eprop->property, &columns);
glade_property_get (prop, &columns);
if (columns)
columns = glade_column_list_copy (columns);
g_assert (columns);
......@@ -676,7 +689,7 @@ column_name_edited (GtkCellRendererText * cell,
column_name = g_strdup (column_name);
glade_command_push_group (_("Setting columns on %s"),
glade_widget_get_name (glade_property_get_widget (eprop->property)));
glade_widget_get_name (glade_property_get_widget (prop)));
eprop_types->want_focus = TRUE;
......@@ -685,7 +698,7 @@ column_name_edited (GtkCellRendererText * cell,
glade_editor_property_commit (eprop, &value);
g_value_unset (&value);
property = glade_widget_get_property (glade_property_get_widget (eprop->property), "data");
property = glade_widget_get_property (glade_property_get_widget (prop), "data");
glade_property_get (property, &data_tree);
if (data_tree)
{
......@@ -710,12 +723,15 @@ column_type_edited (GtkCellRendererText * cell,
{