diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-09-20 17:43:57 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-09-20 17:43:57 +0000 |
| commit | 0a836d1870bb87d5be3e4d900718f903371c8e56 (patch) | |
| tree | 7d218dc0e9d81e2f7d3eddcefad9640769dc89b3 /src/sp-item.cpp | |
| parent | Compact of SVG icons whith the help of ~suv and Martin Owens (diff) | |
| parent | Merge Google Summer of Code unit improvement. (diff) | |
| download | inkscape-0a836d1870bb87d5be3e4d900718f903371c8e56.tar.gz inkscape-0a836d1870bb87d5be3e4d900718f903371c8e56.zip | |
Update to trunk
(bzr r11950.1.146)
Diffstat (limited to 'src/sp-item.cpp')
| -rw-r--r-- | src/sp-item.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp index e6991a1fa..a91d0e741 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -73,6 +73,8 @@ #include "live_effects/effect.h" #include "live_effects/lpeobject-reference.h" +#include "util/units.h" + #define noSP_ITEM_DEBUG_IDLE @@ -818,7 +820,7 @@ Geom::OptRect SPItem::desktopGeometricBounds() const Geom::OptRect SPItem::desktopVisualBounds() const { /// @fixme hardcoded desktop transform - Geom::Affine m = Geom::Scale(1, -1) * Geom::Translate(0, document->getHeight()); + Geom::Affine m = Geom::Scale(1, -1) * Geom::Translate(0, document->getHeight().value("px")); Geom::OptRect ret = documentVisualBounds(); if (ret) *ret *= m; return ret; @@ -931,9 +933,12 @@ void SPItem::invoke_print(SPPrintContext *ctx) } } -// CPPIFY: is it possible to combine this method with "SPItem::description()"? +const char* SPItem::display_name() { + return _("Object"); +} + gchar* SPItem::description() { - return g_strdup(_("Object")); + return g_strdup(""); } /** @@ -943,7 +948,8 @@ gchar* SPItem::description() { */ gchar *SPItem::getDetailedDescription() { - gchar* s = this->description(); + gchar* s = g_strdup_printf("<b>%s</b> %s", + this->display_name(), this->description()); if (s && clip_ref->getObject()) { gchar *snew = g_strdup_printf (_("%s; <i>clipped</i>"), s); @@ -1496,7 +1502,7 @@ Geom::Affine SPItem::i2dt_affine() const // TODO temp code to prevent crashing on command-line launch: ret = i2doc_affine() * Geom::Scale(1, -1) - * Geom::Translate(0, document->getHeight()); + * Geom::Translate(0, document->getHeight().value("px")); } return ret; } |
