summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-2000041421
-rw-r--r--src/Makefile.am7
-rw-r--r--src/file-manager/Makefile.am22
-rw-r--r--src/file-manager/fm-main.c66
-rw-r--r--src/file-manager/ntl-file-manager.goad11
-rw-r--r--src/nautilus-application.c29
-rw-r--r--src/nautilus-self-check-functions.c2
-rw-r--r--src/nautilus.goad11
-rw-r--r--src/ntl-app.c29
9 files changed, 120 insertions, 78 deletions
diff --git a/ChangeLog-20000414 b/ChangeLog-20000414
index 7b3474df5..d4552fea1 100644
--- a/ChangeLog-20000414
+++ b/ChangeLog-20000414
@@ -1,5 +1,26 @@
2000-01-10 Maciej Stachowiak <mjs@eazel.com>
+ Made file manager view a CORBA server that lives in a separate
+ executable:
+
+ * src/file-manager/fm-main.c: New file which includes main()
+ function and basic framework to make the file manager an
+ executable CORBA server.
+ * src/file-manager/ntl-file-manager.goad: gnorba activation file
+ for the file manager.
+ * src/file-manager/Makefile.am: Build ntl-file-manager as an
+ executable rather than a library. Add fm-main.c to build. Install
+ ntl-file-manager.goad. Link in appropriate libraries.
+ * src/ntl-app.c: Remove nautilus_make_object() and other vestiges
+ of the attempt to be a CORBA server for file manager view objects.
+ * src/nautilus.gnorba: Removed.
+ * nautilus-self-check-functions.c: Remove call to test of
+ functions now in the separate ntl-file-manager executable.
+ * src/Makefile.am: Don't try to link in file manager. Don't try to
+ install nautilus.goad.
+
+2000-01-10 Maciej Stachowiak <mjs@eazel.com>
+
* src/ntl-main.c (main): Added missing CORBA_exception_init() call.
2000-01-09 Maciej Stachowiak <mjs@eazel.com>
diff --git a/src/Makefile.am b/src/Makefile.am
index eec68e477..2d74ca667 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,8 +10,7 @@ INCLUDES=-I$(top_srcdir) -I$(top_builddir) \
-DVERSION="\"$(VERSION)\"" \
$(WERROR)
-LDADD= file-manager/libntl-file-manager.la \
- ../libnautilus/libnautilus.la \
+LDADD= ../libnautilus/libnautilus.la \
$(BONOBO_LIBS) \
$(GNORBA_LIBS) \
$(GNOMEUI_LIBS) \
@@ -63,8 +62,4 @@ nautilus_SOURCES= \
ntl-window-state.c \
ntl-window-state.h
-goaddir=$(sysconfdir)/CORBA/servers
-goad_DATA=nautilus.goad
-EXTRA_DIST=$(goad_DATA)
-
TESTS=check-nautilus
diff --git a/src/file-manager/Makefile.am b/src/file-manager/Makefile.am
index 02f335e19..b4c122c5f 100644
--- a/src/file-manager/Makefile.am
+++ b/src/file-manager/Makefile.am
@@ -1,4 +1,6 @@
-noinst_LTLIBRARIES=libntl-file-manager.la
+# FIXME should be a shared library component or compiled in.
+
+bin_PROGRAMS = ntl-file-manager
INCLUDES=-I$(top_srcdir) -I$(top_builddir) \
$(BONOBO_CFLAGS) $(GNORBA_CFLAGS) \
@@ -6,13 +8,25 @@ INCLUDES=-I$(top_srcdir) -I$(top_builddir) \
$(GDK_PIXBUF_CFLAGS) \
$(WERROR)
+LDADD= ../../libnautilus/libnautilus.la \
+ $(BONOBO_LIBS) \
+ $(GNORBA_LIBS) \
+ $(GNOMEUI_LIBS) \
+ $(GDK_PIXBUF_LIBS) \
+ $(VFS_LIBS) \
+ $(XML_LIBS)
+
+gnorbadir = $(sysconfdir)/CORBA/servers
+gnorba_DATA = \
+ ntl-file-manager.goad
+
dfos_corba_srcs= \
GNOME_Desktop_FileOperationService.h \
GNOME_Desktop_FileOperationService-stubs.c \
GNOME_Desktop_FileOperationService-skels.c \
GNOME_Desktop_FileOperationService-common.c
-libntl_file_manager_la_SOURCES= \
+ntl_file_manager_SOURCES= \
fm-icon-cache.c \
fm-icon-cache.h \
dfos-corba.c \
@@ -29,7 +43,8 @@ libntl_file_manager_la_SOURCES= \
fm-directory.h \
fm-directory.c \
fm-vfs-directory.h \
- fm-vfs-directory.c
+ fm-vfs-directory.c \
+ fm-main.c
# noinst_PROGRAMS=gnome-desktop
@@ -69,3 +84,4 @@ BUILT_SOURCES=$(dfos_corba_srcs)
CLEAN_FILES=$(dfos_corba_srcs) dfos_corba_stamp
+EXTRA_DIST = ntl-file-manager.goad
diff --git a/src/file-manager/fm-main.c b/src/file-manager/fm-main.c
new file mode 100644
index 000000000..0732d40f5
--- /dev/null
+++ b/src/file-manager/fm-main.c
@@ -0,0 +1,66 @@
+#include "config.h"
+
+#include <libnautilus/libnautilus.h>
+
+#include "fm-directory-view.h"
+
+static int object_count = 0;
+
+static void
+do_destroy(GtkObject *obj)
+{
+ object_count--;
+ if(object_count <= 0)
+ gtk_main_quit();
+}
+
+static GnomeObject * make_obj(GnomeGenericFactory *Factory, const char *goad_id, gpointer closure)
+{
+ GtkObject *dir_view;
+ GnomeObject *ctl;
+
+ g_return_val_if_fail(!strcmp(goad_id, "ntl_file_manager"), NULL);
+
+ dir_view = gtk_object_new(fm_directory_view_get_type(), NULL);
+
+ g_return_val_if_fail(dir_view, NULL);
+
+ if(GNOME_IS_OBJECT(dir_view))
+ return GNOME_OBJECT(dir_view);
+
+ gtk_signal_connect(GTK_OBJECT(dir_view), "destroy", do_destroy, NULL);
+
+ gtk_widget_show(GTK_WIDGET(dir_view));
+
+ ctl = nautilus_view_frame_get_gnome_object(NAUTILUS_VIEW_FRAME(dir_view));
+ object_count++;
+
+ return ctl;
+}
+
+
+int main(int argc, char *argv[])
+{
+ GnomeGenericFactory *factory;
+ CORBA_ORB orb;
+ CORBA_Environment ev;
+
+ CORBA_exception_init(&ev);
+
+ if (getenv("NAUTILUS_DEBUG"))
+ g_log_set_always_fatal (G_LOG_FATAL_MASK | G_LOG_LEVEL_CRITICAL);
+
+ orb = gnome_CORBA_init_with_popt_table("ntl-file-manager", VERSION, &argc, argv, NULL, 0, NULL,
+ GNORBA_INIT_SERVER_FUNC, &ev);
+ bonobo_init(orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL);
+ g_thread_init (NULL);
+ gnome_vfs_init ();
+
+ factory = gnome_generic_factory_new_multi("ntl_file_manager_factory", make_obj, NULL);
+
+ do {
+ bonobo_main();
+ } while(object_count > 0);
+
+ return 0;
+}
diff --git a/src/file-manager/ntl-file-manager.goad b/src/file-manager/ntl-file-manager.goad
new file mode 100644
index 000000000..9d12e1906
--- /dev/null
+++ b/src/file-manager/ntl-file-manager.goad
@@ -0,0 +1,11 @@
+[ntl_file_manager_factory]
+type=exe
+repo_id=IDL:GNOME/GenericFactory:1.0
+description=File manager component's factory
+location_info=ntl-file-manager
+
+[ntl_file_manager]
+type=factory
+repo_id=IDL:GNOME/Control:1.0 IDL:Nautilus/ContentView:1.0 IDL:Nautilus/View:1.0
+description=File manager component
+location_info=ntl_file_manager_factory
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 2dd84fc77..e3c5107c6 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -1,33 +1,7 @@
#include "nautilus.h"
-#include <file-manager/fm-public-api.h>
static int window_count = 0;
-static GnomeObject *
-nautilus_make_object(GnomeGenericFactory *gfact, const char *goad_id, gpointer closure)
-{
- GtkObject *theobj = NULL;
-
- if(!strcmp(goad_id, "ntl_file_manager"))
- theobj = gtk_object_new(fm_directory_view_get_type(), NULL);
-
- if(!theobj)
- return NULL;
-
- if(GNOME_IS_OBJECT(theobj))
- return GNOME_OBJECT(theobj);
-
- if(NAUTILUS_IS_VIEW_FRAME(theobj))
- {
- gtk_widget_show(GTK_WIDGET(theobj));
- return nautilus_view_frame_get_gnome_object(NAUTILUS_VIEW_FRAME(theobj));
- }
-
- gtk_object_destroy(theobj);
-
- return NULL;
-}
-
/**
* nautilus_app_exiting:
*
@@ -50,9 +24,6 @@ nautilus_app_init(const char *initial_url)
nautilus_navinfo_init();
nautilus_prefs_load();
- /* Create our CORBA objects */
- gnome_generic_factory_new_multi("nautilus_factory", nautilus_make_object, NULL);
-
/* Set default configuration */
mainwin = nautilus_app_create_window();
bonobo_activate();
diff --git a/src/nautilus-self-check-functions.c b/src/nautilus-self-check-functions.c
index 04fe6bcd4..14d8dffe1 100644
--- a/src/nautilus-self-check-functions.c
+++ b/src/nautilus-self-check-functions.c
@@ -33,7 +33,9 @@
void nautilus_run_self_checks()
{
+#if 0
nautilus_self_check_fm_directory();
+#endif
}
#endif /* ! NAUTILUS_OMIT_SELF_CHECK */
diff --git a/src/nautilus.goad b/src/nautilus.goad
deleted file mode 100644
index 30ddeba11..000000000
--- a/src/nautilus.goad
+++ /dev/null
@@ -1,11 +0,0 @@
-[nautilus_factory]
-type=exe
-repo_id=IDL:GNOME/GenericFactory:1.0
-description=Factory for history views
-location_info=nautilus
-
-[ntl_file_manager]
-type=factory
-repo_id=IDL:GNOME/Control:1.0 IDL:Nautilus/ContentView:1.0 IDL:Nautilus/View:1.0
-description=File management view
-location_info=nautilus_factory
diff --git a/src/ntl-app.c b/src/ntl-app.c
index 2dd84fc77..e3c5107c6 100644
--- a/src/ntl-app.c
+++ b/src/ntl-app.c
@@ -1,33 +1,7 @@
#include "nautilus.h"
-#include <file-manager/fm-public-api.h>
static int window_count = 0;
-static GnomeObject *
-nautilus_make_object(GnomeGenericFactory *gfact, const char *goad_id, gpointer closure)
-{
- GtkObject *theobj = NULL;
-
- if(!strcmp(goad_id, "ntl_file_manager"))
- theobj = gtk_object_new(fm_directory_view_get_type(), NULL);
-
- if(!theobj)
- return NULL;
-
- if(GNOME_IS_OBJECT(theobj))
- return GNOME_OBJECT(theobj);
-
- if(NAUTILUS_IS_VIEW_FRAME(theobj))
- {
- gtk_widget_show(GTK_WIDGET(theobj));
- return nautilus_view_frame_get_gnome_object(NAUTILUS_VIEW_FRAME(theobj));
- }
-
- gtk_object_destroy(theobj);
-
- return NULL;
-}
-
/**
* nautilus_app_exiting:
*
@@ -50,9 +24,6 @@ nautilus_app_init(const char *initial_url)
nautilus_navinfo_init();
nautilus_prefs_load();
- /* Create our CORBA objects */
- gnome_generic_factory_new_multi("nautilus_factory", nautilus_make_object, NULL);
-
/* Set default configuration */
mainwin = nautilus_app_create_window();
bonobo_activate();