summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristanvb@openismus.com>2013-05-12 21:56:40 +0900
committerTristan Van Berkom <tristanvb@openismus.com>2013-05-12 21:56:40 +0900
commit11be64d3fe12969579843a125cf0408320384563 (patch)
treee05862aabc4d5b72030334e430e6f0233af41953
parentb3f1e0cc36866f990555a71a8d759dae141ecb32 (diff)
downloadgtk+-11be64d3fe12969579843a125cf0408320384563.tar.gz
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.
-rw-r--r--gtk/gtkcomboboxtext.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gtk/gtkcomboboxtext.c b/gtk/gtkcomboboxtext.c
index 3a3154b13b..a81c8441e8 100644
--- a/gtk/gtkcomboboxtext.c
+++ b/gtk/gtkcomboboxtext.c
@@ -58,7 +58,8 @@
* The GtkComboBoxText implementation of the GtkBuildable interface
* supports adding items directly using the &lt;items&gt; element
* and specifying &lt;item&gt; elements for each item. Each &lt;item&gt;
- * 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".
*
* <example>
@@ -66,9 +67,9 @@
* <programlisting><![CDATA[
* <object class="GtkComboBoxText">
* <items>
- * <item translatable="yes">Factory</item>
- * <item translatable="yes">Home</item>
- * <item translatable="yes">Subway</item>
+ * <item translatable="yes" id="factory">Factory</item>
+ * <item translatable="yes" id="home">Home</item>
+ * <item translatable="yes" id="subway">Subway</item>
* </items>
* </object>
* ]]></programlisting>
@@ -236,10 +237,6 @@ item_end_element (GMarkupParseContext *context,
{
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,
data->context,
data->string->str);