summaryrefslogtreecommitdiffstats
path: root/src/selection-describer.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-11-03 23:32:42 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-11-03 23:32:42 +0000
commita6f1259a7e81b912e0335f1ad45d60a1cf534f4b (patch)
tree422c413ef09f52222938fe281fadea2d78fd71f3 /src/selection-describer.cpp
parentUpdate to trunk (diff)
parentRemove antiquated Perl extensions and modules, which were mostly useless. (diff)
downloadinkscape-a6f1259a7e81b912e0335f1ad45d60a1cf534f4b.tar.gz
inkscape-a6f1259a7e81b912e0335f1ad45d60a1cf534f4b.zip
Update to trunk
(bzr r11950.1.192)
Diffstat (limited to 'src/selection-describer.cpp')
-rw-r--r--src/selection-describer.cpp13
1 files changed, 9 insertions, 4 deletions
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(_("<i>%s</i>"), 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(_("<i>%s</i>"), 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 <b>%i</b> parent (%s)", " in <b>%i</b> parents (%s)", num_parents), num_parents, layer_name);
}