[gtk+] Pass domain to the menu parser
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Pass domain to the menu parser
- Date: Mon, 19 Dec 2011 17:54:43 +0000 (UTC)
commit f13083bf0da0213e2d2df0026cb126980a024093
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Nov 8 16:24:32 2011 -0500
Pass domain to the menu parser
This is necessary to make translations in markup work.
gtk/gtkbuilderparser.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c
index d0071f9..253b4fd 100644
--- a/gtk/gtkbuilderparser.c
+++ b/gtk/gtkbuilderparser.c
@@ -847,7 +847,7 @@ parse_menu (GMarkupParseContext *context,
object_info->tag.name = element_name;
state_push (data, object_info);
- g_menu_markup_parser_start_menu (context, NULL);
+ g_menu_markup_parser_start_menu (context, data->domain, NULL);
return TRUE;
}
@@ -1131,17 +1131,19 @@ text (GMarkupParseContext *context,
static void
free_info (CommonInfo *info)
{
- if (strcmp (info->tag.name, "object") == 0)
+ if (strcmp (info->tag.name, "object") == 0)
free_object_info ((ObjectInfo *)info);
- else if (strcmp (info->tag.name, "child") == 0)
+ else if (strcmp (info->tag.name, "child") == 0)
free_child_info ((ChildInfo *)info);
- else if (strcmp (info->tag.name, "property") == 0)
+ else if (strcmp (info->tag.name, "property") == 0)
free_property_info ((PropertyInfo *)info);
- else if (strcmp (info->tag.name, "signal") == 0)
+ else if (strcmp (info->tag.name, "signal") == 0)
_free_signal_info ((SignalInfo *)info, NULL);
- else if (strcmp (info->tag.name, "requires") == 0)
+ else if (strcmp (info->tag.name, "requires") == 0)
_free_requires_info ((RequiresInfo *)info, NULL);
- else
+ else if (strcmp (info->tag.name, "menu") == 0)
+ free_object_info ((ObjectInfo *)info);
+ else
g_assert_not_reached ();
}
@@ -1150,7 +1152,6 @@ static const GMarkupParser parser = {
end_element,
text,
NULL,
- NULL
};
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]