Commit c897b934 authored by Ramiro Estrugo's avatar Ramiro Estrugo

Add support for setting a reasonable default for MOZILLA_FIVE_HOME - which

* configure.in,
  acconfig.h: Add support for setting a reasonable default for
  MOZILLA_FIVE_HOME - which mozilla needs to survie.

  * components/mozilla/main.c: (mozilla_setup_environment) Add a
  function to hack the mozilla environment into something that might
  have a chance of working by default.

  * src/ntl-uri-map.c: Add a temporary hack protocol moz:// to test
  mozilla in isolation from gnome-vfs trying to do http stuff.
parent cf496b8e
2000-04-18 Ramiro Estrugo <ramiro@eazel.com>
* configure.in,
acconfig.h: Add support for setting a reasonable default for
MOZILLA_FIVE_HOME - which mozilla needs to survie.
* components/mozilla/main.c: (mozilla_setup_environment) Add a
function to hack the mozilla environment into something that might
have a chance of working by default.
* src/ntl-uri-map.c: Add a temporary hack protocol moz:// to test
mozilla in isolation from gnome-vfs trying to do http stuff.
2000-04-18 Ramiro Estrugo <ramiro@eazel.com>
* configure.in: Add voodoo to support --with-mozilla.
......
#undef MOZILLA_FIVE_HOME
#undef EAZEL_SERVICES
#undef ENABLE_NLS
#undef HAVE_CATGETS
......
......@@ -32,12 +32,15 @@
#include <libgnorba/gnorba.h>
#include <bonobo.h>
#include <stdlib.h>
static int object_count = 0;
static void
mozilla_object_destroyed(GtkObject *obj)
mozilla_object_destroyed (GtkObject *obj)
{
object_count--;
if (object_count <= 0) {
gtk_main_quit ();
}
......@@ -45,8 +48,8 @@ mozilla_object_destroyed(GtkObject *obj)
static BonoboObject *
mozilla_make_object (BonoboGenericFactory *factory,
const char *goad_id,
void *closure)
const char *goad_id,
void *closure)
{
NautilusMozillaContentView *view;
NautilusViewFrame *view_frame;
......@@ -66,12 +69,39 @@ mozilla_make_object (BonoboGenericFactory *factory,
return BONOBO_OBJECT (view_frame);
}
int main(int argc, char *argv[])
/* Do evil evil things */
static void
mozilla_hack_environment (void)
{
char *mozilla_five_home;
mozilla_five_home = g_getenv ("MOZILLA_FIVE_HOME");
if (mozilla_five_home)
{
g_free (mozilla_five_home);
}
else
{
#ifdef MOZILLA_FIVE_HOME
setenv ("MOZILLA_FIVE_HOME", MOZILLA_FIVE_HOME, TRUE);
g_print ("Hacking MOZILLA_FIVE_HOME to '%s' for your own good\n",
MOZILLA_FIVE_HOME);
#else
g_print ("There is no reasonable default for MOZILLA_FIVE_HOME. You lose.\n");
#endif
}
}
int
main (int argc, char *argv[])
{
BonoboGenericFactory *factory;
CORBA_ORB orb;
CORBA_Environment ev;
mozilla_hack_environment ();
CORBA_exception_init(&ev);
orb = gnome_CORBA_init_with_popt_table ("nautilus-mozilla-content-view", VERSION, &argc, argv, NULL, 0, NULL,
......
......@@ -98,6 +98,11 @@ then
AC_SUBST(MOZILLA_COMPONENT_CFLAGS)
AC_SUBST(MOZILLA_COMPONENT_LDFLAGS)
AC_SUBST(MOZILLA_COMPONENT_LIBS)
MOZILLA_FIVE_HOME=${mozilla_place}/dist/bin
AC_DEFINE_UNQUOTED(MOZILLA_FIVE_HOME,"$MOZILLA_FIVE_HOME")
else
AC_MSG_RESULT(no)
AC_MSG_ERROR(
......
......@@ -216,6 +216,10 @@ my_notify_when_ready (GnomeVFSAsyncHandle *ah,
} else if (nautilus_str_has_prefix (navinfo->navinfo.requested_uri, "eazel:")) {
navinfo->navinfo.content_type = g_strdup ("special/eazel-service");
result = GNOME_VFS_OK;
/* FIXME: This mozilla-hack should be short lived until http issues are solved */
} else if (nautilus_str_has_prefix (navinfo->navinfo.requested_uri, "moz:")) {
navinfo->navinfo.content_type = g_strdup ("special/mozilla-hack");
result = GNOME_VFS_OK;
}
}
......@@ -322,6 +326,12 @@ my_notify_when_ready (GnomeVFSAsyncHandle *ah,
navinfo->content_identifiers = g_slist_append
(navinfo->content_identifiers,
nautilus_view_identifier_new ("nautilus_service_startup_view", "Service"));
/* FIXME: This mozilla-hack should be short lived until http issues are solved */
} else if (strcmp(navinfo->navinfo.content_type, "special/mozilla-hack") == 0) {
fallback_iid = "nautilus_mozilla_content_view";
navinfo->content_identifiers = g_slist_append
(navinfo->content_identifiers,
nautilus_view_identifier_new ("nautilus_mozilla_content_view", "Mozilla"));
} else if (strcmp(navinfo->navinfo.content_type, "text/plain") == 0) {
fallback_iid = "embeddable:text-plain";
navinfo->content_identifiers = g_slist_append
......
......@@ -216,6 +216,10 @@ my_notify_when_ready (GnomeVFSAsyncHandle *ah,
} else if (nautilus_str_has_prefix (navinfo->navinfo.requested_uri, "eazel:")) {
navinfo->navinfo.content_type = g_strdup ("special/eazel-service");
result = GNOME_VFS_OK;
/* FIXME: This mozilla-hack should be short lived until http issues are solved */
} else if (nautilus_str_has_prefix (navinfo->navinfo.requested_uri, "moz:")) {
navinfo->navinfo.content_type = g_strdup ("special/mozilla-hack");
result = GNOME_VFS_OK;
}
}
......@@ -322,6 +326,12 @@ my_notify_when_ready (GnomeVFSAsyncHandle *ah,
navinfo->content_identifiers = g_slist_append
(navinfo->content_identifiers,
nautilus_view_identifier_new ("nautilus_service_startup_view", "Service"));
/* FIXME: This mozilla-hack should be short lived until http issues are solved */
} else if (strcmp(navinfo->navinfo.content_type, "special/mozilla-hack") == 0) {
fallback_iid = "nautilus_mozilla_content_view";
navinfo->content_identifiers = g_slist_append
(navinfo->content_identifiers,
nautilus_view_identifier_new ("nautilus_mozilla_content_view", "Mozilla"));
} else if (strcmp(navinfo->navinfo.content_type, "text/plain") == 0) {
fallback_iid = "embeddable:text-plain";
navinfo->content_identifiers = g_slist_append
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment