Compare commits

...

5 Commits

Author SHA1 Message Date
Kornel Benko
6a07b642d5 Update sk.po 2024-09-21 22:00:24 +02:00
Kornel Benko
3ca5425f94 Cmake build: Omit "PRE_BUILD" in add_custom_command()
According to cmake warning output while configuring:
CMake Error (dev) at po/CMakeLists.txt:72 (ADD_CUSTOM_COMMAND):
  The following keywords are not supported when using
  add_custom_command(OUTPUT): PRE_BUILD.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  po/CMakeLists.txt:106 (add_gettext_python)
This error is for project developers. Use -Wno-error=dev to suppress it.

(cherry picked from commit 13f275d0aa)
2024-09-21 21:59:56 +02:00
Juergen Spitzmueller
897fa08919 Only \protect labels in \thanks notes
See https://marc.info/?l=lyx-users&m=136394387505489
2024-09-21 13:36:55 -04:00
Juergen Spitzmueller
59d61892e4 GuiBibTeX: introduce way to toggle between absolute and relative local paths (#13097) 2024-09-21 13:27:37 -04:00
Richard Kimberly Heck
55f6f6365a Begin 2.4.3 development 2024-09-21 13:26:34 -04:00
9 changed files with 118 additions and 108 deletions

View File

@ -1,9 +1,9 @@
dnl Process with autoconf to generate configure script -*- sh -*-
AC_INIT([LyX],[2.4.2],[lyx-devel@lists.lyx.org],[lyx])
AC_INIT([LyX],[2.4.3~devel],[lyx-devel@lists.lyx.org],[lyx])
AC_PRESERVE_HELP_ORDER
# Use ISO format only. The frontend needs to parse this
AC_SUBST(LYX_DATE, ["2024-09-19"])
AC_SUBST(LYX_DATE, ["2024-09-21"])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR(src/main.cpp)
AC_CONFIG_HEADERS([config.h])

View File

@ -49,7 +49,6 @@ macro(add_gettext_python _par _dir)
endif()
ADD_CUSTOM_COMMAND(
OUTPUT "${_dst}"
PRE_BUILD
COMMAND ${CMAKE_COMMAND}
"-DTOP_SRC_DIR=${TOP_SRC_DIR}"
"-DDestFile=${_dst}"
@ -71,7 +70,6 @@ macro(add_gettext_python _par _dir)
else()
ADD_CUSTOM_COMMAND(
OUTPUT "${_dst}"
PRE_BUILD
COMMAND ${LYX_PYTHON_EXECUTABLE}
ARGS "${TOP_SRC_DIR}/po/lyx_pot.py" -b "${TOP_SRC_DIR}" -o "${_dst}" -t ${_par1} "--src_file=${_src_files}"
DEPENDS ${_sources} ${_src_files} "${TOP_SRC_DIR}/po/lyx_pot.py"

View File

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: LyX-2.4\n"
"Report-Msgid-Bugs-To: lyx-devel@lists.lyx.org\n"
"POT-Creation-Date: 2024-09-19 18:35+0200\n"
"PO-Revision-Date: 2024-09-19 16:36+0000\n"
"POT-Creation-Date: 2024-09-18 09:39+0200\n"
"PO-Revision-Date: 2024-09-21 19:58+0000\n"
"Last-Translator: Kornel Benko <kornel@lyx.org>\n"
"Language-Team: Slovak <kornel@lyx.org>\n"
"Language: sk\n"
@ -311,6 +311,10 @@ msgstr "Pridať BibTeX databázu z vášho lokálneho adresára"
msgid "Add &Local..."
msgstr "&Pridať lokálnu…"
#: src/frontends/qt/ui/BibtexUi.ui:91
msgid "Transfer an absolute local path to a relative one or vice versa"
msgstr ""
#: src/frontends/qt/ui/BibtexUi.ui:91
msgid "Inherit bibliography databases from the master document"
msgstr "Databázy prevziať od hlavného dokumentu"
@ -32316,6 +32320,14 @@ msgstr ""
msgid "Document Encoding"
msgstr "Kódovanie dokumentu"
#: src/frontends/qt/GuiBibtex.cpp:365 src/frontends/qt/ui/BibtexUi.ui:94
msgid "&Make Relative"
msgstr ""
#: src/frontends/qt/GuiBibtex.cpp:369
msgid "&Make Absolute"
msgstr ""
#: src/frontends/qt/GuiBibtex.cpp:312
msgid "Database"
msgstr "Databáza"

View File

@ -3084,7 +3084,7 @@ void Paragraph::latex(BufferParams const & bparams,
OutputParams rp = runparams;
rp.free_spacing = style.free_spacing;
rp.local_font = &current_font;
rp.intitle = style.intitle;
rp.intitle |= style.intitle;
// Two major modes: LaTeX or plain
// Handle here those cases common to both modes

View File

@ -91,6 +91,8 @@ GuiBibtex::GuiBibtex(GuiView & lv)
this, SLOT(browseBibPressed()));
connect(inheritPB, SIGNAL(clicked()),
this, SLOT(inheritPressed()));
connect(relAbsPB, SIGNAL(clicked()),
this, SLOT(relAbsPressed()));
selected_model_.insertColumns(0, 1);
selectionManager = new GuiSelectionManager(this, availableLV, selectedLV,
@ -123,6 +125,7 @@ GuiBibtex::GuiBibtex(GuiView & lv)
bc().addReadOnly(styleCB);
bc().addReadOnly(bibtocCB);
bc().addReadOnly(bibEncodingCO);
bc().addReadOnly(relAbsPB);
selectedLV->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
@ -180,6 +183,7 @@ void GuiBibtex::selUpdated()
{
selectionManager->update();
editPB->setEnabled(deletePB->isEnabled());
updateReAbs();
changed();
}
@ -234,6 +238,23 @@ void GuiBibtex::browseBibPressed()
}
}
GuiBibtex::LocalPath GuiBibtex::localPathSelected()
{
QModelIndexList selIdx =
selectedLV->selectionModel()->selectedIndexes();
if (selIdx.isEmpty())
return LP_None;
QModelIndex idx = selIdx.first();
QString sel = idx.data().toString();
string const texfile = support::changeExtension(fromqstr(sel), "bib");
if (FileName::isAbsolute(texfile))
return LP_Absolute;
FileName const file = support::makeAbsPath(texfile, buffer().filePath());
if (file.exists())
return LP_Relative;
return LP_None;
}
bool GuiBibtex::hasInherits()
{
@ -278,6 +299,38 @@ void GuiBibtex::inheritPressed()
}
void GuiBibtex::relAbsPressed()
{
LocalPath const p = localPathSelected();
if (p == LP_None)
return;
QModelIndexList selIdx =
selectedLV->selectionModel()->selectedIndexes();
QModelIndex idx = selIdx.first();
QString const qf = idx.data().toString();
string f = fromqstr(qf);
FileName const file = (p == LP_Absolute) ?
FileName(f)
: support::makeAbsPath(f, buffer().filePath());
QString const new_item = (p == LP_Absolute)
? toqstr(file.relPath(buffer().filePath()))
: toqstr(file.absoluteFilePath());
QStringList sb;
for (QString s : selected_bibs_) {
if (s == qf)
sb << new_item;
else
sb << s;
}
selected_bibs_ = sb;
setSelectedBibs(selected_bibs_);
selectedLV->selectRow(selected_bibs_.indexOf(new_item));
changed();
}
void GuiBibtex::on_editPB_clicked()
{
QModelIndexList selIdx =
@ -305,6 +358,25 @@ void GuiBibtex::clearSelection()
}
void GuiBibtex::updateReAbs()
{
switch (localPathSelected()) {
case LP_Absolute:
relAbsPB->setText(qt_("&Make Relative"));
relAbsPB->setEnabled(true);
break;
case LP_Relative:
relAbsPB->setText(qt_("&Make Absolute"));
relAbsPB->setEnabled(true);
break;
case LP_None:
default:
relAbsPB->setEnabled(false);
break;
}
}
void GuiBibtex::setSelectedBibs(QStringList const & sl)
{
selected_model_.clear();
@ -349,6 +421,7 @@ void GuiBibtex::setSelectedBibs(QStringList const & sl)
selectedLV->setIndexWidget(selected_model_.index(i, 1), cb);
}
editPB->setEnabled(deletePB->isEnabled());
updateReAbs();
}
@ -446,6 +519,7 @@ void GuiBibtex::updateContents()
setFileEncodings(getVectorFromString(params_["file_encodings"], from_ascii("\t")));
editPB->setEnabled(deletePB->isEnabled());
updateReAbs();
}

View File

@ -40,6 +40,7 @@ private Q_SLOTS:
void on_buttonBox_accepted();
void browseBstPressed();
void browseBibPressed();
void relAbsPressed();
void inheritPressed();
void on_editPB_clicked();
void databaseChanged();
@ -102,6 +103,16 @@ private:
bool isBufferDependent() const override { return true; }
/// Is his a child which can inherit bibs from its master?
bool hasInherits();
/// Is an item with local path selected?
/// returns which (none, absolute, relative)
enum LocalPath {
LP_None,
LP_Absolute,
LP_Relative
};
LocalPath localPathSelected();
///
void updateReAbs();
private:
///

View File

@ -85,6 +85,16 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="relAbsPB">
<property name="toolTip">
<string>Transfer an absolute local path to a relative one or vice versa</string>
</property>
<property name="text">
<string>&amp;Make Relative</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="inheritPB">
<property name="toolTip">

View File

@ -346,10 +346,10 @@ void InsetLabel::latex(otexstream & os, OutputParams const & runparams_in) const
if (runparams_in.postpone_fragile_stuff)
runparams_in.post_macro += command;
else {
// protect label in moving argument (#9404),
// but not in subfloat caption (#11950)
// protect label in \thanks notes (#9404)
if (runparams.moving_arg
&& runparams.inFloat != OutputParams::SUBFLOAT)
&& runparams.intitle
&& runparams.inFootnote)
os << "\\protect";
os << command;
}

View File

@ -1,6 +1,6 @@
-*- text -*-
This file describes what has been done in the preparation of LyX 2.4.2.
This file describes what has been done in the preparation of LyX 2.4.3.
All comments are welcome.
We try to group things by topic and in decreasing order of importance.
@ -15,23 +15,10 @@ What's new
* DOCUMENT INPUT/OUTPUT
- There was undocumented change how hyperlink insets are exported to
xHTML format compared to LyX 2.3.x (type "File" is no more exported
as http(s) link). We added details to the RELEASE-NOTES file.
- Load graphics after geometry, so page size is set properly (bug
10970).
- Recognize .plt as a GnuPlot extension (bug 11148).
- Restore obvious "G" shortcut for Greyed Out notes.
* MISCELLANEOUS
- Update format of lyxrc.dist templates
- Update templates to use native vertical space method.
* TEX2LYX IMPROVEMENTS
@ -40,35 +27,14 @@ What's new
* USER INTERFACE
- Show font info in status line again.
- Make scrolling smoother when using selection.
- Show the temporary directory in About LyX dialog.
- Improve document output pane (bug 12902).
- Speedup interactive use by avoiding expensive math macros bookkeeping
when possible.
- Make -geometry command-line option work on all platforms.
- Fix macOS bug, where XQuartz application would be launched for no
reason (bug #13086).
- Fix problem with collapsing of outliner (bug 13098).
* DOCUMENTATION AND LOCALIZATION
- Update Brazilian Portuguese, Simplified Chinese, Czech, French,
German, Italian, Polish and Slovak localizations of the user
interface.
* BUILD/INSTALLATION
- Avoid bogus warnings when configuring for Qt6.
@ -77,76 +43,17 @@ What's new
* DOCUMENT INPUT/OUTPUT
- When exporting to MathML, the argument of the \boxed{} macro is now
correctly treated as math.
- Re-allow relative paths for local bib files (bug 13097).
- Properly escape special characters (!, @, |) in nomenclature output.
- Handle linguistic structure trees in ePub and PDF (DocBook) output (bug 12372).
- Improve the way spaces are handled in labels when refstyle is used.
- Only \protect labels in \thanks notes (see bug 9404).
* USER INTERFACE
- Fix regression which marks document modified in case of external
modification. Only file deletion will trigger the modification
flag now (see bug 12819).
- Fix crash when using Save As... with previews enabled (bug 13091).
- Fix crash when attempting to search in selection that contains
only math.
- Fix crash when copying some math formulas or exporting them to
DocBook (bug 13069).
- Fix potential crashes when scrolling documents.
- Fix bug where the dialog asking for saving unapplied changes
on buffer change popped up twice, or sometimes not at all (bug
12954).
- Improve performance when selecting text on less powerful systems
(bug 13050).
- Fix performance problems with references with (very) many authors.
- Fix problem that key bindings that include optional modifier keys
could not be un- or re-bound (bug 12973)
- Enable OK/Apply button in tabular dialog when "Additional Space" combo
has been set to different value.
- Fix ghost image on Windows with system colors (bug 13084).
- Restore old display of cross-references in the outliner. The change
led to odd behavior on filtering.
- Display values of cross-references in tooltips for forward references.
- Disable vertical alignment in tables with variable width columns
(tabularx and xltable), as this is not supported by the packages.
Also fix the disabling mechanism in the table dialog.
- Fix display of integral limits on Windows (bug 13087).
- Fix crash when deleting tabs in a selection (with S-BackTab) in a
text-only inset (ERT, Listings...).
- Fix display glitches when applying some operations to a selection.
* INTERNALS
- Fix possible crash in undo code after inserting note inset over a
multi-paragraph selection.
- Fix a Python script, used to preview math expressions, that used a
module that is removed in Python 3.13.
- Fix case where debug information may report all numbers as hexadecimal.
- Make sure that lyxclient name is initialized properly.
* DOCUMENTATION AND LOCALIZATION
@ -159,7 +66,6 @@ What's new
* TEX2LYX
- Fix import of nomenclature entries which contain '%' or '"' characters.
* LYXHTML
@ -172,4 +78,3 @@ What's new
* BUILD/INSTALLATION
- Fix 'make install' target for autotools builds with autoconf >= 2.72.