From 63a556e943c1c20bc894aefd65187b5884081b60 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Thu, 5 Jun 2003 22:48:40 +0000 Subject: [PATCH] Scrap the parameter field from External dialogs. (John I think the layout of the Qt dialog is "sub-optimal". Sorry. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7114 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 6 + src/frontends/qt2/QExternal.C | 2 - src/frontends/qt2/ui/QExternalDialogBase.ui | 307 +++++++++++--------- src/frontends/xforms/ChangeLog | 6 + src/frontends/xforms/FormExternal.C | 7 - src/frontends/xforms/forms/form_external.fd | 20 +- 6 files changed, 182 insertions(+), 166 deletions(-) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 48a1c5abeb..92bb23e135 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,9 @@ +2003-06-04 Angus Leeming + + * QExternal.C + * ui/QExternalDialogBase.ui: remove the widget to input the removed + InsetExternal::Params::parameters variable. + 2003-06-03 Angus Leeming * Dialogs.C (build): change the External dialog button policy to diff --git a/src/frontends/qt2/QExternal.C b/src/frontends/qt2/QExternal.C index 01317f831d..e9823b2f0c 100644 --- a/src/frontends/qt2/QExternal.C +++ b/src/frontends/qt2/QExternal.C @@ -62,7 +62,6 @@ void QExternal::update_contents() InsetExternal::Params const & params = controller().params(); dialog_->fileED->setText(toqstr(params.filename)); - dialog_->paramsED->setText(toqstr(params.parameters)); dialog_->externalCO->setCurrentItem(controller().getTemplateNumber(params.templ.lyxName)); dialog_->externalTV->setText(toqstr(params.templ.helpText)); @@ -100,7 +99,6 @@ void QExternal::apply() InsetExternal::Params params = controller().params(); params.filename = fromqstr(dialog_->fileED->text()); - params.parameters = fromqstr(dialog_->paramsED->text()); params.templ = controller().getTemplate(dialog_->externalCO->currentItem()); diff --git a/src/frontends/qt2/ui/QExternalDialogBase.ui b/src/frontends/qt2/ui/QExternalDialogBase.ui index 9bd5ad1658..817e7db879 100644 --- a/src/frontends/qt2/ui/QExternalDialogBase.ui +++ b/src/frontends/qt2/ui/QExternalDialogBase.ui @@ -13,7 +13,7 @@ 0 0 - 349 + 345 514 @@ -34,134 +34,7 @@ spacing 6 - - QComboBox - - name - externalCO - - - toolTip - Available templates - - - - QTextView - - name - externalTV - - - toolTip - LaTeX error messages - - - - QLabel - - name - templateLA - - - text - &Template: - - - buddy - externalCO - - - toolTip - Available templates - - - - QLineEdit - - name - fileED - - - toolTip - Filename - - - - QLineEdit - - name - paramsED - - - toolTip - Parameters - - - - QPushButton - - name - editPB - - - text - &Edit file - - - toolTip - Edit the file externally - - - - QLabel - - name - fileLA - - - text - &File: - - - buddy - fileED - - - toolTip - Filename - - - - QPushButton - - name - browsePB - - - text - &Browse... - - - - QLabel - - name - paramsLA - - - text - &Parameters: - - - buddy - paramsED - - - toolTip - Parameters - - - + QGroupBox name @@ -379,7 +252,7 @@ - + QLayoutWidget name @@ -396,7 +269,7 @@ - + QLayoutWidget name @@ -483,6 +356,171 @@ + + QLayoutWidget + + name + Layout8 + + + + margin + 0 + + + spacing + 6 + + + QLabel + + name + fileLA + + + text + &File: + + + buddy + fileED + + + toolTip + Filename + + + + QLineEdit + + name + fileED + + + toolTip + Filename + + + + + + QLayoutWidget + + name + Layout10 + + + + margin + 0 + + + spacing + 6 + + + QPushButton + + name + browsePB + + + text + &Browse... + + + + QPushButton + + name + editPB + + + text + &Edit file + + + toolTip + Edit the file externally + + + + + + QLayoutWidget + + name + Layout12 + + + + margin + 0 + + + spacing + 6 + + + QLayoutWidget + + name + Layout11 + + + + margin + 0 + + + spacing + 6 + + + QLabel + + name + templateLA + + + text + &Template: + + + buddy + externalCO + + + toolTip + Available templates + + + + QComboBox + + name + externalCO + + + toolTip + Available templates + + + + + + QTextView + + name + externalTV + + + toolTip + LaTeX error messages + + + + @@ -510,12 +548,6 @@ QExternalDialogBase browseClicked() - - paramsED - textChanged(const QString&) - QExternalDialogBase - change_adaptor() - displayCB toggled(bool) @@ -556,7 +588,6 @@ fileED browsePB - paramsED editPB externalCO externalTV diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 3a6517cb7c..150de74c94 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,9 @@ +2003-06-04 Angus Leeming + + * FormExternal.C + * forms/form_external: remove the widget to input the removed + InsetExternal::Params::parameters variable. + 2003-06-04 John Levon * FormTabular.C: fix a crash on applying changes diff --git a/src/frontends/xforms/FormExternal.C b/src/frontends/xforms/FormExternal.C index 3155021b3a..0a5e0e03bc 100644 --- a/src/frontends/xforms/FormExternal.C +++ b/src/frontends/xforms/FormExternal.C @@ -40,13 +40,10 @@ void FormExternal::apply() InsetExternal::Params params = controller().params(); params.filename = fl_get_input(dialog_->input_filename); - params.parameters = fl_get_input(dialog_->input_parameters); int const choice = fl_get_choice(dialog_->choice_template) - 1; params.templ = controller().getTemplate(choice); - params.parameters = fl_get_input(dialog_->input_parameters); - params.lyxscale = strToInt(getString(dialog_->input_lyxscale)); if (params.lyxscale == 0) params.lyxscale = 100; @@ -81,16 +78,13 @@ void FormExternal::build() 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); // Disable for read-only documents. bcview().addReadOnly(dialog_->input_filename); bcview().addReadOnly(dialog_->button_browse); - bcview().addReadOnly(dialog_->input_parameters); // Trigger an input event for cut&paste with middle mouse button. setPrehandler(dialog_->input_filename); - setPrehandler(dialog_->input_parameters); // Activate ok/apply immediately upon input. fl_set_input_return(dialog_->input_filename, FL_RETURN_CHANGED); @@ -125,7 +119,6 @@ void FormExternal::update() InsetExternal::Params const & params = controller().params(); fl_set_input(dialog_->input_filename, params.filename.c_str()); - fl_set_input(dialog_->input_parameters, params.parameters.c_str()); int ID = controller().getTemplateNumber(params.templ.lyxName); if (ID < 0) ID = 0; diff --git a/src/frontends/xforms/forms/form_external.fd b/src/frontends/xforms/forms/form_external.fd index 675dd27789..06da9bc2d5 100644 --- a/src/frontends/xforms/forms/form_external.fd +++ b/src/frontends/xforms/forms/form_external.fd @@ -11,7 +11,7 @@ SnapGrid: 5 Name: form_external Width: 395 Height: 375 -Number of Objects: 14 +Number of Objects: 13 -------------------- class: FL_BOX @@ -67,24 +67,6 @@ name: button_browse callback: C_FormDialogView_InputCB argument: 0 --------------------- -class: FL_INPUT -type: NORMAL_INPUT -box: 90 230 195 25 -boxtype: FL_DOWN_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_LEFT -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Parameters:|#P -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_SouthWest FL_SouthEast -name: input_parameters -callback: C_FormDialogView_InputCB -argument: 0 - -------------------- class: FL_BUTTON type: NORMAL_BUTTON -- 2.39.2