- // it is probably legal to have no printer name since the system will
- // have a default printer set. Or should have.
-// if (fl_get_button(dialog_->radio_printer)
-// && !strlen(fl_get_input(dialog_->input_printer))) {
-// activate = false;
-// }
- return activate;
-}
-
-
-void FormPrint::browse()
-{
- // Get the filename from the dialog
- string const filename = fl_get_input(dialog_->input_file);
-
- string const title = N_("Print to file");
- string const pattern = "*.ps";
-
- // Show the file browser dialog
- string const new_filename =
- browseFile(filename, title, pattern,
- make_pair(string(), string()),
- make_pair(string(), string()));
-
- // Save the filename to the dialog
- if (new_filename != filename && !new_filename.empty()) {
- fl_set_input(dialog_->input_file, new_filename.c_str());
- input(0, 0);
+ // if we type into file, select that as a target
+ if (ob == dialog_->input_file && fl_get_button(dialog_->radio_printer)
+ && strlen(fl_get_input(dialog_->input_file))) {
+ fl_set_button(dialog_->radio_file, 1);
+ fl_set_button(dialog_->radio_printer, 0);
+ } else if (ob == dialog_->input_printer) {
+ fl_set_button(dialog_->radio_file, 0);
+ fl_set_button(dialog_->radio_printer, 1);