summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6053d8d)
raw | patch | inline | side by side (parent: 6053d8d)
author | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 18 Aug 2008 00:48:37 +0000 (00:48 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 18 Aug 2008 00:48:37 +0000 (00:48 +0000) |
index af92074b050306472597eedc48cd4c7be7350afc..9e58e306d2489da8996361c6ae3a6f46ce4974f5 100644 (file)
--- a/src/lpe-tool-context.cpp
+++ b/src/lpe-tool-context.cpp
@@ -167,7 +167,6 @@ destroys old and creates new nodepath and reassigns listeners to the new selecte
void
sp_lpetool_context_selection_changed(Inkscape::Selection *selection, gpointer data)
{
- g_print ("sp_lpetool_context_selection_changed()\n");
SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(data);
// TODO: update ShapeEditorsCollective instead
gint
sp_lpetool_context_root_handler(SPEventContext *event_context, GdkEvent *event)
{
- //g_print ("sp_lpetool_context_root_handler()\n");
SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(event_context);
SPDesktop *desktop = event_context->desktop;
Inkscape::Selection *selection = sp_desktop_selection (desktop);
@@ -206,24 +204,20 @@ sp_lpetool_context_root_handler(SPEventContext *event_context, GdkEvent *event)
if (sp_pen_context_has_waiting_LPE(lc)) {
// quit when we are waiting for a LPE to be applied
- g_print ("LPETool has waiting LPE. We call the pen tool parent context and return\n");
ret = ((SPEventContextClass *) lpetool_parent_class)->root_handler(event_context, event);
return ret;
}
switch (event->type) {
case GDK_BUTTON_PRESS:
- g_print ("GDK_BUTTON_PRESS\n");
if (lc->mode == Inkscape::LivePathEffect::INVALID_LPE) {
// don't do anything for now if we are inactive
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Choose a construction tool from the toolbar."));
- g_print ("Flash statusbar\n");
ret = true;
break;
}
if (event->button.button == 1 && !event_context->space_panning) {
- g_print (" ... (passed if construct)\n");
// save drag origin
event_context->xp = (gint) event->button.x;
event_context->yp = (gint) event->button.y;
@@ -234,11 +228,9 @@ sp_lpetool_context_root_handler(SPEventContext *event_context, GdkEvent *event)
int mode = prefs_get_int_attribute("tools.lpetool", "mode", 0);
EffectType type = lpesubtools[mode];
- g_print ("Activating mode %d\n", mode);
// save drag origin
bool over_stroke = lc->shape_editor->is_over_stroke(NR::Point(event->button.x, event->button.y), true);
- g_print ("over_stroke: %s\n", over_stroke ? "true" : "false");
sp_pen_context_wait_for_LPE_mouse_clicks(lc, type, Inkscape::LivePathEffect::Effect::acceptsNumClicks(type));
int lpetool_item_has_construction(SPLPEToolContext *lc, SPItem *item)
{
if (!SP_IS_LPE_ITEM(item)) {
- g_print ("item is not LPEItem; returning -1\n");
return -1;
}
Inkscape::LivePathEffect::Effect* lpe = sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item));
if (!lpe) {
- g_print ("no valid construction; returning -1\n");
return -1;
}
- g_print ("returning construction %d\n", lpetool_mode_to_index(lpe->effectType()));
return lpetool_mode_to_index(lpe->effectType());
}
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 817c588c327004f1587f5c0cd08c905f5d685e1b..e550bf6b76e8425568dc8cc5940468473cede60f 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
@@ -3921,9 +3921,7 @@ static void node_handle_moved(SPKnot *knot, NR::Point *p, guint state, gpointer
if (!desktop) return;
SPEventContext *ec = desktop->event_context;
if (!ec) return;
- g_print ("4\n");
Inkscape::MessageContext *mc = get_message_context(ec);
- g_print ("5\n");
if (!mc) return;
double degrees = 180 / M_PI * rnew.a;
@@ -4748,9 +4746,7 @@ sp_nodepath_update_statusbar(Inkscape::NodePath::Path *nodepath)//!!!move to Sha
SPEventContext *ec = desktop->event_context;
if (!ec) return;
- g_print ("6\n");
Inkscape::MessageContext *mc = get_message_context(ec);
- g_print ("7\n");
if (!mc) return;
inkscape_active_desktop()->emitToolSubselectionChanged(NULL);
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index b7182ac513d7d0554feefeedb00d838284086a43..2d1a48d3aefdf388f5060cbfaac9031294878d19 100644 (file)
--- a/src/pen-context.cpp
+++ b/src/pen-context.cpp
static gint
sp_pen_context_root_handler(SPEventContext *ec, GdkEvent *event)
{
- g_print ("sp_pen_context_root_handler()\n");
SPPenContext *const pc = SP_PEN_CONTEXT(ec);
gint ret = FALSE;
@@ -1387,9 +1386,6 @@ sp_pen_context_wait_for_LPE_mouse_clicks(SPPenContext *pc, Inkscape::LivePathEff
if (effect_type == Inkscape::LivePathEffect::INVALID_LPE)
return;
- g_print ("Now waiting for %s to be applied\n",
- Inkscape::LivePathEffect::LPETypeConverter.get_label(effect_type).c_str());
-
pc->waiting_LPE_type = effect_type;
pc->expecting_clicks_for_LPE = num_clicks;
pc->polylines_only = use_polylines;
@@ -1399,9 +1395,6 @@ sp_pen_context_wait_for_LPE_mouse_clicks(SPPenContext *pc, Inkscape::LivePathEff
void
sp_pen_context_cancel_waiting_for_LPE(SPPenContext *pc)
{
- g_print ("Cancelled waiting for mouse clicks for %s\n",
- Inkscape::LivePathEffect::LPETypeConverter.get_label(pc->waiting_LPE_type).c_str());
-
pc->waiting_LPE_type = Inkscape::LivePathEffect::INVALID_LPE;
pc->expecting_clicks_for_LPE = 0;
sp_pen_context_set_polyline_mode(pc);
diff --git a/src/selection.cpp b/src/selection.cpp
index 65ec9941d1cb70cbde2da75aff9f2be873b2597e..9e134ff08022c5fa31aefcb8b0f109df6b1c00a0 100644 (file)
--- a/src/selection.cpp
+++ b/src/selection.cpp
}
void Selection::add(SPObject *obj, bool persist_selection_context/* = false */) {
- g_print ("Selection::add()\n");
g_return_if_fail(obj != NULL);
g_return_if_fail(SP_IS_OBJECT(obj));
}
void Selection::remove(SPObject *obj) {
- g_print ("Selection::remove()\n");
g_return_if_fail(obj != NULL);
g_return_if_fail(SP_IS_OBJECT(obj));
g_return_if_fail(includes(obj));
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index a7dc872b62e036257fab0a8232d9d107f2fbd7df..a6bb138556daf7eed874fa8a85138c5413d14c60 100644 (file)
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
}
void ShapeEditor::unset_item(SubType type, bool keep_knotholder) {
- g_print ("ShapeEditor::unset_item()\n");
Inkscape::XML::Node *old_repr = NULL;
switch (type) {
gchar const */*old_value*/, gchar const */*new_value*/,
bool /*is_interactive*/, gpointer data)
{
- g_print ("shapeeditor_event_attr_changed()\n");
gboolean changed_np = FALSE;
gboolean changed_kh = FALSE;
void ShapeEditor::set_item(SPItem *item, SubType type, bool keep_knotholder) {
- g_print ("ShapeEditor::set_item()\n");
// this happens (and should only happen) when for an LPEItem having both knotholder and nodepath the knotholder
// is adapted; in this case we don't want to delete the knotholder since this freezes the handles
unset_item(type, keep_knotholder);
*/
void ShapeEditor::set_item_lpe_path_parameter(SPItem *item, SPObject *lpeobject, const char * key)
{
- g_print ("ShapeEditor::set_item_lpe_path_parameter()\n");
unset_item(SH_NODEPATH);
this->grab_node = -1;
Why not make a reload function in NodePath and in KnotHolder? */
void ShapeEditor::reset_item (SubType type, bool keep_knotholder)
{
- g_print ("ShapeEditor::reset_item()\n");
switch (type) {
case SH_NODEPATH:
if ( (this->nodepath) && (IS_LIVEPATHEFFECT(this->nodepath->object)) ) {
}
bool ShapeEditor::is_over_stroke (NR::Point event_p, bool remember) {
- g_print ("ShapeEditor::is_over_stroke ()");
if (!this->nodepath)
return false; // no stroke in knotholder
SPCurve *curve;
if (SP_IS_SHAPE(item)) {
- g_print ("; getting curve from shape\n");
curve = sp_shape_get_curve(SP_SHAPE(item));
} else {
- g_print ("; getting curve from nodepath's curve\n");
this->nodepath->curve; // not sure if np->curve is always up to date...
}
Geom::PathVector const &pathv = curve->get_pathvector();
index 4bd645158864b2fdc1f0d6411d9cd4f08269b050..031d2a8b985529ae9db4a8a04f67af00f3dd45b0 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -4795,13 +4795,11 @@ static void sp_dropper_toolbox_prep(SPDesktop */*desktop*/, GtkActionGroup* main
// this is called when the mode is changed via the toolbar (i.e., one of the subtool buttons is pressed)
static void sp_lpetool_mode_changed(EgeSelectOneAction *act, GObject *tbl)
{
- g_print ("sp_lpetool_mode_changed()\n");
using namespace Inkscape::LivePathEffect;
SPDesktop *desktop = (SPDesktop *) g_object_get_data(tbl, "desktop");
SPEventContext *ec = desktop->event_context;
if (!SP_IS_LPETOOL_CONTEXT(ec)) {
- g_print ("event context is not a LPEToolContext!\n");
return;
}
sp_lpetool_toolbox_sel_changed(Inkscape::Selection *selection, GObject *tbl)
{
using namespace Inkscape::LivePathEffect;
- g_print ("sp_lpetool_toolbox_sel_changed()");
{
GtkAction* w = GTK_ACTION(g_object_get_data(tbl, "lpetool_line_segment_action"));
SPItem *item = selection->singleItem();
@@ -4848,26 +4845,22 @@ sp_lpetool_toolbox_sel_changed(Inkscape::Selection *selection, GObject *tbl)
SPLPEItem *lpeitem = SP_LPE_ITEM(item);
Effect* lpe = sp_lpe_item_get_current_lpe(lpeitem);
if (lpe && lpe->effectType() == LINE_SEGMENT) {
- g_print (" - item with line segment LPE found\n");
LPELineSegment *lpels = static_cast<LPELineSegment*>(lpe);
g_object_set_data(tbl, "currentlpe", lpe);
g_object_set_data(tbl, "currentlpeitem", lpeitem);
gtk_action_set_sensitive(w, TRUE);
ege_select_one_action_set_active(EGE_SELECT_ONE_ACTION(w), lpels->end_type.get_value());
} else {
- g_print (" - unsetting item\n");
g_object_set_data(tbl, "currentlpe", NULL);
g_object_set_data(tbl, "currentlpeitem", NULL);
gtk_action_set_sensitive(w, FALSE);
}
} else {
- g_print (" - unsetting item\n");
g_object_set_data(tbl, "currentlpe", NULL);
g_object_set_data(tbl, "currentlpeitem", NULL);
gtk_action_set_sensitive(w, FALSE);
}
}
- g_print ("\n");
}
static void
static void
lpetool_toggle_set_bbox (GtkToggleAction *act, gpointer data) {
- g_print ("lpetool_toggle_set_bbox()\n");
SPDesktop *desktop = static_cast<SPDesktop *>(data);
Inkscape::Selection *selection = desktop->selection;
static void
sp_lpetool_change_line_segment_type(EgeSelectOneAction* act, GObject* tbl) {
- g_print ("sp_lpetool_change_line_segment_type()\n");
using namespace Inkscape::LivePathEffect;
// quit if run by the attr_changed listener
LPELineSegment *lpe = static_cast<LPELineSegment *>(g_object_get_data(tbl, "currentlpe"));
SPLPEItem *lpeitem = static_cast<SPLPEItem *>(g_object_get_data(tbl, "currentlpeitem"));
- if (!lpeitem) {
- g_print ("no lpeitem!\n");
- } else {
- g_print ("lpeitem found\n");
- }
- if (!lpe) {
- g_print ("no LPE!\n");
- } else {
- g_print ("LPE found. Adjusting line segment type\n");
+ if (lpeitem) {
SPLPEItem *lpeitem = static_cast<SPLPEItem *>(g_object_get_data(tbl, "currentlpeitem"));
lpe->end_type.param_set_value(static_cast<Inkscape::LivePathEffect::EndType>(ege_select_one_action_get_active(act)));
sp_lpe_item_update_patheffect(lpeitem, true, true);