added icon selection dialog,
prepared PwDatabase for custom icons git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@65 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
		
							parent
							
								
									3c7d617599
								
							
						
					
					
						commit
						1c513d8f3c
					
				| 
						 | 
				
			
			@ -0,0 +1,26 @@
 | 
			
		|||
---------------
 | 
			
		||||
    0.2.1
 | 
			
		||||
---------------
 | 
			
		||||
 | 
			
		||||
---------------
 | 
			
		||||
    0.2.0
 | 
			
		||||
---------------
 | 
			
		||||
-ported whole application from Qt3 to Qt4
 | 
			
		||||
(better performance, less memory usage, ready for KDE4)
 | 
			
		||||
-improved Mac OS X support
 | 
			
		||||
-added Drag&Drop support
 | 
			
		||||
-multiple seclection mode for entries
 | 
			
		||||
-improved loading performance for large databases
 | 
			
		||||
-faster in-memory encryption
 | 
			
		||||
-search field in toolbar now works
 | 
			
		||||
-mainwindow size, splitter position and column sizes are restored at start-up
 | 
			
		||||
-added option for alternating row colors
 | 
			
		||||
-improved key/password dialog
 | 
			
		||||
-removed language dialog - program now uses system's default language
 | 
			
		||||
-loading translation files for Qt (e.g. file dialogs)
 | 
			
		||||
-added text export function
 | 
			
		||||
-added option "Never" for expire dates.
 | 
			
		||||
-fixed problem with hex. key files
 | 
			
		||||
-fixed problem with damaged file attachments after various entry operations
 | 
			
		||||
-fixed segmentation fault when using new icons with higher index
 | 
			
		||||
-fixed error when saving empty databases
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,55 @@
 | 
			
		|||
Name: keepass
 | 
			
		||||
Summary: KeePassX Cross Platform Password Manager
 | 
			
		||||
Version: 0.2.0
 | 
			
		||||
Release: 1
 | 
			
		||||
License: GPL
 | 
			
		||||
Group: Security
 | 
			
		||||
Source: keepass-0.2.0.tar.gz
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
BuildRoot: /home/tarek/Desktop/KeePassX-RPM-Build
 | 
			
		||||
Packager: Tarek Saidi
 | 
			
		||||
Distribution: KeePassX
 | 
			
		||||
Prefix: /usr/local
 | 
			
		||||
Url: http://keepass.berlios.de
 | 
			
		||||
 | 
			
		||||
Vendor: Tarek Saidi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
%description
 | 
			
		||||
KeePassX is a free/open-source password manager or safe which helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key-disk. So you only have to remember one single master password or insert the key-disk to unlock the whole database. The databases are encrypted using the best and most secure encryption algorithms currently known (AES and Twofish).
 | 
			
		||||
 | 
			
		||||
%prep
 | 
			
		||||
rm -rf $RPM_BUILD_ROOT 
 | 
			
		||||
mkdir $RPM_BUILD_ROOT
 | 
			
		||||
 | 
			
		||||
%setup -q
 | 
			
		||||
 | 
			
		||||
%build
 | 
			
		||||
qmake PREFIX=$RPM_BUILD_ROOT%{prefix}
 | 
			
		||||
make
 | 
			
		||||
 | 
			
		||||
%install
 | 
			
		||||
make install
 | 
			
		||||
 | 
			
		||||
cd $RPM_BUILD_ROOT
 | 
			
		||||
 | 
			
		||||
find . -type d -fprint $RPM_BUILD_DIR/file.list.%{name}.dirs
 | 
			
		||||
find . -type f -fprint $RPM_BUILD_DIR/file.list.%{name}.files.tmp
 | 
			
		||||
sed '/\/man\//s/$/.gz/g' $RPM_BUILD_DIR/file.list.%{name}.files.tmp > $RPM_BUILD_DIR/file.list.%{name}.files
 | 
			
		||||
find . -type l -fprint $RPM_BUILD_DIR/file.list.%{name}.libs
 | 
			
		||||
sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' $RPM_BUILD_DIR/file.list.%{name}.dirs > $RPM_BUILD_DIR/file.list.%{name}
 | 
			
		||||
sed 's,^\.,\%attr(-\,root\,root) ,' $RPM_BUILD_DIR/file.list.%{name}.files >> $RPM_BUILD_DIR/file.list.%{name}
 | 
			
		||||
sed 's,^\.,\%attr(-\,root\,root) ,' $RPM_BUILD_DIR/file.list.%{name}.libs >> $RPM_BUILD_DIR/file.list.%{name}
 | 
			
		||||
 | 
			
		||||
%clean
 | 
			
		||||
rm -rf $RPM_BUILD_ROOT
 | 
			
		||||
rm -rf $RPM_BUILD_DIR/file.list.%{name}
 | 
			
		||||
rm -rf $RPM_BUILD_DIR/file.list.%{name}.libs
 | 
			
		||||
rm -rf $RPM_BUILD_DIR/file.list.%{name}.files
 | 
			
		||||
rm -rf $RPM_BUILD_DIR/file.list.%{name}.files.tmp
 | 
			
		||||
rm -rf $RPM_BUILD_DIR/file.list.%{name}.dirs
 | 
			
		||||
 | 
			
		||||
%files -f ../file.list.%{name}
 | 
			
		||||
 | 
			
		||||
%defattr(-,root,root,0755)
 | 
			
		||||
| 
						 | 
				
			
			@ -242,8 +242,21 @@ return true;
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
bool PwDatabase::parseMetaStream(const CEntry& entry){
 | 
			
		||||
//return true for known MetaStreams
 | 
			
		||||
return false;
 | 
			
		||||
if(entry.Additional=="KPX_CUSTOM_ICONS")
 | 
			
		||||
	return parseCustomIconsMetaStream(entry.BinaryData);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
return false; //unknown MetaStreams
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool PwDatabase::parseCustomIconsMetaStream(const QByteArray& dta){
 | 
			
		||||
Q_UINT32 NumIcons,NumEntries,offset;
 | 
			
		||||
memcpyFromLEnd32(&NumIcons,dta.data());
 | 
			
		||||
memcpyFromLEnd32(&NumEntries,dta.data()+4);
 | 
			
		||||
offset+=4;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void PwDatabase::transformKey(Q_UINT8* src,Q_UINT8* dst,Q_UINT8* KeySeed,int rounds){
 | 
			
		||||
| 
						 | 
				
			
			@ -1137,7 +1150,7 @@ void PwDatabase::setEntry(unsigned long index,CEntry& entry){
 | 
			
		|||
int PwDatabase::numEntries(){
 | 
			
		||||
	return Entries.size();}
 | 
			
		||||
 | 
			
		||||
void memcpyFromLEnd32(Q_UINT32* dst,char* src){
 | 
			
		||||
void memcpyFromLEnd32(Q_UINT32* dst,const char* src){
 | 
			
		||||
 | 
			
		||||
if(QSysInfo::ByteOrder==QSysInfo::BigEndian){
 | 
			
		||||
  memcpy(((char*)dst)+3,src+0,1);
 | 
			
		||||
| 
						 | 
				
			
			@ -1149,7 +1162,7 @@ else
 | 
			
		|||
  memcpy(dst,src,4);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void memcpyFromLEnd16(Q_UINT16* dst,char* src){
 | 
			
		||||
void memcpyFromLEnd16(Q_UINT16* dst,const char* src){
 | 
			
		||||
 | 
			
		||||
if(QSysInfo::ByteOrder==QSysInfo::BigEndian){
 | 
			
		||||
  memcpy(((char*)dst)+1,src+0,1);
 | 
			
		||||
| 
						 | 
				
			
			@ -1159,7 +1172,7 @@ else
 | 
			
		|||
  memcpy(dst,src,2);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void memcpyToLEnd32(char* dst,Q_UINT32* src){
 | 
			
		||||
void memcpyToLEnd32(char* dst,const Q_UINT32* src){
 | 
			
		||||
 | 
			
		||||
if(QSysInfo::ByteOrder==QSysInfo::BigEndian){
 | 
			
		||||
  memcpy(dst+0,((char*)src)+3,1);
 | 
			
		||||
| 
						 | 
				
			
			@ -1171,7 +1184,7 @@ else
 | 
			
		|||
  memcpy(dst,src,4);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void memcpyToLEnd16(char* dst,Q_UINT16* src){
 | 
			
		||||
void memcpyToLEnd16(char* dst,const Q_UINT16* src){
 | 
			
		||||
 | 
			
		||||
if(QSysInfo::ByteOrder==QSysInfo::BigEndian){
 | 
			
		||||
  memcpy(dst+0,((char*)src)+1,1);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -84,6 +84,7 @@ public:
 | 
			
		|||
private:
 | 
			
		||||
 bool IsMetaStream(CEntry& Entry);
 | 
			
		||||
 bool parseMetaStream(const CEntry& Entry);
 | 
			
		||||
 bool parseCustomIconsMetaStream(const QByteArray& data);
 | 
			
		||||
 void transformKey(Q_UINT8* src,Q_UINT8* dst,Q_UINT8* seed,int rounds);
 | 
			
		||||
 bool readHeader(char* raw);
 | 
			
		||||
 bool isGroupIdInUse(Q_UINT32 GroupID);
 | 
			
		||||
| 
						 | 
				
			
			@ -98,10 +99,10 @@ private:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
 extern const QDateTime Date_Never;
 | 
			
		||||
 void memcpyFromLEnd32(Q_UINT32* dst,char* src);
 | 
			
		||||
 void memcpyFromLEnd16(Q_UINT16* dst,char* src);
 | 
			
		||||
 void memcpyToLEnd32(char* src,Q_UINT32* dst);
 | 
			
		||||
 void memcpyToLEnd16(char* src,Q_UINT16* dst);
 | 
			
		||||
 void memcpyFromLEnd32(Q_UINT32* dst,const char* src);
 | 
			
		||||
 void memcpyFromLEnd16(Q_UINT16* dst,const char* src);
 | 
			
		||||
 void memcpyToLEnd32(char* src,const Q_UINT32* dst);
 | 
			
		||||
 void memcpyToLEnd16(char* src,const Q_UINT16* dst);
 | 
			
		||||
 QDateTime dateFromPackedStruct5(const unsigned char* pBytes);
 | 
			
		||||
 void dateToPackedStruct5(const QDateTime& datetime, unsigned char* dst);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,6 +49,7 @@ http://keepass.berlios.de/translation-howto.html"));
 | 
			
		|||
QString ThanksTemplate=QString("<div style='margin-left:0px;'><b>%1</b></div><div style='margin-left:10px;'>%2</div><br><br>");
 | 
			
		||||
 | 
			
		||||
Edit_Thanks->setText(ThanksTemplate.arg(tr("Matthias Miller")).arg(tr("http://www.outofhanwell.com/<br>Mac OS X Support")));
 | 
			
		||||
Edit_Thanks->setText(Edit_Thanks->text()+ThanksTemplate.arg(tr("Eugen Gorschenin")).arg(tr("geugen@users.berlios.de<br>New Website")));
 | 
			
		||||
//Edit_Thanks->setText(Edit_Thanks->text()+ThanksTemplate.arg(tr("  ")).arg(tr("  ")));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,18 +22,20 @@
 | 
			
		|||
 | 
			
		||||
#include <qcombobox.h>
 | 
			
		||||
#include <qlineedit.h>
 | 
			
		||||
//Added by qt3to4:
 | 
			
		||||
#include <QShowEvent>
 | 
			
		||||
#include "EditGroupDlg.h"
 | 
			
		||||
#include "SelectIconDlg.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
CEditGroupDialog::CEditGroupDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
 | 
			
		||||
CEditGroupDialog::CEditGroupDialog(Database* database,QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
 | 
			
		||||
: QDialog(parent,name, modal,fl)
 | 
			
		||||
{
 | 
			
		||||
setupUi(this);
 | 
			
		||||
db=database;
 | 
			
		||||
IconID=0;
 | 
			
		||||
connect( ButtonOK, SIGNAL( clicked() ), this, SLOT( OnOK() ) );
 | 
			
		||||
connect( ButtonCancel, SIGNAL( clicked() ), this, SLOT( OnCancel() ) );
 | 
			
		||||
connect( Button_Icon, SIGNAL( clicked() ), this, SLOT( OnIconDlg() ));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
CEditGroupDialog::~CEditGroupDialog()
 | 
			
		||||
| 
						 | 
				
			
			@ -62,10 +64,7 @@ done(0);
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*$SPECIALIZATION$*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//#include "editgroupdlg.moc"
 | 
			
		||||
 | 
			
		||||
void CEditGroupDialog::OnIconDlg(){
 | 
			
		||||
CSelectIconDlg dlg(db,this);
 | 
			
		||||
dlg.exec();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,33 +23,28 @@
 | 
			
		|||
 | 
			
		||||
#include "ui_EditGroupDlg.h"
 | 
			
		||||
#include <qstring.h>
 | 
			
		||||
//Added by qt3to4:
 | 
			
		||||
#include <QShowEvent>
 | 
			
		||||
#include "Database.h"
 | 
			
		||||
 | 
			
		||||
class CEditGroupDialog : public QDialog, public Ui_EditGroupDialog
 | 
			
		||||
{
 | 
			
		||||
  Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
  CEditGroupDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
 | 
			
		||||
  CEditGroupDialog(Database*,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
 | 
			
		||||
  ~CEditGroupDialog();
 | 
			
		||||
virtual void showEvent(QShowEvent *event);
 | 
			
		||||
  /*$PUBLIC_FUNCTIONS$*/
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
  /*$PROTECTED_FUNCTIONS$*/
 | 
			
		||||
 | 
			
		||||
protected slots:
 | 
			
		||||
  /*$PROTECTED_SLOTS$*/
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
 int IconID;
 | 
			
		||||
 QString GroupName;
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
 Database* db;
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
public slots:
 | 
			
		||||
    virtual void OnOK();
 | 
			
		||||
    virtual void OnCancel();
 | 
			
		||||
    virtual void OnIconDlg();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,7 @@ CGenPwDialog::CGenPwDialog(QWidget* parent, const char* name, bool modal, Qt::WF
 | 
			
		|||
: QDialog(parent,name, modal,fl)
 | 
			
		||||
{
 | 
			
		||||
setupUi(this);
 | 
			
		||||
createBanner(Banner,Icon_Key32x32,QString::fromUtf8("Passwort generieren"));
 | 
			
		||||
createBanner(Banner,Icon_Key32x32,QString::fromUtf8("Password Generator"));
 | 
			
		||||
Radio_1->setChecked(true);
 | 
			
		||||
Edit_chars->setDisabled(true);
 | 
			
		||||
connect(ButtonGenerate,SIGNAL(clicked()),this,SLOT(OnGeneratePw()));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,30 @@
 | 
			
		|||
/***************************************************************************
 | 
			
		||||
 *   Copyright (C) 2005-2006 by Tarek Saidi                                *
 | 
			
		||||
 *   tarek.saidi@arcor.de                                                  *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 *   This program is free software; you can redistribute it and/or modify  *
 | 
			
		||||
 *   it under the terms of the GNU General Public License as published by  *
 | 
			
		||||
 *   the Free Software Foundation; either version 2 of the License, or     *
 | 
			
		||||
 *   (at your option) any later version.                                   *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 *   This program is distributed in the hope that it will be useful,       *
 | 
			
		||||
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 | 
			
		||||
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 | 
			
		||||
 *   GNU General Public License for more details.                          *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 *   You should have received a copy of the GNU General Public License     *
 | 
			
		||||
 *   along with this program; if not, write to the                         *
 | 
			
		||||
 *   Free Software Foundation, Inc.,                                       *
 | 
			
		||||
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 | 
			
		||||
 ***************************************************************************/
 | 
			
		||||
 
 | 
			
		||||
#include "SelectIconDlg.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
CSelectIconDlg::CSelectIconDlg(Database* database,QWidget* parent,const char* name, bool modal, Qt::WFlags fl):QDialog(parent,name,modal,fl){
 | 
			
		||||
setupUi(this);
 | 
			
		||||
db=database;
 | 
			
		||||
for(int i=0; i<NUM_CLIENT_ICONS; i++){
 | 
			
		||||
	List->addItem(new QListWidgetItem(QIcon(EntryIcons[i]),QString::number(i)));
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,40 @@
 | 
			
		|||
/***************************************************************************
 | 
			
		||||
 *   Copyright (C) 2005-2006 by Tarek Saidi                                *
 | 
			
		||||
 *   tarek.saidi@arcor.de                                                  *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 *   This program is free software; you can redistribute it and/or modify  *
 | 
			
		||||
 *   it under the terms of the GNU General Public License as published by  *
 | 
			
		||||
 *   the Free Software Foundation; either version 2 of the License, or     *
 | 
			
		||||
 *   (at your option) any later version.                                   *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 *   This program is distributed in the hope that it will be useful,       *
 | 
			
		||||
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 | 
			
		||||
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 | 
			
		||||
 *   GNU General Public License for more details.                          *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 *   You should have received a copy of the GNU General Public License     *
 | 
			
		||||
 *   along with this program; if not, write to the                         *
 | 
			
		||||
 *   Free Software Foundation, Inc.,                                       *
 | 
			
		||||
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 | 
			
		||||
 ***************************************************************************/
 | 
			
		||||
 | 
			
		||||
#ifndef _SELECT_ICON_DLG_
 | 
			
		||||
#define _SELECT_ICON_DLG_
 | 
			
		||||
 | 
			
		||||
#include "main.h"
 | 
			
		||||
#include "Database.h"
 | 
			
		||||
#include "ui_SelectIconDlg.h"
 | 
			
		||||
 | 
			
		||||
class CSelectIconDlg:public QDialog, public Ui_SelectIconDlg{
 | 
			
		||||
 Q_OBJECT
 | 
			
		||||
public:
 | 
			
		||||
 CSelectIconDlg(Database* db,QWidget* parent = 0, const char* name = 0, bool modal = false, Qt::WFlags fl = 0);
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
 Database* db;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
<ui version="4.0" stdsetdef="1" >
 | 
			
		||||
<ui version="4.0" >
 | 
			
		||||
 <author>Tarek Saidi</author>
 | 
			
		||||
 <comment></comment>
 | 
			
		||||
 <exportmacro></exportmacro>
 | 
			
		||||
| 
						 | 
				
			
			@ -27,22 +27,6 @@
 | 
			
		|||
  <property name="windowTitle" >
 | 
			
		||||
   <string>Group Properties</string>
 | 
			
		||||
  </property>
 | 
			
		||||
    <widget class="Line" name="line1" >
 | 
			
		||||
      <property name="geometry" >
 | 
			
		||||
        <rect>
 | 
			
		||||
          <x>10</x>
 | 
			
		||||
          <y>62</y>
 | 
			
		||||
          <width>290</width>
 | 
			
		||||
          <height>16</height>
 | 
			
		||||
        </rect>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="frameShape" >
 | 
			
		||||
        <enum>QFrame::HLine</enum>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="frameShadow" >
 | 
			
		||||
        <enum>QFrame::Sunken</enum>
 | 
			
		||||
      </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
  <widget class="QLineEdit" name="EditTitle" >
 | 
			
		||||
   <property name="geometry" >
 | 
			
		||||
    <rect>
 | 
			
		||||
| 
						 | 
				
			
			@ -92,10 +76,10 @@
 | 
			
		|||
  <widget class="QPushButton" name="ButtonCancel" >
 | 
			
		||||
   <property name="geometry" >
 | 
			
		||||
    <rect>
 | 
			
		||||
          <x>226</x>
 | 
			
		||||
          <y>80</y>
 | 
			
		||||
     <x>227</x>
 | 
			
		||||
     <y>77</y>
 | 
			
		||||
     <width>70</width>
 | 
			
		||||
          <height>20</height>
 | 
			
		||||
     <height>24</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="text" >
 | 
			
		||||
| 
						 | 
				
			
			@ -105,13 +89,32 @@
 | 
			
		|||
    <string>Alt+C</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <widget class="Line" name="line1" >
 | 
			
		||||
   <property name="geometry" >
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>10</x>
 | 
			
		||||
     <y>62</y>
 | 
			
		||||
     <width>290</width>
 | 
			
		||||
     <height>16</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="frameShape" >
 | 
			
		||||
    <enum>QFrame::HLine</enum>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="frameShadow" >
 | 
			
		||||
    <enum>QFrame::Sunken</enum>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="orientation" >
 | 
			
		||||
    <enum>Qt::Horizontal</enum>
 | 
			
		||||
   </property>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <widget class="QPushButton" name="ButtonOK" >
 | 
			
		||||
   <property name="geometry" >
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>147</x>
 | 
			
		||||
          <y>80</y>
 | 
			
		||||
     <y>77</y>
 | 
			
		||||
     <width>70</width>
 | 
			
		||||
          <height>20</height>
 | 
			
		||||
     <height>24</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="text" >
 | 
			
		||||
| 
						 | 
				
			
			@ -121,6 +124,19 @@
 | 
			
		|||
    <string>Alt+K</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <widget class="QPushButton" name="Button_Icon" >
 | 
			
		||||
   <property name="geometry" >
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>123</x>
 | 
			
		||||
     <y>39</y>
 | 
			
		||||
     <width>21</width>
 | 
			
		||||
     <height>24</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="text" >
 | 
			
		||||
    <string>></string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </widget>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <layoutdefault spacing="6" margin="11" />
 | 
			
		||||
 <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
 | 
			
		||||
| 
						 | 
				
			
			@ -130,4 +146,6 @@
 | 
			
		|||
  <tabstop>ButtonOK</tabstop>
 | 
			
		||||
  <tabstop>ButtonCancel</tabstop>
 | 
			
		||||
 </tabstops>
 | 
			
		||||
 <resources/>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,147 @@
 | 
			
		|||
<ui version="4.0" >
 | 
			
		||||
 <author></author>
 | 
			
		||||
 <comment></comment>
 | 
			
		||||
 <exportmacro></exportmacro>
 | 
			
		||||
 <class>SelectIconDlg</class>
 | 
			
		||||
 <widget class="QDialog" name="SelectIconDlg" >
 | 
			
		||||
  <property name="geometry" >
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>468</width>
 | 
			
		||||
    <height>272</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle" >
 | 
			
		||||
   <string>Dialog</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <widget class="QListWidget" name="List" >
 | 
			
		||||
   <property name="geometry" >
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>10</x>
 | 
			
		||||
     <y>10</y>
 | 
			
		||||
     <width>451</width>
 | 
			
		||||
     <height>211</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="horizontalScrollBarPolicy" >
 | 
			
		||||
    <enum>Qt::ScrollBarAlwaysOff</enum>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="selectionMode" >
 | 
			
		||||
    <enum>QAbstractItemView::ExtendedSelection</enum>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="iconSize" >
 | 
			
		||||
    <size>
 | 
			
		||||
     <width>16</width>
 | 
			
		||||
     <height>16</height>
 | 
			
		||||
    </size>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="textElideMode" >
 | 
			
		||||
    <enum>Qt::ElideRight</enum>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="movement" >
 | 
			
		||||
    <enum>QListView::Static</enum>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="flow" >
 | 
			
		||||
    <enum>QListView::LeftToRight</enum>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="gridSize" >
 | 
			
		||||
    <size>
 | 
			
		||||
     <width>32</width>
 | 
			
		||||
     <height>44</height>
 | 
			
		||||
    </size>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="viewMode" >
 | 
			
		||||
    <enum>QListView::IconMode</enum>
 | 
			
		||||
   </property>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <widget class="QWidget" name="layoutWidget" >
 | 
			
		||||
   <property name="geometry" >
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>10</x>
 | 
			
		||||
     <y>230</y>
 | 
			
		||||
     <width>451</width>
 | 
			
		||||
     <height>33</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <layout class="QHBoxLayout" >
 | 
			
		||||
    <property name="margin" >
 | 
			
		||||
     <number>0</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="spacing" >
 | 
			
		||||
     <number>6</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <item>
 | 
			
		||||
     <widget class="QPushButton" name="pushButton" >
 | 
			
		||||
      <property name="text" >
 | 
			
		||||
       <string>Add Custom Icon...</string>
 | 
			
		||||
      </property>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item>
 | 
			
		||||
     <spacer>
 | 
			
		||||
      <property name="orientation" >
 | 
			
		||||
       <enum>Qt::Horizontal</enum>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="sizeHint" >
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>131</width>
 | 
			
		||||
        <height>31</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
     </spacer>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item>
 | 
			
		||||
     <widget class="QPushButton" name="Button_Ok" >
 | 
			
		||||
      <property name="text" >
 | 
			
		||||
       <string>Pick</string>
 | 
			
		||||
      </property>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item>
 | 
			
		||||
     <widget class="QPushButton" name="Button_Cancel" >
 | 
			
		||||
      <property name="text" >
 | 
			
		||||
       <string>Cancel</string>
 | 
			
		||||
      </property>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
   </layout>
 | 
			
		||||
  </widget>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <pixmapfunction></pixmapfunction>
 | 
			
		||||
 <resources/>
 | 
			
		||||
 <connections>
 | 
			
		||||
  <connection>
 | 
			
		||||
   <sender>Button_Ok</sender>
 | 
			
		||||
   <signal>clicked()</signal>
 | 
			
		||||
   <receiver>SelectIconDlg</receiver>
 | 
			
		||||
   <slot>accept()</slot>
 | 
			
		||||
   <hints>
 | 
			
		||||
    <hint type="sourcelabel" >
 | 
			
		||||
     <x>278</x>
 | 
			
		||||
     <y>253</y>
 | 
			
		||||
    </hint>
 | 
			
		||||
    <hint type="destinationlabel" >
 | 
			
		||||
     <x>96</x>
 | 
			
		||||
     <y>254</y>
 | 
			
		||||
    </hint>
 | 
			
		||||
   </hints>
 | 
			
		||||
  </connection>
 | 
			
		||||
  <connection>
 | 
			
		||||
   <sender>Button_Cancel</sender>
 | 
			
		||||
   <signal>clicked()</signal>
 | 
			
		||||
   <receiver>SelectIconDlg</receiver>
 | 
			
		||||
   <slot>reject()</slot>
 | 
			
		||||
   <hints>
 | 
			
		||||
    <hint type="sourcelabel" >
 | 
			
		||||
     <x>369</x>
 | 
			
		||||
     <y>253</y>
 | 
			
		||||
    </hint>
 | 
			
		||||
    <hint type="destinationlabel" >
 | 
			
		||||
     <x>179</x>
 | 
			
		||||
     <y>282</y>
 | 
			
		||||
    </hint>
 | 
			
		||||
   </hints>
 | 
			
		||||
  </connection>
 | 
			
		||||
 </connections>
 | 
			
		||||
</ui>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
/***************************************************************************
 | 
			
		||||
 *   Copyright (C) 2005 by Tarek Saidi                                     *
 | 
			
		||||
 *   Copyright (C) 2005-2006 by Tarek Saidi                                *
 | 
			
		||||
 *   tarek@linux                                                           *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 *   This program is free software; you can redistribute it and/or modify  *
 | 
			
		||||
| 
						 | 
				
			
			@ -282,7 +282,7 @@ int i=1;
 | 
			
		|||
		i++; }
 | 
			
		||||
	for(i; i<argc;i++){
 | 
			
		||||
		if(QString(argv[i])=="-h"){
 | 
			
		||||
			cout << "Keepass 0.2.0" << endl;
 | 
			
		||||
			cout << "KeePassX" << KEEPASS_VERSION << endl;
 | 
			
		||||
			cout << "Usage: keepass [Filename] [Options]" << endl;
 | 
			
		||||
			cout << "  -h This Help" << endl;
 | 
			
		||||
			cout << "  -cfg ConfigFile Use specified configuration" << endl;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,7 +26,7 @@
 | 
			
		|||
#include <QColor>
 | 
			
		||||
#include <QIcon>
 | 
			
		||||
 | 
			
		||||
#define KEEPASS_VERSION "0.2.0"
 | 
			
		||||
#define KEEPASS_VERSION "0.2.1"
 | 
			
		||||
#define NUM_CLIENT_ICONS 62
 | 
			
		||||
 | 
			
		||||
typedef enum tKeyType {PASSWORD=0,KEYFILE=1,BOTH=2};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -278,7 +278,7 @@ StatusBarGeneral->setText(tr("Loading Database..."));
 | 
			
		|||
if(db->openDatabase(filename,err)==true){
 | 
			
		||||
//SUCCESS
 | 
			
		||||
if(config.OpenLast)config.LastFile=filename;
 | 
			
		||||
setCaption(tr("Keepass - %1").arg(filename));
 | 
			
		||||
setCaption(tr("KeePassX - %1").arg(filename));
 | 
			
		||||
GroupView->updateItems();
 | 
			
		||||
EntryView->updateItems(0);
 | 
			
		||||
setStateFileOpen(true);
 | 
			
		||||
| 
						 | 
				
			
			@ -764,7 +764,7 @@ if(GroupView->selectedItems().size())
 | 
			
		|||
 pNew=db->addGroup(static_cast<GroupViewItem*>(GroupView->selectedItems()[0])->pGroup);
 | 
			
		||||
else
 | 
			
		||||
 pNew=db->addGroup(NULL);
 | 
			
		||||
CEditGroupDialog dlg(this,"EditGroupDlg",true);
 | 
			
		||||
CEditGroupDialog dlg(db,this,"EditGroupDlg",true);
 | 
			
		||||
if(!dlg.exec()){
 | 
			
		||||
 db->deleteGroup(pNew);
 | 
			
		||||
 return;
 | 
			
		||||
| 
						 | 
				
			
			@ -778,7 +778,7 @@ GroupView->updateItems();
 | 
			
		|||
void KeepassMainWindow::OnEditEditGroup(){
 | 
			
		||||
Q_ASSERT(GroupView->selectedItems().size());
 | 
			
		||||
CGroup *pGroup=static_cast<GroupViewItem*>(GroupView->selectedItems()[0])->pGroup;
 | 
			
		||||
CEditGroupDialog dlg(this,"EditGroupDlg",true);
 | 
			
		||||
CEditGroupDialog dlg(db,this,"EditGroupDlg",true);
 | 
			
		||||
dlg.GroupName=pGroup->Name;
 | 
			
		||||
dlg.IconID=pGroup->ImageID;
 | 
			
		||||
if(!dlg.exec())return;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										29
									
								
								src/src.pro
								
								
								
								
							
							
						
						
									
										29
									
								
								src/src.pro
								
								
								
								
							| 
						 | 
				
			
			@ -3,15 +3,24 @@
 | 
			
		|||
# Unterordner relativ zum Projektordner: ./src
 | 
			
		||||
# Das Target ist eine Anwendung:  ../bin/keepass
 | 
			
		||||
 | 
			
		||||
INSTALLS += target \
 | 
			
		||||
            Share
 | 
			
		||||
Share.files += ../share/keepass/* 
 | 
			
		||||
unix{ target.path = /usr/local/bin
 | 
			
		||||
      Share.path = /usr/local/share/keepass
 | 
			
		||||
 | 
			
		||||
INSTALLS += target data
 | 
			
		||||
data.files += ../share/keepass/* 
 | 
			
		||||
TARGET = ../bin/keepass
 | 
			
		||||
 | 
			
		||||
unix{
 | 
			
		||||
	isEmpty(PREFIX){
 | 
			
		||||
		PREFIX=/usr/local
 | 
			
		||||
	}
 | 
			
		||||
macx{ target.path = /Applications
 | 
			
		||||
      Share.path = /Applications/keepass.app/Contents/share/keepass
 | 
			
		||||
	target.path = $${PREFIX}/bin
 | 
			
		||||
	data.path = $${PREFIX}/share/keepass
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
macx{ 
 | 
			
		||||
	target.path = /Applications
 | 
			
		||||
	data.path = /Applications/keepass.app/Contents/share/keepass
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
FORMS += forms/EditGroupDlg.ui \
 | 
			
		||||
         forms/SearchDlg.ui \
 | 
			
		||||
         forms/AboutDlg.ui \
 | 
			
		||||
| 
						 | 
				
			
			@ -21,7 +30,8 @@ FORMS += forms/EditGroupDlg.ui \
 | 
			
		|||
         forms/DatabaseSettingsDlg.ui \
 | 
			
		||||
         forms/PasswordDlg.ui \
 | 
			
		||||
         forms/EditEntryDlg.ui \
 | 
			
		||||
         forms/PasswordGenDlg.ui 
 | 
			
		||||
         forms/PasswordGenDlg.ui \
 | 
			
		||||
	 forms/SelectIconDlg.ui
 | 
			
		||||
TRANSLATIONS += translations/keepass-de_DE.ts \
 | 
			
		||||
		translations/keepass-ru_RU.ts \
 | 
			
		||||
		translations/keepass-es_ES.ts \
 | 
			
		||||
| 
						 | 
				
			
			@ -50,6 +60,7 @@ HEADERS += lib/IniReader.h \
 | 
			
		|||
           dialogs/SimplePasswordDlg.h \
 | 
			
		||||
           dialogs/EditEntryDlg.h \
 | 
			
		||||
           dialogs/PasswordGenDlg.h \
 | 
			
		||||
	   dialogs/SelectIconDlg.h \
 | 
			
		||||
           lib/random.h \
 | 
			
		||||
           Database.h \
 | 
			
		||||
           lib/KdePlugin.h \
 | 
			
		||||
| 
						 | 
				
			
			@ -84,6 +95,7 @@ SOURCES += lib/IniReader.cpp \
 | 
			
		|||
           dialogs/SimplePasswordDlg.cpp \
 | 
			
		||||
           dialogs/EditEntryDlg.cpp \
 | 
			
		||||
           dialogs/PasswordGenDlg.cpp \
 | 
			
		||||
	   dialogs/SelectIconDlg.cpp \
 | 
			
		||||
           lib/random.cpp \
 | 
			
		||||
           Database.cpp \
 | 
			
		||||
           lib/KdePlugin.cpp \
 | 
			
		||||
| 
						 | 
				
			
			@ -96,7 +108,6 @@ QT -= network sql
 | 
			
		|||
MOC_DIR = ../build/moc
 | 
			
		||||
UI_DIR = ../build/ui
 | 
			
		||||
OBJECTS_DIR = ../build/
 | 
			
		||||
TARGET = ../bin/keepass
 | 
			
		||||
INCLUDEPATH += ./
 | 
			
		||||
CONFIG += debug \
 | 
			
		||||
warn_off \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue