glade3 r2037 - in trunk: . gladeui plugins/gtk+
- From: tvb svn gnome org
- To: svn-commits-list gnome org
- Subject: glade3 r2037 - in trunk: . gladeui plugins/gtk+
- Date: Thu, 20 Nov 2008 19:10:13 +0000 (UTC)
Author: tvb
Date: Thu Nov 20 19:10:12 2008
New Revision: 2037
URL: http://svn.gnome.org/viewvc/glade3?rev=2037&view=rev
Log:
* 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.
Modified:
trunk/ChangeLog
trunk/gladeui/glade-widget-adaptor.c
trunk/plugins/gtk+/glade-column-types.c
trunk/plugins/gtk+/gtk+.xml.in
Modified: trunk/gladeui/glade-widget-adaptor.c
==============================================================================
--- trunk/gladeui/glade-widget-adaptor.c (original)
+++ trunk/gladeui/glade-widget-adaptor.c Thu Nov 20 19:10:12 2008
@@ -2121,7 +2121,7 @@
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
Modified: trunk/plugins/gtk+/glade-column-types.c
==============================================================================
--- trunk/plugins/gtk+/glade-column-types.c (original)
+++ trunk/plugins/gtk+/glade-column-types.c Thu Nov 20 19:10:12 2008
@@ -47,6 +47,12 @@
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 @@
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 @@
("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 @@
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);
Modified: trunk/plugins/gtk+/gtk+.xml.in
==============================================================================
--- trunk/plugins/gtk+/gtk+.xml.in (original)
+++ trunk/plugins/gtk+/gtk+.xml.in Thu Nov 20 19:10:12 2008
@@ -1919,9 +1919,8 @@
</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 @@
</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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]