GtkComboBoxText: Improved GtkBuildable documentation.

Also removed a bogus FIXME comment which might have been true
a long time ago. Clarification: the "domain" attribute specified
in the builder script overrides any domain previously set with
gtk_builder_set_translation_domain(), so the translation of items
here is perfectly correct and does not need to be fixed.
This commit is contained in:
Tristan Van Berkom 2013-05-12 21:56:40 +09:00
parent b3f1e0cc36
commit 11be64d3fe

View File

@ -58,7 +58,8 @@
* The GtkComboBoxText implementation of the GtkBuildable interface * The GtkComboBoxText implementation of the GtkBuildable interface
* supports adding items directly using the <items> element * supports adding items directly using the <items> element
* and specifying <item> elements for each item. Each <item> * and specifying <item> elements for each item. Each <item>
* element supports the regular translation attributes "translatable", * element can specify the "id" corresponding to the appended text and
* also supports the regular translation attributes "translatable",
* "context" and "comments". * "context" and "comments".
* *
* <example> * <example>
@ -66,9 +67,9 @@
* <programlisting><![CDATA[ * <programlisting><![CDATA[
* <object class="GtkComboBoxText"> * <object class="GtkComboBoxText">
* <items> * <items>
* <item translatable="yes">Factory</item> * <item translatable="yes" id="factory">Factory</item>
* <item translatable="yes">Home</item> * <item translatable="yes" id="home">Home</item>
* <item translatable="yes">Subway</item> * <item translatable="yes" id="subway">Subway</item>
* </items> * </items>
* </object> * </object>
* ]]></programlisting> * ]]></programlisting>
@ -236,10 +237,6 @@ item_end_element (GMarkupParseContext *context,
{ {
const gchar *translated; const gchar *translated;
/* FIXME: This will not use the domain set in the .ui file,
* since the parser is not telling the builder about the domain.
* However, it will work for gtk_builder_set_translation_domain() calls.
*/
translated = _gtk_builder_parser_translate (data->domain, translated = _gtk_builder_parser_translate (data->domain,
data->context, data->context,
data->string->str); data->string->str);