From d42983b59df2cd2a9d1bd5125e60d56a6c47ce74 Mon Sep 17 00:00:00 2001 From: Thomas Schouten Date: Sat, 23 Nov 2024 18:00:29 +0100 Subject: [PATCH] Disable Evince inverse search on Windows to avoid a UI freeze on opening a second project --- CHANGELOG.md | 24 ++++++++++++++++++- gradle.properties | 2 +- .../evince/EvinceInverseSearchListener.kt | 2 ++ .../StartEvinceInverseSearchListener.kt | 11 +++++---- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7235ab71..79c92d0d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,16 +3,36 @@ ## [Unreleased] ### Added + +### Fixed + +## [0.9.9-alpha.6] - 2024-11-23 + +### Added + +* Disable Evince inverse search on Windows to avoid a UI freeze on opening a second project * Use xdg-mime to choose a default pdf viewer in the run configuration template * Don't insert the right brace when in front of text * Add DeclareMathSymbol to indexed command definitions in installed packages +* Add support for TEXMFHOME for reference resolving +* Add diffcoeff and upgreek packages to autocompletion, by @Toseflo +* Improve reference resolving when using subfiles +* Add setting to disable auto-import of bibtex entries from remote libraries ### Fixed + * Don't override the file icon for .txt files, by @Steve-Li-1998 * Fix exceptions #3754 and #3326 * Fix exceptions in structure view when command parameters are missing * Improve error report submitter for long stacktraces * Fix a parser issue with bidirectional arrow in TikZ +* Fix default Docker image name when running Dockerized TeX Live without a project SDK +* Always use content roots to resolve references +* Fix 'package not found' error when using texlive-full on Windows, and improve running of system commands, by @tristankretzer +* Fix rename of files when using subfiles +* Fix incorrect 'package already included' warning for the subfiles package +* Fix exception #3557 if using bibtex structure view when bibtex file type is reassignd to plain text +* Avoid referencing obsolete psifiles, fix exception #3635 ## [0.9.9-alpha.4] - 2024-11-13 @@ -57,6 +77,7 @@ * Add setting to disable auto-import of bibtex entries from remote libraries ### Fixed + * Fix exception #3557 if using bibtex structure view when bibtex file type is reassignd to plain text * Avoid referencing obsolete psifiles, fix exception #3635 @@ -463,7 +484,8 @@ Thanks to @jojo2357 and @MisterDeenis for contributing to this release! * Fix some intention previews. ([#2796](https://github.com/Hannah-Sten/TeXiFy-IDEA/issues/2796)) * Other small bug fixes and improvements. ([#2776](https://github.com/Hannah-Sten/TeXiFy-IDEA/issues/2776), [#2774](https://github.com/Hannah-Sten/TeXiFy-IDEA/issues/2774), [#2765](https://github.com/Hannah-Sten/TeXiFy-IDEA/issues/2765)-[#2773](https://github.com/Hannah-Sten/TeXiFy-IDEA/issues/2773)) -[Unreleased]: https://github.com/Hannah-Sten/TeXiFy-IDEA/compare/v0.9.9-alpha.4...HEAD +[Unreleased]: https://github.com/Hannah-Sten/TeXiFy-IDEA/compare/v0.9.9-alpha.6...HEAD +[0.9.9-alpha.6]: https://github.com/Hannah-Sten/TeXiFy-IDEA/compare/v0.9.9-alpha.4...v0.9.9-alpha.6 [0.9.9-alpha.4]: https://github.com/Hannah-Sten/TeXiFy-IDEA/compare/v0.9.9-alpha.3...v0.9.9-alpha.4 [0.9.9-alpha.3]: https://github.com/Hannah-Sten/TeXiFy-IDEA/compare/v0.9.9-alpha.2...v0.9.9-alpha.3 [0.9.9-alpha.2]: https://github.com/Hannah-Sten/TeXiFy-IDEA/compare/v0.9.9-alpha.1...v0.9.9-alpha.2 diff --git a/gradle.properties b/gradle.properties index 2f0b6892d..a4bc80112 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -pluginVersion = 0.9.9-alpha.4 +pluginVersion = 0.9.9-alpha.6 # Info about build ranges: https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html # Note that an xyz branch corresponds to version 20xy.z and a since build of xyz.* diff --git a/src/nl/hannahsten/texifyidea/run/linuxpdfviewer/evince/EvinceInverseSearchListener.kt b/src/nl/hannahsten/texifyidea/run/linuxpdfviewer/evince/EvinceInverseSearchListener.kt index e0b909921..7b812507d 100644 --- a/src/nl/hannahsten/texifyidea/run/linuxpdfviewer/evince/EvinceInverseSearchListener.kt +++ b/src/nl/hannahsten/texifyidea/run/linuxpdfviewer/evince/EvinceInverseSearchListener.kt @@ -6,6 +6,7 @@ import com.intellij.openapi.application.ApplicationNamesInfo import com.intellij.openapi.application.PathManager import com.intellij.openapi.project.Project import kotlinx.coroutines.* +import nl.hannahsten.texifyidea.util.Log import nl.hannahsten.texifyidea.util.SystemEnvironment import org.freedesktop.dbus.connections.impl.DBusConnection import org.freedesktop.dbus.connections.impl.DBusConnectionBuilder @@ -64,6 +65,7 @@ object EvinceInverseSearchListener { * Start listening for backward search calls on the D-Bus. */ private fun startListening() { + Log.debug("Starting Evince inverse search listener") syncSourceHandler = sessionConnection?.addSigHandler(Window.SyncSource::class.java) { signal -> val filename = signal.sourceFile.replaceFirst("file://".toRegex(), "") syncSource(filename, signal.sourcePoint.line) diff --git a/src/nl/hannahsten/texifyidea/startup/StartEvinceInverseSearchListener.kt b/src/nl/hannahsten/texifyidea/startup/StartEvinceInverseSearchListener.kt index e7c432c5a..5e4160e59 100644 --- a/src/nl/hannahsten/texifyidea/startup/StartEvinceInverseSearchListener.kt +++ b/src/nl/hannahsten/texifyidea/startup/StartEvinceInverseSearchListener.kt @@ -3,6 +3,7 @@ package nl.hannahsten.texifyidea.startup import com.intellij.openapi.project.DumbAware import com.intellij.openapi.project.Project import com.intellij.openapi.startup.ProjectActivity +import com.intellij.openapi.util.SystemInfo import nl.hannahsten.texifyidea.run.linuxpdfviewer.InternalPdfViewer import nl.hannahsten.texifyidea.run.linuxpdfviewer.evince.EvinceInverseSearchListener import nl.hannahsten.texifyidea.util.latexTemplateRunConfig @@ -14,10 +15,12 @@ import nl.hannahsten.texifyidea.util.selectedRunConfig class StartEvinceInverseSearchListener : ProjectActivity, DumbAware { override suspend fun execute(project: Project) { - if (project.selectedRunConfig()?.pdfViewer == InternalPdfViewer.EVINCE || - (project.selectedRunConfig() == null && project.latexTemplateRunConfig()?.pdfViewer == InternalPdfViewer.EVINCE) - ) { - EvinceInverseSearchListener.start(project) + if (!SystemInfo.isWindows) { + if (project.selectedRunConfig()?.pdfViewer == InternalPdfViewer.EVINCE || + (project.selectedRunConfig() == null && project.latexTemplateRunConfig()?.pdfViewer == InternalPdfViewer.EVINCE) + ) { + EvinceInverseSearchListener.start(project) + } } } }