From 961268a67d65e59a6e1fe63b3e87f7db7cc1279d Mon Sep 17 00:00:00 2001 From: myxelf Date: Wed, 26 Sep 2007 22:48:38 +0000 Subject: [PATCH] most changes are details git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@147 b624d157-de02-0410-bad0-e51aec6abb33 --- share/keepass/icons/bookmark.png | Bin 6161 -> 2025 bytes share/keepass/icons/bookmark_add.png | Bin 2404 -> 2401 bytes share/keepass/icons/bookmark_del.png | Bin 0 -> 2159 bytes share/keepass/icons/bookmark_edit.png | Bin 2617 -> 2337 bytes share/keepass/icons/bookmark_this.png | Bin 0 -> 2373 bytes src/Database.h | 109 +++++++++++++------------- src/Kdb3Database.cpp | 43 +++++++++- src/Kdb3Database.h | 35 +++++---- src/dialogs/AboutDlg.cpp | 14 ++-- src/dialogs/AboutDlg.h | 4 +- src/dialogs/AddBookmarkDlg.cpp | 20 ++++- src/dialogs/AddBookmarkDlg.h | 13 ++- src/dialogs/CollectEntropyDlg.cpp | 11 +-- src/dialogs/CollectEntropyDlg.h | 7 +- src/dialogs/EditEntryDlg.cpp | 44 +---------- src/dialogs/ManageBookmarksDlg.cpp | 98 +++++++++++++---------- src/dialogs/ManageBookmarksDlg.h | 13 ++- src/forms/AboutDlg.ui | 48 ++++++++++-- src/forms/AddBookmarkDlg.ui | 47 ++++++++++- src/forms/MainWindow.ui | 2 +- src/forms/ManageBookmarksDlg.ui | 85 ++++++++++++++++++-- src/main.cpp | 16 ++-- src/main.h | 13 ++- src/mainwindow.cpp | 40 +++++----- 24 files changed, 434 insertions(+), 228 deletions(-) create mode 100755 share/keepass/icons/bookmark_del.png create mode 100755 share/keepass/icons/bookmark_this.png diff --git a/share/keepass/icons/bookmark.png b/share/keepass/icons/bookmark.png index 0cc8656b373edd545a9d8cf0527b1032a2e02359..972f55024dcb06f77901cdfda1dc59b5f7d2380c 100644 GIT binary patch literal 2025 zcmWkvdoNmN*ID#=hWse8&0#=O3F`eX0UT6?X%_h;>A2`fI<-gcQS0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+j@zhtJb8K=-_6ST?i9deGd{RGkriOUvy3 zm2vdLY8_XGtIQseR)%}be*vIHV`=3`7q$QZ03v!+SaefwW^{L9a%BJjc-kv3FW1Y= j%Pvk%EJ)SMFG>dhHrNJO5L3!r00000NkvXXu0mjfZO;`? diff --git a/share/keepass/icons/bookmark_add.png b/share/keepass/icons/bookmark_add.png index 3521387f16d2f74f300e880f9ed569ca7d58701a..bbaa71ad80375f5b998846311a0e949d362618f3 100644 GIT binary patch delta 2390 zcmW+&eOQur7yj`Pm_8!YshE^FtZCDHfUD{915tCRk%Ozr>+v_Z`mMi6fFfJ`q z)0J3GaVvYXu0mWnmkEa7S-F*&x5J>=7LTz~lfWt5V ze{%uYBm=`4&KwUOuWE^4`TAIuFhCQ?5#J^aX1$z$<;e25x-bRKRy;uX1OuG zr%e)K>P4Yml8e4XNwu%LXwdOON1^6 zQmN1t>rE(XEJfLDA>VA6@qE(L0#k|cUb$q*y2YvJC+u1KZr#JmZu_7z60l4MmK!3cb&M^BPPSbr#%@q<3 zKmJg@3eVI)QZ{?ctJdqBeS9M7uv^{L_~ivpx};jR?&+KJ z2yPHcuc=Mp^3(Wby2>=!%S~17Nsr2PPluxr%5}Ow5o5z|PauiP(TX61;?^10Vw`?9 zdrSHI6CVds7B{w)_>~zmJ&&-x&*7pbW-61R=5Qus#H8-m&uZPJT2#oQ3Udo|1Aj%m zaNfLSXOZreHW1PxBIk)C-w}`yj68l%Et7gQ-*dl51ZaHWcTr^TaVwK;+}!ed{xb)u zDxN|aT_fT5)^c0_nPE#GRIZ24GrJ(WnRr=A`+wnmdG-zVhN?c`3Q*SQw165YG7&>-Bk-CC8}Ny}nV`_WIIYwws5a@Aem- zZM>f@CILHIBX>(6GsTKG`*auy<5(Tbwd?`VQn@?GGVUR_2H$ z*IkDE)#4%BBctp?j@>V743UT{eyY%Ul2;YJV!cg#%gX5ahFO#Lv=fjca#z#3`s58a zdMu=4)=Sz+@LpXDJ!XgE`qOMU#>RV{|uEDoWg) z;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y*t>5^c9*5 zwD}_XN@-oovQsYVL;SO5wL^pJ7Z5*#oq$%#Nm;Qq&4fx504d|NX+V`iG0tj~Jx6f4 zi%Q#!W6t+vR>~RMOgwa8C8R543$cY0OWG3_myQT89b6!P!jLno2#Y$IM4A8E&kT>N z8cyWJDTasBlyF7waa)cKxbd%dWVadJGvCFP*3c33z|Hd{()aVEe{0xi;tLM*8cR%w zSC|a$mnzAhV`P2gZv;8 zL9?*zD@2&(`S;e?I%u`mL(Xr80Y$`Ql%R-ohuac(CBoB1)ccdvDCvAtqb5&q?00V^ zP`USHrRNCY9x?~eU}tjKl_@gfxc_l{TuZRI^;n!)QTd0x8{^kMlM-Jo;fhc|T#4iV UmA2`Q?KuFOHpWKW3gb)u4>67Io&W#< literal 0 HcmV?d00001 diff --git a/share/keepass/icons/bookmark_edit.png b/share/keepass/icons/bookmark_edit.png index d2f72dff121fbb2cb8b83657f944d22bdc5e1ec8..7e635267507ac9a13f8922f23e7a5cd980a2ec71 100644 GIT binary patch delta 2326 zcmW+&dsvc(7yb}LjSn?%z;cOYr85O&Q_~dCw9C@$GMk$VltkMs4RhKuKae6df9Y1K zWgFJ)rv3_brfvk(N6pk_Z8~+!3+A<(kftE`ePjFMJm)$8yyraUJ?}ZE&E>LFnHOZ2 zxg{YB00_?i8V0y{i3|V$E|n9*0f2@xd8VCbEisk9WmgOUe6t1sL=pfnq82|50NHc^ zc)JR%&P`YykP9tkeMmFlJRU{XF+c4odaQ^z1I*> zv$oGs1gu&y&<~ZW&WCe*mb*9x=th0lp?rt&UvxVp*u);Yq z-56g}C-BkNL>oOMHQqLoOWq_&@wH${?461uH>1+qmcgv*J1m*VK)|60ppj96gOzll z>aOQIgb9Zp3dA4Yc?j=Gok%i2R4+T?-*rpXUXH;z^3V8ve)4KjEz#N6q4bhBjpo}z zbs#v->IsMSv--o3T&Qno5(*iOjg0|v;Vgr0TMPJ^@P~o+N!1WmA4<)K)w(4gEL`Wz z)&_wp6>9x~2}Ku5Q5Gv-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6Ee4HoE#kft$678@BivA@|9i4yzQn62Yj$ZP#X z*5!8D$PF7nG`dMDJ9%b(99dY^?^bbnJ-x@r9jP8-Trw5D!Q%`2*GyRZ>XtDkXR`lD zTYSkXtdl*9PDo4~B~rZCiAV3KYR^Q!b6!ocv!hY4A9%rwQ*QF{V|!so-sj&;;tciF ze=B#{^YWi+ob-d%_~X-5CT_gD*J%CC-HnWc*z5TDL#eNB;rKFwwiXTE=>k#UC+35hAFRt@#- zfBUrm()x$1pD0OJ)n?E52cszz# zgm@a$91B@bM#;Z3ANMI|IIH}2y>H5E7UkBNBBu*vyu*LUx-zidnT&0%r_5it3mXtt z2gcj9aP$|UeX_ep0n^RG@2)jEEzONhO7_ycfADH96G5s5d7t&WHFRlxPX)vph9T^) zf-vgpXDr~#^sWs)g%R~938dS>N0Gk{w6r96N^@0@;9do;3)`>ONdGw(1@rdeP-;Dt zvZ$S!h2xcrvipB~6$`IX16X?M{)+_L_c$vY$J#=4sg2G(8|!y4TLyZH4g_v*EmfB& z!tAhl$QYtu^CY+EMliJ6Rr3T(slCz8-LQ80u3jlt<|B1-O>*SQxmCQ4Hw``r-<}p0 zh+AJ++AB7|6h$_*b-qs&1rvKW!KkQf#C`ahq3C`BoqPL#Aa0_Ay literal 0 HcmV?d00001 diff --git a/src/Database.h b/src/Database.h index a5c109d..d766a60 100644 --- a/src/Database.h +++ b/src/Database.h @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ - + #ifndef _DATABASE_H_ #define _DATABASE_H_ @@ -75,7 +75,7 @@ class KpxDateTime:public QDateTime{ }; //! Entry Data Structure -/*! This class holds the data of a normal database entry. It is used by some interface functions to process predefined entries and can be used for internal data handling.*/ +/*! This class holds the data of a normal database entry. It is used by some interface functions to process predefined entries and can be used for internal data handling.*/ class CEntry{ public: CEntry(); @@ -97,7 +97,7 @@ public: }; //! Group Data Structure -/*! This class holds the data of a normal database group. It is used by some interface functions to process predefined groups and can be used for internal data handling.*/ +/*! This class holds the data of a normal database group. It is used by some interface functions to process predefined groups and can be used for internal data handling.*/ class CGroup{ public: CGroup(); @@ -147,15 +147,16 @@ public: virtual KpxDateTime expire()=0; virtual QByteArray binary()=0; virtual quint32 binarySize()=0; - + virtual QString friendlySize()=0; + //! \return the index of the entry amongst the entries of its group. The index of the first entry is 0. virtual int visualIndex()const=0; - + /*! Sets the visual index of an entry. The indices of all other entries in the same group get automaticly readjusted by this function. \param index The new visual index. */ virtual void setVisualIndex(int index)=0; - + /*! Sets the visual index of an entry. The indices of all other entries in the same group need to be adjusted manually! This function is optimal to avoid readjustion overhead when sorting items. \param index The new visual index. @@ -170,7 +171,7 @@ public: }; //! Custom Icon Interface -/*! +/*! This class provides an interface for the management of custom icons. The implementation is optional and not necessarily needed. */ class ICustomIcons:public QObject{ @@ -180,12 +181,12 @@ class ICustomIcons:public QObject{ \param icon The pixmap which contains the new icon. This function makes a copy of the given pixmap. */ virtual void addIcon(const QPixmap& icon)=0; - + /*! Removes an icon. \param index The index of the icon which should be removed. Built-in icons cannot be removed so make sure that index is not the index of an Built-in icon before calling this function. - */ + */ virtual void removeIcon(int index)=0; - + /*! Replaces one icon with another one. \param index The index of the icon which should be replaced. Built-in icons cannot be replaced so make sure that index is not the index of an Built-in icon before calling this function. \param icon The pixmap which contains the new icon. @@ -196,43 +197,43 @@ class ICustomIcons:public QObject{ That means it is emitted after every call off addIcon(), removeIcon() and replaceIcon(). */ void iconsModified(); - + }; //! Handle class interface for accessing groups /*! -The IGroupHandle interface provides access to CGroup data structures without using direct references. Every entry handle class must implement this interface necessarily. +The IGroupHandle interface provides access to CGroup data structures without using direct references. Every entry handle class must implement this interface necessarily. */ class IGroupHandle{ public: virtual void setTitle(const QString& Title)=0; virtual void setImage(const quint32& ImageID)=0; - + virtual QString title()=0; virtual quint32 image()=0; - + //! \return a pointer to the handle of the parent group or NULL if the group has no parent. virtual IGroupHandle* parent()=0; - + //! \return a List of pointers to the handles of all childs of the group and an empty list if the group has no childs. The list is sorted and starts with the first child. virtual QList childs()=0; - + //! \return the index of the group amongst the childs of its parent. The index of the first child is 0. virtual int index()=0; - + /*! Sets the index of a group amongst the childs of its parent. This function can be used to sort the groups of the database in a specific order. \param index The new index of the group. The indices of the other groups which are affected by this operation will be automatically adjusted.*/ virtual void setIndex(int index)=0; - + /*! Tests the validity of the handle. \return TRUE if the handle is valid and FALSE if the handle is invalid e.g. because the associated group was deleted.*/ virtual bool isValid()=0; - + /*! \return the level of the group in the group tree. This level is tantamount to the number of parents that the group has. */ virtual int level()=0; - + virtual bool expanded()=0; virtual void setExpanded(bool)=0; @@ -240,7 +241,7 @@ public: //! Common Database Interface. /*! -This is the common base interface for databases. Every database class must implement this interface necessarily. +This is the common base interface for databases. Every database class must implement this interface necessarily. */ class IDatabase:public QObject{ public: @@ -254,9 +255,9 @@ public: virtual bool load(QString identifier)=0; //! Saves the current database. - /*! It is not allowed to call this function if no database is loaded. + /*! It is not allowed to call this function if no database is loaded. \return TRUE if saving was successfull, otherwise FALSE. - */ + */ virtual bool save()=0; //! Closes the current database. @@ -264,33 +265,33 @@ public: It is not allowed to call this function if no database is loaded. Please note: The database will be closed without saving it in before. * \return TRUE if closing was successfull, otherwise FALSE. - */ + */ virtual bool close()=0; //! Creates a new database. /*! It is not allowed to call this function if a database is already loaded. \return TRUE if saving was successfull, otherwise FALSE. - */ + */ virtual void create()=0; - - + + virtual bool changeFile(const QString& filename)=0; - + virtual QFile* file()=0; //! \return a list with the pointers to the handles of all entries of the database. The list contains only valid handles. The list is not sorted. virtual QList entries()=0; - + //! \param Group The group which contains the wanted entries. //! \return a list of pointers to the handles of all entries which belong to the given group. The list contains only valid handles and is sorted in an ascending order regarding to the entry indices. virtual QList entries(IGroupHandle* Group)=0; - + //! \return a list with the pointers to the handles of all expired entries of the database. The list contains only valid handles. The list is not sorted. virtual QList expiredEntries()=0; - + //! \return a list with the pointers to the handles of all entries of the database. The list contains only valid handles and is not sorted. virtual QList groups()=0; - + /*! This function might be slower than groups() - denpending on the implementation. \return a list with the pointers to the handles of all entries of the database. The list ist sorted and contains only valid handles.*/ @@ -298,7 +299,7 @@ public: /*! \return the last error message or an empty QString() object if no error occured.*/ - virtual QString getError()=0; + virtual QString getError()=0; /*! Creates a clone of a given entry. All attributes besides the UUID are copied, even the creation date. @@ -311,13 +312,13 @@ public: \param entry The handle of the entry which should be deleted. */ virtual void deleteEntry(IEntryHandle* entry)=0; - - + + /*! Deletes the last added entry. This function should only be called immediately after an addEntry() call, otherwise the behavior is undefined. Immediately means that there are no other add/move/delete operations between the two function calls.*/ virtual void deleteLastEntry()=0; - - + + /*! Deletes multiple given entries. Calling this function can be faster then calling deleteEntry(..) several times - depending on the implementation. Important: All entries must belong to the same group! @@ -328,7 +329,7 @@ public: /*! Creates a new blank entry. \param Group The group to which the entry should be added. \return the handle of the new entry. - */ + */ virtual IEntryHandle* newEntry(IGroupHandle* Group)=0; /*! Adds a Entry object to the database. @@ -337,7 +338,7 @@ public: \return a pointer to the handle of the added entry. */ virtual IEntryHandle* addEntry(const CEntry* NewEntry, IGroupHandle* Group)=0; - + /*! Moves an entry to another group. \param entry The entry which should be moved. \param group The new group of the entry.*/ @@ -348,25 +349,25 @@ public: Deletes the group, all it's entries and child groups and their entries as well. \param group The group which should be deleted.*/ virtual void deleteGroup(IGroupHandle* group)=0; - + /*! Adds a group to the database. \param Group A pointer to a CGroup object. Id and ParentId of the object are ignored. \param Parent A pointer to the handle of parent of the group. Can be NULL if the group is a top-level group. \return a pointer to the handle of the added group.*/ virtual IGroupHandle* addGroup(const CGroup* Group,IGroupHandle* Parent)=0; - + /*! Moves a group. \param Group The group which should be moved. \param NewParent The new parent of the group. \param Position The position of the group amongst it's new siblings. If Position is 0 the group will be prepended if it is -1 the group will be appended.*/ virtual void moveGroup(IGroupHandle* Group,IGroupHandle* NewParent,int Position)=0; - + /*! Checks two given groups if one is the parent of the other. \param Child The child group. \param Parent The parent group. \return TRUE if Parent is the parent of child, otherwise FALSE.*/ virtual bool isParent(IGroupHandle* parent, IGroupHandle* child)=0; - + /*! \param index Index of the requested icon. \return a reference to the pixmap of the requested icon. */ @@ -377,18 +378,18 @@ public: /*! Deletes all old invalid handles of the database. Make sure that there are no pointers to those handles which are still in use before calling this function.*/ virtual void cleanUpHandles()=0; - + /*! \return the number of groups in the database.*/ virtual int numGroups()=0; - + /*! \return the number of entires in the database.*/ - virtual int numEntries()=0; - + virtual int numEntries()=0; + /*! \return the number of built-in icons of the database. Each database must contain at least one built-in icon. */ virtual int builtinIcons()=0; - + /*! Searches in the database for a string or regular expression. - \param Group The group where the search should be performed in. If Group is NULL the search will be performed in the whole database. + \param Group The group where the search should be performed in. If Group is NULL the search will be performed in the whole database. \param SearchString The searched string or a regular expression. \param CaseSensitvie If this parameter is true the search will be case sensitive. \param RegExp The SearchString parameter will be handled as regular expression if this parameter is true. @@ -396,16 +397,16 @@ public: \param Fields A pointer to a six element bool array. It defines which fields are included into the search. The order is: title, username, url, password, comment, attachment description. The pointer can also be NULL, than the default pattern is used instead. \return the search results as a list of pointers to the entry handles.*/ virtual QList search(IGroupHandle* Group,const QString& SearchString, bool CaseSensitve, bool RegExp,bool Recursive,bool* Fields)=0; - + //! Moves an entry to the recycle bin. virtual void moveToTrash(IEntryHandle* entry)=0; - + //! \returns all entries of the recycle bin. virtual QList trashEntries()=0; - + //! Empty the recycle bin. virtual void emptyTrash()=0; - + }; @@ -430,7 +431,7 @@ class IKdbSettings{ virtual void setCryptAlgorithm(CryptAlgorithm algo)=0; virtual CryptAlgorithm cryptAlgorithm()=0; virtual unsigned int keyTransfRounds()=0; - virtual void setKeyTransfRounds(unsigned int rounds)=0; + virtual void setKeyTransfRounds(unsigned int rounds)=0; }; #endif diff --git a/src/Kdb3Database.cpp b/src/Kdb3Database.cpp index 2062af4..9cf254e 100644 --- a/src/Kdb3Database.cpp +++ b/src/Kdb3Database.cpp @@ -843,7 +843,7 @@ QList Kdb3Database::entries(IGroupHandle* group){ handles.append(&EntryHandles[i]); } qSort(handles.begin(),handles.end(),EntryHandleLessThan); - + return handles; } @@ -962,6 +962,43 @@ KpxDateTime Kdb3Database::EntryHandle::lastAccess(){return Entry->LastAccess;} KpxDateTime Kdb3Database::EntryHandle::expire(){return Entry->Expire;} QByteArray Kdb3Database::EntryHandle::binary(){return Entry->Binary;} quint32 Kdb3Database::EntryHandle::binarySize(){return Entry->Binary.size();} + +QString Kdb3Database::EntryHandle::friendlySize() +{ + quint32 binsize = binarySize(); + QString unit; + uint faktor; + int prec; + + if (binsize < 1024) + { + unit = tr("Bytes"); + faktor = 1; + prec = 0; + } + else + { + if (binsize < 1048576) + { + unit = tr("KiB"); + faktor = 1024; + } + else + if (binsize < 1073741824) + { + unit = tr("MiB"); + faktor = 1048576; + } + else + { + unit = tr("GiB"); + faktor = 1073741824; + } + prec = 1; + } + return (QString::number((float)binsize / (float)faktor, 'f', prec) + " " + unit); +} + int Kdb3Database::EntryHandle::visualIndex()const{return Entry->Index;} void Kdb3Database::EntryHandle::setVisualIndexDirectly(int i){Entry->Index=i;} bool Kdb3Database::EntryHandle::isValid()const{return valid;} @@ -1637,7 +1674,7 @@ bool Kdb3Database::createKeyFile(const QString& filename,int length, bool Hex){ void Kdb3Database::moveGroup(IGroupHandle* groupHandle,IGroupHandle* NewParent,int Pos){ - StdGroup* Parent; + StdGroup* Parent; StdGroup* Group=((GroupHandle*)groupHandle)->Group; if(NewParent) Parent=((GroupHandle*)NewParent)->Group; @@ -1686,7 +1723,7 @@ void Kdb3Database::moveToTrash(IEntryHandle* entry){ TrashEntries.append(trash); TrashHandles.append(EntryHandle(this)); TrashHandles.back().Entry=&TrashEntries.back(); - TrashEntries.back().Handle=&TrashHandles.back(); + TrashEntries.back().Handle=&TrashHandles.back(); } void Kdb3Database::emptyTrash(){ diff --git a/src/Kdb3Database.h b/src/Kdb3Database.h index f2154d9..8e3e29c 100644 --- a/src/Kdb3Database.h +++ b/src/Kdb3Database.h @@ -16,7 +16,7 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ - + #ifndef _STD_DATABASE_H_ #define _STD_DATABASE_H_ @@ -55,7 +55,7 @@ public: class StdGroup; class StdEntry; class EntryHandle:public IEntryHandle{ - + friend class Kdb3Database; public: EntryHandle(Kdb3Database* db); @@ -91,6 +91,7 @@ public: virtual KpxDateTime expire(); virtual QByteArray binary(); virtual quint32 binarySize(); + virtual QString friendlySize(); virtual bool isValid() const; private: void invalidate(){valid=false;} @@ -99,14 +100,14 @@ public: Kdb3Database* pDB; StdEntry* Entry; }; - + class GroupHandle:public IGroupHandle{ friend class Kdb3Database; GroupHandle(Kdb3Database* db); public: virtual void setTitle(const QString& Title); virtual void setImage(const quint32& ImageId); - void setOldImage(const quint32& ImageId); + void setOldImage(const quint32& ImageId); virtual QString title(); virtual quint32 image(); quint32 oldImage(); @@ -124,10 +125,10 @@ public: StdGroup* Group; Kdb3Database* pDB; }; - + friend class EntryHandle; friend class GroupHandle; - + class StdEntry:public CEntry{ public: quint32 OldImage; @@ -135,7 +136,7 @@ public: EntryHandle* Handle; StdGroup* Group; }; - + class StdGroup:public CGroup{ public: StdGroup():CGroup(){}; @@ -147,12 +148,12 @@ public: QList Childs; QList Entries; }; - + class TrashEntry: public StdEntry{ public: - QStringList GroupPath; + QStringList GroupPath; }; - + virtual ~Kdb3Database(){}; virtual bool load(QString identifier); virtual bool save(); @@ -179,12 +180,12 @@ public: virtual void setCryptAlgorithm(CryptAlgorithm algo){Algorithm=algo;} virtual CryptAlgorithm cryptAlgorithm(){return Algorithm;} virtual unsigned int keyTransfRounds(){return KeyTransfRounds;} - virtual void setKeyTransfRounds(unsigned int rounds){KeyTransfRounds=rounds;} - + virtual void setKeyTransfRounds(unsigned int rounds){KeyTransfRounds=rounds;} + virtual QList entries(); virtual QList entries(IGroupHandle* Group); virtual QList expiredEntries(); - + virtual IEntryHandle* cloneEntry(const IEntryHandle* entry); virtual void deleteEntry(IEntryHandle* entry); virtual void deleteEntries(QList entries); @@ -196,7 +197,7 @@ public: virtual QList trashEntries(); virtual void emptyTrash(); - + virtual QList groups(); virtual QList sortedGroups(); virtual void deleteGroup(IGroupHandle* group); @@ -204,9 +205,9 @@ public: virtual IGroupHandle* addGroup(const CGroup* Group,IGroupHandle* Parent); virtual bool isParent(IGroupHandle* parent, IGroupHandle* child); - - + + private: QDateTime dateFromPackedStruct5(const unsigned char* pBytes); void dateToPackedStruct5(const QDateTime& datetime, unsigned char* dst); @@ -239,7 +240,7 @@ private: StdEntry* getEntry(EntryHandle* handle); int getEntryListIndex(EntryHandle* handle); EntryHandle* getHandle(StdEntry* entry); - + StdGroup* getGroup(quint32 Id); void deleteGroup(StdGroup* group); diff --git a/src/dialogs/AboutDlg.cpp b/src/dialogs/AboutDlg.cpp index 95be523..9fbb016 100755 --- a/src/dialogs/AboutDlg.cpp +++ b/src/dialogs/AboutDlg.cpp @@ -18,20 +18,20 @@ ***************************************************************************/ #include -#include -#include -#include #include -#include "main.h" #include "AboutDlg.h" + AboutDialog::AboutDialog(QWidget* parent):QDialog(parent) { setupUi(this); - createBanner(&BannerPixmap,getPixmap("keepassx_large"),tr("KeePassX %1").arg(KEEPASS_VERSION),width()); + createBanner(&BannerPixmap,getPixmap("keepassx_large"),tr("%1 %2").arg(APP_DISPLAY_NAME, APP_VERSION),width()); loadLicFromFile(); + labelAppName->setText(tr(APP_DISPLAY_NAME)); + labelAppFunc->setText(tr(" - %1").arg(APP_LONG_FUNC)); + QString AboutTr=tr("Current Translation: None

","Please replace 'None' with the language of your translation"); if(TrActive){ AboutTr+=tr("Author: %1
").arg(tr("$TRANSLATION_AUTHOR")); @@ -51,9 +51,9 @@ AboutDialog::AboutDialog(QWidget* parent):QDialog(parent) str+="
"; str+=""+tr("Eugen Gorschenin")+"
"+tr("Web Designer")+"
"+tr("geugen@users.sf.de")+"
"; str+="
"; - str+=""+tr("Jota Jota")+"
"+tr("Developer")+"
"+tr("myxself@users.sf.de")+"
"; + str+=""+tr("Juan J González Cárdenas [Jota Jota]")+"
"+tr("Developer")+"
"+tr("myxelf@users.sf.net")+"
"; str+="
"; - str+=""+tr("Thanks To")+""; + str+=""+tr("Thanks To")+"
"; str+="
"; str+=""+tr("Matthias Miller")+"
"+tr("Patches for better MacOS X support")+"
"+tr("www.outofhanwell.com")+"
"; str+="
"; diff --git a/src/dialogs/AboutDlg.h b/src/dialogs/AboutDlg.h index bd96c1e..4ef153b 100755 --- a/src/dialogs/AboutDlg.h +++ b/src/dialogs/AboutDlg.h @@ -21,9 +21,9 @@ #define _ABOUTDIALOG_H_ #include -#include #include "ui_AboutDlg.h" #include "lib/UrlLabel.h" + #include "main.h" @@ -42,7 +42,7 @@ public slots: private: QPixmap BannerPixmap; inline void loadLicFromFile(); - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(QPaintEvent*); }; #endif diff --git a/src/dialogs/AddBookmarkDlg.cpp b/src/dialogs/AddBookmarkDlg.cpp index 3238e55..4bc797e 100644 --- a/src/dialogs/AddBookmarkDlg.cpp +++ b/src/dialogs/AddBookmarkDlg.cpp @@ -18,10 +18,13 @@ ***************************************************************************/ #include -#include "AddBookmarkDlg.h" +#include #include "lib/FileDialogs.h" #include "lib/bookmarks.h" +#include "AddBookmarkDlg.h" + + AddBookmarkDlg::AddBookmarkDlg(QWidget* parent, QString DefaultFilename, int _ItemID):QDialog(parent) { setupUi(this); @@ -30,18 +33,29 @@ AddBookmarkDlg::AddBookmarkDlg(QWidget* parent, QString DefaultFilename, int _It connect(buttonBox->button(QDialogButtonBox::Ok),SIGNAL(clicked()),this,SLOT(OnButtonOk())); connect(buttonBox->button(QDialogButtonBox::Cancel),SIGNAL(clicked()),this,SLOT(reject())); if(ItemID==-1){ + createBanner(&BannerPixmap,getPixmap("bookmark_add"),tr("Add Bookmark"),width()); + if(DefaultFilename==QString()) OnButtonBrowse(); else Edit_Filename->setText(DefaultFilename); } else { - Edit_Title->setText(KpxBookmarks::title(ItemID)); + createBanner(&BannerPixmap,getPixmap("bookmark_edit"),tr("Edit Bookmark"),width()); + + Edit_Title->setText(KpxBookmarks::title(ItemID)); Edit_Filename->setText(KpxBookmarks::path(ItemID)); setWindowTitle(tr("Edit Bookmark")); } } +void AddBookmarkDlg::paintEvent(QPaintEvent *event){ + QDialog::paintEvent(event); + QPainter painter(this); + painter.setClipRegion(event->region()); + painter.drawPixmap(QPoint(0,0),BannerPixmap); +} + void AddBookmarkDlg::OnButtonBrowse(){ QString path=KpxFileDialogs::openExistingFile(this,"AddBookmarkDlg", tr("Add Bookmark"), QStringList() << tr("KeePass Databases (*.kdb)") << tr("All Files (*)")); @@ -54,5 +68,5 @@ void AddBookmarkDlg::OnButtonOk(){ ItemID=KpxBookmarks::add(Edit_Title->text(),Edit_Filename->text()); else KpxBookmarks::edit(Edit_Title->text(),Edit_Filename->text(),ItemID); - accept(); + accept(); } \ No newline at end of file diff --git a/src/dialogs/AddBookmarkDlg.h b/src/dialogs/AddBookmarkDlg.h index 363ace2..d7f2541 100644 --- a/src/dialogs/AddBookmarkDlg.h +++ b/src/dialogs/AddBookmarkDlg.h @@ -21,8 +21,11 @@ #define _ADDBOOKMARKDLG_H_ #include +#include #include "ui_AddBookmarkDlg.h" +#include "main.h" + class AddBookmarkDlg : public QDialog, private Ui::AddBookmarkDlg { Q_OBJECT @@ -30,11 +33,15 @@ class AddBookmarkDlg : public QDialog, private Ui::AddBookmarkDlg public: AddBookmarkDlg (QWidget* parent=0, QString DefaultFilename=QString(), int ItemID=-1); int ItemID; - - private slots: + + private: + QPixmap BannerPixmap; + virtual void paintEvent(QPaintEvent*); + + private slots: void OnButtonOk(); void OnButtonBrowse(); - + }; #endif diff --git a/src/dialogs/CollectEntropyDlg.cpp b/src/dialogs/CollectEntropyDlg.cpp index f64aa3e..841f243 100644 --- a/src/dialogs/CollectEntropyDlg.cpp +++ b/src/dialogs/CollectEntropyDlg.cpp @@ -21,8 +21,9 @@ #include #include #include "crypto/yarrow.h" + #include "CollectEntropyDlg.h" -#include "main.h" + CollectEntropyDlg::CollectEntropyDlg(QWidget* parent):QDialog(parent){ setupUi(this); @@ -81,12 +82,12 @@ void CollectEntropyDlg::updateProgress(){ stackedWidget->setCurrentIndex(1); } else - progressBar->setValue(4*KeyCounter+4*MouseCounter); - + progressBar->setValue(4*KeyCounter+4*MouseCounter); + } void CollectEntropyDlg::showEvent(QShowEvent* event){ if(!event->spontaneous()){ - Animation->start(); - } + Animation->start(); + } } diff --git a/src/dialogs/CollectEntropyDlg.h b/src/dialogs/CollectEntropyDlg.h index c68b9cb..e2c5cbb 100644 --- a/src/dialogs/CollectEntropyDlg.h +++ b/src/dialogs/CollectEntropyDlg.h @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ - + #ifndef _COLLECT_ENTROPY_DLG_H_ #define _COLLECT_ENTROPY_DLG_H_ @@ -26,12 +26,15 @@ #include #include +#include "main.h" + + class CollectEntropyDlg: public QDialog, public Ui_CollectEntropyDlg{ Q_OBJECT public: CollectEntropyDlg(QWidget* parent); ~CollectEntropyDlg(); - + private: QPixmap BannerPixmap; virtual void paintEvent(QPaintEvent* event); diff --git a/src/dialogs/EditEntryDlg.cpp b/src/dialogs/EditEntryDlg.cpp index 75aefc3..61201ee 100755 --- a/src/dialogs/EditEntryDlg.cpp +++ b/src/dialogs/EditEntryDlg.cpp @@ -131,16 +131,9 @@ CEditEntryDlg::CEditEntryDlg(IDatabase* _db, IEntryHandle* _entry,QWidget* paren ButtonDeleteAttachment->setDisabled(true); Label_AttachmentSize->setText(""); } - else{ - QString unit; - int faktor; - int prec; - if(entry->binarySize()<1000){unit=" Byte";faktor=1;prec=0;} - else - if(entry->binarySize()<1000000){unit=" kB";faktor=1000;prec=1;} - else{unit=" MB";faktor=1000000;prec=1;} - Label_AttachmentSize->setText(QString::number((float)entry->binarySize()/(float)faktor,'f',prec)+unit); - } + else + Label_AttachmentSize->setText(entry->friendlySize()); + if(entry->expire()==Date_Never){ DateTime_Expire->setDisabled(true); CheckBox_ExpiresNever->setChecked(true); @@ -344,36 +337,7 @@ void CEditEntryDlg::OnNewAttachment() QFileInfo info(filename); entry->setBinaryDesc(info.fileName()); Edit_Attachment->setText(entry->binaryDesc()); - QString unit; - uint faktor; - int prec; - if (entry->binarySize() < 1024) - { - unit = tr("Bytes"); - faktor = 1; - prec = 0; - } - else - { - if (entry->binarySize() < pow(2,20)) - { - unit = tr("kiB"); - faktor = 1024; - } - else - if (entry->binarySize() < pow(2,30)) - { - unit = tr("MiB"); - faktor = pow(2,20); - } - else - { - unit = tr("GiB"); - faktor = pow(2,30); - } - prec = 1; - } - Label_AttachmentSize->setText(QString::number((float)entry->binarySize()/(float)faktor,'f',prec) + " " + unit); + Label_AttachmentSize->setText(entry->friendlySize()); ButtonOpenAttachment->setEnabled(true); ButtonSaveAttachment->setEnabled(true); ButtonDeleteAttachment->setEnabled(true); diff --git a/src/dialogs/ManageBookmarksDlg.cpp b/src/dialogs/ManageBookmarksDlg.cpp index c1045b0..d132371 100644 --- a/src/dialogs/ManageBookmarksDlg.cpp +++ b/src/dialogs/ManageBookmarksDlg.cpp @@ -18,7 +18,7 @@ ***************************************************************************/ #include -#include "main.h" +#include #include "ManageBookmarksDlg.h" #include "lib/bookmarks.h" #include "dialogs/AddBookmarkDlg.h" @@ -26,24 +26,65 @@ ManageBookmarksDlg::ManageBookmarksDlg(QWidget* parent):QDialog(parent) { setupUi(this); + createBanner(&BannerPixmap,getPixmap("bookmark"),tr("Manage Bookmarks"),width()); + for(int i=0;isetData(Qt::UserRole,i); - item->setText(KpxBookmarks::title(i)); + item->setText(KpxBookmarks::title(i)); } - connect(Button_Up,SIGNAL(clicked()),this,SLOT(OnButtonUp())); + connect(Button_Add,SIGNAL(clicked()),this,SLOT(OnButtonAdd())); + connect(Button_Edit,SIGNAL(clicked()),this,SLOT(OnButtonEdit())); + connect(Button_Delete,SIGNAL(clicked()),this,SLOT(OnButtonDelete())); + connect(Button_Up,SIGNAL(clicked()),this,SLOT(OnButtonUp())); connect(Button_Down,SIGNAL(clicked()),this,SLOT(OnButtonDown())); - connect(Button_Delete,SIGNAL(clicked()),this,SLOT(OnButtonDelete())); - connect(Button_Add,SIGNAL(clicked()),this,SLOT(OnButtonAdd())); - connect(Button_Edit,SIGNAL(clicked()),this,SLOT(OnButtonEdit())); connect(ListWidget,SIGNAL(itemDoubleClicked(QListWidgetItem*)),this,SLOT(edit(QListWidgetItem*))); connect(buttonBox->button(QDialogButtonBox::Close),SIGNAL(clicked()),this,SLOT(close())); - - Button_Up->setIcon(getIcon("up")); - Button_Down->setIcon(getIcon("down")); - Button_Delete->setIcon(getIcon("delete")); + + Button_Add->setIcon(getIcon("bookmark_add")); Button_Edit->setIcon(getIcon("bookmark_edit")); - Button_Add->setIcon(getIcon("bookmark_add")); + Button_Delete->setIcon(getIcon("bookmark_del")); + Button_Up->setIcon(getIcon("up")); + Button_Down->setIcon(getIcon("down")); +} + +void ManageBookmarksDlg::paintEvent(QPaintEvent *event){ + QDialog::paintEvent(event); + QPainter painter(this); + painter.setClipRegion(event->region()); + painter.drawPixmap(QPoint(0,0),BannerPixmap); +} + + + +void ManageBookmarksDlg::OnButtonAdd(){ + AddBookmarkDlg dlg(this); + if(dlg.exec()){ + int i=dlg.ItemID; + QListWidgetItem* item=new QListWidgetItem(ListWidget); + item->setData(Qt::UserRole,i); + item->setText(KpxBookmarks::title(i)); + } + return; +} + +void ManageBookmarksDlg::OnButtonEdit(){ + QListWidgetItem* item=ListWidget->currentItem(); + if(!item)return; + edit(item); +} + +void ManageBookmarksDlg::OnButtonDelete(){ + QListWidgetItem* item=ListWidget->currentItem(); + if(!item)return; + int index=item->data(Qt::UserRole).toInt(); + KpxBookmarks::remove(index); + delete item; + for(int i=0;icount();i++){ + int itemindex=ListWidget->item(i)->data(Qt::UserRole).toInt(); + if(itemindex>index) + ListWidget->item(i)->setData(Qt::UserRole,itemindex-1); + } } @@ -66,44 +107,17 @@ void ManageBookmarksDlg::OnButtonDown(){ ListWidget->insertItem(row,item); ListWidget->setCurrentRow(row); } - -void ManageBookmarksDlg::OnButtonDelete(){ - QListWidgetItem* item=ListWidget->currentItem(); - if(!item)return; - int index=item->data(Qt::UserRole).toInt(); - KpxBookmarks::remove(index); - delete item; - for(int i=0;icount();i++){ - int itemindex=ListWidget->item(i)->data(Qt::UserRole).toInt(); - if(itemindex>index) - ListWidget->item(i)->setData(Qt::UserRole,itemindex-1); - } -} -void ManageBookmarksDlg::OnButtonEdit(){ - QListWidgetItem* item=ListWidget->currentItem(); - if(!item)return; - edit(item); -} + void ManageBookmarksDlg::edit(QListWidgetItem* item){ int i=item->data(Qt::UserRole).toInt(); AddBookmarkDlg dlg(this,QString(),i); - dlg.exec(); - item->setText(KpxBookmarks::title(i)); + dlg.exec(); + item->setText(KpxBookmarks::title(i)); } -void ManageBookmarksDlg::OnButtonAdd(){ - AddBookmarkDlg dlg(this); - if(dlg.exec()){ - int i=dlg.ItemID; - QListWidgetItem* item=new QListWidgetItem(ListWidget); - item->setData(Qt::UserRole,i); - item->setText(KpxBookmarks::title(i)); - } - return; -} void ManageBookmarksDlg::closeEvent(QCloseEvent * event){ QList Order; @@ -112,6 +126,6 @@ void ManageBookmarksDlg::closeEvent(QCloseEvent * event){ for(int i=0;iitem(i)->data(Qt::UserRole).toInt(); } - KpxBookmarks::resort(Order); + KpxBookmarks::resort(Order); event->accept(); } \ No newline at end of file diff --git a/src/dialogs/ManageBookmarksDlg.h b/src/dialogs/ManageBookmarksDlg.h index 4501a5c..25ac7ce 100644 --- a/src/dialogs/ManageBookmarksDlg.h +++ b/src/dialogs/ManageBookmarksDlg.h @@ -22,21 +22,26 @@ #include #include +#include #include "ui_ManageBookmarksDlg.h" +#include "main.h" + class ManageBookmarksDlg : public QDialog, private Ui::ManageBookmarksDlg { Q_OBJECT public: ManageBookmarksDlg(QWidget* parent=0); private: + QPixmap BannerPixmap; + virtual void paintEvent(QPaintEvent*); virtual void closeEvent(QCloseEvent* event); private slots: - void OnButtonUp(); + void OnButtonAdd(); + void OnButtonEdit(); + void OnButtonDelete(); + void OnButtonUp(); void OnButtonDown(); - void OnButtonDelete(); - void OnButtonAdd(); - void OnButtonEdit(); void edit(QListWidgetItem*); }; diff --git a/src/forms/AboutDlg.ui b/src/forms/AboutDlg.ui index 2883a64..3bc6bf6 100644 --- a/src/forms/AboutDlg.ui +++ b/src/forms/AboutDlg.ui @@ -88,11 +88,49 @@ 9 - - - <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> - - + + + + + + 0 + 0 + + + + + 12 + 75 + true + + + + AppName + + + + + + + + 0 + 0 + + + + + 9 + + + + AppFunc + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + diff --git a/src/forms/AddBookmarkDlg.ui b/src/forms/AddBookmarkDlg.ui index e2897f6..7bc7594 100644 --- a/src/forms/AddBookmarkDlg.ui +++ b/src/forms/AddBookmarkDlg.ui @@ -1,18 +1,53 @@ + Tarek Saidi AddBookmarkDlg 0 0 - 497 - 148 + 500 + 180 + + + 0 + 0 + + + + + 500 + 180 + + + + + 500 + 180 + + Add Bookmark + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 50 + + + + @@ -44,6 +79,13 @@ + + + + Qt::Horizontal + + + @@ -53,6 +95,7 @@ + diff --git a/src/forms/MainWindow.ui b/src/forms/MainWindow.ui index 9871057..4b9c64c 100644 --- a/src/forms/MainWindow.ui +++ b/src/forms/MainWindow.ui @@ -285,7 +285,7 @@ - E&xit + Q&uit diff --git a/src/forms/ManageBookmarksDlg.ui b/src/forms/ManageBookmarksDlg.ui index fa81c67..1c45508 100644 --- a/src/forms/ManageBookmarksDlg.ui +++ b/src/forms/ManageBookmarksDlg.ui @@ -5,14 +5,36 @@ 0 0 - 452 + 280 360 + + + 280 + 300 + + Manage Bookmarks + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 50 + + + + @@ -21,19 +43,70 @@ - + + + + 16 + 16 + + + - + + + + 16 + 16 + + + - + + + + 16 + 16 + + + - + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + - + + + + 16 + 16 + + + + + + + + + 16 + 16 + + + diff --git a/src/main.cpp b/src/main.cpp index 3be4dcd..ff2dd5c 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -93,9 +93,9 @@ void test_getAllWindowTitles(){ qDebug("%i %i: %s",i,p,XGetAtomName(pDisplay,atom[p])); } XFree(atom); - + } - #endif + #endif } int main(int argc, char **_argv) @@ -138,12 +138,12 @@ int main(int argc, char **_argv) qWarning("Could not load desktop integration plugin:"); qWarning(CSTR(PluginLoadError)); } - else{ + else{ QObject *plugininstance=plugin.instance(); IFileDialog* fdlg=qobject_cast(plugininstance); IconLoader=qobject_cast(plugininstance); if(IconLoader==NULL){ - qWarning("Error: Integration Plugin: Could not initialize IconTheme interface."); + qWarning("Error: Integration Plugin: Could not initialize IconTheme interface."); } KpxFileDialogs::setPlugin(fdlg); if(config->integrPlugin()==KpxConfig::KDE){ @@ -365,7 +365,7 @@ const QIcon& getIcon(const QString& name){ NewIcon=new QIcon(IconLoader->getIcon(name)); if(NewIcon->isNull()){ delete NewIcon; - NewIcon=NULL; + NewIcon=NULL; } else IconCache.insert(name,NewIcon); @@ -379,7 +379,7 @@ const QIcon& getIcon(const QString& name){ } NewIcon=new QIcon(AppDir+"/../share/keepass/icons/"+name+".png"); IconCache.insert(name,NewIcon); - } + } return *NewIcon; } @@ -423,7 +423,7 @@ int i=1; i++; } for(i; i Use specified file for loading/saving the configuration." << endl; @@ -485,7 +485,7 @@ QString makePathRelative(const QString& AbsDir,const QString& CurDir){ QString applicationDirPath(){ QString filepath=applicationFilePath(); - filepath.truncate(filepath.lastIndexOf("/")); + filepath.truncate(filepath.lastIndexOf("/")); return filepath; } diff --git a/src/main.h b/src/main.h index b66d943..8475a51 100644 --- a/src/main.h +++ b/src/main.h @@ -16,7 +16,7 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ - + #ifndef _MAIN_H_ #define _MAIN_H_ @@ -27,9 +27,14 @@ #include #include -#define APP_NAME "KeePassX" -#define APP_FUNC "Password Manager" -#define KEEPASS_VERSION "0.2.3" +#define APP_DISPLAY_NAME "KeePassX" +#define APP_CODE_NAME "keepassx" + +#define APP_SHORT_FUNC "Password Manager" +#define APP_LONG_FUNC "Cross Platform Password Manager" + +#define APP_VERSION "0.2.3" + #define BUILTIN_ICONS 65 typedef enum tKeyType {PASSWORD=0,KEYFILE=1,BOTH=2}; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4e299e6..d94a3a6 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -115,7 +115,7 @@ KeepassMainWindow::KeepassMainWindow(const QString& ArgFile,QWidget *parent, Qt: } HelpBrowser = new QAssistantClient(QString(),this); HelpBrowser->setArguments(QStringList()<< "-profile" << "/home/tarek/Documents/KeePassX/share/keepass/doc/keepassx.adp"); - + createBookmarkActions(); } @@ -240,9 +240,9 @@ void KeepassMainWindow::setupIcons(){ HelpHandbookAction->setIcon(getIcon("manual")); HelpAboutAction->setIcon(getIcon("help")); menuBookmarks->menuAction()->setIcon(getIcon("bookmark_folder")); - AddThisAsBookmarkAction->setIcon(getIcon("bookmark")); + AddThisAsBookmarkAction->setIcon(getIcon("bookmark_this")); AddBookmarkAction->setIcon(getIcon("bookmark_add")); - ManageBookmarksAction->setIcon(getIcon("bookmark_edit")); + ManageBookmarksAction->setIcon(getIcon("bookmark")); SysTray->setIcon(getIcon("keepassx_large")); if(config->showSysTrayIcon()) SysTray->show(); @@ -294,12 +294,12 @@ void KeepassMainWindow::setupMenus(){ case 28: ViewToolButtonSize28Action->setChecked(true); break; } - SysTrayMenu = new QMenu(tr("KeePassX"),this); + SysTrayMenu = new QMenu(tr(APP_DISPLAY_NAME),this); SysTrayMenu->addAction(FileUnLockWorkspaceAction); SysTrayMenu->addSeparator(); SysTrayMenu->addAction(FileExitAction); SysTray->setContextMenu(SysTrayMenu); - SysTray->setToolTip(tr("%1 %2").arg(APP_NAME, APP_FUNC) + " - " + tr((IsLocked) ? "Locked" : "Unlocked")); + SysTray->setToolTip(tr("%1 %2").arg(APP_DISPLAY_NAME, APP_SHORT_FUNC) + " - " + tr((IsLocked) ? "Locked" : "Unlocked")); #define _add_import(name){\ QAction* import=new QAction(this);\ @@ -323,7 +323,7 @@ void KeepassMainWindow::setupMenus(){ FileOpenAction->setShortcut(tr("Ctrl+O")); FileSaveAction->setShortcut(tr("Ctrl+S")); FileUnLockWorkspaceAction->setShortcut(tr("Ctrl+L")); - FileExitAction->setShortcut(tr("Ctrl+X")); + FileExitAction->setShortcut(tr("Ctrl+Q")); EditNewGroupAction->setShortcut(tr("Ctrl+G")); EditPasswordToClipboardAction->setShortcut(tr("Ctrl+C")); EditUsernameToClipboardAction->setShortcut(tr("Ctrl+B")); @@ -1011,7 +1011,7 @@ void KeepassMainWindow::OnUnLockWorkspace(){ setCentralWidget(NormalCentralWidget); NormalCentralWidget->setVisible(true); SysTray->setIcon(getIcon("keepassx_large")); - SysTray->setToolTip(tr("%1 %2").arg(APP_NAME, APP_FUNC) + " - " + tr("Unlocked")); + SysTray->setToolTip(tr("%1 %2").arg(APP_DISPLAY_NAME, APP_SHORT_FUNC) + " - " + tr("Unlocked")); FileUnLockWorkspaceAction->setText(tr("&Lock Workspace")); IsLocked=false; } else { @@ -1020,7 +1020,7 @@ void KeepassMainWindow::OnUnLockWorkspace(){ setCentralWidget(LockedCentralWidget); LockedCentralWidget->setVisible(true); SysTray->setIcon(getIcon("keepassx_locked")); - SysTray->setToolTip(tr("%1 %2").arg(APP_NAME, APP_FUNC) + " - " + tr("Locked")); + SysTray->setToolTip(tr("%1 %2").arg(APP_DISPLAY_NAME, APP_SHORT_FUNC) + " - " + tr("Locked")); FileUnLockWorkspaceAction->setText(tr("Un&lock Workspace")); IsLocked=true; } @@ -1030,38 +1030,38 @@ void KeepassMainWindow::OnBookmarkTriggered(QAction* action){ if(action==AddBookmarkAction){ AddBookmarkDlg dlg(this); if(dlg.exec()){ - int id=dlg.ItemID; + int id=dlg.ItemID; QAction* action=new QAction(this); action->setData(id); action->setText(KpxBookmarks::title(id)); action->setIcon(getIcon("document")); - menuBookmarks->addAction(action); + menuBookmarks->addAction(action); } return; } - + if(action==ManageBookmarksAction){ ManageBookmarksDlg dlg(this); dlg.exec(); menuBookmarks->clear(); createBookmarkActions(); - return; + return; } - + if(action==AddThisAsBookmarkAction){ AddBookmarkDlg dlg(this,db->file()->fileName()); if(dlg.exec()){ - int id=dlg.ItemID; + int id=dlg.ItemID; QAction* action=new QAction(this); action->setData(id); action->setText(KpxBookmarks::title(id)); action->setIcon(getIcon("document")); - menuBookmarks->addAction(action); - } + menuBookmarks->addAction(action); + } return; - } + } openDatabase(KpxBookmarks::path(action->data().toInt())); - + } void KeepassMainWindow::createBookmarkActions(){ @@ -1074,6 +1074,6 @@ void KeepassMainWindow::createBookmarkActions(){ action->setData(i); action->setText(KpxBookmarks::title(i)); action->setIcon(getIcon("document")); - menuBookmarks->addAction(action); - } + menuBookmarks->addAction(action); + } }