diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-07-04 15:27:06 +0000 |
|---|---|---|
| committer | Javiertxo <jtx@jtx.marker.es> | 2013-07-04 15:27:06 +0000 |
| commit | b8ef835cd10460cf7548bae4970b395e9d7767d9 (patch) | |
| tree | 12e14b42023385cf8bf8192c2ae482a4f59deff1 /src/selection-describer.cpp | |
| parent | Im not sure what changes are (diff) | |
| parent | Shape calculations. do not quantize the coordinates. (Bug 168158) (diff) | |
| download | inkscape-b8ef835cd10460cf7548bae4970b395e9d7767d9.tar.gz inkscape-b8ef835cd10460cf7548bae4970b395e9d7767d9.zip | |
Upadate to trunk
(bzr r11950.1.122)
Diffstat (limited to 'src/selection-describer.cpp')
| -rw-r--r-- | src/selection-describer.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/selection-describer.cpp b/src/selection-describer.cpp index 968a8bd22..72467c187 100644 --- a/src/selection-describer.cpp +++ b/src/selection-describer.cpp @@ -38,8 +38,9 @@ #include "sp-spiral.h" static const gchar * -type2term(GType type) +type2term(SPItem *item) { + GType type = G_OBJECT_TYPE( item ); if (type == SP_TYPE_ANCHOR) //TRANSLATORS: "Link" means internet link (anchor) { return C_("Web", "Link"); } @@ -68,6 +69,8 @@ type2term(GType type) if (type == SP_TYPE_TEXT) { return C_("Object", "Text"); } if (type == SP_TYPE_USE) + if (SP_IS_SYMBOL(item->firstChild())) + { return C_("Object", "Symbol"); } // TRANSLATORS: "Clone" is a noun, type of object { return C_("Object", "Clone"); } if (type == SP_TYPE_ARC) @@ -85,7 +88,7 @@ static GSList *collect_terms (GSList *items) { GSList *r = NULL; for (GSList *i = items; i != NULL; i = i->next) { - const gchar *term = type2term (G_OBJECT_TYPE(i->data)); + const gchar *term = type2term ( SP_ITEM(i->data) ); if (term != NULL && g_slist_find (r, term) == NULL) r = g_slist_prepend (r, (void *) term); } @@ -148,6 +151,8 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select gchar *layer_name; if (layer == root) { layer_name = g_strdup(_("root")); + } else if(!layer) { + layer_name = g_strdup(_("none")); } else { char const *layer_label; bool is_label = false; @@ -180,6 +185,8 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select if (num_parents == 1) { if (layer == parent) in_phrase = g_strdup_printf(_(" in %s"), layer_name); + else if (!layer) + in_phrase = g_strdup_printf(_(" hidden in definitions")); else in_phrase = g_strdup_printf(_(" in group %s (%s)"), parent_name, layer_name); } else { @@ -197,6 +204,10 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select _context.setF(Inkscape::NORMAL_MESSAGE, "%s%s. %s. %s.", item_desc, in_phrase, _("Convert symbol to group to edit"), _when_selected); + } else if (SP_IS_SYMBOL(item)) { + _context.setF(Inkscape::NORMAL_MESSAGE, "%s%s. %s.", + item_desc, in_phrase, + _("Remove from symbols tray to edit symbol")); } else if (SP_IS_USE(item) || (SP_IS_OFFSET(item) && SP_OFFSET(item)->sourceHref)) { _context.setF(Inkscape::NORMAL_MESSAGE, "%s%s. %s. %s.", item_desc, in_phrase, |
