From 25f91221db6743841db994166fc61c871b2e5f4f Mon Sep 17 00:00:00 2001 From: Matija Skala Date: Wed, 18 Dec 2019 21:05:24 +0100 Subject: [PATCH] display directory name on startup --- fm/src/mainwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fm/src/mainwindow.cpp b/fm/src/mainwindow.cpp index 732937a..d88ba2a 100644 --- a/fm/src/mainwindow.cpp +++ b/fm/src/mainwindow.cpp @@ -523,6 +523,13 @@ void MainWindow::loadSettings(bool wState, bool hState, bool tabState, bool thum // path in window title showPathInWindowTitle = settings->value("windowTitlePath", true).toBool(); if (!showPathInWindowTitle) { setWindowTitle(APP_NAME); } + else { + QFileInfo name = modelList->fileInfo(modelList->index(startPath)); + if (name.exists() && !name.isFile()) { + if (name.fileName().isEmpty()) { setWindowTitle(name.absolutePath()); } + else { setWindowTitle(curIndex.fileName()); } + } + } // 'copy of' filename copyXof = settings->value("copyXof", COPY_X_OF).toString();