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
This commit is contained in:
parent
84eccd5443
commit
89b4d6032b
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);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
setWindowFlags(windowFlags()|Qt::WindowStaysOnTopHint);
|
setWindowFlags(windowFlags()|Qt::WindowStaysOnTopHint);
|
||||||
setGeometry( QRect(QApplication::desktop()->screenGeometry(QCursor::pos()).center() - rect().center(), size()) );
|
setGeometry( QRect(QApplication::desktop()->screenGeometry(QCursor::pos()).center() - rect().center(), size()) );
|
||||||
setWindowIcon(getIcon("keepassx"));
|
|
||||||
entryList->setAlternatingRowColors(config->alternatingRowColors());
|
entryList->setAlternatingRowColors(config->alternatingRowColors());
|
||||||
|
|
||||||
bool hideUsernames = config->hideUsernames();
|
bool hideUsernames = config->hideUsernames();
|
||||||
|
|
|
@ -184,6 +184,7 @@ int main(int argc, char **argv)
|
||||||
DetailViewTemplate=config->detailViewTemplate();
|
DetailViewTemplate=config->detailViewTemplate();
|
||||||
|
|
||||||
loadImages();
|
loadImages();
|
||||||
|
QApplication::setWindowIcon(getIcon("keepassx_small"));
|
||||||
KpxBookmarks::load();
|
KpxBookmarks::load();
|
||||||
initYarrow(); //init random number generator
|
initYarrow(); //init random number generator
|
||||||
SecString::generateSessionKey();
|
SecString::generateSessionKey();
|
||||||
|
|
|
@ -235,7 +235,6 @@ void KeepassMainWindow::setupToolbar(){
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeepassMainWindow::setupIcons(){
|
void KeepassMainWindow::setupIcons(){
|
||||||
setWindowIcon(getIcon("keepassx"));
|
|
||||||
FileNewAction->setIcon(getIcon("filenew"));
|
FileNewAction->setIcon(getIcon("filenew"));
|
||||||
FileOpenAction->setIcon(getIcon("fileopen"));
|
FileOpenAction->setIcon(getIcon("fileopen"));
|
||||||
FileSaveAction->setIcon(getIcon("filesave"));
|
FileSaveAction->setIcon(getIcon("filesave"));
|
||||||
|
@ -932,7 +931,7 @@ bool KeepassMainWindow::OnFileSaveAs(){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dbReadOnly && QFile::exists(currentFilePath+".lock")){
|
if (!dbReadOnly && !currentFilePath.isEmpty() && QFile::exists(currentFilePath+".lock")){
|
||||||
if (!QFile::remove(currentFilePath+".lock"))
|
if (!QFile::remove(currentFilePath+".lock"))
|
||||||
QMessageBox::critical(this, tr("Error"), tr("Couldn't remove database lock file."));
|
QMessageBox::critical(this, tr("Error"), tr("Couldn't remove database lock file."));
|
||||||
}
|
}
|
||||||
|
@ -1470,7 +1469,8 @@ void KeepassMainWindow::updateTrayTooltip() {
|
||||||
if (!IsLocked && !FileOpen)
|
if (!IsLocked && !FileOpen)
|
||||||
SysTray->setToolTip(QString("%1 - %2").arg(APP_DISPLAY_NAME, APP_SHORT_FUNC));
|
SysTray->setToolTip(QString("%1 - %2").arg(APP_DISPLAY_NAME, APP_SHORT_FUNC));
|
||||||
else {
|
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)
|
if (IsLocked)
|
||||||
tooltip.append( QString(" (%1)").arg(tr("locked")) );
|
tooltip.append( QString(" (%1)").arg(tr("locked")) );
|
||||||
SysTray->setToolTip(tooltip);
|
SysTray->setToolTip(tooltip);
|
||||||
|
|
Loading…
Reference in New Issue