summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-10-22 16:33:33 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-10-22 16:33:33 +0000
commitf471e26bd16f8024c6756d7d018b5687ae90d821 (patch)
tree1208c12abe1d1f3d27301e5f7affaca5e5380b51 /src
parentmerge from trunk (r11810) (diff)
parentupdate cmake files & make function static. (diff)
downloadinkscape-f471e26bd16f8024c6756d7d018b5687ae90d821.tar.gz
inkscape-f471e26bd16f8024c6756d7d018b5687ae90d821.zip
merge from trunk (r11821)
(bzr r11668.1.33)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-angle_bisector.cpp4
-rw-r--r--src/live_effects/lpe-boolops.cpp4
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp6
-rw-r--r--src/live_effects/lpe-dynastroke.cpp52
-rw-r--r--src/live_effects/lpe-lattice.cpp32
-rw-r--r--src/live_effects/lpe-line_segment.cpp2
-rw-r--r--src/live_effects/lpe-mirror_symmetry.cpp2
-rw-r--r--src/live_effects/lpe-parallel.cpp4
-rw-r--r--src/live_effects/lpe-path_length.cpp4
-rw-r--r--src/live_effects/lpe-perp_bisector.cpp4
-rw-r--r--src/live_effects/lpe-powerstroke.cpp2
-rw-r--r--src/live_effects/lpe-recursiveskeleton.cpp2
-rw-r--r--src/live_effects/lpe-tangent_to_curve.cpp8
-rw-r--r--src/live_effects/lpe-test-doEffect-stack.cpp6
-rw-r--r--src/live_effects/lpe-text_label.cpp2
-rw-r--r--src/ui/CMakeLists.txt2
-rw-r--r--src/widgets/desktop-widget.cpp177
-rw-r--r--src/widgets/gradient-selector.cpp8
-rw-r--r--src/widgets/toolbox.cpp19
19 files changed, 237 insertions, 103 deletions
diff --git a/src/live_effects/lpe-angle_bisector.cpp b/src/live_effects/lpe-angle_bisector.cpp
index 4e6176c92..8aa88f1f0 100644
--- a/src/live_effects/lpe-angle_bisector.cpp
+++ b/src/live_effects/lpe-angle_bisector.cpp
@@ -42,8 +42,8 @@ public:
LPEAngleBisector::LPEAngleBisector(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
- length_left(_("Length left"), _("Specifies the left end of the bisector"), "length-left", &wr, this, 0),
- length_right(_("Length right"), _("Specifies the right end of the bisector"), "length-right", &wr, this, 250)
+ length_left(_("Length left:"), _("Specifies the left end of the bisector"), "length-left", &wr, this, 0),
+ length_right(_("Length right:"), _("Specifies the right end of the bisector"), "length-right", &wr, this, 250)
{
show_orig_path = true;
_provides_knotholder_entities = true;
diff --git a/src/live_effects/lpe-boolops.cpp b/src/live_effects/lpe-boolops.cpp
index efaca7e8b..641cf5d50 100644
--- a/src/live_effects/lpe-boolops.cpp
+++ b/src/live_effects/lpe-boolops.cpp
@@ -32,8 +32,8 @@ static const Util::EnumDataConverter<unsigned> BoolopTypeConverter(BoolopTypeDat
LPEBoolops::LPEBoolops(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
- bool_path(_("2nd path"), _("Path to which the original path will be boolop'ed."), "path_2nd", &wr, this, "M0,0 L1,0"),
- boolop_type(_("Boolop type"), _("Determines which kind of boolop will be performed."), "boolop_type", BoolopTypeConverter, &wr, this, Geom::BOOLOP_UNION)
+ bool_path(_("2nd path:"), _("Path to which the original path will be boolop'ed."), "path_2nd", &wr, this, "M0,0 L1,0"),
+ boolop_type(_("Boolop type:"), _("Determines which kind of boolop will be performed."), "boolop_type", BoolopTypeConverter, &wr, this, Geom::BOOLOP_UNION)
{
show_orig_path = true;
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp
index 01c0e550c..9ac553ed5 100644
--- a/src/live_effects/lpe-copy_rotate.cpp
+++ b/src/live_effects/lpe-copy_rotate.cpp
@@ -48,9 +48,9 @@ public:
LPECopyRotate::LPECopyRotate(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
- starting_angle(_("Starting"), _("Angle of the first copy"), "starting_angle", &wr, this, 0.0),
- rotation_angle(_("Rotation angle"), _("Angle between two successive copies"), "rotation_angle", &wr, this, 30.0),
- num_copies(_("Number of copies"), _("Number of copies of the original path"), "num_copies", &wr, this, 5),
+ starting_angle(_("Starting:"), _("Angle of the first copy"), "starting_angle", &wr, this, 0.0),
+ rotation_angle(_("Rotation angle:"), _("Angle between two successive copies"), "rotation_angle", &wr, this, 30.0),
+ num_copies(_("Number of copies:"), _("Number of copies of the original path"), "num_copies", &wr, this, 5),
origin(_("Origin"), _("Origin of the rotation"), "origin", &wr, this, "Adjust the origin of the rotation"),
dist_angle_handle(100)
{
diff --git a/src/live_effects/lpe-dynastroke.cpp b/src/live_effects/lpe-dynastroke.cpp
index a3e2073ee..467fdfd9c 100644
--- a/src/live_effects/lpe-dynastroke.cpp
+++ b/src/live_effects/lpe-dynastroke.cpp
@@ -71,17 +71,17 @@ static const Util::EnumDataConverter<DynastrokeCappingType> DSCTConverter(Dynast
LPEDynastroke::LPEDynastroke(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
// initialise your parameters here:
- method(_("Method"), _("Choose pen type"), "method", DSMethodConverter, &wr, this, DSM_THICKTHIN_FAST),
- width(_("Pen width"), _("Maximal stroke width"), "width", &wr, this, 25),
- roundness(_("Pen roundness"), _("Min/Max width ratio"), "roundness", &wr, this, .2),
- angle(_("angle"), _("direction of thickest strokes (opposite = thinest)"), "angle", &wr, this, 45),
+ method(_("Method:"), _("Choose pen type"), "method", DSMethodConverter, &wr, this, DSM_THICKTHIN_FAST),
+ width(_("Pen width:"), _("Maximal stroke width"), "width", &wr, this, 25),
+ roundness(_("Pen roundness:"), _("Min/Max width ratio"), "roundness", &wr, this, .2),
+ angle(_("Angle:"), _("direction of thickest strokes (opposite = thinest)"), "angle", &wr, this, 45),
// modulo_pi(_("modulo pi"), _("Give forward and backward moves in one direction the same thickness "), "modulo_pi", &wr, this, false),
- start_cap(_("Start"), _("Choose start capping type"), "start_cap", DSCTConverter, &wr, this, DSCT_SHARP),
- end_cap(_("End"), _("Choose end capping type"), "end_cap", DSCTConverter, &wr, this, DSCT_SHARP),
- growfor(_("Grow for"), _("Make the stroke thiner near it's start"), "growfor", &wr, this, 100),
- fadefor(_("Fade for"), _("Make the stroke thiner near it's end"), "fadefor", &wr, this, 100),
+ start_cap(_("Start:"), _("Choose start capping type"), "start_cap", DSCTConverter, &wr, this, DSCT_SHARP),
+ end_cap(_("End:"), _("Choose end capping type"), "end_cap", DSCTConverter, &wr, this, DSCT_SHARP),
+ growfor(_("Grow for:"), _("Make the stroke thiner near it's start"), "growfor", &wr, this, 100),
+ fadefor(_("Fade for:"), _("Make the stroke thiner near it's end"), "fadefor", &wr, this, 100),
round_ends(_("Round ends"), _("Strokes end with a round end"), "round_ends", &wr, this, false),
- capping(_("Capping"), _("left capping"), "capping", &wr, this, "M 100,5 C 50,5 0,0 0,0 0,0 50,-5 100,-5")
+ capping(_("Capping:"), _("left capping"), "capping", &wr, this, "M 100,5 C 50,5 0,0 0,0 0,0 50,-5 100,-5")
{
registerParameter( dynamic_cast<Parameter *>(& method) );
@@ -115,7 +115,7 @@ LPEDynastroke::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
{
using namespace Geom;
- std::cout<<"do effect: debut\n";
+// std::cout<<"do effect: debut\n";
Piecewise<D2<SBasis> > output;
Piecewise<D2<SBasis> > m = pwd2_in;
@@ -156,13 +156,13 @@ LPEDynastroke::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
DynastrokeMethod stroke_method = method.get_value();
if (roundness==1.) {
- std::cout<<"round pen.\n";
+// std::cout<<"round pen.\n";
n1 = n*double(width);
n2 =-n1;
}else{
switch(stroke_method) {
case DSM_ELLIPTIC_PEN:{
- std::cout<<"ellptic pen\n";
+// std::cout<<"ellptic pen\n";
//FIXME: roundness=0???
double c = cos(angle_rad), s = sin(angle_rad);
Affine rot,slant;
@@ -178,7 +178,7 @@ LPEDynastroke::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
break;
}
case DSM_THICKTHIN_FAST:{
- std::cout<<"fast thick thin pen\n";
+// std::cout<<"fast thick thin pen\n";
D2<Piecewise<SBasis> > n_xy = make_cuts_independent(n);
w = n_xy[X]*sin(angle_rad) - n_xy[Y]*cos(angle_rad);
w = w * ((1 - roundness)*width/2.) + ((1 + roundness)*width/2.);
@@ -187,7 +187,7 @@ LPEDynastroke::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
break;
}
case DSM_THICKTHIN_SLOW:{
- std::cout<<"slow thick thin pen\n";
+// std::cout<<"slow thick thin pen\n";
D2<Piecewise<SBasis> > n_xy = make_cuts_independent(n);
w = n_xy[X]*cos(angle_rad)+ n_xy[Y]*sin(angle_rad);
w = w * ((1 - roundness)*width/2.) + ((1 + roundness)*width/2.);
@@ -196,12 +196,12 @@ LPEDynastroke::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
Piecewise<SBasis> dw = derivative(w);
Piecewise<SBasis> ncomp = sqrt(dot(v,v)-dw*dw,.1,3);
//FIXME: is force continuity usefull? compatible with corners?
- std::cout<<"ici\n";
+// std::cout<<"ici\n";
n1 = -dw*v + ncomp*rot90(v);
n1 = w*force_continuity(unitVector(n1),.1);
n2 = -dw*v - ncomp*rot90(v);
n2 = w*force_continuity(unitVector(n2),.1);
- std::cout<<"ici2\n";
+// std::cout<<"ici2\n";
break;
}
default:{
@@ -219,13 +219,13 @@ LPEDynastroke::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
Piecewise<D2<SBasis> > left, right;
if ( m.segs.front().at0() == m.segs.back().at1()){
// if closed:
- std::cout<<"closed input.\n";
+// std::cout<<"closed input.\n";
left = m + n1;//+ n;
right = m + n2;//- n;
} else {
//if not closed, shape the ends:
//TODO: allow fancy ends...
- std::cout<<"shaping the ends\n";
+// std::cout<<"shaping the ends\n";
double grow_length = growfor;// * width;
double fade_length = fadefor;// * width;
Piecewise<SBasis > s = arcLengthSb(m);
@@ -240,7 +240,7 @@ LPEDynastroke::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
factor_in.concat(Piecewise<SBasis >(Linear(1)));
factor_in.cuts[2]=totlength;
}
- std::cout<<"shaping the ends ici\n";
+// std::cout<<"shaping the ends ici\n";
//scale factor for a sharp end
join[0] = Linear(1,0);
join[1] = Linear(1,1);
@@ -254,7 +254,7 @@ LPEDynastroke::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
factor_out = Piecewise<SBasis >(join);
factor_out.setDomain(Interval(totlength-fade_length,totlength));
}
- std::cout<<"shaping the ends ici ici\n";
+// std::cout<<"shaping the ends ici ici\n";
Piecewise<SBasis > factor = factor_in*factor_out;
n1 = compose(factor,s)*n1;
@@ -262,10 +262,10 @@ LPEDynastroke::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
left = m + n1;
right = m + n2;
- std::cout<<"shaping the ends ici ici ici\n";
+// std::cout<<"shaping the ends ici ici ici\n";
if (start_cap.get_value() == DSCT_ROUND){
- std::cout<<"shaping round start\n";
+// std::cout<<"shaping round start\n";
SBasis tau(2,Linear(0));
tau[1] = Linear(-1,0);
Piecewise<SBasis > hbump;
@@ -280,7 +280,7 @@ LPEDynastroke::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
right += - hbump * rot90(n);
}
if (end_cap.get_value() == DSCT_ROUND){
- std::cout<<"shaping round end\n";
+// std::cout<<"shaping round end\n";
SBasis tau(2,Linear(0));
tau[1] = Linear(0,1);
Piecewise<SBasis > hbump;
@@ -299,11 +299,11 @@ LPEDynastroke::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
left = force_continuity(left);
right = force_continuity(right);
- std::cout<<"gathering result: left";
+// std::cout<<"gathering result: left";
output = left;
- std::cout<<" + reverse(right)";
+// std::cout<<" + reverse(right)";
output.concat(reverse(right));
- std::cout<<". done\n";
+// std::cout<<". done\n";
//-----------
return output;
diff --git a/src/live_effects/lpe-lattice.cpp b/src/live_effects/lpe-lattice.cpp
index 473469c8a..2d04c4d41 100644
--- a/src/live_effects/lpe-lattice.cpp
+++ b/src/live_effects/lpe-lattice.cpp
@@ -42,22 +42,22 @@ LPELattice::LPELattice(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
// initialise your parameters here:
- grid_point0(_("Control handle 0"), _("Control handle 0"), "gridpoint0", &wr, this),
- grid_point1(_("Control handle 1"), _("Control handle 1"), "gridpoint1", &wr, this),
- grid_point2(_("Control handle 2"), _("Control handle 2"), "gridpoint2", &wr, this),
- grid_point3(_("Control handle 3"), _("Control handle 3"), "gridpoint3", &wr, this),
- grid_point4(_("Control handle 4"), _("Control handle 4"), "gridpoint4", &wr, this),
- grid_point5(_("Control handle 5"), _("Control handle 5"), "gridpoint5", &wr, this),
- grid_point6(_("Control handle 6"), _("Control handle 6"), "gridpoint6", &wr, this),
- grid_point7(_("Control handle 7"), _("Control handle 7"), "gridpoint7", &wr, this),
- grid_point8(_("Control handle 8"), _("Control handle 8"), "gridpoint8", &wr, this),
- grid_point9(_("Control handle 9"), _("Control handle 9"), "gridpoint9", &wr, this),
- grid_point10(_("Control handle 10"), _("Control handle 10"), "gridpoint10", &wr, this),
- grid_point11(_("Control handle 11"), _("Control handle 11"), "gridpoint11", &wr, this),
- grid_point12(_("Control handle 12"), _("Control handle 12"), "gridpoint12", &wr, this),
- grid_point13(_("Control handle 13"), _("Control handle 13"), "gridpoint13", &wr, this),
- grid_point14(_("Control handle 14"), _("Control handle 14"), "gridpoint14", &wr, this),
- grid_point15(_("Control handle 15"), _("Control handle 15"), "gridpoint15", &wr, this)
+ grid_point0(_("Control handle 0:"), _("Control handle 0"), "gridpoint0", &wr, this),
+ grid_point1(_("Control handle 1:"), _("Control handle 1"), "gridpoint1", &wr, this),
+ grid_point2(_("Control handle 2:"), _("Control handle 2"), "gridpoint2", &wr, this),
+ grid_point3(_("Control handle 3:"), _("Control handle 3"), "gridpoint3", &wr, this),
+ grid_point4(_("Control handle 4:"), _("Control handle 4"), "gridpoint4", &wr, this),
+ grid_point5(_("Control handle 5:"), _("Control handle 5"), "gridpoint5", &wr, this),
+ grid_point6(_("Control handle 6:"), _("Control handle 6"), "gridpoint6", &wr, this),
+ grid_point7(_("Control handle 7:"), _("Control handle 7"), "gridpoint7", &wr, this),
+ grid_point8(_("Control handle 8:"), _("Control handle 8"), "gridpoint8", &wr, this),
+ grid_point9(_("Control handle 9:"), _("Control handle 9"), "gridpoint9", &wr, this),
+ grid_point10(_("Control handle 10:"), _("Control handle 10"), "gridpoint10", &wr, this),
+ grid_point11(_("Control handle 11:"), _("Control handle 11"), "gridpoint11", &wr, this),
+ grid_point12(_("Control handle 12:"), _("Control handle 12"), "gridpoint12", &wr, this),
+ grid_point13(_("Control handle 13:"), _("Control handle 13"), "gridpoint13", &wr, this),
+ grid_point14(_("Control handle 14:"), _("Control handle 14"), "gridpoint14", &wr, this),
+ grid_point15(_("Control handle 15:"), _("Control handle 15"), "gridpoint15", &wr, this)
{
// register all your parameters here, so Inkscape knows which parameters this effect has:
diff --git a/src/live_effects/lpe-line_segment.cpp b/src/live_effects/lpe-line_segment.cpp
index f0d5bab0a..6619b85ce 100644
--- a/src/live_effects/lpe-line_segment.cpp
+++ b/src/live_effects/lpe-line_segment.cpp
@@ -31,7 +31,7 @@ static const Util::EnumDataConverter<EndType> EndTypeConverter(EndTypeData, size
LPELineSegment::LPELineSegment(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
- end_type(_("End type"), _("Determines on which side the line or line segment is infinite."), "end_type", EndTypeConverter, &wr, this, END_OPEN_BOTH)
+ end_type(_("End type:"), _("Determines on which side the line or line segment is infinite."), "end_type", EndTypeConverter, &wr, this, END_OPEN_BOTH)
{
/* register all your parameters here, so Inkscape knows which parameters this effect has: */
registerParameter( dynamic_cast<Parameter *>(&end_type) );
diff --git a/src/live_effects/lpe-mirror_symmetry.cpp b/src/live_effects/lpe-mirror_symmetry.cpp
index 7bfaf2d99..a56909338 100644
--- a/src/live_effects/lpe-mirror_symmetry.cpp
+++ b/src/live_effects/lpe-mirror_symmetry.cpp
@@ -30,7 +30,7 @@ namespace LivePathEffect {
LPEMirrorSymmetry::LPEMirrorSymmetry(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
discard_orig_path(_("Discard original path?"), _("Check this to only keep the mirrored part of the path"), "discard_orig_path", &wr, this, false),
- reflection_line(_("Reflection line"), _("Line which serves as 'mirror' for the reflection"), "reflection_line", &wr, this, "M0,0 L100,100")
+ reflection_line(_("Reflection line:"), _("Line which serves as 'mirror' for the reflection"), "reflection_line", &wr, this, "M0,0 L100,100")
{
show_orig_path = true;
diff --git a/src/live_effects/lpe-parallel.cpp b/src/live_effects/lpe-parallel.cpp
index 5638bf6de..4d4b0c17d 100644
--- a/src/live_effects/lpe-parallel.cpp
+++ b/src/live_effects/lpe-parallel.cpp
@@ -48,8 +48,8 @@ LPEParallel::LPEParallel(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
// initialise your parameters here:
offset_pt(_("Offset"), _("Adjust the offset"), "offset_pt", &wr, this),
- length_left(_("Length left"), _("Specifies the left end of the parallel"), "length-left", &wr, this, 150),
- length_right(_("Length right"), _("Specifies the right end of the parallel"), "length-right", &wr, this, 150)
+ length_left(_("Length left:"), _("Specifies the left end of the parallel"), "length-left", &wr, this, 150),
+ length_right(_("Length right:"), _("Specifies the right end of the parallel"), "length-right", &wr, this, 150)
{
show_orig_path = true;
_provides_knotholder_entities = true;
diff --git a/src/live_effects/lpe-path_length.cpp b/src/live_effects/lpe-path_length.cpp
index 1b9e7be48..d3edcda27 100644
--- a/src/live_effects/lpe-path_length.cpp
+++ b/src/live_effects/lpe-path_length.cpp
@@ -23,9 +23,9 @@ namespace LivePathEffect {
LPEPathLength::LPEPathLength(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
- scale(_("Scale"), _("Scaling factor"), "scale", &wr, this, 1.0),
+ scale(_("Scale:"), _("Scaling factor"), "scale", &wr, this, 1.0),
info_text(this),
- unit(_("Unit"), _("Unit"), "unit", &wr, this),
+ unit(_("Unit:"), _("Unit"), "unit", &wr, this),
display_unit(_("Display unit"), _("Print unit after path length"), "display_unit", &wr, this, true)
{
registerParameter(dynamic_cast<Parameter *>(&scale));
diff --git a/src/live_effects/lpe-perp_bisector.cpp b/src/live_effects/lpe-perp_bisector.cpp
index df7e18dcf..c528ef692 100644
--- a/src/live_effects/lpe-perp_bisector.cpp
+++ b/src/live_effects/lpe-perp_bisector.cpp
@@ -94,8 +94,8 @@ KnotHolderEntityRightEnd::knot_set(Geom::Point const &p, Geom::Point const &/*or
LPEPerpBisector::LPEPerpBisector(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
- length_left(_("Length left"), _("Specifies the left end of the bisector"), "length-left", &wr, this, 200),
- length_right(_("Length right"), _("Specifies the right end of the bisector"), "length-right", &wr, this, 200),
+ length_left(_("Length left:"), _("Specifies the left end of the bisector"), "length-left", &wr, this, 200),
+ length_right(_("Length right:"), _("Specifies the right end of the bisector"), "length-right", &wr, this, 200),
A(0,0), B(0,0), M(0,0), C(0,0), D(0,0), perp_dir(0,0)
{
show_orig_path = true;
diff --git a/src/live_effects/lpe-powerstroke.cpp b/src/live_effects/lpe-powerstroke.cpp
index 13fea76c5..b042f8d41 100644
--- a/src/live_effects/lpe-powerstroke.cpp
+++ b/src/live_effects/lpe-powerstroke.cpp
@@ -157,7 +157,7 @@ static int circle_circle_intersection(Circle const &circle0, Circle const &circl
* Find circle that touches inside of the curve, with radius matching the curvature, at time value \c t.
* Because this method internally uses unitTangentAt, t should be smaller than 1.0 (see unitTangentAt).
*/
-Circle touching_circle( D2<SBasis> const &curve, double t, double tol=0.01 )
+static Circle touching_circle( D2<SBasis> const &curve, double t, double tol=0.01 )
{
//Piecewise<SBasis> k = curvature(curve, tol);
D2<SBasis> dM=derivative(curve);
diff --git a/src/live_effects/lpe-recursiveskeleton.cpp b/src/live_effects/lpe-recursiveskeleton.cpp
index cd1140950..906c430c1 100644
--- a/src/live_effects/lpe-recursiveskeleton.cpp
+++ b/src/live_effects/lpe-recursiveskeleton.cpp
@@ -27,7 +27,7 @@ namespace LivePathEffect {
LPERecursiveSkeleton::LPERecursiveSkeleton(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
- iterations(_("Iterations"), _("recursivity"), "iterations", &wr, this, 2)
+ iterations(_("Iterations:"), _("recursivity"), "iterations", &wr, this, 2)
{
show_orig_path = true;
concatenate_before_pwd2 = true;
diff --git a/src/live_effects/lpe-tangent_to_curve.cpp b/src/live_effects/lpe-tangent_to_curve.cpp
index d76675467..b40d404ae 100644
--- a/src/live_effects/lpe-tangent_to_curve.cpp
+++ b/src/live_effects/lpe-tangent_to_curve.cpp
@@ -58,10 +58,10 @@ public:
LPETangentToCurve::LPETangentToCurve(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
- angle(_("Angle"), _("Additional angle between tangent and curve"), "angle", &wr, this, 0.0),
- t_attach(_("Location along curve"), _("Location of the point of attachment along the curve (between 0.0 and number-of-segments)"), "t_attach", &wr, this, 0.5),
- length_left(_("Length left"), _("Specifies the left end of the tangent"), "length-left", &wr, this, 150),
- length_right(_("Length right"), _("Specifies the right end of the tangent"), "length-right", &wr, this, 150)
+ angle(_("Angle:"), _("Additional angle between tangent and curve"), "angle", &wr, this, 0.0),
+ t_attach(_("Location along curve:"), _("Location of the point of attachment along the curve (between 0.0 and number-of-segments)"), "t_attach", &wr, this, 0.5),
+ length_left(_("Length left:"), _("Specifies the left end of the tangent"), "length-left", &wr, this, 150),
+ length_right(_("Length right:"), _("Specifies the right end of the tangent"), "length-right", &wr, this, 150)
{
show_orig_path = true;
_provides_knotholder_entities = true;
diff --git a/src/live_effects/lpe-test-doEffect-stack.cpp b/src/live_effects/lpe-test-doEffect-stack.cpp
index b678e35c1..03e3e7997 100644
--- a/src/live_effects/lpe-test-doEffect-stack.cpp
+++ b/src/live_effects/lpe-test-doEffect-stack.cpp
@@ -19,9 +19,9 @@ namespace LivePathEffect {
LPEdoEffectStackTest::LPEdoEffectStackTest(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
- step(_("Stack step"), ("How deep we should go into the stack"), "step", &wr, this),
- point(_("point param"), "tooltip of point parameter", "point_param", &wr, this),
- path(_("path param"), "tooltip of path parameter", "path_param", &wr, this,"M 0,100 100,0")
+ step(_("Stack step:"), ("How deep we should go into the stack"), "step", &wr, this),
+ point(_("Point param:"), "tooltip of point parameter", "point_param", &wr, this),
+ path(_("Path param:"), "tooltip of path parameter", "path_param", &wr, this,"M 0,100 100,0")
{
registerParameter( dynamic_cast<Parameter *>(&step) );
registerParameter( dynamic_cast<Parameter *>(&point) );
diff --git a/src/live_effects/lpe-text_label.cpp b/src/live_effects/lpe-text_label.cpp
index b59722566..602a6897c 100644
--- a/src/live_effects/lpe-text_label.cpp
+++ b/src/live_effects/lpe-text_label.cpp
@@ -20,7 +20,7 @@ namespace LivePathEffect {
LPETextLabel::LPETextLabel(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
- label(_("Label"), _("Text label attached to the path"), "label", &wr, this, "This is a label")
+ label(_("Label:"), _("Text label attached to the path"), "label", &wr, this, "This is a label")
{
registerParameter( dynamic_cast<Parameter *>(&label) );
}
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
index ec7782302..8fd8eb4e3 100644
--- a/src/ui/CMakeLists.txt
+++ b/src/ui/CMakeLists.txt
@@ -60,6 +60,7 @@ set(ui_SRC
dialog/print-colors-preview-dialog.cpp
dialog/print.cpp
dialog/scriptdialog.cpp
+ dialog/symbols.cpp
dialog/xml-tree.cpp
# dialog/session-player.cpp
dialog/spellcheck.cpp
@@ -174,6 +175,7 @@ set(ui_SRC
dialog/spellcheck.h
dialog/svg-fonts-dialog.h
dialog/swatches.h
+ dialog/symbols.h
dialog/text-edit.h
dialog/tile.h
dialog/tracedialog.h
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index 9f18cc671..1d1429c40 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -317,17 +317,11 @@ sp_desktop_widget_class_init (SPDesktopWidgetClass *klass)
*/
void SPDesktopWidget::init( SPDesktopWidget *dtw )
{
- GtkWidget *widget;
- GtkWidget *tbl;
- GtkWidget *canvas_tbl;
-
- GtkWidget *eventbox;
-
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
new (&dtw->modified_connection) sigc::connection();
- widget = GTK_WIDGET (dtw);
+ GtkWidget *widget = GTK_WIDGET (dtw);
dtw->window = 0;
dtw->desktop = NULL;
@@ -365,6 +359,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
#else
dtw->hbox = gtk_hbox_new(FALSE, 0);
#endif
+
gtk_box_pack_end( GTK_BOX (dtw->vbox), dtw->hbox, TRUE, TRUE, 0 );
gtk_widget_show(dtw->hbox);
@@ -382,24 +377,42 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
ToolboxFactory::setOrientation( dtw->tool_toolbox, GTK_ORIENTATION_VERTICAL );
gtk_box_pack_start( GTK_BOX(dtw->hbox), dtw->tool_toolbox, FALSE, TRUE, 0 );
- tbl = gtk_table_new (2, 3, FALSE);
- gtk_box_pack_start( GTK_BOX(dtw->hbox), tbl, TRUE, TRUE, 1 );
-
- canvas_tbl = gtk_table_new (3, 3, FALSE);
-
/* Horizontal ruler */
- eventbox = gtk_event_box_new ();
+ GtkWidget *eventbox = gtk_event_box_new ();
dtw->hruler = sp_ruler_new(GTK_ORIENTATION_HORIZONTAL);
dtw->hruler_box = eventbox;
sp_ruler_set_metric(SP_RULER(dtw->hruler), SP_PT);
gtk_widget_set_tooltip_text (dtw->hruler_box, gettext(sp_unit_get_plural (&sp_unit_get_by_id(SP_UNIT_PT))));
gtk_container_add (GTK_CONTAINER (eventbox), dtw->hruler);
- gtk_table_attach (GTK_TABLE (canvas_tbl), eventbox, 1, 2, 0, 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(GTK_FILL),
- gtk_widget_get_style(widget)->xthickness, 0);
+ guint xthickness = gtk_widget_get_style(widget)->xthickness;
+ guint ythickness = gtk_widget_get_style(widget)->ythickness;
g_signal_connect (G_OBJECT (eventbox), "button_press_event", G_CALLBACK (sp_dt_hruler_event), dtw);
g_signal_connect (G_OBJECT (eventbox), "button_release_event", G_CALLBACK (sp_dt_hruler_event), dtw);
g_signal_connect (G_OBJECT (eventbox), "motion_notify_event", G_CALLBACK (sp_dt_hruler_event), dtw);
+#if GTK_CHECK_VERSION(3,0,0)
+ GtkWidget *tbl = gtk_grid_new();
+ GtkWidget *canvas_tbl = gtk_grid_new();
+
+ gtk_widget_set_margin_left(eventbox, xthickness);
+ gtk_widget_set_margin_right(eventbox, xthickness);
+
+ gtk_widget_set_halign(eventbox, GTK_ALIGN_FILL);
+ gtk_widget_set_hexpand(eventbox, TRUE);
+ gtk_widget_set_valign(eventbox, GTK_ALIGN_START);
+
+ gtk_grid_attach(GTK_GRID(canvas_tbl), eventbox, 1, 0, 1, 1);
+#else
+ GtkWidget *tbl = gtk_table_new(2, 3, FALSE);
+ GtkWidget *canvas_tbl = gtk_table_new(3, 3, FALSE);
+
+ gtk_table_attach(GTK_TABLE (canvas_tbl), eventbox, 1, 2, 0, 1,
+ GTK_FILL, GTK_FILL,
+ xthickness, 0);
+#endif
+
+ gtk_box_pack_start( GTK_BOX(dtw->hbox), tbl, TRUE, TRUE, 1 );
+
/* Vertical ruler */
eventbox = gtk_event_box_new ();
dtw->vruler = sp_ruler_new(GTK_ORIENTATION_VERTICAL);
@@ -407,28 +420,45 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
sp_ruler_set_metric (SP_RULER (dtw->vruler), SP_PT);
gtk_widget_set_tooltip_text (dtw->vruler_box, gettext(sp_unit_get_plural (&sp_unit_get_by_id(SP_UNIT_PT))));
gtk_container_add (GTK_CONTAINER (eventbox), GTK_WIDGET (dtw->vruler));
- gtk_table_attach (GTK_TABLE (canvas_tbl), eventbox, 0, 1, 1, 2, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(GTK_FILL), 0,
- gtk_widget_get_style(widget)->ythickness);
+
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_margin_top(eventbox, ythickness);
+ gtk_widget_set_margin_bottom(eventbox, ythickness);
+
+ gtk_widget_set_halign(eventbox, GTK_ALIGN_START);
+ gtk_widget_set_valign(eventbox, GTK_ALIGN_FILL);
+ gtk_widget_set_vexpand(eventbox, TRUE);
+
+ gtk_grid_attach(GTK_GRID(canvas_tbl), eventbox, 0, 1, 1, 1);
+#else
+ gtk_table_attach(GTK_TABLE (canvas_tbl), eventbox, 0, 1, 1, 2,
+ GTK_FILL, GTK_FILL,
+ 0, ythickness);
+#endif
+
g_signal_connect (G_OBJECT (eventbox), "button_press_event", G_CALLBACK (sp_dt_vruler_event), dtw);
g_signal_connect (G_OBJECT (eventbox), "button_release_event", G_CALLBACK (sp_dt_vruler_event), dtw);
g_signal_connect (G_OBJECT (eventbox), "motion_notify_event", G_CALLBACK (sp_dt_vruler_event), dtw);
- /* Horizontal scrollbar */
+ // Horizontal scrollbar
dtw->hadj = (GtkAdjustment *) gtk_adjustment_new (0.0, -4000.0, 4000.0, 10.0, 100.0, 4.0);
-#if GTK_CHECK_VERSION(3,0,0)
- dtw->hscrollbar = gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (dtw->hadj));
-#else
- dtw->hscrollbar = gtk_hscrollbar_new (GTK_ADJUSTMENT (dtw->hadj));
-#endif
- gtk_table_attach (GTK_TABLE (canvas_tbl), dtw->hscrollbar, 1, 2, 2, 3, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(GTK_SHRINK), 0, 0);
- /* Vertical scrollbar and the sticky zoom button */
#if GTK_CHECK_VERSION(3,0,0)
+ dtw->hscrollbar = gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (dtw->hadj));
+ gtk_widget_set_halign(dtw->hscrollbar, GTK_ALIGN_FILL);
+ gtk_widget_set_hexpand(dtw->hscrollbar, TRUE);
+ gtk_grid_attach(GTK_GRID(canvas_tbl), dtw->hscrollbar, 1, 2, 1, 1);
dtw->vscrollbar_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_box_set_homogeneous(GTK_BOX(dtw->vscrollbar_box), FALSE);
#else
+ dtw->hscrollbar = gtk_hscrollbar_new (GTK_ADJUSTMENT (dtw->hadj));
+ gtk_table_attach(GTK_TABLE (canvas_tbl), dtw->hscrollbar, 1, 2, 2, 3,
+ GTK_FILL, GTK_SHRINK,
+ 0, 0);
dtw->vscrollbar_box = gtk_vbox_new (FALSE, 0);
#endif
+
+ // Sticky zoom button
dtw->sticky_zoom = sp_button_new_from_data ( Inkscape::ICON_SIZE_DECORATION,
SP_BUTTON_TYPE_TOGGLE,
NULL,
@@ -437,15 +467,27 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dtw->sticky_zoom), prefs->getBool("/options/stickyzoom/value"));
gtk_box_pack_start (GTK_BOX (dtw->vscrollbar_box), dtw->sticky_zoom, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (dtw->sticky_zoom), "toggled", G_CALLBACK (sp_dtw_sticky_zoom_toggled), dtw);
+
+ // Vertical scrollbar
dtw->vadj = (GtkAdjustment *) gtk_adjustment_new (0.0, -4000.0, 4000.0, 10.0, 100.0, 4.0);
+
#if GTK_CHECK_VERSION(3,0,0)
dtw->vscrollbar = gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, GTK_ADJUSTMENT(dtw->vadj));
#else
dtw->vscrollbar = gtk_vscrollbar_new (GTK_ADJUSTMENT (dtw->vadj));
#endif
+
gtk_box_pack_start (GTK_BOX (dtw->vscrollbar_box), dtw->vscrollbar, TRUE, TRUE, 0);
- gtk_table_attach (GTK_TABLE (canvas_tbl), dtw->vscrollbar_box, 2, 3, 0, 2, (GtkAttachOptions)(GTK_SHRINK), (GtkAttachOptions)(GTK_FILL), 0, 0);
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_valign(dtw->vscrollbar, GTK_ALIGN_FILL);
+ gtk_widget_set_vexpand(dtw->vscrollbar, TRUE);
+ gtk_grid_attach(GTK_GRID(canvas_tbl), dtw->vscrollbar_box, 2, 0, 1, 2);
+#else
+ gtk_table_attach(GTK_TABLE(canvas_tbl), dtw->vscrollbar_box, 2, 3, 0, 2,
+ GTK_SHRINK, GTK_FILL,
+ 0, 0);
+#endif
gchar const* tip = "";
Inkscape::Verb* verb = Inkscape::Verb::get( SP_VERB_VIEW_CMS_TOGGLE );
@@ -476,7 +518,16 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
#else
cms_adjust_set_sensitive(dtw, FALSE);
#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
- gtk_table_attach( GTK_TABLE(canvas_tbl), dtw->cms_adjust, 2, 3, 2, 3, (GtkAttachOptions)(GTK_SHRINK), (GtkAttachOptions)(GTK_SHRINK), 0, 0);
+
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_grid_attach( GTK_GRID(canvas_tbl), dtw->cms_adjust, 2, 2, 1, 1);
+#else
+ gtk_table_attach( GTK_TABLE(canvas_tbl), dtw->cms_adjust, 2, 3, 2, 3,
+ (GtkAttachOptions)(GTK_SHRINK),
+ (GtkAttachOptions)(GTK_SHRINK),
+ 0, 0);
+#endif
+
{
if (!watcher) {
watcher = new CMSPrefWatcher();
@@ -500,17 +551,24 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
GtkStyle *style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(dtw->canvas)));
style->bg[GTK_STATE_NORMAL] = style->white;
gtk_widget_set_style (GTK_WIDGET (dtw->canvas), style);
-#endif
-
+
// TODO: Extension event stuff has been removed from public API in GTK+ 3
// Need to check that this hasn't broken anything
-#if !GTK_CHECK_VERSION(3,0,0)
if ( prefs->getBool("/options/useextinput/value", true) )
gtk_widget_set_extension_events(GTK_WIDGET (dtw->canvas) , GDK_EXTENSION_EVENTS_ALL); //set extension events for tablets, unless disabled in preferences
#endif
g_signal_connect (G_OBJECT (dtw->canvas), "event", G_CALLBACK (sp_desktop_widget_event), dtw);
+
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_halign(GTK_WIDGET(dtw->canvas), GTK_ALIGN_FILL);
+ gtk_widget_set_valign(GTK_WIDGET(dtw->canvas), GTK_ALIGN_FILL);
+ gtk_widget_set_hexpand(GTK_WIDGET(dtw->canvas), TRUE);
+ gtk_widget_set_vexpand(GTK_WIDGET(dtw->canvas), TRUE);
+ gtk_grid_attach(GTK_GRID(canvas_tbl), GTK_WIDGET(dtw->canvas), 1, 1, 1, 1);
+#else
gtk_table_attach (GTK_TABLE (canvas_tbl), GTK_WIDGET(dtw->canvas), 1, 2, 1, 2, (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), 0, 0);
+#endif
/* Dock */
bool create_dock =
@@ -530,12 +588,28 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
paned_class->cycle_handle_focus = NULL;
}
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_hexpand(GTK_WIDGET(paned->gobj()), TRUE);
+ gtk_widget_set_vexpand(GTK_WIDGET(paned->gobj()), TRUE);
+ gtk_widget_set_halign(GTK_WIDGET(paned->gobj()), GTK_ALIGN_FILL);
+ gtk_widget_set_valign(GTK_WIDGET(paned->gobj()), GTK_ALIGN_FILL);
+ gtk_grid_attach(GTK_GRID(tbl), GTK_WIDGET (paned->gobj()), 1, 1, 1, 1);
+#else
gtk_table_attach (GTK_TABLE (tbl), GTK_WIDGET (paned->gobj()), 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
(GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
+#endif
} else {
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_hexpand(GTK_WIDGET(canvas_tbl), TRUE);
+ gtk_widget_set_vexpand(GTK_WIDGET(canvas_tbl), TRUE);
+ gtk_widget_set_halign(GTK_WIDGET(canvas_tbl), GTK_ALIGN_FILL);
+ gtk_widget_set_valign(GTK_WIDGET(canvas_tbl), GTK_ALIGN_FILL);
+ gtk_grid_attach(GTK_GRID(tbl), GTK_WIDGET (canvas_tbl), 1, 1, 1, 1);
+#else
gtk_table_attach (GTK_TABLE (tbl), GTK_WIDGET (canvas_tbl), 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
(GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
+#endif
}
dtw->selected_style = new Inkscape::UI::Widget::SelectedStyle(true);
@@ -573,35 +647,66 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
dtw->zoom_update = g_signal_connect (G_OBJECT (dtw->zoom_status), "populate_popup", G_CALLBACK (sp_dtw_zoom_populate_popup), dtw);
// cursor coordinates
- dtw->coord_status = gtk_table_new (5, 2, FALSE);
+#if GTK_CHECK_VERSION(3,0,0)
+ dtw->coord_status = gtk_grid_new();
+ gtk_grid_set_row_spacing(GTK_GRID(dtw->coord_status), 0);
+ gtk_grid_set_column_spacing(GTK_GRID(dtw->coord_status), 2);
+ GtkWidget* sep = gtk_separator_new(GTK_ORIENTATION_VERTICAL);
+ gtk_grid_attach(GTK_GRID(dtw->coord_status),
+ GTK_WIDGET(sep),
+ 0, 0, 1, 2);
+#else
+ dtw->coord_status = gtk_table_new(5, 2, FALSE);
gtk_table_set_row_spacings(GTK_TABLE(dtw->coord_status), 0);
gtk_table_set_col_spacings(GTK_TABLE(dtw->coord_status), 2);
gtk_table_attach(GTK_TABLE(dtw->coord_status),
-#if GTK_CHECK_VERSION(3,0,0)
- gtk_separator_new(GTK_ORIENTATION_VERTICAL),
-#else
gtk_vseparator_new(),
+ 0, 1, 0, 2,
+ GTK_FILL, GTK_FILL, 0, 0);
#endif
- 0,1, 0,2, GTK_FILL, GTK_FILL, 0, 0);
+
eventbox = gtk_event_box_new ();
gtk_container_add (GTK_CONTAINER (eventbox), dtw->coord_status);
gtk_widget_set_tooltip_text (eventbox, _("Cursor coordinates"));
GtkWidget *label_x = gtk_label_new(_("X:"));
gtk_misc_set_alignment (GTK_MISC(label_x), 0.0, 0.5);
+
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_grid_attach(GTK_GRID(dtw->coord_status),
+ label_x, 1, 0, 1, 1);
+#else
gtk_table_attach(GTK_TABLE(dtw->coord_status), label_x, 1,2, 0,1, GTK_FILL, GTK_FILL, 0, 0);
+#endif
+
GtkWidget *label_y = gtk_label_new(_("Y:"));
gtk_misc_set_alignment (GTK_MISC(label_y), 0.0, 0.5);
+
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_grid_attach(GTK_GRID(dtw->coord_status), label_y, 1, 1, 1, 1);
+#else
gtk_table_attach(GTK_TABLE(dtw->coord_status), label_y, 1,2, 1,2, GTK_FILL, GTK_FILL, 0, 0);
+#endif
+
dtw->coord_status_x = gtk_label_new(NULL);
gtk_label_set_markup( GTK_LABEL(dtw->coord_status_x), "<tt> 0.00 </tt>" );
gtk_misc_set_alignment (GTK_MISC(dtw->coord_status_x), 1.0, 0.5);
dtw->coord_status_y = gtk_label_new(NULL);
gtk_label_set_markup( GTK_LABEL(dtw->coord_status_y), "<tt> 0.00 </tt>" );
gtk_misc_set_alignment (GTK_MISC(dtw->coord_status_y), 1.0, 0.5);
+ GtkWidget* label_z = gtk_label_new(_("Z:"));
+
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_grid_attach(GTK_GRID(dtw->coord_status), dtw->coord_status_x, 2, 0, 1, 1);
+ gtk_grid_attach(GTK_GRID(dtw->coord_status), dtw->coord_status_y, 2, 1, 1, 1);
+ gtk_grid_attach(GTK_GRID(dtw->coord_status), label_z, 3, 0, 1, 2);
+ gtk_grid_attach(GTK_GRID(dtw->coord_status), dtw->zoom_status, 4, 0, 1, 2);
+#else
gtk_table_attach(GTK_TABLE(dtw->coord_status), dtw->coord_status_x, 2,3, 0,1, GTK_FILL, GTK_FILL, 0, 0);
gtk_table_attach(GTK_TABLE(dtw->coord_status), dtw->coord_status_y, 2,3, 1,2, GTK_FILL, GTK_FILL, 0, 0);
- gtk_table_attach(GTK_TABLE(dtw->coord_status), gtk_label_new(_("Z:")), 3,4, 0,2, GTK_FILL, GTK_FILL, 0, 0);
+ gtk_table_attach(GTK_TABLE(dtw->coord_status), label_z, 3,4, 0,2, GTK_FILL, GTK_FILL, 0, 0);
gtk_table_attach(GTK_TABLE(dtw->coord_status), dtw->zoom_status, 4,5, 0,2, GTK_FILL, GTK_FILL, 0, 0);
+#endif
+
sp_set_font_size_smaller (dtw->coord_status);
gtk_box_pack_end (GTK_BOX (statusbar_tail), eventbox, FALSE, FALSE, 1);
diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp
index dffda69e3..65608585b 100644
--- a/src/widgets/gradient-selector.cpp
+++ b/src/widgets/gradient-selector.cpp
@@ -336,6 +336,14 @@ void SPGradientSelector::onTreeSelection()
return;
}
+ if (!treeview->has_focus()) {
+ /* Workaround for GTK bug on Windows/OS X
+ * When the treeview initially doesn't have focus and is clicked
+ * sometimes get_selection()->signal_changed() has the wrong selection
+ */
+ treeview->grab_focus();
+ }
+
const Glib::RefPtr<Gtk::TreeSelection> sel = treeview->get_selection();
if (!sel) {
return;
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 6e03c2606..b758e4f0f 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -1423,8 +1423,13 @@ void setup_aux_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
GtkWidget* kludge = dataHolders[aux_toolboxes[i].type_name];
+#if GTK_CHECK_VERSION(3,0,0)
+ GtkWidget* holder = gtk_grid_new();
+ gtk_grid_attach( GTK_GRID(holder), kludge, 2, 0, 1, 1);
+#else
GtkWidget* holder = gtk_table_new( 1, 3, FALSE );
gtk_table_attach( GTK_TABLE(holder), kludge, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0 );
+#endif
gchar* tmp = g_strdup_printf( "/ui/%s", aux_toolboxes[i].ui_name );
GtkWidget* toolBar = gtk_ui_manager_get_widget( mgr, tmp );
@@ -1438,7 +1443,12 @@ void setup_aux_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
Inkscape::IconSize toolboxSize = ToolboxFactory::prefToSize("/toolbox/small");
gtk_toolbar_set_icon_size( GTK_TOOLBAR(toolBar), static_cast<GtkIconSize>(toolboxSize) );
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_hexpand(toolBar, TRUE);
+ gtk_grid_attach( GTK_GRID(holder), toolBar, 0, 0, 1, 1);
+#else
gtk_table_attach( GTK_TABLE(holder), toolBar, 0, 1, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0 );
+#endif
if ( aux_toolboxes[i].swatch_verb_id != SP_VERB_INVALID ) {
Inkscape::UI::Widget::StyleSwatch *swatch = new Inkscape::UI::Widget::StyleSwatch( NULL, _(aux_toolboxes[i].swatch_tip) );
@@ -1446,7 +1456,16 @@ void setup_aux_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
swatch->setClickVerb( aux_toolboxes[i].swatch_verb_id );
swatch->setWatchedTool( aux_toolboxes[i].swatch_tool, true );
GtkWidget *swatch_ = GTK_WIDGET( swatch->gobj() );
+
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_margin_left(swatch_, AUX_BETWEEN_BUTTON_GROUPS);
+ gtk_widget_set_margin_right(swatch_, AUX_BETWEEN_BUTTON_GROUPS);
+ gtk_widget_set_margin_top(swatch_, AUX_SPACING);
+ gtk_widget_set_margin_bottom(swatch_, AUX_SPACING);
+ gtk_grid_attach( GTK_GRID(holder), swatch_, 1, 0, 1, 1);
+#else
gtk_table_attach( GTK_TABLE(holder), swatch_, 1, 2, 0, 1, (GtkAttachOptions)(GTK_SHRINK | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), AUX_BETWEEN_BUTTON_GROUPS, AUX_SPACING );
+#endif
}
gtk_widget_show_all( holder );