From 4cbd36c8b5903b0d6e95b2e7f7ace11840abedbb Mon Sep 17 00:00:00 2001 From: "blizzard%appliedtheory.com" Date: Thu, 24 Sep 1998 20:28:56 +0000 Subject: [PATCH] Add changes from Michael O'Reilly which initialize RDF and point the RDF progress info at a dummy frame. git-svn-id: svn://10.0.0.236/trunk@10943 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cmd/gnomefe/gnome-lock.c | 1 + mozilla/cmd/gnomefe/gnome-rdf.c | 8 ++++++++ mozilla/cmd/gnomefe/main.c | 29 +++++++++++++++++++++++++---- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/mozilla/cmd/gnomefe/gnome-lock.c b/mozilla/cmd/gnomefe/gnome-lock.c index 878177391e3..bc76d392273 100644 --- a/mozilla/cmd/gnomefe/gnome-lock.c +++ b/mozilla/cmd/gnomefe/gnome-lock.c @@ -2,6 +2,7 @@ #include "xpgetstr.h" #include +#include #ifdef NSPR20 #include "private/prpriv.h" /* for PR_NewNamedMonitor */ diff --git a/mozilla/cmd/gnomefe/gnome-rdf.c b/mozilla/cmd/gnomefe/gnome-rdf.c index b34657b55aa..ac3805b3b49 100644 --- a/mozilla/cmd/gnomefe/gnome-rdf.c +++ b/mozilla/cmd/gnomefe/gnome-rdf.c @@ -24,8 +24,16 @@ #include "xp_core.h" #include "structs.h" #include "ntypes.h" +#include "g-browser-frame.h" MWContext* FE_GetRDFContext() { + MozBrowserFrame * frame; + frame = moz_browser_frame_create(); + + moz_frame_show(MOZ_FRAME(frame)); + + printf("FE_GetRDFContext (done?)\n"); + return moz_frame_get_context(MOZ_FRAME(frame)); } diff --git a/mozilla/cmd/gnomefe/main.c b/mozilla/cmd/gnomefe/main.c index 7e5eb1ce742..c8bf9627e11 100644 --- a/mozilla/cmd/gnomefe/main.c +++ b/mozilla/cmd/gnomefe/main.c @@ -25,10 +25,12 @@ #include "net.h" #include "plevent.h" #include "xp.h" +#include "rdf.h" #include "g-browser-frame.h" extern char *fe_home_dir; +extern char *fe_config_dir; gint gnomefe_depth; GdkVisual *gnomefe_visual; @@ -135,6 +137,10 @@ main(int argc, *slash = '\0'; } + /* Hmm. XFE claims InitNetLib needs to happen before pref init */ + /* The unit for tcp buffer size is changed from kbytes to bytes */ + NET_InitNetLib (8192, 50); + { char buf [1024]; PR_snprintf (buf, sizeof (buf), "%s/%s", fe_home_dir, @@ -164,17 +170,32 @@ main(int argc, GH_InitGlobalHistory(); - /* The unit for tcp buffer size is changed from kbytes to bytes */ - NET_InitNetLib (8192, 50); - IL_Init(); LM_InitMocha (); - NPL_Init(); initial_frame = moz_browser_frame_create(); moz_frame_show(MOZ_FRAME(initial_frame)); + /* Initialize RDF */ + { + RDF_InitParamsStruct rdf_params = {0, }; + + rdf_params.profileURL = + XP_PlatformFileToURL(fe_config_dir); + rdf_params.bookmarksURL = + XP_PlatformFileToURL(fe_GetConfigDirFilename("bookmarks.html")); + rdf_params.globalHistoryURL = + XP_PlatformFileToURL(fe_GetConfigDirFilename("history.db")); + + RDF_Init(&rdf_params); + + XP_FREEIF(rdf_params.profileURL); + XP_FREEIF(rdf_params.bookmarksURL); + XP_FREEIF(rdf_params.globalHistoryURL); + } + NPL_Init(); + if(argc > 1) url = NET_CreateURLStruct(argv[1], NET_NORMAL_RELOAD); else