Re: [LyX/master] Disable changebar checkbox if show changes in output is off
Am Tue, 24 Dec 2019 18:27:37 +0100 (CET) schrieb Juergen Spitzmueller : > commit 0dbc3f759a5a2d7827a395f00850bb358822d283 > Author: Juergen Spitzmueller > Date: Tue Dec 24 18:43:22 2019 +0100 > > Disable changebar checkbox if show changes in output is off > --- > src/frontends/qt/GuiDocument.cpp | 12 ++-- > src/frontends/qt/GuiDocument.h |1 + > 2 files changed, 11 insertions(+), 2 deletions(-) > I get the error /usr2/src/lyx/lyx-git/src/frontends/qt/GuiDocument.h:23:10: fatal error: ui_ChangeTrackingUi.h: Datei oder Verzeichnis nicht gefunden #include "ui_ChangeTrackingUi.h" Forgot to push src/frontends/qt/ui/ChangeTrackingUi.ui? Kornel pgpyMFEsNiNyr.pgp Description: Digitale Signatur von OpenPGP -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Disable changebar checkbox if show changes in output is off
commit 0dbc3f759a5a2d7827a395f00850bb358822d283 Author: Juergen Spitzmueller Date: Tue Dec 24 18:43:22 2019 +0100 Disable changebar checkbox if show changes in output is off --- src/frontends/qt/GuiDocument.cpp | 12 ++-- src/frontends/qt/GuiDocument.h |1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp index 095c0a2..f9f3e35 100644 --- a/src/frontends/qt/GuiDocument.cpp +++ b/src/frontends/qt/GuiDocument.cpp @@ -1309,8 +1309,8 @@ GuiDocument::GuiDocument(GuiView & lv) changesModule = new UiWidget(this); connect(changesModule->trackChangesCB, SIGNAL(clicked()), this, SLOT(change_adaptor())); - connect(changesModule->outputChangesCB, SIGNAL(clicked()), - this, SLOT(change_adaptor())); + connect(changesModule->outputChangesCB, SIGNAL(toggled(bool)), + this, SLOT(outputChangesToggled(bool))); connect(changesModule->changeBarsCB, SIGNAL(clicked()), this, SLOT(change_adaptor())); @@ -4415,6 +4415,7 @@ void GuiDocument::paramsToDialog() changesModule->trackChangesCB->setChecked(bp_.track_changes); changesModule->outputChangesCB->setChecked(bp_.output_changes); changesModule->changeBarsCB->setChecked(bp_.change_bars); + changesModule->changeBarsCB->setEnabled(bp_.output_changes); // Make sure that the bc is in the INITIAL state if (bc().policy().buttonStatus(ButtonPolicy::RESTORE)) @@ -5147,6 +5148,13 @@ void GuiDocument::linenoToggled(bool on) } +void GuiDocument::outputChangesToggled(bool on) +{ + changesModule->changeBarsCB->setEnabled(on); + change_adaptor(); +} + + Dialog * createGuiDocument(GuiView & lv) { return new GuiDocument(lv); } diff --git a/src/frontends/qt/GuiDocument.h b/src/frontends/qt/GuiDocument.h index 4d7cc80..2d0f7ea 100644 --- a/src/frontends/qt/GuiDocument.h +++ b/src/frontends/qt/GuiDocument.h @@ -164,6 +164,7 @@ private Q_SLOTS: void moduleFilterChanged(const QString & text); void resetModuleFilter(); void linenoToggled(bool); + void outputChangesToggled(bool); private: /// validate listings parameters and return an error message, if any QString validateListingsParameters(); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Provide way to add (optional) user initials
commit a08cbf41cf2b3087029c19db49dfca5aa01a4b2d Author: Juergen Spitzmueller Date: Tue Dec 24 14:31:08 2019 +0100 Provide way to add (optional) user initials This makes it easier to hook the changes package into LyX's ct markup. --- lib/layouts/changebars.module | 10 ++-- src/Author.cpp|8 +- src/Author.h |7 ++- src/BufferParams.cpp |4 +- src/Changes.cpp | 48 +++-- src/LaTeXFeatures.cpp | 14 ++-- src/LyXRC.cpp | 10 +++ src/LyXRC.h |3 + src/frontends/qt/GuiPrefs.cpp |8 ++- src/frontends/qt/ui/PrefIdentityUi.ui | 121 +++-- src/tex2lyx/Preamble.cpp |6 +- src/tex2lyx/Preamble.h|2 +- src/tex2lyx/text.cpp |6 ++- 13 files changed, 166 insertions(+), 81 deletions(-) diff --git a/lib/layouts/changebars.module b/lib/layouts/changebars.module index b35c03c..f0c27f3 100644 --- a/lib/layouts/changebars.module +++ b/lib/layouts/changebars.module @@ -19,12 +19,12 @@ Format 80 AddToPreamble \usepackage{changebar} - \providecommand{\lyxadded}[3]{} + \providecommand{\lyxadded}[4][]{} \providecommand{\lyxdeleted}{} - \renewcommand{\lyxadded}[3]{ -{\protect\cbstart\color{lyxadded}{}#3\protect\cbend} + \renewcommand{\lyxadded}[4][]{ +{\protect\cbstart\color{lyxadded}{}#4\protect\cbend} } - \renewcommand{\lyxdeleted}[3]{% -{\protect\cbstart\color{lyxdeleted}\sout{#3}\protect\cbend} + \renewcommand{\lyxdeleted}[4][]{% +{\protect\cbstart\color{lyxdeleted}\sout{#4}\protect\cbend} } EndPreamble diff --git a/src/Author.cpp b/src/Author.cpp index 3d03fe7..b70815c 100644 --- a/src/Author.cpp +++ b/src/Author.cpp @@ -37,14 +37,14 @@ static int computeHash(docstring const & name, } -Author::Author(docstring const & name, docstring const & email) - : name_(name), email_(email), used_(true), +Author::Author(docstring const & name, docstring const & email, docstring const & initials) + : name_(name), email_(email), initials_(initials), used_(true), buffer_id_(computeHash(name, email)) {} Author::Author(int buffer_id) - : name_(convert(buffer_id)), email_(docstring()), used_(false), + : name_(convert(buffer_id)), email_(docstring()), initials_(docstring()), used_(false), buffer_id_(buffer_id) {} @@ -67,7 +67,7 @@ bool Author::valid() const bool operator==(Author const & l, Author const & r) { - return l.name() == r.name() && l.email() == r.email(); + return l.name() == r.name() && l.email() == r.email() && l.initials() == r.initials(); } diff --git a/src/Author.h b/src/Author.h index 108a701..b498655 100644 --- a/src/Author.h +++ b/src/Author.h @@ -24,7 +24,8 @@ public: /// Author() : used_(false), buffer_id_(0) {}; /// - Author(docstring const & name, docstring const & email); + Author(docstring const & name, docstring const & email, + docstring const & initials); /// For when the \author line is missing (#9854) Author(int buffer_id); /// @@ -32,6 +33,8 @@ public: /// docstring email() const { return email_; } /// + docstring initials() const { return initials_; } + /// docstring nameAndEmail() const; /// int bufferId() const { return buffer_id_; } @@ -53,6 +56,8 @@ private: docstring name_; /// The author's email address docstring email_; + /// The author's initials + docstring initials_; /// mutable bool used_; /// The id of the author in the lyx-file diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 22793ec..3b0b831 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -365,7 +365,9 @@ BufferParams::Impl::Impl() { // set initial author // FIXME UNICODE - authorlist.record(Author(from_utf8(lyxrc.user_name), from_utf8(lyxrc.user_email))); + authorlist.record(Author(from_utf8(lyxrc.user_name), +from_utf8(lyxrc.user_email), +from_utf8(lyxrc.user_initials))); } diff --git a/src/Changes.cpp b/src/Changes.cpp index 8c96338..f8f70e1 100644 --- a/src/Changes.cpp +++ b/src/Changes.cpp @@ -338,7 +338,7 @@ void Changes::merge() namespace { -docstring getLaTeXMarkup(docstring const & macro, docstring const & author, +docstring getLaTeXMarkup(docstring const & macro, Author const & author, docstring const & chgTime, OutputParams const & runparams) { @@ -348,18 +348,52 @@ docstring getLaTeXMarkup(docstring const & macro, docstring const & author, docstring uncodable_author; odocstringstream ods; + docstring const author_name
[LyX/master] Add native changebars
commit dc4823e7590de9891b5f04de298f046fa33f71b0 Author: Juergen Spitzmueller Date: Tue Dec 24 18:12:22 2019 +0100 Add native changebars Fixes #10750 --- development/FORMAT |4 ++ lib/Makefile.am |1 - lib/chkconfig.ltx|1 + lib/doc/UserGuide.lyx| 43 +++- lib/doc/de/UserGuide.lyx | 66 ++-- lib/layouts/changebars.module| 30 - lib/lyx2lyx/lyx_2_4.py | 39 +- src/Buffer.cpp | 17 ++--- src/Buffer.h |4 ++- src/BufferParams.cpp |9 + src/BufferParams.h |2 + src/Converter.cpp|2 +- src/LaTeXFeatures.cpp| 67 + src/frontends/qt/GuiDocument.cpp | 25 ++ src/frontends/qt/GuiDocument.h |2 + src/frontends/qt/Makefile.am |1 + src/tex2lyx/Preamble.cpp |5 +++ src/tex2lyx/Preamble.h |1 + src/version.h|4 +- 19 files changed, 238 insertions(+), 85 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index e43dad5..4b782d5 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -7,6 +7,10 @@ changes happened in particular if possible. A good example would be --- +2019-12-24 Jürgen Spitzmüller + * Format incremented to 590: Add native changebar solution via buffer param + \change_bars. + 2019-08-14 Jürgen Spitzmüller * Format incremented to 589: Height now is totalheight in graphics. diff --git a/lib/Makefile.am b/lib/Makefile.am index d0b0b7b..83e58bb 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2310,7 +2310,6 @@ dist_layouts_DATA =\ layouts/bxjsbook.layout \ layouts/bxjsreport.layout \ layouts/bxjsslide.layout \ - layouts/changebars.module \ layouts/chess.layout \ layouts/chessboard.module \ layouts/cl2emult.layout \ diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx index 73b1daa..14230d4 100644 --- a/lib/chkconfig.ltx +++ b/lib/chkconfig.ltx @@ -342,6 +342,7 @@ \TestPackage{CJK} \TestPackage{calc} \TestPackage{cancel} +\TestPackage{changebar} \TestPackage{chapterbib} \TestPackage{chemgreek} \TestPackage{chessboard} diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx index b61eb30..6f82164 100644 --- a/lib/doc/UserGuide.lyx +++ b/lib/doc/UserGuide.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 583 +\lyxformat 590 \begin_document \begin_header \save_transient_properties true @@ -149,6 +149,7 @@ logicalmkup \tablestyle default \tracking_changes true \output_changes false +\change_bars false \html_math_output 0 \html_css_as_file 0 \html_be_strict true @@ -38204,6 +38205,8 @@ The toolbar has two buttons to handle notes because notes are often important \end_layout \begin_layout Standard + +\change_deleted -712698321 1577206802 To show the changes made in the output you need the \SpecialChar LaTeX package \series bold @@ -38232,6 +38235,8 @@ literal "true" or in the package manager of your \SpecialChar LaTeX -system. +\change_unchanged + \end_layout \begin_layout Section @@ -46863,6 +46868,42 @@ Objects \end_layout \begin_layout Section + +\change_inserted -712698321 1577206827 +Change Tracking +\end_layout + +\begin_layout Standard + +\change_inserted -712698321 1577206929 +Here you can do some settings related to change tracking (see sec. +\begin_inset space ~ +\end_inset + + +\begin_inset CommandInset ref +LatexCommand ref +reference "sec:Change-Tracking" +plural "false" +caps "false" +noprefix "false" + +\end_inset + +). + Alternatively to the menu or toolbar, you can set here whether changes + are being tracked and whether they are shown in the output. +\end_layout + +\begin_layout Standard + +\change_inserted -712698321 1577207214 +Additionally, you can advise LyX to place a change bar in the margin of + the output. + This might be useful to make changed passages more salient. +\end_layout + +\begin_layout Section Numbering & TOC \end_layout diff --git a/lib/doc/de/UserGuide.lyx b/lib/doc/de/UserGuide.lyx index 5a35933..e34f4f1 100644 --- a/lib/doc/de/UserGuide.lyx +++ b/lib/doc/de/UserGuide.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 583 +\lyxformat 590 \begin_document \begin_header \save_transient_properties true @@ -154,6 +154,7 @@ logicalmkup \tablestyle default \tracking_changes false \output_changes false +\change_bars false \html_math_output 0 \html_css_as_file 0 \html_be_strict false @@ -36511,38 +36512,6 @@ Die Werkzeugleiste hat zwei Schaltknöpfe, um Notizen zu behandeln, weil diese zur Beschreibung einer Änderung oft wichtig sind. \end_layout -\begin_layout
[LyX/master] Merge branch 'master' of git.lyx.org:lyx
commit bab184e49e4420ad5277eacd45f2447727f55bbd Merge: a08cbf4 fc46e45 Author: Juergen Spitzmueller Date: Tue Dec 24 18:09:34 2019 +0100 Merge branch 'master' of git.lyx.org:lyx po/de.po | 276 +++--- po/sk.po | 57 + 2 files changed, 177 insertions(+), 156 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update sk.po
commit fc46e450c1720c3ca782c6675fa259f0ecf9fa6f Author: Kornel Benko Date: Tue Dec 24 11:35:38 2019 +0100 Update sk.po --- po/sk.po | 57 +++-- 1 files changed, 39 insertions(+), 18 deletions(-) diff --git a/po/sk.po b/po/sk.po index f063e69..60262fc 100644 --- a/po/sk.po +++ b/po/sk.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: LyX-2.4\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" -"POT-Creation-Date: 2019-12-15 14:01+0100\n" -"PO-Revision-Date: 2019-12-15 13:05+\n" +"POT-Creation-Date: 2019-12-24 10:06+0100\n" +"PO-Revision-Date: 2019-12-24 09:16+\n" "Last-Translator: Kornel Benko \n" "Language-Team: Slovak \n" "Language: sk\n" @@ -27933,36 +27933,36 @@ msgid "change bar" msgstr "revízne označenie" #: src/Color.cpp:280 -msgid "deleted text" -msgstr "zmazaný text" +msgid "deleted text (output)" +msgstr "zmazaný text (výstup)" #: src/Color.cpp:281 -msgid "added text" -msgstr "pridaný text" +msgid "added text (output)" +msgstr "pridaný tex (výstup)" #: src/Color.cpp:282 -msgid "changed text 1st author" -msgstr "revíza - 1. autor" +msgid "added text (workarea, 1st author)" +msgstr "pridaný text (pracovná plocha, 1. autor)" #: src/Color.cpp:283 -msgid "changed text 2nd author" -msgstr "revíza - 2. autor" +msgid "added text (workarea, 2nd author)" +msgstr "pridaný text (pracovná plocha, 2. autor)" #: src/Color.cpp:284 -msgid "changed text 3rd author" -msgstr "revíza - 3. autor" +msgid "added text (workarea, 3rd author)" +msgstr "pridaný text (pracovná plocha, tretí. autor)" #: src/Color.cpp:285 -msgid "changed text 4th author" -msgstr "revíza - 4. autor" +msgid "added text (workarea, 4th author)" +msgstr "pridaný text (pracovná plocha, štvrtý. autor)" #: src/Color.cpp:286 -msgid "changed text 5th author" -msgstr "revíza - 5. autor" +msgid "added text (workarea, 5th author)" +msgstr "pridaný text (pracovná plocha, piaty. autor)" #: src/Color.cpp:287 -msgid "deleted text modifier" -msgstr "zmazaný text: modifikátor" +msgid "deleted text modifier (workarea)" +msgstr "zmazaný text: modifikátor (pracovná plocha)" #: src/Color.cpp:288 msgid "added space markers" @@ -41344,3 +41344,24 @@ msgstr "Neznámy používateľ" #~ "Nastaviť všetky poznámky pod čiarou ako koncové poznámky. Nutné je pridať " #~ "\\theendnotes do vložky TeX-ového kódu tam, kde sa koncové poznámky majú " #~ "objaviť." + +#~ msgid "deleted text" +#~ msgstr "zmazaný text" + +#~ msgid "changed text 1st author" +#~ msgstr "revíza - 1. autor" + +#~ msgid "changed text 2nd author" +#~ msgstr "revíza - 2. autor" + +#~ msgid "changed text 3rd author" +#~ msgstr "revíza - 3. autor" + +#~ msgid "changed text 4th author" +#~ msgstr "revíza - 4. autor" + +#~ msgid "changed text 5th author" +#~ msgstr "revíza - 5. autor" + +#~ msgid "deleted text modifier" +#~ msgstr "zmazaný text: modifikátor" -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] de.po
commit c21139aefe4d4dbe4fe7b54502afa108276fe7ff Author: Juergen Spitzmueller Date: Tue Dec 24 11:23:20 2019 +0100 de.po --- po/de.po | 276 +++--- 1 files changed, 138 insertions(+), 138 deletions(-) diff --git a/po/de.po b/po/de.po index 219ee67..60503f5 100644 --- a/po/de.po +++ b/po/de.po @@ -94,8 +94,8 @@ msgid "" msgstr "" "Project-Id-Version: LyX 2.4git\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" -"POT-Creation-Date: 2019-12-15 18:49+0100\n" -"PO-Revision-Date: 2019-12-15 18:55+0100\n" +"POT-Creation-Date: 2019-12-24 11:17+0100\n" +"PO-Revision-Date: 2019-12-24 11:21+0100\n" "Last-Translator: Jürgen Spitzmüller \n" "Language-Team: Deutsch \n" "Language: de\n" @@ -1081,7 +1081,7 @@ msgstr "Änderungen anwenden" msgid "Select the fields on which the filter applies" msgstr "Wählen Sie hier die Felder, auf die der Filter angewendet werden soll." -#: src/frontends/qt/ui/CitationUi.ui:61 src/frontends/qt/GuiCitation.cpp:439 +#: src/frontends/qt/ui/CitationUi.ui:61 src/frontends/qt/GuiCitation.cpp:434 msgid "All fields" msgstr "Alle Felder" @@ -1090,7 +1090,7 @@ msgid "Select the entry types on which the filter applies" msgstr "" "Wählen Sie hier die Eintragstypen, auf die der Filter angewendet werden soll." -#: src/frontends/qt/ui/CitationUi.ui:85 src/frontends/qt/GuiCitation.cpp:454 +#: src/frontends/qt/ui/CitationUi.ui:85 src/frontends/qt/GuiCitation.cpp:449 msgid "All entry types" msgstr "Alle Eintragstypen" @@ -1129,7 +1129,7 @@ msgstr "Formatierung" msgid "Citation st:" msgstr "Zitier:" -#: src/frontends/qt/ui/CitationUi.ui:299 src/frontends/qt/GuiCitation.cpp:309 +#: src/frontends/qt/ui/CitationUi.ui:299 src/frontends/qt/GuiCitation.cpp:304 msgid "Text befo:" msgstr "Text :" @@ -1137,7 +1137,7 @@ msgstr "Text :" msgid "Citation style to use, if different styles are provided" msgstr "Verwendeter Zitierstil, falls mehrere Stile verfügbar sind" -#: src/frontends/qt/ui/CitationUi.ui:328 src/frontends/qt/GuiCitation.cpp:313 +#: src/frontends/qt/ui/CitationUi.ui:328 src/frontends/qt/GuiCitation.cpp:308 msgid "" "Text that precedes the reference (e.g., \"cf.\"), if the current citation " "style supports this." @@ -1145,11 +1145,11 @@ msgstr "" "Text, der dem Verweis vorausgeht (z.B. \"vgl.\"), falls der ausgewählte " "Zitierstil dies unterstützt." -#: src/frontends/qt/ui/CitationUi.ui:335 src/frontends/qt/GuiCitation.cpp:315 +#: src/frontends/qt/ui/CitationUi.ui:335 src/frontends/qt/GuiCitation.cpp:310 msgid " after:" msgstr " danach:" -#: src/frontends/qt/ui/CitationUi.ui:345 src/frontends/qt/GuiCitation.cpp:319 +#: src/frontends/qt/ui/CitationUi.ui:345 src/frontends/qt/GuiCitation.cpp:314 msgid "" "Text that follows the reference (e.g., pages), if the current citation style " "supports this." @@ -1165,7 +1165,7 @@ msgstr "" "Übergebe den Inhalt der Felder ,Text davor` und ,Text danach` unformatiert " "an LaTeX. Aktivieren Sie dies, wenn Sie LaTeX-Code eingeben wollen." -#: src/frontends/qt/ui/CitationUi.ui:398 src/frontends/qt/GuiCitation.cpp:327 +#: src/frontends/qt/ui/CitationUi.ui:398 src/frontends/qt/GuiCitation.cpp:322 msgid "" "Force upper case in names (\"Del Piero\", not \"del Piero\"), if the current " "citation style supports this." @@ -1177,7 +1177,7 @@ msgstr "" msgid "Force upcas" msgstr "Aßschreibung erzwingen" -#: src/frontends/qt/ui/CitationUi.ui:408 src/frontends/qt/GuiCitation.cpp:362 +#: src/frontends/qt/ui/CitationUi.ui:408 src/frontends/qt/GuiCitation.cpp:357 msgid "" "Always list all authors (rather than using \"et al.\"), if the current " "citation style supports this." @@ -1185,7 +1185,7 @@ msgstr "" "Erzwingt eine vollständige Autorenliste (statt der Verwendung von \"et al.\" " "oder \"u.a.\"), falls der ausgewählte Zitierstil dies unterstützt." -#: src/frontends/qt/ui/CitationUi.ui:411 src/frontends/qt/GuiCitation.cpp:358 +#: src/frontends/qt/ui/CitationUi.ui:411 src/frontends/qt/GuiCitation.cpp:353 msgid "All aut" msgstr "Alle A" @@ -14112,11 +14112,11 @@ msgstr "Interlinear-Glosse" msgid "Add the inter-linear gloss here" msgstr "Geben Sie hier die Interlinear-Glossierung ein" -#: lib/layouts/linguistics.module:147 lib/layouts/linguistics.module:203 +#: lib/layouts/linguistics.module:147 lib/layouts/linguistics.module:204 msgid "Translation" msgstr "Übersetzung" -#: lib/layouts/linguistics.module:148 lib/layouts/linguistics.module:204 +#: lib/layouts/linguistics.module:148 lib/layouts/linguistics.module:205 msgid "Gloss Translation" msgstr "Glossen-Übersetzung" @@ -14136,237 +14136,237 @@ msgstr "Tri-Glosse" msgid "Add trigloss options here" msgstr "Geben Sie hier trigloss-Optionen ein" -#: lib/layouts/linguistics.module:183 +#: lib/layouts/linguistics.module:184 msgid "Interlinear Gloss (1)" msgstr "Interlinear-Glosse (1)" -#: lib/layouts/linguistics.module:184 +#: lib/layouts/linguistics.module:185 msgid