glade3 r1761 - in branches/builder: . gladeui plugins/gtk+
- From: tvb svn gnome org
- To: svn-commits-list gnome org
- Subject: glade3 r1761 - in branches/builder: . gladeui plugins/gtk+
- Date: Thu, 3 Apr 2008 03:23:00 +0100 (BST)
Author: tvb
Date: Thu Apr 3 03:23:00 2008
New Revision: 1761
URL: http://svn.gnome.org/viewvc/glade3?rev=1761&view=rev
Log:
* 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.
Modified:
branches/builder/ChangeLog
branches/builder/gladeui/glade-editor.c
branches/builder/gladeui/glade-property-class.c
branches/builder/gladeui/glade-property-class.h
branches/builder/gladeui/glade-property.c
branches/builder/gladeui/glade-widget-adaptor.c
branches/builder/gladeui/glade-xml-utils.h
branches/builder/plugins/gtk+/gtk+.xml.in
Modified: branches/builder/gladeui/glade-editor.c
==============================================================================
--- branches/builder/gladeui/glade-editor.c (original)
+++ branches/builder/gladeui/glade-editor.c Thu Apr 3 03:23:00 2008
@@ -573,13 +573,9 @@
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 @@
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;
Modified: branches/builder/gladeui/glade-property-class.c
==============================================================================
--- branches/builder/gladeui/glade-property-class.c (original)
+++ branches/builder/gladeui/glade-property-class.c Thu Apr 3 03:23:00 2008
@@ -87,7 +87,7 @@
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 @@
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 @@
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.
*/
Modified: branches/builder/gladeui/glade-property-class.h
==============================================================================
--- branches/builder/gladeui/glade-property-class.h (original)
+++ branches/builder/gladeui/glade-property-class.h Thu Apr 3 03:23:00 2008
@@ -20,26 +20,8 @@
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 @@
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_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__ */
Modified: branches/builder/gladeui/glade-property.c
==============================================================================
--- branches/builder/gladeui/glade-property.c (original)
+++ branches/builder/gladeui/glade-property.c Thu Apr 3 03:23:00 2008
@@ -344,9 +344,10 @@
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);
Modified: branches/builder/gladeui/glade-widget-adaptor.c
==============================================================================
--- branches/builder/gladeui/glade-widget-adaptor.c (original)
+++ branches/builder/gladeui/glade-widget-adaptor.c Thu Apr 3 03:23:00 2008
@@ -134,11 +134,10 @@
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++;
Modified: branches/builder/gladeui/glade-xml-utils.h
==============================================================================
--- branches/builder/gladeui/glade-xml-utils.h (original)
+++ branches/builder/gladeui/glade-xml-utils.h Thu Apr 3 03:23:00 2008
@@ -110,7 +110,6 @@
#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"
Modified: branches/builder/plugins/gtk+/gtk+.xml.in
==============================================================================
--- branches/builder/plugins/gtk+/gtk+.xml.in (original)
+++ branches/builder/plugins/gtk+/gtk+.xml.in Thu Apr 3 03:23:00 2008
@@ -354,7 +354,7 @@
<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 @@
</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 @@
</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 @@
</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 @@
<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 @@
<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 @@
<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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]