diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-07-11 17:24:32 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-08-21 15:16:54 +0000 |
| commit | ce82fc5441f100892bd1928a27df789f5469db56 (patch) | |
| tree | 2d47639ebb9e1a307585ffc7df57e8e830cf9603 /src | |
| parent | add autotrace options (diff) | |
| download | inkscape-ce82fc5441f100892bd1928a27df789f5469db56.tar.gz inkscape-ce82fc5441f100892bd1928a27df789f5469db56.zip | |
Fix build
Diffstat (limited to 'src')
| -rw-r--r-- | src/trace/autotrace/inkscape-autotrace.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/tracedialog2.cpp | 18 |
2 files changed, 7 insertions, 15 deletions
diff --git a/src/trace/autotrace/inkscape-autotrace.cpp b/src/trace/autotrace/inkscape-autotrace.cpp index dcd9ce96f..9ce4132bb 100644 --- a/src/trace/autotrace/inkscape-autotrace.cpp +++ b/src/trace/autotrace/inkscape-autotrace.cpp @@ -99,6 +99,8 @@ Glib::RefPtr<Gdk::Pixbuf> AutotraceTracingEngine::preview(Glib::RefPtr<Gdk::Pixb } +int test_cancel (void* keepGoing){return !(* ((int*)keepGoing));} + /** * This is the working method of this interface, and all * implementing classes. Take a GdkPixbuf, trace it, and @@ -116,7 +118,7 @@ std::vector<TracingEngineResult> AutotraceTracingEngine::trace(Glib::RefPtr<Gdk: at_bitmap_new(gdk_pixbuf_get_width(pb1), gdk_pixbuf_get_height(pb1), 3); bitmap->bitmap = pb; - at_splines_type *splines = at_splines_new_full(bitmap, opts, NULL, NULL, NULL, NULL, NULL, NULL); + at_splines_type *splines = at_splines_new_full(bitmap, opts, NULL, NULL, NULL, NULL, test_cancel, &keepGoing); // at_output_write_func wfunc = at_output_get_handler_by_suffix("svg"); at_spline_writer *wfunc = at_output_get_handler_by_suffix("svg"); diff --git a/src/ui/dialog/tracedialog2.cpp b/src/ui/dialog/tracedialog2.cpp index 486caf17b..be214e867 100644 --- a/src/ui/dialog/tracedialog2.cpp +++ b/src/ui/dialog/tracedialog2.cpp @@ -67,7 +67,7 @@ class TraceDialogImpl2 : public TraceDialog { Glib::RefPtr<Gtk::Builder> builder; Glib::RefPtr<Gtk::Adjustment> MS_scans, PA_curves, PA_islands, PA_sparse1, PA_sparse2, SS_AT_ET_T, SS_AT_FI_T, SS_BC_T, SS_CQ_T, - SS_CT_T, SS_ED_T, optimize, smooth, speckles; + SS_ED_T, optimize, smooth, speckles; Gtk::ComboBoxText *CBT_SS, *CBT_MS; Gtk::CheckButton *CB_invert, *CB_MS_smooth, *CB_MS_stack, *CB_MS_rb, *CB_speckles, *CB_smooth, *CB_optimize, /* *CB_live,*/ *CB_SIOX; @@ -210,19 +210,11 @@ void TraceDialogImpl2::traceProcess(bool do_i_trace) } void TraceDialogImpl2::abort() -{ /* +{ SPDesktop *desktop = SP_ACTIVE_DESKTOP; if (desktop) - desktop->setWaitingCursor(); - - if (mainCancelButton) - mainCancelButton->set_sensitive(false) - if (mainOkButton) - mainOkButton->set_sensitive(true); - - //### Make the abort() call to the tracer + desktop->clearWaitingCursor(); tracer.abort(); - */ } void TraceDialogImpl2::onSelectionModified(guint flags) @@ -243,7 +235,6 @@ void TraceDialogImpl2::onSetDefaults() SS_AT_ET_T->set_value(2); SS_BC_T->set_value(0.45); SS_CQ_T->set_value(64); - SS_CT_T->set_value(0); SS_ED_T->set_value(.65); optimize->set_value(0.2); smooth->set_value(1); @@ -267,7 +258,7 @@ TraceDialogImpl2::TraceDialogImpl2() : TraceDialog() { const std::string req_widgets[] = { "MS_scans", "PA_curves", "PA_islands", "PA_sparse1", "PA_sparse2", - "SS_AT_FI_T", "SS_AT_ET_T", "SS_BC_T", "SS_CQ_T", "SS_CT_T", "SS_ED_T", + "SS_AT_FI_T", "SS_AT_ET_T", "SS_BC_T", "SS_CQ_T", "SS_ED_T", "optimize", "smooth", "speckles", "CB_invert", "CB_MS_smooth", "CB_MS_stack", "CB_MS_rb", "CB_speckles", "CB_smooth", "CB_optimize", /*"CB_live",*/ "CB_SIOX", "CBT_SS", "CBT_MS", "B_RESET", @@ -305,7 +296,6 @@ TraceDialogImpl2::TraceDialogImpl2() GET_O(SS_AT_ET_T) GET_O(SS_BC_T) GET_O(SS_CQ_T) - GET_O(SS_CT_T) GET_O(SS_ED_T) GET_O(optimize) GET_O(smooth) |
