]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormExternal.C
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / xforms / FormExternal.C
index 03e0e42333f3d8d6e91fe7be6e652baf777803f1..dfc7d0c4a2bf523f553194da9434af0ab619a9b4 100644 (file)
@@ -341,6 +341,7 @@ void FormExternal::build()
        bcview().addReadOnly(file_->button_browse);
        bcview().addReadOnly(file_->button_edit);
        bcview().addReadOnly(file_->choice_template);
+       bcview().addReadOnly(file_->check_draft);
 
        bcview().addReadOnly(lyxview_->check_show);
        bcview().addReadOnly(lyxview_->choice_show);
@@ -476,6 +477,8 @@ void FormExternal::update()
 
        updateComboChange();
 
+       fl_set_button(file_->check_draft, params.draft);
+
        setDisplay(lyxview_->check_show, lyxview_->choice_show,
                   lyxview_->input_displayscale,
                   params.display, params.lyxscale,
@@ -584,6 +587,8 @@ void FormExternal::apply()
        int const choice = fl_get_choice(file_->choice_template) - 1;
        params.settemplate(controller().getTemplate(choice).lyxName);
 
+       params.draft = fl_get_button(file_->check_draft);
+
        getDisplay(params.display, params.lyxscale,
                   lyxview_->check_show, lyxview_->choice_show,
                   lyxview_->input_displayscale);
@@ -624,7 +629,12 @@ ButtonPolicy::SMInput FormExternal::input(FL_OBJECT * ob, long)
        } else if (ob == file_->button_browse) {
 
                string const in_name  = fl_get_input(file_->input_file);
-               string const out_name = controller().Browse(in_name);
+
+               int const choice = fl_get_choice(file_->choice_template) - 1;
+               string const template_name =
+                       controller().getTemplate(choice).lyxName;
+               string const out_name =
+                       controller().browse(in_name, template_name);
                fl_set_input(file_->input_file, out_name.c_str());
 
        } else if (ob == file_->button_edit) {