most changes are details
git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@147 b624d157-de02-0410-bad0-e51aec6abb33
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.3 KiB |
|
@ -147,6 +147,7 @@ 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;
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -18,20 +18,20 @@
|
|||
***************************************************************************/
|
||||
|
||||
#include <qmessagebox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qdialog.h>
|
||||
#include <qfile.h>
|
||||
#include <QPainter>
|
||||
|
||||
#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("<b>Current Translation: None</b><br><br>","Please replace 'None' with the language of your translation");
|
||||
if(TrActive){
|
||||
AboutTr+=tr("<b>Author:</b> %1<br>").arg(tr("$TRANSLATION_AUTHOR"));
|
||||
|
@ -51,9 +51,9 @@ AboutDialog::AboutDialog(QWidget* parent):QDialog(parent)
|
|||
str+="<br>";
|
||||
str+="<u>"+tr("Eugen Gorschenin")+"</u><br>"+tr("Web Designer")+"<br>"+tr("geugen@users.sf.de")+"<br>";
|
||||
str+="<br>";
|
||||
str+="<u>"+tr("Jota Jota")+"</u><br>"+tr("Developer")+"<br>"+tr("myxself@users.sf.de")+"<br>";
|
||||
str+="<u>"+tr("Juan J González Cárdenas [Jota Jota]")+"</u><br>"+tr("Developer")+"<br>"+tr("myxelf@users.sf.net")+"<br>";
|
||||
str+="</div><br><div style='margin-left:0px;'>";
|
||||
str+="<b>"+tr("Thanks To")+"</b>";
|
||||
str+="<b>"+tr("Thanks To")+"</b><br>";
|
||||
str+="</div><div style='margin-left:10px;'>";
|
||||
str+="<u>"+tr("Matthias Miller")+"</u><br>"+tr("Patches for better MacOS X support")+"<br>"+tr("www.outofhanwell.com")+"<br></div>";
|
||||
str+="<br>";
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
#define _ABOUTDIALOG_H_
|
||||
|
||||
#include <QPaintEvent>
|
||||
#include <QPixmap>
|
||||
#include "ui_AboutDlg.h"
|
||||
#include "lib/UrlLabel.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
|
||||
|
|
|
@ -18,10 +18,13 @@
|
|||
***************************************************************************/
|
||||
|
||||
#include <QFileInfo>
|
||||
#include "AddBookmarkDlg.h"
|
||||
#include <QPainter>
|
||||
#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 (*)"));
|
||||
|
|
|
@ -21,8 +21,11 @@
|
|||
#define _ADDBOOKMARKDLG_H_
|
||||
|
||||
#include <QDialog>
|
||||
#include <QPaintEvent>
|
||||
#include "ui_AddBookmarkDlg.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
class AddBookmarkDlg : public QDialog, private Ui::AddBookmarkDlg
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -31,7 +34,11 @@ class AddBookmarkDlg : public QDialog, private Ui::AddBookmarkDlg
|
|||
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();
|
||||
|
||||
|
|
|
@ -21,8 +21,9 @@
|
|||
#include <QPainter>
|
||||
#include <QCursor>
|
||||
#include "crypto/yarrow.h"
|
||||
|
||||
#include "CollectEntropyDlg.h"
|
||||
#include "main.h"
|
||||
|
||||
|
||||
CollectEntropyDlg::CollectEntropyDlg(QWidget* parent):QDialog(parent){
|
||||
setupUi(this);
|
||||
|
|
|
@ -26,6 +26,9 @@
|
|||
#include <QPaintEvent>
|
||||
#include <QShowEvent>
|
||||
|
||||
#include "main.h"
|
||||
|
||||
|
||||
class CollectEntropyDlg: public QDialog, public Ui_CollectEntropyDlg{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
#include <QListWidget>
|
||||
#include "main.h"
|
||||
#include <QPainter>
|
||||
#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;i<KpxBookmarks::count();i++){
|
||||
QListWidgetItem* item=new QListWidgetItem(ListWidget);
|
||||
item->setData(Qt::UserRole,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;i<ListWidget->count();i++){
|
||||
int itemindex=ListWidget->item(i)->data(Qt::UserRole).toInt();
|
||||
if(itemindex>index)
|
||||
ListWidget->item(i)->setData(Qt::UserRole,itemindex-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -67,24 +108,7 @@ void ManageBookmarksDlg::OnButtonDown(){
|
|||
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;i<ListWidget->count();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();
|
||||
|
@ -94,16 +118,6 @@ void ManageBookmarksDlg::edit(QListWidgetItem* item){
|
|||
}
|
||||
|
||||
|
||||
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<int> Order;
|
||||
|
|
|
@ -22,21 +22,26 @@
|
|||
|
||||
#include <QDialog>
|
||||
#include <QCloseEvent>
|
||||
#include <QPaintEvent>
|
||||
#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*);
|
||||
};
|
||||
|
||||
|
|
|
@ -88,11 +88,49 @@
|
|||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string><html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">KeePassX</span> - Cross Platform Password Manager</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="labelAppName" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font" >
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>AppName</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelAppFunc" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font" >
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>AppFunc</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
|
|
|
@ -1,18 +1,53 @@
|
|||
<ui version="4.0" >
|
||||
<author>Tarek Saidi</author>
|
||||
<class>AddBookmarkDlg</class>
|
||||
<widget class="QWidget" name="AddBookmarkDlg" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>497</width>
|
||||
<height>148</height>
|
||||
<width>500</width>
|
||||
<height>180</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>180</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>180</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Add Bookmark</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
|
@ -44,6 +79,13 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox" >
|
||||
<property name="standardButtons" >
|
||||
|
@ -53,6 +95,7 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<includes/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -285,7 +285,7 @@
|
|||
</action>
|
||||
<action name="FileExitAction" >
|
||||
<property name="text" >
|
||||
<string>E&xit</string>
|
||||
<string>Q&uit</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="EditNewGroupAction" >
|
||||
|
|
|
@ -5,14 +5,36 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>452</width>
|
||||
<width>280</width>
|
||||
<height>360</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>280</width>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Manage Bookmarks</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
|
@ -21,19 +43,70 @@
|
|||
<item>
|
||||
<layout class="QVBoxLayout" >
|
||||
<item>
|
||||
<widget class="QToolButton" name="Button_Add" />
|
||||
<widget class="QToolButton" name="Button_Add" >
|
||||
<property name="iconSize" >
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="Button_Delete" />
|
||||
<widget class="QToolButton" name="Button_Edit" >
|
||||
<property name="iconSize" >
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="Button_Edit" />
|
||||
<widget class="QToolButton" name="Button_Delete" >
|
||||
<property name="iconSize" >
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="Button_Up" />
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="Button_Down" />
|
||||
<widget class="QToolButton" name="Button_Up" >
|
||||
<property name="iconSize" >
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="Button_Down" >
|
||||
<property name="iconSize" >
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
|
|
|
@ -423,7 +423,7 @@ int i=1;
|
|||
i++; }
|
||||
for(i; i<argc;i++){
|
||||
if(QString(argv[i])=="-help"){
|
||||
cout << "KeePassX" << KEEPASS_VERSION << endl;
|
||||
cout << "KeePassX" << APP_VERSION << endl;
|
||||
cout << "Usage: keepass [Filename] [Options]" << endl;
|
||||
cout << " -help This Help" << endl;
|
||||
cout << " -cfg <CONFIG> Use specified file for loading/saving the configuration." << endl;
|
||||
|
|
11
src/main.h
|
@ -27,9 +27,14 @@
|
|||
#include <QIcon>
|
||||
#include <QFile>
|
||||
|
||||
#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};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|