Re: [Nautilus-list] Nautilus and mozilla-0.9.7
- From: Christopher Blizzard <blizzard redhat com>
- To: Darin Adler <darin bentspoon com>
- Cc: Louis Garcia <louisg00 bellsouth net>, Nautilus <nautilus-list lists eazel com>, Rémi Cohen-Scali <Remi Cohen-Scali com>
- Subject: Re: [Nautilus-list] Nautilus and mozilla-0.9.7
- Date: Tue, 01 Jan 2002 14:51:17 -0500
Darin Adler wrote:
On 1/1/02 9:44 AM, "Christopher Blizzard" <blizzard redhat com> wrote:
You will probably need the patch that's included in the 1.0.6-2 rpm for
the content viewer or you will get crashes on some sites.
Can someone get me this patch so I can roll it into the stable branch of
Nautilus (and perhaps HEAD of nautilus-mozilla)?
-- Darin
Yeah, sorry about that. I should have sent that upstream. I'm a bad
bad man. :(
Patch attached. It makes sure that you set the profile path before you
try to start mozilla's embedding code. This is one of those "I can't
believe this ever worked" patches.
--Chris
--
------------
Christopher Blizzard
http://people.redhat.com/blizzard/
------------
--- nautilus-1.0.6/components/mozilla/main.c~ Tue Oct 9 17:03:21 2001
+++ nautilus-1.0.6/components/mozilla/main.c Fri Dec 28 22:38:58 2001
@@ -190,6 +190,41 @@
g_free (mozilla_path);
}
+/* The "Mozilla Profile" directory is the place where mozilla stores
+ * things like cookies and cache. Here we tell the mozilla embedding
+ * widget to use ~/.nautilus/MozillaProfile for this purpose.
+ *
+ * We need mozilla 0.8 to support this feature.
+ */
+
+static void
+set_up_mozilla_profile(void)
+{
+ const char *profile_directory_name = "MozillaProfile";
+ char *profile_base_path;
+ char *profile_path;
+ char *cache_path;
+
+ profile_base_path = g_strdup_printf ("%s/.nautilus", g_get_home_dir ());
+ profile_path = g_strdup_printf ("%s/.nautilus/%s", g_get_home_dir (), profile_directory_name);
+ cache_path = g_strdup_printf ("%s/.nautilus/%s/Cache", g_get_home_dir (), profile_directory_name);
+
+ /* Create directories if they don't already exist */
+ mkdir (profile_path, 0777);
+ mkdir (cache_path, 0777);
+
+#ifdef MOZILLA_HAVE_PROFILES_SUPPORT
+ /* this will be in Mozilla 0.8 */
+ /* Its a bug in mozilla embedding that we need to cast the const away */
+ gtk_moz_embed_set_profile_path (profile_base_path, (char *) profile_directory_name);
+#endif
+
+ g_free (cache_path);
+ g_free (profile_path);
+ g_free (profile_base_path);
+}
+
+
int
main (int argc, char *argv[])
{
@@ -201,6 +236,12 @@
DEBUG_MSG (("nautilus-mozilla-content-view: starting...\n"));
+ /* Set up the default mozilla profile directory. This has to
+ happen before push_startup below otherwise the profile
+ directory will never be set so things like the cache and
+ global history won't work. */
+ set_up_mozilla_profile();
+
/* set MOZILLA_FIVE_HOME if it's not already set */
set_up_MOZILLA_FIVE_HOME();
--- nautilus-1.0.6/components/mozilla/nautilus-mozilla-content-view.c~ Tue Oct 9 17:09:04 2001
+++ nautilus-1.0.6/components/mozilla/nautilus-mozilla-content-view.c Fri Dec 28 22:39:43 2001
@@ -234,7 +234,6 @@
guint num_strings,
const char *string);
-static void pre_widget_initialize (void);
static void post_widget_initialize (void);
/* BonoboControl callbacks */
@@ -255,8 +254,6 @@
object_class = GTK_OBJECT_CLASS (klass);
object_class->destroy = nautilus_mozilla_content_view_destroy;
-
- pre_widget_initialize ();
}
@@ -1900,46 +1897,6 @@
}
-/*
- * one-time initialization that need to happen before the first GtkMozEmbed widget
- * is created
- */
-
-/* The "Mozilla Profile" directory is the place where mozilla stores
- * things like cookies and cache. Here we tell the mozilla embedding
- * widget to use ~/.nautilus/MozillaProfile for this purpose.
- *
- * We need mozilla 0.8 to support this feature.
- */
-
-static void
-pre_widget_initialize (void)
-{
- const char *profile_directory_name = "MozillaProfile";
- char *profile_base_path;
- char *profile_path;
- char *cache_path;
-
- profile_base_path = g_strdup_printf ("%s/.nautilus", g_get_home_dir ());
- profile_path = g_strdup_printf ("%s/.nautilus/%s", g_get_home_dir (), profile_directory_name);
- cache_path = g_strdup_printf ("%s/.nautilus/%s/Cache", g_get_home_dir (), profile_directory_name);
-
- /* Create directories if they don't already exist */
- mkdir (profile_path, 0777);
- mkdir (cache_path, 0777);
-
-#ifdef MOZILLA_HAVE_PROFILES_SUPPORT
- /* this will be in Mozilla 0.8 */
- /* Its a bug in mozilla embedding that we need to cast the const away */
- gtk_moz_embed_set_profile_path (profile_base_path, (char *) profile_directory_name);
-#endif
-
- g_free (cache_path);
- g_free (profile_path);
- g_free (profile_base_path);
-}
-
-
/*
* one-time initialization that need to happen after the first GtkMozEmbed widget
* is created
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]