From 57416c61d2da6d2b0d70d310ed4adbe1b31386b5 Mon Sep 17 00:00:00 2001 From: myxelf Date: Sun, 15 Jul 2007 16:50:44 +0000 Subject: [PATCH] lot of changes git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@140 b624d157-de02-0410-bad0-e51aec6abb33 --- share/keepass/icons/exit.png | Bin 2446 -> 2111 bytes share/keepass/icons/keepassx.png | Bin 898 -> 2685 bytes share/keepass/icons/keepassx_locked.png | Bin 0 -> 2549 bytes share/keepass/icons/lock.png | Bin 0 -> 1631 bytes share/keepass/icons/pwd_hide.png | Bin 0 -> 754 bytes share/keepass/icons/pwd_show.png | Bin 0 -> 818 bytes src/dialogs/EditEntryDlg.cpp | 94 +++++++++++++++++------- src/dialogs/EditEntryDlg.h | 6 +- src/dialogs/ExpiredEntriesDlg.cpp | 10 +-- src/forms/EditEntryDlg.ui | 88 ++++++++++++++++++---- src/forms/MainWindow.ui | 26 +++---- src/main.h | 2 + src/mainwindow.cpp | 82 ++++++++++++--------- src/mainwindow.h | 2 +- src/res/default-detailview-classic.html | 5 ++ src/res/default-detailview.html | 67 +++++++++++++++-- 16 files changed, 281 insertions(+), 101 deletions(-) create mode 100644 share/keepass/icons/keepassx_locked.png create mode 100755 share/keepass/icons/lock.png create mode 100755 share/keepass/icons/pwd_hide.png create mode 100644 share/keepass/icons/pwd_show.png create mode 100644 src/res/default-detailview-classic.html diff --git a/share/keepass/icons/exit.png b/share/keepass/icons/exit.png index 08e97b40571c7d2b96a4e23862dad1e797f87c95..609d4d8ab7ae19b82dc82b7e121b3947de0314c2 100644 GIT binary patch delta 2091 zcmV+`2-NqE6Tc9UD}UJp+_KsN000N}Nkl=BwXSHQUV7+M8ubHFbFOX5@Zua76v46aAbub zurdB^N){NefM|0o6q zs7+2{;~1FiR#Tb!IkDTQhh)-15-15p^Fl%nK$g|KD-LQ2ShAOyx3de*ID;_O-fu16l( zG7V=Wzz?g{yxmDVZ#u#hA@OML}V>dgn!T)Uu)$0^_Xj~M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>EO~cqQq4F7^+dw=ApwEg6MPY+C$nxG(T=rAf2ux)#Nvngir+3*@|-iY+?t10cM_gD_%;jt?lp+MtXwv zl0y&xOpoU*GhJXJLerL@8r>E;0m6!R4^1YbaHwfYC|IiL%f%GBiTOnz#7W@lm~)iM0@op>&p zX8>s2RHH^euRlXX&1HZPB+;v`kr+&y!+Y=Ed3Jp&3*ZB09-FxSV&%~O(Rl8;$pA2` z+2a6ER~{jgFdmKeJ)I;0@#ISCNOscruCy1aB=IN_t-k!jFzo?-ai!l#7Aye8^78-B kJC}em0IB5Wnb`t>mvciX?Q`laPXGV_07*qoM6N<$g5RU3(f|Me diff --git a/share/keepass/icons/keepassx_locked.png b/share/keepass/icons/keepassx_locked.png new file mode 100644 index 0000000000000000000000000000000000000000..c06e3500d8e6b70cadb100a727aa61f267ed11b3 GIT binary patch literal 2549 zcmVKL)#n+wAgJ*Y!RdyEp98?bX!*KGW|nSo7THl zTWqQRL7LcYCZ@QGOV_QY+RWIdX&h45g4Y6v6|gX?Kt%*OaBgxqzw5g{fHQEqb;^8&vD4g>y-j0_EE1dak5feHK{E!XXKcWl|RMUgvR)Q>R2{XQvpp z&p!K1}QQ zs^$Y<-v@m1`0?XgDl0496DLmO;K74vnua7v2q8v&sA(EAX3Svg)~z%)HnL*H3bV7b z^GCoL07aJNeeb{jzEoIP$m5Sc&Z0$&Sh{p6si~>%ix)5cA|8)_31y_2xM6{ z4;?zh+i$;3PEL-vbm!rK98-TfU=K?$gxMjdpRh1=6 zmN0A9EFzHz{r&x1zkZ#)d-q~l7CU$DWc&8*>9Q<;0X*sR`2Yxq!$hOeQEr+h@4ffl z*yG2KhtHosuWj78QMz;I4tMX~B@&4Ys+QLaFb!}kz?yJ4oW6SXY6=PpXlQ647z|>! z+lfY_)YsQjP*A{nar6phm$8ya^=dE3&0fx__V31>Dgc~=w7*UCHeXJ`2Bu@ z!633M6AT7vY-}VyKYy46Yu2p6=kxK^S6|W9)rDnQ3AfoiOqr6&vSmNvsi%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Ac!{O;eC)|6jX(-*d{{4lcDS3`ynEx43>pu2(I?HF)R@nR+tQ6%mdc&0PyYoUaVg< zZI##U*y*sDX$XN3LNZOuA%-Phj5@KP$dWEgk|_j4Rk|*<1&{p$m9^W3uyL?400000 LNkvXXu0mjf@<7iN literal 0 HcmV?d00001 diff --git a/share/keepass/icons/lock.png b/share/keepass/icons/lock.png new file mode 100755 index 0000000000000000000000000000000000000000..4f301704ca5b3dc82dd98892561db614d2af5ff8 GIT binary patch literal 1631 zcmV-l2B7(gP)BEX7;H}lV`aeMA%^e}kH|Kgpae5Y zf&!5c4iXXqi7l)^EG$;A&xRFXA+g{g0TL)1%M2)(;Mi7duskOAJp35XqX&DYr~BSp z#iHuozCF_hWOJmWx_#@^ssH@v)VbBdDyc!=ox|0;E49A91Z?N5UTqFKecNR&v(d7$ zaH0O?xAR{uLOnkv`5%88E72CZkoG94 zDq2g6@u9I#|NF`-ukHEp==qP<0QmE^(&KwyeQ9syH}?wlS%_QCsd$IpkyFY2Uj2Uc z=${KE*mynhr5XFgqmMlC&gbKAX8_8u`M{oChi~2fw*l%imvOl2nKbfzv_G;20W1vO z$n^Bd*^vhy8<}fxMgi;?V)T~HLj%m8hd6T4uhFPICh^(~ngo&-B;GDbZT)B>XEXT? zgBu10c8uIG3J?JF2W*wuDX4CC#+Qv;K@bux&hh>HSz4`SKq!v#42B50XsKIYyN`D002Z67brBB!I<2F8~_!tFgs3s=PrhK?(RH3fc?YM zoZI&n3*YQ#{l;OiwtFB-h!$swn-OgQ3X*06noFIF(j%u8$#NZY^A0xc-0gO3F2TiF zM{n-{QtV;V1G|}vS4hqrN0+PZI?1!B1LE1K40z!8$Hoyf8xVv(S80VSFoFpKs`vcG zt(u>LeXqmvqO)1I9(Fzj>j$acHH!K81Ugyqo~5lp0p_ML|J(0cg|~1Nip82H*i>6! zBR9qkf?7Xe?*?alVhk2egCtJt6EOY-0AcMKf?7Ys4Y$^KwGl)O`1iZmdOZV>r2q}q zv=HlS2n{xI5!x70wtec71}F=}o?-*ZN=BjMC6S_2^*`4^lW#}?YP6J%)$1xwV< zn@!rt0s|70eHt{NW6+6nZW0g3i%LKnAoBSS;P^h6_z(01(6Y`Zs{!QzU|VefesdEy zn3+C>ZNMh$rsij+xpd+fQY-_4ZLLu0yOCc3Sj*W{-y#>rxn|2vsGtZZzksR3P%c7j z5o>>ovuy>B+8s138)xdDtF)LXNd0Ug;EHiasXl%m@>Na6etBM z1QE|b*100E@sDir6QV2>6a>mWE9*M6wOIpj3}{fHpdS0}MR&g_ zmLM_?wGlTLR!C$nhR6Xp@LhDQsjC!=#?cmN55$Ae2J8Y^apnQw0btvsF`iq$dHRW0 z2^5PgOCJYMjUNMF8b>A=dvo8!L9V+E$`#iSbWQ{7YNQ}g^jeV4cjZ@)J-{>(p5zi_F=$3T=PvKQDsdbj-jq3v64uT^{28LV}T=Za|6bvR``Rhu?W zV=xw1^oT5ezr6Ix*y%$b9k%ZPp8*%UxT6Sc1U3U#{u%5p4d4uL4%hLz#gmC9cVYd7 d!~koW$`5dgT6L|&>?!~N002ovPDHLkV1j*j@aO;l literal 0 HcmV?d00001 diff --git a/share/keepass/icons/pwd_hide.png b/share/keepass/icons/pwd_hide.png new file mode 100755 index 0000000000000000000000000000000000000000..103fe9ec4d925899c663a544613fa8d8307f733d GIT binary patch literal 754 zcmV@?fCAtKJ;Oj|W@e^p+jjMj4GhDG0N;Rn z;QXUfP@f9o%rwoyM}m2v^j^?)eJD@`C|Q=}cKEXbTz8U$48s^QP1DtNy-x_ST&-3U zzV9Q1AR3L*+uQ4Pb#>X6Wfg*LmVqDd=7s`Q?e+C_xmYZ+wzkIl`Z~wQ#}tc2E-x?f zeV>t$ky1Du{@&Bm127*L+mLl#kJoCoFS0Dlo12>~E-sSEWO#ghWO8zn>FH^b$s`vS z7YRjCM&I7v3fL4HAh2u~>}L(^GbLcgg4T93CDLi^WhBg=jR&_V#usi3ijr z;5whrKhU2QU6*V&i|_krnnt_bCKL*xsw(k#oUN@b8jVI@v)P7JZ#%0m&+B(W_pOaK4? literal 0 HcmV?d00001 diff --git a/share/keepass/icons/pwd_show.png b/share/keepass/icons/pwd_show.png new file mode 100644 index 0000000000000000000000000000000000000000..d84e9b913fcb0b46d1d12d0648ae99669f98e5cd GIT binary patch literal 818 zcmV-21I_%2P)Vrt(1F~cSvLOHg1Tw%LC~y#{QUA}MKN~)L_@MCR%NGV9n}Lgqi$O?8 z=m7@@M+4BHg;3XQfVu=6xBvmf2({J!+qZ8UZa;j%VBwq0;OQ60P`u_T1M{nk3`}>n zGKl?o%pff-eSnpfH9$~M5Ts=RG)z7M1Q0V&v;5buUw1GwGjq6?E@JR@v1jnt=VLhg z_!k4aq7}mzd2a?*Q4NN#mp3S|u&{Xi`}c1FCnqP^6=%<$JqQp$Odykh&J~z9Zytk` z5Fdkyy zFqD*(F!1v7GW=oq&yc-^fnnx?g8vwJcz75lPMpZ_>(?)X z-@kt^00llk05M;?cI~Hxgv5%QH*b14TA4_E{>8}fgh_=#*~*te%qoH5<{JhEb^h-R zK5G9N{{H<7ash*eh6cm-?b|iX&CNdm1Q0XG3m`)dA3i+u^XJbDzQz&`9Q>jT$DXh; z+<)_nK~LltLz@Q&1H<26;HU**K0ZE%d-v`!ynFZV1V8{Wq9;vItT;G0H0bH+1(=wa z2mnK!;pfkvV2z(XePXz9;R3^vBS#iIefo3(D3JjK5F@^v1`H_s|Ns9R+_-T=VCT-A wAAl~s02ICe)c6sm1|WbKfeIKX0RRC80IEzT04Q!|4FCWD07*qoM6N<$g8S1?G5`Po literal 0 HcmV?d00001 diff --git a/src/dialogs/EditEntryDlg.cpp b/src/dialogs/EditEntryDlg.cpp index e9ff5b0..721b482 100755 --- a/src/dialogs/EditEntryDlg.cpp +++ b/src/dialogs/EditEntryDlg.cpp @@ -55,6 +55,8 @@ CEditEntryDlg::CEditEntryDlg(IDatabase* _db, IEntryHandle* _entry,QWidget* paren setupUi(this); ModFlag=false; QMenu *ExpirePresetsMenu=new QMenu(); + + connect(Edit_Title, SIGNAL(textChanged(const QString&)), this, SLOT( OnTitleTextChanged(const QString&))); connect(Edit_Password_w, SIGNAL(editingFinished()), this, SLOT(OnPasswordwLostFocus())); connect(Edit_Password_w, SIGNAL(textChanged(const QString&)), this, SLOT( OnPasswordwTextChanged(const QString&))); connect(Edit_Password, SIGNAL(textChanged(const QString&)), this, SLOT( OnPasswordTextChanged(const QString&))); @@ -66,7 +68,7 @@ CEditEntryDlg::CEditEntryDlg(IDatabase* _db, IEntryHandle* _entry,QWidget* paren connect(ButtonGenPw, SIGNAL(clicked()), this, SLOT( OnButtonGenPw())); connect(buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()),this,SLOT(OnButtonOK())); connect(CheckBox_ExpiresNever,SIGNAL(stateChanged(int)),this,SLOT(OnCheckBoxExpiresNeverChanged(int))); - connect(Button_CustomIcons,SIGNAL(clicked()),this,SLOT(OnCustomIcons())); + connect(Button_Icons,SIGNAL(clicked()),this,SLOT(OnButtonIcons())); connect(ExpirePresetsMenu,SIGNAL(triggered(QAction*)),this,SLOT(OnExpirePreset(QAction*))); connect(ButtonExpirePresets,SIGNAL(triggered(QAction*)),this,SLOT(OnCalendar(QAction*))); @@ -78,21 +80,23 @@ CEditEntryDlg::CEditEntryDlg(IDatabase* _db, IEntryHandle* _entry,QWidget* paren ExpirePresetsMenu->addAction(tr("3 Weeks"))->setData(21); ExpirePresetsMenu->addSeparator(); ExpirePresetsMenu->addAction(tr("1 Month"))->setData(30); - ExpirePresetsMenu->addAction(tr("3 Months"))->setData(60); + ExpirePresetsMenu->addAction(tr("3 Months"))->setData(90); ExpirePresetsMenu->addAction(tr("6 Months"))->setData(180); ExpirePresetsMenu->addSeparator(); ExpirePresetsMenu->addAction(tr("1 Year"))->setData(365); ButtonExpirePresets->setMenu(ExpirePresetsMenu); ButtonExpirePresets->setDefaultAction(new QAction(tr("Calendar..."),ButtonExpirePresets)); + IconIndex = entry->image(); + Button_Icons->setIcon(db->icon(IconIndex)); + ButtonOpenAttachment->setIcon(getIcon("fileopen")); ButtonDeleteAttachment->setIcon(getIcon("filedelete")); ButtonSaveAttachment->setIcon(getIcon("filesave")); ButtonExpirePresets->setIcon(getIcon("clock")); - - setWindowTitle(entry->title()); - setWindowIcon(db->icon(entry->image())); + OnTitleTextChanged(entry->title()); + setWindowIcon(db->icon(IconIndex)); Edit_Title->setText(entry->title()); Edit_UserName->setText(entry->username()); Edit_URL->setText(entry->url()); @@ -103,7 +107,11 @@ CEditEntryDlg::CEditEntryDlg(IDatabase* _db, IEntryHandle* _entry,QWidget* paren Password.lock(); if(!config->showPasswords()) ChangeEchoMode(); - OnPasswordwLostFocus(); + else + ButtonEchoMode->setIcon(getIcon("pwd_show")); + + // MX-COMMENT: This call is not needed. Both Passwords fields will always have the same value + OnPasswordwLostFocus(); int bits=(Password.length()*8); Label_Bits->setText(tr("%1 Bit").arg(QString::number(bits))); if(bits>128) @@ -112,7 +120,10 @@ CEditEntryDlg::CEditEntryDlg(IDatabase* _db, IEntryHandle* _entry,QWidget* paren Edit_Attachment->setText(entry->binaryDesc()); Edit_Comment->setPlainText(entry->comment()); InitGroupComboBox(); + +/* MX-TO-DO: After approval, remove this invokation InitIconComboBox(); +*/ if(!entry->binarySize()){ ButtonSaveAttachment->setDisabled(true); @@ -154,7 +165,7 @@ if(event->spontaneous()==false){ } void CEditEntryDlg::resizeEvent(QResizeEvent *event){ - createBanner(&BannerPixmap,getPixmap("keepassx_large"),tr("Test 2"),width()); + createBanner(&BannerPixmap,getPixmap("keepassx_large"),tr("Edit Entry"),width()); QDialog::resizeEvent(event); } @@ -167,19 +178,21 @@ void CEditEntryDlg::paintEvent(QPaintEvent *event){ painter.drawPixmap(QPoint(0,0),BannerPixmap); } +/* MX-TO-DO: After approval, remove this implementation + void CEditEntryDlg::InitIconComboBox(){ for(int i=0;inumIcons();i++){ Combo_IconPicker->insertItem(i,db->icon(i),""); } Combo_IconPicker->setCurrentIndex(entry->image()); } - +*/ void CEditEntryDlg::InitGroupComboBox(){ QString Space; groups=db->sortedGroups(); for(int i=0;ilevel()); + Space.fill(' ', 2 * (groups[i]->level() - 1)); Combo_Group->insertItem(i,db->icon(groups[i]->image()),Space+groups[i]->title()); if(groups[i]==entry->group()){ Combo_Group->setCurrentIndex(i); @@ -217,7 +230,7 @@ void CEditEntryDlg::OnButtonOK() ModFlag=true; pw.lock(); password.fill('X'); - if(entry->image()!=Combo_IconPicker->currentIndex()) + if(entry->image()!=IconIndex) ModFlag=true; if(ModFlag){ @@ -237,7 +250,8 @@ void CEditEntryDlg::OnButtonOK() db->moveEntry(entry,groups[Combo_Group->currentIndex()]); EntryMoved=true; ModFlag=true; } - entry->setImage(Combo_IconPicker->currentIndex()); + // MX-COMMENT: Should not this line go inside the if(Modflag) block? + entry->setImage(IconIndex); if(ModFlag&&EntryMoved)done(2); else if(ModFlag)done(1); @@ -256,16 +270,23 @@ void CEditEntryDlg::ChangeEchoMode() if(Edit_Password->echoMode()==QLineEdit::Normal){ Edit_Password->setEchoMode(QLineEdit::Password); Edit_Password_w->setEchoMode(QLineEdit::Password); +ButtonEchoMode->setIcon(getIcon("pwd_hide")); } else { Edit_Password->setEchoMode(QLineEdit::Normal); Edit_Password_w->setEchoMode(QLineEdit::Normal); +ButtonEchoMode->setIcon(getIcon("pwd_show")); } } +void CEditEntryDlg::OnTitleTextChanged(const QString& txt) +{ + setWindowTitle((txt=="") ? tr("[Untitled Entry]") : txt); +} + void CEditEntryDlg::OnPasswordTextChanged(const QString& txt) { Edit_Password_w->setText(QString()); @@ -279,7 +300,7 @@ void CEditEntryDlg::OnPasswordwTextChanged(const QString& w) { if(QString::compare(Edit_Password_w->text(),Edit_Password->text().mid(0,(Edit_Password_w->text().length())))!=0){ - QPalette palette; + QPalette palette; palette.setColor(Edit_Password_w->backgroundRole(),QColor(255,125,125)); Edit_Password_w->setPalette(palette); }else @@ -323,13 +344,35 @@ void CEditEntryDlg::OnNewAttachment() entry->setBinaryDesc(info.fileName()); Edit_Attachment->setText(entry->binaryDesc()); QString unit; - int faktor; + uint 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); + if (entry->binarySize() < 1024) + { + unit = "Bytes"; + faktor = 1; + prec = 0; + } + else + { + if (entry->binarySize() < 1048576) + { + unit = "kB"; + faktor = 1024; + } + else + if (entry->binarySize() < 1073741824) + { + unit = "MB"; + faktor = 1048576; + } + else + { + unit = "GB"; + faktor = 1073741824; + } + prec = 1; + } + Label_AttachmentSize->setText(QString::number((float)entry->binarySize()/(float)faktor,'f',prec) + " " + unit); ButtonOpenAttachment->setEnabled(true); ButtonSaveAttachment->setEnabled(true); ButtonDeleteAttachment->setEnabled(true); @@ -404,14 +447,15 @@ void CEditEntryDlg::OnCheckBoxExpiresNeverChanged(int state){ DateTime_Expire->setDisabled(true); } -void CEditEntryDlg::OnCustomIcons(){ - CSelectIconDlg dlg(db,Combo_IconPicker->currentIndex(),this); +void CEditEntryDlg::OnButtonIcons(){ + // CSelectIconDlg dlg(db,Combo_IconPicker->currentIndex(),this); + CSelectIconDlg dlg(db, IconIndex, this); int r=dlg.exec(); - if(r!=-1){ - Combo_IconPicker->clear(); - for(int i=0;inumIcons();i++) - Combo_IconPicker->insertItem(i,db->icon(i),""); - Combo_IconPicker->setCurrentIndex(r); + if (r!=-1) + { + IconIndex=r; + Button_Icons->setIcon(db->icon(IconIndex)); + setWindowIcon(db->icon(IconIndex)); } } diff --git a/src/dialogs/EditEntryDlg.h b/src/dialogs/EditEntryDlg.h index 20cd14c..753b070 100755 --- a/src/dialogs/EditEntryDlg.h +++ b/src/dialogs/EditEntryDlg.h @@ -33,7 +33,9 @@ class CEditEntryDlg : public QDialog, public Ui_EditEntryDialog CEditEntryDlg(IDatabase* _db, IEntryHandle* _entry,QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0); ~CEditEntryDlg(); void InitGroupComboBox(); +/* MX-TO-DO: Remove this declaration void InitIconComboBox(); +*/ static void saveAttachment(IEntryHandle* pEntry, QWidget* ParentWidget=NULL); IEntryHandle* entry; @@ -44,6 +46,7 @@ class CEditEntryDlg : public QDialog, public Ui_EditEntryDialog QPixmap BannerPixmap; public slots: + void OnTitleTextChanged(const QString&); void OnPasswordwLostFocus(); void OnPasswordwTextChanged(const QString&); void OnPasswordTextChanged(const QString&); @@ -54,7 +57,7 @@ class CEditEntryDlg : public QDialog, public Ui_EditEntryDialog void OnSaveAttachment(); void OnButtonGenPw(); void OnCheckBoxExpiresNeverChanged(int state); - void OnCustomIcons(); + void OnButtonIcons(); void OnButtonOK(); void OnExpirePreset(QAction*); void OnCalendar(QAction*); @@ -64,6 +67,7 @@ class CEditEntryDlg : public QDialog, public Ui_EditEntryDialog virtual void paintEvent(QPaintEvent*); virtual void resizeEvent(QResizeEvent *); + int IconIndex; }; #endif diff --git a/src/dialogs/ExpiredEntriesDlg.cpp b/src/dialogs/ExpiredEntriesDlg.cpp index b9c97a8..4b05469 100644 --- a/src/dialogs/ExpiredEntriesDlg.cpp +++ b/src/dialogs/ExpiredEntriesDlg.cpp @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ - + #include #include #include @@ -37,7 +37,7 @@ ExpiredEntriesDialog::ExpiredEntriesDialog(QWidget* parent,IDatabase* database,c item->setText(3,Entries[i]->expire().dateToString(Qt::LocalDate)); item->setIcon(0,database->icon(Entries[i]->group()->image())); item->setIcon(1,database->icon(Entries[i]->image())); - + } connect(treeWidget,SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),this,SLOT(OnItemDoubleClicked(QTreeWidgetItem*,int))); } @@ -51,12 +51,12 @@ void ExpiredEntriesDialog::paintEvent(QPaintEvent* event){ } void ExpiredEntriesDialog::resizeEvent(QResizeEvent* event){ - createBanner(&BannerPixmap,getPixmap("alarmclock"),tr("Expried Entries of the Database"),width()); - QDialog::resizeEvent(event); + createBanner(&BannerPixmap,getPixmap("alarmclock"),tr("Expired Entries in the Database"),width()); + QDialog::resizeEvent(event); } void ExpiredEntriesDialog::OnItemDoubleClicked(QTreeWidgetItem* item, int column){ - SelectedEntry=Entries[item->data(0,Qt::UserRole).toInt()]; + SelectedEntry=Entries[item->data(0,Qt::UserRole).toInt()]; accept(); } diff --git a/src/forms/EditEntryDlg.ui b/src/forms/EditEntryDlg.ui index de0c272..9481255 100644 --- a/src/forms/EditEntryDlg.ui +++ b/src/forms/EditEntryDlg.ui @@ -86,6 +86,12 @@ + + + 16 + 16 + + 1 @@ -106,9 +112,6 @@ 23 - - ... - @@ -280,7 +283,11 @@ - + + + true + + @@ -326,6 +333,12 @@ + + + 16 + 16 + + @@ -336,6 +349,12 @@ + + + 16 + 16 + + @@ -346,6 +365,12 @@ + + + 16 + 16 + + @@ -364,7 +389,13 @@ - ... + + + + + 16 + 16 + QToolButton::MenuButtonPopup @@ -434,7 +465,32 @@ 6 - + + + + 3 + 0 + 0 + 0 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 100 + 20 + + + @@ -447,12 +503,12 @@ - - - - - - > + + + + 16 + 16 + @@ -488,20 +544,24 @@ - Combo_Group - Combo_IconPicker Edit_Title Edit_UserName Edit_URL Edit_Password Edit_Password_w Edit_Comment + DateTime_Expire + ButtonExpirePresets + CheckBox_ExpiresNever Edit_Attachment ButtonOpenAttachment ButtonSaveAttachment ButtonDeleteAttachment ButtonEchoMode ButtonGenPw + buttonBox + Combo_Group + Button_Icons diff --git a/src/forms/MainWindow.ui b/src/forms/MainWindow.ui index 69fee54..4d30a94 100644 --- a/src/forms/MainWindow.ui +++ b/src/forms/MainWindow.ui @@ -168,8 +168,8 @@ - + @@ -225,11 +225,11 @@ E&xtras - - + + @@ -267,6 +267,11 @@ Change &Master Key... + + + &Lock Workspace + + E&xit @@ -329,12 +334,12 @@ - Search In Database... + Search in Database... - Search in this group... + Search in this Group... @@ -533,23 +538,12 @@ Show Expired Entries... - - Show Expired Entries... - - - Show Expired Entries - Recycle Bin... - - - Lock Workspace - - diff --git a/src/main.h b/src/main.h index f023c0e..896561a 100644 --- a/src/main.h +++ b/src/main.h @@ -27,6 +27,8 @@ #include #include +#define APP_NAME "KeePassX" +#define APP_FUNC "Password Manager" #define KEEPASS_VERSION "0.2.3" #define BUILTIN_ICONS 62 diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 319a987..1b7c50a 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -77,7 +77,8 @@ Export_KeePassX_Xml export_KeePassX_Xml; KeepassMainWindow::KeepassMainWindow(const QString& ArgFile,QWidget *parent, Qt::WFlags flags):QMainWindow(parent,flags){ Start=true; ShutingDown=false; - setupUi(this); + IsLocked=false; + setupUi(this); #ifdef QT_WS_MAC setUnifiedTitleAndToolBarOnMac(true); #endif @@ -95,13 +96,12 @@ KeepassMainWindow::KeepassMainWindow(const QString& ArgFile,QWidget *parent, Qt: statusBar()->addWidget(StatusBarGeneral,15); statusBar()->addWidget(StatusBarSelection,85); statusBar()->setVisible(config->showStatusbar()); - + NormalCentralWidget=QMainWindow::centralWidget(); LockedCentralWidget=new QWidget(this); WorkspaceLockedWidget.setupUi(LockedCentralWidget); LockedCentralWidget->setVisible(false); - IsLocked=false; - + setupConnections(); FileOpen=false; @@ -160,26 +160,26 @@ void KeepassMainWindow::setupConnections(){ connect(EditSearchAction, SIGNAL(triggered()), this, SLOT(OnSearch())); connect(EditGroupSearchAction, SIGNAL(triggered()), this, SLOT(OnGroupSearch())); connect(EditAutoTypeAction,SIGNAL(triggered()),EntryView,SLOT(OnAutoType())); - + connect(ViewShowToolbarAction,SIGNAL(toggled(bool)),this,SLOT(OnViewShowToolbar(bool))); connect(ViewShowEntryDetailsAction,SIGNAL(toggled(bool)),this,SLOT(OnViewShowEntryDetails(bool))); connect(ViewHidePasswordsAction,SIGNAL(toggled(bool)), this, SLOT(OnUsernPasswVisibilityChanged(bool))); connect(ViewHideUsernamesAction,SIGNAL(toggled(bool)), this, SLOT(OnUsernPasswVisibilityChanged(bool))); - + connect(menuColumns,SIGNAL(triggered(QAction*)),this,SLOT(OnColumnVisibilityChanged(QAction*))); connect(ViewToolButtonSize16Action,SIGNAL(toggled(bool)), this, SLOT(OnViewToolbarIconSize16(bool))); connect(ViewToolButtonSize22Action,SIGNAL(toggled(bool)), this, SLOT(OnViewToolbarIconSize22(bool))); connect(ViewToolButtonSize28Action,SIGNAL(toggled(bool)), this, SLOT(OnViewToolbarIconSize28(bool))); connect(ViewShowStatusbarAction,SIGNAL(toggled(bool)),statusBar(),SLOT(setVisible(bool))); - + connect(ExtrasSettingsAction,SIGNAL(triggered(bool)),this,SLOT(OnExtrasSettings())); connect(ExtrasPasswordGenAction,SIGNAL(triggered(bool)),this,SLOT(OnExtrasPasswordGen())); connect(ExtrasShowExpiredEntriesAction,SIGNAL(triggered(bool)),this,SLOT(OnExtrasShowExpiredEntries())); connect(ExtrasTrashCanAction,SIGNAL(triggered(bool)),this,SLOT(OnExtrasTrashCan())); - + connect(HelpHandbookAction,SIGNAL(triggered()),this,SLOT(OnHelpHandbook())); connect(HelpAboutAction,SIGNAL(triggered()),this,SLOT(OnHelpAbout())); - + connect(EntryView,SIGNAL(itemActivated(QTreeWidgetItem*,int)),EntryView,SLOT(OnEntryActivated(QTreeWidgetItem*,int))); connect(QuickSearchEdit,SIGNAL(returnPressed()), this, SLOT(OnQuickSearch())); connect(GroupView,SIGNAL(groupChanged(IGroupHandle*)),EntryView,SLOT(OnGroupChanged(IGroupHandle*))); @@ -211,10 +211,12 @@ void KeepassMainWindow::setupToolbar(){ toolBar->addAction(EditEditEntryAction); toolBar->addAction(EditDeleteEntryAction); toolBar->addSeparator(); - toolBar->addAction(EditPasswordToClipboardAction); toolBar->addAction(EditUsernameToClipboardAction); - toolBar->addSeparator(); - QuickSearchEdit=new QLineEdit(toolBar); + toolBar->addAction(EditPasswordToClipboardAction); + toolBar->addSeparator(); + toolBar->addAction(FileUnLockWorkspaceAction); + toolBar->addSeparator(); + QuickSearchEdit=new QLineEdit(toolBar); QuickSearchEdit->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); toolBar->addWidget(QuickSearchEdit); } @@ -227,13 +229,14 @@ void KeepassMainWindow::setupIcons(){ FileSaveAsAction->setIcon(getIcon("filesaveas")); FileCloseAction->setIcon(getIcon("fileclose")); FileSettingsAction->setIcon(getIcon("dbsettings")); + FileUnLockWorkspaceAction->setIcon(getIcon("lock")); FileExitAction->setIcon(getIcon("exit")); EditNewEntryAction->setIcon(getIcon("newentry")); EditEditEntryAction->setIcon(getIcon("editentry")); EditDeleteEntryAction->setIcon(getIcon("deleteentry")); - EditPasswordToClipboardAction->setIcon(getIcon("copypwd")); EditUsernameToClipboardAction->setIcon(getIcon("copyusername")); - EditCloneEntryAction->setIcon(getIcon("cloneentry")); + EditPasswordToClipboardAction->setIcon(getIcon("copypwd")); + EditCloneEntryAction->setIcon(getIcon("cloneentry")); EditOpenUrlAction->setIcon(getIcon("openurl")); EditSaveAttachmentAction->setIcon(getIcon("filesave")); EditNewGroupAction->setIcon(getIcon("newgroup")); @@ -241,11 +244,11 @@ void KeepassMainWindow::setupIcons(){ EditDeleteGroupAction->setIcon(getIcon("deletegroup")); EditSearchAction->setIcon(getIcon("dbsearch")); EditGroupSearchAction->setIcon(getIcon("groupsearch")); - ExtrasSettingsAction->setIcon(getIcon("appsettings")); ExtrasShowExpiredEntriesAction->setIcon(getIcon("expired")); ExtrasPasswordGenAction->setIcon(getIcon("generator")); ExtrasTrashCanAction->setIcon(getIcon("trashcan")); - EditAutoTypeAction->setIcon(getIcon("autotype")); + ExtrasSettingsAction->setIcon(getIcon("appsettings")); + EditAutoTypeAction->setIcon(getIcon("autotype")); HelpHandbookAction->setIcon(getIcon("manual")); HelpAboutAction->setIcon(getIcon("help")); SysTray->setIcon(getIcon("keepassx_large")); @@ -263,9 +266,9 @@ void KeepassMainWindow::setupMenus(){ GroupView->ContextMenu->addAction(EditGroupSearchAction); GroupView->ContextMenuSearchGroup->addAction(HideSearchResultsAction); - EntryView->ContextMenu->addAction(EditPasswordToClipboardAction); EntryView->ContextMenu->addAction(EditUsernameToClipboardAction); - EntryView->ContextMenu->addAction(EditOpenUrlAction); + EntryView->ContextMenu->addAction(EditPasswordToClipboardAction); + EntryView->ContextMenu->addAction(EditOpenUrlAction); EntryView->ContextMenu->addAction(EditSaveAttachmentAction); EntryView->ContextMenu->addAction(EditAutoTypeAction); EntryView->ContextMenu->addSeparator(); @@ -300,8 +303,11 @@ void KeepassMainWindow::setupMenus(){ } SysTrayMenu = new QMenu(tr("KeePassX"),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")); #define _add_import(name){\ QAction* import=new QAction(this);\ @@ -324,7 +330,9 @@ void KeepassMainWindow::setupMenus(){ //FileNewMenu->setShortcut(tr("Ctrl+N")); FileOpenAction->setShortcut(tr("Ctrl+O")); FileSaveAction->setShortcut(tr("Ctrl+S")); - EditNewGroupAction->setShortcut(tr("Ctrl+G")); + FileUnLockWorkspaceAction->setShortcut(tr("Ctrl+L")); + FileExitAction->setShortcut(tr("Ctrl+X")); + EditNewGroupAction->setShortcut(tr("Ctrl+G")); EditPasswordToClipboardAction->setShortcut(tr("Ctrl+C")); EditUsernameToClipboardAction->setShortcut(tr("Ctrl+B")); EditOpenUrlAction->setShortcut(tr("Ctrl+U")); @@ -339,7 +347,7 @@ void KeepassMainWindow::setupMenus(){ FileSaveAsAction->setShortcut(tr("Shift+Ctrl+S")); EditGroupSearchAction->setShortcut(tr("Shift+Ctrl+F")); #endif - + ExtrasTrashCanAction->setVisible(false); //For KP 2.x only } @@ -580,7 +588,7 @@ void KeepassMainWindow::updateDetailView(){ if(entry->expire()!=Date_Never){ int secs=QDateTime::currentDateTime().secsTo(entry->expire()); if(secs < 0) - templ.replace("%expire-timeleft%",tr("expired")); + templ.replace("%expire-timeleft%",tr("Expired")); else{ int years=0; int months=0; @@ -618,7 +626,7 @@ void KeepassMainWindow::updateDetailView(){ if(!days && !years && !months) out=tr("less than 1 day"); - templ.replace("%expire-timeleft%",out); + templ.replace("%expire-timeleft%","in " + out); } } else @@ -673,8 +681,8 @@ switch(EntrySelection){ else if(GroupSelection == SEARCHGROUP) switch(EntrySelection){ case NONE: - EditPasswordToClipboardAction->setEnabled(false); EditUsernameToClipboardAction->setEnabled(false); + EditPasswordToClipboardAction->setEnabled(false); EditOpenUrlAction->setEnabled(false); EditSaveAttachmentAction->setEnabled(false); EditEditEntryAction->setEnabled(false); @@ -685,8 +693,8 @@ switch(EntrySelection){ EditAutoTypeAction->setEnabled(false); break; case SINGLE: - EditPasswordToClipboardAction->setEnabled(true); EditUsernameToClipboardAction->setEnabled(true); + EditPasswordToClipboardAction->setEnabled(true); EditOpenUrlAction->setEnabled(true); EditSaveAttachmentAction->setEnabled(true); EditEditEntryAction->setEnabled(true); @@ -697,8 +705,8 @@ switch(EntrySelection){ EditAutoTypeAction->setEnabled(true); break; case MULTIPLE: - EditPasswordToClipboardAction->setEnabled(false); EditUsernameToClipboardAction->setEnabled(false); + EditPasswordToClipboardAction->setEnabled(false); EditOpenUrlAction->setEnabled(false); EditSaveAttachmentAction->setEnabled(false); EditEditEntryAction->setEnabled(false); @@ -834,7 +842,7 @@ void KeepassMainWindow::OnColumnVisibilityChanged(QAction* action){ EntryView->Columns[6]=ViewColumnsCreationAction->isChecked(); EntryView->Columns[7]=ViewColumnsLastChangeAction->isChecked(); EntryView->Columns[8]=ViewColumnsLastAccessAction->isChecked(); - EntryView->Columns[9]=ViewColumnsAttachmentAction->isChecked(); + EntryView->Columns[9]=ViewColumnsAttachmentAction->isChecked(); EntryView->Columns[10]=ViewColumnsGroupAction->isChecked(); EntryView->updateColumns(); if(FileOpen) EntryView->refreshItems(); @@ -891,8 +899,8 @@ dlg.exec(); void KeepassMainWindow::OnHelpHandbook(){ HelpBrowser->openAssistant(); - - + + } void KeepassMainWindow::OnViewShowToolbar(bool show){ @@ -990,27 +998,33 @@ void KeepassMainWindow::OnExtrasShowExpiredEntries(){ void KeepassMainWindow::OnExtrasTrashCan(){ TrashCanDialog dlg(this,db,db->expiredEntries()); if(dlg.exec()==QDialog::Accepted){ - + } - + } void KeepassMainWindow::OnDetailViewUrlClicked(const QUrl& url){ - openBrowser(url.toString()); + openBrowser(url.toString()); } void KeepassMainWindow::OnUnLockWorkspace(){ if(IsLocked){ - LockedCentralWidget->setVisible(false); + LockedCentralWidget->setVisible(false); LockedCentralWidget->setParent(NULL); setCentralWidget(NormalCentralWidget); NormalCentralWidget->setVisible(true); - IsLocked=false; + SysTray->setIcon(getIcon("keepassx_large")); + SysTray->setToolTip(tr("%1 %2").arg(APP_NAME, APP_FUNC) + " - " + tr("Unlocked")); + FileUnLockWorkspaceAction->setText(tr("&Lock Workspace")); + IsLocked=false; } else { - NormalCentralWidget->setVisible(false); + NormalCentralWidget->setVisible(false); NormalCentralWidget->setParent(NULL); setCentralWidget(LockedCentralWidget); LockedCentralWidget->setVisible(true); + SysTray->setIcon(getIcon("keepassx_locked")); + SysTray->setToolTip(tr("%1 %2").arg(APP_NAME, APP_FUNC) + " - " + tr("Locked")); + FileUnLockWorkspaceAction->setText(tr("Un&lock Workspace")); IsLocked=true; } } \ No newline at end of file diff --git a/src/mainwindow.h b/src/mainwindow.h index 4da7d5d..c4a3cd8 100755 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -55,7 +55,7 @@ class KeepassMainWindow : public QMainWindow, public Ui_MainWindow{ public: KeepassMainWindow (const QString& ArgFile,QWidget *parent=0, Qt::WFlags flags=0); IDatabase* db; - bool Start; + bool Start; signals: void entryChanged(); diff --git a/src/res/default-detailview-classic.html b/src/res/default-detailview-classic.html new file mode 100644 index 0000000..731206e --- /dev/null +++ b/src/res/default-detailview-classic.html @@ -0,0 +1,5 @@ + +

Group: %group% Title: %title% Username: %username% Password: %password% URL: %url% Creation: %creation% Last Access: %lastaccess% Last Modification: %lastmod% Expiration: %expire%
Comment:

+

%comment%

\ No newline at end of file diff --git a/src/res/default-detailview.html b/src/res/default-detailview.html index 731206e..76205b1 100644 --- a/src/res/default-detailview.html +++ b/src/res/default-detailview.html @@ -1,5 +1,62 @@ - -

Group: %group% Title: %title% Username: %username% Password: %password% URL: %url% Creation: %creation% Last Access: %lastaccess% Last Modification: %lastmod% Expiration: %expire%
Comment:

-

%comment%

\ No newline at end of file + + + + + + + + + +
%title%
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Group:%group%Creation:%creation%
Username:%username%Access:%lastaccess%
Password:%password%Modification:%creation%
Attachment:%attachment%Expiration:%expire% [%expire-timeleft%]
URL:%url%
Comment:%comment%
+ +