Really make the selector bar buttons work, so that people outside xfe can use

RDF bookmarks etc....
The images don't show up on the selector bar buttons
for some reason. Shall fix it later.
This commit is contained in:
radha%netscape.com 1998-09-28 23:11:12 +00:00
Родитель 794faca1bb
Коммит 3fef6b150f
3 изменённых файлов: 31 добавлений и 8 удалений

Просмотреть файл

@ -111,9 +111,10 @@ XFE_BrowserView::showNavCenter()
this,
m_contextData);
#ifndef MOZ_SELECTOR_BAR
// hack! Load something for now. Eventually tie to toolbar
_navCenterView->newBookmarksPane();
#endif
// Add _navCenterView to the sub-view list of browser view
addView(_navCenterView);
}

Просмотреть файл

@ -135,7 +135,13 @@ XFE_NavCenterView::notify(HT_Resource n,
void
XFE_NavCenterView::finishPaneCreate()
{
#ifdef MOZ_SELECTOR_BAR
HT_SetPaneFEData(_ht_pane, this);
_ht_view = HT_GetSelectedView(_ht_pane);
#else
XFE_RDFBase::finishPaneCreate();
#endif
// This function takes a valid MWContext argument only when the
// NavCenterView is docked. However, we need a HT_Pane-to-context
@ -271,7 +277,7 @@ XFE_NavCenterView::addHTView(HT_View htview)
XmNpixmapMask, mask,
XmNwidth, (unsigned int)(w = rdfImage->getImageWidth()),
XmNheight, (unsigned int)(h = rdfImage->getImageHeight()),
XmNbuttonLayout, XmBUTTON_PIXMAP_ONLY,
/* XmNbuttonLayout, XmBUTTON_PIXMAP_ONLY, */
NULL);
@ -299,15 +305,30 @@ XFE_NavCenterView::addHTView(HT_View htview)
//////////////////////////////////////////////////////////////////////
void
XFE_NavCenterView::selector_activate_cb(Widget /* w */,
XtPointer /* clientData */,
XtPointer clientData ,
XtPointer /* callData */)
{
// HT_View htView = (HT_View)clientData;
// HT_Pane htPane = HT_GetPane(htView);
HT_View htView = (HT_View)clientData;
HT_Pane htPane = HT_GetPane(htView);
XFE_NavCenterView * nc = (XFE_NavCenterView *)HT_GetPaneFEData(htPane);
nc->setRdfTree(htView);
}
//////////////////////////////////////////////////////////////////////
void
XFE_NavCenterView::setRdfTree(HT_View view)
{
Widget toolbar;
// WidgetList tool_items = NULL;
XtVaGetValues(_selector,XmNtoolBar,&toolbar,NULL);
//XfeToolBarSetSelectedButton(toolbar, xxx);
HT_SetSelectedView(_ht_pane, view);
_ht_view = view;
// XFE_NavCenterView * nc = (XFE_NavCenterView *)HT_GetPaneFEData(htPane);
// nc->setRdftree(htView);
}
//////////////////////////////////////////////////////////////////////
Widget
@ -384,7 +405,7 @@ XFE_NavCenterView::image_complete_cb(XtPointer client_data)
XtVaSetValues(button,/* XmNheight,(cb->height + b_height), */
XmNpixmap, cb->image,
XmNpixmapMask, cb->mask,
XmNbuttonLayout, XmBUTTON_PIXMAP_ONLY,
/* XmNbuttonLayout, XmBUTTON_PIXMAP_ONLY, */
NULL);
XtManageChild(button);
XP_FREE(cb);

Просмотреть файл

@ -56,6 +56,7 @@ public:
virtual void handleImageComplete (Widget, IL_Pixmap *);
#ifdef MOZ_SELECTOR_BAR
static void image_complete_cb (XtPointer);
void setRdfTree(HT_View);
#endif
protected: