diff --git a/share/keepassx/icons/keepassx_small.png b/share/keepassx/icons/keepassx_small.png new file mode 100644 index 0000000..7fb7334 Binary files /dev/null and b/share/keepassx/icons/keepassx_small.png differ diff --git a/src/dialogs/AutoTypeDlg.cpp b/src/dialogs/AutoTypeDlg.cpp index 5405920..5a377a8 100644 --- a/src/dialogs/AutoTypeDlg.cpp +++ b/src/dialogs/AutoTypeDlg.cpp @@ -29,7 +29,6 @@ AutoTypeDlg::AutoTypeDlg(QList entries, QList numbers, bool setAttribute(Qt::WA_DeleteOnClose); setWindowFlags(windowFlags()|Qt::WindowStaysOnTopHint); setGeometry( QRect(QApplication::desktop()->screenGeometry(QCursor::pos()).center() - rect().center(), size()) ); - setWindowIcon(getIcon("keepassx")); entryList->setAlternatingRowColors(config->alternatingRowColors()); bool hideUsernames = config->hideUsernames(); diff --git a/src/main.cpp b/src/main.cpp index c825647..e7aa05d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -184,6 +184,7 @@ int main(int argc, char **argv) DetailViewTemplate=config->detailViewTemplate(); loadImages(); + QApplication::setWindowIcon(getIcon("keepassx_small")); KpxBookmarks::load(); initYarrow(); //init random number generator SecString::generateSessionKey(); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c588eff..ba4cf5d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -235,7 +235,6 @@ void KeepassMainWindow::setupToolbar(){ } void KeepassMainWindow::setupIcons(){ - setWindowIcon(getIcon("keepassx")); FileNewAction->setIcon(getIcon("filenew")); FileOpenAction->setIcon(getIcon("fileopen")); FileSaveAction->setIcon(getIcon("filesave")); @@ -932,7 +931,7 @@ bool KeepassMainWindow::OnFileSaveAs(){ return false; } - if (!dbReadOnly && QFile::exists(currentFilePath+".lock")){ + if (!dbReadOnly && !currentFilePath.isEmpty() && QFile::exists(currentFilePath+".lock")){ if (!QFile::remove(currentFilePath+".lock")) QMessageBox::critical(this, tr("Error"), tr("Couldn't remove database lock file.")); } @@ -1470,7 +1469,8 @@ void KeepassMainWindow::updateTrayTooltip() { if (!IsLocked && !FileOpen) SysTray->setToolTip(QString("%1 - %2").arg(APP_DISPLAY_NAME, APP_SHORT_FUNC)); else { - QString tooltip = QString("%1 - %2").arg(APP_DISPLAY_NAME, currentFileName); + QString tooltip = QString("%1 - %2").arg(APP_DISPLAY_NAME, currentFilePath.isEmpty() + ? QString("[%1]").arg(tr("new")) : currentFileName); if (IsLocked) tooltip.append( QString(" (%1)").arg(tr("locked")) ); SysTray->setToolTip(tooltip);