forked from AuroraMiddleware/gtk
Parse <accessibility> but don't do anything yet. Do not strip
2007-07-08 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkwidget.c (gtk_widget_buildable_custom_tag_start): Parse <accessibility> but don't do anything yet. * gtk/gtk-builder-convert (GtkBuilderConverter._parse): Do not strip atk/accessibility tags * tests/buildertest.c (test_widget): Test this svn path=/trunk/; revision=18399
This commit is contained in:
parent
2af3c53e47
commit
0aeff7f47b
@ -1,3 +1,12 @@
|
||||
2007-07-08 Johan Dahlin <jdahlin@async.com.br>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_buildable_custom_tag_start):
|
||||
Parse <accessibility> but don't do anything yet.
|
||||
* gtk/gtk-builder-convert (GtkBuilderConverter._parse):
|
||||
Do not strip atk/accessibility tags
|
||||
* tests/buildertest.c (test_widget):
|
||||
Test this
|
||||
|
||||
Sun Jul 8 01:33:45 2007 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkwindow.c: docu fixup by Bjoern Lindqvist, #454703.
|
||||
|
@ -31,6 +31,9 @@ its output the file specified as the second argument.
|
||||
Toolbars are not handled.
|
||||
</para>
|
||||
<para>
|
||||
Support for accessibility is not yet implemented.
|
||||
</para>
|
||||
<para>
|
||||
The script requires a python interpreter to run.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -171,8 +171,7 @@ class GtkBuilderConverter(object):
|
||||
self._dom.removeChild(node)
|
||||
|
||||
# Strip unsupported tags
|
||||
for tag in ['requires', 'accessibility', 'atkproperty',
|
||||
'atkrelation']:
|
||||
for tag in ['requires']:
|
||||
for child in self._dom.getElementsByTagName(tag):
|
||||
child.parentNode.removeChild(child)
|
||||
|
||||
|
@ -8547,6 +8547,12 @@ static const GMarkupParser accel_group_parser =
|
||||
accel_group_start_element,
|
||||
};
|
||||
|
||||
static const GMarkupParser accessibility_parser =
|
||||
{
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
||||
static gboolean
|
||||
gtk_widget_buildable_custom_tag_start (GtkBuildable *buildable,
|
||||
GtkBuilder *builder,
|
||||
@ -8567,6 +8573,21 @@ gtk_widget_buildable_custom_tag_start (GtkBuildable *buildable,
|
||||
*data = parser_data;
|
||||
return TRUE;
|
||||
}
|
||||
else if (strcmp (tagname, "accessibility") == 0)
|
||||
{
|
||||
static gboolean warning_showed = FALSE;
|
||||
|
||||
if (!warning_showed)
|
||||
{
|
||||
g_warning ("<accessibility> is being ignored,\n"
|
||||
"see http://bugzilla.gnome.org/show_bug.cgi?id=454653\n");
|
||||
warning_showed = TRUE;
|
||||
}
|
||||
|
||||
*parser = accessibility_parser;
|
||||
*data = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1466,6 +1466,15 @@ gboolean test_widget (void)
|
||||
" </child>"
|
||||
" </object>"
|
||||
"</interface>";
|
||||
gchar *buffer3 =
|
||||
"<interface>"
|
||||
" <object class=\"GtkWindow\" id=\"window1\">"
|
||||
" <accessibility>"
|
||||
" <atkproperty name=\"AtkObject::accessible_name\" translatable=\"yes\">Contacts</atkproperty>"
|
||||
" <atkrelation target=\"button1\" type=\"labelled-by\"/>"
|
||||
" </accessibility>"
|
||||
" </object>"
|
||||
"</interface>";
|
||||
GtkBuilder *builder;
|
||||
GObject *window1, *button1;
|
||||
|
||||
@ -1488,6 +1497,12 @@ gboolean test_widget (void)
|
||||
window1 = gtk_builder_get_object (builder, "window1");
|
||||
gtk_widget_destroy (GTK_WIDGET (window1));
|
||||
g_object_unref (builder);
|
||||
|
||||
builder = builder_new_from_string (buffer3, -1, NULL);
|
||||
window1 = gtk_builder_get_object (builder, "window1");
|
||||
gtk_widget_destroy (GTK_WIDGET (window1));
|
||||
g_object_unref (builder);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user