diff --git a/src/frontends/kde/ChangeLog b/src/frontends/kde/ChangeLog index e69de29bb2..b9e741ef8f 100644 --- a/src/frontends/kde/ChangeLog +++ b/src/frontends/kde/ChangeLog @@ -0,0 +1,11 @@ +2000-01-12 John Levon + + * FormTabularCreate.C: use LFUN_INSET_TABULAR Dispatch + instead of creating by hand + + * FormUrl.C: add accelerators for Close and Cancel + + * paradlg.C: add accelerators for Close and Cancel, + clean the code up a little + + * printdlg.C: add FIXME for later diff --git a/src/frontends/kde/FormTabularCreate.C b/src/frontends/kde/FormTabularCreate.C index 212ad982dd..ddab584b0d 100644 --- a/src/frontends/kde/FormTabularCreate.C +++ b/src/frontends/kde/FormTabularCreate.C @@ -22,6 +22,7 @@ #include "QtLyXView.h" #include "BufferView.h" #include "insets/insettabular.h" +#include "support/lstrings.h" FormTabularCreate::FormTabularCreate(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0) @@ -42,9 +43,8 @@ void FormTabularCreate::apply(unsigned int rows, unsigned cols) if (!lv_->view()->available()) return; - InsetTabular * in = new InsetTabular(*lv_->buffer(), rows, cols); - if (!lv_->view()->open_new_inset(in)) - delete in; + string tmp = tostr(rows) + " " + tostr(cols); + lv_->getLyXFunc()->Dispatch(LFUN_INSET_TABULAR, tmp); } void FormTabularCreate::show() diff --git a/src/frontends/kde/FormUrl.C b/src/frontends/kde/FormUrl.C index 4548df407d..09e7de0164 100644 --- a/src/frontends/kde/FormUrl.C +++ b/src/frontends/kde/FormUrl.C @@ -83,14 +83,14 @@ void FormUrl::update(bool switched) dialog_->urlname->setFocusPolicy(QWidget::NoFocus); dialog_->url->setFocusPolicy(QWidget::NoFocus); dialog_->buttonOk->setEnabled(false); - dialog_->buttonCancel->setText(_("Close")); + dialog_->buttonCancel->setText(_("&Close")); dialog_->htmlurl->setEnabled(false); } else { dialog_->urlname->setFocusPolicy(QWidget::StrongFocus); dialog_->url->setFocusPolicy(QWidget::StrongFocus); dialog_->url->setFocus(); dialog_->buttonOk->setEnabled(true); - dialog_->buttonCancel->setText(_("Cancel")); + dialog_->buttonCancel->setText(_("&Cancel")); dialog_->htmlurl->setEnabled(true); } } diff --git a/src/frontends/kde/paradlg.C b/src/frontends/kde/paradlg.C index a23c92a051..66f00a9b83 100644 --- a/src/frontends/kde/paradlg.C +++ b/src/frontends/kde/paradlg.C @@ -86,7 +86,7 @@ void ParaDialog::setReadOnly(bool readonly) ok->setEnabled(!readonly); apply->setEnabled(!readonly); restore->setEnabled(!readonly); - cancel->setText(readonly ? _("Close") : _("Cancel")); + cancel->setText(readonly ? _("&Close") : _("&Cancel")); } void ParaDialog::setLabelWidth(const char *text) @@ -130,53 +130,30 @@ void ParaDialog::setChecks(bool labove, bool lbelow, bool pabove, bool pbelow, b void ParaDialog::setSpace(VSpace::vspace_kind kindabove, VSpace::vspace_kind kindbelow, bool keepabove, bool keepbelow) { - switch (kindabove) { - case VSpace::NONE: - generalpage->abovepage->spaceabove->setCurrentItem(0); - break; - case VSpace::DEFSKIP: - generalpage->abovepage->spaceabove->setCurrentItem(1); - break; - case VSpace::SMALLSKIP: - generalpage->abovepage->spaceabove->setCurrentItem(2); - break; - case VSpace::MEDSKIP: - generalpage->abovepage->spaceabove->setCurrentItem(3); - break; - case VSpace::BIGSKIP: - generalpage->abovepage->spaceabove->setCurrentItem(4); - break; - case VSpace::VFILL: - generalpage->abovepage->spaceabove->setCurrentItem(5); - break; - case VSpace::LENGTH: - generalpage->abovepage->spaceabove->setCurrentItem(6); - break; - } - switch (kindbelow) { - case VSpace::NONE: - generalpage->belowpage->spacebelow->setCurrentItem(0); - break; - case VSpace::DEFSKIP: - generalpage->belowpage->spacebelow->setCurrentItem(1); - break; - case VSpace::SMALLSKIP: - generalpage->belowpage->spacebelow->setCurrentItem(2); - break; - case VSpace::MEDSKIP: - generalpage->belowpage->spacebelow->setCurrentItem(3); - break; - case VSpace::BIGSKIP: - generalpage->belowpage->spacebelow->setCurrentItem(4); - break; - case VSpace::VFILL: - generalpage->belowpage->spacebelow->setCurrentItem(5); - break; - case VSpace::LENGTH: - generalpage->belowpage->spacebelow->setCurrentItem(6); - break; - } + int item; + switch (kindabove) { + case VSpace::NONE: item = 0; break; + case VSpace::DEFSKIP: item = 1; break; + case VSpace::SMALLSKIP: item = 2; break; + case VSpace::MEDSKIP: item = 3; break; + case VSpace::BIGSKIP: item = 4; break; + case VSpace::VFILL: item = 5; break; + case VSpace::LENGTH: item = 6; break; + } + generalpage->abovepage->spaceabove->setCurrentItem(item); + + switch (kindbelow) { + case VSpace::NONE: item = 0; break; + case VSpace::DEFSKIP: item = 1; break; + case VSpace::SMALLSKIP: item = 2; break; + case VSpace::MEDSKIP: item = 3; break; + case VSpace::BIGSKIP: item = 4; break; + case VSpace::VFILL: item = 5; break; + case VSpace::LENGTH: item = 6; break; + } + generalpage->belowpage->spacebelow->setCurrentItem(item); + generalpage->abovepage->spaceabovevalue->setEnabled(kindabove == VSpace::LENGTH); generalpage->abovepage->spaceabovevalueunits->setEnabled(kindabove == VSpace::LENGTH); generalpage->abovepage->spaceaboveplus->setEnabled(kindabove == VSpace::LENGTH); diff --git a/src/frontends/kde/printdlg.C b/src/frontends/kde/printdlg.C index 13c998f41b..6df7e0cf6a 100644 --- a/src/frontends/kde/printdlg.C +++ b/src/frontends/kde/printdlg.C @@ -18,6 +18,8 @@ #define Inherited PrintDialogData +/* FIXME: tab order is out of whack */ + PrintDialog::PrintDialog(FormPrint *f, QWidget* parent, const char * name) : PrintDialogData(parent, name), form_(f) {