mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-11-06 00:05:17 -05:00
* gladeui/glade-editor-property.[ch]: Privatized members of GladeEditorProperty.
* plugins/gtk+/*.c: updated all custom editors to used eprop accessors now
This commit is contained in:
parent
b5c5a76d8c
commit
094588c1af
@ -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);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -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;
|
||||
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).
|
||||
*/
|
||||
GladeEditorPropertyPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GladeEditorPropertyClass {
|
||||
GtkHBoxClass parent_class;
|
||||
GtkHBoxClass parent_class;
|
||||
|
||||
void (* load) (GladeEditorProperty *, GladeProperty *);
|
||||
void (* load) (GladeEditorProperty *, GladeProperty *);
|
||||
GtkWidget *(* create_input) (GladeEditorProperty *);
|
||||
void (* commit) (GladeEditorProperty *, GValue *);
|
||||
void *(* changed) (GladeEditorProperty *, GladeProperty *);
|
||||
|
||||
GtkWidget *(* create_input) (GladeEditorProperty *);
|
||||
|
||||
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;
|
||||
|
||||
glade_property_get (eprop->property, &columns);
|
||||
property = glade_editor_property_get_property (eprop);
|
||||
|
||||
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,
|
||||
{
|
||||
GladeEPropColumnTypes *eprop_types = GLADE_EPROP_COLUMN_TYPES (eprop);
|
||||
GtkTreeIter iter;
|
||||
GladeProperty *property;
|
||||
gchar *column_name;
|
||||
|
||||
if (!gtk_tree_model_get_iter_from_string
|
||||
(GTK_TREE_MODEL (eprop_types->store), &iter, path))
|
||||
return;
|
||||
|
||||
property = glade_editor_property_get_property (eprop);
|
||||
|
||||
if (type_name && type_name[0])
|
||||
{
|
||||
column_name =
|
||||
@ -726,7 +742,7 @@ column_type_edited (GtkCellRendererText * cell,
|
||||
else
|
||||
{
|
||||
eprop_types->want_focus = TRUE;
|
||||
glade_editor_property_load (eprop, eprop->property);
|
||||
glade_editor_property_load (eprop, property);
|
||||
eprop_types->want_focus = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -579,7 +579,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
entry_editor->text_radio = gtk_radio_button_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->text_radio, FALSE, FALSE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 0);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 0);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
@ -593,7 +593,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
(GTK_RADIO_BUTTON (entry_editor->text_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->buffer_radio, FALSE, FALSE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 1);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 1);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
@ -622,7 +622,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
eprop =
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "progress-fraction",
|
||||
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);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
|
||||
@ -630,7 +630,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
eprop =
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "progress-pulse-step",
|
||||
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);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
|
||||
@ -662,7 +662,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
entry_editor->primary_pixbuf_radio = gtk_radio_button_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->primary_pixbuf_radio, FALSE,
|
||||
FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 0);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 0);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
@ -676,7 +676,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
(GTK_RADIO_BUTTON (entry_editor->primary_pixbuf_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->primary_stock_radio, FALSE,
|
||||
FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 1);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 1);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
@ -690,7 +690,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
(GTK_RADIO_BUTTON (entry_editor->primary_pixbuf_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->primary_icon_name_radio,
|
||||
FALSE, FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 2);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 2);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
@ -700,7 +700,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor,
|
||||
"primary-icon-activatable",
|
||||
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);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
|
||||
@ -708,7 +708,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor,
|
||||
"primary-icon-sensitive",
|
||||
FALSE, TRUE);
|
||||
table_attach (table, eprop->item_label, 0, 4);
|
||||
table_attach (table, glade_editor_property_get_item_label (eprop), 0, 4);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 4);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
|
||||
@ -716,7 +716,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor,
|
||||
"primary-icon-tooltip-text",
|
||||
FALSE, TRUE);
|
||||
table_attach (table, eprop->item_label, 0, 5);
|
||||
table_attach (table, glade_editor_property_get_item_label (eprop), 0, 5);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 5);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
|
||||
@ -724,7 +724,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor,
|
||||
"primary-icon-tooltip-markup",
|
||||
FALSE, TRUE);
|
||||
table_attach (table, eprop->item_label, 0, 6);
|
||||
table_attach (table, glade_editor_property_get_item_label (eprop), 0, 6);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 6);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
|
||||
@ -756,7 +756,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
entry_editor->secondary_pixbuf_radio = gtk_radio_button_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->secondary_pixbuf_radio,
|
||||
FALSE, FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 0);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 0);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
@ -770,7 +770,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
(GTK_RADIO_BUTTON (entry_editor->secondary_pixbuf_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->secondary_stock_radio,
|
||||
FALSE, FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 1);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 1);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
@ -785,7 +785,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
(GTK_RADIO_BUTTON (entry_editor->secondary_pixbuf_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->secondary_icon_name_radio,
|
||||
FALSE, FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 2);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 2);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
@ -795,7 +795,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor,
|
||||
"secondary-icon-activatable",
|
||||
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);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
|
||||
@ -803,7 +803,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor,
|
||||
"secondary-icon-sensitive",
|
||||
FALSE, TRUE);
|
||||
table_attach (table, eprop->item_label, 0, 4);
|
||||
table_attach (table, glade_editor_property_get_item_label (eprop), 0, 4);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 4);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
|
||||
@ -811,7 +811,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor,
|
||||
"secondary-icon-tooltip-text",
|
||||
FALSE, TRUE);
|
||||
table_attach (table, eprop->item_label, 0, 5);
|
||||
table_attach (table, glade_editor_property_get_item_label (eprop), 0, 5);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 5);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
|
||||
@ -819,7 +819,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor,
|
||||
"secondary-icon-tooltip-markup",
|
||||
FALSE, TRUE);
|
||||
table_attach (table, eprop->item_label, 0, 6);
|
||||
table_attach (table, glade_editor_property_get_item_label (eprop), 0, 6);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 6);
|
||||
entry_editor->properties = g_list_prepend (entry_editor->properties, eprop);
|
||||
|
||||
|
||||
@ -187,7 +187,7 @@ glade_icon_factory_editor_new (GladeWidgetAdaptor * adaptor,
|
||||
factory_editor->properties =
|
||||
g_list_prepend (factory_editor->properties, eprop);
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame), eprop->item_label);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame), glade_editor_property_get_item_label (eprop));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
|
||||
gtk_box_pack_start (GTK_BOX (factory_editor), frame, FALSE, FALSE, 12);
|
||||
|
||||
|
||||
@ -237,15 +237,16 @@ static void
|
||||
populate_store (GladeEPropIconSources * eprop_sources)
|
||||
{
|
||||
GladeIconSources *sources = NULL;
|
||||
GladeProperty *property;
|
||||
|
||||
gtk_tree_store_clear (eprop_sources->store);
|
||||
gtk_list_store_clear (eprop_sources->icon_names_store);
|
||||
|
||||
if (!GLADE_EDITOR_PROPERTY (eprop_sources)->property)
|
||||
property = glade_editor_property_get_property (GLADE_EDITOR_PROPERTY (eprop_sources));
|
||||
if (property)
|
||||
return;
|
||||
|
||||
glade_property_get (GLADE_EDITOR_PROPERTY (eprop_sources)->property,
|
||||
&sources);
|
||||
glade_property_get (property, &sources);
|
||||
|
||||
if (sources)
|
||||
g_hash_table_foreach (sources->sources, (GHFunc) populate_store_foreach,
|
||||
@ -272,7 +273,9 @@ glade_eprop_icon_sources_load (GladeEditorProperty * eprop,
|
||||
static gboolean
|
||||
reload_icon_sources_idle (GladeEditorProperty * eprop)
|
||||
{
|
||||
glade_editor_property_load (eprop, eprop->property);
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
|
||||
glade_editor_property_load (eprop, property);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -398,6 +401,7 @@ static void
|
||||
delete_clicked (GtkWidget * button, GladeEditorProperty * eprop)
|
||||
{
|
||||
GladeEPropIconSources *eprop_sources = GLADE_EPROP_ICON_SOURCES (eprop);
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
GtkTreeIter iter;
|
||||
GladeIconSources *icon_sources = NULL;
|
||||
GList *list, *sources, *new_list_head;
|
||||
@ -422,7 +426,7 @@ delete_clicked (GtkWidget * button, GladeEditorProperty * eprop)
|
||||
return;
|
||||
}
|
||||
|
||||
glade_property_get (eprop->property, &icon_sources);
|
||||
glade_property_get (property, &icon_sources);
|
||||
if (icon_sources)
|
||||
{
|
||||
icon_sources = glade_icon_sources_copy (icon_sources);
|
||||
@ -454,6 +458,7 @@ value_filename_edited (GtkCellRendererText * cell,
|
||||
const gchar * new_text, GladeEditorProperty * eprop)
|
||||
{
|
||||
GladeEPropIconSources *eprop_sources = GLADE_EPROP_ICON_SOURCES (eprop);
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
GtkTreeIter iter;
|
||||
GladeIconSources *icon_sources = NULL;
|
||||
GtkIconSource *source;
|
||||
@ -479,12 +484,12 @@ value_filename_edited (GtkCellRendererText * cell,
|
||||
|
||||
/* get new pixbuf value... */
|
||||
value = glade_utils_value_from_string (GDK_TYPE_PIXBUF, new_text,
|
||||
glade_widget_get_project (glade_property_get_widget (eprop->property)),
|
||||
glade_property_get_widget (eprop->property));
|
||||
glade_widget_get_project (glade_property_get_widget (property)),
|
||||
glade_property_get_widget (property));
|
||||
pixbuf = g_value_get_object (value);
|
||||
|
||||
|
||||
glade_property_get (eprop->property, &icon_sources);
|
||||
glade_property_get (property, &icon_sources);
|
||||
if (icon_sources)
|
||||
{
|
||||
icon_sources = glade_icon_sources_copy (icon_sources);
|
||||
@ -533,6 +538,7 @@ value_attribute_toggled (GtkCellRendererToggle * cell_renderer,
|
||||
gchar * path, GladeEditorProperty * eprop)
|
||||
{
|
||||
GladeEPropIconSources *eprop_sources = GLADE_EPROP_ICON_SOURCES (eprop);
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
GtkTreeIter iter;
|
||||
GladeIconSources *icon_sources = NULL;
|
||||
GtkIconSource *source;
|
||||
@ -551,7 +557,7 @@ value_attribute_toggled (GtkCellRendererToggle * cell_renderer,
|
||||
COLUMN_ICON_NAME, &icon_name, COLUMN_LIST_INDEX, &index,
|
||||
edit_column, &edit_column_active, -1);
|
||||
|
||||
glade_property_get (eprop->property, &icon_sources);
|
||||
glade_property_get (property, &icon_sources);
|
||||
|
||||
if (icon_sources)
|
||||
icon_sources = glade_icon_sources_copy (icon_sources);
|
||||
@ -593,6 +599,7 @@ value_attribute_edited (GtkCellRendererText * cell,
|
||||
const gchar * new_text, GladeEditorProperty * eprop)
|
||||
{
|
||||
GladeEPropIconSources *eprop_sources = GLADE_EPROP_ICON_SOURCES (eprop);
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
GtkTreeIter iter;
|
||||
GladeIconSources *icon_sources = NULL;
|
||||
GtkIconSource *source;
|
||||
@ -612,7 +619,7 @@ value_attribute_edited (GtkCellRendererText * cell,
|
||||
COLUMN_ICON_NAME, &icon_name, COLUMN_LIST_INDEX, &index,
|
||||
-1);
|
||||
|
||||
glade_property_get (eprop->property, &icon_sources);
|
||||
glade_property_get (property, &icon_sources);
|
||||
|
||||
if (icon_sources)
|
||||
icon_sources = glade_icon_sources_copy (icon_sources);
|
||||
|
||||
@ -368,7 +368,7 @@ glade_image_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
image_editor->stock_radio = gtk_radio_button_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image_editor->stock_radio, FALSE, FALSE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 0);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 0);
|
||||
image_editor->properties = g_list_prepend (image_editor->properties, eprop);
|
||||
@ -382,7 +382,7 @@ glade_image_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
(GTK_RADIO_BUTTON (image_editor->stock_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image_editor->icon_radio, FALSE, FALSE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 1);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 1);
|
||||
image_editor->properties = g_list_prepend (image_editor->properties, eprop);
|
||||
@ -396,7 +396,7 @@ glade_image_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
(GTK_RADIO_BUTTON (image_editor->stock_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image_editor->file_radio, FALSE, FALSE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 2);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 2);
|
||||
image_editor->properties = g_list_prepend (image_editor->properties, eprop);
|
||||
@ -425,7 +425,7 @@ glade_image_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
eprop =
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "icon-size", 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);
|
||||
image_editor->properties = g_list_prepend (image_editor->properties, eprop);
|
||||
|
||||
@ -433,7 +433,7 @@ glade_image_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
eprop =
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "pixel-size", 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);
|
||||
image_editor->properties = g_list_prepend (image_editor->properties, eprop);
|
||||
|
||||
|
||||
@ -363,7 +363,7 @@ glade_image_item_editor_new (GladeWidgetAdaptor * adaptor,
|
||||
/* The stock item */
|
||||
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);
|
||||
item_editor->properties = g_list_prepend (item_editor->properties, eprop);
|
||||
|
||||
@ -371,7 +371,7 @@ glade_image_item_editor_new (GladeWidgetAdaptor * adaptor,
|
||||
eprop =
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "accel-group", 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);
|
||||
item_editor->properties = g_list_prepend (item_editor->properties, eprop);
|
||||
|
||||
@ -408,7 +408,7 @@ glade_image_item_editor_new (GladeWidgetAdaptor * adaptor,
|
||||
/* The menu label... */
|
||||
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);
|
||||
item_editor->properties = g_list_prepend (item_editor->properties, eprop);
|
||||
|
||||
@ -416,7 +416,7 @@ glade_image_item_editor_new (GladeWidgetAdaptor * adaptor,
|
||||
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);
|
||||
item_editor->properties = g_list_prepend (item_editor->properties, eprop);
|
||||
|
||||
|
||||
@ -589,7 +589,7 @@ append_label_appearance (GladeLabelEditor * label_editor,
|
||||
/* Edit the label itself... */
|
||||
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);
|
||||
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
||||
|
||||
@ -601,7 +601,7 @@ append_label_appearance (GladeLabelEditor * label_editor,
|
||||
label_editor->attributes_radio = gtk_radio_button_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->attributes_radio, FALSE,
|
||||
FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 1);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 1);
|
||||
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
||||
@ -615,7 +615,7 @@ append_label_appearance (GladeLabelEditor * label_editor,
|
||||
(GTK_RADIO_BUTTON (label_editor->attributes_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->markup_radio, FALSE, FALSE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 2);
|
||||
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
||||
markup_property = eprop; /* Its getting into a hidden row on the bottom... */
|
||||
@ -629,7 +629,7 @@ append_label_appearance (GladeLabelEditor * label_editor,
|
||||
(GTK_RADIO_BUTTON (label_editor->attributes_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->pattern_radio, FALSE, FALSE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 3);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 3);
|
||||
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
||||
@ -673,7 +673,7 @@ append_label_formatting (GladeLabelEditor * label_editor,
|
||||
eprop =
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "ellipsize", 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++);
|
||||
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
||||
|
||||
@ -681,14 +681,14 @@ append_label_formatting (GladeLabelEditor * label_editor,
|
||||
eprop =
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "justify", 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++);
|
||||
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
||||
|
||||
/* angle... */
|
||||
eprop =
|
||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "angle", 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++);
|
||||
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
||||
|
||||
@ -700,7 +700,7 @@ append_label_formatting (GladeLabelEditor * label_editor,
|
||||
label_editor->width_radio = gtk_radio_button_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->width_radio, FALSE, FALSE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, row);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, row++);
|
||||
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
||||
@ -714,7 +714,7 @@ append_label_formatting (GladeLabelEditor * label_editor,
|
||||
(GTK_RADIO_BUTTON (label_editor->width_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->max_width_radio, FALSE,
|
||||
FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, row);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, row++);
|
||||
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
||||
@ -769,8 +769,8 @@ append_label_wrapping (GladeLabelEditor * label_editor,
|
||||
(GTK_RADIO_BUTTON (label_editor->wrap_free_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->single_radio, FALSE, FALSE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), single_line_eprop->item_label, TRUE, TRUE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (single_line_eprop),
|
||||
TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, row++);
|
||||
label_editor->properties =
|
||||
g_list_prepend (label_editor->properties, single_line_eprop);
|
||||
@ -784,7 +784,8 @@ append_label_wrapping (GladeLabelEditor * label_editor,
|
||||
(GTK_RADIO_BUTTON (label_editor->wrap_free_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->wrap_mode_radio, FALSE,
|
||||
FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop),
|
||||
TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, row);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, row++);
|
||||
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
||||
|
||||
@ -333,6 +333,7 @@ static gboolean
|
||||
update_and_focus_data_tree_idle (GladeEditorProperty * eprop)
|
||||
{
|
||||
GladeEPropModelData *eprop_data = GLADE_EPROP_MODEL_DATA (eprop);
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
|
||||
eprop_data->want_focus = TRUE;
|
||||
eprop_data->want_next_focus = TRUE;
|
||||
@ -340,7 +341,7 @@ update_and_focus_data_tree_idle (GladeEditorProperty * eprop)
|
||||
update_data_tree_idle (eprop);
|
||||
|
||||
/* XXX Have to load it regardless if it changed, this is a slow and redundant way... */
|
||||
glade_editor_property_load (eprop, eprop->property);
|
||||
glade_editor_property_load (eprop, property);
|
||||
|
||||
eprop_data->want_next_focus = FALSE;
|
||||
eprop_data->want_focus = FALSE;
|
||||
@ -386,9 +387,10 @@ glade_eprop_model_data_add_row (GladeEditorProperty * eprop)
|
||||
GValue value = { 0, };
|
||||
GNode *node = NULL;
|
||||
GList *columns = NULL;
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
|
||||
glade_property_get (eprop->property, &node);
|
||||
glade_widget_property_get (glade_property_get_widget (eprop->property), "columns", &columns);
|
||||
glade_property_get (property, &node);
|
||||
glade_widget_property_get (glade_property_get_widget (property), "columns", &columns);
|
||||
|
||||
if (!columns)
|
||||
return;
|
||||
@ -417,6 +419,7 @@ glade_eprop_model_data_delete_selected (GladeEditorProperty * eprop)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
GladeEPropModelData *eprop_data = GLADE_EPROP_MODEL_DATA (eprop);
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
GNode *data_tree = NULL, *row;
|
||||
gint rownum = -1;
|
||||
|
||||
@ -429,7 +432,7 @@ glade_eprop_model_data_delete_selected (GladeEditorProperty * eprop)
|
||||
g_assert (rownum >= 0);
|
||||
|
||||
/* if theres a sected row, theres data... */
|
||||
glade_property_get (eprop->property, &data_tree);
|
||||
glade_property_get (property, &data_tree);
|
||||
g_assert (data_tree);
|
||||
|
||||
data_tree = glade_model_data_tree_copy (data_tree);
|
||||
@ -491,11 +494,12 @@ static gboolean
|
||||
data_changed_idle (GladeEditorProperty * eprop)
|
||||
{
|
||||
GladeEPropModelData *eprop_data = GLADE_EPROP_MODEL_DATA (eprop);
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
GNode *data_tree = NULL, *new_tree, *row;
|
||||
GtkTreeIter iter;
|
||||
gint rownum;
|
||||
|
||||
glade_property_get (eprop->property, &data_tree);
|
||||
glade_property_get (property, &data_tree);
|
||||
g_assert (data_tree);
|
||||
|
||||
new_tree = g_node_new (NULL);
|
||||
@ -532,7 +536,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) data_changed_idle, eprop);
|
||||
@ -559,10 +563,10 @@ eprop_model_data_generate_store (GladeEditorProperty * eprop)
|
||||
GArray *gtypes = g_array_new (FALSE, TRUE, sizeof (GType));
|
||||
GtkTreeIter iter;
|
||||
gint column_num, row_num;
|
||||
GType index_type = G_TYPE_INT, string_type = G_TYPE_STRING, pointer_type =
|
||||
G_TYPE_POINTER;
|
||||
GType index_type = G_TYPE_INT, string_type = G_TYPE_STRING, pointer_type = G_TYPE_POINTER;
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
|
||||
glade_property_get (eprop->property, &data_tree);
|
||||
glade_property_get (property, &data_tree);
|
||||
|
||||
if (!data_tree || !data_tree->children || !data_tree->children->children)
|
||||
return NULL;
|
||||
@ -624,12 +628,12 @@ value_toggled (GtkCellRendererToggle * cell,
|
||||
{
|
||||
GladeEPropModelData *eprop_data = GLADE_EPROP_MODEL_DATA (eprop);
|
||||
GtkTreeIter iter;
|
||||
gint colnum =
|
||||
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column-number"));
|
||||
gint colnum = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column-number"));
|
||||
gint row;
|
||||
GNode *data_tree = NULL;
|
||||
GladeModelData *data;
|
||||
gboolean active;
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
|
||||
if (!gtk_tree_model_get_iter_from_string
|
||||
(GTK_TREE_MODEL (eprop_data->store), &iter, path))
|
||||
@ -638,7 +642,7 @@ value_toggled (GtkCellRendererToggle * cell,
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (eprop_data->store), &iter,
|
||||
COLUMN_ROW, &row, NUM_COLUMNS + colnum, &active, -1);
|
||||
|
||||
glade_property_get (eprop->property, &data_tree);
|
||||
glade_property_get (property, &data_tree);
|
||||
|
||||
/* if we are editing, then there is data in the datatree */
|
||||
g_assert (data_tree);
|
||||
@ -664,12 +668,12 @@ value_i18n_activate (GladeCellRendererIcon * cell,
|
||||
{
|
||||
GladeEPropModelData *eprop_data = GLADE_EPROP_MODEL_DATA (eprop);
|
||||
GtkTreeIter iter;
|
||||
gint colnum =
|
||||
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column-number"));
|
||||
gint colnum = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column-number"));
|
||||
gint row;
|
||||
GNode *data_tree = NULL;
|
||||
GladeModelData *data;
|
||||
gchar *new_text;
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
|
||||
if (!gtk_tree_model_get_iter_from_string
|
||||
(GTK_TREE_MODEL (eprop_data->store), &iter, path))
|
||||
@ -679,7 +683,7 @@ value_i18n_activate (GladeCellRendererIcon * cell,
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (eprop_data->store), &iter,
|
||||
COLUMN_ROW, &row, -1);
|
||||
|
||||
glade_property_get (eprop->property, &data_tree);
|
||||
glade_property_get (property, &data_tree);
|
||||
|
||||
/* if we are editing, then there is data in the datatree */
|
||||
g_assert (data_tree);
|
||||
@ -720,12 +724,12 @@ value_text_edited (GtkCellRendererText * cell,
|
||||
{
|
||||
GladeEPropModelData *eprop_data = GLADE_EPROP_MODEL_DATA (eprop);
|
||||
GtkTreeIter iter;
|
||||
gint colnum =
|
||||
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column-number"));
|
||||
gint colnum = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column-number"));
|
||||
gint row;
|
||||
GNode *data_tree = NULL;
|
||||
GladeModelData *data;
|
||||
GValue *value;
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
|
||||
if (!gtk_tree_model_get_iter_from_string
|
||||
(GTK_TREE_MODEL (eprop_data->store), &iter, path))
|
||||
@ -734,7 +738,7 @@ value_text_edited (GtkCellRendererText * cell,
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (eprop_data->store), &iter,
|
||||
COLUMN_ROW, &row, -1);
|
||||
|
||||
glade_property_get (eprop->property, &data_tree);
|
||||
glade_property_get (property, &data_tree);
|
||||
|
||||
/* if we are editing, then there is data in the datatree */
|
||||
g_assert (data_tree);
|
||||
@ -750,13 +754,13 @@ value_text_edited (GtkCellRendererText * cell,
|
||||
(G_VALUE_TYPE (&data->value),
|
||||
new_text),
|
||||
glade_widget_get_project
|
||||
(glade_property_get_widget (eprop->property)),
|
||||
glade_property_get_widget (eprop->property));
|
||||
(glade_property_get_widget (property)),
|
||||
glade_property_get_widget (property));
|
||||
else
|
||||
value =
|
||||
glade_utils_value_from_string (G_VALUE_TYPE (&data->value), new_text,
|
||||
glade_widget_get_project (glade_property_get_widget (eprop->property)),
|
||||
glade_property_get_widget (eprop->property));
|
||||
glade_widget_get_project (glade_property_get_widget (property)),
|
||||
glade_property_get_widget (property));
|
||||
|
||||
|
||||
g_value_copy (value, &data->value);
|
||||
@ -986,12 +990,13 @@ static void
|
||||
eprop_model_data_generate_columns (GladeEditorProperty * eprop)
|
||||
{
|
||||
GladeEPropModelData *eprop_data = GLADE_EPROP_MODEL_DATA (eprop);
|
||||
GladeProperty *property = glade_editor_property_get_property (eprop);
|
||||
GladeModelData *iter_data;
|
||||
GtkTreeViewColumn *column;
|
||||
GNode *data_tree = NULL, *iter_node;
|
||||
gint colnum;
|
||||
|
||||
glade_property_get (eprop->property, &data_tree);
|
||||
glade_property_get (property, &data_tree);
|
||||
|
||||
if (!data_tree || !data_tree->children || !data_tree->children->children)
|
||||
return;
|
||||
|
||||
@ -181,7 +181,7 @@ glade_store_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
TRUE);
|
||||
store_editor->properties = g_list_prepend (store_editor->properties, eprop);
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame), eprop->item_label);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame), glade_editor_property_get_item_label (eprop));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
|
||||
gtk_box_pack_start (GTK_BOX (store_editor), frame, FALSE, FALSE, 12);
|
||||
|
||||
@ -214,7 +214,7 @@ glade_store_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
||||
store_editor->properties =
|
||||
g_list_prepend (store_editor->properties, eprop);
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame), eprop->item_label);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame), glade_editor_property_get_item_label (eprop));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
|
||||
gtk_box_pack_start (GTK_BOX (store_editor), frame, FALSE, FALSE, 12);
|
||||
|
||||
|
||||
@ -453,7 +453,7 @@ glade_tool_button_editor_new (GladeWidgetAdaptor * adaptor,
|
||||
button_editor->standard_label_radio = gtk_radio_button_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button_editor->standard_label_radio,
|
||||
FALSE, FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 0);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 0);
|
||||
button_editor->properties = g_list_prepend (button_editor->properties, eprop);
|
||||
@ -467,7 +467,7 @@ glade_tool_button_editor_new (GladeWidgetAdaptor * adaptor,
|
||||
(GTK_RADIO_BUTTON (button_editor->standard_label_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button_editor->custom_label_radio, FALSE,
|
||||
FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 1);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 1);
|
||||
button_editor->properties = g_list_prepend (button_editor->properties, eprop);
|
||||
@ -501,7 +501,7 @@ glade_tool_button_editor_new (GladeWidgetAdaptor * adaptor,
|
||||
button_editor->stock_radio = gtk_radio_button_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button_editor->stock_radio, FALSE, FALSE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 0);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 0);
|
||||
button_editor->properties = g_list_prepend (button_editor->properties, eprop);
|
||||
@ -515,7 +515,7 @@ glade_tool_button_editor_new (GladeWidgetAdaptor * adaptor,
|
||||
(GTK_RADIO_BUTTON (button_editor->stock_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button_editor->icon_radio, FALSE, FALSE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 1);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 1);
|
||||
button_editor->properties = g_list_prepend (button_editor->properties, eprop);
|
||||
@ -529,7 +529,7 @@ glade_tool_button_editor_new (GladeWidgetAdaptor * adaptor,
|
||||
(GTK_RADIO_BUTTON (button_editor->stock_radio));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button_editor->custom_radio, FALSE, FALSE,
|
||||
2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), eprop->item_label, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
|
||||
table_attach (table, hbox, 0, 2);
|
||||
table_attach (table, GTK_WIDGET (eprop), 1, 2);
|
||||
button_editor->properties = g_list_prepend (button_editor->properties, eprop);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user