EntryView and DetailView now also show "never" for entries which don't expire,
EntryView now calls updateItems() when column config is changed,
Added {TAB} template for Auto-Type,
"Custom Icon" feature is not longer touching the ImageID value within the database,
Fixed SegFault when enabling a new column (not in 0.2.0, only svn)
git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@79 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -101,7 +101,6 @@ for(int i=0;i<str.size();i++){
|
||||
Keys << getKeysym(str[i]);
|
||||
}
|
||||
|
||||
|
||||
MainWin->hide();
|
||||
Display* pDisplay = XOpenDisplay( NULL );
|
||||
for(int i=0;i<Keys.size();i++){
|
||||
@@ -213,8 +212,140 @@ if(!tmpl.compare("left")){
|
||||
if(!tmpl.compare("right")){
|
||||
keys << XK_Right;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f1")){
|
||||
keys << XK_F1;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f2")){
|
||||
keys << XK_F2;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f3")){
|
||||
keys << XK_F3;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f4")){
|
||||
keys << XK_F4;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f5")){
|
||||
keys << XK_F5;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f6")){
|
||||
keys << XK_F6;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f7")){
|
||||
keys << XK_F7;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f8")){
|
||||
keys << XK_F8;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f9")){
|
||||
keys << XK_F9;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f10")){
|
||||
keys << XK_F10;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f11")){
|
||||
keys << XK_F11;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f12")){
|
||||
keys << XK_F12;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f13")){
|
||||
keys << XK_F13;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f14")){
|
||||
keys << XK_F14;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f15")){
|
||||
keys << XK_F15;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("f16")){
|
||||
keys << XK_F16;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("add") || !tmpl.compare("plus")){
|
||||
keys << getKeysym('+');
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("subtract")){
|
||||
keys << getKeysym('-');
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("multiply")){
|
||||
keys << getKeysym('+');
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("divide")){
|
||||
keys << getKeysym('/');
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("at")){
|
||||
keys << getKeysym('@');
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("percent")){
|
||||
keys << getKeysym('%');
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("caret")){
|
||||
keys << getKeysym('^');
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("tilde")){
|
||||
keys << getKeysym('~');
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("leftbrace")){
|
||||
keys << getKeysym('{');
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("rightbrace")){
|
||||
keys << getKeysym('}');
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("leftparen")){
|
||||
keys << getKeysym('(');
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("rightparen")){
|
||||
keys << getKeysym(')');
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("winl")){
|
||||
keys << XK_Super_L;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("winr")){
|
||||
keys << XK_Super_R;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("win")){
|
||||
keys << XK_Super_L;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("tab")){
|
||||
keys << XK_Tab;
|
||||
return;}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void AutoType::stringToKeysyms(const QString& string,QList<quint16>& KeySymList){
|
||||
for(int i=0; i<string.length();i++)
|
||||
KeySymList << getKeysym(string[i]);
|
||||
|
||||
@@ -101,6 +101,10 @@ updateItems(CurrentGroup);
|
||||
|
||||
|
||||
void KeepassEntryView::updateItems(unsigned int GroupID){
|
||||
QList<QTreeWidgetItem*> ItemSelec=selectedItems();
|
||||
QList<quint32> SelectionIDs;
|
||||
for(int i=0; i<ItemSelec.size(); i++)
|
||||
SelectionIDs << ((EntryViewItem*)ItemSelec[i])->pEntry->sID;
|
||||
IsSearchGroup=false;
|
||||
clear();
|
||||
Items.clear();
|
||||
@@ -111,6 +115,11 @@ for(int i=0;i<db->numEntries();i++){
|
||||
if(db->entry(i).GroupID==GroupID)
|
||||
setEntry(&db->entry(i));
|
||||
}
|
||||
if(SelectionIDs.size())
|
||||
for(int i=0;i<Items.size();i++){
|
||||
for(int j=0; j<SelectionIDs.size();j++){
|
||||
if(Items[i]->pEntry->sID==SelectionIDs[j]) setItemSelected(Items[i],true);}
|
||||
}
|
||||
}
|
||||
|
||||
void KeepassEntryView::showSearchResults(QList<Q_UINT32>& results){
|
||||
@@ -149,13 +158,13 @@ void KeepassEntryView::setEntry(CEntry* entry){
|
||||
if(config.Columns[4]){
|
||||
tmp->setText(j++,entry->Additional.section('\n',0,0));}
|
||||
if(config.Columns[5]){
|
||||
tmp->setText(j++,entry->Expire.date().toString(Qt::LocalDate));}
|
||||
tmp->setText(j++,entry->Expire.dateToString(Qt::LocalDate));}
|
||||
if(config.Columns[6]){
|
||||
tmp->setText(j++,entry->Creation.date().toString(Qt::LocalDate));}
|
||||
tmp->setText(j++,entry->Creation.dateToString(Qt::LocalDate));}
|
||||
if(config.Columns[7]){
|
||||
tmp->setText(j++,entry->LastMod.date().toString(Qt::LocalDate));}
|
||||
tmp->setText(j++,entry->LastMod.dateToString(Qt::LocalDate));}
|
||||
if(config.Columns[8]){
|
||||
tmp->setText(j++,entry->LastAccess.date().toString(Qt::LocalDate));}
|
||||
tmp->setText(j++,entry->LastAccess.dateToString(Qt::LocalDate));}
|
||||
if(config.Columns[9]){
|
||||
tmp->setText(j++,entry->BinaryDesc);}
|
||||
Items.back()->setIcon(0,db->icon(entry->ImageID));
|
||||
@@ -187,13 +196,13 @@ for(int i=0;i<Items.size();i++){
|
||||
if(config.Columns[4]){
|
||||
tmp->setText(j++,entry->Additional.section('\n',0,0));}
|
||||
if(config.Columns[5]){
|
||||
tmp->setText(j++,entry->Expire.date().toString(Qt::LocalDate));}
|
||||
tmp->setText(j++,entry->Expire.dateToString(Qt::LocalDate));}
|
||||
if(config.Columns[6]){
|
||||
tmp->setText(j++,entry->Creation.date().toString(Qt::LocalDate));}
|
||||
tmp->setText(j++,entry->Creation.dateToString(Qt::LocalDate));}
|
||||
if(config.Columns[7]){
|
||||
tmp->setText(j++,entry->LastMod.date().toString(Qt::LocalDate));}
|
||||
tmp->setText(j++,entry->LastMod.dateToString(Qt::LocalDate));}
|
||||
if(config.Columns[8]){
|
||||
tmp->setText(j++,entry->LastAccess.date().toString(Qt::LocalDate));}
|
||||
tmp->setText(j++,entry->LastAccess.dateToString(Qt::LocalDate));}
|
||||
if(config.Columns[9]){
|
||||
tmp->setText(j++,entry->BinaryDesc);}
|
||||
tmp->setIcon(0,db->icon(entry->ImageID));
|
||||
@@ -229,8 +238,8 @@ resizeColumns();
|
||||
}
|
||||
|
||||
void KeepassEntryView::resizeColumns(){
|
||||
|
||||
AutoResizeColumns=false;
|
||||
if(!header()->count())return;
|
||||
|
||||
for(int i=0;i<NUM_COLUMNS;i++)
|
||||
if(!config.Columns[i])ColumnSizes[i]=0;
|
||||
|
||||
Reference in New Issue
Block a user