diff options
Diffstat (limited to 'src/ui/certimportwidget.c')
-rw-r--r-- | src/ui/certimportwidget.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ui/certimportwidget.c b/src/ui/certimportwidget.c index fdc189db..6e818137 100644 --- a/src/ui/certimportwidget.c +++ b/src/ui/certimportwidget.c | |||
@@ -114,6 +114,7 @@ void init_CertImportWidget(iCertImportWidget *d) { | |||
114 | setFlags_Widget(w, | 114 | setFlags_Widget(w, |
115 | mouseModal_WidgetFlag | keepOnTop_WidgetFlag | arrangeVertical_WidgetFlag | | 115 | mouseModal_WidgetFlag | keepOnTop_WidgetFlag | arrangeVertical_WidgetFlag | |
116 | arrangeSize_WidgetFlag | centerHorizontal_WidgetFlag | | 116 | arrangeSize_WidgetFlag | centerHorizontal_WidgetFlag | |
117 | parentCannotResize_WidgetFlag | | ||
117 | overflowScrollable_WidgetFlag, | 118 | overflowScrollable_WidgetFlag, |
118 | iTrue); | 119 | iTrue); |
119 | } | 120 | } |
@@ -214,11 +215,20 @@ static iBool processEvent_CertImportWidget_(iCertImportWidget *d, const SDL_Even | |||
214 | return iTrue; | 215 | return iTrue; |
215 | } | 216 | } |
216 | } | 217 | } |
218 | if (isCommand_UserEvent(ev, "input.paste")) { | ||
219 | if (!tryImportFromClipboard_CertImportWidget_(d)) { | ||
220 | makeSimpleMessage_Widget(uiTextCaution_ColorEscape "${heading.certimport.pasted}", | ||
221 | "${dlg.certimport.notfound}"); | ||
222 | } | ||
223 | postRefresh_App(); | ||
224 | return iTrue; | ||
225 | } | ||
217 | if (isCommand_UserEvent(ev, "certimport.paste")) { | 226 | if (isCommand_UserEvent(ev, "certimport.paste")) { |
218 | tryImportFromClipboard_CertImportWidget_(d); | 227 | tryImportFromClipboard_CertImportWidget_(d); |
219 | return iTrue; | 228 | return iTrue; |
220 | } | 229 | } |
221 | if (isCommand_Widget(w, ev, "cancel")) { | 230 | if (isCommand_Widget(w, ev, "cancel")) { |
231 | setupSheetTransition_Mobile(w, iFalse); | ||
222 | destroy_Widget(w); | 232 | destroy_Widget(w); |
223 | return iTrue; | 233 | return iTrue; |
224 | } | 234 | } |
@@ -226,6 +236,7 @@ static iBool processEvent_CertImportWidget_(iCertImportWidget *d, const SDL_Even | |||
226 | if (d->cert && !isEmpty_TlsCertificate(d->cert) && hasPrivateKey_TlsCertificate(d->cert)) { | 236 | if (d->cert && !isEmpty_TlsCertificate(d->cert) && hasPrivateKey_TlsCertificate(d->cert)) { |
227 | importIdentity_GmCerts(certs_App(), d->cert, text_InputWidget(d->notes)); | 237 | importIdentity_GmCerts(certs_App(), d->cert, text_InputWidget(d->notes)); |
228 | d->cert = NULL; /* taken */ | 238 | d->cert = NULL; /* taken */ |
239 | setupSheetTransition_Mobile(w, iFalse); | ||
229 | destroy_Widget(w); | 240 | destroy_Widget(w); |
230 | postCommand_App("idents.changed"); | 241 | postCommand_App("idents.changed"); |
231 | } | 242 | } |