summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2000-07-07 20:06:04 +0000
committerDarin Adler <darin@src.gnome.org>2000-07-07 20:06:04 +0000
commitc717f714b4c293e19ac06ae0a46ba2b1eb5b04d7 (patch)
tree1bc9975d4088ae340fecf2d39524a4b8c39788f0 /src
parentc2cfad09b8fc6227962e375a9b3a6d44f8d52216 (diff)
downloadnautilus-c717f714b4c293e19ac06ae0a46ba2b1eb5b04d7.tar.gz
Removed the obsolete Nautilus/ContentView and Nautilus/MetaView.
* components/hardware/nautilus-hardware-view.oafinfo: * components/help/help-contents.oafinfo: * components/help/help-index.oafinfo: * components/help/help-search.oafinfo: * components/history/nautilus-history-view.oafinfo: * components/html/ntl-web-browser.oafinfo: * components/loser/content/nautilus-content-loser.oafinfo: * components/loser/sidebar/nautilus-sidebar-loser.oafinfo: * components/mozilla/nautilus-mozilla-content-view.oafinfo: * components/music/nautilus-music-view.oafinfo: * components/notes/nautilus-notes.oafinfo: * components/rpmview/nautilus-rpm-view.oafinfo: * components/sample/nautilus-sample-content-view.oafinfo: * components/services/inventory/nautilus-view/nautilus-inventory-view.oafinfo: * components/services/login/nautilus-view/nautilus-login-view.oafinfo: * components/services/startup/nautilus-view/nautilus-service-startup-view.oafinfo: * components/services/summary/nautilus-view/nautilus-summary-view.oafinfo: * components/services/time/nautilus-view/trilobite-eazel-time-view.oafinfo: * components/services/trilobite/sample/nautilus-view/nautilus-sample-service-view.oafinfo: * components/shell/shell.oafinfo: * components/tree/nautilus-tree-view.oafinfo: * components/websearch/ntl-web-search.oafinfo: Removed the obsolete Nautilus/ContentView and Nautilus/MetaView. * components/services/install/command-line/.cvsignore: Added a generated file. * libnautilus-extensions/nautilus-directory-async.c: (metafile_read_done), (allow_metafile), (nautilus_directory_request_read_metafile): Another quick cut at leaving out metafiles for some schemes. (dequeue_pending_idle_callback): Get rid of "pending file info is NULL!" message and "approve" the change that made Maciej put it in. * libnautilus/nautilus-view.c: (nautilus_uri_list_from_g_list): Use CORBA_TRUE to truly use CORBA correctly. * src/nautilus-shell-interface.idl: * src/.cvsignore: * src/Makefile.am: * src/nautilus.oafinfo: * src/nautilus-shell.h: * src/nautilus-shell.c: (nautilus_shell_initialize_class), (nautilus_shell_get_epv), (nautilus_shell_get_vepv), (nautilus_shell_create_servant), (nautilus_shell_initialize), (destroy), (nautilus_shell_new), (display_caveat), (display_caveat_first_time), (open_window), (corba_open_windows), (corba_open_default_window), (corba_manage_desktop): Added a new CORBA file for the interface of the Nautilus shell itself and a class for a server side of it. Moved some code in here from NautilusApplication. * src/nautilus-application.c: (manufactures), (create_object), (create_factory), (nautilus_application_initialize), (nautilus_strv_length), (nautilus_make_uri_list_from_strv), (nautilus_application_startup): Moved the IID strings into constants for easier code reading. Added the code that can yield up the shell object, although it's not used yet. Changed startup code to use the NautilusShell object to do the work. This doesn't work cross-process yet, but it's ready to. * src/nautilus-window.h: * src/nautilus-window.c: (nautilus_window_initialize_class), (nautilus_window_initialize), (goto_uri_callback), (navigation_bar_mode_changed_callback), (nautilus_window_constructed), (nautilus_window_destroy), (nautilus_window_realize): Misc. cleanup, including getting rid of the strange old way of doing parent_class.
Diffstat (limited to 'src')
-rw-r--r--src/.cvsignore5
-rw-r--r--src/Makefile.am29
-rw-r--r--src/Nautilus_shell.oaf.in87
-rw-r--r--src/Nautilus_shell.server.in87
-rw-r--r--src/nautilus-application.c370
-rw-r--r--src/nautilus-navigation-window.c148
-rw-r--r--src/nautilus-navigation-window.h1
-rw-r--r--src/nautilus-object-window.c148
-rw-r--r--src/nautilus-object-window.h1
-rw-r--r--src/nautilus-shell-interface.idl19
-rw-r--r--src/nautilus-shell.c271
-rw-r--r--src/nautilus-shell.h57
-rw-r--r--src/nautilus-spatial-window.c148
-rw-r--r--src/nautilus-spatial-window.h1
-rw-r--r--src/nautilus-window.c148
-rw-r--r--src/nautilus-window.h1
-rw-r--r--src/nautilus.oafinfo87
17 files changed, 895 insertions, 713 deletions
diff --git a/src/.cvsignore b/src/.cvsignore
index 6f9d08a95..c8c97c5ef 100644
--- a/src/.cvsignore
+++ b/src/.cvsignore
@@ -3,3 +3,8 @@
Makefile
Makefile.in
nautilus
+nautilus-shell-interface-common.c
+nautilus-shell-interface-skels.c
+nautilus-shell-interface-stubs.c
+nautilus-shell-interface.h
+nautilus_shell_interface_idl_stamp
diff --git a/src/Makefile.am b/src/Makefile.am
index 517822b9e..050f5a8c7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,6 +37,14 @@ LDADD =\
$(XML_LIBS) \
$(NULL)
+nautilus_shell_interface_idl_sources = \
+ nautilus-shell-interface-stubs.c \
+ nautilus-shell-interface-skels.c \
+ nautilus-shell-interface.h \
+ nautilus-shell-interface-common.c
+
+BUILT_SOURCES = $(nautilus_shell_interface_idl_sources)
+
noinst_HEADERS = \
nautilus-applicable-views.h \
nautilus-application.h \
@@ -53,6 +61,7 @@ noinst_HEADERS = \
nautilus-search-bar-private.h \
nautilus-search-bar.h \
nautilus-self-check-functions.h \
+ nautilus-shell.h \
nautilus-sidebar-tabs.h \
nautilus-sidebar-title.h \
nautilus-sidebar.h \
@@ -68,7 +77,8 @@ noinst_HEADERS = \
nautilus-zoom-control.h \
$(NULL)
-nautilus_SOURCES =\
+nautilus_SOURCES = \
+ $(nautilus_shell_interface_idl_sources) \
nautilus-applicable-views.c \
nautilus-application.c \
nautilus-bookmark-list.c \
@@ -85,6 +95,7 @@ nautilus_SOURCES =\
nautilus-search-bar-criterion.c \
nautilus-search-bar.c \
nautilus-self-check-functions.c \
+ nautilus-shell.c \
nautilus-sidebar-tabs.c \
nautilus-sidebar-title.c \
nautilus-sidebar.c \
@@ -105,13 +116,27 @@ nautilus_SOURCES =\
nautilus-zoomable-frame-corba.c \
$(NULL)
+$(nautilus_shell_interface_idl_sources): nautilus_shell_interface_idl_stamp
+nautilus_shell_interface_idl_stamp: nautilus-shell-interface.idl
+ $(ORBIT_IDL) $(IDL_CFLAGS) -I.. nautilus-shell-interface.idl
+ touch nautilus_shell_interface_idl_stamp
+
TESTS=check-nautilus
oafdir = $(datadir)/oaf
oaf_DATA = \
nautilus.oafinfo
-EXTRA_DIST = $(oaf_DATA) run-nautilus
+CLEANFILES = \
+ $(nautilus_shell_interface_idl_sources) \
+ nautilus_shell_interface_idl_stamp \
+ $(NULL)
+
+EXTRA_DIST = \
+ nautilus-shell-interface.idl \
+ $(oaf_DATA) \
+ run-nautilus \
+ $(NULL)
install-data-hook: run-nautilus
$(mkinstalldirs) $(DESTDIR)/$(prefix)/bin
diff --git a/src/Nautilus_shell.oaf.in b/src/Nautilus_shell.oaf.in
index 31017fa5e..971f15747 100644
--- a/src/Nautilus_shell.oaf.in
+++ b/src/Nautilus_shell.oaf.in
@@ -1,50 +1,55 @@
<oaf_info>
-<oaf_server iid="OAFIID:nautilus_file_manager_factory:bd1e1862-92d7-4391-963e-37583f0daef3" type="exe" location="nautilus">
-<oaf_attribute name="repo_ids" type="stringv">
-<item value="IDL:GNOME/GenericFactory:1.0"/>
-<item value="IDL:Nautilus/Application:1.0"/>
-<item value="IDL:Bonobo/Unknown:1.0"/>
-</oaf_attribute>
-<oaf_attribute name="name" type="string" value="Nautilus application"/>
-<oaf_attribute name="description" type="string" value="File manager component's factory"/>
+<oaf_server iid="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3" type="exe" location="nautilus">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Nautilus factory"/>
+ <oaf_attribute name="description" type="string" value="Factory for Nautilus shell and file manager"/>
</oaf_server>
-<oaf_server iid="OAFIID:nautilus_file_manager_icon_view:42681b21-d5ca-4837-87d2-394d88ecc058" type="factory" location="OAFIID:nautilus_file_manager_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
-<oaf_attribute name="repo_ids" type="stringv">
-<item value="IDL:Bonobo/Control:1.0"/>
-<item value="IDL:Bonobo/Unknown:1.0"/>
-<item value="IDL:Nautilus/ContentView:1.0"/>
-<item value="IDL:Nautilus/View:1.0"/>
-</oaf_attribute>
-<oaf_attribute name="name" type="string" value="File manager icon view"/>
-<oaf_attribute name="description" type="string" value="File manager component that shows a two-dimensional icon space"/>
-<oaf_attribute name="bonobo:supported_mime_types" type="stringv">
-<item value="x-special/directory"/>
-<item value="x-special/webdav-directory"/>
-</oaf_attribute>
-<oaf_attribute name="nautilus:view_as_name" type="string" value="Icons"/>
+<oaf_server iid="OAFIID:nautilus_file_manager_icon_view:42681b21-d5ca-4837-87d2-394d88ecc058" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ <item value="IDL:Bonobo/Control:1.0"/>
+ <item value="IDL:Nautilus/View:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Nautilus file manager icon view"/>
+ <oaf_attribute name="description" type="string" value="Nautilus file manager component that shows a two-dimensional icon space"/>
+ <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
+ <item value="x-special/directory"/>
+ <item value="x-special/webdav-directory"/>
+ </oaf_attribute>
+ <oaf_attribute name="nautilus:view_as_name" type="string" value="Icons"/>
</oaf_server>
-<oaf_server iid="OAFIID:nautilus_file_manager_list_view:521e489d-0662-4ad7-ac3a-832deabe111c" type="factory" location="OAFIID:nautilus_file_manager_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
-<oaf_attribute name="repo_ids" type="stringv">
-<item value="IDL:Bonobo/Control:1.0"/>
-<item value="IDL:Bonobo/Unknown:1.0"/>
-<item value="IDL:Nautilus/ContentView:1.0"/>
-<item value="IDL:Nautilus/View:1.0"/>
-</oaf_attribute>
-<oaf_attribute name="name" type="string" value="File manager list view"/>
-<oaf_attribute name="description" type="string" value="File manager component that shows a scrollable list"/>
-<oaf_attribute name="bonobo:supported_mime_types" type="stringv">
-<item value="x-special/directory"/>
-<item value="x-special/webdav-directory"/>
-</oaf_attribute>
-<oaf_attribute name="bonobo:additional_uri_schemes" type="stringv">
-<item value="search"/>
-<item value="gnome-search"/>
-<item value="medusa"/>
-</oaf_attribute>
-<oaf_attribute name="nautilus:view_as_name" type="string" value="List"/>
+<oaf_server iid="OAFIID:nautilus_file_manager_list_view:521e489d-0662-4ad7-ac3a-832deabe111c" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ <item value="IDL:Bonobo/Control:1.0"/>
+ <item value="IDL:Nautilus/View:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Nautilus file manager list view"/>
+ <oaf_attribute name="description" type="string" value="Nautilus file manager component that shows a scrollable list"/>
+ <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
+ <item value="x-special/directory"/>
+ <item value="x-special/webdav-directory"/>
+ </oaf_attribute>
+ <oaf_attribute name="bonobo:additional_uri_schemes" type="stringv">
+ <item value="search"/>
+ <item value="gnome-search"/>
+ <item value="medusa"/>
+ </oaf_attribute>
+ <oaf_attribute name="nautilus:view_as_name" type="string" value="List"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:nautilus_shell:cd5183b2-3913-4b74-9b8e-10528b0de08d" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ <item value="IDL:Nautilus/Shell:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Nautilus shell"/>
+ <oaf_attribute name="description" type="string" value="Nautilus shell operations that can be done from subsequent command-line invocations"/>
</oaf_server>
</oaf_info>
diff --git a/src/Nautilus_shell.server.in b/src/Nautilus_shell.server.in
index 31017fa5e..971f15747 100644
--- a/src/Nautilus_shell.server.in
+++ b/src/Nautilus_shell.server.in
@@ -1,50 +1,55 @@
<oaf_info>
-<oaf_server iid="OAFIID:nautilus_file_manager_factory:bd1e1862-92d7-4391-963e-37583f0daef3" type="exe" location="nautilus">
-<oaf_attribute name="repo_ids" type="stringv">
-<item value="IDL:GNOME/GenericFactory:1.0"/>
-<item value="IDL:Nautilus/Application:1.0"/>
-<item value="IDL:Bonobo/Unknown:1.0"/>
-</oaf_attribute>
-<oaf_attribute name="name" type="string" value="Nautilus application"/>
-<oaf_attribute name="description" type="string" value="File manager component's factory"/>
+<oaf_server iid="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3" type="exe" location="nautilus">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Nautilus factory"/>
+ <oaf_attribute name="description" type="string" value="Factory for Nautilus shell and file manager"/>
</oaf_server>
-<oaf_server iid="OAFIID:nautilus_file_manager_icon_view:42681b21-d5ca-4837-87d2-394d88ecc058" type="factory" location="OAFIID:nautilus_file_manager_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
-<oaf_attribute name="repo_ids" type="stringv">
-<item value="IDL:Bonobo/Control:1.0"/>
-<item value="IDL:Bonobo/Unknown:1.0"/>
-<item value="IDL:Nautilus/ContentView:1.0"/>
-<item value="IDL:Nautilus/View:1.0"/>
-</oaf_attribute>
-<oaf_attribute name="name" type="string" value="File manager icon view"/>
-<oaf_attribute name="description" type="string" value="File manager component that shows a two-dimensional icon space"/>
-<oaf_attribute name="bonobo:supported_mime_types" type="stringv">
-<item value="x-special/directory"/>
-<item value="x-special/webdav-directory"/>
-</oaf_attribute>
-<oaf_attribute name="nautilus:view_as_name" type="string" value="Icons"/>
+<oaf_server iid="OAFIID:nautilus_file_manager_icon_view:42681b21-d5ca-4837-87d2-394d88ecc058" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ <item value="IDL:Bonobo/Control:1.0"/>
+ <item value="IDL:Nautilus/View:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Nautilus file manager icon view"/>
+ <oaf_attribute name="description" type="string" value="Nautilus file manager component that shows a two-dimensional icon space"/>
+ <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
+ <item value="x-special/directory"/>
+ <item value="x-special/webdav-directory"/>
+ </oaf_attribute>
+ <oaf_attribute name="nautilus:view_as_name" type="string" value="Icons"/>
</oaf_server>
-<oaf_server iid="OAFIID:nautilus_file_manager_list_view:521e489d-0662-4ad7-ac3a-832deabe111c" type="factory" location="OAFIID:nautilus_file_manager_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
-<oaf_attribute name="repo_ids" type="stringv">
-<item value="IDL:Bonobo/Control:1.0"/>
-<item value="IDL:Bonobo/Unknown:1.0"/>
-<item value="IDL:Nautilus/ContentView:1.0"/>
-<item value="IDL:Nautilus/View:1.0"/>
-</oaf_attribute>
-<oaf_attribute name="name" type="string" value="File manager list view"/>
-<oaf_attribute name="description" type="string" value="File manager component that shows a scrollable list"/>
-<oaf_attribute name="bonobo:supported_mime_types" type="stringv">
-<item value="x-special/directory"/>
-<item value="x-special/webdav-directory"/>
-</oaf_attribute>
-<oaf_attribute name="bonobo:additional_uri_schemes" type="stringv">
-<item value="search"/>
-<item value="gnome-search"/>
-<item value="medusa"/>
-</oaf_attribute>
-<oaf_attribute name="nautilus:view_as_name" type="string" value="List"/>
+<oaf_server iid="OAFIID:nautilus_file_manager_list_view:521e489d-0662-4ad7-ac3a-832deabe111c" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ <item value="IDL:Bonobo/Control:1.0"/>
+ <item value="IDL:Nautilus/View:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Nautilus file manager list view"/>
+ <oaf_attribute name="description" type="string" value="Nautilus file manager component that shows a scrollable list"/>
+ <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
+ <item value="x-special/directory"/>
+ <item value="x-special/webdav-directory"/>
+ </oaf_attribute>
+ <oaf_attribute name="bonobo:additional_uri_schemes" type="stringv">
+ <item value="search"/>
+ <item value="gnome-search"/>
+ <item value="medusa"/>
+ </oaf_attribute>
+ <oaf_attribute name="nautilus:view_as_name" type="string" value="List"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:nautilus_shell:cd5183b2-3913-4b74-9b8e-10528b0de08d" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ <item value="IDL:Nautilus/Shell:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Nautilus shell"/>
+ <oaf_attribute name="description" type="string" value="Nautilus shell operations that can be done from subsequent command-line invocations"/>
</oaf_server>
</oaf_info>
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index e4e0bdf3a..f671fae51 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -27,21 +27,31 @@
#include <config.h>
#include "nautilus-application.h"
-#include <bonobo.h>
+/* FIXME: This is a workaround for ORBit bug where including idl files
+ * in other idl files causes trouble.
+ */
+#include "nautilus-shell-interface.h"
+#define nautilus_view_component_H
+
#include "file-manager/fm-icon-view.h"
#include "file-manager/fm-list-view.h"
+#include "nautilus-desktop-window.h"
+#include "nautilus-first-time-druid.h"
+#include "nautilus-shell.h"
+#include <bonobo.h>
+#include <libnautilus-extensions/nautilus-file-utilities.h>
+#include <libnautilus-extensions/nautilus-global-preferences.h>
#include <libnautilus-extensions/nautilus-gtk-macros.h>
+#include <libnautilus-extensions/nautilus-icon-factory.h>
#include <libnautilus-extensions/nautilus-stock-dialogs.h>
-#include <libnautilus-extensions/nautilus-global-preferences.h>
-#include <libnautilus-extensions/nautilus-file-utilities.h>
#include <libnautilus-extensions/nautilus-string-list.h>
#include <libnautilus-extensions/nautilus-undo-manager.h>
#include <liboaf/liboaf.h>
-#include "nautilus-desktop-window.h"
-#include "nautilus-first-time-druid.h"
-
-#include <libnautilus-extensions/nautilus-icon-factory.h>
+#define FACTORY_IID "OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3"
+#define ICON_VIEW_IID "OAFIID:nautilus_file_manager_icon_view:42681b21-d5ca-4837-87d2-394d88ecc058"
+#define LIST_VIEW_IID "OAFIID:nautilus_file_manager_list_view:521e489d-0662-4ad7-ac3a-832deabe111c"
+#define SHELL_IID "OAFIID:nautilus_shell:cd5183b2-3913-4b74-9b8e-10528b0de08d"
static CORBA_boolean manufactures (PortableServer_Servant servant,
const CORBA_char *iid,
@@ -73,8 +83,9 @@ manufactures (PortableServer_Servant servant,
const CORBA_char *iid,
CORBA_Environment *ev)
{
- return strcmp (iid, "OAFIID:nautilus_file_manager_icon_view:42681b21-d5ca-4837-87d2-394d88ecc058") == 0
- || strcmp (iid, "OAFIID:nautilus_file_manager_list_view:521e489d-0662-4ad7-ac3a-832deabe111c") == 0;
+ return strcmp (iid, ICON_VIEW_IID) == 0
+ || strcmp (iid, LIST_VIEW_IID) == 0
+ || strcmp (iid, SHELL_IID) == 0;
}
static CORBA_Object
@@ -83,19 +94,30 @@ create_object (PortableServer_Servant servant,
const Bonobo_stringlist *params,
CORBA_Environment *ev)
{
+ BonoboObject *object;
FMDirectoryView *directory_view;
- NautilusView *view;
+ static NautilusShell *shell;
+ NautilusApplication *application;
- if (strcmp (iid, "OAFIID:nautilus_file_manager_icon_view:42681b21-d5ca-4837-87d2-394d88ecc058") == 0) {
+ if (strcmp (iid, ICON_VIEW_IID) == 0) {
directory_view = FM_DIRECTORY_VIEW (gtk_object_new (fm_icon_view_get_type (), NULL));
- } else if (strcmp (iid, "OAFIID:nautilus_file_manager_list_view:521e489d-0662-4ad7-ac3a-832deabe111c") == 0) {
+ object = BONOBO_OBJECT (fm_directory_view_get_nautilus_view (directory_view));
+ } else if (strcmp (iid, LIST_VIEW_IID) == 0) {
directory_view = FM_DIRECTORY_VIEW (gtk_object_new (fm_list_view_get_type (), NULL));
+ object = BONOBO_OBJECT (fm_directory_view_get_nautilus_view (directory_view));
+ } else if (strcmp (iid, SHELL_IID) == 0) {
+ if (shell == NULL) {
+ application = NAUTILUS_APPLICATION (((BonoboObjectServant *) servant)->bonobo_object);
+ shell = nautilus_shell_new (application);
+ } else {
+ bonobo_object_ref (BONOBO_OBJECT (shell));
+ }
+ object = BONOBO_OBJECT (shell);
} else {
return CORBA_OBJECT_NIL;
}
-
- view = fm_directory_view_get_nautilus_view (directory_view);
- return CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (view)), ev);
+
+ return CORBA_Object_duplicate (bonobo_object_corba_objref (object), ev);
}
static CORBA_Object
@@ -103,10 +125,10 @@ create_factory (PortableServer_POA poa,
NautilusApplication *bonobo_object,
CORBA_Environment *ev)
{
- POA_Bonobo_GenericFactory *servant;
+ BonoboObjectServant *servant;
- servant = g_new0 (POA_Bonobo_GenericFactory, 1);
- servant->vepv = &vepv;
+ servant = g_new0 (BonoboObjectServant, 1);
+ ((POA_Bonobo_GenericFactory *) servant)->vepv = &vepv;
POA_Bonobo_GenericFactory__init ((PortableServer_Servant) servant, ev);
return bonobo_object_activate_servant (BONOBO_OBJECT (bonobo_object), servant);
}
@@ -122,16 +144,18 @@ nautilus_application_initialize (NautilusApplication *application)
{
CORBA_Environment ev;
CORBA_Object corba_object;
-
- /* Create an undo manager */
- application->undo_manager = nautilus_undo_manager_new ();
CORBA_exception_init (&ev);
-
corba_object = create_factory (bonobo_poa (), application, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_error ("could not create factory");
+ }
+ CORBA_exception_free (&ev);
+
bonobo_object_construct (BONOBO_OBJECT (application), corba_object);
- CORBA_exception_free (&ev);
+ /* Create an undo manager */
+ application->undo_manager = nautilus_undo_manager_new ();
}
NautilusApplication *
@@ -158,66 +182,6 @@ nautilus_application_destroy (GtkObject *object)
}
static void
-display_caveat (GtkWindow *parent_window)
-{
- GtkWidget *dialog;
- GtkWidget *frame;
- GtkWidget *pixmap;
- GtkWidget *hbox;
- GtkWidget *text;
- char *file_name;
-
- dialog = gnome_dialog_new (_("Nautilus: caveat"),
- GNOME_STOCK_BUTTON_OK,
- NULL);
- gtk_container_set_border_width (GTK_CONTAINER (dialog), GNOME_PAD);
- gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, FALSE, FALSE);
-
- hbox = gtk_hbox_new (FALSE, GNOME_PAD);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD);
- gtk_widget_show (hbox);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
- hbox,
- FALSE, FALSE, 0);
-
- frame = gtk_frame_new (NULL);
- gtk_widget_show (frame);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
- gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0);
-
- file_name = nautilus_pixmap_file ("About_Image.png");
- pixmap = gnome_pixmap_new_from_file (file_name);
- g_free (file_name);
- gtk_widget_show (pixmap);
- gtk_container_add (GTK_CONTAINER (frame), pixmap);
-
- text = gtk_label_new
- (_("The Nautilus shell is under development; it's not "
- "ready for daily use. Many features, including some "
- "of the best ones, are not yet done, partly done, or "
- "unstable. The program doesn't look or act the way "
- "it will in version 1.0."
- "\n\n"
- "If you do decide to test this version of Nautilus, "
- "beware. The program could do something "
- "unpredictable and may even delete or overwrite "
- "files on your computer."
- "\n\n"
- "For more information, visit http://nautilus.eazel.com."));
- gtk_label_set_line_wrap (GTK_LABEL (text), TRUE);
- gtk_widget_show (text);
- gtk_box_pack_start (GTK_BOX (hbox), text, FALSE, FALSE, 0);
-
- gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
-
- if (parent_window != NULL) {
- gnome_dialog_set_parent (GNOME_DIALOG (dialog), parent_window);
- }
-
- gtk_widget_show (GTK_WIDGET (dialog));
-}
-
-static void
nautilus_application_check_user_directories (NautilusApplication *application)
{
char *user_directory;
@@ -272,136 +236,174 @@ nautilus_application_check_user_directories (NautilusApplication *application)
nautilus_string_list_free (dir_list);
}
+static int
+nautilus_strv_length (const char * const *strv)
+{
+ const char * const *p;
+
+ for (p = strv; *p != NULL; p++) { }
+ return p - strv;
+}
+
+static Nautilus_URIList *
+nautilus_make_uri_list_from_strv (const char * const *strv)
+{
+ int length, i;
+ Nautilus_URIList *uri_list;
+
+ length = nautilus_strv_length (strv);
+
+ uri_list = Nautilus_URIList__alloc ();
+ uri_list->_maximum = length;
+ uri_list->_length = length;
+ uri_list->_buffer = CORBA_sequence_Nautilus_URI_allocbuf (length);
+ for (i = 0; i < length; i++) {
+ uri_list->_buffer[i] = CORBA_string_dup (strv[i]);
+ }
+ CORBA_sequence_set_release (uri_list, CORBA_TRUE);
+
+ return uri_list;
+}
+
void
nautilus_application_startup (NautilusApplication *application,
gboolean manage_desktop,
const char *urls[])
{
+ CORBA_Environment ev;
+ Nautilus_Shell shell;
OAF_RegistrationResult result;
const char *message, *detailed_message;
GnomeDialog *dialog;
- const char **p;
- NautilusWindow *window;
- NautilusWindow *first_window;
+ Nautilus_URIList *url_list;
- /* check if this is the first time running the program by seeing
- if the user_main_directory exists; if not, run the first time druid
- instead of launching the application */
- if (!nautilus_user_main_directory_exists()) {
- nautilus_first_time_druid_show(application, manage_desktop, urls);
- return;
- }
-
- /* Try to register the file manager view factory with OAF. */
- result = oaf_active_server_register
- ("OAFIID:nautilus_file_manager_factory:bd1e1862-92d7-4391-963e-37583f0daef3",
- bonobo_object_corba_objref (BONOBO_OBJECT (application)));
- switch (result) {
- case OAF_REG_SUCCESS:
- /* We are registered with OAF and all is right with the world. */
- message = NULL;
- break;
- case OAF_REG_NOT_LISTED:
- /* Can't register myself due to trouble locating the
- * nautilus.oafinfo file. This has happened when you
- * launch Nautilus with an LD_LIBRARY_PATH that
- * doesn't include the directory containg the oaf
- * library. It could also happen if the
- * nautilus.oafinfo file was not present for some
- * reason. Sometimes killing oafd and gconfd fixes
- * this problem but we don't exactly understand why,
- * since neither of the above causes explain it.
- */
- message = _("Nautilus can't be used now. "
- "Rebooting the computer or installing "
- "Nautilus again may fix the problem.");
- /* FIXME: The guesses and stuff here are lame. */
- detailed_message = _("Nautilus can't be used now. "
- "Rebooting the computer or installing "
- "Nautilus again may fix the problem. "
- "OAF couldn't locate the nautilus.oafinfo file. "
- "One cause of this seems to be an LD_LIBRARY_PATH "
- "that does not include the oaf library's directory. "
- "Another possible cause would be bad install "
- "with a missing nautilus.oafinfo file. "
- "Sometimes killing oafd and gconfd fixes "
- "the problem, but we don't know why. "
- "We need a much less confusing message here for Nautilus 1.0.");
- break;
- case OAF_REG_ALREADY_ACTIVE:
- /* Another copy of Nautilus is already running. */
- /* FIXME: We want to "glom on" to this old copy. */
- message = _("Nautilus is already running. "
- "Soon, instead of presenting this dialog, "
- "the already-running copy of Nautilus will "
- "respond by opening windows.");
- detailed_message = NULL;
- break;
- default:
- /* This should never happen. */
- g_warning ("bad error code from oaf_active_server_register");
- case OAF_REG_ERROR:
- /* Some misc. error (can never happen with current
- * version of OAF). Show dialog and terminate the
- * program.
- */
- message = _("Nautilus can't be used now, due to an unexpected error.");
- detailed_message = _("Nautilus can't be used now, due to an unexpected error "
- "from OAF when attempting to register the file manager view server.");
- break;
- }
- if (message != NULL) {
- dialog = nautilus_error_dialog_with_details
- (message, detailed_message, NULL);
- gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
- gtk_main_quit, NULL);
+ /* Check if this is the first time running the program by seeing
+ * if the user_main_directory exists; if not, run the first time druid
+ * instead of launching the application
+ */
+ /* FIXME: You will get multiple druids if you invoke nautilus again. */
+ if (!nautilus_user_main_directory_exists ()) {
+ nautilus_first_time_druid_show (application, manage_desktop, urls);
return;
}
/* Check the user's ~/.nautilus directories and post warnings
- * if there are problems
+ * if there are problems.
*/
nautilus_application_check_user_directories (application);
+ /* Start up the factory. */
+#if 0
+ for (;;) {
+ shell = oaf_activate_from_id (SHELL_IID, OAF_FLAG_EXISTING_ONLY, NULL, NULL);
+ if (shell != CORBA_OBJECT_NIL) {
+ g_message ("did activate");
+ break;
+ }
+ g_message ("didn't activate");
+#endif
+
+ /* Try to register the file manager view factory with OAF. */
+ result = oaf_active_server_register
+ (FACTORY_IID,
+ bonobo_object_corba_objref (BONOBO_OBJECT (application)));
+ switch (result) {
+ case OAF_REG_SUCCESS:
+ /* We are registered with OAF and all is right with the world. */
+ message = NULL;
+ break;
+ case OAF_REG_NOT_LISTED:
+ /* Can't register myself due to trouble locating the
+ * nautilus.oafinfo file. This has happened when you
+ * launch Nautilus with an LD_LIBRARY_PATH that
+ * doesn't include the directory containg the oaf
+ * library. It could also happen if the
+ * nautilus.oafinfo file was not present for some
+ * reason. Sometimes killing oafd and gconfd fixes
+ * this problem but we don't exactly understand why,
+ * since neither of the above causes explain it.
+ */
+ message = _("Nautilus can't be used now. "
+ "Rebooting the computer or installing "
+ "Nautilus again may fix the problem.");
+ /* FIXME: The guesses and stuff here are lame. */
+ detailed_message = _("Nautilus can't be used now. "
+ "Rebooting the computer or installing "
+ "Nautilus again may fix the problem. "
+ "OAF couldn't locate the nautilus.oafinfo file. "
+ "One cause of this seems to be an LD_LIBRARY_PATH "
+ "that does not include the oaf library's directory. "
+ "Another possible cause would be bad install "
+ "with a missing nautilus.oafinfo file. "
+ "Sometimes killing oafd and gconfd fixes "
+ "the problem, but we don't know why. "
+ "We need a much less confusing message here for Nautilus 1.0.");
+ break;
+ case OAF_REG_ALREADY_ACTIVE:
+ /* Another copy of Nautilus is already running. */
+ /* FIXME: We want to "glom on" to this old copy. */
+ message = _("Nautilus is already running. "
+ "Soon, instead of presenting this dialog, "
+ "the already-running copy of Nautilus will "
+ "respond by opening windows.");
+ detailed_message = NULL;
+ break;
+ default:
+ /* This should never happen. */
+ g_warning ("bad error code from oaf_active_server_register");
+ case OAF_REG_ERROR:
+ /* Some misc. error (can never happen with current
+ * version of OAF). Show dialog and terminate the
+ * program.
+ */
+ message = _("Nautilus can't be used now, due to an unexpected error.");
+ detailed_message = _("Nautilus can't be used now, due to an unexpected error "
+ "from OAF when attempting to register the file manager view server.");
+ break;
+ }
+ if (message != NULL) {
+ dialog = nautilus_error_dialog_with_details
+ (message, detailed_message, NULL);
+ gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
+ gtk_main_quit, NULL);
+ return;
+ }
+#if 0
+ }
+#endif
+
+ /* FIXME: This is a temporary hack so we can use the CORBA
+ * interface even though I can't get activation to work.
+ */
+ shell = bonobo_object_corba_objref (BONOBO_OBJECT (nautilus_shell_new (application)));
+
+ CORBA_exception_init (&ev);
+
/* Set up the desktop. */
if (manage_desktop) {
- gtk_widget_show (GTK_WIDGET (nautilus_desktop_window_new (application)));
+ Nautilus_Shell_manage_desktop (shell, &ev);
}
/* Create the other windows. */
- first_window = NULL;
if (urls != NULL) {
- for (p = urls; *p != NULL; p++) {
- window = nautilus_application_create_window (application);
- nautilus_window_goto_uri (window, *p);
- if (first_window == NULL) {
- first_window = window;
- }
- }
+ url_list = nautilus_make_uri_list_from_strv (urls);
+ Nautilus_Shell_open_windows (shell, url_list, &ev);
+ CORBA_free (url_list);
}
+
/* FIXME bugzilla.eazel.com 1051: Change this logic back so it won't
* make a new window when asked to manage the desktop, once we have
* a way to get rid of the desktop.
*/
- if (/* !manage_desktop && */ first_window == NULL) {
- first_window = nautilus_application_create_window (application);
- nautilus_window_go_home (first_window);
+ if (/* !manage_desktop && */ urls == NULL) {
+ Nautilus_Shell_open_default_window (shell, &ev);
}
- /* Show the "not ready for prime time" dialog after the first
- * window appears, so it's on top.
- */
- /* FIXME bugzilla.eazel.com 1256: It's not on top of the
- * windows other than the first one.
- */
- if (g_getenv ("NAUTILUS_NO_CAVEAT_DIALOG") == NULL) {
- if (first_window == NULL) {
- display_caveat (NULL);
- } else {
- gtk_signal_connect (GTK_OBJECT (first_window), "show",
- display_caveat, first_window);
- }
- }
+ /* We're done with the shell now, so let it go. */
+ Nautilus_Shell_unref (shell, &ev);
+ CORBA_Object_release (shell, &ev);
+
+ CORBA_exception_free (&ev);
}
static void
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index 07d171ed5..e7e1a9709 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -30,34 +30,31 @@
#include <config.h>
#include "nautilus-window-private.h"
-#include "nautilus-window-manage-views.h"
#include "nautilus-application.h"
-
-#include <gnome.h>
-#include <math.h>
#include "nautilus-bookmarks-window.h"
+#include "nautilus-sidebar.h"
#include "nautilus-signaller.h"
#include "nautilus-switchable-navigation-bar.h"
-#include "nautilus-sidebar.h"
-
+#include "nautilus-window-manage-views.h"
+#include "nautilus-zoom-control.h"
+#include <ctype.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-
-#include <libnautilus/nautilus-bonobo-ui.h>
-
+#include <gnome.h>
+#include <libgnomevfs/gnome-vfs-uri.h>
+#include <libnautilus-extensions/nautilus-generous-bin.h>
#include <libnautilus-extensions/nautilus-global-preferences.h>
#include <libnautilus-extensions/nautilus-gtk-extensions.h>
+#include <libnautilus-extensions/nautilus-gtk-macros.h>
+#include <libnautilus-extensions/nautilus-horizontal-splitter.h>
#include <libnautilus-extensions/nautilus-icon-factory.h>
#include <libnautilus-extensions/nautilus-metadata.h>
#include <libnautilus-extensions/nautilus-mime-actions.h>
+#include <libnautilus-extensions/nautilus-mini-icon.h>
#include <libnautilus-extensions/nautilus-program-choosing.h>
#include <libnautilus-extensions/nautilus-string.h>
-#include <libnautilus-extensions/nautilus-mini-icon.h>
-#include <libnautilus-extensions/nautilus-generous-bin.h>
-#include <libnautilus-extensions/nautilus-horizontal-splitter.h>
+#include <libnautilus/nautilus-bonobo-ui.h>
#include <libnautilus/nautilus-undo.h>
-#include "nautilus-zoom-control.h"
-#include <ctype.h>
-#include <libgnomevfs/gnome-vfs-uri.h>
+#include <math.h>
/* FIXME bugzilla.eazel.com 1243:
* We should use inheritance instead of these special cases
@@ -65,72 +62,9 @@
*/
#include "nautilus-desktop-window.h"
-static void nautilus_window_realize (GtkWidget *widget);
-static void nautilus_window_real_set_content_view (NautilusWindow *window, NautilusViewFrame *new_view);
-
-/* Object framework static variables */
-static GnomeAppClass *parent_class = NULL;
-
-/* Other static variables */
-static GSList *history_list = NULL;
-
-/* Private functions */
-static void nautilus_window_class_init (NautilusWindowClass *klass);
-static void nautilus_window_init (NautilusWindow *window);
-static void nautilus_window_destroy (NautilusWindow *window);
-static void nautilus_window_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void nautilus_window_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void nautilus_window_goto_uri_callback (GtkWidget *widget,
- const char *uri,
- GtkWidget *window);
-
-static void nautilus_window_navigation_bar_mode_changed_callback (GtkWidget *widget,
- NautilusSwitchableNavigationBarMode mode,
- GtkWidget *window);
-static void zoom_in_callback (NautilusZoomControl *zoom_control,
- NautilusWindow *window);
-static void zoom_out_callback (NautilusZoomControl *zoom_control,
- NautilusWindow *window);
-static void zoom_to_level_callback (NautilusZoomControl *zoom_control,
- double level,
- NautilusWindow *window);
-static void zoom_to_fit_callback (NautilusZoomControl *zoom_control,
- NautilusWindow *window);
-static void sidebar_panels_changed_callback (gpointer user_data);
-static NautilusViewFrame *window_find_sidebar_panel_by_identifier (NautilusWindow *window,
- NautilusViewIdentifier *identifier);
-static void window_update_sidebar_panels_from_preferences (NautilusWindow *window);
-
/* Milliseconds */
#define STATUSBAR_CLEAR_TIMEOUT 5000
-GtkType
-nautilus_window_get_type(void)
-{
- static guint window_type = 0;
-
- if (!window_type) {
- GtkTypeInfo window_info = {
- "NautilusWindow",
- sizeof(NautilusWindow),
- sizeof(NautilusWindowClass),
- (GtkClassInitFunc) nautilus_window_class_init,
- (GtkObjectInitFunc) nautilus_window_init,
- NULL,
- NULL,
- NULL
- };
-
- window_type = gtk_type_unique (gnome_app_get_type(), &window_info);
- }
-
- return window_type;
-}
-
enum {
ARG_0,
ARG_APP_ID,
@@ -138,8 +72,29 @@ enum {
ARG_CONTENT_VIEW
};
+/* Other static variables */
+static GSList *history_list = NULL;
+
+static void nautilus_window_initialize_class (NautilusWindowClass *klass);
+static void nautilus_window_initialize (NautilusWindow *window);
+static void nautilus_window_destroy (GtkObject *object);
+static void nautilus_window_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void nautilus_window_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void nautilus_window_realize (GtkWidget *widget);
+static void nautilus_window_real_set_content_view (NautilusWindow *window,
+ NautilusViewFrame *new_view);
+static void sidebar_panels_changed_callback (gpointer user_data);
+
+NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusWindow,
+ nautilus_window,
+ GNOME_TYPE_APP)
+
static void
-nautilus_window_class_init (NautilusWindowClass *klass)
+nautilus_window_initialize_class (NautilusWindowClass *klass)
{
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
@@ -147,18 +102,11 @@ nautilus_window_class_init (NautilusWindowClass *klass)
parent_class = gtk_type_class(gnome_app_get_type());
object_class = (GtkObjectClass*) klass;
- object_class->destroy = (void (*)(GtkObject *))nautilus_window_destroy;
+ object_class->destroy = nautilus_window_destroy;
object_class->get_arg = nautilus_window_get_arg;
object_class->set_arg = nautilus_window_set_arg;
widget_class = (GtkWidgetClass*) klass;
-
- /* FIXME bugzilla.eazel.com 1580
- * The parent_class field in the NautilusWindowClass is redundant
- * given that we have static parent_class variable. One or the other
- * should go. Since the static is usually our practice the field should go.
- */
- klass->parent_class = gtk_type_class (gtk_type_parent (object_class->type));
gtk_object_add_arg_type ("NautilusWindow::app_id",
GTK_TYPE_STRING,
@@ -177,7 +125,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
}
static void
-nautilus_window_init (NautilusWindow *window)
+nautilus_window_initialize (NautilusWindow *window)
{
window->details = g_new0 (NautilusWindowDetails, 1);
@@ -218,7 +166,7 @@ nautilus_window_goto_uri (NautilusWindow *window, const char *uri)
}
static void
-nautilus_window_goto_uri_callback (GtkWidget *widget,
+goto_uri_callback (GtkWidget *widget,
const char *uri,
GtkWidget *window)
{
@@ -226,7 +174,7 @@ nautilus_window_goto_uri_callback (GtkWidget *widget,
}
static void
-nautilus_window_navigation_bar_mode_changed_callback (GtkWidget *widget,
+navigation_bar_mode_changed_callback (GtkWidget *widget,
NautilusSwitchableNavigationBarMode mode,
GtkWidget *window)
{
@@ -297,10 +245,10 @@ nautilus_window_constructed (NautilusWindow *window)
gtk_widget_show (GTK_WIDGET (window->navigation_bar));
gtk_signal_connect (GTK_OBJECT (window->navigation_bar), "location_changed",
- nautilus_window_goto_uri_callback, window);
+ goto_uri_callback, window);
gtk_signal_connect (GTK_OBJECT (window->navigation_bar), "mode_changed",
- nautilus_window_navigation_bar_mode_changed_callback, window);
+ navigation_bar_mode_changed_callback, window);
gtk_box_pack_start (GTK_BOX (location_bar_box), window->navigation_bar,
TRUE, TRUE, GNOME_PAD_SMALL);
@@ -370,7 +318,7 @@ nautilus_window_constructed (NautilusWindow *window)
window->sidebar = nautilus_sidebar_new ();
gtk_widget_show (GTK_WIDGET (window->sidebar));
gtk_signal_connect (GTK_OBJECT (window->sidebar), "location_changed",
- nautilus_window_goto_uri_callback, window);
+ goto_uri_callback, window);
/* FIXME bugzilla.eazel.com 1243:
* We should use inheritance instead of these special cases
@@ -468,10 +416,12 @@ view_disconnect (gpointer data, gpointer user_data)
}
static void
-nautilus_window_destroy (NautilusWindow *window)
+nautilus_window_destroy (GtkObject *object)
{
- NautilusWindowClass *klass = NAUTILUS_WINDOW_CLASS(GTK_OBJECT(window)->klass);
-
+ NautilusWindow *window;
+
+ window = NAUTILUS_WINDOW (object);
+
/* Dont keep track of sidebar panel changes no more */
nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE,
sidebar_panels_changed_callback,
@@ -506,8 +456,7 @@ nautilus_window_destroy (NautilusWindow *window)
g_source_remove (window->action_tag);
}
- if (GTK_OBJECT_CLASS(klass->parent_class)->destroy)
- GTK_OBJECT_CLASS(klass->parent_class)->destroy(GTK_OBJECT(window));
+ NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (GTK_OBJECT (window)));
}
void
@@ -588,8 +537,7 @@ nautilus_window_realize (GtkWidget *widget)
gchar *filename;
/* Create our GdkWindow */
- if (GTK_WIDGET_CLASS(parent_class)->realize)
- (* GTK_WIDGET_CLASS(parent_class)->realize) (widget);
+ NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, realize, (widget));
/* Set the mini icon */
/* FIXME bugzilla.eazel.com 609:
diff --git a/src/nautilus-navigation-window.h b/src/nautilus-navigation-window.h
index add874aa6..65293f5eb 100644
--- a/src/nautilus-navigation-window.h
+++ b/src/nautilus-navigation-window.h
@@ -51,7 +51,6 @@ typedef struct NautilusWindow NautilusWindow;
typedef struct {
GnomeAppClass parent_spot;
- GnomeAppClass *parent_class;
} NautilusWindowClass;
typedef struct NautilusWindowStateInfo NautilusWindowStateInfo;
diff --git a/src/nautilus-object-window.c b/src/nautilus-object-window.c
index 07d171ed5..e7e1a9709 100644
--- a/src/nautilus-object-window.c
+++ b/src/nautilus-object-window.c
@@ -30,34 +30,31 @@
#include <config.h>
#include "nautilus-window-private.h"
-#include "nautilus-window-manage-views.h"
#include "nautilus-application.h"
-
-#include <gnome.h>
-#include <math.h>
#include "nautilus-bookmarks-window.h"
+#include "nautilus-sidebar.h"
#include "nautilus-signaller.h"
#include "nautilus-switchable-navigation-bar.h"
-#include "nautilus-sidebar.h"
-
+#include "nautilus-window-manage-views.h"
+#include "nautilus-zoom-control.h"
+#include <ctype.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-
-#include <libnautilus/nautilus-bonobo-ui.h>
-
+#include <gnome.h>
+#include <libgnomevfs/gnome-vfs-uri.h>
+#include <libnautilus-extensions/nautilus-generous-bin.h>
#include <libnautilus-extensions/nautilus-global-preferences.h>
#include <libnautilus-extensions/nautilus-gtk-extensions.h>
+#include <libnautilus-extensions/nautilus-gtk-macros.h>
+#include <libnautilus-extensions/nautilus-horizontal-splitter.h>
#include <libnautilus-extensions/nautilus-icon-factory.h>
#include <libnautilus-extensions/nautilus-metadata.h>
#include <libnautilus-extensions/nautilus-mime-actions.h>
+#include <libnautilus-extensions/nautilus-mini-icon.h>
#include <libnautilus-extensions/nautilus-program-choosing.h>
#include <libnautilus-extensions/nautilus-string.h>
-#include <libnautilus-extensions/nautilus-mini-icon.h>
-#include <libnautilus-extensions/nautilus-generous-bin.h>
-#include <libnautilus-extensions/nautilus-horizontal-splitter.h>
+#include <libnautilus/nautilus-bonobo-ui.h>
#include <libnautilus/nautilus-undo.h>
-#include "nautilus-zoom-control.h"
-#include <ctype.h>
-#include <libgnomevfs/gnome-vfs-uri.h>
+#include <math.h>
/* FIXME bugzilla.eazel.com 1243:
* We should use inheritance instead of these special cases
@@ -65,72 +62,9 @@
*/
#include "nautilus-desktop-window.h"
-static void nautilus_window_realize (GtkWidget *widget);
-static void nautilus_window_real_set_content_view (NautilusWindow *window, NautilusViewFrame *new_view);
-
-/* Object framework static variables */
-static GnomeAppClass *parent_class = NULL;
-
-/* Other static variables */
-static GSList *history_list = NULL;
-
-/* Private functions */
-static void nautilus_window_class_init (NautilusWindowClass *klass);
-static void nautilus_window_init (NautilusWindow *window);
-static void nautilus_window_destroy (NautilusWindow *window);
-static void nautilus_window_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void nautilus_window_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void nautilus_window_goto_uri_callback (GtkWidget *widget,
- const char *uri,
- GtkWidget *window);
-
-static void nautilus_window_navigation_bar_mode_changed_callback (GtkWidget *widget,
- NautilusSwitchableNavigationBarMode mode,
- GtkWidget *window);
-static void zoom_in_callback (NautilusZoomControl *zoom_control,
- NautilusWindow *window);
-static void zoom_out_callback (NautilusZoomControl *zoom_control,
- NautilusWindow *window);
-static void zoom_to_level_callback (NautilusZoomControl *zoom_control,
- double level,
- NautilusWindow *window);
-static void zoom_to_fit_callback (NautilusZoomControl *zoom_control,
- NautilusWindow *window);
-static void sidebar_panels_changed_callback (gpointer user_data);
-static NautilusViewFrame *window_find_sidebar_panel_by_identifier (NautilusWindow *window,
- NautilusViewIdentifier *identifier);
-static void window_update_sidebar_panels_from_preferences (NautilusWindow *window);
-
/* Milliseconds */
#define STATUSBAR_CLEAR_TIMEOUT 5000
-GtkType
-nautilus_window_get_type(void)
-{
- static guint window_type = 0;
-
- if (!window_type) {
- GtkTypeInfo window_info = {
- "NautilusWindow",
- sizeof(NautilusWindow),
- sizeof(NautilusWindowClass),
- (GtkClassInitFunc) nautilus_window_class_init,
- (GtkObjectInitFunc) nautilus_window_init,
- NULL,
- NULL,
- NULL
- };
-
- window_type = gtk_type_unique (gnome_app_get_type(), &window_info);
- }
-
- return window_type;
-}
-
enum {
ARG_0,
ARG_APP_ID,
@@ -138,8 +72,29 @@ enum {
ARG_CONTENT_VIEW
};
+/* Other static variables */
+static GSList *history_list = NULL;
+
+static void nautilus_window_initialize_class (NautilusWindowClass *klass);
+static void nautilus_window_initialize (NautilusWindow *window);
+static void nautilus_window_destroy (GtkObject *object);
+static void nautilus_window_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void nautilus_window_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void nautilus_window_realize (GtkWidget *widget);
+static void nautilus_window_real_set_content_view (NautilusWindow *window,
+ NautilusViewFrame *new_view);
+static void sidebar_panels_changed_callback (gpointer user_data);
+
+NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusWindow,
+ nautilus_window,
+ GNOME_TYPE_APP)
+
static void
-nautilus_window_class_init (NautilusWindowClass *klass)
+nautilus_window_initialize_class (NautilusWindowClass *klass)
{
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
@@ -147,18 +102,11 @@ nautilus_window_class_init (NautilusWindowClass *klass)
parent_class = gtk_type_class(gnome_app_get_type());
object_class = (GtkObjectClass*) klass;
- object_class->destroy = (void (*)(GtkObject *))nautilus_window_destroy;
+ object_class->destroy = nautilus_window_destroy;
object_class->get_arg = nautilus_window_get_arg;
object_class->set_arg = nautilus_window_set_arg;
widget_class = (GtkWidgetClass*) klass;
-
- /* FIXME bugzilla.eazel.com 1580
- * The parent_class field in the NautilusWindowClass is redundant
- * given that we have static parent_class variable. One or the other
- * should go. Since the static is usually our practice the field should go.
- */
- klass->parent_class = gtk_type_class (gtk_type_parent (object_class->type));
gtk_object_add_arg_type ("NautilusWindow::app_id",
GTK_TYPE_STRING,
@@ -177,7 +125,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
}
static void
-nautilus_window_init (NautilusWindow *window)
+nautilus_window_initialize (NautilusWindow *window)
{
window->details = g_new0 (NautilusWindowDetails, 1);
@@ -218,7 +166,7 @@ nautilus_window_goto_uri (NautilusWindow *window, const char *uri)
}
static void
-nautilus_window_goto_uri_callback (GtkWidget *widget,
+goto_uri_callback (GtkWidget *widget,
const char *uri,
GtkWidget *window)
{
@@ -226,7 +174,7 @@ nautilus_window_goto_uri_callback (GtkWidget *widget,
}
static void
-nautilus_window_navigation_bar_mode_changed_callback (GtkWidget *widget,
+navigation_bar_mode_changed_callback (GtkWidget *widget,
NautilusSwitchableNavigationBarMode mode,
GtkWidget *window)
{
@@ -297,10 +245,10 @@ nautilus_window_constructed (NautilusWindow *window)
gtk_widget_show (GTK_WIDGET (window->navigation_bar));
gtk_signal_connect (GTK_OBJECT (window->navigation_bar), "location_changed",
- nautilus_window_goto_uri_callback, window);
+ goto_uri_callback, window);
gtk_signal_connect (GTK_OBJECT (window->navigation_bar), "mode_changed",
- nautilus_window_navigation_bar_mode_changed_callback, window);
+ navigation_bar_mode_changed_callback, window);
gtk_box_pack_start (GTK_BOX (location_bar_box), window->navigation_bar,
TRUE, TRUE, GNOME_PAD_SMALL);
@@ -370,7 +318,7 @@ nautilus_window_constructed (NautilusWindow *window)
window->sidebar = nautilus_sidebar_new ();
gtk_widget_show (GTK_WIDGET (window->sidebar));
gtk_signal_connect (GTK_OBJECT (window->sidebar), "location_changed",
- nautilus_window_goto_uri_callback, window);
+ goto_uri_callback, window);
/* FIXME bugzilla.eazel.com 1243:
* We should use inheritance instead of these special cases
@@ -468,10 +416,12 @@ view_disconnect (gpointer data, gpointer user_data)
}
static void
-nautilus_window_destroy (NautilusWindow *window)
+nautilus_window_destroy (GtkObject *object)
{
- NautilusWindowClass *klass = NAUTILUS_WINDOW_CLASS(GTK_OBJECT(window)->klass);
-
+ NautilusWindow *window;
+
+ window = NAUTILUS_WINDOW (object);
+
/* Dont keep track of sidebar panel changes no more */
nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE,
sidebar_panels_changed_callback,
@@ -506,8 +456,7 @@ nautilus_window_destroy (NautilusWindow *window)
g_source_remove (window->action_tag);
}
- if (GTK_OBJECT_CLASS(klass->parent_class)->destroy)
- GTK_OBJECT_CLASS(klass->parent_class)->destroy(GTK_OBJECT(window));
+ NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (GTK_OBJECT (window)));
}
void
@@ -588,8 +537,7 @@ nautilus_window_realize (GtkWidget *widget)
gchar *filename;
/* Create our GdkWindow */
- if (GTK_WIDGET_CLASS(parent_class)->realize)
- (* GTK_WIDGET_CLASS(parent_class)->realize) (widget);
+ NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, realize, (widget));
/* Set the mini icon */
/* FIXME bugzilla.eazel.com 609:
diff --git a/src/nautilus-object-window.h b/src/nautilus-object-window.h
index add874aa6..65293f5eb 100644
--- a/src/nautilus-object-window.h
+++ b/src/nautilus-object-window.h
@@ -51,7 +51,6 @@ typedef struct NautilusWindow NautilusWindow;
typedef struct {
GnomeAppClass parent_spot;
- GnomeAppClass *parent_class;
} NautilusWindowClass;
typedef struct NautilusWindowStateInfo NautilusWindowStateInfo;
diff --git a/src/nautilus-shell-interface.idl b/src/nautilus-shell-interface.idl
new file mode 100644
index 000000000..8f1df3ec0
--- /dev/null
+++ b/src/nautilus-shell-interface.idl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
+
+#ifndef NAUTILUS_SHELL_INTERFACE_IDL
+#define NAUTILUS_SHELL_INTERFACE_IDL
+
+#include <Bonobo.idl>
+#include <libnautilus/nautilus-view-component.idl>
+
+module Nautilus {
+
+ interface Shell : ::Bonobo::Unknown {
+ oneway void open_windows (in URIList uris);
+ oneway void open_default_window ();
+ oneway void manage_desktop ();
+ };
+
+};
+
+#endif /* NAUTILUS_SHELL_INTERFACE_IDL */
diff --git a/src/nautilus-shell.c b/src/nautilus-shell.c
new file mode 100644
index 000000000..34308842c
--- /dev/null
+++ b/src/nautilus-shell.c
@@ -0,0 +1,271 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+/* Nautilus
+ *
+ * Copyright (C) 2000 Eazel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* nautilus-shell.h: Server side of the Nautilus:Shell CORBA object
+ * that represents the shell across processes.
+ */
+
+#include <config.h>
+#include "nautilus-shell.h"
+
+/* FIXME: This is a workaround for ORBit bug where including idl files
+ * in other idl files causes trouble.
+ */
+#include "nautilus-shell-interface.h"
+#define nautilus_view_component_H
+
+#include "nautilus-desktop-window.h"
+#include <gtk/gtklabel.h>
+#include <gtk/gtkframe.h>
+#include <libgnome/gnome-i18n.h>
+#include <libgnomeui/gnome-stock.h>
+#include <libgnomeui/gnome-uidefs.h>
+#include <libnautilus-extensions/nautilus-file-utilities.h>
+#include <libnautilus-extensions/nautilus-gtk-macros.h>
+#include <libnautilus-extensions/nautilus-stock-dialogs.h>
+
+struct NautilusShellDetails {
+ NautilusApplication *application;
+ NautilusDesktopWindow *desktop_window;
+ gboolean showed_caveat;
+};
+
+static void nautilus_shell_initialize (NautilusShell *shell);
+static void nautilus_shell_initialize_class (NautilusShellClass *klass);
+static void destroy (GtkObject *shell);
+static void corba_open_windows (PortableServer_Servant servant,
+ const Nautilus_URIList *list,
+ CORBA_Environment *ev);
+static void corba_open_default_window (PortableServer_Servant servant,
+ CORBA_Environment *ev);
+static void corba_manage_desktop (PortableServer_Servant servant,
+ CORBA_Environment *ev);
+
+NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusShell, nautilus_shell, BONOBO_OBJECT_TYPE)
+
+static void
+nautilus_shell_initialize_class (NautilusShellClass *klass)
+{
+ GTK_OBJECT_CLASS (klass)->destroy = destroy;
+}
+
+static POA_Nautilus_Shell__epv *
+nautilus_shell_get_epv (void)
+{
+ static POA_Nautilus_Shell__epv epv;
+ epv.open_windows = corba_open_windows;
+ epv.open_default_window = corba_open_default_window;
+ epv.manage_desktop = corba_manage_desktop;
+ return &epv;
+}
+
+static POA_Nautilus_Shell__vepv *
+nautilus_shell_get_vepv (void)
+{
+ static POA_Nautilus_Shell__vepv vepv;
+ vepv.Bonobo_Unknown_epv = bonobo_object_get_epv ();
+ vepv.Nautilus_Shell_epv = nautilus_shell_get_epv ();
+ return &vepv;
+}
+
+static POA_Nautilus_Shell *
+nautilus_shell_create_servant (void)
+{
+ POA_Nautilus_Shell *servant;
+ CORBA_Environment ev;
+
+ servant = (POA_Nautilus_Shell *) g_new0 (BonoboObjectServant, 1);
+ servant->vepv = nautilus_shell_get_vepv ();
+ CORBA_exception_init (&ev);
+ POA_Nautilus_Shell__init ((PortableServer_Servant) servant, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION){
+ g_error ("can't initialize Nautilus shell");
+ }
+ CORBA_exception_free (&ev);
+
+ return servant;
+}
+
+static void
+nautilus_shell_initialize (NautilusShell *shell)
+{
+ Nautilus_Shell corba_shell;
+
+ shell->details = g_new0 (NautilusShellDetails, 1);
+
+ corba_shell = bonobo_object_activate_servant
+ (BONOBO_OBJECT (shell), nautilus_shell_create_servant ());
+ bonobo_object_construct (BONOBO_OBJECT (shell), corba_shell);
+}
+
+static void
+destroy (GtkObject *object)
+{
+ NautilusShell *shell;
+
+ shell = NAUTILUS_SHELL (object);
+ g_free (shell->details);
+
+ NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object));
+}
+
+NautilusShell *
+nautilus_shell_new (NautilusApplication *application)
+{
+ NautilusShell *shell;
+
+ shell = gtk_type_new (NAUTILUS_TYPE_SHELL);
+ shell->details->application = application;
+ return shell;
+}
+
+static void
+display_caveat (GtkWindow *parent_window)
+{
+ GtkWidget *dialog;
+ GtkWidget *frame;
+ GtkWidget *pixmap;
+ GtkWidget *hbox;
+ GtkWidget *text;
+ char *file_name;
+
+ dialog = gnome_dialog_new (_("Nautilus: caveat"),
+ GNOME_STOCK_BUTTON_OK,
+ NULL);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog), GNOME_PAD);
+ gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, FALSE, FALSE);
+
+ hbox = gtk_hbox_new (FALSE, GNOME_PAD);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD);
+ gtk_widget_show (hbox);
+ gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
+ hbox,
+ FALSE, FALSE, 0);
+
+ frame = gtk_frame_new (NULL);
+ gtk_widget_show (frame);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
+ gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0);
+
+ file_name = nautilus_pixmap_file ("About_Image.png");
+ pixmap = gnome_pixmap_new_from_file (file_name);
+ g_free (file_name);
+ gtk_widget_show (pixmap);
+ gtk_container_add (GTK_CONTAINER (frame), pixmap);
+
+ text = gtk_label_new
+ (_("The Nautilus shell is under development; it's not "
+ "ready for daily use. Many features, including some "
+ "of the best ones, are not yet done, partly done, or "
+ "unstable. The program doesn't look or act the way "
+ "it will in version 1.0."
+ "\n\n"
+ "If you do decide to test this version of Nautilus, "
+ "beware. The program could do something "
+ "unpredictable and may even delete or overwrite "
+ "files on your computer."
+ "\n\n"
+ "For more information, visit http://nautilus.eazel.com."));
+ gtk_label_set_line_wrap (GTK_LABEL (text), TRUE);
+ gtk_widget_show (text);
+ gtk_box_pack_start (GTK_BOX (hbox), text, FALSE, FALSE, 0);
+
+ gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
+ gnome_dialog_set_parent (GNOME_DIALOG (dialog), parent_window);
+
+ gtk_widget_show (GTK_WIDGET (dialog));
+}
+
+static void
+display_caveat_first_time (NautilusShell *shell, NautilusWindow *window)
+{
+ /* Show the "not ready for prime time" dialog after the first
+ * window appears, so it's on top.
+ */
+ /* FIXME bugzilla.eazel.com 1256: It's not on top of the
+ * windows other than the first one.
+ */
+ if (!shell->details->showed_caveat
+ && g_getenv ("NAUTILUS_NO_CAVEAT_DIALOG") == NULL) {
+ gtk_signal_connect (GTK_OBJECT (window), "show",
+ display_caveat, window);
+ }
+ shell->details->showed_caveat = TRUE;
+}
+
+static void
+open_window (NautilusShell *shell, const char *uri)
+{
+ NautilusWindow *window;
+
+ window = nautilus_application_create_window (shell->details->application);
+ if (uri == NULL) {
+ nautilus_window_go_home (window);
+ } else {
+ nautilus_window_goto_uri (window, uri);
+ }
+ display_caveat_first_time (shell, window);
+}
+
+static void
+corba_open_windows (PortableServer_Servant servant,
+ const Nautilus_URIList *list,
+ CORBA_Environment *ev)
+{
+ NautilusShell *shell;
+ int i;
+
+ shell = NAUTILUS_SHELL (((BonoboObjectServant *) servant)->bonobo_object);
+
+ /* Open windows at each requested location. */
+ for (i = 0; i < list->_length; i++) {
+ g_assert (list->_buffer[i] != NULL);
+ open_window (shell, list->_buffer[i]);
+ }
+}
+
+static void
+corba_open_default_window (PortableServer_Servant servant,
+ CORBA_Environment *ev)
+{
+ NautilusShell *shell;
+
+ shell = NAUTILUS_SHELL (((BonoboObjectServant *) servant)->bonobo_object);
+
+ /* Open a window pointing at the default location. */
+ open_window (shell, NULL);
+}
+
+static void
+corba_manage_desktop (PortableServer_Servant servant,
+ CORBA_Environment *ev)
+{
+ NautilusShell *shell;
+
+ shell = NAUTILUS_SHELL (((BonoboObjectServant *) servant)->bonobo_object);
+
+ /* Create a desktop window. */
+ if (shell->details->desktop_window == NULL) {
+ shell->details->desktop_window = nautilus_desktop_window_new (shell->details->application);
+ }
+ gtk_widget_show (GTK_WIDGET (shell->details->desktop_window));
+}
diff --git a/src/nautilus-shell.h b/src/nautilus-shell.h
new file mode 100644
index 000000000..b414852b9
--- /dev/null
+++ b/src/nautilus-shell.h
@@ -0,0 +1,57 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+/* Nautilus
+ *
+ * Copyright (C) 2000 Eazel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* nautilus-shell.h: Server side of Nautilus:Shell CORBA object that
+ * represents the shell across processes.
+ */
+
+#ifndef NAUTILUS_SHELL_H
+#define NAUTILUS_SHELL_H
+
+#include "nautilus-application.h"
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define NAUTILUS_TYPE_SHELL (nautilus_shell_get_type ())
+#define NAUTILUS_SHELL(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_SHELL, NautilusShell))
+#define NAUTILUS_SHELL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_SHELL, NautilusShellClass))
+#define NAUTILUS_IS_SHELL(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_SHELL))
+#define NAUTILUS_IS_SHELL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), NAUTILUS_TYPE_SHELL))
+
+typedef struct NautilusShellDetails NautilusShellDetails;
+
+typedef struct {
+ BonoboObject parent_slot;
+ NautilusShellDetails *details;
+} NautilusShell;
+
+typedef struct {
+ BonoboObjectClass parent_slot;
+} NautilusShellClass;
+
+GtkType nautilus_shell_get_type (void);
+NautilusShell *nautilus_shell_new (NautilusApplication *application);
+
+#endif /* NAUTILUS_SHELL_H */
diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c
index 07d171ed5..e7e1a9709 100644
--- a/src/nautilus-spatial-window.c
+++ b/src/nautilus-spatial-window.c
@@ -30,34 +30,31 @@
#include <config.h>
#include "nautilus-window-private.h"
-#include "nautilus-window-manage-views.h"
#include "nautilus-application.h"
-
-#include <gnome.h>
-#include <math.h>
#include "nautilus-bookmarks-window.h"
+#include "nautilus-sidebar.h"
#include "nautilus-signaller.h"
#include "nautilus-switchable-navigation-bar.h"
-#include "nautilus-sidebar.h"
-
+#include "nautilus-window-manage-views.h"
+#include "nautilus-zoom-control.h"
+#include <ctype.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-
-#include <libnautilus/nautilus-bonobo-ui.h>
-
+#include <gnome.h>
+#include <libgnomevfs/gnome-vfs-uri.h>
+#include <libnautilus-extensions/nautilus-generous-bin.h>
#include <libnautilus-extensions/nautilus-global-preferences.h>
#include <libnautilus-extensions/nautilus-gtk-extensions.h>
+#include <libnautilus-extensions/nautilus-gtk-macros.h>
+#include <libnautilus-extensions/nautilus-horizontal-splitter.h>
#include <libnautilus-extensions/nautilus-icon-factory.h>
#include <libnautilus-extensions/nautilus-metadata.h>
#include <libnautilus-extensions/nautilus-mime-actions.h>
+#include <libnautilus-extensions/nautilus-mini-icon.h>
#include <libnautilus-extensions/nautilus-program-choosing.h>
#include <libnautilus-extensions/nautilus-string.h>
-#include <libnautilus-extensions/nautilus-mini-icon.h>
-#include <libnautilus-extensions/nautilus-generous-bin.h>
-#include <libnautilus-extensions/nautilus-horizontal-splitter.h>
+#include <libnautilus/nautilus-bonobo-ui.h>
#include <libnautilus/nautilus-undo.h>
-#include "nautilus-zoom-control.h"
-#include <ctype.h>
-#include <libgnomevfs/gnome-vfs-uri.h>
+#include <math.h>
/* FIXME bugzilla.eazel.com 1243:
* We should use inheritance instead of these special cases
@@ -65,72 +62,9 @@
*/
#include "nautilus-desktop-window.h"
-static void nautilus_window_realize (GtkWidget *widget);
-static void nautilus_window_real_set_content_view (NautilusWindow *window, NautilusViewFrame *new_view);
-
-/* Object framework static variables */
-static GnomeAppClass *parent_class = NULL;
-
-/* Other static variables */
-static GSList *history_list = NULL;
-
-/* Private functions */
-static void nautilus_window_class_init (NautilusWindowClass *klass);
-static void nautilus_window_init (NautilusWindow *window);
-static void nautilus_window_destroy (NautilusWindow *window);
-static void nautilus_window_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void nautilus_window_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void nautilus_window_goto_uri_callback (GtkWidget *widget,
- const char *uri,
- GtkWidget *window);
-
-static void nautilus_window_navigation_bar_mode_changed_callback (GtkWidget *widget,
- NautilusSwitchableNavigationBarMode mode,
- GtkWidget *window);
-static void zoom_in_callback (NautilusZoomControl *zoom_control,
- NautilusWindow *window);
-static void zoom_out_callback (NautilusZoomControl *zoom_control,
- NautilusWindow *window);
-static void zoom_to_level_callback (NautilusZoomControl *zoom_control,
- double level,
- NautilusWindow *window);
-static void zoom_to_fit_callback (NautilusZoomControl *zoom_control,
- NautilusWindow *window);
-static void sidebar_panels_changed_callback (gpointer user_data);
-static NautilusViewFrame *window_find_sidebar_panel_by_identifier (NautilusWindow *window,
- NautilusViewIdentifier *identifier);
-static void window_update_sidebar_panels_from_preferences (NautilusWindow *window);
-
/* Milliseconds */
#define STATUSBAR_CLEAR_TIMEOUT 5000
-GtkType
-nautilus_window_get_type(void)
-{
- static guint window_type = 0;
-
- if (!window_type) {
- GtkTypeInfo window_info = {
- "NautilusWindow",
- sizeof(NautilusWindow),
- sizeof(NautilusWindowClass),
- (GtkClassInitFunc) nautilus_window_class_init,
- (GtkObjectInitFunc) nautilus_window_init,
- NULL,
- NULL,
- NULL
- };
-
- window_type = gtk_type_unique (gnome_app_get_type(), &window_info);
- }
-
- return window_type;
-}
-
enum {
ARG_0,
ARG_APP_ID,
@@ -138,8 +72,29 @@ enum {
ARG_CONTENT_VIEW
};
+/* Other static variables */
+static GSList *history_list = NULL;
+
+static void nautilus_window_initialize_class (NautilusWindowClass *klass);
+static void nautilus_window_initialize (NautilusWindow *window);
+static void nautilus_window_destroy (GtkObject *object);
+static void nautilus_window_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void nautilus_window_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void nautilus_window_realize (GtkWidget *widget);
+static void nautilus_window_real_set_content_view (NautilusWindow *window,
+ NautilusViewFrame *new_view);
+static void sidebar_panels_changed_callback (gpointer user_data);
+
+NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusWindow,
+ nautilus_window,
+ GNOME_TYPE_APP)
+
static void
-nautilus_window_class_init (NautilusWindowClass *klass)
+nautilus_window_initialize_class (NautilusWindowClass *klass)
{
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
@@ -147,18 +102,11 @@ nautilus_window_class_init (NautilusWindowClass *klass)
parent_class = gtk_type_class(gnome_app_get_type());
object_class = (GtkObjectClass*) klass;
- object_class->destroy = (void (*)(GtkObject *))nautilus_window_destroy;
+ object_class->destroy = nautilus_window_destroy;
object_class->get_arg = nautilus_window_get_arg;
object_class->set_arg = nautilus_window_set_arg;
widget_class = (GtkWidgetClass*) klass;
-
- /* FIXME bugzilla.eazel.com 1580
- * The parent_class field in the NautilusWindowClass is redundant
- * given that we have static parent_class variable. One or the other
- * should go. Since the static is usually our practice the field should go.
- */
- klass->parent_class = gtk_type_class (gtk_type_parent (object_class->type));
gtk_object_add_arg_type ("NautilusWindow::app_id",
GTK_TYPE_STRING,
@@ -177,7 +125,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
}
static void
-nautilus_window_init (NautilusWindow *window)
+nautilus_window_initialize (NautilusWindow *window)
{
window->details = g_new0 (NautilusWindowDetails, 1);
@@ -218,7 +166,7 @@ nautilus_window_goto_uri (NautilusWindow *window, const char *uri)
}
static void
-nautilus_window_goto_uri_callback (GtkWidget *widget,
+goto_uri_callback (GtkWidget *widget,
const char *uri,
GtkWidget *window)
{
@@ -226,7 +174,7 @@ nautilus_window_goto_uri_callback (GtkWidget *widget,
}
static void
-nautilus_window_navigation_bar_mode_changed_callback (GtkWidget *widget,
+navigation_bar_mode_changed_callback (GtkWidget *widget,
NautilusSwitchableNavigationBarMode mode,
GtkWidget *window)
{
@@ -297,10 +245,10 @@ nautilus_window_constructed (NautilusWindow *window)
gtk_widget_show (GTK_WIDGET (window->navigation_bar));
gtk_signal_connect (GTK_OBJECT (window->navigation_bar), "location_changed",
- nautilus_window_goto_uri_callback, window);
+ goto_uri_callback, window);
gtk_signal_connect (GTK_OBJECT (window->navigation_bar), "mode_changed",
- nautilus_window_navigation_bar_mode_changed_callback, window);
+ navigation_bar_mode_changed_callback, window);
gtk_box_pack_start (GTK_BOX (location_bar_box), window->navigation_bar,
TRUE, TRUE, GNOME_PAD_SMALL);
@@ -370,7 +318,7 @@ nautilus_window_constructed (NautilusWindow *window)
window->sidebar = nautilus_sidebar_new ();
gtk_widget_show (GTK_WIDGET (window->sidebar));
gtk_signal_connect (GTK_OBJECT (window->sidebar), "location_changed",
- nautilus_window_goto_uri_callback, window);
+ goto_uri_callback, window);
/* FIXME bugzilla.eazel.com 1243:
* We should use inheritance instead of these special cases
@@ -468,10 +416,12 @@ view_disconnect (gpointer data, gpointer user_data)
}
static void
-nautilus_window_destroy (NautilusWindow *window)
+nautilus_window_destroy (GtkObject *object)
{
- NautilusWindowClass *klass = NAUTILUS_WINDOW_CLASS(GTK_OBJECT(window)->klass);
-
+ NautilusWindow *window;
+
+ window = NAUTILUS_WINDOW (object);
+
/* Dont keep track of sidebar panel changes no more */
nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE,
sidebar_panels_changed_callback,
@@ -506,8 +456,7 @@ nautilus_window_destroy (NautilusWindow *window)
g_source_remove (window->action_tag);
}
- if (GTK_OBJECT_CLASS(klass->parent_class)->destroy)
- GTK_OBJECT_CLASS(klass->parent_class)->destroy(GTK_OBJECT(window));
+ NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (GTK_OBJECT (window)));
}
void
@@ -588,8 +537,7 @@ nautilus_window_realize (GtkWidget *widget)
gchar *filename;
/* Create our GdkWindow */
- if (GTK_WIDGET_CLASS(parent_class)->realize)
- (* GTK_WIDGET_CLASS(parent_class)->realize) (widget);
+ NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, realize, (widget));
/* Set the mini icon */
/* FIXME bugzilla.eazel.com 609:
diff --git a/src/nautilus-spatial-window.h b/src/nautilus-spatial-window.h
index add874aa6..65293f5eb 100644
--- a/src/nautilus-spatial-window.h
+++ b/src/nautilus-spatial-window.h
@@ -51,7 +51,6 @@ typedef struct NautilusWindow NautilusWindow;
typedef struct {
GnomeAppClass parent_spot;
- GnomeAppClass *parent_class;
} NautilusWindowClass;
typedef struct NautilusWindowStateInfo NautilusWindowStateInfo;
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 07d171ed5..e7e1a9709 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -30,34 +30,31 @@
#include <config.h>
#include "nautilus-window-private.h"
-#include "nautilus-window-manage-views.h"
#include "nautilus-application.h"
-
-#include <gnome.h>
-#include <math.h>
#include "nautilus-bookmarks-window.h"
+#include "nautilus-sidebar.h"
#include "nautilus-signaller.h"
#include "nautilus-switchable-navigation-bar.h"
-#include "nautilus-sidebar.h"
-
+#include "nautilus-window-manage-views.h"
+#include "nautilus-zoom-control.h"
+#include <ctype.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-
-#include <libnautilus/nautilus-bonobo-ui.h>
-
+#include <gnome.h>
+#include <libgnomevfs/gnome-vfs-uri.h>
+#include <libnautilus-extensions/nautilus-generous-bin.h>
#include <libnautilus-extensions/nautilus-global-preferences.h>
#include <libnautilus-extensions/nautilus-gtk-extensions.h>
+#include <libnautilus-extensions/nautilus-gtk-macros.h>
+#include <libnautilus-extensions/nautilus-horizontal-splitter.h>
#include <libnautilus-extensions/nautilus-icon-factory.h>
#include <libnautilus-extensions/nautilus-metadata.h>
#include <libnautilus-extensions/nautilus-mime-actions.h>
+#include <libnautilus-extensions/nautilus-mini-icon.h>
#include <libnautilus-extensions/nautilus-program-choosing.h>
#include <libnautilus-extensions/nautilus-string.h>
-#include <libnautilus-extensions/nautilus-mini-icon.h>
-#include <libnautilus-extensions/nautilus-generous-bin.h>
-#include <libnautilus-extensions/nautilus-horizontal-splitter.h>
+#include <libnautilus/nautilus-bonobo-ui.h>
#include <libnautilus/nautilus-undo.h>
-#include "nautilus-zoom-control.h"
-#include <ctype.h>
-#include <libgnomevfs/gnome-vfs-uri.h>
+#include <math.h>
/* FIXME bugzilla.eazel.com 1243:
* We should use inheritance instead of these special cases
@@ -65,72 +62,9 @@
*/
#include "nautilus-desktop-window.h"
-static void nautilus_window_realize (GtkWidget *widget);
-static void nautilus_window_real_set_content_view (NautilusWindow *window, NautilusViewFrame *new_view);
-
-/* Object framework static variables */
-static GnomeAppClass *parent_class = NULL;
-
-/* Other static variables */
-static GSList *history_list = NULL;
-
-/* Private functions */
-static void nautilus_window_class_init (NautilusWindowClass *klass);
-static void nautilus_window_init (NautilusWindow *window);
-static void nautilus_window_destroy (NautilusWindow *window);
-static void nautilus_window_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void nautilus_window_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void nautilus_window_goto_uri_callback (GtkWidget *widget,
- const char *uri,
- GtkWidget *window);
-
-static void nautilus_window_navigation_bar_mode_changed_callback (GtkWidget *widget,
- NautilusSwitchableNavigationBarMode mode,
- GtkWidget *window);
-static void zoom_in_callback (NautilusZoomControl *zoom_control,
- NautilusWindow *window);
-static void zoom_out_callback (NautilusZoomControl *zoom_control,
- NautilusWindow *window);
-static void zoom_to_level_callback (NautilusZoomControl *zoom_control,
- double level,
- NautilusWindow *window);
-static void zoom_to_fit_callback (NautilusZoomControl *zoom_control,
- NautilusWindow *window);
-static void sidebar_panels_changed_callback (gpointer user_data);
-static NautilusViewFrame *window_find_sidebar_panel_by_identifier (NautilusWindow *window,
- NautilusViewIdentifier *identifier);
-static void window_update_sidebar_panels_from_preferences (NautilusWindow *window);
-
/* Milliseconds */
#define STATUSBAR_CLEAR_TIMEOUT 5000
-GtkType
-nautilus_window_get_type(void)
-{
- static guint window_type = 0;
-
- if (!window_type) {
- GtkTypeInfo window_info = {
- "NautilusWindow",
- sizeof(NautilusWindow),
- sizeof(NautilusWindowClass),
- (GtkClassInitFunc) nautilus_window_class_init,
- (GtkObjectInitFunc) nautilus_window_init,
- NULL,
- NULL,
- NULL
- };
-
- window_type = gtk_type_unique (gnome_app_get_type(), &window_info);
- }
-
- return window_type;
-}
-
enum {
ARG_0,
ARG_APP_ID,
@@ -138,8 +72,29 @@ enum {
ARG_CONTENT_VIEW
};
+/* Other static variables */
+static GSList *history_list = NULL;
+
+static void nautilus_window_initialize_class (NautilusWindowClass *klass);
+static void nautilus_window_initialize (NautilusWindow *window);
+static void nautilus_window_destroy (GtkObject *object);
+static void nautilus_window_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void nautilus_window_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void nautilus_window_realize (GtkWidget *widget);
+static void nautilus_window_real_set_content_view (NautilusWindow *window,
+ NautilusViewFrame *new_view);
+static void sidebar_panels_changed_callback (gpointer user_data);
+
+NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusWindow,
+ nautilus_window,
+ GNOME_TYPE_APP)
+
static void
-nautilus_window_class_init (NautilusWindowClass *klass)
+nautilus_window_initialize_class (NautilusWindowClass *klass)
{
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
@@ -147,18 +102,11 @@ nautilus_window_class_init (NautilusWindowClass *klass)
parent_class = gtk_type_class(gnome_app_get_type());
object_class = (GtkObjectClass*) klass;
- object_class->destroy = (void (*)(GtkObject *))nautilus_window_destroy;
+ object_class->destroy = nautilus_window_destroy;
object_class->get_arg = nautilus_window_get_arg;
object_class->set_arg = nautilus_window_set_arg;
widget_class = (GtkWidgetClass*) klass;
-
- /* FIXME bugzilla.eazel.com 1580
- * The parent_class field in the NautilusWindowClass is redundant
- * given that we have static parent_class variable. One or the other
- * should go. Since the static is usually our practice the field should go.
- */
- klass->parent_class = gtk_type_class (gtk_type_parent (object_class->type));
gtk_object_add_arg_type ("NautilusWindow::app_id",
GTK_TYPE_STRING,
@@ -177,7 +125,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
}
static void
-nautilus_window_init (NautilusWindow *window)
+nautilus_window_initialize (NautilusWindow *window)
{
window->details = g_new0 (NautilusWindowDetails, 1);
@@ -218,7 +166,7 @@ nautilus_window_goto_uri (NautilusWindow *window, const char *uri)
}
static void
-nautilus_window_goto_uri_callback (GtkWidget *widget,
+goto_uri_callback (GtkWidget *widget,
const char *uri,
GtkWidget *window)
{
@@ -226,7 +174,7 @@ nautilus_window_goto_uri_callback (GtkWidget *widget,
}
static void
-nautilus_window_navigation_bar_mode_changed_callback (GtkWidget *widget,
+navigation_bar_mode_changed_callback (GtkWidget *widget,
NautilusSwitchableNavigationBarMode mode,
GtkWidget *window)
{
@@ -297,10 +245,10 @@ nautilus_window_constructed (NautilusWindow *window)
gtk_widget_show (GTK_WIDGET (window->navigation_bar));
gtk_signal_connect (GTK_OBJECT (window->navigation_bar), "location_changed",
- nautilus_window_goto_uri_callback, window);
+ goto_uri_callback, window);
gtk_signal_connect (GTK_OBJECT (window->navigation_bar), "mode_changed",
- nautilus_window_navigation_bar_mode_changed_callback, window);
+ navigation_bar_mode_changed_callback, window);
gtk_box_pack_start (GTK_BOX (location_bar_box), window->navigation_bar,
TRUE, TRUE, GNOME_PAD_SMALL);
@@ -370,7 +318,7 @@ nautilus_window_constructed (NautilusWindow *window)
window->sidebar = nautilus_sidebar_new ();
gtk_widget_show (GTK_WIDGET (window->sidebar));
gtk_signal_connect (GTK_OBJECT (window->sidebar), "location_changed",
- nautilus_window_goto_uri_callback, window);
+ goto_uri_callback, window);
/* FIXME bugzilla.eazel.com 1243:
* We should use inheritance instead of these special cases
@@ -468,10 +416,12 @@ view_disconnect (gpointer data, gpointer user_data)
}
static void
-nautilus_window_destroy (NautilusWindow *window)
+nautilus_window_destroy (GtkObject *object)
{
- NautilusWindowClass *klass = NAUTILUS_WINDOW_CLASS(GTK_OBJECT(window)->klass);
-
+ NautilusWindow *window;
+
+ window = NAUTILUS_WINDOW (object);
+
/* Dont keep track of sidebar panel changes no more */
nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE,
sidebar_panels_changed_callback,
@@ -506,8 +456,7 @@ nautilus_window_destroy (NautilusWindow *window)
g_source_remove (window->action_tag);
}
- if (GTK_OBJECT_CLASS(klass->parent_class)->destroy)
- GTK_OBJECT_CLASS(klass->parent_class)->destroy(GTK_OBJECT(window));
+ NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (GTK_OBJECT (window)));
}
void
@@ -588,8 +537,7 @@ nautilus_window_realize (GtkWidget *widget)
gchar *filename;
/* Create our GdkWindow */
- if (GTK_WIDGET_CLASS(parent_class)->realize)
- (* GTK_WIDGET_CLASS(parent_class)->realize) (widget);
+ NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, realize, (widget));
/* Set the mini icon */
/* FIXME bugzilla.eazel.com 609:
diff --git a/src/nautilus-window.h b/src/nautilus-window.h
index add874aa6..65293f5eb 100644
--- a/src/nautilus-window.h
+++ b/src/nautilus-window.h
@@ -51,7 +51,6 @@ typedef struct NautilusWindow NautilusWindow;
typedef struct {
GnomeAppClass parent_spot;
- GnomeAppClass *parent_class;
} NautilusWindowClass;
typedef struct NautilusWindowStateInfo NautilusWindowStateInfo;
diff --git a/src/nautilus.oafinfo b/src/nautilus.oafinfo
index 31017fa5e..971f15747 100644
--- a/src/nautilus.oafinfo
+++ b/src/nautilus.oafinfo
@@ -1,50 +1,55 @@
<oaf_info>
-<oaf_server iid="OAFIID:nautilus_file_manager_factory:bd1e1862-92d7-4391-963e-37583f0daef3" type="exe" location="nautilus">
-<oaf_attribute name="repo_ids" type="stringv">
-<item value="IDL:GNOME/GenericFactory:1.0"/>
-<item value="IDL:Nautilus/Application:1.0"/>
-<item value="IDL:Bonobo/Unknown:1.0"/>
-</oaf_attribute>
-<oaf_attribute name="name" type="string" value="Nautilus application"/>
-<oaf_attribute name="description" type="string" value="File manager component's factory"/>
+<oaf_server iid="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3" type="exe" location="nautilus">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Nautilus factory"/>
+ <oaf_attribute name="description" type="string" value="Factory for Nautilus shell and file manager"/>
</oaf_server>
-<oaf_server iid="OAFIID:nautilus_file_manager_icon_view:42681b21-d5ca-4837-87d2-394d88ecc058" type="factory" location="OAFIID:nautilus_file_manager_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
-<oaf_attribute name="repo_ids" type="stringv">
-<item value="IDL:Bonobo/Control:1.0"/>
-<item value="IDL:Bonobo/Unknown:1.0"/>
-<item value="IDL:Nautilus/ContentView:1.0"/>
-<item value="IDL:Nautilus/View:1.0"/>
-</oaf_attribute>
-<oaf_attribute name="name" type="string" value="File manager icon view"/>
-<oaf_attribute name="description" type="string" value="File manager component that shows a two-dimensional icon space"/>
-<oaf_attribute name="bonobo:supported_mime_types" type="stringv">
-<item value="x-special/directory"/>
-<item value="x-special/webdav-directory"/>
-</oaf_attribute>
-<oaf_attribute name="nautilus:view_as_name" type="string" value="Icons"/>
+<oaf_server iid="OAFIID:nautilus_file_manager_icon_view:42681b21-d5ca-4837-87d2-394d88ecc058" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ <item value="IDL:Bonobo/Control:1.0"/>
+ <item value="IDL:Nautilus/View:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Nautilus file manager icon view"/>
+ <oaf_attribute name="description" type="string" value="Nautilus file manager component that shows a two-dimensional icon space"/>
+ <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
+ <item value="x-special/directory"/>
+ <item value="x-special/webdav-directory"/>
+ </oaf_attribute>
+ <oaf_attribute name="nautilus:view_as_name" type="string" value="Icons"/>
</oaf_server>
-<oaf_server iid="OAFIID:nautilus_file_manager_list_view:521e489d-0662-4ad7-ac3a-832deabe111c" type="factory" location="OAFIID:nautilus_file_manager_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
-<oaf_attribute name="repo_ids" type="stringv">
-<item value="IDL:Bonobo/Control:1.0"/>
-<item value="IDL:Bonobo/Unknown:1.0"/>
-<item value="IDL:Nautilus/ContentView:1.0"/>
-<item value="IDL:Nautilus/View:1.0"/>
-</oaf_attribute>
-<oaf_attribute name="name" type="string" value="File manager list view"/>
-<oaf_attribute name="description" type="string" value="File manager component that shows a scrollable list"/>
-<oaf_attribute name="bonobo:supported_mime_types" type="stringv">
-<item value="x-special/directory"/>
-<item value="x-special/webdav-directory"/>
-</oaf_attribute>
-<oaf_attribute name="bonobo:additional_uri_schemes" type="stringv">
-<item value="search"/>
-<item value="gnome-search"/>
-<item value="medusa"/>
-</oaf_attribute>
-<oaf_attribute name="nautilus:view_as_name" type="string" value="List"/>
+<oaf_server iid="OAFIID:nautilus_file_manager_list_view:521e489d-0662-4ad7-ac3a-832deabe111c" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ <item value="IDL:Bonobo/Control:1.0"/>
+ <item value="IDL:Nautilus/View:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Nautilus file manager list view"/>
+ <oaf_attribute name="description" type="string" value="Nautilus file manager component that shows a scrollable list"/>
+ <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
+ <item value="x-special/directory"/>
+ <item value="x-special/webdav-directory"/>
+ </oaf_attribute>
+ <oaf_attribute name="bonobo:additional_uri_schemes" type="stringv">
+ <item value="search"/>
+ <item value="gnome-search"/>
+ <item value="medusa"/>
+ </oaf_attribute>
+ <oaf_attribute name="nautilus:view_as_name" type="string" value="List"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:nautilus_shell:cd5183b2-3913-4b74-9b8e-10528b0de08d" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ <item value="IDL:Nautilus/Shell:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Nautilus shell"/>
+ <oaf_attribute name="description" type="string" value="Nautilus shell operations that can be done from subsequent command-line invocations"/>
</oaf_server>
</oaf_info>