Restructured advanced tab of the settings dialog

Fixed location of license file in the about dialog
Updated changelog and install instructions
Windows:
- Corrected install location of data files
- Install Qt libraries
- Some GUI improvements

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@165 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
sniperbeamer
2008-03-02 16:30:05 +00:00
parent 3a5259eb47
commit e5e14c37f7
11 changed files with 99 additions and 194 deletions

View File

@@ -27,7 +27,6 @@ AboutDialog::AboutDialog(QWidget* parent):QDialog(parent)
{
setupUi(this);
createBanner(&BannerPixmap,getPixmap("keepassx_large"),QString("%1 %2").arg(APP_DISPLAY_NAME, APP_VERSION),width());
loadLicFromFile();
labelAppName->setText(APP_DISPLAY_NAME);
labelAppFunc->setText(QString(" - ").append(APP_LONG_FUNC));
@@ -61,6 +60,15 @@ AboutDialog::AboutDialog(QWidget* parent):QDialog(parent)
str+="<u>Constantin Makshin</u><br>"+tr("Various fixes and improvements")+"<br>dinosaur-rus@users.sourceforge.net<br></div>";
Edit_Thanks->setHtml(str);
QFile gpl(DataDir+"/license.html");
if (!gpl.open(QIODevice::ReadOnly)){
QMessageBox::critical(this,tr("Error"),tr("File '%1' could not be found.")
.arg("'license.html'")+"\n"+tr("Make sure that the program is installed correctly.")
,tr("OK"),0,0,2,1);
}
Edit_License->setHtml(QString::fromUtf8(gpl.readAll()));
connect(ButtonBox, SIGNAL(accepted()), SLOT(close()));
}
@@ -70,31 +78,3 @@ void AboutDialog::paintEvent(QPaintEvent *event){
painter.setClipRegion(event->region());
painter.drawPixmap(QPoint(0,0),BannerPixmap);
}
void AboutDialog::loadLicFromFile(){
QString filename;
filename = AppDir+"/../share/keepass/license.html";
if (!QFile::exists(filename)){
filename = AppDir+"/share/license.html";
if (!QFile::exists(filename)){
filename.clear();
}
}
QFile gpl(filename);
if (filename.isEmpty() || !gpl.open(QIODevice::ReadOnly)){
QMessageBox::critical(this,tr("Error"),tr("File '%1' could not be found.")
.arg("'license.html'")+"\n"+tr("Make sure that the program is installed correctly.")
,tr("OK"),0,0,2,1);
}
Edit_License->setHtml(QString::fromUtf8(gpl.readAll()));
}
void AboutDialog::OnHomepageClicked(){
openBrowser("http://www.keepassx.org/");
}
void AboutDialog::OnEMailClicked(){
openBrowser("mailto:keepassx@gmail.com");
}

View File

@@ -33,13 +33,8 @@ class AboutDialog : public QDialog, public Ui_AboutDlg
public:
AboutDialog(QWidget* parent);
private slots:
void OnHomepageClicked();
void OnEMailClicked();
private:
QPixmap BannerPixmap;
inline void loadLicFromFile();
virtual void paintEvent(QPaintEvent*);
};

View File

@@ -63,6 +63,7 @@ CSettingsDlg::CSettingsDlg(QWidget* parent):QDialog(parent,Qt::Dialog)
#if !defined(GLOBAL_AUTOTYPE)
Label_GlobalShortcut->setVisible(false);
Edit_GlobalShortcut->setVisible(false);
CheckBox_EntryTitlesMatch->setVisible(false);
#endif
#ifdef GLOBAL_AUTOTYPE

View File

@@ -271,7 +271,7 @@
<property name="sizeHint" >
<size>
<width>10</width>
<height>20</height>
<height>1</height>
</size>
</property>
</spacer>
@@ -285,18 +285,6 @@
</item>
<item>
<widget class="QProgressBar" name="Progress_Quali" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize" >
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="maximum" >
<number>128</number>
</property>

View File

@@ -939,6 +939,66 @@
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QGroupBox" name="Box_BrowserCmd" >
<property name="title" >
<string>Custom Browser Command</string>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
<layout class="QHBoxLayout" >
<item>
<widget class="QLineEdit" name="Edit_BrowserCmd" />
</item>
<item>
<widget class="QPushButton" name="Button_BrowserCmdBrowse" >
<property name="text" >
<string>Browse</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<item>
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Media Root:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="Edit_MountDir" >
<property name="whatsThis" >
<string>The directory where storage devices like CDs and memory sticks are normally mounted.</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Button_MountDirBrowse" >
<property name="text" >
<string>Browse...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="CheckBox_SaveRelativePaths" >
<property name="whatsThis" >
<string>Enable this if you want to use your bookmarks and the last opened file independet from their absolute paths. This is especially useful when using KeePassX portably and therefore with changing mount points in the file system.</string>
</property>
<property name="text" >
<string>Save relative paths (bookmarks and last file)</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="Box_AutoType" >
<property name="title" >
@@ -1013,66 +1073,6 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="Box_BrowserCmd" >
<property name="title" >
<string>Custom Browser Command</string>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
<layout class="QHBoxLayout" >
<item>
<widget class="QLineEdit" name="Edit_BrowserCmd" />
</item>
<item>
<widget class="QPushButton" name="Button_BrowserCmdBrowse" >
<property name="text" >
<string>Browse</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<item>
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Media Root:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="Edit_MountDir" >
<property name="whatsThis" >
<string>The directory where storage devices like CDs and memory sticks are normally mounted.</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Button_MountDirBrowse" >
<property name="text" >
<string>Browse...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="CheckBox_SaveRelativePaths" >
<property name="whatsThis" >
<string>Enable this if you want to use your bookmarks and the last opened file independet from their absolute paths. This is especially useful when using KeePassX portably and therefore with changing mount points in the file system.</string>
</property>
<property name="text" >
<string>Save relative paths (bookmarks and last file)</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<item>
@@ -1159,6 +1159,7 @@
<tabstop>CheckBox_StartLocked</tabstop>
<tabstop>checkBox_SaveFileDlgHistory</tabstop>
<tabstop>Button_ClearFileDlgHistory</tabstop>
<tabstop>CheckBox_AutoSave</tabstop>
<tabstop>checkBox_AskBeforeDelete</tabstop>
<tabstop>ButtonColor1</tabstop>
<tabstop>ButtonColor2</tabstop>
@@ -1177,14 +1178,14 @@
<tabstop>Radio_IntPlugin_Gnome</tabstop>
<tabstop>Radio_IntPlugin_Kde</tabstop>
<tabstop>IntPlugin_Button_Config</tabstop>
<tabstop>SpinBox_AutoTypePreGap</tabstop>
<tabstop>SpinBox_AutoTypeKeyStrokeDelay</tabstop>
<tabstop>Box_BrowserCmd</tabstop>
<tabstop>Edit_BrowserCmd</tabstop>
<tabstop>Button_BrowserCmdBrowse</tabstop>
<tabstop>Edit_MountDir</tabstop>
<tabstop>Button_MountDirBrowse</tabstop>
<tabstop>CheckBox_SaveRelativePaths</tabstop>
<tabstop>SpinBox_AutoTypePreGap</tabstop>
<tabstop>SpinBox_AutoTypeKeyStrokeDelay</tabstop>
<tabstop>Edit_GlobalShortcut</tabstop>
<tabstop>CheckBox_EntryTitlesMatch</tabstop>
<tabstop>DialogButtons</tabstop>

View File

@@ -32,7 +32,7 @@ unix : !macx : !isEqual(QMAKE_WIN32,1) {
}
TARGET = ../bin/keepassx
target.path = $${PREFIX}/bin
data.path = $${PREFIX}/share
data.path = $${PREFIX}/share/keepassx
pixmaps.files = ../share/pixmaps/*
pixmaps.path = $${PREFIX}/share/pixmaps
desktop.files = ../share/applications/*
@@ -48,7 +48,7 @@ unix : !macx : !isEqual(QMAKE_WIN32,1) {
HEADERS += Application_X11.h
}
isEqual(BUILD_FOR_LSB,1) {
QMAKE_CXX = lsbcc
QMAKE_CXX = lsbcc
}
}
@@ -60,7 +60,7 @@ macx {
isEmpty(PREFIX):PREFIX = /Applications
TARGET = ../bin/KeePassX
target.path = $${PREFIX}
data.path = Contents/Resources
data.path = Contents/Resources/keepassx
isEmpty(QT_FRAMEWORK_DIR) : QT_FRAMEWORK_DIR = /Library/Frameworks
private_frameworks.files += $${QT_FRAMEWORK_DIR}/QtCore.framework
private_frameworks.files += $${QT_FRAMEWORK_DIR}/QtGui.framework
@@ -84,12 +84,17 @@ isEqual(QMAKE_WIN32,1) {
TARGET = ../bin/KeePassX
target.path = $${PREFIX}
data.path = $${PREFIX}/share
RC_FILE = ../share/ico/keepassx.rc
!isEqual(INSTALL_QTLIB,0) {
qt_libs.files = $${QMAKE_LIBDIR_QT}/QtCore4.dll $${QMAKE_LIBDIR_QT}/QtGui4.dll $${QMAKE_LIBDIR_QT}/QtXml4.dll
qt_libs.path = $${PREFIX}
INSTALLS += qt_libs
}
RC_FILE = ../share/win_ico/keepassx.rc
QMAKE_LINK_OBJECT_SCRIPT = $${OBJECTS_DIR}/$${QMAKE_LINK_OBJECT_SCRIPT}
}
data.files += ../share/keepassx
data.files += ../share/keepassx/*
INSTALLS += target data
contains(DEFINES,GLOBAL_AUTOTYPE) {