Merge changes from bdmayes (rev 237, 239, 241)

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@245 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 16 years ago
parent ab4047e7d2
commit 9f157e61a9
  1. 63
      share/macx_bundle/Info.plist
  2. 8
      src/KpxConfig.cpp
  3. 4
      src/KpxConfig.h
  4. 2
      src/dialogs/AboutDlg.cpp
  5. 2
      src/dialogs/PasswordGenDlg.cpp
  6. 6
      src/mainwindow.cpp
  7. 1
      src/src.pro

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- For a full list of properties, see
http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html
-->
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>KeePassX 0.3.4</string>
<key>CFBundleSignature</key>
<string>kpsx</string>
<key>CFBundleExecutable</key>
<string>KeePassX</string>
<key>CFBundleVersion</key>
<string>0.3.4</string>
<key>CFBundleShortVersionString</key>
<string>0.3.4</string>
<key>CFBundleName</key>
<string>KeePassX</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIdentifier</key>
<string>com.apple.application-bundle</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>kdb</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>icon</string>
<key>CFBundleTypeName</key>
<string>KeePassX Password Database</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>kpsx</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
</dict>
</plist>

@ -211,6 +211,14 @@ QString KpxConfig::keyTypeToString(tKeyType keyType){
return res; return res;
} }
QByteArray KpxConfig::mainWindowGeometry() {
QVariant var = settings.value("UI/MainWindowGeometry");
if (var.type() == QVariant::ByteArray)
return var.toByteArray();
else
return QByteArray();
}
QRect KpxConfig::dialogGeometry(const QWidget* widget){ QRect KpxConfig::dialogGeometry(const QWidget* widget){
Q_ASSERT(widget->parentWidget()!=NULL && widget->parentWidget()->window()!=NULL); Q_ASSERT(widget->parentWidget()!=NULL && widget->parentWidget()->window()!=NULL);
QSize size = settings.value(QString("UI/%1Size").arg(widget->objectName()),widget->size()).toSize(); QSize size = settings.value(QString("UI/%1Size").arg(widget->objectName()),widget->size()).toSize();

@ -63,7 +63,7 @@ public:
QString lastFile(){return settings.value("Options/LastFile").toString();} QString lastFile(){return settings.value("Options/LastFile").toString();}
QString lastKeyLocation(){return settings.value("Options/LastKeyLocation").toString();} QString lastKeyLocation(){return settings.value("Options/LastKeyLocation").toString();}
tKeyType lastKeyType(){return stringToKeyType(settings.value("Options/LastKeyType").toString());} tKeyType lastKeyType(){return stringToKeyType(settings.value("Options/LastKeyType").toString());}
QRect mainWindowGeometry(const QRect& defaultValue){return settings.value("UI/MainWindowGeometry",defaultValue).toRect();} QByteArray mainWindowGeometry();
bool minimizeToTray(){return settings.value("Options/MinimizeToTray",false).toBool();} bool minimizeToTray(){return settings.value("Options/MinimizeToTray",false).toBool();}
bool minimizeTray(){return settings.value("Options/MinimizeTray",false).toBool();} bool minimizeTray(){return settings.value("Options/MinimizeTray",false).toBool();}
bool startMinimized(){return settings.value("Options/StartMinimized",false).toBool();} bool startMinimized(){return settings.value("Options/StartMinimized",false).toBool();}
@ -130,7 +130,7 @@ public:
void setLastFile(const QString& value){settings.setValue("Options/LastFile",value);} void setLastFile(const QString& value){settings.setValue("Options/LastFile",value);}
void setLastKeyLocation(const QString& value){settings.setValue("Options/LastKeyLocation",value);} void setLastKeyLocation(const QString& value){settings.setValue("Options/LastKeyLocation",value);}
void setLastKeyType(tKeyType value){settings.setValue("Options/LastKeyType",keyTypeToString(value));} void setLastKeyType(tKeyType value){settings.setValue("Options/LastKeyType",keyTypeToString(value));}
void setMainWindowGeometry(const QRect& value){settings.setValue("UI/MainWindowGeometry",value);} void setMainWindowGeometry(const QByteArray& value){settings.setValue("UI/MainWindowGeometry",value);}
void setMinimizeToTray(bool value){settings.setValue("Options/MinimizeToTray",value);} void setMinimizeToTray(bool value){settings.setValue("Options/MinimizeToTray",value);}
void setMinimizeTray(bool value){settings.setValue("Options/MinimizeTray",value);} void setMinimizeTray(bool value){settings.setValue("Options/MinimizeTray",value);}
void setStartMinimized(bool value){settings.setValue("Options/StartMinimized",value);} void setStartMinimized(bool value){settings.setValue("Options/StartMinimized",value);}

@ -47,6 +47,8 @@ AboutDialog::AboutDialog(QWidget* parent):QDialog(parent)
str+="<br>"; str+="<br>";
str+="<u>Felix Geyer</u><br>"+tr("Developer, Project Admin")+"<br>sniperbeamer@users.sf.net<br>"; str+="<u>Felix Geyer</u><br>"+tr("Developer, Project Admin")+"<br>sniperbeamer@users.sf.net<br>";
str+="<br>"; str+="<br>";
str+="<u>Brandon Mayes</u><br>"+tr("Developer")+"<br>bdmayes@users.sourceforge.net<br>";
str+="<br>";
str+="<u>Eugen Gorschenin</u><br>"+tr("Web Designer")+"<br>geugen@users.sf.de<br>"; str+="<u>Eugen Gorschenin</u><br>"+tr("Web Designer")+"<br>geugen@users.sf.de<br>";
str+="<br>"; str+="<br>";
str+="<u>Juan J Gonz&aacute;lez C&aacute;rdenas [Jota Jota]</u><br>"+tr("Developer")+"<br>myxelf@users.sf.net<br>"; str+="<u>Juan J Gonz&aacute;lez C&aacute;rdenas [Jota Jota]</u><br>"+tr("Developer")+"<br>myxelf@users.sf.net<br>";

@ -112,6 +112,7 @@ CGenPwDialog::CGenPwDialog(QWidget* parent, bool StandAloneMode,Qt::WFlags fl)
checkBoxPN->setChecked(true); checkBoxPN->setChecked(true);
checkBoxPS->setChecked(false); checkBoxPS->setChecked(false);
} }
Edit_chars->setText(config->pwGenCharList());
Check_ExcludeLookAlike->setChecked(config->pwGenExcludeLookAlike()); Check_ExcludeLookAlike->setChecked(config->pwGenExcludeLookAlike());
Check_EveryGroup->setChecked(config->pwGenEveryGroup()); Check_EveryGroup->setChecked(config->pwGenEveryGroup());
Spin_Num->setValue(config->pwGenLength()); Spin_Num->setValue(config->pwGenLength());
@ -143,6 +144,7 @@ CGenPwDialog::~CGenPwDialog(){
pwGenOptions.setBit(12,checkBoxPN->isChecked()); pwGenOptions.setBit(12,checkBoxPN->isChecked());
pwGenOptions.setBit(13,checkBoxPS->isChecked()); pwGenOptions.setBit(13,checkBoxPS->isChecked());
config->setPwGenOptions(pwGenOptions); config->setPwGenOptions(pwGenOptions);
config->setPwGenCharList(Edit_chars->text());
config->setPwGenExcludeLookAlike(Check_ExcludeLookAlike->isChecked()); config->setPwGenExcludeLookAlike(Check_ExcludeLookAlike->isChecked());
config->setPwGenEveryGroup(Check_EveryGroup->isChecked()); config->setPwGenEveryGroup(Check_EveryGroup->isChecked());
config->setPwGenLength(Spin_Num->value()); config->setPwGenLength(Spin_Num->value());

@ -67,7 +67,9 @@ KeepassMainWindow::KeepassMainWindow(const QString& ArgFile,bool ArgMin,bool Arg
autoType->registerGlobalShortcut(config->globalShortcut()); autoType->registerGlobalShortcut(config->globalShortcut());
#endif #endif
setWindowModified(false); setWindowModified(false);
setGeometry(config->mainWindowGeometry(geometry())); QByteArray windowGeo = config->mainWindowGeometry();
if (!windowGeo.isEmpty())
restoreGeometry(windowGeo);
VSplitter->restoreState(config->vSplitterPos()); VSplitter->restoreState(config->vSplitterPos());
HSplitter->restoreState(config->hSplitterPos()); HSplitter->restoreState(config->hSplitterPos());
SysTray=new QSystemTrayIcon(this); SysTray=new QSystemTrayIcon(this);
@ -1022,7 +1024,7 @@ void KeepassMainWindow::closeEvent(QCloseEvent* e){
autoType->unregisterGlobalShortcut(); autoType->unregisterGlobalShortcut();
#endif #endif
config->setMainWindowGeometry(geometry()); config->setMainWindowGeometry(saveGeometry());
// workaround if window has never been visible // workaround if window has never been visible
if (isVisible() || VSplitter->sizes()[0]!=VSplitter->sizes()[1]) if (isVisible() || VSplitter->sizes()[0]!=VSplitter->sizes()[1])
config->setVSplitterPos(VSplitter->saveState()); config->setVSplitterPos(VSplitter->saveState());

@ -78,6 +78,7 @@ macx {
LIBS += -framework Carbon -framework AppKit -lz LIBS += -framework Carbon -framework AppKit -lz
} }
QMAKE_BUNDLE_DATA += data QMAKE_BUNDLE_DATA += data
QMAKE_INFO_PLIST= ../share/macx_bundle/Info.plist
ICON = ../share/macx_bundle/icon.icns ICON = ../share/macx_bundle/icon.icns
CONFIG += app_bundle CONFIG += app_bundle
isEqual(ARCH,UNIVERSAL){ isEqual(ARCH,UNIVERSAL){