Use small logo as window icon

Fix tray icon tooltip when a new database hasn't been saved

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@334 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 15 years ago
parent 84eccd5443
commit 89b4d6032b
  1. BIN
      share/keepassx/icons/keepassx_small.png
  2. 1
      src/dialogs/AutoTypeDlg.cpp
  3. 1
      src/main.cpp
  4. 6
      src/mainwindow.cpp

Binary file not shown.

After

Width:  |  Height:  |  Size: 898 B

@ -29,7 +29,6 @@ AutoTypeDlg::AutoTypeDlg(QList<IEntryHandle*> entries, QList<int> 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();

@ -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();

@ -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);