From 73edade30f70b4c0ad94c9561b4e4ec0675465b0 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sun, 27 Oct 2013 00:00:51 +0200 Subject: Added some consts. (bzr r12729) --- src/selection-describer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/selection-describer.cpp') diff --git a/src/selection-describer.cpp b/src/selection-describer.cpp index 5dddb0832..4fd920bf8 100644 --- a/src/selection-describer.cpp +++ b/src/selection-describer.cpp @@ -62,7 +62,7 @@ static int count_filtered (GSList *items) int count=0; for (GSList *i = items; i != NULL; i = i->next) { SPItem *item = SP_ITEM(i->data); - count += item->ifilt(); + count += item->isFiltered(); } return count; } -- cgit v1.2.3 From 5aad46200120de4d40f75aac876ff65f3b9dceb8 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Thu, 31 Oct 2013 17:25:36 +0100 Subject: Partially fix crashes when entering a group with deleted id (bzr r12754) --- src/selection-describer.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/selection-describer.cpp') diff --git a/src/selection-describer.cpp b/src/selection-describer.cpp index 4fd920bf8..88450dfdf 100644 --- a/src/selection-describer.cpp +++ b/src/selection-describer.cpp @@ -134,9 +134,12 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select // Parent name SPObject *parent = item->parent; gchar const *parent_label = parent->getId(); - char *quoted_parent_label = xml_quote_strdup(parent_label); - gchar *parent_name = g_strdup_printf(_("%s"), quoted_parent_label); - g_free(quoted_parent_label); + gchar *parent_name = NULL; + if (parent_label) { + char *quoted_parent_label = xml_quote_strdup(parent_label); + parent_name = g_strdup_printf(_("%s"), quoted_parent_label); + g_free(quoted_parent_label); + } gchar *in_phrase; guint num_layers = selection->numberOfLayers(); @@ -147,8 +150,10 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select in_phrase = g_strdup_printf(_(" in %s"), layer_name); else if (!layer) in_phrase = g_strdup_printf("%s", _(" hidden in definitions")); - else + else if (parent_name) in_phrase = g_strdup_printf(_(" in group %s (%s)"), parent_name, layer_name); + else + in_phrase = g_strdup_printf(_(" in unnamed group (%s)"), layer_name); } else { in_phrase = g_strdup_printf(ngettext(" in %i parent (%s)", " in %i parents (%s)", num_parents), num_parents, layer_name); } -- cgit v1.2.3