On Thu, Jun 28, 2001 at 01:07:33AM +0200, Lars Gullik Bjønnes wrote:

> John Levon <[EMAIL PROTECTED]> writes:
> 
> | now the file radio will be automagically selected.
> 
> What channel is that?

I get my kicks on Channel 6. In the meantime, the patch is attached here instead.

john

p.s. that's two mildly obscure song references to lyx-devel now. free punctuation
for anyone spotting them !

-- 
"Now that your records is selling, ain't it about time for you to be bailing out of 
the community 
 and place that you come from, you know your face has got to change, son !"
Index: src/frontends/xforms/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.101
diff -u -r1.101 ChangeLog
--- src/frontends/xforms/ChangeLog      2001/06/27 14:10:29     1.101
+++ src/frontends/xforms/ChangeLog      2001/06/27 22:16:58
@@ -1,3 +1,8 @@
+2001-06-27  John Levon  <[EMAIL PROTECTED]>
+
+       * FormPrint.C (input): modify to select radio_file
+         when the user uses the filename input
+ 
 2001-06-26  The LyX Project  <[EMAIL PROTECTED]>
 
        * combox.C (remove): send debug output to Debug::GUI.
Index: src/frontends/xforms/FormPrint.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormPrint.C,v
retrieving revision 1.28
diff -u -r1.28 FormPrint.C
--- src/frontends/xforms/FormPrint.C    2001/06/13 15:11:17     1.28
+++ src/frontends/xforms/FormPrint.C    2001/06/27 22:16:58
@@ -218,13 +218,23 @@
                        fl_set_input(dialog_->input_file, out_name.c_str());
                        input(0, 0);
                }
+
+               // select the file radio
+               if (!out_name.empty()) {
+                       fl_set_button(dialog_->radio_file, 1);
+                       fl_set_button(dialog_->radio_printer, 0);
+               }
        }
                
-       // 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 = ButtonPolicy::SMI_INVALID;
-//     }
+       // 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);
+       }
+ 
        return activate;
 }

Reply via email to