Index: trunk/doc/conf/tree/appearance_color.html =================================================================== --- trunk/doc/conf/tree/appearance_color.html (revision 21503) +++ trunk/doc/conf/tree/appearance_color.html (revision 21504) @@ -8,7 +8,9 @@ cross color 0 crosshair, drc outline color selected color 0 generic object selection color via color 0 non-terminal padstack shape on current layer + via_far color 0 non-terminal padstack shape on non-current ('far side') layer pin color 0 terminal padstack shape on current layer + pin_far color 0 terminal padstack shape on non-current ('far side') layer pin_name color 0 on-screen terminal number/name labels subc color 0 on-screen subcircuit marks subc_nonetlist color 0 on-screen subcircuit marks for subcircuits with the nonetlist flag Index: trunk/scconfig/Rev.h =================================================================== --- trunk/scconfig/Rev.h (revision 21503) +++ trunk/scconfig/Rev.h (revision 21504) @@ -1 +1 @@ -static const int myrev = 21490; +static const int myrev = 21504; Index: trunk/scconfig/Rev.tab =================================================================== --- trunk/scconfig/Rev.tab (revision 21503) +++ trunk/scconfig/Rev.tab (revision 21504) @@ -1,4 +1,4 @@ -21490 configure HID API cleanup, including dialogs rewritten with DAD and new DAD features +21504 configure HID API cleanup, including dialogs rewritten with DAD and new DAD features 21289 configure new drc infra and GUI 21098 configure old pinout dialog removal 20317 configure new core color infra Index: trunk/src/Makefile.dep =================================================================== --- trunk/src/Makefile.dep (revision 21503) +++ trunk/src/Makefile.dep (revision 21504) @@ -3678,7 +3678,7 @@ ../src_plugins/lib_gtk_common/dlg_attribute.h ../src_plugins/lib_gtk_common/dlg_progress.o: \ ../src_plugins/lib_gtk_common/dlg_progress.c ../config.h \ - ../src_plugins/lib_gtk_common/dlg_progress.h pcb_bool.h compat_nls.h \ + pcb_bool.h compat_nls.h \ ../src_plugins/lib_gtk_common/compat.h ../src_plugins/lib_gtk_common/dlg_propedit.o: \ ../src_plugins/lib_gtk_common/dlg_propedit.c ../config.h \ @@ -4368,7 +4368,6 @@ ../src_plugins/lib_gtk_common/dlg_log.h error.h \ ../src_plugins/lib_gtk_common/dlg_file_chooser.h compat_nls.h plug_io.h \ ../src_plugins/lib_gtk_common/util_str.h \ - ../src_plugins/lib_gtk_common/dlg_progress.h \ ../src_plugins/lib_gtk_common/dlg_attribute.h \ ../src_plugins/lib_gtk_common/dlg_attributes.h \ ../src_plugins/lib_gtk_common/util_listener.h \ Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 21503) +++ trunk/src/data.c (revision 21504) @@ -721,7 +721,7 @@ } PCB_ENDALL_LOOP; ctx->inited = 1; } - if (pcb_gui->progress(ctx->at, ctx->total, "Clipping polygons...") != 0) { + if (pcb_hid_progress(ctx->at, ctx->total, "Clipping polygons...") != 0) { int rv = pcb_hid_message_box("warning", "Stop poly clipping", "The only way to cancel poly clipping is to quit pcb-rnd.\nAre you sure you want to quit?", "yes, quit pcb-rnd", 1, "no, continue clipping", 2, NULL); if (rv == 1) { exit(1); @@ -728,7 +728,7 @@ } else { /* Have to recreate the dialog next time, that's the only way to get it out from the cancel state */ - pcb_gui->progress(0, 0, NULL); + pcb_hid_progress(0, 0, NULL); } } } @@ -767,7 +767,7 @@ } PCB_ENDALL_LOOP; if (enable_progbar) - pcb_gui->progress(0, 0, NULL); + pcb_hid_progress(0, 0, NULL); } void pcb_data_clip_dirty(pcb_data_t *data, pcb_bool enable_progbar) Index: trunk/src/hid.h =================================================================== --- trunk/src/hid.h (revision 21503) +++ trunk/src/hid.h (revision 21504) @@ -395,11 +395,6 @@ /* Something to alert the user. */ void (*beep)(void); - /* Used by optimizers and autorouter to show progress to the user. - Pass all zeros to flush display and remove any dialogs. - Returns nonzero if the user wishes to cancel the operation. */ - int (*progress)(int so_far, int total, const char *message); - void (*edit_attributes)(const char *owner, pcb_attribute_list_t *attrlist); /* Notification to the GUI around saving the PCB file. Index: trunk/src/hid_nogui.c =================================================================== --- trunk/src/hid_nogui.c (revision 21503) +++ trunk/src/hid_nogui.c (revision 21504) @@ -410,7 +410,7 @@ fflush(stdout); } -static int nogui_progress(int so_far, int total, const char *message) +int pcb_nogui_progress(int so_far, int total, const char *message) { static int on = 0; if (conf_core.rc.quiet) @@ -528,7 +528,6 @@ hid->attr_dlg_free = nogui_attr_dlg_free; hid->attr_dlg_property = nogui_attr_dlg_property; hid->beep = nogui_beep; - hid->progress = nogui_progress; hid->create_menu = nogui_create_menu; hid->clip_set = nogui_clip_set; hid->clip_get = nogui_clip_get; Index: trunk/src/hid_nogui.h =================================================================== --- trunk/src/hid_nogui.h (revision 21503) +++ trunk/src/hid_nogui.h (revision 21504) @@ -7,4 +7,6 @@ /* For checking if attr dialogs are not available: */ void *pcb_nogui_attr_dlg_new(pcb_hid_attribute_t *attrs_, int n_attrs_, pcb_hid_attr_val_t * results_, const char *title_, void *caller_data, pcb_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev)); +int pcb_nogui_progress(int so_far, int total, const char *message); + #endif Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 21503) +++ trunk/src_plugins/autoplace/autoplace.c (revision 21504) @@ -810,10 +810,8 @@ if (good_moves >= good_move_cutoff || moves >= move_cutoff) { printf("END OF STAGE: COST %.0f\t" "GOOD_MOVES %d\tMOVES %d\t" "T: %.1f\n", C0, good_moves, moves, T); pcb_draw(); - if ((pcb_gui != NULL) && (pcb_gui->progress != NULL)) { - if (pcb_gui->progress(C00-T, C00, "Optimizing the placement...")) - break; - } + if (pcb_hid_progress(C00-T, C00, "Optimizing the placement...")) + break; /* is this the end? */ if (T < 5 || good_moves < moves / CostParameter.good_ratio) break; @@ -827,8 +825,7 @@ changed = (steps > 0); } done: - if ((pcb_gui != NULL) && (pcb_gui->progress != NULL)) - pcb_gui->progress(0, 0, NULL); + pcb_hid_progress(0, 0, NULL); if (changed) { pcb_rats_destroy(pcb_false); pcb_rat_add_all(pcb_false, NULL); Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 21503) +++ trunk/src_plugins/autoroute/autoroute.c (revision 21504) @@ -4342,7 +4342,7 @@ * to route a net from a particular starting point, but perfectly * able to route it from some other. */ percent = calculate_progress(this_heap_item, this_heap_size, &ras); - request_cancel = pcb_gui->progress(percent * 100., 100, _("Autorouting tracks")); + request_cancel = pcb_hid_progress(percent * 100., 100, _("Autorouting tracks")); if (request_cancel) { ras.total_nets_routed = 0; ras.conflict_subnets = 0; @@ -4714,7 +4714,7 @@ /* auto-route all nets */ changed = (RouteAll(rd).total_nets_routed > 0) || changed; donerouting: - pcb_gui->progress(0, 0, NULL); + pcb_hid_progress(0, 0, NULL); if (conf_core.editor.live_routing) { int i; pcb_box_t big = { 0, 0, PCB_MAX_COORD, PCB_MAX_COORD }; Index: trunk/src_plugins/djopt/djopt.c =================================================================== --- trunk/src_plugins/djopt/djopt.c (revision 21503) +++ trunk/src_plugins/djopt/djopt.c (revision 21504) @@ -741,7 +741,7 @@ break; } } - pcb_gui->progress(0, 0, 0); + pcb_hid_progress(0, 0, 0); check(c, 0); } Index: trunk/src_plugins/extedit/extedit.c =================================================================== --- trunk/src_plugins/extedit/extedit.c (revision 21503) +++ trunk/src_plugins/extedit/extedit.c (revision 21504) @@ -136,7 +136,7 @@ while(ctx.stay) { if (pcb_gui != NULL) { n++; - pcb_gui->progress(50+sin((double)n/10.0)*40, 100, "Invoked external editor. Please edit, save and close there to finish this operation"); + pcb_hid_progress(50+sin((double)n/10.0)*40, 100, "Invoked external editor. Please edit, save and close there to finish this operation"); } pcb_ms_sleep(50); } @@ -148,7 +148,7 @@ old_wait:; if (pcb_gui != NULL) { - pcb_gui->progress(50, 100, "Invoked external editor. Please edit, save and close there to finish this operation"); + pcb_hid_progress(50, 100, "Invoked external editor. Please edit, save and close there to finish this operation"); pcb_ms_sleep(1000); /* ugly hack: give the GUI some time to flush */ } while(!(feof(fc))) { @@ -159,7 +159,7 @@ fclose(fc); if (pcb_gui != NULL) - pcb_gui->progress(0, 0, NULL); + pcb_hid_progress(0, 0, NULL); free(cmd); } Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 21503) +++ trunk/src_plugins/hid_lesstif/main.c (revision 21504) @@ -3431,123 +3431,6 @@ fflush(stdout); } - -static pcb_bool progress_cancelled = pcb_false; - -static void progress_cancel_callback(Widget w, void *v, void *cbs) -{ - progress_cancelled = pcb_true; -} - -static Widget progress_dialog = 0; -static Widget progress_cancel, progress_label; -static Widget progress_scale; - -static void lesstif_progress_dialog(int so_far, int total, const char *msg) -{ - XmString xs; - - if (mainwind == 0) - return; - - if (progress_dialog == 0) { - Atom close_atom; - - stdarg_n = 0; - stdarg(XmNdefaultButtonType, XmDIALOG_CANCEL_BUTTON); - stdarg(XmNtitle, "Progress"); - stdarg(XmNdialogStyle, XmDIALOG_APPLICATION_MODAL); - stdarg(XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); - progress_dialog = XmCreateInformationDialog(mainwind, XmStrCast("progress"), stdarg_args, stdarg_n); - XtAddCallback(progress_dialog, XmNcancelCallback, (XtCallbackProc) progress_cancel_callback, NULL); - - progress_cancel = XmMessageBoxGetChild(progress_dialog, XmDIALOG_CANCEL_BUTTON); - progress_label = XmMessageBoxGetChild(progress_dialog, XmDIALOG_MESSAGE_LABEL); - - XtUnmanageChild(XmMessageBoxGetChild(progress_dialog, XmDIALOG_OK_BUTTON)); - XtUnmanageChild(XmMessageBoxGetChild(progress_dialog, XmDIALOG_HELP_BUTTON)); - - stdarg(XmNdefaultPosition, False); - XtSetValues(progress_dialog, stdarg_args, stdarg_n); - - stdarg_n = 0; - stdarg(XmNminimum, 0); - stdarg(XmNvalue, 0); - stdarg(XmNmaximum, total > 0 ? total : 1); - stdarg(XmNorientation, XmHORIZONTAL); - stdarg(XmNshowArrows, pcb_false); - progress_scale = XmCreateScrollBar(progress_dialog, XmStrCast("scale"), stdarg_args, stdarg_n); - XtManageChild(progress_scale); - - close_atom = XmInternAtom(display, XmStrCast("WM_DELETE_WINDOW"), 0); - XmAddWMProtocolCallback(XtParent(progress_dialog), close_atom, (XtCallbackProc) progress_cancel_callback, 0); - } - - stdarg_n = 0; - stdarg(XmNvalue, 0); - stdarg(XmNsliderSize, (so_far <= total) ? (so_far < 0) ? 0 : so_far : total); - stdarg(XmNmaximum, total > 0 ? total : 1); - XtSetValues(progress_scale, stdarg_args, stdarg_n); - - stdarg_n = 0; - xs = XmStringCreatePCB(msg); - stdarg(XmNmessageString, xs); - XtSetValues(progress_dialog, stdarg_args, stdarg_n); - - return; -} - -#define MIN_TIME_SEPARATION 0.1 /* seconds */ - -static int lesstif_progress(int so_far, int total, const char *message) -{ - static pcb_bool started = pcb_false; - XEvent e; - double time_delta, time_now; - static double time_then = 0.0; - int retval = 0; - - if (!lesstif_active) { - if (message != NULL) - fprintf(stderr, "progress: %d/%d %s\n", so_far, total, message); - return 0; - } - - if (so_far == 0 && total == 0 && message == NULL) { - XtUnmanageChild(progress_dialog); - started = pcb_false; - progress_cancelled = pcb_false; - return retval; - } - - time_now = pcb_dtime(); - time_delta = time_now - time_then; - - if (started && time_delta < MIN_TIME_SEPARATION) - return retval; - - /* Create or update the progress dialog */ - lesstif_progress_dialog(so_far, total, message); - - if (!started) { - XtManageChild(progress_dialog); - started = pcb_true; - } - - /* Dispatch pending events */ - while (XtAppPending(app_context)) { - XtAppNextEvent(app_context, &e); - XtDispatchEvent(&e); - } - idle_proc(NULL); - - /* If rendering takes a while, make sure the core has enough time to - do work. */ - time_then = pcb_dtime(); - - return progress_cancelled; -} - static void lesstif_get_view_size(pcb_coord_t *width, pcb_coord_t *height) { *width = Pz(view_width); @@ -3688,7 +3571,6 @@ lesstif_hid.attr_dlg_widget_hide = lesstif_attr_dlg_widget_hide; lesstif_hid.attr_dlg_set_value = lesstif_attr_dlg_set_value; lesstif_hid.beep = lesstif_beep; - lesstif_hid.progress = lesstif_progress; lesstif_hid.edit_attributes = lesstif_attributes_dialog; lesstif_hid.point_cursor = PointCursor; lesstif_hid.command_entry = lesstif_command_entry; Index: trunk/src_plugins/lib_gtk_common/dlg_progress.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_progress.c (revision 21503) +++ trunk/src_plugins/lib_gtk_common/dlg_progress.c (nonexistent) @@ -1,193 +0,0 @@ -/* - * COPYRIGHT - * - * pcb-rnd, interactive printed circuit board design - * (this file is based on PCB, interactive printed circuit board design) - * Copyright (C) 1994,1995,1996 Thomas Nau - * pcb-rnd Copyright (C) 2017 Tibor 'Igor2' Palinkas - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Contact: - * Project page: http://repo.hu/projects/pcb-rnd - * lead developer: http://repo.hu/projects/pcb-rnd/contact.html - * mailing list: pcb-rnd (at) list.repo.hu (send "subscribe") - */ - -#include "config.h" -#include "dlg_progress.h" - -#include "pcb_bool.h" -#include "compat_nls.h" -#include "compat.h" - -struct progress_dialog { - GtkWidget *dialog; - GtkWidget *message; - GtkWidget *progress; - gint response_id; - GMainLoop *loop; - gboolean destroyed; - gboolean started; - GTimer *timer; - - gulong response_handler; - gulong destroy_handler; - gulong delete_handler; -}; - -static void run_response_handler(GtkDialog * dialog, gint response_id, gpointer data) -{ - struct progress_dialog *pd = data; - - pd->response_id = response_id; -} - -static gint run_delete_handler(GtkDialog * dialog, GdkEventAny * event, gpointer data) -{ - struct progress_dialog *pd = data; - - pd->response_id = GTK_RESPONSE_DELETE_EVENT; - - return TRUE; /* Do not destroy */ -} - -static void run_destroy_handler(GtkDialog * dialog, gpointer data) -{ - struct progress_dialog *pd = data; - - pd->destroyed = TRUE; -} - -static struct progress_dialog *make_progress_dialog(GtkWidget *top_window) -{ - struct progress_dialog *pd; - GtkWidget *content_area; - GtkWidget *alignment; - GtkWidget *vbox; - - pd = g_new0(struct progress_dialog, 1); - pd->response_id = GTK_RESPONSE_NONE; - - pd->dialog = gtk_dialog_new_with_buttons(_("Progress"), GTK_WINDOW(top_window), - /* Modal so nothing else can get events whilst - the main mainloop isn't running */ - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); - - gtk_window_set_deletable(GTK_WINDOW(pd->dialog), FALSE); - gtk_window_set_skip_pager_hint(GTK_WINDOW(pd->dialog), TRUE); - gtk_window_set_skip_taskbar_hint(GTK_WINDOW(pd->dialog), TRUE); - gtk_widget_set_size_request(pd->dialog, 300, -1); - - pd->message = gtk_label_new(NULL); - gtk_misc_set_alignment(GTK_MISC(pd->message), 0., 0.); - - pd->progress = gtk_progress_bar_new(); - gtk_widget_set_size_request(pd->progress, -1, 26); - - vbox = gtkc_vbox_new(pcb_false, 0); - gtk_box_pack_start(GTK_BOX(vbox), pd->message, pcb_true, pcb_true, 8); - gtk_box_pack_start(GTK_BOX(vbox), pd->progress, pcb_false, pcb_true, 8); - - alignment = gtk_alignment_new(0., 0., 1., 1.); - gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 8, 8, 8, 8); - gtk_container_add(GTK_CONTAINER(alignment), vbox); - - content_area = gtk_dialog_get_content_area(GTK_DIALOG(pd->dialog)); - gtk_box_pack_start(GTK_BOX(content_area), alignment, pcb_true, pcb_true, 0); - - gtk_widget_show_all(alignment); - - g_object_ref(pd->dialog); - gtk_window_present(GTK_WINDOW(pd->dialog)); - - pd->response_handler = g_signal_connect(pd->dialog, "response", G_CALLBACK(run_response_handler), pd); - pd->delete_handler = g_signal_connect(pd->dialog, "delete-event", G_CALLBACK(run_delete_handler), pd); - pd->destroy_handler = g_signal_connect(pd->dialog, "destroy", G_CALLBACK(run_destroy_handler), pd); - - pd->loop = g_main_loop_new(NULL, FALSE); - pd->timer = g_timer_new(); - - return pd; -} - -static void destroy_progress_dialog(struct progress_dialog *pd) -{ - if (pd == NULL) - return; - - if (!pd->destroyed) { - g_signal_handler_disconnect(pd->dialog, pd->response_handler); - g_signal_handler_disconnect(pd->dialog, pd->delete_handler); - g_signal_handler_disconnect(pd->dialog, pd->destroy_handler); - } - - g_timer_destroy(pd->timer); - g_object_unref(pd->dialog); - g_main_loop_unref(pd->loop); - - gtk_widget_destroy(pd->dialog); - - pd->loop = NULL; - g_free(pd); -} - -static void handle_progress_dialog_events(struct progress_dialog *pd) -{ - GMainContext *context = g_main_loop_get_context(pd->loop); - - /* Process events */ - while (g_main_context_pending(context)) { - g_main_context_iteration(context, FALSE); - } -} - -#define MIN_TIME_SEPARATION (50./1000.) /* 50ms */ -int pcb_gtk_dlg_progress(GtkWidget *top_window, int so_far, int total, const char *message) -{ - static struct progress_dialog *pd = NULL; - - /* If we are finished, destroy any dialog */ - if (so_far == 0 && total == 0 && message == NULL) { - destroy_progress_dialog(pd); - pd = NULL; - return 0; - } - - if (pd == NULL) - pd = make_progress_dialog(top_window); - - /* We don't want to keep the underlying process too busy whilst we - * process events. If we get called quickly after the last progress - * update, wait a little bit before we respond - perhaps the next - * time progress is reported. - - * The exception here is that we always want to process the first - * batch of events after having shown the dialog for the first time - */ - if (pd->started && g_timer_elapsed(pd->timer, NULL) < MIN_TIME_SEPARATION) - return 0; - - gtk_label_set_text(GTK_LABEL(pd->message), message); - gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(pd->progress), (double) so_far / (double) total); - - handle_progress_dialog_events(pd); - g_timer_start(pd->timer); - - pd->started = TRUE; - - return (pd->response_id == GTK_RESPONSE_CANCEL || pd->response_id == GTK_RESPONSE_DELETE_EVENT) ? 1 : 0; -} Index: trunk/src_plugins/lib_gtk_common/dlg_progress.h =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_progress.h (revision 21503) +++ trunk/src_plugins/lib_gtk_common/dlg_progress.h (nonexistent) @@ -1,3 +0,0 @@ -#include - -int pcb_gtk_dlg_progress(GtkWidget *top_window, int so_far, int total, const char *message); Index: trunk/src_plugins/lib_gtk_common/Plug.tmpasm =================================================================== --- trunk/src_plugins/lib_gtk_common/Plug.tmpasm (revision 21503) +++ trunk/src_plugins/lib_gtk_common/Plug.tmpasm (revision 21504) @@ -27,7 +27,6 @@ $(PLUGDIR)/lib_gtk_common/dlg_log.o $(PLUGDIR)/lib_gtk_common/dlg_netlist.o $(PLUGDIR)/lib_gtk_common/dlg_print.o - $(PLUGDIR)/lib_gtk_common/dlg_progress.o $(PLUGDIR)/lib_gtk_common/dlg_propedit.o $(PLUGDIR)/lib_gtk_common/dlg_route_style.o $(PLUGDIR)/lib_gtk_common/dlg_search.o Index: trunk/src_plugins/lib_gtk_hid/glue_hid.c =================================================================== --- trunk/src_plugins/lib_gtk_hid/glue_hid.c (revision 21503) +++ trunk/src_plugins/lib_gtk_hid/glue_hid.c (revision 21504) @@ -16,7 +16,6 @@ #include "../src_plugins/lib_gtk_common/ui_crosshair.h" #include "../src_plugins/lib_gtk_common/dlg_log.h" #include "../src_plugins/lib_gtk_common/dlg_file_chooser.h" -#include "../src_plugins/lib_gtk_common/dlg_progress.h" #include "../src_plugins/lib_gtk_common/dlg_attribute.h" #include "../src_plugins/lib_gtk_common/dlg_attributes.h" #include "../src_plugins/lib_gtk_common/util_listener.h" @@ -348,11 +347,6 @@ gdk_beep(); } -static int ghid_progress(int so_far, int total, const char *message) -{ - return pcb_gtk_dlg_progress(ghid_port.top_window, so_far, total, message); -} - static void ghid_attributes(const char *owner, pcb_attribute_list_t * attrs) { pcb_gtk_dlg_attributes(ghid_port.top_window, owner, attrs); @@ -511,7 +505,6 @@ dst->attr_dlg_widget_hide = ghid_attr_dlg_widget_hide; dst->attr_dlg_set_value = ghid_attr_dlg_set_value; dst->beep = ghid_beep; - dst->progress = ghid_progress; dst->edit_attributes = ghid_attributes; dst->point_cursor = PointCursor; Index: trunk/src_plugins/mincut/pcb-mincut/solve.c =================================================================== --- trunk/src_plugins/mincut/pcb-mincut/solve.c (revision 21503) +++ trunk/src_plugins/mincut/pcb-mincut/solve.c (revision 21504) @@ -207,7 +207,7 @@ } #define strempty(s) ((s) == NULL ? "" : (s)) -int *solve(gr_t *g, int (*progress)(int so_far, int total, const char *msg)) +int *solve(gr_t *g, int (*progress)(long so_far, long total, const char *msg)) { int n, best, res, till, cuts_size, have_progress = 0; double nd; Index: trunk/src_plugins/mincut/pcb-mincut/solve.h =================================================================== --- trunk/src_plugins/mincut/pcb-mincut/solve.h (revision 21503) +++ trunk/src_plugins/mincut/pcb-mincut/solve.h (revision 21504) @@ -2,4 +2,4 @@ /* returns a list of object ID pairs (each nth and n+1th element) terminated by a -1;-1. Cutting these vertices would separate g. */ -int *solve(gr_t *g, int (*progress)(int so_far, int total, const char *msg)); +int *solve(gr_t *g, int (*progress)(long so_far, long total, const char *msg)); Index: trunk/src_plugins/mincut/rats_mincut.c =================================================================== --- trunk/src_plugins/mincut/rats_mincut.c (revision 21503) +++ trunk/src_plugins/mincut/rats_mincut.c (revision 21504) @@ -279,7 +279,7 @@ #endif if (!bad_gr) { - solution = solve(g, pcb_gui->progress); + solution = solve(g, pcb_hid_progress); if (solution != NULL) { debprintf("Would cut:\n");