]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormExternal.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / FormExternal.C
index edf65d0c4d6609a8868ea56b10b6b2ae31cabb8d..b44895f1e2c9d25d0b61e422fd9f94becd97bb45 100644 (file)
@@ -1,16 +1,13 @@
-/* This file is part of
- * ====================================================== 
- *
- *           LyX, The Document Processor
- *
- *           Copyright 2000-2001 The LyX Team.
- *
- * ======================================================
- *
+/**
  * \file FormExternal.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
  * \author Asger Alstrup
  * \author John Levon
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * \author Angus Leeming 
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 #include "xformsBC.h"
 #include "ControlExternal.h"
 #include "FormExternal.h"
-#include "form_external.h"
+#include "forms/form_external.h"
 #include "gettext.h"
 #include "xforms_helpers.h"
 #include "helper_funcs.h"
 
-typedef FormCB<ControlExternal, FormDB<FD_form_external> > base_class;
+#include "support/lstrings.h"
+#include FORMS_H_LOCATION
+
+typedef FormCB<ControlExternal, FormDB<FD_external> > base_class;
 
-FormExternal::FormExternal(ControlExternal & c)
-       : base_class(c, _("Edit external file"))
+FormExternal::FormExternal()
+       : base_class(_("Edit external file"))
 {}
 
 
@@ -48,15 +48,21 @@ void FormExternal::apply()
 
 void FormExternal::build()
 {
-       dialog_.reset(build_external());
+       dialog_.reset(build_external(this));
 
        string const choice =
-           " " + getStringFromVector(controller().getTemplates(), " | ") + " ";
+               " " + getStringFromVector(controller().getTemplates(), " | ") + " ";
        fl_addto_choice(dialog_->choice_template, choice.c_str());
 
+       fl_set_input_return (dialog_->input_filename,  FL_RETURN_CHANGED);
+       fl_set_input_return (dialog_->input_parameters, FL_RETURN_CHANGED);
+
+       setPrehandler(dialog_->input_filename);
+       setPrehandler(dialog_->input_parameters);
+
        bc().setOK(dialog_->button_ok);
        bc().setApply(dialog_->button_apply);
-       bc().setCancel(dialog_->button_cancel);
+       bc().setCancel(dialog_->button_close);
 
        bc().addReadOnly(dialog_->input_filename);
        bc().addReadOnly(dialog_->button_filenamebrowse);