From 987bde721ba905f74bb0a91a23b6c511d1fea2df Mon Sep 17 00:00:00 2001 From: "radha%netscape.com" Date: Fri, 4 Sep 1998 22:52:19 +0000 Subject: [PATCH] Make the close button close the RDFChromeTreeView --- cmd/xfe/src/RDFChromeTreeView.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/cmd/xfe/src/RDFChromeTreeView.cpp b/cmd/xfe/src/RDFChromeTreeView.cpp index 784b0a23f58..7f663270ede 100644 --- a/cmd/xfe/src/RDFChromeTreeView.cpp +++ b/cmd/xfe/src/RDFChromeTreeView.cpp @@ -116,14 +116,14 @@ XFE_RDFChromeTreeView::createControlToolbar() NULL); #endif -#ifdef NOT_YET + /* closeRdfViewCBStruct * cb_str = new closeRdfViewCBStruct; cb_str->rdfview = this; cb_str->ncview = (XFE_NavCenterView *)parent_view; - - XtAddCallback(closeRDFChromeTreeView, XmNactivateCallback, (XtCallbackProc)closeRdfView_cb , (void *)cb_str); -#endif /* NOT_YET */ + */ + XtAddCallback(_closeControl, XmNactivateCallback, (XtCallbackProc)closeRdfView_cb , (void *)this); + } ////////////////////////////////////////////////////////////////////////// @@ -202,18 +202,22 @@ void XFE_RDFChromeTreeView::closeRdfView_cb(Widget /* w */, XtPointer clientData, XtPointer /* callData */) { - closeRdfViewCBStruct * obj = (closeRdfViewCBStruct *) clientData; + + XFE_RDFChromeTreeView * obj = (XFE_RDFChromeTreeView *) clientData; + + Widget parent = XtParent(obj->getBaseWidget()); + XtUnmanageChild(parent); + + + +#ifdef MOZ_SELECTOR_BAR + closeRdfViewCBStruct * obj = (closeRdfViewCBStruct *) clientData; XFE_NavCenterView * ncview = obj->ncview; - // Widget nc_base_widget = ncview->getBaseWidget(); - Widget parent = XtParent(obj->rdfview->_controlToolBar); - - + Widget selector = (Widget )ncview->getSelector(); /* XtVaSetValues(nc_base_widget, XmNresizable, True, NULL); */ XtUnmanageChild(parent); -#ifdef MOZ_SELECTOR_BAR - Widget selector = (Widget )ncview->getSelector(); XtUnmanageChild(selector); XtVaSetValues(selector, XmNrightAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM,