From: cilix42 Date: Mon, 18 Aug 2008 00:48:37 +0000 (+0000) Subject: Remove debugging messages X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=78969d2654d9551abe3e7a5142875516809e4254;p=inkscape.git Remove debugging messages --- diff --git a/src/lpe-tool-context.cpp b/src/lpe-tool-context.cpp index af92074b0..9e58e306d 100644 --- 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 @@ -197,7 +196,6 @@ sp_lpetool_context_set(SPEventContext *ec, gchar const *key, gchar const *val) 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)); @@ -330,16 +322,13 @@ lpetool_mode_to_index(Inkscape::LivePathEffect::EffectType const 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 817c588c3..e550bf6b7 100644 --- 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 b7182ac51..2d1a48d3a 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -361,7 +361,6 @@ sp_pen_context_item_handler(SPEventContext *ec, SPItem *item, GdkEvent *event) 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 65ec9941d..9e134ff08 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -149,7 +149,6 @@ bool Selection::includes(SPObject *obj) const { } 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)); @@ -211,7 +210,6 @@ void Selection::toggle(SPObject *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 a7dc872b6..a6bb13855 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -62,7 +62,6 @@ ShapeEditor::~ShapeEditor() { } void ShapeEditor::unset_item(SubType type, bool keep_knotholder) { - g_print ("ShapeEditor::unset_item()\n"); Inkscape::XML::Node *old_repr = NULL; switch (type) { @@ -173,7 +172,6 @@ static void shapeeditor_event_attr_changed(Inkscape::XML::Node */*repr*/, gchar 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; @@ -226,7 +224,6 @@ static Inkscape::XML::NodeEventVector shapeeditor_repr_events = { 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); @@ -272,7 +269,6 @@ void ShapeEditor::set_item(SPItem *item, SubType type, bool 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; @@ -314,7 +310,6 @@ ShapeEditor::set_knotholder(KnotHolder * knot_holder) 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)) ) { @@ -347,7 +342,6 @@ void ShapeEditor::update_statusbar () { } 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 @@ -359,10 +353,8 @@ bool ShapeEditor::is_over_stroke (NR::Point event_p, bool remember) { 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(); diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 4bd645158..031d2a8b9 100644 --- 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; } @@ -4836,7 +4834,6 @@ void 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(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 @@ -4885,7 +4878,6 @@ lpetool_toggle_show_bbox (GtkToggleAction *act, gpointer data) { static void lpetool_toggle_set_bbox (GtkToggleAction *act, gpointer data) { - g_print ("lpetool_toggle_set_bbox()\n"); SPDesktop *desktop = static_cast(data); Inkscape::Selection *selection = desktop->selection; @@ -4937,7 +4929,6 @@ sp_line_segment_build_list(GObject *tbl) 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 @@ -4950,15 +4941,7 @@ sp_lpetool_change_line_segment_type(EgeSelectOneAction* act, GObject* tbl) { LPELineSegment *lpe = static_cast(g_object_get_data(tbl, "currentlpe")); SPLPEItem *lpeitem = static_cast(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(g_object_get_data(tbl, "currentlpeitem")); lpe->end_type.param_set_value(static_cast(ege_select_one_action_get_active(act))); sp_lpe_item_update_patheffect(lpeitem, true, true);