Skip to content

Commit

Permalink
Merge pull request #3764 from Hannah-Sten/ui-freeze-evince
Browse files Browse the repository at this point in the history
Disable Evince inverse search on Windows to avoid a UI freeze on opening a second project
  • Loading branch information
PHPirates authored Nov 24, 2024
2 parents 968468f + d42983b commit 519cbe4
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
}
}
}

0 comments on commit 519cbe4

Please sign in to comment.