From 3f7569edcd7680af8289ae148c35c5e6b65317e2 Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Tue, 25 Jun 2024 11:32:26 -0400 Subject: [PATCH] Add temporary directory to About LyX dialog (cherry picked from commit e7af6afb01183e2fdf798dd401499839ba0a195a) --- src/frontends/qt/GuiAbout.cpp | 14 ++++++ src/frontends/qt/GuiAbout.h | 1 + src/frontends/qt/ui/AboutUi.ui | 79 +++++++++++++++++++++++++++------- status.24x | 2 + 4 files changed, 80 insertions(+), 16 deletions(-) diff --git a/src/frontends/qt/GuiAbout.cpp b/src/frontends/qt/GuiAbout.cpp index 0a585f0eac..db7edae3dc 100644 --- a/src/frontends/qt/GuiAbout.cpp +++ b/src/frontends/qt/GuiAbout.cpp @@ -244,6 +244,12 @@ static QString dirUser() } +static QString dirTemp() +{ + return toqstr(makeDisplayPath(package().temp_dir().absFileName())); +} + + static QString version(bool const plain = false) { QString loc_release_date; @@ -321,6 +327,12 @@ void GuiAbout::on_showDirUserPB_clicked() } +void GuiAbout::on_showDirTempPB_clicked() +{ + showDirectory(package().temp_dir()); +} + + void GuiAbout::on_versionCopyPB_clicked() { qApp->clipboard()->setText(version(true)); @@ -350,6 +362,8 @@ GuiAbout::GuiAbout(GuiView & lv) d->ui.iconSW->setFixedSize(iconsize, iconsize); d->ui.dirLibraryLA->setText(dirLibrary()); d->ui.dirLibraryLA->adjustSize(); + d->ui.dirTempLA->setText(dirTemp()); + d->ui.dirTempLA->adjustSize(); d->ui.dirUserLA->setText(dirUser()); d->ui.dirUserLA->adjustSize(); d->ui.buildinfoTB->setText(buildinfo()); diff --git a/src/frontends/qt/GuiAbout.h b/src/frontends/qt/GuiAbout.h index c9b2443689..3ca191d3c7 100644 --- a/src/frontends/qt/GuiAbout.h +++ b/src/frontends/qt/GuiAbout.h @@ -30,6 +30,7 @@ private Q_SLOTS: void on_buttonBox_rejected(); void on_showDirLibraryPB_clicked(); void on_showDirUserPB_clicked(); + void on_showDirTempPB_clicked(); void on_versionCopyPB_clicked(); private: diff --git a/src/frontends/qt/ui/AboutUi.ui b/src/frontends/qt/ui/AboutUi.ui index 4a6adac566..5a03c23180 100644 --- a/src/frontends/qt/ui/AboutUi.ui +++ b/src/frontends/qt/ui/AboutUi.ui @@ -7,7 +7,7 @@ 0 0 552 - 470 + 504 @@ -30,7 +30,7 @@ - QLayout::SetFixedSize + QLayout::SizeConstraint::SetFixedSize @@ -45,7 +45,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -60,10 +60,10 @@ - Qt::Horizontal + Qt::Orientation::Horizontal - QSizePolicy::Fixed + QSizePolicy::Policy::Fixed @@ -78,10 +78,10 @@ - Qt::Vertical + Qt::Orientation::Vertical - QSizePolicy::Fixed + QSizePolicy::Policy::Fixed @@ -106,7 +106,7 @@ <html><head/><body><p><span style=" font-weight:600;">LyX version info goes here.</span></p><p>Qt version (run-time) goes here.</p><p>Qt version (compile-time) goes here.</p></body></html> - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter true @@ -115,17 +115,17 @@ 0 - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse - Qt::Vertical + Qt::Orientation::Vertical - QSizePolicy::MinimumExpanding + QSizePolicy::Policy::MinimumExpanding @@ -172,13 +172,13 @@ System directory goes here. - Qt::PlainText + Qt::TextFormat::PlainText false - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse @@ -200,13 +200,13 @@ User directory goes here. - Qt::PlainText + Qt::TextFormat::PlainText false - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse @@ -232,6 +232,53 @@ + + + + Temporary directory + + + + + + IBeamCursor + + + Temp directory goes here. + + + Qt::TextFormat::PlainText + + + false + + + Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse + + + + + + + + 0 + 0 + + + + Open temporary directory in file browser + + + [[do]]O&pen + + + false + + + + + + @@ -368,7 +415,7 @@ - QDialogButtonBox::Close + QDialogButtonBox::StandardButton::Close diff --git a/status.24x b/status.24x index 1df3c6b7a7..b02e416470 100644 --- a/status.24x +++ b/status.24x @@ -42,6 +42,8 @@ What's new - Make scrolling smoother when using selection. +- Show the temporary directory in About LyX dialog. + * DOCUMENTATION AND LOCALIZATION