|
|
@ -660,7 +660,7 @@ void KeepassMainWindow::updateDetailView(){ |
|
|
|
templ.replace("%lastmod%",entry->lastMod().toString(Qt::DefaultLocaleShortDate)); |
|
|
|
templ.replace("%lastmod%",entry->lastMod().toString(Qt::DefaultLocaleShortDate)); |
|
|
|
templ.replace("%lastaccess%",entry->lastAccess().toString(Qt::DefaultLocaleShortDate)); |
|
|
|
templ.replace("%lastaccess%",entry->lastAccess().toString(Qt::DefaultLocaleShortDate)); |
|
|
|
templ.replace("%expire%",entry->expire().toString(Qt::DefaultLocaleShortDate)); |
|
|
|
templ.replace("%expire%",entry->expire().toString(Qt::DefaultLocaleShortDate)); |
|
|
|
templ.replace("%comment%",entry->comment()); |
|
|
|
templ.replace("%comment%",entry->comment().replace("\n","<br/>")); |
|
|
|
templ.replace("%attachment%",entry->binaryDesc()); |
|
|
|
templ.replace("%attachment%",entry->binaryDesc()); |
|
|
|
|
|
|
|
|
|
|
|
if(entry->expire()!=Date_Never){ |
|
|
|
if(entry->expire()!=Date_Never){ |
|
|
@ -715,100 +715,105 @@ void KeepassMainWindow::updateDetailView(){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void KeepassMainWindow::setStateEntrySelected(SelectionState s){ |
|
|
|
void KeepassMainWindow::setStateEntrySelected(SelectionState s){ |
|
|
|
EntrySelection=s; |
|
|
|
EntrySelection = s; |
|
|
|
if(GroupSelection == NONE || GroupSelection == SINGLE) |
|
|
|
if (GroupSelection == NONE || GroupSelection == SINGLE){ |
|
|
|
switch(EntrySelection){ |
|
|
|
switch (EntrySelection){ |
|
|
|
case NONE: |
|
|
|
case NONE: |
|
|
|
EditPasswordToClipboardAction->setEnabled(false); |
|
|
|
EditPasswordToClipboardAction->setEnabled(false); |
|
|
|
EditUsernameToClipboardAction->setEnabled(false); |
|
|
|
EditUsernameToClipboardAction->setEnabled(false); |
|
|
|
EditOpenUrlAction->setEnabled(false); |
|
|
|
EditOpenUrlAction->setEnabled(false); |
|
|
|
EditSaveAttachmentAction->setEnabled(false); |
|
|
|
EditSaveAttachmentAction->setEnabled(false); |
|
|
|
EditEditEntryAction->setEnabled(false); |
|
|
|
EditEditEntryAction->setEnabled(false); |
|
|
|
EditCloneEntryAction->setEnabled(false); |
|
|
|
EditCloneEntryAction->setEnabled(false); |
|
|
|
EditCloneEntryAction->setText(tr("Clone Entry")); |
|
|
|
EditCloneEntryAction->setText(tr("Clone Entry")); |
|
|
|
EditDeleteEntryAction->setEnabled(false); |
|
|
|
EditDeleteEntryAction->setEnabled(false); |
|
|
|
EditDeleteEntryAction->setText(tr("Delete Entry")); |
|
|
|
EditDeleteEntryAction->setText(tr("Delete Entry")); |
|
|
|
#ifdef AUTOTYPE |
|
|
|
#ifdef AUTOTYPE |
|
|
|
EditAutoTypeAction->setEnabled(false); |
|
|
|
EditAutoTypeAction->setEnabled(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
break; |
|
|
|
break; |
|
|
|
case SINGLE: |
|
|
|
case SINGLE: |
|
|
|
EditPasswordToClipboardAction->setEnabled(true); |
|
|
|
EditPasswordToClipboardAction->setEnabled(true); |
|
|
|
EditUsernameToClipboardAction->setEnabled(true); |
|
|
|
EditUsernameToClipboardAction->setEnabled(true); |
|
|
|
EditOpenUrlAction->setEnabled(true); |
|
|
|
EditOpenUrlAction->setEnabled(true); |
|
|
|
EditSaveAttachmentAction->setEnabled(((EntryViewItem*)(EntryView->selectedItems()[0]))->EntryHandle->binarySize() > 0); |
|
|
|
EditSaveAttachmentAction->setEnabled(((EntryViewItem*)(EntryView->selectedItems()[0]))->EntryHandle->binarySize() > 0); |
|
|
|
EditEditEntryAction->setEnabled(true); |
|
|
|
EditEditEntryAction->setEnabled(true); |
|
|
|
EditCloneEntryAction->setEnabled(true); |
|
|
|
EditCloneEntryAction->setEnabled(true); |
|
|
|
EditCloneEntryAction->setText(tr("Clone Entry")); |
|
|
|
EditCloneEntryAction->setText(tr("Clone Entry")); |
|
|
|
EditDeleteEntryAction->setEnabled(true); |
|
|
|
EditDeleteEntryAction->setEnabled(true); |
|
|
|
EditDeleteEntryAction->setText(tr("Delete Entry")); |
|
|
|
EditDeleteEntryAction->setText(tr("Delete Entry")); |
|
|
|
#ifdef AUTOTYPE |
|
|
|
#ifdef AUTOTYPE |
|
|
|
EditAutoTypeAction->setEnabled(true); |
|
|
|
EditAutoTypeAction->setEnabled(true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
break; |
|
|
|
break; |
|
|
|
case MULTIPLE: |
|
|
|
case MULTIPLE: |
|
|
|
EditPasswordToClipboardAction->setEnabled(false); |
|
|
|
EditPasswordToClipboardAction->setEnabled(false); |
|
|
|
EditUsernameToClipboardAction->setEnabled(false); |
|
|
|
EditUsernameToClipboardAction->setEnabled(false); |
|
|
|
EditOpenUrlAction->setEnabled(false); |
|
|
|
EditOpenUrlAction->setEnabled(false); |
|
|
|
EditSaveAttachmentAction->setEnabled(false); |
|
|
|
EditSaveAttachmentAction->setEnabled(false); |
|
|
|
EditEditEntryAction->setEnabled(false); |
|
|
|
EditEditEntryAction->setEnabled(false); |
|
|
|
EditCloneEntryAction->setEnabled(true); |
|
|
|
EditCloneEntryAction->setEnabled(true); |
|
|
|
EditCloneEntryAction->setText(tr("Clone Entries")); |
|
|
|
EditCloneEntryAction->setText(tr("Clone Entries")); |
|
|
|
EditDeleteEntryAction->setEnabled(true); |
|
|
|
EditDeleteEntryAction->setEnabled(true); |
|
|
|
EditDeleteEntryAction->setText(tr("Delete Entries")); |
|
|
|
EditDeleteEntryAction->setText(tr("Delete Entries")); |
|
|
|
#ifdef AUTOTYPE |
|
|
|
#ifdef AUTOTYPE |
|
|
|
EditAutoTypeAction->setEnabled(false); |
|
|
|
EditAutoTypeAction->setEnabled(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: Q_ASSERT(false); |
|
|
|
default: |
|
|
|
} |
|
|
|
Q_ASSERT(false); |
|
|
|
else if(GroupSelection == SEARCHGROUP) |
|
|
|
} |
|
|
|
switch(EntrySelection){ |
|
|
|
} |
|
|
|
case NONE: |
|
|
|
else if (GroupSelection == SEARCHGROUP){ |
|
|
|
EditUsernameToClipboardAction->setEnabled(false); |
|
|
|
switch(EntrySelection){ |
|
|
|
EditPasswordToClipboardAction->setEnabled(false); |
|
|
|
case NONE: |
|
|
|
EditOpenUrlAction->setEnabled(false); |
|
|
|
EditUsernameToClipboardAction->setEnabled(false); |
|
|
|
EditSaveAttachmentAction->setEnabled(false); |
|
|
|
EditPasswordToClipboardAction->setEnabled(false); |
|
|
|
EditEditEntryAction->setEnabled(false); |
|
|
|
EditOpenUrlAction->setEnabled(false); |
|
|
|
EditCloneEntryAction->setEnabled(false); |
|
|
|
EditSaveAttachmentAction->setEnabled(false); |
|
|
|
EditCloneEntryAction->setText(tr("Clone Entry")); |
|
|
|
EditEditEntryAction->setEnabled(false); |
|
|
|
EditDeleteEntryAction->setEnabled(false); |
|
|
|
EditCloneEntryAction->setEnabled(false); |
|
|
|
EditDeleteEntryAction->setText(tr("Delete Entry")); |
|
|
|
EditCloneEntryAction->setText(tr("Clone Entry")); |
|
|
|
|
|
|
|
EditDeleteEntryAction->setEnabled(false); |
|
|
|
|
|
|
|
EditDeleteEntryAction->setText(tr("Delete Entry")); |
|
|
|
#ifdef AUTOTYPE |
|
|
|
#ifdef AUTOTYPE |
|
|
|
EditAutoTypeAction->setEnabled(false); |
|
|
|
EditAutoTypeAction->setEnabled(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
break; |
|
|
|
break; |
|
|
|
case SINGLE: |
|
|
|
case SINGLE: |
|
|
|
EditUsernameToClipboardAction->setEnabled(true); |
|
|
|
EditUsernameToClipboardAction->setEnabled(true); |
|
|
|
EditPasswordToClipboardAction->setEnabled(true); |
|
|
|
EditPasswordToClipboardAction->setEnabled(true); |
|
|
|
EditOpenUrlAction->setEnabled(true); |
|
|
|
EditOpenUrlAction->setEnabled(true); |
|
|
|
EditSaveAttachmentAction->setEnabled(((EntryViewItem*)(EntryView->selectedItems()[0]))->EntryHandle->binarySize() > 0); |
|
|
|
EditSaveAttachmentAction->setEnabled(((EntryViewItem*)(EntryView->selectedItems()[0]))->EntryHandle->binarySize() > 0); |
|
|
|
EditEditEntryAction->setEnabled(true); |
|
|
|
EditEditEntryAction->setEnabled(true); |
|
|
|
EditCloneEntryAction->setEnabled(false); |
|
|
|
EditCloneEntryAction->setEnabled(false); |
|
|
|
EditCloneEntryAction->setText(tr("Clone Entry")); |
|
|
|
EditCloneEntryAction->setText(tr("Clone Entry")); |
|
|
|
EditDeleteEntryAction->setEnabled(true); |
|
|
|
EditDeleteEntryAction->setEnabled(true); |
|
|
|
EditDeleteEntryAction->setText(tr("Delete Entry")); |
|
|
|
EditDeleteEntryAction->setText(tr("Delete Entry")); |
|
|
|
#ifdef AUTOTYPE |
|
|
|
#ifdef AUTOTYPE |
|
|
|
EditAutoTypeAction->setEnabled(true); |
|
|
|
EditAutoTypeAction->setEnabled(true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
break; |
|
|
|
break; |
|
|
|
case MULTIPLE: |
|
|
|
case MULTIPLE: |
|
|
|
EditUsernameToClipboardAction->setEnabled(false); |
|
|
|
EditUsernameToClipboardAction->setEnabled(false); |
|
|
|
EditPasswordToClipboardAction->setEnabled(false); |
|
|
|
EditPasswordToClipboardAction->setEnabled(false); |
|
|
|
EditOpenUrlAction->setEnabled(false); |
|
|
|
EditOpenUrlAction->setEnabled(false); |
|
|
|
EditSaveAttachmentAction->setEnabled(false); |
|
|
|
EditSaveAttachmentAction->setEnabled(false); |
|
|
|
EditEditEntryAction->setEnabled(false); |
|
|
|
EditEditEntryAction->setEnabled(false); |
|
|
|
EditCloneEntryAction->setEnabled(false); |
|
|
|
EditCloneEntryAction->setEnabled(false); |
|
|
|
EditCloneEntryAction->setText(tr("Clone Entries")); |
|
|
|
EditCloneEntryAction->setText(tr("Clone Entries")); |
|
|
|
EditDeleteEntryAction->setEnabled(true); |
|
|
|
EditDeleteEntryAction->setEnabled(true); |
|
|
|
EditDeleteEntryAction->setText(tr("Delete Entries")); |
|
|
|
EditDeleteEntryAction->setText(tr("Delete Entries")); |
|
|
|
#ifdef AUTOTYPE |
|
|
|
#ifdef AUTOTYPE |
|
|
|
EditAutoTypeAction->setEnabled(false); |
|
|
|
EditAutoTypeAction->setEnabled(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: Q_ASSERT(false); |
|
|
|
default: |
|
|
|
} |
|
|
|
Q_ASSERT(false); |
|
|
|
else Q_ASSERT(false); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
Q_ASSERT(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|