Example #1
0
/* static */ void
XFE_Toolbox::newItemCallback(Widget		/* w */,
							 XtPointer	clientData,
							 XtPointer	callData)
{
	XFE_Toolbox *				tb = (XFE_Toolbox *) clientData;
	XfeToolBoxCallbackStruct *	cbs = (XfeToolBoxCallbackStruct *) callData;

	XP_ASSERT( tb != NULL );

	// Add a tool tip to the tab
	fe_WidgetAddToolTips(cbs->closed_tab);
	fe_WidgetAddToolTips(cbs->opened_tab);
}
Example #2
0
void XFE_ComposeAttachFolderView::createWidgets(Widget parent)
{
    // create attachment folder form
    Widget form=XmCreateForm(parent,"attachForm",NULL,0);

    // create attachment panel
    _attachPanel=new XFE_ComposeAttachPanel(this,_context);
    _attachPanel->createWidgets(form);
    _attachPanel->show();
    XtVaSetValues(_attachPanel->getBaseWidget(),
                  XmNleftAttachment,XmATTACH_FORM,
                  XmNrightAttachment,XmATTACH_FORM,
                  XmNtopAttachment,XmATTACH_FORM,
                  XmNbottomAttachment,XmATTACH_FORM,
                  NULL);

#if !defined(USE_MOTIF_DND)
    // create drop site for internal drop (message,news etc.)
    fe_dnd_CreateDrop(_attachPanel->getBaseWidget(),AttachDropCb,this);
#endif /* USE_MOTIF_DND */

    // create popup menu
    _xfePopup = new XFE_PopupMenu("popup",(XFE_Frame*)m_toplevel,_attachPanel->pane(),NULL);
    _xfePopup->addMenuSpec(attachPopupMenuSpec);

	// Remove the osfLeft and osfRight translations of the popup's children.
	// For bug 71620.  See the bug description for details.  Basically, for
	// some strange reason, motif assumes that either a left or a right 
	// naviation widget exists for this popup menu and core dumps trying 
	// to dereference a NULL widget.
    _xfePopup->removeLeftRightTranslations();

    setBaseWidget(form);

    // Register this widget to have a tooltip.
    fe_WidgetAddToolTips(form);
    
    // add existing attachments to the panel (e.g. for Forward)
    addExistingAttachments();
}