summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-11-09 05:13:46 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-11-09 05:13:46 +0000
commit4b236f3f1e3fe5374e18dac9e6c35567d9dc0995 (patch)
treed6a8f361b37294feb8da05c2ce61271e5137a237 /src/ui
parentRemove FIXME from refactoring (diff)
parentFix bug in previous commit. Add test against it (diff)
downloadinkscape-4b236f3f1e3fe5374e18dac9e6c35567d9dc0995.tar.gz
inkscape-4b236f3f1e3fe5374e18dac9e6c35567d9dc0995.zip
Update to trunk r13690
(bzr r13341.5.22)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/Makefile_insert2
-rw-r--r--src/ui/dialog/export.cpp2
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp5
-rw-r--r--src/ui/dialog/lpe-fillet-chamfer-properties.cpp32
-rw-r--r--src/ui/dialog/lpe-fillet-chamfer-properties.h3
-rw-r--r--src/ui/dialog/lpe-powerstroke-properties.cpp2
-rw-r--r--src/ui/dialog/objects.cpp2
-rw-r--r--src/ui/dialog/tags.cpp7
-rw-r--r--src/ui/tool/path-manipulator.cpp5
-rw-r--r--src/ui/tools/node-tool.cpp10
-rw-r--r--src/ui/tools/select-tool.cpp2
-rw-r--r--src/ui/widget/addtoicon.cpp13
-rw-r--r--src/ui/widget/clipmaskicon.cpp13
-rw-r--r--src/ui/widget/highlight-picker.cpp13
-rw-r--r--src/ui/widget/insertordericon.cpp13
-rw-r--r--src/ui/widget/registered-widget.cpp2
16 files changed, 70 insertions, 56 deletions
diff --git a/src/ui/dialog/Makefile_insert b/src/ui/dialog/Makefile_insert
index 26a59ce2c..cbdae1cb0 100644
--- a/src/ui/dialog/Makefile_insert
+++ b/src/ui/dialog/Makefile_insert
@@ -101,7 +101,7 @@ ink_common_sources += \
ui/dialog/template-widget.cpp \
ui/dialog/template-widget.h \
ui/dialog/tags.cpp \
- ui/dialpg/tags.h \
+ ui/dialog/tags.h \
ui/dialog/text-edit.cpp \
ui/dialog/text-edit.h \
ui/dialog/tile.cpp \
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 6d5d894ef..ba30c8e6b 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -537,7 +537,7 @@ Gtk::Adjustment * Export::createSpinbutton( gchar const * /*key*/, float val, fl
sb->set_sensitive (sensitive);
pos++;
- if (!ll.empty()) {
+ if (l) {
l->set_mnemonic_widget(*sb);
}
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index e113b325f..87b698673 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -234,6 +234,9 @@ static void StyleFromSelectionToTool(Glib::ustring const &prefs_path, StyleSwatc
if (!css) return;
+ // remove black-listed properties
+ css = sp_css_attr_unset_blacklist (css);
+
// only store text style for the text tool
if (prefs_path != "/tools/text") {
css = sp_css_attr_unset_text (css);
@@ -838,7 +841,7 @@ void InkscapePreferences::initPageIO()
_save_use_current_dir.init( _("Use current directory for \"Save As ...\""), "/dialogs/save_as/use_current_dir", true);
_page_io.add_line( false, "", _save_use_current_dir, "",
- _("When this option is on, the \"Save as...\" and \"Save a Copy\" dialogs will always open in the directory where the currently open document is; when it's off, each will open in the directory where you last saved a file using it"), true);
+ _("When this option is on, the \"Save as...\" and \"Save a Copy...\" dialogs will always open in the directory where the currently open document is; when it's off, each will open in the directory where you last saved a file using it"), true);
_misc_comment.init( _("Add label comments to printing output"), "/printing/debug/show-label-comments", false);
_page_io.add_line( false, "", _misc_comment, "",
diff --git a/src/ui/dialog/lpe-fillet-chamfer-properties.cpp b/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
index ad8b66b8c..fa909924d 100644
--- a/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
+++ b/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
@@ -46,7 +46,7 @@ FilletChamferPropertiesDialog::FilletChamferPropertiesDialog()
Gtk::Box *mainVBox = get_vbox();
mainVBox->set_homogeneous(false);
_layout_table.set_spacings(4);
- _layout_table.resize(2, 2);
+ _layout_table.resize(3, 3);
// Layer name widgets
_fillet_chamfer_position_numeric.set_digits(4);
@@ -61,20 +61,30 @@ FilletChamferPropertiesDialog::FilletChamferPropertiesDialog()
Gtk::FILL);
_layout_table.attach(_fillet_chamfer_position_numeric, 1, 2, 0, 1,
Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
+ _fillet_chamfer_chamfer_subdivisions.set_digits(0);
+ _fillet_chamfer_chamfer_subdivisions.set_increments(1,1);
+ //todo: get tha max aloable infinity freeze the widget
+ _fillet_chamfer_chamfer_subdivisions.set_range(0, 999999999999999999);
+
+ _fillet_chamfer_chamfer_subdivisions_label.set_label(_("Chamfer subdivisions:"));
+ _fillet_chamfer_chamfer_subdivisions_label.set_alignment(1.0, 0.5);
+
+ _layout_table.attach(_fillet_chamfer_chamfer_subdivisions_label, 0, 1, 1, 2, Gtk::FILL,
+ Gtk::FILL);
+ _layout_table.attach(_fillet_chamfer_chamfer_subdivisions, 1, 2, 1, 2,
+ Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
_fillet_chamfer_type_fillet.set_label(_("Fillet"));
_fillet_chamfer_type_fillet.set_group(_fillet_chamfer_type_group);
_fillet_chamfer_type_inverse_fillet.set_label(_("Inverse fillet"));
_fillet_chamfer_type_inverse_fillet.set_group(_fillet_chamfer_type_group);
_fillet_chamfer_type_chamfer.set_label(_("Chamfer"));
_fillet_chamfer_type_chamfer.set_group(_fillet_chamfer_type_group);
- _fillet_chamfer_type_double_chamfer.set_label(_("Double chamfer"));
- _fillet_chamfer_type_double_chamfer.set_group(_fillet_chamfer_type_group);
+
mainVBox->pack_start(_layout_table, true, true, 4);
mainVBox->pack_start(_fillet_chamfer_type_fillet, true, true, 4);
mainVBox->pack_start(_fillet_chamfer_type_inverse_fillet, true, true, 4);
mainVBox->pack_start(_fillet_chamfer_type_chamfer, true, true, 4);
- mainVBox->pack_start(_fillet_chamfer_type_double_chamfer, true, true, 4);
// Buttons
_close_button.set_use_stock(true);
@@ -146,10 +156,8 @@ void FilletChamferPropertiesDialog::_apply()
d_width = 1;
} else if (_fillet_chamfer_type_inverse_fillet.get_active() == true) {
d_width = 2;
- } else if (_fillet_chamfer_type_chamfer.get_active() == true) {
- d_width = 3;
} else {
- d_width = 4;
+ d_width = _fillet_chamfer_chamfer_subdivisions.get_value() + 3;
}
if (_flexible) {
if (d_pos > 99.99999 || d_pos < 0) {
@@ -177,7 +185,7 @@ void FilletChamferPropertiesDialog::_close()
);
}
-bool FilletChamferPropertiesDialog::_handleKeyEvent(GdkEventKey *event)
+bool FilletChamferPropertiesDialog::_handleKeyEvent(GdkEventKey * /*event*/)
{
return false;
}
@@ -194,7 +202,7 @@ void FilletChamferPropertiesDialog::_setKnotPoint(Geom::Point knotpoint)
double position;
std::string distance_or_radius = std::string(_("Radius "));
if(aprox){
- distance_or_radius = std::string(_("Radius aproximated "));
+ distance_or_radius = std::string(_("Radius approximated "));
}
if(use_distance){
distance_or_radius = std::string(_("Knot distance "));
@@ -218,10 +226,8 @@ void FilletChamferPropertiesDialog::_setKnotPoint(Geom::Point knotpoint)
_fillet_chamfer_type_fillet.set_active(true);
} else if (knotpoint.y() == 2) {
_fillet_chamfer_type_inverse_fillet.set_active(true);
- } else if (knotpoint.y() == 3) {
- _fillet_chamfer_type_chamfer.set_active(true);
- } else if (knotpoint.y() == 1) {
- _fillet_chamfer_type_double_chamfer.set_active(true);
+ } else if (knotpoint.y() >= 3) {
+ _fillet_chamfer_chamfer_subdivisions.set_value(knotpoint.y() - 3);
}
}
diff --git a/src/ui/dialog/lpe-fillet-chamfer-properties.h b/src/ui/dialog/lpe-fillet-chamfer-properties.h
index 47ff97b00..deae0cee0 100644
--- a/src/ui/dialog/lpe-fillet-chamfer-properties.h
+++ b/src/ui/dialog/lpe-fillet-chamfer-properties.h
@@ -46,7 +46,8 @@ protected:
Gtk::RadioButton _fillet_chamfer_type_fillet;
Gtk::RadioButton _fillet_chamfer_type_inverse_fillet;
Gtk::RadioButton _fillet_chamfer_type_chamfer;
- Gtk::RadioButton _fillet_chamfer_type_double_chamfer;
+ Gtk::Label _fillet_chamfer_chamfer_subdivisions_label;
+ Gtk::SpinButton _fillet_chamfer_chamfer_subdivisions;
Gtk::Table _layout_table;
bool _position_visible;
diff --git a/src/ui/dialog/lpe-powerstroke-properties.cpp b/src/ui/dialog/lpe-powerstroke-properties.cpp
index c34351511..55f938a48 100644
--- a/src/ui/dialog/lpe-powerstroke-properties.cpp
+++ b/src/ui/dialog/lpe-powerstroke-properties.cpp
@@ -152,7 +152,7 @@ PowerstrokePropertiesDialog::_close()
);
}
-bool PowerstrokePropertiesDialog::_handleKeyEvent(GdkEventKey *event)
+bool PowerstrokePropertiesDialog::_handleKeyEvent(GdkEventKey * /*event*/)
{
/*switch (get_group0_keyval(event)) {
diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp
index 93d5dfbd5..c95529a56 100644
--- a/src/ui/dialog/objects.cpp
+++ b/src/ui/dialog/objects.cpp
@@ -988,7 +988,7 @@ void ObjectsPanel::_storeHighlightTarget(const Gtk::TreeModel::iterator& iter)
/*
* Drap and drop within the tree
*/
-bool ObjectsPanel::_handleDragDrop(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time)
+bool ObjectsPanel::_handleDragDrop(const Glib::RefPtr<Gdk::DragContext>& /*context*/, int x, int y, guint /*time*/)
{
int cell_x = 0, cell_y = 0;
Gtk::TreeModel::Path target_path;
diff --git a/src/ui/dialog/tags.cpp b/src/ui/dialog/tags.cpp
index 127e4d95e..8a104d137 100644
--- a/src/ui/dialog/tags.cpp
+++ b/src/ui/dialog/tags.cpp
@@ -380,7 +380,7 @@ void TagsPanel::_objectsSelected( Selection *sel ) {
_checkTreeSelection();
}
-bool TagsPanel::_checkForSelected(const Gtk::TreePath &path, const Gtk::TreeIter& iter, SPObject* obj)
+bool TagsPanel::_checkForSelected(const Gtk::TreePath &/*path*/, const Gtk::TreeIter& iter, SPObject* obj)
{
Gtk::TreeModel::Row row = *iter;
SPObject * it = row[_model->_colObject];
@@ -393,6 +393,7 @@ bool TagsPanel::_checkForSelected(const Gtk::TreePath &path, const Gtk::TreeIter
return false;
}
+// TODO does not look good that we're ignoring the passed in root. Investigate.
void TagsPanel::_objectsChanged(SPObject* root)
{
while (!_objectWatchers.empty())
@@ -754,7 +755,7 @@ void TagsPanel::_storeDragSource(const Gtk::TreeModel::iterator& iter)
* Drap and drop within the tree
* Save the drag source and drop target SPObjects and if its a drag between layers or into (sublayer) a layer
*/
-bool TagsPanel::_handleDragDrop(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time)
+bool TagsPanel::_handleDragDrop(const Glib::RefPtr<Gdk::DragContext>& /*context*/, int x, int y, guint /*time*/)
{
int cell_x = 0, cell_y = 0;
Gtk::TreeModel::Path target_path;
@@ -885,7 +886,7 @@ void TagsPanel::_renameObject(Gtk::TreeModel::Row row, const Glib::ustring& name
}
}
-bool TagsPanel::_noSelection( Glib::RefPtr<Gtk::TreeModel> const & /*model*/, Gtk::TreeModel::Path const & /*path*/, bool currentlySelected )
+bool TagsPanel::_noSelection( Glib::RefPtr<Gtk::TreeModel> const & /*model*/, Gtk::TreeModel::Path const & /*path*/, bool /*currentlySelected*/ )
{
return false;
}
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index 52ff5d42c..8b99c33b8 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -59,7 +59,7 @@ enum PathChange {
const double handleCubicGap = 0.01;
const double noPower = 0.0;
const double defaultStartPower = 0.3334;
-const double defaultEndPower = 0.6667;
+
/**
* Notifies the path manipulator when something changes the path being edited
@@ -1000,7 +1000,6 @@ NodeList::iterator PathManipulator::subdivideSegment(NodeList::iterator first, d
n->front()->setPosition(seg2[1]);
n->setType(NODE_SMOOTH, false);
} else {
- const double handleCubicGap = 0.01;
Geom::D2< Geom::SBasis > SBasisInsideNodes;
SPCurve *lineInsideNodes = new SPCurve();
if(second->back()->isDegenerate()){
@@ -1251,7 +1250,6 @@ double PathManipulator::BSplineHandlePosition(Handle *h, Handle *h2){
h = h2;
}
double pos = noPower;
- const double handleCubicGap = 0.01;
Node *n = h->parent();
Node * nextNode = NULL;
nextNode = n->nodeToward(h);
@@ -1279,7 +1277,6 @@ Geom::Point PathManipulator::BSplineHandleReposition(Handle *h, Handle *h2){
Geom::Point PathManipulator::BSplineHandleReposition(Handle *h,double pos){
using Geom::X;
using Geom::Y;
- const double handleCubicGap = 0.01;
Geom::Point ret = h->position();
Node *n = h->parent();
Geom::D2< Geom::SBasis > SBasisInsideNodes;
diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp
index e2bb85d11..99d60e2b7 100644
--- a/src/ui/tools/node-tool.cpp
+++ b/src/ui/tools/node-tool.cpp
@@ -305,6 +305,16 @@ 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()*/) {
+ Inkscape::UI::ControlPointSelection::Set &selectionNodes = _selected_nodes->allPoints();
+ std::vector<Geom::Point> selectedNodesPositions;
+ for (Inkscape::UI::ControlPointSelection::Set::iterator i = selectionNodes.begin(); i != selectionNodes.end(); ++i) {
+ if ((*i)->selected()) {
+ Inkscape::UI::Node *n = dynamic_cast<Inkscape::UI::Node *>(*i);
+ selectedNodesPositions.push_back(desktop->doc2dt(n->position()));
+ }
+ }
+ lpe->setSelectedNodePoints(selectedNodesPositions);
+ lpe->setCurrentZoom(this->desktop->current_zoom());
SPCurve *c = new SPCurve();
SPCurve *cc = new SPCurve();
std::vector<Geom::PathVector> cs = lpe->getCanvasIndicators(SP_LPE_ITEM(selection->singleItem()));
diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp
index 21459e5d0..a8267ea1d 100644
--- a/src/ui/tools/select-tool.cpp
+++ b/src/ui/tools/select-tool.cpp
@@ -1153,7 +1153,7 @@ bool SelectTool::root_handler(GdkEvent* event) {
if (selection->singleItem()) {
SPItem *clicked_item = selection->singleItem();
SPGroup *clickedGroup = dynamic_cast<SPGroup *>(clicked_item);
- if ( (clickedGroup && (clickedGroup->layerMode() == SPGroup::LAYER)) || dynamic_cast<SPBox3D *>(clicked_item)) { // enter group or a 3D box
+ if ( (clickedGroup && (clickedGroup->layerMode() != SPGroup::LAYER)) || dynamic_cast<SPBox3D *>(clicked_item)) { // enter group or a 3D box
desktop->setCurrentLayer(clicked_item);
sp_desktop_selection(desktop)->clear();
} else {
diff --git a/src/ui/widget/addtoicon.cpp b/src/ui/widget/addtoicon.cpp
index ce665295b..0798d1c98 100644
--- a/src/ui/widget/addtoicon.cpp
+++ b/src/ui/widget/addtoicon.cpp
@@ -127,13 +127,12 @@ void AddToIcon::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
#endif
}
-bool
-AddToIcon::activate_vfunc(GdkEvent* event,
- Gtk::Widget& /*widget*/,
- const Glib::ustring& path,
- const Gdk::Rectangle& /*background_area*/,
- const Gdk::Rectangle& /*cell_area*/,
- Gtk::CellRendererState /*flags*/)
+bool AddToIcon::activate_vfunc(GdkEvent* /*event*/,
+ Gtk::Widget& /*widget*/,
+ const Glib::ustring& /*path*/,
+ const Gdk::Rectangle& /*background_area*/,
+ const Gdk::Rectangle& /*cell_area*/,
+ Gtk::CellRendererState /*flags*/)
{
return false;
}
diff --git a/src/ui/widget/clipmaskicon.cpp b/src/ui/widget/clipmaskicon.cpp
index 6331d70d8..943b1bebc 100644
--- a/src/ui/widget/clipmaskicon.cpp
+++ b/src/ui/widget/clipmaskicon.cpp
@@ -154,13 +154,12 @@ void ClipMaskIcon::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
#endif
}
-bool
-ClipMaskIcon::activate_vfunc(GdkEvent* event,
- Gtk::Widget& /*widget*/,
- const Glib::ustring& path,
- const Gdk::Rectangle& /*background_area*/,
- const Gdk::Rectangle& /*cell_area*/,
- Gtk::CellRendererState /*flags*/)
+bool ClipMaskIcon::activate_vfunc(GdkEvent* /*event*/,
+ Gtk::Widget& /*widget*/,
+ const Glib::ustring& /*path*/,
+ const Gdk::Rectangle& /*background_area*/,
+ const Gdk::Rectangle& /*cell_area*/,
+ Gtk::CellRendererState /*flags*/)
{
return false;
}
diff --git a/src/ui/widget/highlight-picker.cpp b/src/ui/widget/highlight-picker.cpp
index 8593f0bdf..09999b52d 100644
--- a/src/ui/widget/highlight-picker.cpp
+++ b/src/ui/widget/highlight-picker.cpp
@@ -147,13 +147,12 @@ void HighlightPicker::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
#endif
}
-bool
-HighlightPicker::activate_vfunc(GdkEvent* event,
- Gtk::Widget& /*widget*/,
- const Glib::ustring& path,
- const Gdk::Rectangle& /*background_area*/,
- const Gdk::Rectangle& /*cell_area*/,
- Gtk::CellRendererState /*flags*/)
+bool HighlightPicker::activate_vfunc(GdkEvent* /*event*/,
+ Gtk::Widget& /*widget*/,
+ const Glib::ustring& /*path*/,
+ const Gdk::Rectangle& /*background_area*/,
+ const Gdk::Rectangle& /*cell_area*/,
+ Gtk::CellRendererState /*flags*/)
{
return false;
}
diff --git a/src/ui/widget/insertordericon.cpp b/src/ui/widget/insertordericon.cpp
index a28b0f834..9aec7d135 100644
--- a/src/ui/widget/insertordericon.cpp
+++ b/src/ui/widget/insertordericon.cpp
@@ -135,13 +135,12 @@ void InsertOrderIcon::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
#endif
}
-bool
-InsertOrderIcon::activate_vfunc(GdkEvent* event,
- Gtk::Widget& /*widget*/,
- const Glib::ustring& path,
- const Gdk::Rectangle& /*background_area*/,
- const Gdk::Rectangle& /*cell_area*/,
- Gtk::CellRendererState /*flags*/)
+bool InsertOrderIcon::activate_vfunc(GdkEvent* /*event*/,
+ Gtk::Widget& /*widget*/,
+ const Glib::ustring& /*path*/,
+ const Gdk::Rectangle& /*background_area*/,
+ const Gdk::Rectangle& /*cell_area*/,
+ Gtk::CellRendererState /*flags*/)
{
return false;
}
diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp
index 44d8dcbf3..e97285de4 100644
--- a/src/ui/widget/registered-widget.cpp
+++ b/src/ui/widget/registered-widget.cpp
@@ -108,7 +108,7 @@ RegisteredToggleButton::~RegisteredToggleButton()
_toggled_connection.disconnect();
}
-RegisteredToggleButton::RegisteredToggleButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right, Inkscape::XML::Node* repr_in, SPDocument *doc_in, char const *active_str, char const *inactive_str)
+RegisteredToggleButton::RegisteredToggleButton (const Glib::ustring& /*label*/, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right, Inkscape::XML::Node* repr_in, SPDocument *doc_in, char const *active_str, char const *inactive_str)
: RegisteredWidget<Gtk::ToggleButton>()
, _active_str(active_str)
, _inactive_str(inactive_str)