diff options
author | Tristan Van Berkom <tvb@src.gnome.org> | 2008-04-03 02:23:00 +0000 |
---|---|---|
committer | Tristan Van Berkom <tvb@src.gnome.org> | 2008-04-03 02:23:00 +0000 |
commit | 6820f97d8a60c3c9c21232332cd59a82d9d37785 (patch) | |
tree | b7484e0d4e4a4b7eb1ff6f28b44d7e4e8254c46f | |
parent | f0e30042271f263b1867a232f0b0acfa42d696cc (diff) | |
download | glade-6820f97d8a60c3c9c21232332cd59a82d9d37785.tar.gz |
Removed notion of the GPCType (which differentiated atk props from normal
* gladeui/glade-property-class.[ch], gladeui/glade-editor.c,
gladeui/glade-property.c, gladeui/glade-widget-adaptor.c:
Removed notion of the GPCType (which differentiated atk props
from normal props and also accel props for various purposes),
now there is a boolean "atk" member that only means to put
these properties in the atk tab of the editor, one day we can
hopefully even remove this.
svn path=/branches/builder/; revision=1761
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gladeui/glade-editor.c | 11 | ||||
-rw-r--r-- | gladeui/glade-property-class.c | 27 | ||||
-rw-r--r-- | gladeui/glade-property-class.h | 23 | ||||
-rw-r--r-- | gladeui/glade-property.c | 3 | ||||
-rw-r--r-- | gladeui/glade-widget-adaptor.c | 3 | ||||
-rw-r--r-- | gladeui/glade-xml-utils.h | 1 | ||||
-rw-r--r-- | plugins/gtk+/gtk+.xml.in | 18 |
8 files changed, 29 insertions, 65 deletions
@@ -15,6 +15,14 @@ * gladeui/glade-widget-adaptor.c, gladeui/glade-signal.c: Implemented loading of signals. + + * gladeui/glade-property-class.[ch], gladeui/glade-editor.c, + gladeui/glade-property.c, gladeui/glade-widget-adaptor.c: + Removed notion of the GPCType (which differentiated atk props + from normal props and also accel props for various purposes), + now there is a boolean "atk" member that only means to put + these properties in the atk tab of the editor, one day we can + hopefully even remove this. 2008-04-01 Tristan Van Berkom <tvb@gnome.org> diff --git a/gladeui/glade-editor.c b/gladeui/glade-editor.c index 81c3a6af..03501372 100644 --- a/gladeui/glade-editor.c +++ b/gladeui/glade-editor.c @@ -573,13 +573,9 @@ glade_editor_table_append_items (GladeEditorTable *table, continue; else if (type == TABLE_TYPE_GENERAL && property_class->common) continue; - else if (type == TABLE_TYPE_ATK && - (property_class->type == GPC_NORMAL || - property_class->type == GPC_ACCEL_PROPERTY)) + else if (type == TABLE_TYPE_ATK && !property_class->atk) continue; - else if (type != TABLE_TYPE_ATK && - (property_class->type != GPC_NORMAL && - property_class->type != GPC_ACCEL_PROPERTY)) + else if (type != TABLE_TYPE_ATK && property_class->atk) continue; property = glade_editor_table_append_item (table, property_class, @@ -1200,8 +1196,7 @@ glade_editor_populate_reset_view (GladeEditor *editor, if (glade_property_class_is_visible (property->klass) == FALSE) continue; - if (property->klass->type != GPC_NORMAL && - property->klass->type != GPC_ACCEL_PROPERTY) + if (property->klass->atk) iter = &atk_iter; else if (property->klass->common) iter = &common_iter; diff --git a/gladeui/glade-property-class.c b/gladeui/glade-property-class.c index 7a71a654..4ed8c3ce 100644 --- a/gladeui/glade-property-class.c +++ b/gladeui/glade-property-class.c @@ -87,7 +87,7 @@ glade_property_class_new (gpointer handle) property_class->resource = FALSE; property_class->themed_icon = FALSE; property_class->translatable = FALSE; - property_class->type = GPC_NORMAL; + property_class->atk = FALSE; property_class->virt = TRUE; property_class->transfer_on_paste = FALSE; property_class->weight = -1.0; @@ -1056,18 +1056,6 @@ glade_property_class_new_from_spec (gpointer handle, if (spec->flags & G_PARAM_CONSTRUCT_ONLY) property_class->construct_only = TRUE; - /* XXXX Is this still valid ??? NO !*/ - if (g_type_is_a (spec->owner_type, ATK_TYPE_OBJECT)) - { - property_class->type = GPC_ATK_PROPERTY; - property_class->ignore = TRUE; - - /* We only use the name and desctription props, - * they are both translatable. - */ - property_class->translatable = TRUE; - } - if (!property_class->id || !property_class->name) { g_critical ("No name or id for " @@ -1502,17 +1490,10 @@ glade_property_class_update_from_node (GladeXmlNode *node, klass->displayable_values = gpc_get_displayable_values_from_node (child, klass, domain); - /* A sprinkle of hard-code to get atk properties working right + /* Right now allowing the backend to specify that some properties + * go in the atk tab, ideally this shouldnt be needed. */ - if (glade_xml_get_property_boolean (node, GLADE_TAG_ATK_ACTION, FALSE)) - klass->type = GPC_ATK_ACTION; - else if (glade_xml_get_property_boolean (node, GLADE_TAG_ATK_PROPERTY, FALSE)) - { - if (GLADE_IS_PARAM_SPEC_OBJECTS (klass->pspec)) - klass->type = GPC_ATK_RELATION; - else - klass->type = GPC_ATK_PROPERTY; - } + klass->atk = glade_xml_get_property_boolean (node, GLADE_TAG_ATK_PROPERTY, klass->atk); /* Special case pixbuf here. */ diff --git a/gladeui/glade-property-class.h b/gladeui/glade-property-class.h index cbe551c3..f1b4230b 100644 --- a/gladeui/glade-property-class.h +++ b/gladeui/glade-property-class.h @@ -20,26 +20,8 @@ G_BEGIN_DECLS typedef struct _GladePropertyClass GladePropertyClass; -/** - * GPCType: - * @GPC_NORMAL: is not an atk property - * @GPC_ATK_PROPERTY: is a property of an #AtkImplementor object - * @GPC_ATK_RELATION: is an atk relation set property - * @GPC_ATK_ACTION: is an atk action property - * @GPC_ACCEL_PROPERTY: is an accelerator key property - */ -typedef enum { - GPC_NORMAL, - GPC_ATK_PROPERTY, - GPC_ATK_RELATION, - GPC_ATK_ACTION, - GPC_ACCEL_PROPERTY -} GPCType; - struct _GladePropertyClass { - GPCType type; /* A symbolic type used to load/save properties differently - */ gpointer handle; /* The GladeWidgetClass that this property class * was created for. @@ -103,7 +85,8 @@ struct _GladePropertyClass gboolean construct_only; /* Whether this property is G_PARAM_CONSTRUCT_ONLY or not */ - gboolean common; /* Common properties go in the common tab */ + gboolean common; /* Common properties go in the common tab */ + gboolean atk; /* Atk properties go in the atk tab */ gboolean packing; /* Packing properties go in the packing tab */ @@ -213,8 +196,6 @@ gboolean glade_property_class_match (GladePropertyC gboolean glade_property_class_void_value (GladePropertyClass *klass, GValue *value); -G_CONST_RETURN gchar *glade_property_class_atk_realname (const gchar *atk_name); - G_END_DECLS #endif /* __GLADE_PROPERTY_CLASS_H__ */ diff --git a/gladeui/glade-property.c b/gladeui/glade-property.c index b5c0d548..ee5cdd67 100644 --- a/gladeui/glade-property.c +++ b/gladeui/glade-property.c @@ -344,9 +344,10 @@ glade_property_load_impl (GladeProperty *property) if (property->widget == NULL || property->klass->packing || - property->klass->type != GPC_NORMAL || + property->klass->ignore || !(property->klass->pspec->flags & G_PARAM_READABLE)) return; + object = glade_widget_get_object (property->widget); oclass = G_OBJECT_GET_CLASS (object); diff --git a/gladeui/glade-widget-adaptor.c b/gladeui/glade-widget-adaptor.c index 58aa193b..0c12ef68 100644 --- a/gladeui/glade-widget-adaptor.c +++ b/gladeui/glade-widget-adaptor.c @@ -134,11 +134,10 @@ gwa_properties_set_weight (GList **properties, GType parent) for (l = *properties; l && l->data; l = g_list_next (l)) { GladePropertyClass *klass = l->data; - GPCType type = klass->type; if (klass->visible && (parent) ? parent == klass->pspec->owner_type : TRUE && - (type == GPC_NORMAL || type == GPC_ACCEL_PROPERTY)) + !klass->atk) { /* Use a different counter for each tab (common, packing and normal) */ if (klass->common) common++; diff --git a/gladeui/glade-xml-utils.h b/gladeui/glade-xml-utils.h index 0b60317c..4d23fda1 100644 --- a/gladeui/glade-xml-utils.h +++ b/gladeui/glade-xml-utils.h @@ -110,7 +110,6 @@ typedef struct _GladeXmlDoc GladeXmlDoc; #define GLADE_TAG_RESOURCE "resource" #define GLADE_TAG_THEMED_ICON "themed-icon" #define GLADE_TAG_INIT_FUNCTION "init-function" -#define GLADE_TAG_ATK_ACTION "atk-action" #define GLADE_TAG_ATK_PROPERTY "atk-property" #define GLADE_TAG_FIXED "fixed" #define GLADE_TAG_TRANSFER_ON_PASTE "transfer-on-paste" diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in index 32e937c7..2df77877 100644 --- a/plugins/gtk+/gtk+.xml.in +++ b/plugins/gtk+/gtk+.xml.in @@ -354,7 +354,7 @@ embedded in another object</_tooltip> <spec>glade_standard_boolean_spec</spec> </property> <!-- Atk click property --> - <property id="atk-click" _name="Click" ignore="True" atk-action="True"> + <property id="atk-click" _name="Click" ignore="True" atk-property="True"> <_tooltip>Set the description of the Click atk action</_tooltip> <spec>glade_standard_string_spec</spec> <visible-lines>2</visible-lines> @@ -608,7 +608,7 @@ embedded in another object</_tooltip> </displayable-values> </property> <!-- Atk activate property --> - <property id="atk-activate" _name="Activate" ignore="True" atk-action="True"> + <property id="atk-activate" _name="Activate" ignore="True" atk-property="True"> <_tooltip>Set the description of the Activate atk action</_tooltip> <spec>glade_standard_string_spec</spec> <visible-lines>2</visible-lines> @@ -702,21 +702,21 @@ embedded in another object</_tooltip> </property> <!-- Atk click property --> - <property id="atk-click" _name="Click" ignore="True" atk-action="True"> + <property id="atk-click" _name="Click" ignore="True" atk-property="True"> <_tooltip>Set the description of the Click atk action</_tooltip> <spec>glade_standard_string_spec</spec> <visible-lines>2</visible-lines> </property> <!-- Atk press property --> - <property id="atk-press" _name="Press" ignore="True" atk-action="True"> + <property id="atk-press" _name="Press" ignore="True" atk-property="True"> <_tooltip>Set the description of the Press atk action</_tooltip> <spec>glade_standard_string_spec</spec> <visible-lines>2</visible-lines> </property> <!-- Atk release property --> - <property id="atk-release" _name="Release" ignore="True" atk-action="True"> + <property id="atk-release" _name="Release" ignore="True" atk-property="True"> <_tooltip>Set the description of the Release atk action</_tooltip> <spec>glade_standard_string_spec</spec> <visible-lines>2</visible-lines> @@ -857,7 +857,7 @@ embedded in another object</_tooltip> </property> <!-- Atk press property --> - <property id="atk-press" _name="Press" ignore="True" atk-action="True"> + <property id="atk-press" _name="Press" ignore="True" atk-property="True"> <_tooltip>Set the description of the Press atk action</_tooltip> <spec>glade_standard_string_spec</spec> <visible-lines>2</visible-lines> @@ -1295,7 +1295,7 @@ embedded in another object</_tooltip> <property id="label-widget" disabled="True"/> <!-- Atk activate property --> - <property id="atk-activate" _name="Activate" ignore="True" atk-action="True"> + <property id="atk-activate" _name="Activate" ignore="True" atk-property="True"> <_tooltip>Set the description of the Activate atk action</_tooltip> <spec>glade_standard_string_spec</spec> <visible-lines>2</visible-lines> @@ -1480,7 +1480,7 @@ embedded in another object</_tooltip> <property id="size" disabled="True"/> <!-- Atk press property --> - <property id="atk-press" _name="Press" ignore="True" atk-action="True"> + <property id="atk-press" _name="Press" ignore="True" atk-property="True"> <_tooltip>Set the description of the Press atk action</_tooltip> <spec>glade_standard_string_spec</spec> <visible-lines>2</visible-lines> @@ -1492,7 +1492,7 @@ embedded in another object</_tooltip> <glade-widget-class name="GtkOptionMenu" generic-name="optionmenu" _title="Option Menu"> <properties> <!-- Atk press property --> - <property id="atk-press" _name="Press" ignore="True" atk-action="True"> + <property id="atk-press" _name="Press" ignore="True" atk-property="True"> <_tooltip>Set the description of the Press atk action</_tooltip> <spec>glade_standard_string_spec</spec> <visible-lines>2</visible-lines> |