fixed crash when deleting search results,
fixed bad SID Assoc. git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@58 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
		
							parent
							
								
									49059c82f4
								
							
						
					
					
						commit
						9bbe30fb16
					
				| 
						 | 
					@ -109,13 +109,13 @@ return false;}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if((Version & 0xFFFFFF00) != (PWM_DBVER_DW & 0xFFFFFF00)){
 | 
					if((Version & 0xFFFFFF00) != (PWM_DBVER_DW & 0xFFFFFF00)){
 | 
				
			||||||
	err=tr("Unsupported File Version");
 | 
						err=tr("Unsupported File Version.");
 | 
				
			||||||
	return false;}
 | 
						return false;}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if(Flags & PWM_FLAG_RIJNDAEL) CryptoAlgorithmus = ALGO_AES;
 | 
					if(Flags & PWM_FLAG_RIJNDAEL) CryptoAlgorithmus = ALGO_AES;
 | 
				
			||||||
else if(Flags & PWM_FLAG_TWOFISH) CryptoAlgorithmus = ALGO_TWOFISH;
 | 
					else if(Flags & PWM_FLAG_TWOFISH) CryptoAlgorithmus = ALGO_TWOFISH;
 | 
				
			||||||
else {
 | 
					else {
 | 
				
			||||||
 err=tr("Unknown Encryption Algorithm");
 | 
					 err=tr("Unknown Encryption Algorithm.");
 | 
				
			||||||
 return false;
 | 
					 return false;
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -147,7 +147,7 @@ else if(CryptoAlgorithmus == ALGO_TWOFISH)
 | 
				
			||||||
			total_size - DB_HEADER_SIZE, (Q_UINT8 *)buffer + DB_HEADER_SIZE);
 | 
								total_size - DB_HEADER_SIZE, (Q_UINT8 *)buffer + DB_HEADER_SIZE);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if((crypto_size > 2147483446) || (crypto_size == 0)){err=tr("Decryption failed.\nThe key is wrong or the file is damaged"); return false;}
 | 
					if((crypto_size > 2147483446) || (crypto_size == 0)){err=tr("Decryption failed.\nThe key is wrong or the file is damaged."); return false;}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sha256_starts(&sha32);
 | 
					sha256_starts(&sha32);
 | 
				
			||||||
sha256_update(&sha32,(unsigned char *)buffer + DB_HEADER_SIZE,crypto_size);
 | 
					sha256_update(&sha32,(unsigned char *)buffer + DB_HEADER_SIZE,crypto_size);
 | 
				
			||||||
| 
						 | 
					@ -252,7 +252,7 @@ Rijndael rijndael;
 | 
				
			||||||
sha256_context sha2;
 | 
					sha256_context sha2;
 | 
				
			||||||
if(rijndael.init(Rijndael::ECB, Rijndael::Encrypt, (const Q_UINT8 *)KeySeed,
 | 
					if(rijndael.init(Rijndael::ECB, Rijndael::Encrypt, (const Q_UINT8 *)KeySeed,
 | 
				
			||||||
                 Rijndael::Key32Bytes, 0) != RIJNDAEL_SUCCESS){
 | 
					                 Rijndael::Key32Bytes, 0) != RIJNDAEL_SUCCESS){
 | 
				
			||||||
  cout << QString("unexpected error in %1, line %2").arg(__FILE__).arg(__LINE__).ascii() << endl;
 | 
					  _ERROR
 | 
				
			||||||
  exit(1);}
 | 
					  exit(1);}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
memcpy(tmp,src,32);
 | 
					memcpy(tmp,src,32);
 | 
				
			||||||
| 
						 | 
					@ -341,9 +341,24 @@ return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void PwDatabase::addEntry(CEntry* NewEntry){
 | 
					CEntry* PwDatabase::addEntry(CEntry* NewEntry){
 | 
				
			||||||
CEntry *entry=addEntry();
 | 
					if(Entries.size()==0){
 | 
				
			||||||
*entry=*NewEntry;
 | 
					 NewEntry->sID=0;
 | 
				
			||||||
 | 
					 getRandomBytes(&NewEntry->ID,16,1,false);
 | 
				
			||||||
 | 
					 }
 | 
				
			||||||
 | 
					 else {
 | 
				
			||||||
 | 
					 NewEntry->sID=Entries.back().sID+1;
 | 
				
			||||||
 | 
					 while(1){
 | 
				
			||||||
 | 
					 bool used=false;
 | 
				
			||||||
 | 
					 getRandomBytes(&NewEntry->ID,16,1,false);
 | 
				
			||||||
 | 
					  for(int j=0;j<Entries.size();j++){
 | 
				
			||||||
 | 
						int k;
 | 
				
			||||||
 | 
						for(k=0;k<16;k++){if(Entries[j].ID[k]!=NewEntry->ID[k])k=0;break;}
 | 
				
			||||||
 | 
						if(k==15)used=true;}
 | 
				
			||||||
 | 
					 if(used==false)break;
 | 
				
			||||||
 | 
					 }}
 | 
				
			||||||
 | 
					Entries.push_back(*NewEntry);
 | 
				
			||||||
 | 
					return &Entries.back();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,7 +68,7 @@ public:
 | 
				
			||||||
 void      deleteEntry(CEntry* pEntry);
 | 
					 void      deleteEntry(CEntry* pEntry);
 | 
				
			||||||
 void      moveEntry(CEntry* pEntry,CGroup* pDstGroup);
 | 
					 void      moveEntry(CEntry* pEntry,CGroup* pDstGroup);
 | 
				
			||||||
 CEntry*   addEntry();
 | 
					 CEntry*   addEntry();
 | 
				
			||||||
 void	   addEntry(CEntry* NewEntry);
 | 
					 CEntry*   addEntry(CEntry* NewEntry);
 | 
				
			||||||
 void 	   merge(PwDatabase* db2);
 | 
					 void 	   merge(PwDatabase* db2);
 | 
				
			||||||
 bool	   isParentGroup(CGroup* Group,CGroup* PotenialParent);
 | 
					 bool	   isParentGroup(CGroup* Group,CGroup* PotenialParent);
 | 
				
			||||||
 QString   getError();  //get first error
 | 
					 QString   getError();  //get first error
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -140,14 +140,14 @@ return str;
 | 
				
			||||||
QColor CConfig::ParseColorString(QString str){
 | 
					QColor CConfig::ParseColorString(QString str){
 | 
				
			||||||
QStringList lst=QStringList::split(',',str);
 | 
					QStringList lst=QStringList::split(',',str);
 | 
				
			||||||
if(lst.size()!=3){
 | 
					if(lst.size()!=3){
 | 
				
			||||||
  qWarning(QObject::tr("Warnung:")+" CConfig::ParseColorString(QString):"+QObject::tr("ungültiger RGB-Farbwert.\n"));
 | 
					  qWarning(QObject::tr("Warning:")+" CConfig::ParseColorString(QString):"+QObject::tr("Invalid RGB color value.\n"));
 | 
				
			||||||
  return QColor(0,0,0);}
 | 
					  return QColor(0,0,0);}
 | 
				
			||||||
bool err[3];
 | 
					bool err[3];
 | 
				
			||||||
int r=lst[0].toUInt(err);
 | 
					int r=lst[0].toUInt(err);
 | 
				
			||||||
int g=lst[1].toUInt(err+1);
 | 
					int g=lst[1].toUInt(err+1);
 | 
				
			||||||
int b=lst[2].toUInt(err+2);
 | 
					int b=lst[2].toUInt(err+2);
 | 
				
			||||||
if(!err[0] || !err[1] || !err[2]){
 | 
					if(!err[0] || !err[1] || !err[2]){
 | 
				
			||||||
  qWarning(QObject::tr("Warnung:")+" CConfig::ParseColorString(QString):"+QObject::tr("ungültiger RGB-Farbwert.\n"));
 | 
					  qWarning(QObject::tr("Warning:")+" CConfig::ParseColorString(QString):"+QObject::tr("Invalid RGB color value.\n"));
 | 
				
			||||||
  return QColor(0,0,0);}
 | 
					  return QColor(0,0,0);}
 | 
				
			||||||
return QColor(r,g,b);
 | 
					return QColor(r,g,b);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
/***************************************************************************
 | 
					/***************************************************************************
 | 
				
			||||||
 *   Copyright (C) 2005 by Tarek Saidi                                     *
 | 
					 *   Copyright (C) 2005-2006 by Tarek Saidi                                *
 | 
				
			||||||
 *   tarek@linux                                                           *
 | 
					 *   tarek@linux                                                           *
 | 
				
			||||||
 *                                                                         *
 | 
					 *                                                                         *
 | 
				
			||||||
 *   This program is free software; you can redistribute it and/or modify  *
 | 
					 *   This program is free software; you can redistribute it and/or modify  *
 | 
				
			||||||
| 
						 | 
					@ -36,7 +36,6 @@ CPasswordDialog::CPasswordDialog(QWidget* parent, const char* name, bool modal,
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
setupUi(this);
 | 
					setupUi(this);
 | 
				
			||||||
createBanner(Banner,Icon_Key32x32,tr("Database Key"));
 | 
					createBanner(Banner,Icon_Key32x32,tr("Database Key"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
QDir media(config.MountDir);
 | 
					QDir media(config.MountDir);
 | 
				
			||||||
if(media.exists()){
 | 
					if(media.exists()){
 | 
				
			||||||
	QStringList Paths;
 | 
						QStringList Paths;
 | 
				
			||||||
| 
						 | 
					@ -68,6 +67,7 @@ connect( Edit_Password, SIGNAL( textChanged(const QString&) ), this, SLOT( OnPas
 | 
				
			||||||
connect( CheckBox_Both, SIGNAL( stateChanged(int) ), this, SLOT( OnCheckBox_BothChanged(int) ) );
 | 
					connect( CheckBox_Both, SIGNAL( stateChanged(int) ), this, SLOT( OnCheckBox_BothChanged(int) ) );
 | 
				
			||||||
connect( ButtonChangeEchoMode, SIGNAL( clicked() ), this, SLOT( ChangeEchoMode() ) );
 | 
					connect( ButtonChangeEchoMode, SIGNAL( clicked() ), this, SLOT( ChangeEchoMode() ) );
 | 
				
			||||||
connect( Edit_Password, SIGNAL( returnPressed() ), this, SLOT( OnOK() ) );
 | 
					connect( Edit_Password, SIGNAL( returnPressed() ), this, SLOT( OnOK() ) );
 | 
				
			||||||
 | 
					connect( Edit_PasswordRep, SIGNAL( returnPressed() ), this, SLOT( OnOK() ) );
 | 
				
			||||||
connect( ButtonExit, SIGNAL( clicked()),this,SLOT(OnButtonExit()));
 | 
					connect( ButtonExit, SIGNAL( clicked()),this,SLOT(OnButtonExit()));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ButtonExit->setVisible(ShowExitButton);
 | 
					ButtonExit->setVisible(ShowExitButton);
 | 
				
			||||||
| 
						 | 
					@ -170,7 +170,7 @@ if(KeyType==BOTH || KeyType==KEYFILE){
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if(!fileinfo.isReadable()){
 | 
						if(!fileinfo.isReadable()){
 | 
				
			||||||
		QMessageBox::warning(this,tr("Error"),tr("The selected key file or directory is not readable\n.Please check your permissions."),tr("OK"),"","",0,0);
 | 
							QMessageBox::warning(this,tr("Error"),tr("The selected key file or directory is not readable.\nPlease check your permissions."),tr("OK"),"","",0,0);
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if(fileinfo.isDir()){
 | 
						if(fileinfo.isDir()){
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,6 +29,9 @@ CSimplePasswordDialog::CSimplePasswordDialog(QWidget* parent, const char* name,
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
setupUi(this);
 | 
					setupUi(this);
 | 
				
			||||||
if(!config.ShowPasswords)Button_HidePassword->toggle();
 | 
					if(!config.ShowPasswords)Button_HidePassword->toggle();
 | 
				
			||||||
 | 
					connect(ButtonOK,SIGNAL(clicked()),this,SLOT(OnOK()));
 | 
				
			||||||
 | 
					connect(ButtonCancel,SIGNAL(clicked()),this,SLOT(OnCancel()));
 | 
				
			||||||
 | 
					connect(Button_HidePassword,SIGNAL(toggled(bool)),this,SLOT(OnHidePasswordToggled(bool)));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CSimplePasswordDialog::~CSimplePasswordDialog()
 | 
					CSimplePasswordDialog::~CSimplePasswordDialog()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,7 +52,7 @@ for(int g=0;g<db->Groups.size();g++){
 | 
				
			||||||
									.arg(db->Entries[e].UserName)
 | 
														.arg(db->Entries[e].UserName)
 | 
				
			||||||
									.arg(db->Entries[e].URL)
 | 
														.arg(db->Entries[e].URL)
 | 
				
			||||||
									.arg(db->Entries[e].Password.string())
 | 
														.arg(db->Entries[e].Password.string())
 | 
				
			||||||
									.arg(db->Entries[e].Additional)
 | 
														.arg(db->Entries[e].Additional.replace('\n',"\n            "))
 | 
				
			||||||
									.utf8());
 | 
														.utf8());
 | 
				
			||||||
			db->Entries[e].Password.lock();
 | 
								db->Entries[e].Password.lock();
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -64,56 +64,61 @@
 | 
				
			||||||
    <attribute name="title" >
 | 
					    <attribute name="title" >
 | 
				
			||||||
     <string>About</string>
 | 
					     <string>About</string>
 | 
				
			||||||
    </attribute>
 | 
					    </attribute>
 | 
				
			||||||
    <widget class="QLabel" name="Label3" >
 | 
					    <widget class="QLabel" name="label" >
 | 
				
			||||||
     <property name="geometry" >
 | 
					     <property name="geometry" >
 | 
				
			||||||
      <rect>
 | 
					      <rect>
 | 
				
			||||||
       <x>20</x>
 | 
					       <x>20</x>
 | 
				
			||||||
       <y>40</y>
 | 
					       <y>20</y>
 | 
				
			||||||
       <width>81</width>
 | 
					       <width>351</width>
 | 
				
			||||||
       <height>20</height>
 | 
					       <height>17</height>
 | 
				
			||||||
      </rect>
 | 
					      </rect>
 | 
				
			||||||
     </property>
 | 
					     </property>
 | 
				
			||||||
     <property name="text" >
 | 
					     <property name="text" >
 | 
				
			||||||
      <string>Homepage:</string>
 | 
					      <string><html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">KeePassX</span> - Cross Platform Password Manager</p></body></html></string>
 | 
				
			||||||
     </property>
 | 
					     </property>
 | 
				
			||||||
    </widget>
 | 
					    </widget>
 | 
				
			||||||
    <widget class="QLabel" name="Label0" >
 | 
					    <widget class="QLabel" name="label_4" >
 | 
				
			||||||
     <property name="geometry" >
 | 
					     <property name="geometry" >
 | 
				
			||||||
      <rect>
 | 
					      <rect>
 | 
				
			||||||
       <x>20</x>
 | 
					       <x>30</x>
 | 
				
			||||||
       <y>10</y>
 | 
					       <y>110</y>
 | 
				
			||||||
       <width>281</width>
 | 
					       <width>341</width>
 | 
				
			||||||
       <height>20</height>
 | 
					       <height>51</height>
 | 
				
			||||||
      </rect>
 | 
					      </rect>
 | 
				
			||||||
     </property>
 | 
					     </property>
 | 
				
			||||||
     <property name="text" >
 | 
					     <property name="text" >
 | 
				
			||||||
      <string>KeePassX - Cross Platform Password Manager</string>
 | 
					      <string>Copyright (C) 2005 - 2006 Tarek Saidi 
 | 
				
			||||||
 | 
					KeePassX is distributed under the terms of the 
 | 
				
			||||||
 | 
					General Public License (GPL) version 2.</string>
 | 
				
			||||||
     </property>
 | 
					     </property>
 | 
				
			||||||
    </widget>
 | 
					    </widget>
 | 
				
			||||||
    <widget class="QLabel" name="Label4" >
 | 
					    <widget class="LinkLabel" name="label_3" >
 | 
				
			||||||
     <property name="geometry" >
 | 
					     <property name="geometry" >
 | 
				
			||||||
      <rect>
 | 
					      <rect>
 | 
				
			||||||
       <x>20</x>
 | 
					       <x>30</x>
 | 
				
			||||||
       <y>70</y>
 | 
					       <y>80</y>
 | 
				
			||||||
       <width>111</width>
 | 
					       <width>351</width>
 | 
				
			||||||
       <height>20</height>
 | 
					       <height>17</height>
 | 
				
			||||||
      </rect>
 | 
					      </rect>
 | 
				
			||||||
     </property>
 | 
					     </property>
 | 
				
			||||||
     <property name="text" >
 | 
					     <property name="text" >
 | 
				
			||||||
      <string>Email:</string>
 | 
					      <string>tarek.saidi@arcor.de</string>
 | 
				
			||||||
     </property>
 | 
					     </property>
 | 
				
			||||||
    </widget>
 | 
					    </widget>
 | 
				
			||||||
    <widget class="QLabel" name="Label1" >
 | 
					    <widget class="LinkLabel" name="label_2" >
 | 
				
			||||||
     <property name="geometry" >
 | 
					     <property name="geometry" >
 | 
				
			||||||
      <rect>
 | 
					      <rect>
 | 
				
			||||||
       <x>20</x>
 | 
					       <x>30</x>
 | 
				
			||||||
       <y>100</y>
 | 
					       <y>50</y>
 | 
				
			||||||
       <width>301</width>
 | 
					       <width>351</width>
 | 
				
			||||||
       <height>20</height>
 | 
					       <height>17</height>
 | 
				
			||||||
      </rect>
 | 
					      </rect>
 | 
				
			||||||
     </property>
 | 
					     </property>
 | 
				
			||||||
     <property name="text" >
 | 
					     <property name="text" >
 | 
				
			||||||
      <string>Copyright (C) 2005-2006 Tarek Saidi</string>
 | 
					      <string>http://keepass.berlios.de/</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					     <property name="buddy" >
 | 
				
			||||||
 | 
					      <cstring></cstring>
 | 
				
			||||||
     </property>
 | 
					     </property>
 | 
				
			||||||
    </widget>
 | 
					    </widget>
 | 
				
			||||||
   </widget>
 | 
					   </widget>
 | 
				
			||||||
| 
						 | 
					@ -175,6 +180,15 @@
 | 
				
			||||||
 </widget>
 | 
					 </widget>
 | 
				
			||||||
 <layoutdefault spacing="6" margin="11" />
 | 
					 <layoutdefault spacing="6" margin="11" />
 | 
				
			||||||
 <pixmapfunction></pixmapfunction>
 | 
					 <pixmapfunction></pixmapfunction>
 | 
				
			||||||
 | 
					 <customwidgets>
 | 
				
			||||||
 | 
					  <customwidget>
 | 
				
			||||||
 | 
					   <class>LinkLabel</class>
 | 
				
			||||||
 | 
					   <extends>QLabel</extends>
 | 
				
			||||||
 | 
					   <header>../../src/lib/UrlLabel.h</header>
 | 
				
			||||||
 | 
					   <container>0</container>
 | 
				
			||||||
 | 
					   <pixmap></pixmap>
 | 
				
			||||||
 | 
					  </customwidget>
 | 
				
			||||||
 | 
					 </customwidgets>
 | 
				
			||||||
 <resources/>
 | 
					 <resources/>
 | 
				
			||||||
 <connections/>
 | 
					 <connections/>
 | 
				
			||||||
</ui>
 | 
					</ui>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -477,6 +477,11 @@
 | 
				
			||||||
    <string>Plain Text (*.txt)</string>
 | 
					    <string>Plain Text (*.txt)</string>
 | 
				
			||||||
   </property>
 | 
					   </property>
 | 
				
			||||||
  </action>
 | 
					  </action>
 | 
				
			||||||
 | 
					  <action name="HideSearchResultsAction" >
 | 
				
			||||||
 | 
					   <property name="text" >
 | 
				
			||||||
 | 
					    <string>Hide</string>
 | 
				
			||||||
 | 
					   </property>
 | 
				
			||||||
 | 
					  </action>
 | 
				
			||||||
 </widget>
 | 
					 </widget>
 | 
				
			||||||
 <pixmapfunction></pixmapfunction>
 | 
					 <pixmapfunction></pixmapfunction>
 | 
				
			||||||
 <customwidgets>
 | 
					 <customwidgets>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -332,12 +332,14 @@
 | 
				
			||||||
 </customwidgets>
 | 
					 </customwidgets>
 | 
				
			||||||
 <tabstops>
 | 
					 <tabstops>
 | 
				
			||||||
  <tabstop>Edit_Password</tabstop>
 | 
					  <tabstop>Edit_Password</tabstop>
 | 
				
			||||||
 | 
					  <tabstop>Edit_PasswordRep</tabstop>
 | 
				
			||||||
  <tabstop>Combo_Dirs</tabstop>
 | 
					  <tabstop>Combo_Dirs</tabstop>
 | 
				
			||||||
  <tabstop>ButtonBrowse</tabstop>
 | 
					 | 
				
			||||||
  <tabstop>CheckBox_Both</tabstop>
 | 
					  <tabstop>CheckBox_Both</tabstop>
 | 
				
			||||||
 | 
					  <tabstop>ButtonChangeEchoMode</tabstop>
 | 
				
			||||||
 | 
					  <tabstop>ButtonBrowse</tabstop>
 | 
				
			||||||
  <tabstop>ButtonOK</tabstop>
 | 
					  <tabstop>ButtonOK</tabstop>
 | 
				
			||||||
  <tabstop>ButtonCancel</tabstop>
 | 
					  <tabstop>ButtonCancel</tabstop>
 | 
				
			||||||
  <tabstop>ButtonChangeEchoMode</tabstop>
 | 
					  <tabstop>ButtonExit</tabstop>
 | 
				
			||||||
 </tabstops>
 | 
					 </tabstops>
 | 
				
			||||||
 <resources/>
 | 
					 <resources/>
 | 
				
			||||||
 <connections/>
 | 
					 <connections/>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -234,6 +234,18 @@
 | 
				
			||||||
           <verstretch>0</verstretch>
 | 
					           <verstretch>0</verstretch>
 | 
				
			||||||
          </sizepolicy>
 | 
					          </sizepolicy>
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
 | 
					         <property name="minimumSize" >
 | 
				
			||||||
 | 
					          <size>
 | 
				
			||||||
 | 
					           <width>0</width>
 | 
				
			||||||
 | 
					           <height>23</height>
 | 
				
			||||||
 | 
					          </size>
 | 
				
			||||||
 | 
					         </property>
 | 
				
			||||||
 | 
					         <property name="maximumSize" >
 | 
				
			||||||
 | 
					          <size>
 | 
				
			||||||
 | 
					           <width>16777215</width>
 | 
				
			||||||
 | 
					           <height>23</height>
 | 
				
			||||||
 | 
					          </size>
 | 
				
			||||||
 | 
					         </property>
 | 
				
			||||||
         <property name="text" >
 | 
					         <property name="text" >
 | 
				
			||||||
          <string>Change...</string>
 | 
					          <string>Change...</string>
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
| 
						 | 
					@ -324,6 +336,18 @@
 | 
				
			||||||
           <verstretch>0</verstretch>
 | 
					           <verstretch>0</verstretch>
 | 
				
			||||||
          </sizepolicy>
 | 
					          </sizepolicy>
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
 | 
					         <property name="minimumSize" >
 | 
				
			||||||
 | 
					          <size>
 | 
				
			||||||
 | 
					           <width>0</width>
 | 
				
			||||||
 | 
					           <height>23</height>
 | 
				
			||||||
 | 
					          </size>
 | 
				
			||||||
 | 
					         </property>
 | 
				
			||||||
 | 
					         <property name="maximumSize" >
 | 
				
			||||||
 | 
					          <size>
 | 
				
			||||||
 | 
					           <width>16777215</width>
 | 
				
			||||||
 | 
					           <height>23</height>
 | 
				
			||||||
 | 
					          </size>
 | 
				
			||||||
 | 
					         </property>
 | 
				
			||||||
         <property name="text" >
 | 
					         <property name="text" >
 | 
				
			||||||
          <string>Change...</string>
 | 
					          <string>Change...</string>
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
| 
						 | 
					@ -372,6 +396,18 @@
 | 
				
			||||||
           <verstretch>0</verstretch>
 | 
					           <verstretch>0</verstretch>
 | 
				
			||||||
          </sizepolicy>
 | 
					          </sizepolicy>
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
 | 
					         <property name="minimumSize" >
 | 
				
			||||||
 | 
					          <size>
 | 
				
			||||||
 | 
					           <width>0</width>
 | 
				
			||||||
 | 
					           <height>23</height>
 | 
				
			||||||
 | 
					          </size>
 | 
				
			||||||
 | 
					         </property>
 | 
				
			||||||
 | 
					         <property name="maximumSize" >
 | 
				
			||||||
 | 
					          <size>
 | 
				
			||||||
 | 
					           <width>16777215</width>
 | 
				
			||||||
 | 
					           <height>23</height>
 | 
				
			||||||
 | 
					          </size>
 | 
				
			||||||
 | 
					         </property>
 | 
				
			||||||
         <property name="text" >
 | 
					         <property name="text" >
 | 
				
			||||||
          <string>C&hange...</string>
 | 
					          <string>C&hange...</string>
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
| 
						 | 
					@ -466,6 +502,18 @@
 | 
				
			||||||
      </property>
 | 
					      </property>
 | 
				
			||||||
      <item row="1" column="2" >
 | 
					      <item row="1" column="2" >
 | 
				
			||||||
       <widget class="QPushButton" name="Button_MountDirBrowse" >
 | 
					       <widget class="QPushButton" name="Button_MountDirBrowse" >
 | 
				
			||||||
 | 
					        <property name="minimumSize" >
 | 
				
			||||||
 | 
					         <size>
 | 
				
			||||||
 | 
					          <width>0</width>
 | 
				
			||||||
 | 
					          <height>23</height>
 | 
				
			||||||
 | 
					         </size>
 | 
				
			||||||
 | 
					        </property>
 | 
				
			||||||
 | 
					        <property name="maximumSize" >
 | 
				
			||||||
 | 
					         <size>
 | 
				
			||||||
 | 
					          <width>16777215</width>
 | 
				
			||||||
 | 
					          <height>23</height>
 | 
				
			||||||
 | 
					         </size>
 | 
				
			||||||
 | 
					        </property>
 | 
				
			||||||
        <property name="text" >
 | 
					        <property name="text" >
 | 
				
			||||||
         <string>Browse...</string>
 | 
					         <string>Browse...</string>
 | 
				
			||||||
        </property>
 | 
					        </property>
 | 
				
			||||||
| 
						 | 
					@ -487,7 +535,7 @@
 | 
				
			||||||
      <item row="1" column="0" >
 | 
					      <item row="1" column="0" >
 | 
				
			||||||
       <widget class="QLabel" name="label_2" >
 | 
					       <widget class="QLabel" name="label_2" >
 | 
				
			||||||
        <property name="text" >
 | 
					        <property name="text" >
 | 
				
			||||||
         <string>Media Directory:</string>
 | 
					         <string>Mounting Root:</string>
 | 
				
			||||||
        </property>
 | 
					        </property>
 | 
				
			||||||
       </widget>
 | 
					       </widget>
 | 
				
			||||||
      </item>
 | 
					      </item>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,13 @@
 | 
				
			||||||
<ui stdsetdef="1" version="4.0" >
 | 
					<ui version="4.0" >
 | 
				
			||||||
  <author/>
 | 
					 <author></author>
 | 
				
			||||||
  <comment/>
 | 
					 <comment></comment>
 | 
				
			||||||
  <exportmacro/>
 | 
					 <exportmacro></exportmacro>
 | 
				
			||||||
 <class>SimplePasswordDialog</class>
 | 
					 <class>SimplePasswordDialog</class>
 | 
				
			||||||
 <widget class="QDialog" name="SimplePasswordDialog" >
 | 
					 <widget class="QDialog" name="SimplePasswordDialog" >
 | 
				
			||||||
  <property name="geometry" >
 | 
					  <property name="geometry" >
 | 
				
			||||||
   <rect>
 | 
					   <rect>
 | 
				
			||||||
        <x>2</x>
 | 
					    <x>0</x>
 | 
				
			||||||
        <y>3</y>
 | 
					    <y>0</y>
 | 
				
			||||||
    <width>345</width>
 | 
					    <width>345</width>
 | 
				
			||||||
    <height>90</height>
 | 
					    <height>90</height>
 | 
				
			||||||
   </rect>
 | 
					   </rect>
 | 
				
			||||||
| 
						 | 
					@ -48,16 +48,6 @@
 | 
				
			||||||
    <string>Password:</string>
 | 
					    <string>Password:</string>
 | 
				
			||||||
   </property>
 | 
					   </property>
 | 
				
			||||||
  </widget>
 | 
					  </widget>
 | 
				
			||||||
    <widget class="QLineEdit" name="EditPassword" >
 | 
					 | 
				
			||||||
      <property name="geometry" >
 | 
					 | 
				
			||||||
        <rect>
 | 
					 | 
				
			||||||
          <x>80</x>
 | 
					 | 
				
			||||||
          <y>20</y>
 | 
					 | 
				
			||||||
          <width>240</width>
 | 
					 | 
				
			||||||
          <height>21</height>
 | 
					 | 
				
			||||||
        </rect>
 | 
					 | 
				
			||||||
      </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
  <widget class="QPushButton" name="ButtonOK" >
 | 
					  <widget class="QPushButton" name="ButtonOK" >
 | 
				
			||||||
   <property name="geometry" >
 | 
					   <property name="geometry" >
 | 
				
			||||||
    <rect>
 | 
					    <rect>
 | 
				
			||||||
| 
						 | 
					@ -90,13 +80,23 @@
 | 
				
			||||||
    <string>Alt+C</string>
 | 
					    <string>Alt+C</string>
 | 
				
			||||||
   </property>
 | 
					   </property>
 | 
				
			||||||
  </widget>
 | 
					  </widget>
 | 
				
			||||||
 | 
					  <widget class="QLineEdit" name="EditPassword" >
 | 
				
			||||||
 | 
					   <property name="geometry" >
 | 
				
			||||||
 | 
					    <rect>
 | 
				
			||||||
 | 
					     <x>80</x>
 | 
				
			||||||
 | 
					     <y>20</y>
 | 
				
			||||||
 | 
					     <width>240</width>
 | 
				
			||||||
 | 
					     <height>21</height>
 | 
				
			||||||
 | 
					    </rect>
 | 
				
			||||||
 | 
					   </property>
 | 
				
			||||||
 | 
					  </widget>
 | 
				
			||||||
  <widget class="QPushButton" name="Button_HidePassword" >
 | 
					  <widget class="QPushButton" name="Button_HidePassword" >
 | 
				
			||||||
   <property name="geometry" >
 | 
					   <property name="geometry" >
 | 
				
			||||||
    <rect>
 | 
					    <rect>
 | 
				
			||||||
     <x>320</x>
 | 
					     <x>320</x>
 | 
				
			||||||
     <y>20</y>
 | 
					     <y>20</y>
 | 
				
			||||||
     <width>20</width>
 | 
					     <width>20</width>
 | 
				
			||||||
          <height>20</height>
 | 
					     <height>21</height>
 | 
				
			||||||
    </rect>
 | 
					    </rect>
 | 
				
			||||||
   </property>
 | 
					   </property>
 | 
				
			||||||
   <property name="text" >
 | 
					   <property name="text" >
 | 
				
			||||||
| 
						 | 
					@ -112,4 +112,6 @@
 | 
				
			||||||
 </widget>
 | 
					 </widget>
 | 
				
			||||||
 <layoutdefault spacing="6" margin="11" />
 | 
					 <layoutdefault spacing="6" margin="11" />
 | 
				
			||||||
 <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
 | 
					 <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
 | 
				
			||||||
 | 
					 <resources/>
 | 
				
			||||||
 | 
					 <connections/>
 | 
				
			||||||
</ui>
 | 
					</ui>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -36,7 +36,7 @@ int len=0;
 | 
				
			||||||
if(!file.exists()){err+=QObject::tr("File not found."); return false;}
 | 
					if(!file.exists()){err+=QObject::tr("File not found."); return false;}
 | 
				
			||||||
if(!file.open(QIODevice::ReadOnly)){err+=QObject::tr("Could not open file."); return false;}
 | 
					if(!file.open(QIODevice::ReadOnly)){err+=QObject::tr("Could not open file."); return false;}
 | 
				
			||||||
if(len=file.size()) buffer=new char[len];
 | 
					if(len=file.size()) buffer=new char[len];
 | 
				
			||||||
else {err+=QObject::tr("Datei ist leer"); return false;}
 | 
					else {err+=QObject::tr("File is empty."); return false;}
 | 
				
			||||||
file.readBlock(buffer,len);
 | 
					file.readBlock(buffer,len);
 | 
				
			||||||
file.close();
 | 
					file.close();
 | 
				
			||||||
if(QString::fromAscii(buffer,17)!="PWM_PASSWORD_FILE")
 | 
					if(QString::fromAscii(buffer,17)!="PWM_PASSWORD_FILE")
 | 
				
			||||||
| 
						 | 
					@ -107,6 +107,7 @@ delete[] content_hash;
 | 
				
			||||||
if(!parseXmlContent((char*)xml)){
 | 
					if(!parseXmlContent((char*)xml)){
 | 
				
			||||||
	delete [] xml;
 | 
						delete [] xml;
 | 
				
			||||||
	err+=QObject::tr("Invalid XML data (see stdout for details)."); return false;}
 | 
						err+=QObject::tr("Invalid XML data (see stdout for details)."); return false;}
 | 
				
			||||||
 | 
					database->CalcMasterKeyByPassword(password);
 | 
				
			||||||
return true;
 | 
					return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -45,6 +45,7 @@ LastHoverItem=NULL;
 | 
				
			||||||
setHeaderLabels(QStringList()<<tr("Groups"));
 | 
					setHeaderLabels(QStringList()<<tr("Groups"));
 | 
				
			||||||
ShowSearchGroup=false;
 | 
					ShowSearchGroup=false;
 | 
				
			||||||
ContextMenu=new QMenu(this);
 | 
					ContextMenu=new QMenu(this);
 | 
				
			||||||
 | 
					ContextMenuSearchGroup=new QMenu(this);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void KeepassGroupView::selectSearchGroup(){
 | 
					void KeepassGroupView::selectSearchGroup(){
 | 
				
			||||||
| 
						 | 
					@ -282,7 +283,10 @@ if(!(GroupViewItem*)itemAt(e->pos()) && selectedItems().size()){
 | 
				
			||||||
	setItemSelected(selectedItems()[0],false);
 | 
						setItemSelected(selectedItems()[0],false);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
e->accept();
 | 
					e->accept();
 | 
				
			||||||
ContextMenu->popup(e->globalPos());
 | 
					if(isSearchResultGroup((GroupViewItem*)itemAt(e->pos())))
 | 
				
			||||||
 | 
						ContextMenuSearchGroup->popup(e->globalPos());
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
						ContextMenu->popup(e->globalPos());
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GroupViewItem::GroupViewItem(QTreeWidget *parent):QTreeWidgetItem(parent){
 | 
					GroupViewItem::GroupViewItem(QTreeWidget *parent):QTreeWidgetItem(parent){
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,6 +39,7 @@ public:
 | 
				
			||||||
 bool ShowSearchGroup;  //needs a "updateItems()" after a change! 
 | 
					 bool ShowSearchGroup;  //needs a "updateItems()" after a change! 
 | 
				
			||||||
 vector<GroupViewItem*>Items;
 | 
					 vector<GroupViewItem*>Items;
 | 
				
			||||||
 QMenu *ContextMenu;
 | 
					 QMenu *ContextMenu;
 | 
				
			||||||
 | 
					 QMenu *ContextMenuSearchGroup;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
signals:
 | 
					signals:
 | 
				
			||||||
 void fileModified();
 | 
					 void fileModified();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,11 +20,11 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "UrlLabel.h"
 | 
					#include "UrlLabel.h"
 | 
				
			||||||
 | 
					#include "main.h"
 | 
				
			||||||
#include <qfont.h>
 | 
					#include <qfont.h>
 | 
				
			||||||
#include <qcolor.h>
 | 
					#include <qcolor.h>
 | 
				
			||||||
#include <qcursor.h>
 | 
					#include <qcursor.h>
 | 
				
			||||||
#include <qfontmetrics.h>
 | 
					#include <qfontmetrics.h>
 | 
				
			||||||
//Added by qt3to4:
 | 
					 | 
				
			||||||
#include <QMouseEvent>
 | 
					#include <QMouseEvent>
 | 
				
			||||||
#include <QLabel>
 | 
					#include <QLabel>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -41,15 +41,22 @@ LinkLabel::~LinkLabel(){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					QString LinkLabel::url(){
 | 
				
			||||||
 | 
					if(URL!=QString())return URL;
 | 
				
			||||||
 | 
					if(text().contains("@"))
 | 
				
			||||||
 | 
						return QString("mailto:")+text();
 | 
				
			||||||
 | 
					else return text();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void LinkLabel::mouseReleaseEvent(QMouseEvent* event){
 | 
					void LinkLabel::mouseReleaseEvent(QMouseEvent* event){
 | 
				
			||||||
if(event->button()==Qt::LeftButton)
 | 
					if(event->button()==Qt::LeftButton)
 | 
				
			||||||
clicked();
 | 
					emit clicked();
 | 
				
			||||||
 | 
					openBrowser(url());
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void LinkLabel::setPos(int x,int y){
 | 
					void LinkLabel::setPos(int x,int y){
 | 
				
			||||||
QFontMetrics fm(font());
 | 
					QFontMetrics fm(font());
 | 
				
			||||||
setGeometry(x,y,fm.width(text()),fm.height());
 | 
					setGeometry(x,y,fm.width(text()),fm.height());
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void LinkLabel::setText(const QString& text){
 | 
					void LinkLabel::setText(const QString& text){
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,17 +30,20 @@ public:
 | 
				
			||||||
LinkLabel(QWidget *parent, const char* name = 0,const QString& text=QString::null, int x=0, int y=0,Qt::WFlags f=0);
 | 
					LinkLabel(QWidget *parent, const char* name = 0,const QString& text=QString::null, int x=0, int y=0,Qt::WFlags f=0);
 | 
				
			||||||
~LinkLabel();
 | 
					~LinkLabel();
 | 
				
			||||||
void setPos(int x,int y);
 | 
					void setPos(int x,int y);
 | 
				
			||||||
 | 
					QString url();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public slots:
 | 
					public slots:
 | 
				
			||||||
virtual void setText(const QString&);
 | 
					virtual void setText(const QString&);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
signals:
 | 
					signals:
 | 
				
			||||||
 void clicked();
 | 
					 void clicked();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
virtual void mouseReleaseEvent(QMouseEvent* event);
 | 
					virtual void mouseReleaseEvent(QMouseEvent* event);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private:
 | 
				
			||||||
 | 
					QString URL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					@ -145,6 +145,7 @@ void KeepassMainWindow::setupConnections(){
 | 
				
			||||||
   connect(GroupView,SIGNAL(itemSelectionChanged()), this, SLOT(OnGroupSelectionChanged()));
 | 
					   connect(GroupView,SIGNAL(itemSelectionChanged()), this, SLOT(OnGroupSelectionChanged()));
 | 
				
			||||||
   connect(GroupView,SIGNAL(fileModified()),this,SLOT(OnFileModified()));
 | 
					   connect(GroupView,SIGNAL(fileModified()),this,SLOT(OnFileModified()));
 | 
				
			||||||
   connect(QuickSearchEdit,SIGNAL(returnPressed()), this, SLOT(OnQuickSearch()));
 | 
					   connect(QuickSearchEdit,SIGNAL(returnPressed()), this, SLOT(OnQuickSearch()));
 | 
				
			||||||
 | 
					   connect(HideSearchResultsAction,SIGNAL(triggered()),this, SLOT(OnHideSearchGroup()));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -201,6 +202,7 @@ void KeepassMainWindow::setupMenus(){
 | 
				
			||||||
  GroupView->ContextMenu->addAction(EditNewEntryAction);
 | 
					  GroupView->ContextMenu->addAction(EditNewEntryAction);
 | 
				
			||||||
  GroupView->ContextMenu->addSeparator();
 | 
					  GroupView->ContextMenu->addSeparator();
 | 
				
			||||||
  GroupView->ContextMenu->addAction(EditGroupSearchAction);
 | 
					  GroupView->ContextMenu->addAction(EditGroupSearchAction);
 | 
				
			||||||
 | 
					  GroupView->ContextMenuSearchGroup->addAction(HideSearchResultsAction);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  EntryView->ContextMenu->addAction(EditPasswordToClipboardAction);
 | 
					  EntryView->ContextMenu->addAction(EditPasswordToClipboardAction);
 | 
				
			||||||
  EntryView->ContextMenu->addAction(EditUsernameToClipboardAction);
 | 
					  EntryView->ContextMenu->addAction(EditUsernameToClipboardAction);
 | 
				
			||||||
| 
						 | 
					@ -367,6 +369,9 @@ FileSaveAsAction->setEnabled(IsOpen);
 | 
				
			||||||
FileCloseAction->setEnabled(IsOpen);
 | 
					FileCloseAction->setEnabled(IsOpen);
 | 
				
			||||||
FileSettingsAction->setEnabled(IsOpen);
 | 
					FileSettingsAction->setEnabled(IsOpen);
 | 
				
			||||||
FileChangeKeyAction->setEnabled(IsOpen);
 | 
					FileChangeKeyAction->setEnabled(IsOpen);
 | 
				
			||||||
 | 
					FileExpPlainTextAction->setEnabled(IsOpen);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EditSearchAction->setEnabled(IsOpen);
 | 
					EditSearchAction->setEnabled(IsOpen);
 | 
				
			||||||
GroupView->setEnabled(IsOpen);
 | 
					GroupView->setEnabled(IsOpen);
 | 
				
			||||||
EntryView->setEnabled(IsOpen);
 | 
					EntryView->setEnabled(IsOpen);
 | 
				
			||||||
| 
						 | 
					@ -615,6 +620,7 @@ QString filename=QFileDialog::getOpenFileName(this,tr("Open Database..."),QDir::
 | 
				
			||||||
if(filename!=QString::null){
 | 
					if(filename!=QString::null){
 | 
				
			||||||
	Q_ASSERT(!FileOpen);
 | 
						Q_ASSERT(!FileOpen);
 | 
				
			||||||
	db = new PwDatabase();
 | 
						db = new PwDatabase();
 | 
				
			||||||
 | 
						db->newDatabase();
 | 
				
			||||||
	CSimplePasswordDialog dlg(this,"SimplePasswordDlg",true);
 | 
						CSimplePasswordDialog dlg(this,"SimplePasswordDlg",true);
 | 
				
			||||||
	if(!dlg.exec()){
 | 
						if(!dlg.exec()){
 | 
				
			||||||
		delete db;
 | 
							delete db;
 | 
				
			||||||
| 
						 | 
					@ -654,6 +660,7 @@ QString filename=QFileDialog::getOpenFileName(this,tr("Open Database..."),QDir::
 | 
				
			||||||
if(filename!=QString::null){
 | 
					if(filename!=QString::null){
 | 
				
			||||||
	Q_ASSERT(!FileOpen);
 | 
						Q_ASSERT(!FileOpen);
 | 
				
			||||||
	db = new PwDatabase();
 | 
						db = new PwDatabase();
 | 
				
			||||||
 | 
						db->newDatabase();
 | 
				
			||||||
	GroupView->db=db;
 | 
						GroupView->db=db;
 | 
				
			||||||
	EntryView->db=db;
 | 
						EntryView->db=db;
 | 
				
			||||||
	QString err;
 | 
						QString err;
 | 
				
			||||||
| 
						 | 
					@ -810,7 +817,10 @@ for(int i=0; i<entries.size();i++){
 | 
				
			||||||
	db->deleteEntry(((EntryViewItem*)entries[i])->pEntry);
 | 
						db->deleteEntry(((EntryViewItem*)entries[i])->pEntry);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
setStateFileModified(true);
 | 
					setStateFileModified(true);
 | 
				
			||||||
EntryView->updateItems(currentGroup()->ID);
 | 
					if(GroupView->isSearchResultGroup((GroupViewItem*)(GroupView->selectedItems()[0])))
 | 
				
			||||||
 | 
						EntryView->showSearchResults(SearchResults);
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
						EntryView->updateItems(currentGroup()->ID);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void KeepassMainWindow::removeFromSearchResults(int id){
 | 
					void KeepassMainWindow::removeFromSearchResults(int id){
 | 
				
			||||||
| 
						 | 
					@ -885,7 +895,7 @@ EntryView->showSearchResults(SearchResults);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CGroup* KeepassMainWindow::currentGroup(){
 | 
					CGroup* KeepassMainWindow::currentGroup(){
 | 
				
			||||||
Q_ASSERT(GroupView->selectedItems().size());
 | 
					Q_ASSERT(GroupView->selectedItems().size());
 | 
				
			||||||
return static_cast<GroupViewItem*>(GroupView->selectedItems()[0])->pGroup;
 | 
					return ((GroupViewItem*)(GroupView->selectedItems()[0]))->pGroup;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CEntry* KeepassMainWindow::currentEntry(){
 | 
					CEntry* KeepassMainWindow::currentEntry(){
 | 
				
			||||||
| 
						 | 
					@ -935,6 +945,13 @@ else
 | 
				
			||||||
 e->accept();
 | 
					 e->accept();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void KeepassMainWindow::OnHideSearchGroup(){
 | 
				
			||||||
 | 
					GroupView->ShowSearchGroup=false;
 | 
				
			||||||
 | 
					GroupView->updateItems();
 | 
				
			||||||
 | 
					EntryView->updateItems(0);
 | 
				
			||||||
 | 
					SearchResults.clear();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void KeepassMainWindow::OnExtrasSettings(){
 | 
					void KeepassMainWindow::OnExtrasSettings(){
 | 
				
			||||||
CSettingsDlg dlg(this,"SettingsDlg");
 | 
					CSettingsDlg dlg(this,"SettingsDlg");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -92,6 +92,7 @@ private slots:
 | 
				
			||||||
   void OnHelpAbout();
 | 
					   void OnHelpAbout();
 | 
				
			||||||
   void OnItemExpanded(QTreeWidgetItem*);
 | 
					   void OnItemExpanded(QTreeWidgetItem*);
 | 
				
			||||||
   void OnItemCollaped(QTreeWidgetItem*);
 | 
					   void OnItemCollaped(QTreeWidgetItem*);
 | 
				
			||||||
 | 
					   void OnHideSearchGroup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
 enum SelectionState{NONE,SINGLE,MULTIPLE,SEARCHGROUP};
 | 
					 enum SelectionState{NONE,SINGLE,MULTIPLE,SEARCHGROUP};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
					@ -12,22 +12,6 @@
 | 
				
			||||||
        <source>About</source>
 | 
					        <source>About</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Homepage:</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>KeePassX - Cross Platform Password Manager</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Email:</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Copyright (C) 2005-2006 Tarek Saidi</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Thanks To</source>
 | 
					        <source>Thanks To</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
| 
						 | 
					@ -40,6 +24,24 @@
 | 
				
			||||||
        <source>Translation</source>
 | 
					        <source>Translation</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source><html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">KeePassX</span> - Cross Platform Password Manager</p></body></html></source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Copyright (C) 2005 - 2006 Tarek Saidi 
 | 
				
			||||||
 | 
					KeePassX is distributed under the terms of the 
 | 
				
			||||||
 | 
					General Public License (GPL) version 2.</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>tarek.saidi@arcor.de</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>http://keepass.berlios.de/</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
<context>
 | 
					<context>
 | 
				
			||||||
    <name>CAboutDialog</name>
 | 
					    <name>CAboutDialog</name>
 | 
				
			||||||
| 
						 | 
					@ -99,9 +101,14 @@
 | 
				
			||||||
http://keepass.berlios.de/translation-howto.html</source>
 | 
					http://keepass.berlios.de/translation-howto.html</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					    <message>
 | 
				
			||||||
<context>
 | 
					        <source>Matthias Miller</source>
 | 
				
			||||||
    <name>CChangeKeyDlg</name>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>http://www.outofhanwell.com/<br>Mac OS X Support</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
<context>
 | 
					<context>
 | 
				
			||||||
    <name>CDbSettingsDlg</name>
 | 
					    <name>CDbSettingsDlg</name>
 | 
				
			||||||
| 
						 | 
					@ -277,11 +284,6 @@ Are you sure?</source>
 | 
				
			||||||
        <source>The selected key file or directory does not exist.</source>
 | 
					        <source>The selected key file or directory does not exist.</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>The selected key file or directory is not readable
 | 
					 | 
				
			||||||
.Please check your permissions.</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>The given directory does not contain any key files.</source>
 | 
					        <source>The given directory does not contain any key files.</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
| 
						 | 
					@ -340,6 +342,11 @@ Do you want to replace it?</source>
 | 
				
			||||||
Do you want to replace it?</source>
 | 
					Do you want to replace it?</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>The selected key file or directory is not readable.
 | 
				
			||||||
 | 
					Please check your permissions.</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
<context>
 | 
					<context>
 | 
				
			||||||
    <name>CSearchDlg</name>
 | 
					    <name>CSearchDlg</name>
 | 
				
			||||||
| 
						 | 
					@ -371,9 +378,6 @@ Do you want to replace it?</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
<context>
 | 
					 | 
				
			||||||
    <name>ChangeKeyDialog</name>
 | 
					 | 
				
			||||||
</context>
 | 
					 | 
				
			||||||
<context>
 | 
					<context>
 | 
				
			||||||
    <name>EditEntryDialog</name>
 | 
					    <name>EditEntryDialog</name>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
| 
						 | 
					@ -727,10 +731,6 @@ Do you want to replace it?</source>
 | 
				
			||||||
        <source>Keepass - %1</source>
 | 
					        <source>Keepass - %1</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Unknown error in PwDatabase::loadDatabase()</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Error</source>
 | 
					        <source>Error</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
| 
						 | 
					@ -839,6 +839,10 @@ to save the changes?</source>
 | 
				
			||||||
        <source>Unknown error in Import_KWalletXml::importFile()</source>
 | 
					        <source>Unknown error in Import_KWalletXml::importFile()</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Unknown error in PwDatabase::openDatabase()</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
<context>
 | 
					<context>
 | 
				
			||||||
    <name>MainWindow</name>
 | 
					    <name>MainWindow</name>
 | 
				
			||||||
| 
						 | 
					@ -1046,6 +1050,10 @@ to save the changes?</source>
 | 
				
			||||||
        <source>Plain Text (*.txt)</source>
 | 
					        <source>Plain Text (*.txt)</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Hide</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
<context>
 | 
					<context>
 | 
				
			||||||
    <name>PasswordDlg</name>
 | 
					    <name>PasswordDlg</name>
 | 
				
			||||||
| 
						 | 
					@ -1116,23 +1124,10 @@ to save the changes?</source>
 | 
				
			||||||
        <source>Wrong Signature</source>
 | 
					        <source>Wrong Signature</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Unsupported File Version</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Unknown Encryption Algorithm</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>AES-Init Failed</source>
 | 
					        <source>AES-Init Failed</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Decryption failed.
 | 
					 | 
				
			||||||
The key is wrong or the file is damaged</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Unexpected error: Offset is out of range. [G1]</source>
 | 
					        <source>Unexpected error: Offset is out of range. [G1]</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
| 
						 | 
					@ -1166,6 +1161,27 @@ The key is wrong or the file is damaged.</source>
 | 
				
			||||||
        <source>Key file could not be written.</source>
 | 
					        <source>Key file could not be written.</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Could not open file.</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Could not open file for writing.</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Unsupported File Version.</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Unknown Encryption Algorithm.</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Decryption failed.
 | 
				
			||||||
 | 
					The key is wrong or the file is damaged.</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
<context>
 | 
					<context>
 | 
				
			||||||
    <name>QObject</name>
 | 
					    <name>QObject</name>
 | 
				
			||||||
| 
						 | 
					@ -1194,10 +1210,6 @@ Make sure you have write access to '~/.keepass'.</source>
 | 
				
			||||||
        <source>Could not open file.</source>
 | 
					        <source>Could not open file.</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Datei ist leer</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>File is no valid PwManager file.</source>
 | 
					        <source>File is no valid PwManager file.</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
| 
						 | 
					@ -1247,16 +1259,16 @@ Make sure you have write access to '~/.keepass'.</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Warnung:</source>
 | 
					        <source>Error</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message encoding="UTF-8">
 | 
					 | 
				
			||||||
        <source>ungültiger RGB-Farbwert.
 | 
					 | 
				
			||||||
</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Error</source>
 | 
					        <source>Warning:</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Invalid RGB color value.
 | 
				
			||||||
 | 
					</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
| 
						 | 
					@ -1458,11 +1470,11 @@ Make sure you have write access to '~/.keepass'.</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Media Directory:</source>
 | 
					        <source>Remember last key type and location</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Remember last key type and location</source>
 | 
					        <source>Mounting Root:</source>
 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue