diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/documentwidget.c | 12 | ||||
-rw-r--r-- | src/ui/mediaui.c | 6 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 9e5e6ea3..65de157b 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -3945,7 +3945,14 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) | |||
3945 | /* Full document. */ | 3945 | /* Full document. */ |
3946 | copied = copy_String(source_GmDocument(d->view.doc)); | 3946 | copied = copy_String(source_GmDocument(d->view.doc)); |
3947 | } | 3947 | } |
3948 | SDL_SetClipboardText(cstr_String(copied)); | 3948 | if (argLabel_Command(cmd, "share")) { |
3949 | #if defined (iPlatformAppleMobile) | ||
3950 | openTextActivityView_iOS(copied); | ||
3951 | #endif | ||
3952 | } | ||
3953 | else { | ||
3954 | SDL_SetClipboardText(cstr_String(copied)); | ||
3955 | } | ||
3949 | delete_String(copied); | 3956 | delete_String(copied); |
3950 | if (flags_Widget(w) & touchDrag_WidgetFlag) { | 3957 | if (flags_Widget(w) & touchDrag_WidgetFlag) { |
3951 | postCommand_Widget(w, "document.select arg:0"); | 3958 | postCommand_Widget(w, "document.select arg:0"); |
@@ -5227,6 +5234,9 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e | |||
5227 | } | 5234 | } |
5228 | d->copyMenu = makeMenu_Widget(w, (iMenuItem[]){ | 5235 | d->copyMenu = makeMenu_Widget(w, (iMenuItem[]){ |
5229 | { clipCopy_Icon " ${menu.copy}", 0, 0, "copy" }, | 5236 | { clipCopy_Icon " ${menu.copy}", 0, 0, "copy" }, |
5237 | #if defined (iPlatformAppleMobile) | ||
5238 | { export_Icon " ${menu.share}", 0, 0, "copy share:1" }, | ||
5239 | #endif | ||
5230 | { "---" }, | 5240 | { "---" }, |
5231 | { close_Icon " ${menu.select.clear}", 0, 0, "document.select arg:0" }, | 5241 | { close_Icon " ${menu.select.clear}", 0, 0, "document.select arg:0" }, |
5232 | }, 3); | 5242 | }, 3); |
diff --git a/src/ui/mediaui.c b/src/ui/mediaui.c index 2aec568f..ab88c94a 100644 --- a/src/ui/mediaui.c +++ b/src/ui/mediaui.c | |||
@@ -263,6 +263,12 @@ iBool processEvent_DownloadUI(iDownloadUI *d, const SDL_Event *ev) { | |||
263 | 0, | 263 | 0, |
264 | format_CStr("!reveal path:%s", cstr_String(path)) }, | 264 | format_CStr("!reveal path:%s", cstr_String(path)) }, |
265 | #endif | 265 | #endif |
266 | #if defined (iPlatformAppleMobile) | ||
267 | { export_Icon " ${menu.share}", | ||
268 | 0, | ||
269 | 0, | ||
270 | format_CStr("!reveal path:%s", cstr_String(path)) }, | ||
271 | #endif | ||
266 | { "---" }, | 272 | { "---" }, |
267 | /* Generic items */ | 273 | /* Generic items */ |
268 | { "${menu.downloads}", 0, 0, "downloads.open newtab:1" }, | 274 | { "${menu.downloads}", 0, 0, "downloads.open newtab:1" }, |