Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 23688) +++ trunk/src/buffer.c (revision 23689) @@ -859,7 +859,7 @@ if (argc <= 1) { name = pcb_gui->fileselect(_("Save Paste Buffer As ..."), _("Choose a file to save the contents of the\n" - "paste buffer to.\n"), default_file, ".fp", "footprint", 0); + "paste buffer to.\n"), default_file, ".fp", "footprint", 0, NULL); if (default_file) { free(default_file); Index: trunk/src/font_act.c =================================================================== --- trunk/src/font_act.c (revision 23688) +++ trunk/src/font_act.c (revision 23689) @@ -66,7 +66,7 @@ if (!fname || !*fname) { fname = pcb_gui->fileselect("Load PCB font file...", "Picks a PCB font file to load.\n", - default_file, ".font", "pcbfont", PCB_HID_FSD_READ); + default_file, ".font", "pcbfont", PCB_HID_FSD_READ, NULL); if (fname == NULL) return 0; /* cancel */ if (default_file != NULL) { @@ -138,7 +138,7 @@ if (!fname || !*fname) { fname = pcb_gui->fileselect("Save PCB font file...", "Picks a PCB font file to save.\n", - default_file, ".font", "pcbfont", PCB_HID_FSD_MAY_NOT_EXIST); + default_file, ".font", "pcbfont", PCB_HID_FSD_MAY_NOT_EXIST, NULL); if (fname == NULL) PCB_ACT_FAIL(save_font_to); if (default_file != NULL) { Index: trunk/src/hid.h =================================================================== --- trunk/src/hid.h (revision 23688) +++ trunk/src/hid.h (revision 23689) @@ -374,8 +374,7 @@ * get_path returns the current full paht in res as string * set_file_name replaces the file name portion of the current path from arg[0].d.s */ - char *(*fileselect)(const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags); - char *(*fileselect2)(const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub); + char *(*fileselect)(const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub); /* A generic dialog to ask for a set of attributes. If n_attrs_ is zero, attrs_(.name) must be NULL terminated. attr_dlg_run returns Index: trunk/src/hid_nogui.c =================================================================== --- trunk/src/hid_nogui.c (revision 23688) +++ trunk/src/hid_nogui.c (revision 23689) @@ -366,7 +366,7 @@ /* FIXME - this could use some enhancement to actually use the other args */ static char *nogui_fileselect(const char *title, const char *descr, - const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags) + const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub) { char *answer; @@ -385,12 +385,6 @@ return pcb_strdup(answer); } -static char *nogui_fileselect2(const char *title, const char *descr, - const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub) -{ - return nogui_fileselect(title, descr, default_file, default_ext, history_tag, flags); -} - void *pcb_nogui_attr_dlg_new(const char *id, 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 defx, int defy) { CRASH("attr_dlg_new"); @@ -538,7 +532,6 @@ hid->log = nogui_log; hid->logv = nogui_logv; hid->fileselect = nogui_fileselect; - hid->fileselect2 = nogui_fileselect2; hid->attr_dlg_new = pcb_nogui_attr_dlg_new; hid->attr_dlg_run = nogui_attr_dlg_run; hid->attr_dlg_free = nogui_attr_dlg_free; Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 23688) +++ trunk/src/plug_io.c (revision 23689) @@ -646,7 +646,7 @@ /* CheckAndOpenFile deals with the case where fname already exists */ fname = pcb_gui->fileselect(_("Save Connection Data As ..."), - _("Choose a file to save all connection data to."), default_file, ".net", "connection_data", 0); + _("Choose a file to save all connection data to."), default_file, ".net", "connection_data", 0, NULL); if (fname == NULL) return NULL; Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 23688) +++ trunk/src/rats_patch.c (revision 23689) @@ -509,7 +509,7 @@ fn = pcb_gui->fileselect("Save netlist patch as ...", "Choose a file to save netlist patch to\n" - "for back annotation\n", default_file, ".bap", "patch", 0); + "for back annotation\n", default_file, ".bap", "patch", 0, NULL); free(default_file); } Index: trunk/src_plugins/dialogs/dlg_pref_win.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_win.c (revision 23688) +++ trunk/src_plugins/dialogs/dlg_pref_win.c (revision 23689) @@ -102,7 +102,7 @@ fname = pcb_gui->fileselect("Save window geometry to...", "Pick a file for saving window geometry to.\n", - "win_geo.lht", ".lht", "wingeo", PCB_HID_FSD_MAY_NOT_EXIST); + "win_geo.lht", ".lht", "wingeo", PCB_HID_FSD_MAY_NOT_EXIST, NULL); if (fname == NULL) return; Index: trunk/src_plugins/dialogs/dlg_view.c =================================================================== --- trunk/src_plugins/dialogs/dlg_view.c (revision 23688) +++ trunk/src_plugins/dialogs/dlg_view.c (revision 23689) @@ -439,7 +439,7 @@ char *fn; FILE *f; - fn = pcb_gui->fileselect("Save view list", "Save all views from the list", "view.lht", "lht", "view", 0); + fn = pcb_gui->fileselect("Save view list", "Save all views from the list", "view.lht", "lht", "view", 0, NULL); if (fn == NULL) return; @@ -468,7 +468,7 @@ FILE *f; void *load_ctx; - fn = pcb_gui->fileselect("Load view list", "Load all views from the list", "view.lht", "lht", "view", PCB_HID_FSD_READ); + fn = pcb_gui->fileselect("Load view list", "Load all views from the list", "view.lht", "lht", "view", PCB_HID_FSD_READ, NULL); if (fn == NULL) return; Index: trunk/src_plugins/export_openems/mesh.c =================================================================== --- trunk/src_plugins/export_openems/mesh.c (revision 23688) +++ trunk/src_plugins/export_openems/mesh.c (revision 23689) @@ -957,7 +957,7 @@ fname = pcb_gui->fileselect("Save mesh settings...", "Picks file for saving mesh settings.\n", - default_file, ".lht", "mesh", PCB_HID_FSD_MAY_NOT_EXIST); + default_file, ".lht", "mesh", PCB_HID_FSD_MAY_NOT_EXIST, NULL); if (fname == NULL) return; /* cancel */ @@ -989,7 +989,7 @@ fname = pcb_gui->fileselect("Load mesh settings...", "Picks file for loading mesh settings from.\n", - default_file, ".lht", "mesh", PCB_HID_FSD_READ); + default_file, ".lht", "mesh", PCB_HID_FSD_READ, NULL); if (fname == NULL) return; /* cancel */ Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 23688) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 23689) @@ -431,16 +431,7 @@ } /* ------------------------------------------------------------ */ -/* FIXME -- make this a proper file select dialog box */ -char *lesstif_fileselect(const char *title, const char *descr, - const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags) -{ - return pcb_hid_prompt_for(title, default_file, "fileselect"); -} - -/* ------------------------------------------------------------ */ - static Widget pcb_motif_box(Widget parent, char *name, char type, int num_table_rows, int want_frame, int want_scroll) { Widget cnt; Index: trunk/src_plugins/hid_lesstif/dlg_fileselect.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_fileselect.c (revision 23688) +++ trunk/src_plugins/hid_lesstif/dlg_fileselect.c (revision 23689) @@ -127,7 +127,7 @@ return -1; } -char *pcb_ltf_fileselect2(const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub) +char *pcb_ltf_fileselect(const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub) { XmString xms_ext = NULL, xms_load = NULL; pcb_ltf_fsd_t pctx; Index: trunk/src_plugins/hid_lesstif/dlg_fileselect.h =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_fileselect.h (revision 23688) +++ trunk/src_plugins/hid_lesstif/dlg_fileselect.h (revision 23689) @@ -1,2 +1,2 @@ #include "global_typedefs.h" -char *pcb_ltf_fileselect2(const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub); +char *pcb_ltf_fileselect(const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub); Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 23688) +++ trunk/src_plugins/hid_lesstif/main.c (revision 23689) @@ -3628,8 +3628,7 @@ lesstif_hid.log = lesstif_log; lesstif_hid.logv = lesstif_logv; - lesstif_hid.fileselect = lesstif_fileselect; - lesstif_hid.fileselect2 = pcb_ltf_fileselect2; + lesstif_hid.fileselect = pcb_ltf_fileselect; lesstif_hid.attr_dlg_new = lesstif_attr_dlg_new; lesstif_hid.attr_dlg_run = lesstif_attr_dlg_run; lesstif_hid.attr_dlg_free = lesstif_attr_dlg_free; Index: trunk/src_plugins/import_calay/calay.c =================================================================== --- trunk/src_plugins/import_calay/calay.c (revision 23688) +++ trunk/src_plugins/import_calay/calay.c (revision 23689) @@ -203,7 +203,7 @@ if (!fname_net || !*fname_net) { fname_net = pcb_gui->fileselect("Load calay netlist file...", "Picks a calay netlist file to load.\n", - default_file, NETEXT, "calay", PCB_HID_FSD_READ); + default_file, NETEXT, "calay", PCB_HID_FSD_READ, NULL); if (fname_net == NULL) return 1; if (default_file != NULL) { Index: trunk/src_plugins/import_dsn/dsn.c =================================================================== --- trunk/src_plugins/import_dsn/dsn.c (revision 23688) +++ trunk/src_plugins/import_dsn/dsn.c (revision 23689) @@ -223,7 +223,7 @@ "Load a routed dsn or ses file...", "Select dsn or ses file to load.\nThe file could be generated using the tool downloaded from freeroute.net\n", NULL, /* default file name */ - ".dsn", "dsn", PCB_HID_FSD_READ); + ".dsn", "dsn", PCB_HID_FSD_READ, NULL); if (fname == NULL) return 1; } Index: trunk/src_plugins/import_fpcb_nl/fpcb_nl.c =================================================================== --- trunk/src_plugins/import_fpcb_nl/fpcb_nl.c (revision 23688) +++ trunk/src_plugins/import_fpcb_nl/fpcb_nl.c (revision 23689) @@ -172,7 +172,7 @@ if (!fname || !*fname) { fname = pcb_gui->fileselect("Load freepcb netlist...", "Picks a freepcb netlist file to load.\n", - default_file, ".net", "freepcb", PCB_HID_FSD_READ); + default_file, ".net", "freepcb", PCB_HID_FSD_READ, NULL); if (fname == NULL) return 1; if (default_file != NULL) { Index: trunk/src_plugins/import_hpgl/hpgl.c =================================================================== --- trunk/src_plugins/import_hpgl/hpgl.c (revision 23688) +++ trunk/src_plugins/import_hpgl/hpgl.c (revision 23689) @@ -158,7 +158,7 @@ if (!fname || !*fname) { fname = pcb_gui->fileselect("Load HP-GL file...", "Picks a HP-GL plot file to load.\n", - default_file, ".hpgl", "hpgl", PCB_HID_FSD_READ); + default_file, ".hpgl", "hpgl", PCB_HID_FSD_READ, NULL); if (fname == NULL) return 0; /* cancel */ if (default_file != NULL) { Index: trunk/src_plugins/import_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/import_ipcd356/ipcd356.c (revision 23688) +++ trunk/src_plugins/import_ipcd356/ipcd356.c (revision 23689) @@ -368,7 +368,7 @@ if ((fname == NULL) || (*fname == '\0')) { fname = pcb_gui->fileselect("Load IPC-D-356 netlist...", "Pick an IPC-D-356 netlist file.\n", - default_file, ".net", "ipcd356", PCB_HID_FSD_READ); + default_file, ".net", "ipcd356", PCB_HID_FSD_READ, NULL); if (fname == NULL) { PCB_ACT_IRES(1); return 0; Index: trunk/src_plugins/import_ltspice/ltspice.c =================================================================== --- trunk/src_plugins/import_ltspice/ltspice.c (revision 23688) +++ trunk/src_plugins/import_ltspice/ltspice.c (revision 23689) @@ -277,7 +277,7 @@ if (!fname || !*fname) { fname = pcb_gui->fileselect("Load ltspice net+asc file pair...", "Picks a ltspice mentor net or asc file to load.\n", - default_file, ".asc", "ltspice", PCB_HID_FSD_READ); + default_file, ".asc", "ltspice", PCB_HID_FSD_READ, NULL); if (fname == NULL) return 1; if (default_file != NULL) { Index: trunk/src_plugins/import_mentor_sch/mentor_sch.c =================================================================== --- trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 23688) +++ trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 23689) @@ -266,7 +266,7 @@ if (!fname || !*fname) { fname = pcb_gui->fileselect("Load mentor edf netlist file...", "Picks a mentor edf file to load.\n", - default_file, ".edf", "mentor_sch", PCB_HID_FSD_READ); + default_file, ".edf", "mentor_sch", PCB_HID_FSD_READ, NULL); if (fname == NULL) return 1; if (default_file != NULL) { Index: trunk/src_plugins/import_mucs/mucs.c =================================================================== --- trunk/src_plugins/import_mucs/mucs.c (revision 23688) +++ trunk/src_plugins/import_mucs/mucs.c (revision 23689) @@ -76,7 +76,7 @@ fname = pcb_gui->fileselect("Load mucs routing session Resource File...", "Picks a mucs session resource file to load.\n" "This file could be generated by mucs-pcb\n", - default_file, ".l1", "unixplot", PCB_HID_FSD_READ); + default_file, ".l1", "unixplot", PCB_HID_FSD_READ, NULL); if (fname == NULL) { PCB_ACT_IRES(1); return 0; Index: trunk/src_plugins/import_tinycad/tinycad.c =================================================================== --- trunk/src_plugins/import_tinycad/tinycad.c (revision 23688) +++ trunk/src_plugins/import_tinycad/tinycad.c (revision 23689) @@ -181,7 +181,7 @@ if (!fname || !*fname) { fname = pcb_gui->fileselect("Load tinycad netlist file...", "Picks a tinycad netlist file to load.\n", - default_file, ".net", "tinycad", PCB_HID_FSD_READ); + default_file, ".net", "tinycad", PCB_HID_FSD_READ, NULL); if (fname == NULL) return 1; if (default_file != NULL) { Index: trunk/src_plugins/io_hyp/io_hyp.c =================================================================== --- trunk/src_plugins/io_hyp/io_hyp.c (revision 23688) +++ trunk/src_plugins/io_hyp/io_hyp.c (revision 23689) @@ -79,7 +79,7 @@ if ((fname == NULL) || (*fname == '\0')) { fname = pcb_gui->fileselect(_("Load .hyp file..."), - _("Picks a hyperlynx file to load.\n"), "default.hyp", ".hyp", "hyp", PCB_HID_FSD_READ); + _("Picks a hyperlynx file to load.\n"), "default.hyp", ".hyp", "hyp", PCB_HID_FSD_READ, NULL); } if (fname == NULL) { Index: trunk/src_plugins/io_kicad/read_net.c =================================================================== --- trunk/src_plugins/io_kicad/read_net.c (revision 23688) +++ trunk/src_plugins/io_kicad/read_net.c (revision 23689) @@ -225,7 +225,7 @@ if (!fname || !*fname) { fname = pcb_gui->fileselect("Load eeschema netlist file...", "Picks a eeschema netlist file to load.\n", - default_file, ".net", "eeschema", PCB_HID_FSD_READ); + default_file, ".net", "eeschema", PCB_HID_FSD_READ, NULL); if (fname == NULL) return 1; if (default_file != NULL) { Index: trunk/src_plugins/io_tedax/io_tedax.c =================================================================== --- trunk/src_plugins/io_tedax/io_tedax.c (revision 23688) +++ trunk/src_plugins/io_tedax/io_tedax.c (revision 23689) @@ -114,7 +114,7 @@ if ((fname == NULL) || (*fname == '\0')) { \ fname = pcb_gui->fileselect("Load tedax " #type " file...", \ "Picks a tedax " #type " file to load.\n", \ - default_file, ".tdx", "tedax-" #type, PCB_HID_FSD_READ); \ + default_file, ".tdx", "tedax-" #type, PCB_HID_FSD_READ, NULL); \ if (fname == NULL) \ return 1; \ if (default_file != NULL) { \ Index: trunk/src_plugins/lib_gtk_common/dlg_file_chooser.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_file_chooser.c (revision 23688) +++ trunk/src_plugins/lib_gtk_common/dlg_file_chooser.c (revision 23689) @@ -291,166 +291,3 @@ } -/* ---------------------------------------------- */ -/* how many files and directories to keep for the shortcuts */ -#define NHIST 8 -typedef struct ghid_file_history_struct { - /* - * an identifier as to which recent files pool this is. For example - * "boards", "eco", "netlists", etc. - */ - char *id; - - /* - * the array of files or directories - */ - char *history[NHIST]; -} ghid_file_history; - -static int n_recent_dirs = 0; -static ghid_file_history *recent_dirs = NULL; - -/* ---------------------------------------------- */ -/* Caller must g_free() the returned filename. */ -gchar *pcb_gtk_fileselect(GtkWidget *top_window, const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags) -{ - GtkWidget *dialog; - gchar *result = NULL; - gchar *path = NULL, *base = NULL; - int history_pool = -1; - int i; - - if (history_tag && *history_tag) { - /* - * I used a simple linear search here because the number of - * entries in the array is likely to be quite small (5, maybe 10 at - * the absolute most) and this function is used when pulling up - * a file dialog box instead of something called over and over - * again as part of moving elements or autorouting. So, keep it - * simple.... - */ - history_pool = 0; - while (history_pool < n_recent_dirs && strcmp(recent_dirs[history_pool].id, history_tag) != 0) { - history_pool++; - } - - /* - * If we counted all the way to n_recent_dirs, that means we - * didn't find our entry - */ - if (history_pool >= n_recent_dirs) { - n_recent_dirs++; - - recent_dirs = (ghid_file_history *) realloc(recent_dirs, n_recent_dirs * sizeof(ghid_file_history)); - - if (recent_dirs == NULL) { - fprintf(stderr, "ghid_fileselect(): realloc failed\n"); - exit(1); - } - - recent_dirs[history_pool].id = pcb_strdup(history_tag); - - /* Initialize the entries in our history list to all be NULL */ - for (i = 0; i < NHIST; i++) { - recent_dirs[history_pool].history[i] = NULL; - } - } - } - - if (default_file && *default_file) { - path = g_path_get_dirname(default_file); - base = g_path_get_basename(default_file); - } - - dialog = gtk_file_chooser_dialog_new(title, - GTK_WINDOW(top_window), - (flags & PCB_HID_FSD_READ) ? - GTK_FILE_CHOOSER_ACTION_OPEN : - GTK_FILE_CHOOSER_ACTION_SAVE, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); - - gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); - - if (path && *path) { - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), path); - g_free(path); - } - - if (base && *base) { - /* default file is only supposed to be for writing, not reading */ - if (!(flags & PCB_HID_FSD_READ)) { - gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), base); - } - g_free(base); - } - - for (i = 0; i < NHIST && recent_dirs[history_pool].history[i] != NULL; i++) { - gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(dialog), recent_dirs[history_pool].history[i], NULL); - } - - if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) { - result = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); - if (result != NULL) - path = g_path_get_dirname(result); - else - path = NULL; - - /* update the history list */ - if (path != NULL) { - char *tmps, *tmps2; - int k = 0; - - /* - * Put this at the top of the list and bump everything else - * down but skip any old entry of this directory - * - */ - while (k < NHIST && - recent_dirs[history_pool].history[k] != NULL && strcmp(recent_dirs[history_pool].history[k], path) == 0) { - k++; - } - tmps = recent_dirs[history_pool].history[k]; - recent_dirs[history_pool].history[0] = path; - for (i = 1; i < NHIST; i++) { - /* store our current entry, but skip duplicates */ - while (i + k < NHIST && - recent_dirs[history_pool].history[i + k] != NULL && - strcmp(recent_dirs[history_pool].history[i + k], path) == 0) { - k++; - } - - if (i + k < NHIST) - tmps2 = recent_dirs[history_pool].history[i + k]; - else - tmps2 = NULL; - - /* move down the one we stored last time */ - recent_dirs[history_pool].history[i] = tmps; - - /* and remember the displace entry */ - tmps = tmps2; - } - - /* - * the last one has fallen off the end of the history list - * so we need to free() it. - */ - if (tmps) { - free(tmps); - } - } - -#ifdef DEBUG - printf("\n\n-----\n\n"); - for (i = 0; i < NHIST; i++) { - printf("After update recent_dirs[%d].history[%d] = \"%s\"\n", - history_pool, i, recent_dirs[history_pool].history[i] != NULL ? recent_dirs[history_pool].history[i] : "NULL"); - } -#endif - - } - gtk_widget_destroy(dialog); - - - return result; -} Index: trunk/src_plugins/lib_gtk_common/dlg_file_chooser.h =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_file_chooser.h (revision 23688) +++ trunk/src_plugins/lib_gtk_common/dlg_file_chooser.h (revision 23689) @@ -9,4 +9,4 @@ gchar *ghid_dialog_file_select_save(GtkWidget *top_window, const gchar *title, gchar **path, const gchar *file, const gchar *shortcuts, const char **formats, const char **extensions, int *format); -gchar *pcb_gtk_fileselect(GtkWidget *top_window, const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags); + Index: trunk/src_plugins/lib_gtk_common/dlg_fileselect.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_fileselect.c (revision 23688) +++ trunk/src_plugins/lib_gtk_common/dlg_fileselect.c (revision 23689) @@ -111,7 +111,7 @@ return -1; } -char *pcb_gtk_fileselect2(pcb_gtk_common_t *com, const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub) +char *pcb_gtk_fileselect(pcb_gtk_common_t *com, const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub) { GtkWidget *top_window = com->top_window; gchar *path = NULL, *base = NULL, *res = NULL; Index: trunk/src_plugins/lib_gtk_common/dlg_fileselect.h =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_fileselect.h (revision 23688) +++ trunk/src_plugins/lib_gtk_common/dlg_fileselect.h (revision 23689) @@ -1,4 +1,4 @@ #include "global_typedefs.h" #include -char *pcb_gtk_fileselect2(pcb_gtk_common_t *com, const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub); +char *pcb_gtk_fileselect(pcb_gtk_common_t *com, const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub); Index: trunk/src_plugins/lib_gtk_hid/glue_hid.c =================================================================== --- trunk/src_plugins/lib_gtk_hid/glue_hid.c (revision 23688) +++ trunk/src_plugins/lib_gtk_hid/glue_hid.c (revision 23689) @@ -333,16 +333,11 @@ pcb_gtk_logv(ghidgui->hid_active, level, fmt, args); } -static char *ghid_fileselect(const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags) +static char *ghid_fileselect(const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub) { - return pcb_gtk_fileselect(ghid_port.top_window, title, descr, default_file, default_ext, history_tag, flags); + return pcb_gtk_fileselect(&ghidgui->common, title, descr, default_file, default_ext, history_tag, flags, sub); } -static char *ghid_fileselect2(const char *title, const char *descr, const char *default_file, const char *default_ext, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub) -{ - return pcb_gtk_fileselect2(ghid_port.top_window, title, descr, default_file, default_ext, history_tag, flags, sub); -} - static void *ghid_attr_dlg_new_(const char *id, 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 defx, int defy) { return ghid_attr_dlg_new(&ghidgui->common, id, attrs, n_attrs, results, title, caller_data, modal, button_cb, defx, defy); @@ -490,7 +485,6 @@ dst->log = ghid_log; dst->logv = ghid_logv; dst->fileselect = ghid_fileselect; - dst->fileselect2 = ghid_fileselect2; dst->attr_dlg_new = ghid_attr_dlg_new_; dst->attr_dlg_run = ghid_attr_dlg_run; dst->attr_dlg_free = ghid_attr_dlg_free; Index: trunk/src_plugins/renumber/renumber.c =================================================================== --- trunk/src_plugins/renumber/renumber.c (revision 23688) +++ trunk/src_plugins/renumber/renumber.c (revision 23689) @@ -93,7 +93,7 @@ name = pcb_gui->fileselect(_("Save Renumber Annotation File As ..."), _("Choose a file to record the renumbering to.\n" "This file may be used to back annotate the\n" - "change to the schematics.\n"), default_file, ".eco", "eco", 0); + "change to the schematics.\n"), default_file, ".eco", "eco", 0, NULL); free_name = pcb_true; } Index: trunk/src_plugins/script/script_act.c =================================================================== --- trunk/src_plugins/script/script_act.c (revision 23688) +++ trunk/src_plugins/script/script_act.c (revision 23689) @@ -159,7 +159,7 @@ { script_dlg_t *ctx = caller_data; int failed; - char *tmp, *fn = pcb_gui->fileselect("script to load", "Select a script file to load", NULL, NULL, "script", PCB_HID_FSD_READ); + char *tmp, *fn = pcb_gui->fileselect("script to load", "Select a script file to load", NULL, NULL, "script", PCB_HID_FSD_READ, NULL); pcb_hid_dad_buttons_t clbtn[] = {{"Cancel", -1}, {"ok", 0}, {NULL, 0}}; typedef struct { PCB_DAD_DECL_NOINIT(dlg) Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 23688) +++ trunk/src_plugins/vendordrill/vendor.c (revision 23689) @@ -150,7 +150,7 @@ _("Picks a vendor resource file to load.\n" "This file can contain drc settings for a\n" "particular vendor as well as a list of\n" - "predefined drills which are allowed."), default_file, ".res", "vendor", PCB_HID_FSD_READ); + "predefined drills which are allowed."), default_file, ".res", "vendor", PCB_HID_FSD_READ, NULL); if (fname == NULL) { PCB_ACT_IRES(1); return 0;