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:
@@ -38,7 +38,7 @@
|
||||
//Added by qt3to4:
|
||||
#include <QShowEvent>
|
||||
|
||||
|
||||
#include "SelectIconDlg.h"
|
||||
#include "PasswordGenDlg.h"
|
||||
#include "EditEntryDlg.h"
|
||||
|
||||
@@ -65,6 +65,7 @@ connect(ButtonSaveAttachment, SIGNAL(clicked()), this, SLOT( OnSaveAttachment())
|
||||
connect(ButtonGenPw, SIGNAL(clicked()), this, SLOT( OnButtonGenPw()));
|
||||
connect(ButtonOK, SIGNAL(clicked()),this,SLOT(OnButtonOK()));
|
||||
connect(CheckBox_ExpiresNever,SIGNAL(stateChanged(int)),this,SLOT(OnCheckBoxExpiresNeverChanged(int)));
|
||||
connect(Button_CustomIcons,SIGNAL(clicked()),this,SLOT(OnCustomIcons()));
|
||||
|
||||
ButtonOpenAttachment->setIcon(*Icon_FileOpen);
|
||||
ButtonDeleteAttachment->setIcon(*Icon_EditDelete);
|
||||
@@ -74,7 +75,7 @@ if(entry->BinaryData.isNull()){
|
||||
ButtonSaveAttachment->setDisabled(true);
|
||||
ButtonDeleteAttachment->setDisabled(true);}
|
||||
setCaption(entry->Title);
|
||||
setIcon(EntryIcons[entry->ImageID]);
|
||||
setIcon(db->icon(entry->ImageID));
|
||||
Edit_Title->setText(entry->Title);
|
||||
Edit_UserName->setText(entry->UserName);
|
||||
Edit_URL->setText(entry->URL);
|
||||
@@ -194,6 +195,8 @@ if(Combo_Group->currentItem()!=db->getGroupIndex(entry->GroupID)){
|
||||
db->moveEntry(entry,&db->group(Combo_Group->currentItem()));
|
||||
EntryMoved=true; ModFlag=true;
|
||||
}
|
||||
if(entry->ImageID<BUILTIN_ICONS && Combo_IconPicker->currentItem()>=BUILTIN_ICONS)
|
||||
entry->OldImgID=entry->ImageID;
|
||||
entry->ImageID=Combo_IconPicker->currentItem();
|
||||
|
||||
if(ModFlag&&EntryMoved)done(2);
|
||||
@@ -359,8 +362,17 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CEditEntryDlg::OnCustomIcons(){
|
||||
CSelectIconDlg dlg(db,Combo_IconPicker->currentItem(),this);
|
||||
int r=dlg.exec();
|
||||
if(dlg.ModFlag)ModFlag=true;
|
||||
if(r!=-1){
|
||||
Combo_IconPicker->clear();
|
||||
for(int i=0;i<db->numIcons();i++)
|
||||
Combo_IconPicker->insertItem(db->icon(i),"",i);
|
||||
Combo_IconPicker->setCurrentItem(r);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ public slots:
|
||||
void OnSaveAttachment();
|
||||
void OnButtonGenPw();
|
||||
void OnCheckBoxExpiresNeverChanged(int state);
|
||||
void OnCustomIcons();
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ IconID=0;
|
||||
connect( ButtonOK, SIGNAL( clicked() ), this, SLOT( OnOK() ) );
|
||||
connect( ButtonCancel, SIGNAL( clicked() ), this, SLOT( OnCancel() ) );
|
||||
connect( Button_Icon, SIGNAL( clicked() ), this, SLOT( OnIconDlg() ));
|
||||
ModFlag=false;
|
||||
}
|
||||
|
||||
CEditGroupDialog::~CEditGroupDialog()
|
||||
@@ -68,6 +69,7 @@ done(0);
|
||||
void CEditGroupDialog::OnIconDlg(){
|
||||
CSelectIconDlg dlg(db,IconID,this);
|
||||
int r=dlg.exec();
|
||||
if(dlg.ModFlag)ModFlag=true;
|
||||
if(r!=-1){
|
||||
ComboIconPicker->clear();
|
||||
for(int i=0;i<db->numIcons();i++)
|
||||
|
||||
@@ -33,6 +33,7 @@ class CEditGroupDialog : public QDialog, public Ui_EditGroupDialog
|
||||
public:
|
||||
CEditGroupDialog(Database*,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CEditGroupDialog();
|
||||
bool ModFlag;
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
int IconID;
|
||||
QString GroupName;
|
||||
|
||||
@@ -33,7 +33,6 @@ setupUi(this);
|
||||
db=database;
|
||||
CtxMenu=new QMenu(this);
|
||||
DeleteAction=CtxMenu->addAction(*Icon_EditDelete,tr("Delete"));
|
||||
CustomIconsModified=false;
|
||||
connect(Button_AddIcon, SIGNAL(clicked()), this, SLOT(OnAddIcon()));
|
||||
connect(Button_PickIcon, SIGNAL(clicked()), this, SLOT(OnPickIcon()));
|
||||
connect(Button_Cancel, SIGNAL(clicked()), this, SLOT(OnCancel()));
|
||||
@@ -41,6 +40,7 @@ connect(DeleteAction,SIGNAL(triggered()),this,SLOT(OnDelete()));
|
||||
connect(List,SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),this,SLOT(OnSelectionChanged(QListWidgetItem*,QListWidgetItem*)));
|
||||
updateView();
|
||||
List->setCurrentItem(List->item(CurrentID));
|
||||
ModFlag=false;
|
||||
}
|
||||
|
||||
void CSelectIconDlg::updateView(){
|
||||
@@ -70,7 +70,7 @@ for(int i=0;i<filenames.size();i++){
|
||||
}
|
||||
if(errors.size())
|
||||
QMessageBox::warning(this,tr("Error"),tr("An error occured while loading the icon(s):\n"));
|
||||
CustomIconsModified=true;
|
||||
ModFlag=true;
|
||||
updateView();
|
||||
List->setCurrentItem(List->item(List->count()-1));
|
||||
}
|
||||
@@ -89,8 +89,10 @@ CtxMenu->popup(event->globalPos());
|
||||
}
|
||||
|
||||
void CSelectIconDlg::OnDelete(){
|
||||
ModFlag=true;
|
||||
db->removeIcon(List->currentItem()->data(32).toInt());
|
||||
updateView();
|
||||
List->setCurrentItem(List->item(0));
|
||||
}
|
||||
|
||||
void CSelectIconDlg::OnPickIcon(){
|
||||
|
||||
@@ -32,7 +32,7 @@ class CSelectIconDlg:public QDialog, public Ui_SelectIconDlg{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CSelectIconDlg(Database* db,int,QWidget* parent = 0, const char* name = 0, bool modal = false, Qt::WFlags fl = 0);
|
||||
bool CustomIconsModified;
|
||||
bool ModFlag;
|
||||
|
||||
public slots:
|
||||
void OnAddIcon();
|
||||
|
||||
Reference in New Issue
Block a user