[gtk+/wip/gmenu: 9/87] Pass domain to the menu parser
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/gmenu: 9/87] Pass domain to the menu parser
- Date: Sat, 3 Dec 2011 23:48:54 +0000 (UTC)
commit 7dad8a7d8ae19b9a7d1072c9e759fe68919a00a3
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]