From e469f1f4eb04e7cc1401c6679a41c217287ae888 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sat, 23 Aug 2014 15:17:43 +0200 Subject: fix Windows 64-bit build (bzr r13531) --- src/ui/dialog/print.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp index ed39ebb32..a015d28f9 100644 --- a/src/ui/dialog/print.cpp +++ b/src/ui/dialog/print.cpp @@ -14,13 +14,13 @@ # include #endif +#include + #ifdef WIN32 #include #include #endif -#include - #include "preferences.h" #include "print.h" -- cgit v1.2.3 From 14d2f47bd95482e500524dccc1b40445f7f44701 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Tue, 26 Aug 2014 09:43:41 +0200 Subject: UI. Fix for Bug #340723 "Interface inconsistency of tooltips". Translations. Translations template update. Fixed bugs: - https://launchpad.net/bugs/340723 (bzr r13532) --- src/extension/internal/bitmap/crop.cpp | 2 +- src/extension/internal/bitmap/opacity.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/extension/internal/bitmap/crop.cpp b/src/extension/internal/bitmap/crop.cpp index 0e633afd6..02d92668b 100644 --- a/src/extension/internal/bitmap/crop.cpp +++ b/src/extension/internal/bitmap/crop.cpp @@ -74,7 +74,7 @@ Crop::init(void) "\n" "\n" "\n" - "" N_("Crop selected bitmap(s).") "\n" + "" N_("Crop selected bitmap(s)") "\n" "\n" "\n", new Crop()); } diff --git a/src/extension/internal/bitmap/opacity.cpp b/src/extension/internal/bitmap/opacity.cpp index 742cb7019..f9b4bbc27 100644 --- a/src/extension/internal/bitmap/opacity.cpp +++ b/src/extension/internal/bitmap/opacity.cpp @@ -43,7 +43,7 @@ Opacity::init(void) "\n" "\n" "\n" - "" N_("Modify opacity channel(s) of selected bitmap(s).") "\n" + "" N_("Modify opacity channel(s) of selected bitmap(s)") "\n" "\n" "\n", new Opacity()); } -- cgit v1.2.3 From 7fd8ede6c698136bfa675dd4f1d5da6f5803154f Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Tue, 26 Aug 2014 22:38:14 +0200 Subject: Fix rotation center regression caused by my own commit 13512 Fixed bugs: - https://launchpad.net/bugs/1360953 - https://launchpad.net/bugs/1360946 (bzr r13534) --- src/sp-item.cpp | 20 ++++++++++++++------ src/ui/dialog/document-properties.cpp | 10 +++++++--- 2 files changed, 21 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/sp-item.cpp b/src/sp-item.cpp index 428f9555e..19dc71785 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -234,9 +234,13 @@ void SPItem::setCenter(Geom::Point const &object_centre) { document->ensureUpToDate(); // Copied from DocumentProperties::onDocUnitChange() - gdouble viewscale_w = this->document->getWidth().value("px") / this->document->getRoot()->viewBox.width(); - gdouble viewscale_h = this->document->getHeight().value("px")/ this->document->getRoot()->viewBox.height(); - gdouble viewscale = std::min(viewscale_h, viewscale_w); + gdouble viewscale = 1.0; + Geom::Rect vb = this->document->getRoot()->viewBox; + if ( !vb.hasZeroArea() ) { + gdouble viewscale_w = this->document->getWidth().value("px") / vb.width(); + gdouble viewscale_h = this->document->getHeight().value("px")/ vb.height(); + viewscale = std::min(viewscale_h, viewscale_w); + } // FIXME this is seriously wrong Geom::OptRect bbox = desktopGeometricBounds(); @@ -267,9 +271,13 @@ Geom::Point SPItem::getCenter() const { document->ensureUpToDate(); // Copied from DocumentProperties::onDocUnitChange() - gdouble viewscale_w = this->document->getWidth().value("px") / this->document->getRoot()->viewBox.width(); - gdouble viewscale_h = this->document->getHeight().value("px")/ this->document->getRoot()->viewBox.height(); - gdouble viewscale = std::min(viewscale_h, viewscale_w); + gdouble viewscale = 1.0; + Geom::Rect vb = this->document->getRoot()->viewBox; + if ( !vb.hasZeroArea() ) { + gdouble viewscale_w = this->document->getWidth().value("px") / vb.width(); + gdouble viewscale_h = this->document->getHeight().value("px")/ vb.height(); + viewscale = std::min(viewscale_h, viewscale_w); + } // FIXME this is seriously wrong Geom::OptRect bbox = desktopGeometricBounds(); diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 4e4616724..2757a0ec9 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -1736,9 +1736,13 @@ void DocumentProperties::onDocUnitChange() prefs->setBool("/options/transform/gradient", true); { ShapeEditor::blockSetItem(true); - gdouble viewscale_w = doc->getWidth().value("px")/doc->getRoot()->viewBox.width(); - gdouble viewscale_h = doc->getHeight().value("px")/doc->getRoot()->viewBox.height(); - gdouble viewscale = std::min(viewscale_h, viewscale_w); + gdouble viewscale = 1.0; + Geom::Rect vb = doc->getRoot()->viewBox; + if ( !vb.hasZeroArea() ) { + gdouble viewscale_w = doc->getWidth().value("px") / vb.width(); + gdouble viewscale_h = doc->getHeight().value("px")/ vb.height(); + viewscale = std::min(viewscale_h, viewscale_w); + } gdouble scale = Inkscape::Util::Quantity::convert(1, old_doc_unit, doc_unit); doc->getRoot()->scaleChildItemsRec(Geom::Scale(scale), Geom::Point(-viewscale*doc->getRoot()->viewBox.min()[Geom::X] + (doc->getWidth().value("px") - viewscale*doc->getRoot()->viewBox.width())/2, -- cgit v1.2.3 From 65e028240540fafc4269bd43e66cdeaf41408b12 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Sat, 30 Aug 2014 08:24:40 +0200 Subject: Translators list update (bzr r13536) --- src/ui/dialog/aboutbox.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index a66855b2a..7cd069132 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -482,6 +482,7 @@ void AboutBox::initStrings() { "Elias Norberg , 2009.\n" "Equipe de Tradução Inkscape Brasil , 2007.\n" "Fatih Demir , 2000.\n" +"Firas Hanife , 2014.\n" "Foppe Benedictus , 2007-2009.\n" "Francesc Dorca , 2003. Traducció sodipodi.\n" "Francisco Javier F. Serrador , 2003.\n" @@ -493,8 +494,9 @@ void AboutBox::initStrings() { "Hizkuntza Politikarako Sailburuordetza , 2005.\n" "Ilia Penev , 2006.\n" "Ivan Masár , 2006-2010. \n" +"Ivan Řihošek , 2014.\n" "Iñaki Larrañaga , 2006.\n" -"Jānis Eisaks , 2012, 2013.\n" +"Jānis Eisaks , 2012-2014.\n" "Jeffrey Steve Borbón Sanabria , 2005.\n" "Jesper Öqvist , 2010, 2011.\n" "Joaquim Perez i Noguer , 2008-2009.\n" @@ -516,7 +518,7 @@ void AboutBox::initStrings() { "Kingsley Turner , 2006.\n" "Kitae , 2006.\n" "Kjartan Maraas , 2000-2002.\n" -"Kris De Gussem , 2008-2013.\n" +"Kris De Gussem , 2008-2014.\n" "Lauris Kaplinski , 2000.\n" "Leandro Regueiro , 2006-2008, 2010.\n" "Liu Xiaoqin , 2008.\n" @@ -536,7 +538,7 @@ void AboutBox::initStrings() { "Muhammad Bashir Al-Noimi , 2008.\n" "Myckel Habets , 2008.\n" "Nguyen Dinh Trung , 2007, 2008.\n" -"Nicolas Dufour , 2008-2013.\n" +"Nicolas Dufour , 2008-2014.\n" "Pawan Chitrakar , 2006.\n" "Przemysław Loesch , 2005.\n" "Quico Llach , 2000. Traducció sodipodi.\n" -- cgit v1.2.3 From 8dfc079b2537894d03f3b43a2e1d05b0d576dd7b Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 31 Aug 2014 17:19:39 -0400 Subject: Fix for bug #1363497 (strange crash with knot path effect) Fixed bugs: - https://launchpad.net/bugs/1363497 (bzr r13537) --- src/ui/tools/node-tool.cpp | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp index 0778e3f3f..4be547506 100644 --- a/src/ui/tools/node-tool.cpp +++ b/src/ui/tools/node-tool.cpp @@ -298,27 +298,23 @@ void NodeTool::update_helperpath () { if (SP_IS_LPE_ITEM(selection->singleItem())) { Inkscape::LivePathEffect::Effect *lpe = SP_LPE_ITEM(selection->singleItem())->getCurrentLPE(); if (lpe && lpe->isVisible()/* && lpe->showOrigPath()*/) { - if (lpe) { - SPCurve *c = new SPCurve(); - SPCurve *cc = new SPCurve(); - std::vector cs = lpe->getCanvasIndicators(SP_LPE_ITEM(selection->singleItem())); - for (std::vector::iterator p = cs.begin(); p != cs.end(); ++p) { - cc->set_pathvector(*p); - c->append(cc, false); - cc->reset(); - } - if (!c->is_empty()) { - c->transform(selection->singleItem()->i2dt_affine()); - SPCanvasItem *helperpath = sp_canvas_bpath_new(sp_desktop_tempgroup(this->desktop), c); - sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(helperpath), - 0x0000ff9A, 1.0, - SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT); - sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(helperpath), 0, SP_WIND_RULE_NONZERO); - this->helperpath_tmpitem = this->desktop->add_temporary_canvasitem(helperpath,0); - } - c->unref(); - cc->unref(); - } + SPCurve *c = new SPCurve(); + SPCurve *cc = new SPCurve(); + std::vector cs = lpe->getCanvasIndicators(SP_LPE_ITEM(selection->singleItem())); + for (std::vector::iterator p = cs.begin(); p != cs.end(); ++p) { + cc->set_pathvector(*p); + c->append(cc, false); + cc->reset(); + } + if (!c->is_empty()) { + SPCanvasItem *helperpath = sp_canvas_bpath_new(sp_desktop_tempgroup(this->desktop), c); + sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(helperpath), 0x0000ff9A, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT); + sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(helperpath), 0, SP_WIND_RULE_NONZERO); + sp_canvas_item_affine_absolute(helperpath, selection->singleItem()->i2dt_affine()); + this->helperpath_tmpitem = this->desktop->add_temporary_canvasitem(helperpath, 0); + } + c->unref(); + cc->unref(); } } } -- cgit v1.2.3 From 6762be8823131f9426c39013816f38f6a21e1482 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Mon, 1 Sep 2014 11:34:28 -0400 Subject: BinReloc: fix -Wwrite-strings (bzr r13538) --- src/prefix.cpp | 2 +- src/prefix.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/prefix.cpp b/src/prefix.cpp index 126d16a72..dd8872a1d 100644 --- a/src/prefix.cpp +++ b/src/prefix.cpp @@ -192,7 +192,7 @@ br_locate_prefix (void *symbol) * br_prepend_prefix (&argc, "/share/foo/data.png"); --> Returns "/usr/share/foo/data.png" */ char * -br_prepend_prefix (void *symbol, char *path) +br_prepend_prefix (void *symbol, char const *path) { char *tmp, *newpath; diff --git a/src/prefix.h b/src/prefix.h index af96fa746..7c5a1fd3c 100644 --- a/src/prefix.h +++ b/src/prefix.h @@ -80,7 +80,7 @@ extern "C" { const char *br_thread_local_store (char *str); char *br_locate (void *symbol); char *br_locate_prefix (void *symbol); -char *br_prepend_prefix (void *symbol, char *path); +char *br_prepend_prefix (void *symbol, char const *path); #endif /* ENABLE_BINRELOC */ -- cgit v1.2.3 From 3380db70b04c1a5df6c0ad2ffef56d3c469f8614 Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Mon, 1 Sep 2014 21:36:17 -0400 Subject: Updated about box authors list from AUTHORS file. (bzr r13539) --- src/ui/dialog/aboutbox.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index 7cd069132..f3cffa244 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -254,6 +254,7 @@ void AboutBox::initStrings() { "Nicholas Bishop\n" "Joshua L. Blocher\n" "Hanno Böck\n" +"Tomasz Boczkowski\n" "Henrik Bohre\n" "Boldewyn\n" "Daniel Borgmann\n" @@ -270,6 +271,7 @@ void AboutBox::initStrings() { "Gail Carmichael\n" "Ed Catmur\n" "Chema Celorio\n" +"Jabiertxo Arraiza Cenoz\n" "Johan Ceuppens\n" "Zbigniew Chyla\n" "Alexander Clausen\n" @@ -311,6 +313,7 @@ void AboutBox::initStrings() { "Hannes Hochreiner\n" "Thomas Holder\n" "Joel Holdsworth\n" +"Christoffer Holmstedt\n" "Alan Horkan\n" "Karl Ove Hufthammer\n" "Richard Hughes\n" @@ -319,6 +322,7 @@ void AboutBox::initStrings() { "Thomas Ingham\n" "Jean-Olivier Irisson\n" "Bob Jamison\n" +"Ted Janeczko\n" "jEsuSdA\n" "Fernando Lucchesi Bastos Jurema\n" "Lauris Kaplinski\n" @@ -342,7 +346,9 @@ void AboutBox::initStrings() { "Aurel-Aimé Marmion\n" "Colin Marquardt\n" "Craig Marshall\n" +"Ivan Masár\n" "Dmitry G. Mastrukov\n" +"David Mathog\n" "Matiphas\n" "Michael Meeks\n" "Federico Mena\n" @@ -360,8 +366,10 @@ void AboutBox::initStrings() { "Nick\n" "Andreas Nilsson\n" "Mitsuru Oka\n" +"Vinícius dos Santos Oliveira\n" "Martin Owens\n" "Alvin Penner\n" +"Matthew Petroff\n" "Jon Phillips\n" "Zdenko Podobny\n" "Alexandre Prokoudine\n" @@ -398,6 +406,8 @@ void AboutBox::initStrings() { "Joakim Verona\n" "Lucas Vieites\n" "Daniel Wagenaar\n" +"Liam P. White\n" +"Sebastian Wüst\n" "Michael Wybrow\n" "Gellule Xg\n" "Daniel Yacob\n" -- cgit v1.2.3 From f92e6ec4025b82d140a65a949741e10d2380c5d6 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Tue, 2 Sep 2014 16:37:58 -0400 Subject: Fix locale issue in powerstroke width selection (bzr r13542) --- src/ui/tools/freehand-base.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp index a90a23a3e..37a170bc9 100644 --- a/src/ui/tools/freehand-base.cpp +++ b/src/ui/tools/freehand-base.cpp @@ -247,8 +247,9 @@ static void spdc_apply_powerstroke_shape(const std::vector & points sp_style_unref(style); } - char * width_str = new char[50]; - sprintf(width_str, "0,%f", stroke_width / 2.); + std::ostringstream s; + s.imbue(std::locale::classic()); + s << "0," << stroke_width / 2.; // write powerstroke parameters: lpe->getRepr()->setAttribute("start_linecap_type", "zerowidth"); @@ -257,9 +258,7 @@ static void spdc_apply_powerstroke_shape(const std::vector & points lpe->getRepr()->setAttribute("sort_points", "true"); lpe->getRepr()->setAttribute("interpolator_type", "CubicBezierJohan"); lpe->getRepr()->setAttribute("interpolator_beta", "0.2"); - lpe->getRepr()->setAttribute("offset_points", width_str); - - delete [] width_str; + lpe->getRepr()->setAttribute("offset_points", s.str().c_str()); } static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item, SPCurve *curve) -- cgit v1.2.3