Commit 9950e1f3 authored by Maciej Stachowiak's avatar Maciej Stachowiak
Browse files

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.
parent 873ec645
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.
......
......@@ -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
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
#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;
}
[nautilus_factory]
[ntl_file_manager_factory]
type=exe
repo_id=IDL:GNOME/GenericFactory:1.0
description=Factory for history views
location_info=nautilus
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 management view
location_info=nautilus_factory
description=File manager component
location_info=ntl_file_manager_factory
#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();
......
......@@ -33,7 +33,9 @@
void nautilus_run_self_checks()
{
#if 0
nautilus_self_check_fm_directory();
#endif
}
#endif /* ! NAUTILUS_OMIT_SELF_CHECK */
#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();
......
Supports Markdown
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