commit e7af6afb01183e2fdf798dd401499839ba0a195a Author: Richard Kimberly Heck <rikih...@lyx.org> Date: Tue Jun 25 11:32:26 2024 -0400
Add temporary directory to About LyX dialog --- src/frontends/qt/GuiAbout.cpp | 14 ++++++++ src/frontends/qt/GuiAbout.h | 1 + src/frontends/qt/ui/AboutUi.ui | 79 +++++++++++++++++++++++++++++++++--------- 3 files changed, 78 insertions(+), 16 deletions(-) diff --git a/src/frontends/qt/GuiAbout.cpp b/src/frontends/qt/GuiAbout.cpp index 5ad435952d..a62ade781e 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; @@ -326,6 +332,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)); @@ -355,6 +367,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 @@ <x>0</x> <y>0</y> <width>552</width> - <height>470</height> + <height>504</height> </rect> </property> <property name="windowTitle"> @@ -30,7 +30,7 @@ <item row="0" column="0"> <layout class="QVBoxLayout" name="verticalLayout"> <property name="sizeConstraint"> - <enum>QLayout::SetFixedSize</enum> + <enum>QLayout::SizeConstraint::SetFixedSize</enum> </property> <item> <widget class="QSvgWidget" name="iconSW" native="true"> @@ -45,7 +45,7 @@ <item> <spacer name="verticalSpacer_2"> <property name="orientation"> - <enum>Qt::Vertical</enum> + <enum>Qt::Orientation::Vertical</enum> </property> <property name="sizeHint" stdset="0"> <size> @@ -60,10 +60,10 @@ <item row="0" column="1"> <spacer name="horizontalSpacer_2"> <property name="orientation"> - <enum>Qt::Horizontal</enum> + <enum>Qt::Orientation::Horizontal</enum> </property> <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" stdset="0"> <size> @@ -78,10 +78,10 @@ <item> <spacer name="verticalSpacer_3"> <property name="orientation"> - <enum>Qt::Vertical</enum> + <enum>Qt::Orientation::Vertical</enum> </property> <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" stdset="0"> <size> @@ -106,7 +106,7 @@ <string notr="true"><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></string> </property> <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + <set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter</set> </property> <property name="wordWrap"> <bool>true</bool> @@ -115,17 +115,17 @@ <number>0</number> </property> <property name="textInteractionFlags"> - <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> + <set>Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse</set> </property> </widget> </item> <item> <spacer name="verticalSpacer"> <property name="orientation"> - <enum>Qt::Vertical</enum> + <enum>Qt::Orientation::Vertical</enum> </property> <property name="sizeType"> - <enum>QSizePolicy::MinimumExpanding</enum> + <enum>QSizePolicy::Policy::MinimumExpanding</enum> </property> <property name="sizeHint" stdset="0"> <size> @@ -172,13 +172,13 @@ <string notr="true">System directory goes here.</string> </property> <property name="textFormat"> - <enum>Qt::PlainText</enum> + <enum>Qt::TextFormat::PlainText</enum> </property> <property name="wordWrap"> <bool>false</bool> </property> <property name="textInteractionFlags"> - <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> + <set>Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse</set> </property> </widget> </item> @@ -200,13 +200,13 @@ <string notr="true">User directory goes here.</string> </property> <property name="textFormat"> - <enum>Qt::PlainText</enum> + <enum>Qt::TextFormat::PlainText</enum> </property> <property name="wordWrap"> <bool>false</bool> </property> <property name="textInteractionFlags"> - <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> + <set>Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse</set> </property> </widget> </item> @@ -232,6 +232,53 @@ </layout> </widget> </item> + <item> + <widget class="QGroupBox" name="gridGroupBox2"> + <property name="title"> + <string>Temporary directory</string> + </property> + <layout class="QGridLayout" name="gridLayout_9"> + <item row="0" column="0"> + <widget class="QLabel" name="dirTempLA"> + <property name="cursor"> + <cursorShape>IBeamCursor</cursorShape> + </property> + <property name="text"> + <string notr="true">Temp directory goes here.</string> + </property> + <property name="textFormat"> + <enum>Qt::TextFormat::PlainText</enum> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + <property name="textInteractionFlags"> + <set>Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse</set> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QPushButton" name="showDirTempPB"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Open temporary directory in file browser</string> + </property> + <property name="text"> + <string>[[do]]O&pen</string> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </widget> + </item> </layout> </item> </layout> @@ -368,7 +415,7 @@ <item> <widget class="QDialogButtonBox" name="buttonBox"> <property name="standardButtons"> - <set>QDialogButtonBox::Close</set> + <set>QDialogButtonBox::StandardButton::Close</set> </property> </widget> </item> -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs