]>
Commit | Line | Data |
---|---|---|
894cf1ca | 1 | --- nautilus-1.0.6/components/mozilla/main.c~ Tue Oct 9 17:03:21 2001 |
2 | +++ nautilus-1.0.6/components/mozilla/main.c Fri Dec 28 22:38:58 2001 | |
3 | @@ -190,6 +190,41 @@ | |
4 | g_free (mozilla_path); | |
5 | } | |
6 | ||
7 | +/* The "Mozilla Profile" directory is the place where mozilla stores | |
8 | + * things like cookies and cache. Here we tell the mozilla embedding | |
9 | + * widget to use ~/.nautilus/MozillaProfile for this purpose. | |
10 | + * | |
11 | + * We need mozilla 0.8 to support this feature. | |
12 | + */ | |
13 | + | |
14 | +static void | |
15 | +set_up_mozilla_profile(void) | |
16 | +{ | |
17 | + const char *profile_directory_name = "MozillaProfile"; | |
18 | + char *profile_base_path; | |
19 | + char *profile_path; | |
20 | + char *cache_path; | |
21 | + | |
22 | + profile_base_path = g_strdup_printf ("%s/.nautilus", g_get_home_dir ()); | |
23 | + profile_path = g_strdup_printf ("%s/.nautilus/%s", g_get_home_dir (), profile_directory_name); | |
24 | + cache_path = g_strdup_printf ("%s/.nautilus/%s/Cache", g_get_home_dir (), profile_directory_name); | |
25 | + | |
26 | + /* Create directories if they don't already exist */ | |
27 | + mkdir (profile_path, 0777); | |
28 | + mkdir (cache_path, 0777); | |
29 | + | |
30 | +#ifdef MOZILLA_HAVE_PROFILES_SUPPORT | |
31 | + /* this will be in Mozilla 0.8 */ | |
32 | + /* Its a bug in mozilla embedding that we need to cast the const away */ | |
33 | + gtk_moz_embed_set_profile_path (profile_base_path, (char *) profile_directory_name); | |
34 | +#endif | |
35 | + | |
36 | + g_free (cache_path); | |
37 | + g_free (profile_path); | |
38 | + g_free (profile_base_path); | |
39 | +} | |
40 | + | |
41 | + | |
42 | int | |
43 | main (int argc, char *argv[]) | |
44 | { | |
45 | @@ -201,6 +236,12 @@ | |
46 | ||
47 | DEBUG_MSG (("nautilus-mozilla-content-view: starting...\n")); | |
48 | ||
49 | + /* Set up the default mozilla profile directory. This has to | |
50 | + happen before push_startup below otherwise the profile | |
51 | + directory will never be set so things like the cache and | |
52 | + global history won't work. */ | |
53 | + set_up_mozilla_profile(); | |
54 | + | |
55 | /* set MOZILLA_FIVE_HOME if it's not already set */ | |
56 | set_up_MOZILLA_FIVE_HOME(); | |
57 | ||
58 | --- nautilus-1.0.6/components/mozilla/nautilus-mozilla-content-view.c~ Tue Oct 9 17:09:04 2001 | |
59 | +++ nautilus-1.0.6/components/mozilla/nautilus-mozilla-content-view.c Fri Dec 28 22:39:43 2001 | |
60 | @@ -234,7 +234,6 @@ | |
61 | guint num_strings, | |
62 | const char *string); | |
63 | ||
64 | -static void pre_widget_initialize (void); | |
65 | static void post_widget_initialize (void); | |
66 | ||
67 | /* BonoboControl callbacks */ | |
68 | @@ -255,8 +254,6 @@ | |
69 | object_class = GTK_OBJECT_CLASS (klass); | |
70 | ||
71 | object_class->destroy = nautilus_mozilla_content_view_destroy; | |
72 | - | |
73 | - pre_widget_initialize (); | |
74 | } | |
75 | ||
76 | ||
77 | @@ -1900,46 +1897,6 @@ | |
78 | } | |
79 | ||
80 | ||
81 | -/* | |
82 | - * one-time initialization that need to happen before the first GtkMozEmbed widget | |
83 | - * is created | |
84 | - */ | |
85 | - | |
86 | -/* The "Mozilla Profile" directory is the place where mozilla stores | |
87 | - * things like cookies and cache. Here we tell the mozilla embedding | |
88 | - * widget to use ~/.nautilus/MozillaProfile for this purpose. | |
89 | - * | |
90 | - * We need mozilla 0.8 to support this feature. | |
91 | - */ | |
92 | - | |
93 | -static void | |
94 | -pre_widget_initialize (void) | |
95 | -{ | |
96 | - const char *profile_directory_name = "MozillaProfile"; | |
97 | - char *profile_base_path; | |
98 | - char *profile_path; | |
99 | - char *cache_path; | |
100 | - | |
101 | - profile_base_path = g_strdup_printf ("%s/.nautilus", g_get_home_dir ()); | |
102 | - profile_path = g_strdup_printf ("%s/.nautilus/%s", g_get_home_dir (), profile_directory_name); | |
103 | - cache_path = g_strdup_printf ("%s/.nautilus/%s/Cache", g_get_home_dir (), profile_directory_name); | |
104 | - | |
105 | - /* Create directories if they don't already exist */ | |
106 | - mkdir (profile_path, 0777); | |
107 | - mkdir (cache_path, 0777); | |
108 | - | |
109 | -#ifdef MOZILLA_HAVE_PROFILES_SUPPORT | |
110 | - /* this will be in Mozilla 0.8 */ | |
111 | - /* Its a bug in mozilla embedding that we need to cast the const away */ | |
112 | - gtk_moz_embed_set_profile_path (profile_base_path, (char *) profile_directory_name); | |
113 | -#endif | |
114 | - | |
115 | - g_free (cache_path); | |
116 | - g_free (profile_path); | |
117 | - g_free (profile_base_path); | |
118 | -} | |
119 | - | |
120 | - | |
121 | /* | |
122 | * one-time initialization that need to happen after the first GtkMozEmbed widget | |
123 | * is created |