summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: de4c26a)
raw | patch | inline | side by side (parent: de4c26a)
author | Jon A. Cruz <jon@joncruz.org> | |
Fri, 15 Jan 2010 01:02:46 +0000 (17:02 -0800) | ||
committer | Jon A. Cruz <jon@joncruz.org> | |
Fri, 15 Jan 2010 01:02:46 +0000 (17:02 -0800) |
14 files changed:
index 43f4b57251bec8fd65bda25bf23ab17fc7366532..1ea9ac506869e0faef6bfa6753575ed64b68f9e6 100644 (file)
}
void
-PathParam::param_editOncanvas(SPItem * item, SPDesktop * dt)
+PathParam::param_editOncanvas(SPItem * /*item*/, SPDesktop * dt)
{
using namespace Inkscape::UI;
void
PathParam::param_setup_nodepath(Inkscape::NodePath::Path *)
-{
+{
// TODO this method should not exist at all!
}
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp
index 11685e25ce6714b1d73d476a00233dd001289999..6396569e919298fbfe51514f8d58f87ddac96ed4 100644 (file)
--- a/src/object-snapper.cpp
+++ b/src/object-snapper.cpp
@@ -757,7 +757,12 @@ void Inkscape::ObjectSnapper::_getBorderNodes(std::vector<SnapCandidatePoint> *p
points->push_back(Inkscape::SnapCandidatePoint(Geom::Point(w,0), SNAPSOURCE_UNDEFINED, SNAPTARGET_PAGE_CORNER));
}
-void Inkscape::getBBoxPoints(Geom::OptRect const bbox, std::vector<SnapCandidatePoint> *points, bool const isTarget, bool const includeCorners, bool const includeLineMidpoints, bool const includeObjectMidpoints)
+void Inkscape::getBBoxPoints(Geom::OptRect const bbox,
+ std::vector<SnapCandidatePoint> *points,
+ bool const /*isTarget*/,
+ bool const includeCorners,
+ bool const includeLineMidpoints,
+ bool const includeObjectMidpoints)
{
if (bbox) {
// collect the corners of the bounding box
index d4978af3ba23d6da245a0b4350856483f8c98ad3..dfe47bee842f9b1b08aa2534c919099172723813 100644 (file)
return false;
}*/
-void sp_selection_edit_clip_or_mask(SPDesktop * dt, bool clip)
+void sp_selection_edit_clip_or_mask(SPDesktop * /*dt*/, bool /*clip*/)
{
return;
/*if (!dt) return;
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index fa4360137a9813f60a0d910e6b8078e63a01390f..7002c972356accbcd98339de0555e4fd78a99f13 100644 (file)
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
return NULL;
}
-void ShapeEditor::restore_nodepath_selection (GList *saved) {
+void ShapeEditor::restore_nodepath_selection (GList */*saved*/) {
// defunct stub
}
diff --git a/src/spray-context.cpp b/src/spray-context.cpp
index 40bfc041ecf560dd103f41b36e746319244abac3..dc5618eef5f674f6b849a3ed09f83bcde5c55b19 100644 (file)
--- a/src/spray-context.cpp
+++ b/src/spray-context.cpp
* @param[in] choice :
*/
-void random_position( double &radius, double &angle, double &a, double &s, int choice)
+void random_position( double &radius, double &angle, double &a, double &s, int /*choice*/)
{
// angle is taken from an uniform distribution
angle = g_random_double_range(0, M_PI*2.0);
diff --git a/src/text-context.cpp b/src/text-context.cpp
index fc28dc8e473bd66244e1e294b5ed31447e5cb193..4f89bd1e144bd5cf106425fa275a5f7d25e3b703 100644 (file)
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
Inkscape::Text::Layout const *layout = te_get_layout(tc->text);
int const nChars = layout->iteratorToCharIndex(layout->end());
- char *trunc = "";
+ char const *trunc = "";
bool truncated = false;
if (layout->inputTruncated()) {
truncated = true;
index 245feae1d2bed10e132a6c0090936822b74ec8e2..2a3498d7f8bdcd8b57151c0e82e38e9304f475ca 100644 (file)
}
void ControlPointSelection::_pointDragged(Geom::Point const &old_pos, Geom::Point &new_pos,
- GdkEventMotion *event)
+ GdkEventMotion */*event*/)
{
Geom::Point delta = new_pos - old_pos;
for (iterator i = _points.begin(); i != _points.end(); ++i) {
index 73dd0d19e8604a5c64657257340d0cb1fd8de800..941924e0a73041324021e5712df03d1170d397c7 100644 (file)
}
// re-routes events into the virtual function
-int ControlPoint::_event_handler(SPCanvasItem *item, GdkEvent *event, ControlPoint *point)
+int ControlPoint::_event_handler(SPCanvasItem */*item*/, GdkEvent *event, ControlPoint *point)
{
return point->_eventHandler(event) ? TRUE : FALSE;
}
index 4997c5ef4d07a797cef09d377e93818bfbc094fa..e59d6d5cfff64f9e09d9c21880a7b27c406973d1 100644 (file)
void _setPixbuf(Glib::RefPtr<Gdk::Pixbuf>);
/// @}
- virtual Glib::ustring _getTip(unsigned state) { return ""; }
- virtual Glib::ustring _getDragTip(GdkEventMotion *event) { return ""; }
+ virtual Glib::ustring _getTip(unsigned /*state*/) { return ""; }
+ virtual Glib::ustring _getDragTip(GdkEventMotion */*event*/) { return ""; }
virtual bool _hasDragTips() { return false; }
SPDesktop *const _desktop; ///< The desktop this control point resides on.
index 1823622596ab0e59979d91bb1d200816dcd973d9..dbd19c754f63dbf90de34c5da70cff2bfb47a40e 100644 (file)
sigc::mem_fun(*this, &CurveDragPoint::_doubleclickedHandler));
}
-void CurveDragPoint::_grabbedHandler(GdkEventMotion *event)
+void CurveDragPoint::_grabbedHandler(GdkEventMotion */*event*/)
{
_pm._selection.hideTransformHandles();
NodeList::iterator second = first.next();
// move the handles to 1/3 the length of the segment for line segments
if (first->front()->isDegenerate() && second->back()->isDegenerate()) {
-
+
// delta is a vector equal 1/3 of distance from first to second
Geom::Point delta = (second->position() - first->position()) / 3.0;
first->front()->move(first->front()->position() + delta);
second->back()->move(second->back()->position() - delta);
-
+
signal_update.emit();
}
}
NodeList::iterator inserted = _pm.subdivideSegment(first, _t);
_pm._selection.clear();
_pm._selection.insert(inserted.ptr());
-
+
signal_update.emit();
_pm._commit(_("Add node"));
return true;
index 1e98f0859b744cf8203093e4e63c8a4b1263545b..092ce7d872e48da70dca6dd3aad1d83e5f9fbbbd 100644 (file)
@@ -558,7 +558,7 @@ void ink_node_tool_select_area(InkNodeTool *nt, Geom::Rect const &sel, GdkEventB
nt->_selected_nodes->selectArea(sel);
}
}
-void ink_node_tool_select_point(InkNodeTool *nt, Geom::Point const &sel, GdkEventButton *event)
+void ink_node_tool_select_point(InkNodeTool *nt, Geom::Point const &/*sel*/, GdkEventButton *event)
{
using namespace Inkscape::UI; // pull in event helpers
if (!event) return;
@@ -574,14 +574,14 @@ void ink_node_tool_select_point(InkNodeTool *nt, Geom::Point const &sel, GdkEven
if (!(event->state & GDK_SHIFT_MASK)) {
selection->clear();
}
- return;
- }
- if (held_shift(*event)) {
- selection->toggle(item_clicked);
} else {
- selection->set(item_clicked);
+ if (held_shift(*event)) {
+ selection->toggle(item_clicked);
+ } else {
+ selection->set(item_clicked);
+ }
+ nt->desktop->updateNow();
}
- nt->desktop->updateNow();
}
void ink_node_tool_mouseover_changed(InkNodeTool *nt, Inkscape::UI::ControlPoint *p)
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp
index 303c0fb75b6bf6f2a40e286eb85246761c13de71..c1dfcdeaac72a1b86ffbda81e3e802dc6db2b085 100644 (file)
--- a/src/ui/tool/node.cpp
+++ b/src/ui/tool/node.cpp
#include "ui/tool/path-manipulator.h"
namespace Inkscape {
-namespace UI {
+namespace UI {
static SelectableControlPoint::ColorSet node_colors = {
{
// hide the handle if it's less than dragtolerance away from the node
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
int drag_tolerance = prefs->getIntLimited("/options/dragtolerance/value", 0, 0, 100);
-
+
Geom::Point dist = _desktop->d2w(_parent->position()) - _desktop->d2w(position());
if (dist.length() <= drag_tolerance) {
move(_parent->position());
}
}
-Glib::ustring Handle::_getDragTip(GdkEventMotion *event)
+Glib::ustring Handle::_getDragTip(GdkEventMotion */*event*/)
{
Geom::Point dist = position() - _last_drag_origin();
// report angle in mathematical convention
@@ -396,14 +396,14 @@ void Node::_fixNeighbors(Geom::Point const &old_pos, Geom::Point const &new_pos)
{
/* This method restores handle invariants for neighboring nodes,
* and invariants that are based on positions of those nodes for this one. */
-
+
/* Fix auto handles */
if (_type == NODE_AUTO) _updateAutoHandles();
if (old_pos != new_pos) {
if (_next() && _next()->_type == NODE_AUTO) _next()->_updateAutoHandles();
if (_prev() && _prev()->_type == NODE_AUTO) _prev()->_updateAutoHandles();
}
-
+
/* Fix smooth handles at the ends of linear segments.
* Rotate the appropriate handle to be colinear with the segment.
* If there is a smooth node at the other end of the segment, rotate it too. */
double len_next = vec_next.length(), len_prev = vec_prev.length();
double len = (len_next + len_prev) / 6; // take 1/3 of average
if (len == 0) return;
-
+
Geom::Point dir = Geom::unit_vector((len_prev / len_next) * vec_next - vec_prev);
_back.setRelativePos(-dir * len);
_front.setRelativePos(dir * len);
return C_("Path node tip",
"<b>Ctrl:</b> move along axes, click to change node type");
}
-
+
// assemble tip from node name
char const *nodetype = node_type_to_localized_string(_type);
return format_tip(C_("Path node tip",
"<b>%s:</b> drag to shape the path, click to select this node"), nodetype);
}
-Glib::ustring Node::_getDragTip(GdkEventMotion *event)
+Glib::ustring Node::_getDragTip(GdkEventMotion */*event*/)
{
Geom::Point dist = position() - _last_drag_origin();
GString *x = SP_PX_TO_METRIC_STRING(dist[Geom::X], _desktop->namedview->getDefaultMetric());
index cf8907299cbe60af7f5e31f174d83b349718bea7..f9086950dc3011c06ae3494a8df2684cd75dd729 100644 (file)
}
return C_("Transform handle tip", "<b>Scale handle:</b> drag to scale the selection");
}
- virtual Glib::ustring _getDragTip(GdkEventMotion *event) {
+
+ virtual Glib::ustring _getDragTip(GdkEventMotion */*event*/) {
return format_tip(C_("Transform handle tip",
"Scale by %.2f%% x %.2f%%"), _last_scale_x * 100, _last_scale_y * 100);
}
+
virtual bool _hasDragTips() { return true; }
static double _last_scale_x, _last_scale_y;
, _corner(corner)
{}
protected:
+
virtual void startTransform() {
_rot_center = _th.rotationCenter();
_rot_opposite = _th.bounds().corner(_corner + 2);
_last_angle = 0;
}
+
virtual Geom::Matrix computeTransform(Geom::Point const &new_pos, GdkEventMotion *event)
{
Geom::Point rotc = held_shift(*event) ? _rot_opposite : _rot_center;
* Geom::Translate(rotc);
return t;
}
+
virtual CommitEvent getCommitEvent() { return COMMIT_MOUSE_ROTATE; }
+
virtual Glib::ustring _getTip(unsigned state) {
if (state_held_shift(state)) {
if (state_held_control(state)) {
return C_("Transform handle tip", "<b>Rotation handle:</b> drag to rotate "
"the selection around the rotation center");
}
- virtual Glib::ustring _getDragTip(GdkEventMotion *event) {
+
+ virtual Glib::ustring _getDragTip(GdkEventMotion */*event*/) {
return format_tip(C_("Transform handle tip", "Rotate by %.2f°"),
_last_angle * 360.0);
}
+
virtual bool _hasDragTips() { return true; }
+
private:
static Glib::RefPtr<Gdk::Pixbuf> _corner_to_pixbuf(unsigned c) {
sp_select_context_get_type();
: TransformHandle(th, side_to_anchor(side), _side_to_pixbuf(side))
, _side(side)
{}
+
protected:
+
virtual void startTransform() {
_skew_center = _th.rotationCenter();
Geom::Rect b = _th.bounds();
_last_angle = 0;
_last_horizontal = _side % 2;
}
+
virtual Geom::Matrix computeTransform(Geom::Point const &new_pos, GdkEventMotion *event)
{
Geom::Point scc = held_shift(*event) ? _skew_center : _skew_opposite;
* Geom::Translate(scc);
return t;
}
+
virtual CommitEvent getCommitEvent() {
return _side % 2
? COMMIT_MOUSE_SKEW_Y
: COMMIT_MOUSE_SKEW_X;
}
+
virtual Glib::ustring _getTip(unsigned state) {
if (state_held_shift(state)) {
if (state_held_control(state)) {
"<b>Skew handle:</b> drag to skew (shear) selection about "
"the opposite handle");
}
- virtual Glib::ustring _getDragTip(GdkEventMotion *event) {
+
+ virtual Glib::ustring _getDragTip(GdkEventMotion */*event*/) {
if (_last_horizontal) {
return format_tip(C_("Transform handle tip", "Skew horizontally by %.2f°"),
_last_angle * 360.0);
_last_angle * 360.0);
}
}
+
virtual bool _hasDragTips() { return true; }
+
private:
+
static Glib::RefPtr<Gdk::Pixbuf> _side_to_pixbuf(unsigned s) {
sp_select_context_get_type();
switch (s % 4) {
{
setVisible(false);
}
+
protected:
- virtual Glib::ustring _getTip(unsigned state) {
+
+ virtual Glib::ustring _getTip(unsigned /*state*/) {
return C_("Transform handle tip",
"<b>Rotation center:</b> drag to change the origin of transforms");
}
+
private:
+
static Glib::RefPtr<Gdk::Pixbuf> _get_pixbuf() {
sp_select_context_get_type();
return Glib::wrap(handles[12], true);
}
+
TransformHandleSet &_th;
};
index e4a585fb3bfa98bb450ec58fe5e71014a16f849e..e37e1f8289a627bd28ce4e4f97d14fe9d8103738 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
sp_selection_next_patheffect_param( reinterpret_cast<SPDesktop*>(data) );
}
-void toggle_edit_clip (GtkToggleAction *act, gpointer data) {
+void toggle_edit_clip (GtkToggleAction *act, gpointer /*data*/) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
bool edit = gtk_toggle_action_get_active( act );
prefs->setBool("/tools/nodes/edit_clipping_paths", edit);
}
-void toggle_edit_mask (GtkToggleAction *act, gpointer data) {
+void toggle_edit_mask (GtkToggleAction *act, gpointer /*data*/) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
bool edit = gtk_toggle_action_get_active( act );
prefs->setBool("/tools/nodes/edit_masks", edit);