summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-12-02 11:06:10 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2019-12-02 11:06:10 -0500
commit2b4d7929769a91d9de30e1e10319d1c9cf0450af (patch)
treed4079f23afddf317549cabc5479d492cb6a96e10 /src
parenteabca00c35d7af3b6822bb7857ef1e073807ca0a (diff)
don't show the lock overlay for processes that are not hooked
starting exe from filetree is now hooked usvfs progress dialog now on top of dialogs
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.ui3
-rw-r--r--src/modinfodialogfiletree.cpp5
-rw-r--r--src/processrunner.cpp9
-rw-r--r--src/processrunner.h5
-rw-r--r--src/usvfsconnector.cpp3
5 files changed, 18 insertions, 7 deletions
diff --git a/src/mainwindow.ui b/src/mainwindow.ui
index 85be22b3..0520db84 100644
--- a/src/mainwindow.ui
+++ b/src/mainwindow.ui
@@ -1073,9 +1073,6 @@ p, li { white-space: pre-wrap; }
<property name="uniformRowHeights">
<bool>true</bool>
</property>
- <property name="animated">
- <bool>true</bool>
- </property>
<attribute name="headerDefaultSectionSize">
<number>400</number>
</attribute>
diff --git a/src/modinfodialogfiletree.cpp b/src/modinfodialogfiletree.cpp
index 79ed4cba..00471a72 100644
--- a/src/modinfodialogfiletree.cpp
+++ b/src/modinfodialogfiletree.cpp
@@ -140,7 +140,10 @@ void FileTreeTab::onOpen()
return;
}
- shell::Open(m_fs->filePath(selection));
+ core().processRunner()
+ .setFromFile(parentWidget(), m_fs->filePath(selection))
+ .setWaitForCompletion()
+ .run();
}
void FileTreeTab::onPreview()
diff --git a/src/processrunner.cpp b/src/processrunner.cpp
index 89777072..b6167706 100644
--- a/src/processrunner.cpp
+++ b/src/processrunner.cpp
@@ -498,6 +498,10 @@ ProcessRunner& ProcessRunner::setFromFile(QWidget* parent, const QFileInfo& targ
default:
{
m_shellOpen = targetInfo.absoluteFilePath();
+
+ // picked up by postRun()
+ m_sp.hooked = false;
+
break;
}
}
@@ -722,6 +726,11 @@ ProcessRunner::Results ProcessRunner::postRun()
{
const bool mustWait = (m_waitFlags & ForceWait);
+ if (!m_sp.hooked && !mustWait) {
+ // the process wasn't hooked and there's no force wait, don't lock
+ return Running;
+ }
+
if (mustWait && m_lockReason == UILocker::NoReason) {
// never lock the ui without an escape hatch for the user
log::debug(
diff --git a/src/processrunner.h b/src/processrunner.h
index c61d6b70..a5099136 100644
--- a/src/processrunner.h
+++ b/src/processrunner.h
@@ -42,8 +42,9 @@ public:
// the ui will be refreshed once the process has completed
Refresh = 0x01,
- // the process will be waited for even if locking is disabled
- ForceWait = 0x02
+ // the process will be waited for even if locking is disabled or the
+ // process is not hooked
+ ForceWait = 0x02,
};
using WaitFlags = QFlags<WaitFlag>;
diff --git a/src/usvfsconnector.cpp b/src/usvfsconnector.cpp
index 3c8c355b..59880754 100644
--- a/src/usvfsconnector.cpp
+++ b/src/usvfsconnector.cpp
@@ -181,10 +181,11 @@ UsvfsConnector::~UsvfsConnector()
void UsvfsConnector::updateMapping(const MappingType &mapping)
{
- QProgressDialog progress;
+ QProgressDialog progress(qApp->activeWindow());
progress.setLabelText(tr("Preparing vfs"));
progress.setMaximum(static_cast<int>(mapping.size()));
progress.show();
+
int value = 0;
int files = 0;
int dirs = 0;