void XFE_ComposeAttachFolderView::openAttachment(int pos) { if (pos<0 || pos>=_attachPanel->numItems()) return; // Disable preview of previously attached item. Need to resolve // inconsistency when attaching URL pointing to cgi. Preview // will reload the URL, and the return data may differ from the // data previously loaded by the mail back-end. i.e. it will // not be a useful preview. #if 0 // ensure clicked item is selected if (pos!=_attachPanel->currentSelectionPos() && _attachPanel->items()) _attachPanel->selectItem(_attachPanel->items()[pos]); XFE_AttachPanelItem *item=_attachPanel->currentSelection(); if (!item || !item->data()) return; URL_Struct *url = NET_CreateURLStruct (item->data(),NET_DONT_RELOAD); if (!MSG_RequiresBrowserWindow(url->address)) fe_GetURL(_context,url,FALSE); else fe_MakeWindow(XtParent(CONTEXT_WIDGET (_context)), _context, url, NULL, MWContextBrowser, FALSE); fe_UserActivity(_context); #endif }
void XFE_ReadAttachPanel::openCb() { if (!currentSelection()) return; const char *selData=currentSelection()->data(); if (!selData || strlen(selData)==0) return; URL_Struct *url = NET_CreateURLStruct (selData,NET_DONT_RELOAD); if (!MSG_RequiresBrowserWindow(url->address)) fe_GetURL(_context,url,FALSE); else fe_MakeWindow(XtParent(CONTEXT_WIDGET (_context)), _context, url, NULL, MWContextBrowser, FALSE); fe_UserActivity(_context); }