# # # patch "guitone/src/view/dialogs/GenerateKeypair.cpp" # from [c28127273be56000aa5799437874a633c408b2a0] # to [069bf777e358e7b68152963e358ec4c8b5ae6b6d] # # patch "guitone/src/view/dialogs/KeyManagement.cpp" # from [a57f544194f11df59d66b4dd2447c24ff899ae9d] # to [a1848fd19463a760fd0f509f6364e6fb185f0574] # ============================================================ --- guitone/src/view/dialogs/GenerateKeypair.cpp c28127273be56000aa5799437874a633c408b2a0 +++ guitone/src/view/dialogs/GenerateKeypair.cpp 069bf777e358e7b68152963e358ec4c8b5ae6b6d @@ -29,6 +29,9 @@ GenerateKeypair::GenerateKeypair(QWidget { setupUi(this); Dialog::init(); + + // OSX sheet-alike dialog + setWindowFlags(Qt::Sheet); } GenerateKeypair::~GenerateKeypair() {} ============================================================ --- guitone/src/view/dialogs/KeyManagement.cpp a57f544194f11df59d66b4dd2447c24ff899ae9d +++ guitone/src/view/dialogs/KeyManagement.cpp a1848fd19463a760fd0f509f6364e6fb185f0574 @@ -73,14 +73,27 @@ KeyManagement::~KeyManagement() {} KeyManagement::~KeyManagement() {} +// TODO: maybe we want to make the keypair generating dialog a small expanding +// widget inside the main dialog? void KeyManagement::generateKeypair() { - GenerateKeypair dlg(this); + // we need to hide the current dialog otherwise we can't show the next + // dialog as sheet on OSX (its apparently not possible to have more than + // one sheet opened for a main window at a time) + hide(); + + // the sheet must be rooted to the main window otherwise + // a plain dialog is displayed + GenerateKeypair dlg(parentWidget()); + // if the key was successfully created, reload the key list - if (dlg.exec() == QDialog::Accepted) + if (dlg.execDocumentModal() == QDialog::Accepted) { model->readKeys(); } + + // show the keys dialog again + show(); } void KeyManagement::contextMenuEvent(QContextMenuEvent* ev)