diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-11-03 23:42:23 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-11-03 23:42:23 +0000 |
| commit | 48ac54f0234671b23afeaad33af6168037ef552c (patch) | |
| tree | 3a937530c745c958f8da1e788a8dfe94cff847d4 /src/selection-describer.cpp | |
| parent | Update to trunk (diff) | |
| parent | Remove antiquated Perl extensions and modules, which were mostly useless. (diff) | |
| download | inkscape-48ac54f0234671b23afeaad33af6168037ef552c.tar.gz inkscape-48ac54f0234671b23afeaad33af6168037ef552c.zip | |
Update to trunk
(bzr r12588.1.25)
Diffstat (limited to 'src/selection-describer.cpp')
| -rw-r--r-- | src/selection-describer.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/selection-describer.cpp b/src/selection-describer.cpp index 5dddb0832..88450dfdf 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; } @@ -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); } |
