Commit c9e4cf00 authored by Tristan Van Berkom's avatar Tristan Van Berkom

Added all remaining metadatas for cell renderers (all cell renderers and


	* plugins/gtk+/gtk+.xml.in: Added all remaining metadatas for cell renderers
	  (all cell renderers and attributes now implemented).

	* plugins/gtk+/glade-column-types.c: Fixed to populate enums/flags only
	after all catalogs parsed, now they are listed in alphabetical order too.


svn path=/trunk/; revision=2037
parent a41091f4
2008-11-20 Tristan Van Berkom <tvb@gnome.org>
* plugins/gtk+/gtk+.xml.in: Added all remaining metadatas for cell renderers
(all cell renderers and attributes now implemented).
* plugins/gtk+/glade-column-types.c: Fixed to populate enums/flags only
after all catalogs parsed, now they are listed in alphabetical order too.
2008-11-19 Tristan Van Berkom <tvb@gnome.org>
* plugins/gtk+/Makefile.am, plugins/gtk+/glade-cell-renderer-editor.c:
......
......@@ -2121,7 +2121,7 @@ glade_widget_adaptor_from_catalog (GladeCatalog *catalog,
g_free (name);
return NULL;
}
if ((adaptor_name = glade_xml_get_property_string (class_node, GLADE_TAG_ADAPTOR)))
adaptor_type = g_type_from_name (adaptor_name);
else
......
......@@ -47,6 +47,12 @@ find_by_type (GType *a, GType *b)
return *a - *b;
}
static gint
type_alpha_sort (GType *a, GType *b)
{
return strcmp (g_type_name (*a), g_type_name (*b));
}
static void
column_types_store_populate_enums_flags (GtkTreeStore *store,
gboolean enums)
......@@ -85,17 +91,24 @@ column_types_store_populate_enums_flags (GtkTreeStore *store,
types = g_list_prepend (types,
g_memdup (&(pclass->pspec->value_type),
sizeof (GType)));
gtk_tree_store_append (store, &iter, &parent_iter);
gtk_tree_store_set (store, &iter,
COLUMN_NAME, g_type_name (pclass->pspec->value_type),
COLUMN_GTYPE, pclass->pspec->value_type,
-1);
}
}
}
g_list_free (adaptors);
g_list_foreach (types, (GFunc)g_free, NULL);
types = g_list_sort (types, (GCompareFunc)type_alpha_sort);
for (l = types; l; l = l->next)
{
GType *type = l->data;
gtk_tree_store_append (store, &iter, &parent_iter);
gtk_tree_store_set (store, &iter,
COLUMN_NAME, g_type_name (*type),
COLUMN_GTYPE, *type,
-1);
g_free (type);
}
g_list_free (types);
}
......@@ -198,14 +211,6 @@ glade_column_type_list_get_type (void)
("GladeColumnTypeList",
(GBoxedCopyFunc) glade_column_list_copy,
(GBoxedFreeFunc) glade_column_list_free);
types_model = (GtkTreeModel *)gtk_tree_store_new (N_COLUMNS,
G_TYPE_STRING,
G_TYPE_GTYPE,
G_TYPE_STRING);
column_types_store_populate (GTK_TREE_STORE (types_model));
}
return type_id;
}
......@@ -639,6 +644,19 @@ glade_eprop_column_types_create_input (GladeEditorProperty *eprop)
hbox = gtk_hbox_new (FALSE, 4);
if (!types_model)
{
/* We make sure to do this after all the adaptors are parsed
* because we load the enums/flags from the adaptors
*/
types_model = (GtkTreeModel *)gtk_tree_store_new (N_COLUMNS,
G_TYPE_STRING,
G_TYPE_GTYPE,
G_TYPE_STRING);
column_types_store_populate (GTK_TREE_STORE (types_model));
}
string = g_strdup_printf ("<b>%s</b>", _("Add and remove columns:"));
label = gtk_label_new (string);
......
......@@ -1919,9 +1919,8 @@ embedded in another object</_tooltip>
</action>
</actions>
</glade-widget-class>
<glade-widget-class name="GtkCellRenderer">
<glade-widget-class name="GtkCellRenderer" _title="Cell Renderer">
<post-create-function>glade_gtk_cell_renderer_post_create</post-create-function>
<create-editable-function>glade_gtk_cell_renderer_create_editable</create-editable-function>
<set-property-function>glade_gtk_cell_renderer_set_property</set-property-function>
......@@ -2489,24 +2488,447 @@ embedded in another object</_tooltip>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
<glade-widget-class name="GtkCellRendererAccel" generic-name="cellrendereraccel" _title="Accelerator Renderer"
libglade-unsupported="True">
<properties>
<property id="accel-key" save="False" custom-layout="True"/>
<property id="attr-accel-key" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-accel-key" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="accel-mode" save="False" custom-layout="True"/>
<property id="attr-accel-mode" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-accel-mode" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="accel-mods" save="False" custom-layout="True"/>
<property id="attr-accel-mods" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-accel-mods" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="keycode" save="False" custom-layout="True"/>
<property id="attr-keycode" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-keycode" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
<glade-widget-class name="GtkCellRendererAccel" generic-name="cellrendereraccel" _title="Accelerator Renderer"
libglade-unsupported="True"/>
<glade-widget-class name="GtkCellRendererCombo" generic-name="cellrenderercombo" _title="Combo Renderer"
libglade-unsupported="True"/>
libglade-unsupported="True">
<properties>
<property id="has-entry" save="False" custom-layout="True"/>
<property id="attr-has-entry" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-has-entry" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="model" save="False" custom-layout="True"/>
<property id="attr-model" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-model" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="text-column" save="False" custom-layout="True"/>
<property id="attr-text-column" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-text-column" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
<glade-widget-class name="GtkCellRendererSpin" generic-name="cellrendererspin" _title="Spin Renderer"
libglade-unsupported="True"/>
libglade-unsupported="True">
<properties>
<property id="adjustment" save="False" custom-layout="True"/>
<property id="attr-adjustment" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-adjustment" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="climb-rate" save="False" custom-layout="True"/>
<property id="attr-climb-rate" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-climb-rate" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="digits" save="False" custom-layout="True"/>
<property id="attr-digits" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-digits" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
<glade-widget-class name="GtkCellRendererPixbuf" generic-name="cellrendererpixbuf" _title="Pixbuf Renderer"
libglade-unsupported="True"/>
libglade-unsupported="True">
<properties>
<property id="gicon" disabled="True"/>
<property id="follow-state" save="False" custom-layout="True"/>
<property id="attr-follow-state" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-follow-state" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="icon-name" save="False" custom-layout="True"/>
<property id="attr-icon-name" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-icon-name" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="pixbuf" save="False" custom-layout="True"/>
<property id="attr-pixbuf" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-pixbuf" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="pixbuf-expander-closed" save="False" custom-layout="True"/>
<property id="attr-pixbuf-expander-closed" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-pixbuf-expander-closed" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="pixbuf-expander-open" save="False" custom-layout="True"/>
<property id="attr-pixbuf-expander-open" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-pixbuf-expander-open" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="stock-detail" save="False" custom-layout="True"/>
<property id="attr-stock-detail" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-stock-detail" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="stock-id" save="False" custom-layout="True"/>
<property id="attr-stock-id" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-stock-id" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="stock-size" save="False" custom-layout="True"/>
<property id="attr-stock-size" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-stock-size" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
<glade-widget-class name="GtkCellRendererProgress" generic-name="cellrendererprogress" _title="Progress Renderer"
libglade-unsupported="True"/>
libglade-unsupported="True">
<properties>
<property id="orientation" save="False" custom-layout="True"/>
<property id="attr-orientation" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-orientation" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="pulse" save="False" custom-layout="True"/>
<property id="attr-pulse" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-pulse" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="text" save="False" custom-layout="True"/>
<property id="attr-text" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-text" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="text-xalign" save="False" custom-layout="True"/>
<property id="attr-text-xalign" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-text-xalign" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="text-yalign" save="False" custom-layout="True"/>
<property id="attr-text-yalign" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-text-yalign" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="value" save="False" custom-layout="True"/>
<property id="attr-value" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-value" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
<glade-widget-class name="GtkCellRendererToggle" generic-name="cellrenderertoggle" _title="Toggle Renderer"
libglade-unsupported="True"/>
libglade-unsupported="True">
<properties>
<property id="activatable" save="False" custom-layout="True"/>
<property id="attr-activatable" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-activatable" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="active" save="False" custom-layout="True"/>
<property id="attr-active" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-active" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="inconsistent" save="False" custom-layout="True"/>
<property id="attr-inconsistent" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-inconsistent" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="indicator-size" save="False" custom-layout="True"/>
<property id="attr-indicator-size" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-indicator-size" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
<property id="radio" save="False" custom-layout="True"/>
<property id="attr-radio" _name="Data column" save="False" default="-1" custom-layout="True">
<parameter-spec>
<type>GParamInt</type>
<min>-1</min>
</parameter-spec>
<_tooltip>The column in the model to load the value from</_tooltip>
</property>
<property id="use-attr-radio" default="True" save="False" visible="False">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
<glade-widget-class name="GtkStatusIcon" generic-name="statusicon" _title="Status Icon"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment