Пример #1
0
void XFE_ComposeAttachFolderView::updateAttachments()
{
    if (!getPane())
        return;

    // abort if attachment adding or delivery is in progress
    if (!verifySafeToAttach())
        return;

    // add to list
    _attachments[_numAttachments].url=NULL;
    MSG_SetAttachmentList(getPane(),_attachments);
}
Пример #2
0
void
XFE_LdapSearchView::prepSearchScope()
{

  DIR_Server *dir = getDirServer();
  XP_ASSERT(dir!= NULL);
  MSG_AddLdapScope( getPane(), dir);
}
Пример #3
0
void Splitter::setPaneSize(xpr_sint_t aRow, xpr_sint_t aColumn, CSize aPaneSize)
{
    Pane *sPane = getPane(aRow, aColumn);
    if (XPR_IS_NULL(sPane))
        return;

    sPane->mPaneSize = aPaneSize;
}
Пример #4
0
/*
 * Append selected search results to an address folder view.
 * This is called as result of dragging from the LDAP search view
 * to a compose window address area.
 */
void
XFE_LdapSearchView::addSelectedToAddressPane(XFE_AddressFolderView* addr, SEND_STATUS fieldStatus)
{
  int count = 0;
  const int *indices = 0;
  m_outliner->getSelection(&indices, &count);

  if (count==0)
    return;

  /* pack selected
   */
  ABAddrMsgCBProcStruc *pairs =
      (ABAddrMsgCBProcStruc *) XP_CALLOC(1,sizeof(ABAddrMsgCBProcStruc));
  pairs->m_pairs = (StatusID_t **) XP_CALLOC(count, sizeof(StatusID_t*));

  MSG_ResultElement *resultLine = NULL;
  for (int i=0; i < count; i++) {
	  if (SearchError_Success != 
		  MSG_GetResultElement(getPane(), indices[i], &resultLine)) 
		  continue;

	  StatusID_t *pair;
	  pair = (StatusID_t *) XP_CALLOC(1, sizeof(StatusID_t));
	  pair->status = fieldStatus;
	  pair->type = ABTypePerson;

	  // email
	  MSG_SearchValue *result;
	  if ((SearchError_Success == MSG_GetResultAttribute(resultLine,attrib822Address,&result))&&
		  result &&
		  result->u.string) {
		  pair->emailAddr = XP_STRDUP(result->u.string);
		  MSG_DestroySearchValue(result);
	  }

	  // fullname
	  MSG_GetResultAttribute(resultLine, attribCommonName, &result);
	  
	  // assemble
	  if (strlen(pair->emailAddr) && 
		  result && 
		  result->u.string) {
		  char tmp[AB_MAX_STRLEN];
		  sprintf(tmp, "%s <%s>", result->u.string, pair->emailAddr);
		  pair->dplyStr = XP_STRDUP(tmp);
		  MSG_DestroySearchValue(result);
	  }
	  else
		  pair->dplyStr = XP_STRDUP(result->u.string);
      
	  pairs->m_pairs[pairs->m_count] = pair;
	  (pairs->m_count)++;
  }
  if (pairs && pairs->m_count) {
      addr->addrMsgCB(pairs);
  }
}
Пример #5
0
CWnd *Splitter::getPaneWnd(xpr_sint_t aRow, xpr_sint_t aColumn) const
{
    Pane *sPane = getPane(aRow, aColumn);
    if (XPR_IS_NULL(sPane))
        return XPR_FALSE;

    CWnd *sPaneWnd = sPane->mPaneWnd;

    return sPaneWnd;
}
Пример #6
0
xpr_bool_t Splitter::getPaneRect(xpr_sint_t aRow, xpr_sint_t aColumn, CRect &aPaneRect) const
{
    Pane *sPane = getPane(aRow, aColumn);
    if (XPR_IS_NULL(sPane))
        return XPR_FALSE;

    aPaneRect = sPane->mPaneRect;

    return XPR_TRUE;
}
Пример #7
0
xpr_bool_t Splitter::getPaneSize(xpr_sint_t aRow, xpr_sint_t aColumn, CSize &aPaneSize) const
{
    Pane *sPane = getPane(aRow, aColumn);
    if (XPR_IS_NULL(sPane))
        return XPR_FALSE;

    aPaneSize = sPane->mPaneSize;

    return XPR_TRUE;
}
Пример #8
0
CWnd *Splitter::getLastActivedPane(xpr_sint_t *aRow, xpr_sint_t *aColumn) const
{
    if (XPR_IS_NOT_NULL(aRow   )) *aRow    = mLastActivedPaneRow;
    if (XPR_IS_NOT_NULL(aColumn)) *aColumn = mLastActivedPaneColumn;

    Pane *sPane = getPane(mLastActivedPaneRow, mLastActivedPaneColumn);
    if (XPR_IS_NULL(sPane))
        return XPR_NULL;

    return sPane->mPaneWnd;
}
Пример #9
0
void Splitter::setFocus(void)
{
    Pane *sPane = getPane(mActivedPaneRow, mActivedPaneColumn);
    if (XPR_IS_NULL(sPane))
        return;

    CWnd *sPaneWnd = sPane->mPaneWnd;
    if (XPR_IS_NOT_NULL(sPaneWnd))
    {
        sPaneWnd->SetFocus();
    }
}
Пример #10
0
void XFE_ComposeAttachFolderView::addExistingAttachments()
{
    // we're only going to do this once per window
    if (_addedExistingAttachments)
        return;
    
    // add pre-existing attachments to the icon panel (e.g. during msg forward)
    const struct MSG_AttachmentData *al=MSG_GetAttachmentList(getPane());
    if (al) {
        while(al->url) {
            addAttachment(al->url,TRUE); // set 'pre_exisiting' flag - don't add to internal list
            al++;
        }
    }
}
Пример #11
0
int XFE_ComposeAttachFolderView::verifySafeToAttach()
{
#if 0
    // this check is no longer needed - back end can handle
    // multiple simultaneous attachment operations
    if (MSG_DeliveryInProgress(getPane())) {
        char *msg=PR_smprintf(XP_GetString(XFE_MN_DELIVERY_IN_PROGRESS));
        if (msg) {
            fe_Alert_2(getBaseWidget(),msg);
            XP_FREE(msg);
        }
        return FALSE;
    }
#endif
    return TRUE;
}
Пример #12
0
void 
XFE_LdapSearchView::toAddrBookCB(Widget /* w */, XtPointer /* callData */)
{
	/* need to check if selections are in personal address book
	 * already 
	 */
  int count = 0; // = XmLGridGetSelectedRowCount(w);
  const int *indices = 0;
  m_outliner->getSelection(&indices, &count);
  if (!count)
    return;

  if (SearchError_Success !=
	  MSG_AddLdapResultsToAddressBook(getPane(), 
									  (MSG_ViewIndex *) indices, 
									  count))
	  XP_ASSERT(0);

}/* XFE_LdapSearchView::toAddrBookCB() */
Пример #13
0
void Splitter::showPane(xpr_bool_t aShow)
{
    xpr_sint_t i, j;
    Pane *sPane;

    for (i = 0; i < mRowCount; ++i)
    {
        for (j = 0; j < mColumnCount; ++j)
        {
            sPane = getPane(i, j);
            if (XPR_IS_NULL(sPane))
                continue;

            if (XPR_IS_NOT_NULL(sPane->mPaneWnd))
            {
                sPane->mPaneWnd->ShowWindow(XPR_IS_TRUE(aShow) ? SW_SHOW : SW_HIDE);
            }
        }
    }
}
Пример #14
0
xpr_bool_t Splitter::getSplitterRect(xpr_sint_t aSplitterIndex, CRect &aSplitterRect, xpr_bool_t *aHorzSplitter, xpr_sint_t *aRow, xpr_sint_t *aColumn) const
{
    xpr_sint_t sRow    = 0;
    xpr_sint_t sColumn = 0;
    xpr_bool_t sHorzSplitter = XPR_FALSE;

    if (mColumnCount > 1)
    {
        sRow    = aSplitterIndex / (mColumnCount - 1);
        sColumn = aSplitterIndex % (mColumnCount - 1);
    }
    else
    {
        sHorzSplitter = XPR_TRUE;
    }

    if (sRow > 0)
    {
        sRow    = aSplitterIndex - (mColumnCount - 1);
        sColumn = 0;

        sHorzSplitter = XPR_TRUE;
    }

    Pane *sPane = getPane(sRow, sColumn);
    if (XPR_IS_NULL(sPane))
        return XPR_FALSE;

    if (XPR_IS_FALSE(sHorzSplitter))
        aSplitterRect = sPane->mVertSplitterRect;
    else
        aSplitterRect = sPane->mHorzSplitterRect;

    if (XPR_IS_NOT_NULL(aHorzSplitter))
        *aHorzSplitter = sHorzSplitter;

    if (XPR_IS_NOT_NULL(aRow   )) *aRow    = sRow;
    if (XPR_IS_NOT_NULL(aColumn)) *aColumn = sColumn;

    return XPR_TRUE;
}
Пример #15
0
void 
XFE_LdapSearchView::toComposeCB(Widget /* w */, XtPointer /* callData */)
{

	/* Get all selections; pack them and ..
	 *  AddrBookFrame::
	 */
  /* Need to mimic ...
   */
  int count = 0; // = XmLGridGetSelectedRowCount(w);
  const int *indices = 0;
  m_outliner->getSelection(&indices, &count);
  if (!count)
    return;

  if (SearchError_Success != 
	  MSG_ComposeFromLdapResults(getPane(), 
								 (MSG_ViewIndex *) indices, 
								 count))
	  XP_ASSERT(0);
}/* XFE_LdapSearchView::toComposeCB() */
Пример #16
0
xpr_bool_t Splitter::setActivePane(xpr_sint_t aRow, xpr_sint_t aColumn)
{
    Pane *sPane = getPane(aRow, aColumn);
    if (XPR_IS_NULL(sPane))
        return XPR_FALSE;

    if (aRow == mActivedPaneRow && aColumn == mActivedPaneColumn)
        return XPR_TRUE;

    // last actived pane
    mLastActivedPaneRow    = mActivedPaneRow;
    mLastActivedPaneColumn = mActivedPaneColumn;

    // new actived pane
    mActivedPaneRow    = aRow;
    mActivedPaneColumn = aColumn;

    CWnd *sPaneWnd = sPane->mPaneWnd;
    if (XPR_IS_NOT_NULL(sPaneWnd))
    {
        CView *sView = dynamic_cast<CView *>(sPaneWnd);
        CFrameWnd *sFrameWnd = dynamic_cast<CFrameWnd *>(sPaneWnd->GetParent());

        if (XPR_IS_NOT_NULL(sView) && XPR_IS_NOT_NULL(sFrameWnd))
            sFrameWnd->SetActiveView(sView);
        else
            sPaneWnd->SetFocus();
    }

    // evaluate last actived pane
    evaluateLastActivedPane(aRow, aColumn);

    if (XPR_IS_NOT_NULL(mObserver))
    {
        mObserver->onSplitterActivedPane(*this, mActivedPaneRow, mActivedPaneColumn);
    }

    return XPR_TRUE;
}
Пример #17
0
void 
XFE_LdapSearchView::doubleClick(const OutlineButtonFuncData *data)
{
   MSG_ViewIndex index;
   MSG_ResultElement *elem = NULL;
   // Do nothing
   if (data->clicks == 2 )
   {
	m_outliner->selectItemExclusive(data->row);
	toggleActionButtonState(True);
	index = (MSG_ViewIndex)(data->row);
        MSG_GetResultElement(getPane(), index, &elem );

	// Always create a new frame for each result
	m_browserFrame = new XFE_BrowserFrame(
			XtParent(getToplevel()->getBaseWidget()), 
			   ViewGlue_getFrame(m_contextData), NULL);
        m_searchpane = ((XFE_MsgView*)(m_browserFrame->getView()))->getPane();
        MSG_OpenResultElement(elem, m_browserFrame->getContext());
	m_browserFrame->show();
   }
}
bb::cascades::TabbedPane* TiUITabGroupProxy::getTabbedPane()
{
	return static_cast<bb::cascades::TabbedPane*>(getPane());
}
Пример #19
0
void DragFrameShape::draw_Frame(const DrawBuf &buf,DragType drag_type) const
 {
  Pane part=getPane(drag_type);

  draw_Frame(buf.cut(part),part);
 }