Skip to content

Commit ae8d523

Browse files
committed
fix: should set default workspace to home path on macOS
1 parent 0cb62c8 commit ae8d523

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/core/utils/GpgUtils.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ auto GPGFRONTEND_CORE_EXPORT DecidePinentry() -> QString {
479479
for (const QString& name : preferred_list) {
480480
QString path = QStandardPaths::findExecutable(name);
481481
if (!path.isEmpty()) {
482+
LOG_D() << "find pinentry path: " << path;
482483
return path;
483484
}
484485
}
@@ -488,6 +489,7 @@ auto GPGFRONTEND_CORE_EXPORT DecidePinentry() -> QString {
488489
for (const QString& name : preferred_list) {
489490
QString path = QStandardPaths::findExecutable(name, search_paths);
490491
if (!path.isEmpty()) {
492+
LOG_D() << "find pinentry path by search path: " << path;
491493
return path;
492494
}
493495
}

src/ui/widgets/TextEditTabWidget.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,12 @@ void TextEditTabWidget::SlotNewTabWithContent(QString title,
312312
}
313313

314314
void TextEditTabWidget::SlotOpenDefaultPath() {
315+
#if defined(__APPLE__) && defined(__MACH__)
316+
auto* page = new FilePage(qobject_cast<QWidget*>(parent()), QDir::homePath());
317+
#else
315318
auto* page =
316319
new FilePage(qobject_cast<QWidget*>(parent()), QDir::currentPath());
320+
#endif
317321
auto index = this->addTab(page, QString());
318322
this->setTabIcon(index, QIcon(":/icons/workspace.png"));
319323
this->setTabText(index, tr("Default Workspace"));

0 commit comments

Comments
 (0)