mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 10:43:24 +00:00
SHACK: builtin struct gets passed in now, and we create an XFE_BuiltinTreeView instead of an XFE_NavCenterView.
This commit is contained in:
parent
2def626ea2
commit
5135dad43b
@ -2313,11 +2313,12 @@ XFE_FreeEdgeElement (MWContext *context, LO_EdgeStruct *edge)
|
||||
XP_FREE (sashinfo);
|
||||
}
|
||||
|
||||
extern Widget fe_showRDFView (Widget w, int width, int height);
|
||||
extern Widget fe_showRDFTreeView (Widget w,
|
||||
LO_BuiltinStruct *builtin_struct);
|
||||
|
||||
void
|
||||
XFE_DisplayBuiltin (MWContext *context, int iLocation,
|
||||
LO_BuiltinStruct *builtin_struct)
|
||||
LO_BuiltinStruct *builtin_struct)
|
||||
{
|
||||
fe_Drawable *fe_drawable = CONTEXT_DATA(context)->drawable;
|
||||
Drawable drawable = fe_drawable->xdrawable;
|
||||
@ -2326,7 +2327,11 @@ XFE_DisplayBuiltin (MWContext *context, int iLocation,
|
||||
Widget view = NULL;
|
||||
int xs, ys;
|
||||
|
||||
#ifdef DEBUG_spence
|
||||
char *classid = NULL;
|
||||
char *url = NULL;
|
||||
char *target = NULL;
|
||||
|
||||
#ifdef DEBUG_mcafee
|
||||
printf ("XFE_DisplayBuiltin\n");
|
||||
#endif
|
||||
|
||||
@ -2334,8 +2339,13 @@ XFE_DisplayBuiltin (MWContext *context, int iLocation,
|
||||
|
||||
if (builtin_struct->FE_Data) return; /* been here XXX */
|
||||
|
||||
view = fe_showRDFView (CONTEXT_DATA (context)->drawing_area,
|
||||
builtin_struct->width, builtin_struct->height);
|
||||
classid = LO_GetBuiltInAttribute(builtin_struct, "classid");
|
||||
url = LO_GetBuiltInAttribute(builtin_struct, "data");
|
||||
target = LO_GetBuiltInAttribute(builtin_struct, "target");
|
||||
|
||||
view = fe_showRDFTreeView(CONTEXT_DATA (context)->drawing_area,
|
||||
builtin_struct);
|
||||
|
||||
builtin_struct->FE_Data = (void *) view;
|
||||
|
||||
/* update the window's position */
|
||||
|
@ -53,7 +53,7 @@ extern "C" char * _XmStringGetTextConcat(XmString);
|
||||
#include "xfe2_extern.h"
|
||||
|
||||
#include "Netcaster.h"
|
||||
#include "NavCenterView.h"
|
||||
#include "BuiltinTreeView.h"
|
||||
|
||||
#include "xpgetstr.h"
|
||||
|
||||
@ -2822,30 +2822,41 @@ extern "C" MWContext *FE_GetRDFContext(void) {
|
||||
*/
|
||||
|
||||
extern "C" Widget
|
||||
fe_showRDFView (Widget parent, int width, int height)
|
||||
fe_showRDFTreeView (Widget parent, LO_BuiltinStruct *builtin_struct)
|
||||
{
|
||||
MWContext *context = fe_WidgetToMWContext (parent);
|
||||
XFE_Component *toplevel = fe_frameFromMWContext (context);
|
||||
XFE_View *view = new XFE_NavCenterView (toplevel, parent, NULL, context);
|
||||
|
||||
#ifdef DEBUG_spence
|
||||
printf ("fe_showRDFView\n");
|
||||
// XFE_View *view =
|
||||
// new XFE_NavCenterView (toplevel, parent, NULL, context);
|
||||
|
||||
XFE_BuiltinTreeView *builtin =
|
||||
new XFE_BuiltinTreeView(toplevel, parent,
|
||||
NULL, context, builtin_struct);
|
||||
|
||||
#ifdef DEBUG_mcafee
|
||||
printf ("fe_showRDFTreeView\n");
|
||||
#endif
|
||||
|
||||
if (view == NULL) {
|
||||
#ifdef DEBUG_spence
|
||||
printf ("fe_showRDFView: view creation failed\n");
|
||||
if (builtin == NULL) {
|
||||
#ifdef DEBUG_mcafee
|
||||
printf ("fe_showRDFTreeView: view creation failed\n");
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_spence
|
||||
printf ("fe_showRDFView: width %d: height %d\n", width, height);
|
||||
#ifdef DEBUG_mcafee
|
||||
printf ("fe_showRDFView: width %d: height %d\n",
|
||||
builtin_struct->width,
|
||||
builtin_struct->height);
|
||||
#endif
|
||||
|
||||
XtVaSetValues (view->getBaseWidget(), XmNwidth, width, XmNheight, height, 0);
|
||||
XtVaSetValues (builtin->getBaseWidget(),
|
||||
XmNwidth, builtin_struct->width,
|
||||
XmNheight, builtin_struct->height,
|
||||
NULL);
|
||||
XtRealizeWidget (parent);
|
||||
|
||||
return (view->getBaseWidget());
|
||||
return (builtin->getBaseWidget());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user