Re: Candidates for stable
Am Samstag, den 22.10.2016, 13:35 -0400 schrieb Richard Heck: > OK, looks safe enough. Thanks, all done now. Jürgen signature.asc Description: This is a digitally signed message part
Re: Candidates for stable
On 10/22/2016 01:32 PM, Jürgen Spitzmüller wrote: > Am Samstag, den 15.10.2016, 11:11 +0200 schrieb Jürgen Spitzmüller: >> * Improve bibliography info display: >> http://www.lyx.org/trac/changeset/ba171930/lyxgit >> http://www.lyx.org/trac/changeset/2c4673af/lyxgit >> http://www.lyx.org/trac/changeset/1c725c91/lyxgit >> http://www.lyx.org/trac/changeset/67da1431/lyxgit >> http://www.lyx.org/trac/changeset/b941d939/lyxgit >> http://www.lyx.org/trac/changeset/2267f4ae/lyxgit >> http://www.lyx.org/trac/changeset/85f1259b/lyxgit >> http://www.lyx.org/trac/changeset/b8486ba6/lyxgit > Now only these are left. The fixes are rather cosmetic, but make the > bibliography display actually useful with biblatex databases. > > Richard, if you agree on backporting, I would cherry-pick each of the > above commits in their chronological order. > > After that, my stack for stable is empty for the time being. OK, looks safe enough. Richard
Re: Candidates for stable
Am Samstag, den 15.10.2016, 11:11 +0200 schrieb Jürgen Spitzmüller: > * Improve bibliography info display: > http://www.lyx.org/trac/changeset/ba171930/lyxgit > http://www.lyx.org/trac/changeset/2c4673af/lyxgit > http://www.lyx.org/trac/changeset/1c725c91/lyxgit > http://www.lyx.org/trac/changeset/67da1431/lyxgit > http://www.lyx.org/trac/changeset/b941d939/lyxgit > http://www.lyx.org/trac/changeset/2267f4ae/lyxgit > http://www.lyx.org/trac/changeset/85f1259b/lyxgit > http://www.lyx.org/trac/changeset/b8486ba6/lyxgit Now only these are left. The fixes are rather cosmetic, but make the bibliography display actually useful with biblatex databases. Richard, if you agree on backporting, I would cherry-pick each of the above commits in their chronological order. After that, my stack for stable is empty for the time being. Thanks Jürgen signature.asc Description: This is a digitally signed message part
Re: Candidates for stable
On 10/21/2016 01:27 PM, Jürgen Spitzmüller wrote: > Am Samstag, den 15.10.2016, 11:11 +0200 schrieb Jürgen Spitzmüller: >> * Refs dialog redesign: >> http://www.lyx.org/trac/changeset/774becf6/lyxgit >> http://www.lyx.org/trac/changeset/47ea77a8/lyxgit > Patch for this attached. Also good. Thanks for all of this work. Richard
Re: Candidates for stable
On 10/21/2016 01:24 PM, Jürgen Spitzmüller wrote: > Am Samstag, den 15.10.2016, 11:11 +0200 schrieb Jürgen Spitzmüller: >> * Citation dialog redesign: >> http://www.lyx.org/trac/changeset/824e24ca/lyxgit >> http://www.lyx.org/trac/changeset/5225418d/lyxgit >> http://www.lyx.org/trac/changeset/0c1a023c/lyxgit >> >> * Keep citation style settings both within and between sessions >> (#10256): >> http://www.lyx.org/trac/changeset/3294b16b/lyxgit > Combined patch for these fixes attached. Good. rh
Re: Candidates for stable
Am Samstag, den 15.10.2016, 11:11 +0200 schrieb Jürgen Spitzmüller: > * Refs dialog redesign: > http://www.lyx.org/trac/changeset/774becf6/lyxgit > http://www.lyx.org/trac/changeset/47ea77a8/lyxgit Patch for this attached. Jürgendiff --git a/src/frontends/qt4/GuiRef.cpp b/src/frontends/qt4/GuiRef.cpp index 0d21387..3bb8988 100644 --- a/src/frontends/qt4/GuiRef.cpp +++ b/src/frontends/qt4/GuiRef.cpp @@ -13,6 +13,8 @@ #include "GuiRef.h" +#include "GuiApplication.h" + #include "Buffer.h" #include "BufferList.h" #include "FuncRequest.h" @@ -48,6 +50,26 @@ GuiRef::GuiRef(GuiView & lv) at_ref_ = false; + // The filter bar + filter_ = new FancyLineEdit(this); +#if QT_VERSION >= 0x040600 + filter_->setButtonPixmap(FancyLineEdit::Right, getPixmap("images/", "editclear", "svgz,png")); + filter_->setButtonVisible(FancyLineEdit::Right, true); + filter_->setButtonToolTip(FancyLineEdit::Right, qt_("Clear text")); + filter_->setAutoHideButton(FancyLineEdit::Right, true); +#endif +#if QT_VERSION >= 0x040700 + filter_->setPlaceholderText(qt_("All available labels")); +#endif + filter_->setToolTip(qt_("Enter string to filter the list of available labels")); + + filterBarL->addWidget(filter_, 0); + findKeysLA->setBuddy(filter_); + + sortingCO->addItem(qt_("By Occurrence"), "unsorted"); + sortingCO->addItem(qt_("Alphabetically (Case-Insensitive)"), "nocase"); + sortingCO->addItem(qt_("Alphabetically (Case-Sensitive)"), "case"); + refsTW->setColumnCount(1); refsTW->header()->setVisible(false); @@ -60,9 +82,13 @@ GuiRef::GuiRef(GuiView & lv) connect(typeCO, SIGNAL(activated(int)), this, SLOT(changed_adaptor())); connect(referenceED, SIGNAL(textChanged(QString)), + this, SLOT(refTextChanged(QString))); + connect(referenceED, SIGNAL(textChanged(QString)), this, SLOT(changed_adaptor())); - connect(findLE, SIGNAL(textEdited(QString)), + connect(filter_, SIGNAL(textEdited(QString)), this, SLOT(filterLabels())); + connect(filter_, SIGNAL(rightButtonClicked()), + this, SLOT(resetFilter())); connect(csFindCB, SIGNAL(clicked()), this, SLOT(filterLabels())); connect(nameED, SIGNAL(textChanged(QString)), @@ -73,10 +99,8 @@ GuiRef::GuiRef(GuiView & lv) this, SLOT(selectionChanged())); connect(refsTW, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(refSelected(QTreeWidgetItem *))); - connect(sortCB, SIGNAL(clicked()), + connect(sortingCO, SIGNAL(activated(int)), this, SLOT(sortToggled())); - connect(caseSensitiveCB, SIGNAL(clicked()), - this, SLOT(caseSensitiveToggled())); connect(groupCB, SIGNAL(clicked()), this, SLOT(groupToggled())); connect(gotoPB, SIGNAL(clicked()), @@ -167,6 +191,14 @@ void GuiRef::refHighlighted(QTreeWidgetItem * sel) } +void GuiRef::refTextChanged(QString const & str) +{ + gotoPB->setEnabled(!str.isEmpty()); + typeCO->setEnabled(!str.isEmpty()); + typeLA->setEnabled(!str.isEmpty()); +} + + void GuiRef::refSelected(QTreeWidgetItem * sel) { if (isBufferReadonly()) @@ -191,13 +223,6 @@ void GuiRef::refSelected(QTreeWidgetItem * sel) void GuiRef::sortToggled() { - caseSensitiveCB->setEnabled(sortCB->isChecked()); - redoRefs(); -} - - -void GuiRef::caseSensitiveToggled() -{ redoRefs(); } @@ -270,7 +295,7 @@ void GuiRef::updateContents() int const thebuffer = theBufferList().bufferNum(buffer().fileName()); // restore the buffer combo setting for new insets - if (params_["reference"].empty() && restored_buffer_ != -1 + if (new_inset && restored_buffer_ != -1 && restored_buffer_ < bufferCO->count() && thebuffer == active_buffer_) bufferCO->setCurrentIndex(restored_buffer_); else { @@ -316,16 +341,14 @@ bool GuiRef::typeAllowed() void GuiRef::setGoBack() { gotoPB->setText(qt_(" Back")); - gotoPB->setToolTip(""); - gotoPB->setToolTip(qt_("Jump back")); + gotoPB->setToolTip(qt_("Jump back to the original cursor location")); } void GuiRef::setGotoRef() { gotoPB->setText(qt_(" to Label")); - gotoPB->setToolTip(""); - gotoPB->setToolTip(qt_("Jump to label")); + gotoPB->setToolTip(qt_("Jump to the selected label")); } @@ -392,13 +415,14 @@ void GuiRef::redoRefs() if (noprefix) refsCategories.insert(0, qt_("")); - if (sortCB->isEnabled() && sortCB->isChecked()) { - if(caseSensitiveCB->isEnabled() && caseSensitiveCB->isChecked()) - qSort(refsStrings.begin(), refsStrings.end()); - else - qSort(refsStrings.begin(), refsStrings.end(), - caseInsensitiveLessThan /*defined above*/); - } + QString const sort = sortingCO->isEnabled() ? +sortingCO->itemData(sortingCO->currentIndex()).toString() +: QString(); + if (sort == "nocase") + qSort(refsStrings.begin(), refsStrings.end(), + caseInsensitiveLessThan /*defined above*/); + else if (sort == "case") + qSort(refsStrings.begin(), refsStrings.end()); if (groupCB->isChecked()) { QList refsCats; @@ -459,6 +483,10 @@ void GuiRef::redoRefs() // Re-activate the emission of signals by these widgets.
Re: Candidates for stable
Am Samstag, den 15.10.2016, 11:11 +0200 schrieb Jürgen Spitzmüller: > * Citation dialog redesign: > http://www.lyx.org/trac/changeset/824e24ca/lyxgit > http://www.lyx.org/trac/changeset/5225418d/lyxgit > http://www.lyx.org/trac/changeset/0c1a023c/lyxgit > > * Keep citation style settings both within and between sessions > (#10256): > http://www.lyx.org/trac/changeset/3294b16b/lyxgit Combined patch for these fixes attached. Jürgendiff --git a/src/frontends/qt4/GuiCitation.cpp b/src/frontends/qt4/GuiCitation.cpp index 44118c7..872d304 100644 --- a/src/frontends/qt4/GuiCitation.cpp +++ b/src/frontends/qt4/GuiCitation.cpp @@ -16,6 +16,7 @@ #include "GuiCitation.h" +#include "GuiApplication.h" #include "GuiSelectionManager.h" #include "LyXToolBox.h" #include "qt_helpers.h" @@ -34,6 +35,7 @@ #include "support/lstrings.h" #include +#include #include #include #include @@ -93,6 +95,36 @@ GuiCitation::GuiCitation(GuiView & lv) { setupUi(this); + // The filter bar + filter_ = new FancyLineEdit(this); +#if QT_VERSION >= 0x040600 + filter_->setButtonPixmap(FancyLineEdit::Right, getPixmap("images/", "editclear", "svgz,png")); + filter_->setButtonVisible(FancyLineEdit::Right, true); + filter_->setButtonToolTip(FancyLineEdit::Right, qt_("Clear text")); + filter_->setAutoHideButton(FancyLineEdit::Right, true); +#endif +#if QT_VERSION >= 0x040700 + filter_->setPlaceholderText(qt_("All avail. citations")); +#endif + + filterBarL->addWidget(filter_, 0); + findKeysLA->setBuddy(filter_); + + // Add search options as button menu + regexp_ = new QAction(qt_("Regular e"), this); + regexp_->setCheckable(true); + casesense_ = new QAction(qt_("Case se"), this); + casesense_->setCheckable(true); + instant_ = new QAction(qt_("Search as you "), this); + instant_->setCheckable(true); + instant_->setChecked(true); + + QMenu * searchOpts = new QMenu(this); + searchOpts->addAction(regexp_); + searchOpts->addAction(casesense_); + searchOpts->addAction(instant_); + searchOptionsPB->setMenu(searchOpts); + connect(citationStyleCO, SIGNAL(activated(int)), this, SLOT(on_citationStyleCO_currentIndexChanged(int))); connect(fulllistCB, SIGNAL(clicked()), @@ -103,8 +135,6 @@ GuiCitation::GuiCitation(GuiView & lv) this, SLOT(updateStyles())); connect(textAfterED, SIGNAL(textChanged(QString)), this, SLOT(updateStyles())); - connect(findLE, SIGNAL(returnPressed()), - this, SLOT(on_searchPB_clicked())); connect(textBeforeED, SIGNAL(returnPressed()), this, SLOT(on_okPB_clicked())); connect(textAfterED, SIGNAL(returnPressed()), @@ -119,7 +149,20 @@ GuiCitation::GuiCitation(GuiView & lv) connect(selectionManager, SIGNAL(okHook()), this, SLOT(on_okPB_clicked())); - setFocusProxy(availableLV); + connect(filter_, SIGNAL(rightButtonClicked()), + this, SLOT(resetFilter())); + connect(filter_, SIGNAL(textEdited(QString)), + this, SLOT(filterChanged(QString))); + connect(filter_, SIGNAL(returnPressed()), + this, SLOT(filterPressed())); + connect(regexp_, SIGNAL(triggered()), + this, SLOT(regexChanged())); + connect(casesense_, SIGNAL(triggered()), + this, SLOT(caseChanged())); + connect(instant_, SIGNAL(triggered(bool)), + this, SLOT(instantChanged(bool))); + + setFocusProxy(filter_); } @@ -152,42 +195,12 @@ void GuiCitation::applyView() void GuiCitation::showEvent(QShowEvent * e) { - findLE->clear(); + filter_->clear(); availableLV->setFocus(); - - // Set the minimal size of the QToolbox. Without this, the size of the - // QToolbox is only determined by values in the ui file (e.g. computed by - // qtcreator) and therefore causes portability and localisation issues. Note - // that the page widgets must have a layout with layoutSizeContraint = - // SetMinimumSize or similar. KNOWN ISSUE: the calculations are incorrect - // the first time the dialog is shown. This problem is mitigated by the fact - // that LyX remembers the dialog sizes between sessions. - QSize minimum_size = QSize(0,0); - // Compute the max of the minimal sizes of the pages - QWidget * page; - for (int i = 0; (page = citationTB->widget(i)); ++i) - minimum_size = minimum_size.expandedTo(page->minimumSizeHint()); - // Add the height of the tabs - if (citationTB->currentWidget()) - minimum_size.rheight() += citationTB->height() - - citationTB->currentWidget()->height(); - citationTB->setMinimumSize(minimum_size); - DialogView::showEvent(e); } -void GuiCitation::on_citationTB_currentChanged(int i) -{ - if (i == 0) - findLE->setFocus(); - else if (citationStyleCO->isEnabled()) - citationStyleCO->setFocus(); - else - textAfterED->setFocus(); -} - - void GuiCitation::on_okPB_clicked() { applyView(); @@ -212,6 +225,7 @@ void GuiCitation::on_applyPB_clicked() void GuiCitation::on_restorePB_clicked() { init(); + updateFilterHint(); } @@ -355,9 +369,11 @@ void GuiCitation::updateInfo(BiblioInfo const & bi, QModelIndex const & idx) { if (!idx.isValid() || bi.empty()) { infoML->document()->clear(); +
Re: Candidates for stable
On 10/21/2016 12:47 PM, Jürgen Spitzmüller wrote: > Am Samstag, den 15.10.2016, 11:11 +0200 schrieb Jürgen Spitzmüller: >> * Fix label display in linguistic examples: >> http://www.lyx.org/trac/changeset/91f5d909/lyxgit > Attached a patch for this one. OK. rh
Re: Candidates for stable
Am Samstag, den 15.10.2016, 11:11 +0200 schrieb Jürgen Spitzmüller: > * Fix label display in linguistic examples: > http://www.lyx.org/trac/changeset/91f5d909/lyxgit Attached a patch for this one. Jürgendiff --git a/lib/layouts/linguistics.module b/lib/layouts/linguistics.module index c2f3df1..5c72882 100644 --- a/lib/layouts/linguistics.module +++ b/lib/layouts/linguistics.module @@ -9,6 +9,29 @@ Format 60 +# These are no real counters, but they are needed +# to get proper labels for the enumerate-like +# example styles. +Counter example + Within chapter + LabelString "Examples:" +End + +Counter examplei + Within chapter + LabelString "Examples:" +End + +Counter subexample + Within examplei + LabelString "Subexample:" +End + +Counter subexamplei + Within examplei + LabelString "Subexample:" +End + # single numbered example with covington.sty Style Numbered_Example_(multiline) LatexType Environment @@ -46,7 +69,8 @@ Style Numbered_Examples_(consecutive) CopyStyle Numbered_Example_(multiline) LatexType Item_Environment LatexName covexamples - LabelString "Examples:" + LabelType Enumerate + LabelCounter "example" Argument item:1 LabelString "Custom Numbering|s" Tooltip "Customize the numeration" @@ -65,7 +89,7 @@ End Style Subexample CopyStyle Numbered_Examples_(consecutive) LatexName subexample - LabelString "Subexample:" + LabelCounter "subexample" Requires covington,enumitem Preamble \newenvironment{subexample}{% signature.asc Description: This is a digitally signed message part
Re: Candidates for stable
On 10/15/2016 05:11 AM, Jürgen Spitzmüller wrote: > Richard, > > these are the accumulated fixes I did in master that are candidates for > stable when the door towards 2.2.3 is open: > > * Citation dialog redesign: > http://www.lyx.org/trac/changeset/824e24ca/lyxgit > http://www.lyx.org/trac/changeset/5225418d/lyxgit > http://www.lyx.org/trac/changeset/0c1a023c/lyxgit > > * Keep citation style settings both within and between sessions > (#10256): > http://www.lyx.org/trac/changeset/3294b16b/lyxgit > > * Refs dialog redesign: > http://www.lyx.org/trac/changeset/774becf6/lyxgit > http://www.lyx.org/trac/changeset/47ea77a8/lyxgit > > * Fix label display in linguistic examples: > http://www.lyx.org/trac/changeset/91f5d909/lyxgit > > * Improve bibliography info display: > http://www.lyx.org/trac/changeset/ba171930/lyxgit > http://www.lyx.org/trac/changeset/2c4673af/lyxgit > http://www.lyx.org/trac/changeset/1c725c91/lyxgit > http://www.lyx.org/trac/changeset/67da1431/lyxgit > http://www.lyx.org/trac/changeset/b941d939/lyxgit > http://www.lyx.org/trac/changeset/2267f4ae/lyxgit > http://www.lyx.org/trac/changeset/85f1259b/lyxgit > http://www.lyx.org/trac/changeset/b8486ba6/lyxgit > > * Move/fix wrap check for simple search/replace to lyxfind (#10378): > http://www.lyx.org/trac/changeset/c0a425a3/lyxgit > > Do you want me to post individual patches for each of the proposed fix? I'll look at these shortly. But no, you don't need to post patches. Richard
Candidates for stable
Richard, these are the accumulated fixes I did in master that are candidates for stable when the door towards 2.2.3 is open: * Citation dialog redesign: http://www.lyx.org/trac/changeset/824e24ca/lyxgit http://www.lyx.org/trac/changeset/5225418d/lyxgit http://www.lyx.org/trac/changeset/0c1a023c/lyxgit * Keep citation style settings both within and between sessions (#10256): http://www.lyx.org/trac/changeset/3294b16b/lyxgit * Refs dialog redesign: http://www.lyx.org/trac/changeset/774becf6/lyxgit http://www.lyx.org/trac/changeset/47ea77a8/lyxgit * Fix label display in linguistic examples: http://www.lyx.org/trac/changeset/91f5d909/lyxgit * Improve bibliography info display: http://www.lyx.org/trac/changeset/ba171930/lyxgit http://www.lyx.org/trac/changeset/2c4673af/lyxgit http://www.lyx.org/trac/changeset/1c725c91/lyxgit http://www.lyx.org/trac/changeset/67da1431/lyxgit http://www.lyx.org/trac/changeset/b941d939/lyxgit http://www.lyx.org/trac/changeset/2267f4ae/lyxgit http://www.lyx.org/trac/changeset/85f1259b/lyxgit http://www.lyx.org/trac/changeset/b8486ba6/lyxgit * Move/fix wrap check for simple search/replace to lyxfind (#10378): http://www.lyx.org/trac/changeset/c0a425a3/lyxgit Do you want me to post individual patches for each of the proposed fix? Jürgen signature.asc Description: This is a digitally signed message part