From 41f3913cdf7688d175c536b166521d21f79ca4fc Mon Sep 17 00:00:00 2001 From: Darin Adler Date: Wed, 12 Jul 2000 19:33:38 +0000 Subject: Change to use bonobo_object_unref now that the leaks have been fixed. This * src/nautilus-view-frame.c: (nautilus_view_frame_destroy_client): Change to use bonobo_object_unref now that the leaks have been fixed. This requires the new Bonobo or you'll have lots of leaked processes. Luckily, Nautilus won't compile without the new Bonobo due to my use of bonobo_object_shutdown in main :-) * configure.in: Fix the way -Werror works so it affects all directories, not just ones where we use WERROR. * components/hardware/Makefile.am: * components/help/Makefile.am: * components/history/Makefile.am: * components/loser/content/Makefile.am: * components/loser/sidebar/Makefile.am: * components/mozilla/Makefile.am: * components/music/Makefile.am: * components/notes/Makefile.am: * components/rpmview/Makefile.am: * components/sample/Makefile.am: * components/services/install/command-line/Makefile.am: * components/services/install/lib/Makefile.am: * components/services/install/nautilus-view/Makefile.am: * components/services/install/server/Makefile.am: * components/services/inventory/lib/Makefile.am: * components/services/inventory/nautilus-view/Makefile.am: * components/services/inventory/service/Makefile.am: * components/services/login/lib/Makefile.am: * components/services/login/nautilus-view/Makefile.am: * components/services/login/service/Makefile.am: * components/services/startup/command-line/Makefile.am: * components/services/startup/lib/Makefile.am: * components/services/startup/nautilus-view/Makefile.am: * components/services/summary/lib/Makefile.am: * components/services/summary/nautilus-view/Makefile.am: * components/services/summary/service/Makefile.am: * components/services/time/command-line/Makefile.am: * components/services/time/nautilus-view/Makefile.am: * components/services/time/service/Makefile.am: * components/services/trilobite/helper/Makefile.am: * components/services/trilobite/libtrilobite/Makefile.am: * components/services/trilobite/sample/command-line/.cvsignore: * components/services/trilobite/sample/command-line/Makefile.am: * components/services/trilobite/sample/lib/Makefile.am: * components/services/trilobite/sample/nautilus-view/Makefile.am: * components/services/trilobite/sample/service/Makefile.am: * components/services/vault/command-line/Makefile.am: * components/services/vault/lib/Makefile.am: * components/services/vault/nautilus-view/Makefile.am: * components/services/vault/service/Makefile.am: * components/tree/Makefile.am: * components/websearch/Makefile.am: * cut-n-paste-code/widgets/nautilus-druid/Makefile.am: * helper-utilities/authenticate/Makefile.am: * libnautilus-extensions/Makefile.am: * libnautilus/Makefile.am: * librsvg/Makefile.am: * nautilus-installer/src/Makefile.am: * src/Makefile.am: * src/file-manager/Makefile.am: * test/Makefile.am: Got rid of the WERROR shell variable. The -Werror switch is no longer a per-directory thing. * librsvg/Makefile.am: Added libpng to the libraries for the test program. Maybe this was the wrong thing to do, but before this change the link failed. * components/sample/Makefile.am: * components/sample/main.c: * components/sample/nautilus-sample-content-view.c: * components/sample/nautilus-sample-content-view.h: A clean-up of the sample, including fixing many bugs and adding lots of comments. I figure we want this to be as close to exemplary as possible since people will continue to start with it for new components. * libnautilus-extensions/nautilus-bookmark.c: (nautilus_bookmark_new_with_icon): Removed a bogus extra ref of a NautilusFile object that I spotted in here. * src/nautilus-application.c: (nautilus_application_destroy_window): Re-added the code to quit when the last window is closed that Mike removed in his recent check-in. * src/nautilus-main.c: (main): Added a call to bonobo_shutdown. We don't need this call, but I say, "Why not?" --- ChangeLog | 132 +++++++++++++---- components/hardware/Makefile.am | 3 +- components/help/Makefile.am | 1 - components/history/Makefile.am | 2 +- components/loser/content/Makefile.am | 3 +- components/loser/sidebar/Makefile.am | 3 +- components/mozilla/Makefile.am | 1 - components/music/Makefile.am | 3 +- components/notes/Makefile.am | 3 +- components/rpmview/Makefile.am | 1 - components/sample/Makefile.am | 21 +-- components/sample/main.c | 91 ++++++++---- components/sample/nautilus-sample-content-view.c | 163 +++++++++++---------- components/sample/nautilus-sample-content-view.h | 32 ++-- components/services/install-view/Makefile.am | 1 - .../services/install/command-line/Makefile.am | 1 - components/services/install/lib/Makefile.am | 1 - .../services/install/nautilus-view/Makefile.am | 1 - components/services/install/server/Makefile.am | 1 - components/services/inventory/lib/Makefile.am | 1 - .../services/inventory/nautilus-view/Makefile.am | 1 - components/services/inventory/service/Makefile.am | 1 - components/services/login/lib/Makefile.am | 1 - .../services/login/nautilus-view/Makefile.am | 1 - components/services/login/service/Makefile.am | 1 - .../services/startup/command-line/Makefile.am | 1 - components/services/startup/lib/Makefile.am | 1 - .../services/startup/nautilus-view/Makefile.am | 1 - components/services/summary/lib/Makefile.am | 1 - .../services/summary/nautilus-view/Makefile.am | 1 - components/services/summary/service/Makefile.am | 1 - components/services/time/command-line/Makefile.am | 1 - components/services/time/nautilus-view/Makefile.am | 1 - components/services/time/service/Makefile.am | 1 - components/services/trilobite/helper/Makefile.am | 1 - .../services/trilobite/libtrilobite/Makefile.am | 1 - .../trilobite/sample/command-line/.cvsignore | 2 +- .../trilobite/sample/command-line/Makefile.am | 1 - .../services/trilobite/sample/lib/Makefile.am | 1 - .../trilobite/sample/nautilus-view/Makefile.am | 1 - .../services/trilobite/sample/service/Makefile.am | 1 - components/services/vault/command-line/Makefile.am | 1 - components/services/vault/lib/Makefile.am | 1 - .../services/vault/nautilus-view/Makefile.am | 1 - components/services/vault/service/Makefile.am | 1 - components/tree/Makefile.am | 3 +- components/websearch/Makefile.am | 3 +- configure.in | 37 +++-- .../widgets/nautilus-druid/Makefile.am | 1 - helper-utilities/authenticate/Makefile.am | 1 - libnautilus-extensions/Makefile.am | 1 - libnautilus-extensions/nautilus-bookmark.c | 3 +- libnautilus-private/Makefile.am | 1 - libnautilus-private/nautilus-bookmark.c | 3 +- libnautilus/Makefile.am | 1 - librsvg/Makefile.am | 2 +- nautilus-installer/src/Makefile.am | 2 +- src/Makefile.am | 1 - src/file-manager/Makefile.am | 1 - src/file-manager/fm-desktop-icon-view.c | 3 +- src/nautilus-application.c | 3 + src/nautilus-main.c | 1 + src/nautilus-view-frame.c | 10 +- test/Makefile.am | 1 - 64 files changed, 308 insertions(+), 261 deletions(-) diff --git a/ChangeLog b/ChangeLog index be39fb77d..fb63910df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,93 @@ +2000-07-12 Darin Adler + + * src/nautilus-view-frame.c: (nautilus_view_frame_destroy_client): + Change to use bonobo_object_unref now that the leaks have been + fixed. This requires the new Bonobo or you'll have lots of leaked + processes. Luckily, Nautilus won't compile without the new Bonobo + due to my use of bonobo_object_shutdown in main :-) + + * configure.in: + Fix the way -Werror works so it affects all directories, not just + ones where we use WERROR. + + * components/hardware/Makefile.am: + * components/help/Makefile.am: + * components/history/Makefile.am: + * components/loser/content/Makefile.am: + * components/loser/sidebar/Makefile.am: + * components/mozilla/Makefile.am: + * components/music/Makefile.am: + * components/notes/Makefile.am: + * components/rpmview/Makefile.am: + * components/sample/Makefile.am: + * components/services/install/command-line/Makefile.am: + * components/services/install/lib/Makefile.am: + * components/services/install/nautilus-view/Makefile.am: + * components/services/install/server/Makefile.am: + * components/services/inventory/lib/Makefile.am: + * components/services/inventory/nautilus-view/Makefile.am: + * components/services/inventory/service/Makefile.am: + * components/services/login/lib/Makefile.am: + * components/services/login/nautilus-view/Makefile.am: + * components/services/login/service/Makefile.am: + * components/services/startup/command-line/Makefile.am: + * components/services/startup/lib/Makefile.am: + * components/services/startup/nautilus-view/Makefile.am: + * components/services/summary/lib/Makefile.am: + * components/services/summary/nautilus-view/Makefile.am: + * components/services/summary/service/Makefile.am: + * components/services/time/command-line/Makefile.am: + * components/services/time/nautilus-view/Makefile.am: + * components/services/time/service/Makefile.am: + * components/services/trilobite/helper/Makefile.am: + * components/services/trilobite/libtrilobite/Makefile.am: + * components/services/trilobite/sample/command-line/.cvsignore: + * components/services/trilobite/sample/command-line/Makefile.am: + * components/services/trilobite/sample/lib/Makefile.am: + * components/services/trilobite/sample/nautilus-view/Makefile.am: + * components/services/trilobite/sample/service/Makefile.am: + * components/services/vault/command-line/Makefile.am: + * components/services/vault/lib/Makefile.am: + * components/services/vault/nautilus-view/Makefile.am: + * components/services/vault/service/Makefile.am: + * components/tree/Makefile.am: + * components/websearch/Makefile.am: + * cut-n-paste-code/widgets/nautilus-druid/Makefile.am: + * helper-utilities/authenticate/Makefile.am: + * libnautilus-extensions/Makefile.am: + * libnautilus/Makefile.am: + * librsvg/Makefile.am: + * nautilus-installer/src/Makefile.am: + * src/Makefile.am: + * src/file-manager/Makefile.am: + * test/Makefile.am: + Got rid of the WERROR shell variable. The -Werror switch is no + longer a per-directory thing. + + * librsvg/Makefile.am: + Added libpng to the libraries for the test program. Maybe this was + the wrong thing to do, but before this change the link failed. + + * components/sample/Makefile.am: + * components/sample/main.c: + * components/sample/nautilus-sample-content-view.c: + * components/sample/nautilus-sample-content-view.h: + A clean-up of the sample, including fixing many bugs and adding + lots of comments. I figure we want this to be as close to + exemplary as possible since people will continue to start with it + for new components. + + * libnautilus-extensions/nautilus-bookmark.c: + (nautilus_bookmark_new_with_icon): Removed a bogus extra ref of a + NautilusFile object that I spotted in here. + + * src/nautilus-application.c: (nautilus_application_destroy_window): + Re-added the code to quit when the last window is closed that Mike + removed in his recent check-in. + + * src/nautilus-main.c: (main): Added a call to bonobo_shutdown. + We don't need this call, but I say, "Why not?" + 2000-07-12 J Shane Culpepper * components/services/login/nautilus-view/nautilus-login-view.c: @@ -14,9 +104,8 @@ 2000-07-12 J Shane Culpepper - * - components/services/install/nautilus-view/nautilus-service-install- - view.c: (generate_install_form): + * components/services/install/nautilus-view/nautilus-service-install-view.c: + (generate_install_form): Formatting tweaks to the Description. @@ -49,18 +138,12 @@ * components/services/trilobite/idl/trilobite-service.idl: * components/services/trilobite/libtrilobite/Makefile.am: - * - components/services/trilobite/libtrilobite/libtrilobite-service.h: + * components/services/trilobite/libtrilobite/libtrilobite-service.h: * components/services/trilobite/libtrilobite/libtrilobite.h: - * - components/services/trilobite/libtrilobite/trilobite-service-passwo - rdquery-private.h: - * - components/services/trilobite/libtrilobite/trilobite-service-passwo - rdquery-public.h: - * - components/services/trilobite/libtrilobite/trilobite-service-passwo - rdquery.c: (impl_Trilobite_PasswordQuery_set_query_client), + * components/services/trilobite/libtrilobite/trilobite-service-passwordquery-private.h: + * components/services/trilobite/libtrilobite/trilobite-service-passwordquery-public.h: + * components/services/trilobite/libtrilobite/trilobite-service-passwordquery.c: + (impl_Trilobite_PasswordQuery_set_query_client), (trilobite_passwordquery_get_epv), (trilobite_passwordquery_destroy), (trilobite_passwordquery_set_arg), @@ -69,7 +152,6 @@ (trilobite_passwordquery_add_interface), (trilobite_passwordquery_get_password), (trilobite_passwordquery_set_prompt): - * Added the trilobite_passwordquery interface and trilobite_passwordquery_client. You add the _passwordquery interface to your service, and the client (view or cli tool) @@ -83,8 +165,7 @@ we should loose then when Robey does the gtk interface to be used in views and cli tools. - components/services/trilobite/libtrilobite/trilobite-service-public - .h: + * components/services/trilobite/libtrilobite/trilobite-service-public.h: * components/services/trilobite/libtrilobite/trilobite-service.c: (trilobite_service_add_interface): Added the trilobite_service_add_interface. All trilobite @@ -96,8 +177,7 @@ * components/services/trilobite/sample/service/Makefile.am: * components/services/trilobite/sample/service/main.c: (trilobite_sample_service_factory): - * - components/services/trilobite/sample/service/sample-service-impl.c: + * components/services/trilobite/sample/service/sample-service-impl.c: (impl_Trilobite_Eazel_Sample_list_it), (sample_service_get_epv): Added a list_it call, that given a dir does a ls on it. (proof of concept stuff). So I've also added the trilobite_passwordquery @@ -140,14 +220,12 @@ * components/history/nautilus-history-view.c: (history_load_location), (history_button_press), (history_button_release), (make_obj): - Removed drag move from list. Changed navigation - to occur on mouse up, not on select row. This is - because select row is called on rows during a drag. - Tghis can be annoying if you are trying to drag a - row item and Nautilus is navigating to the item you - ared dragging over. This behavior happens even if we - are not supporting drag move of items. Now navigation - occurs on the mouse up. + Removed drag move from list. Changed navigation to occur on mouse + up, not on select row. This is because select row is called on + rows during a drag. This can be annoying if you are trying to drag + a row item and Nautilus is navigating to the item you ared + dragging over. This behavior happens even if we are not supporting + drag move of items. Now navigation occurs on the mouse up. 2000-07-11 Michael Engber diff --git a/components/hardware/Makefile.am b/components/hardware/Makefile.am index 45840ce05..8e18a293b 100644 --- a/components/hardware/Makefile.am +++ b/components/hardware/Makefile.am @@ -10,8 +10,7 @@ INCLUDES = \ $(GCONF_CFLAGS) \ $(VFS_CFLAGS) \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - $(GNOMEUI_CFLAGS) \ - $(WERROR) + $(GNOMEUI_CFLAGS) oafdir = $(datadir)/oaf diff --git a/components/help/Makefile.am b/components/help/Makefile.am index 68bf6ddee..f6d402eac 100644 --- a/components/help/Makefile.am +++ b/components/help/Makefile.am @@ -13,7 +13,6 @@ INCLUDES = \ $(GCONF_CFLAGS) \ $(VFS_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ -DHYPERBOLA_DATADIR=\""$(datadir)/hyperbola"\" \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ -DINFODIR=\"$(infodir)\" diff --git a/components/history/Makefile.am b/components/history/Makefile.am index 0bba36c25..d0e582d6a 100644 --- a/components/history/Makefile.am +++ b/components/history/Makefile.am @@ -1,7 +1,7 @@ bin_PROGRAMS=nautilus-history-view INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GNOMEUI_CFLAGS) $(GCONF_CFLAGS) \ - $(BONOBO_CFLAGS) $(VFS_CFLAGS) $(WERROR) + $(BONOBO_CFLAGS) $(VFS_CFLAGS) LDADD=\ $(top_builddir)/libnautilus/libnautilus.la \ diff --git a/components/loser/content/Makefile.am b/components/loser/content/Makefile.am index a02f3ead6..e9cad578a 100644 --- a/components/loser/content/Makefile.am +++ b/components/loser/content/Makefile.am @@ -6,8 +6,7 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_builddir) \ $(GCONF_CFLAGS) \ - $(GNOMEUI_CFLAGS) \ - $(WERROR) + $(GNOMEUI_CFLAGS) oafdir = $(datadir)/oaf diff --git a/components/loser/sidebar/Makefile.am b/components/loser/sidebar/Makefile.am index b491c7b7b..5e0693861 100644 --- a/components/loser/sidebar/Makefile.am +++ b/components/loser/sidebar/Makefile.am @@ -6,8 +6,7 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_builddir) \ $(GCONF_CFLAGS) \ - $(GNOMEUI_CFLAGS) \ - $(WERROR) + $(GNOMEUI_CFLAGS) oafdir = $(datadir)/oaf diff --git a/components/mozilla/Makefile.am b/components/mozilla/Makefile.am index 483ec45d7..c45aaeb10 100644 --- a/components/mozilla/Makefile.am +++ b/components/mozilla/Makefile.am @@ -9,7 +9,6 @@ INCLUDES = \ -I$(top_builddir) \ $(BONOBO_CFLAGS) \ $(GNOMEUI_CFLAGS) \ - $(WERROR) \ $(MOZILLA_COMPONENT_CFLAGS) \ $(NULL) diff --git a/components/music/Makefile.am b/components/music/Makefile.am index b91102e2f..c66674a12 100644 --- a/components/music/Makefile.am +++ b/components/music/Makefile.am @@ -8,8 +8,7 @@ INCLUDES = \ $(GCONF_CFLAGS) \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ $(GNOMEUI_CFLAGS) \ - $(VFS_CFLAGS) \ - $(WERROR) + $(VFS_CFLAGS) oafdir = $(datadir)/oaf diff --git a/components/notes/Makefile.am b/components/notes/Makefile.am index 9dff8ee4a..bc8b1b9ef 100644 --- a/components/notes/Makefile.am +++ b/components/notes/Makefile.am @@ -8,8 +8,7 @@ INCLUDES=\ $(GNOMEUI_CFLAGS) \ $(GCONF_CFLAGS) \ $(BONOBO_CFLAGS) \ - $(VFS_CFLAGS) \ - $(WERROR) + $(VFS_CFLAGS) LDADD=\ $(top_builddir)/libnautilus/libnautilus.la \ diff --git a/components/rpmview/Makefile.am b/components/rpmview/Makefile.am index d01327ef2..645604e55 100644 --- a/components/rpmview/Makefile.am +++ b/components/rpmview/Makefile.am @@ -14,7 +14,6 @@ INCLUDES = \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ $(GNOMEUI_CFLAGS) \ $(VFS_CFLAGS) \ - $(WERROR) \ $(NULL) oafdir = $(datadir)/oaf diff --git a/components/sample/Makefile.am b/components/sample/Makefile.am index d98a90a75..3949f21e7 100644 --- a/components/sample/Makefile.am +++ b/components/sample/Makefile.am @@ -1,20 +1,20 @@ CPPFLAGS = \ - -DPREFIX=\"$(prefix)\" - -DG_LOG_DOMAIN=\"Nautilus-Sample\" + -DPREFIX=\"$(prefix)\" \ + -DG_LOG_DOMAIN=\"Nautilus-Sample\" \ + -DICON_DIR=\"$(datadir)/pixmaps/nautilus\" INCLUDES = \ -I$(top_srcdir) \ -I$(top_builddir) \ - $(GCONF_CFLAGS) \ $(GNOMEUI_CFLAGS) \ - $(WERROR) + $(BONOBO_CFLAGS) \ + $(OAF_CFLAGS) oafdir = $(datadir)/oaf oaf_DATA = \ nautilus-sample-content-view.oafinfo - bin_PROGRAMS = \ nautilus-sample-content-view @@ -23,15 +23,10 @@ nautilus_sample_content_view_SOURCES = \ nautilus-sample-content-view.c \ main.c -nautilus_sample_content_view_LDADD = \ +nautilus_sample_content_view_LDADD = \ $(top_builddir)/libnautilus/libnautilus.la \ - $(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \ - $(top_builddir)/cut-n-paste-code/widgets/e-paned/libe-paned.la \ - $(top_builddir)/librsvg/librsvg.la \ - $(GNOMEUI_LIBS) \ - $(BONOBO_LIBS) \ - $(GCONF_LIBS) \ - $(VFS_LIBS) \ + $(GNOMEUI_LIBS) \ + $(BONOBO_LIBS) \ $(OAF_LIBS) EXTRA_DIST = $(oaf_DATA) diff --git a/components/sample/main.c b/components/sample/main.c index 763a8f628..c92d9a336 100644 --- a/components/sample/main.c +++ b/components/sample/main.c @@ -1,4 +1,5 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + /* * Copyright (C) 2000 Eazel, Inc * @@ -17,25 +18,34 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * - * Author: Maciej Stachowiak + * Author: Maciej Stachowiak */ -/* main.c - main function and object activation function for sample - content view component. */ +/* main.c - Main function and object activation function for sample + * view component. + */ #include +#include +#include +#include /* must come before gnome-init.h */ +#include /* must come before liboaf.h */ +#include +#include +#include #include "nautilus-sample-content-view.h" -#include -#include -#include +#define FACTORY_IID "OAFIID:nautilus_sample_content_view_factory:3df6b028-be44-4a18-95c3-7720f50ca0c5" +#define VIEW_IID "OAFIID:nautilus_sample_content_view:45c746bc-7d64-4346-90d5-6410463b43ae" static int object_count = 0; static void -sample_object_destroyed(GtkObject *obj) +sample_object_destroyed (GtkObject *object) { + g_assert (GTK_IS_OBJECT (object)); + object_count--; if (object_count <= 0) { gtk_main_quit (); @@ -45,47 +55,66 @@ sample_object_destroyed(GtkObject *obj) static BonoboObject * sample_make_object (BonoboGenericFactory *factory, const char *iid, - void *closure) + gpointer callback_data) { - NautilusSampleContentView *view; - NautilusView *nautilus_view; + NautilusSampleContentView *widget; + NautilusView *view; - if (strcmp (iid, "OAFIID:nautilus_sample_content_view:45c746bc-7d64-4346-90d5-6410463b43ae")) { + g_assert (BONOBO_IS_GENERIC_FACTORY (factory)); + g_assert (iid != NULL); + g_assert (callback_data == NULL); + + /* Check that this is the one type of object we know how to + * create. + */ + if (strcmp (iid, VIEW_IID) != 0) { return NULL; } - view = NAUTILUS_SAMPLE_CONTENT_VIEW (gtk_object_new (NAUTILUS_TYPE_SAMPLE_CONTENT_VIEW, NULL)); - + /* Create the view. The way this sample is set up, we create a + * widget which makes the NautilusView object as part of it's + * initialization. This is a bit backwards as it's the view + * that owns the widget. + */ + widget = NAUTILUS_SAMPLE_CONTENT_VIEW (gtk_object_new (NAUTILUS_TYPE_SAMPLE_CONTENT_VIEW, NULL)); + view = nautilus_sample_content_view_get_nautilus_view (widget); + + /* Connect a handler that will get us out of the main loop + * when there are no more objects outstanding. + */ object_count++; + gtk_signal_connect (GTK_OBJECT (view), "destroy", + sample_object_destroyed, NULL); - nautilus_view = nautilus_sample_content_view_get_nautilus_view (view); - - gtk_signal_connect (GTK_OBJECT (nautilus_view), "destroy", sample_object_destroyed, NULL); - - return BONOBO_OBJECT (nautilus_view); + return BONOBO_OBJECT (view); } -int main(int argc, char *argv[]) +int +main (int argc, char *argv[]) { - BonoboGenericFactory *factory; CORBA_ORB orb; - CORBA_Environment ev; - - CORBA_exception_init(&ev); - - gnome_init_with_popt_table("nautilus-sample-content-view", VERSION, - argc, argv, - oaf_popt_options, 0, NULL); + BonoboGenericFactory *factory; + /* Initialize libraries. */ + gnome_init_with_popt_table ("nautilus-sample-content-view", VERSION, + argc, argv, + oaf_popt_options, 0, NULL); orb = oaf_init (argc, argv); - bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL); - factory = bonobo_generic_factory_new_multi ("OAFIID:nautilus_sample_content_view_factory:3df6b028-be44-4a18-95c3-7720f50ca0c5", sample_make_object, NULL); - + /* Create the factory. */ + factory = bonobo_generic_factory_new_multi (FACTORY_IID, sample_make_object, NULL); + + /* Loop until we have no more objects. */ do { bonobo_main (); } while (object_count > 0); + + /* Let the factory go. */ + bonobo_object_unref (BONOBO_OBJECT (factory)); + + /* Finalize libraries. */ + bonobo_shutdown (); - return 0; + return EXIT_SUCCESS; } diff --git a/components/sample/nautilus-sample-content-view.c b/components/sample/nautilus-sample-content-view.c index 8cbe52754..818c8787c 100644 --- a/components/sample/nautilus-sample-content-view.c +++ b/components/sample/nautilus-sample-content-view.c @@ -38,29 +38,38 @@ #include #include -/* A NautilusContentView's private information. */ struct NautilusSampleContentViewDetails { - char *uri; + char *location; NautilusView *nautilus_view; }; +#define SAMPLE_MENU_ITEM_PATH NAUTILUS_MENU_PATH_FILE_MENU "/Sample" +#define SAMPLE_TOOLBAR_ITEM_PATH NAUTILUS_TOOLBAR_PATH_MAIN_TOOLBAR "/Sample" + static void nautilus_sample_content_view_initialize_class (NautilusSampleContentViewClass *klass); static void nautilus_sample_content_view_initialize (NautilusSampleContentView *view); static void nautilus_sample_content_view_destroy (GtkObject *object); static void sample_load_location_callback (NautilusView *nautilus_view, const char *location, - NautilusSampleContentView *view); -static void sample_merge_bonobo_items_callback (BonoboObject *control, + gpointer user_data); +static void sample_merge_bonobo_items_callback (BonoboControl *control, gboolean state, gpointer user_data); -NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusSampleContentView, nautilus_sample_content_view, GTK_TYPE_LABEL) +/* FIXME: Should we use this Nautilus-only macro in a class that's + * supposed to be a sample? + */ +NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusSampleContentView, + nautilus_sample_content_view, + GTK_TYPE_LABEL) static void nautilus_sample_content_view_initialize_class (NautilusSampleContentViewClass *klass) { GtkObjectClass *object_class; + g_assert (NAUTILUS_IS_SAMPLE_CONTENT_VIEW_CLASS (klass)); + object_class = GTK_OBJECT_CLASS (klass); object_class->destroy = nautilus_sample_content_view_destroy; @@ -69,20 +78,21 @@ nautilus_sample_content_view_initialize_class (NautilusSampleContentViewClass *k static void nautilus_sample_content_view_initialize (NautilusSampleContentView *view) { + g_assert (NAUTILUS_IS_SAMPLE_CONTENT_VIEW (view)); + view->details = g_new0 (NautilusSampleContentViewDetails, 1); - gtk_label_set_text (GTK_LABEL (view), g_strdup ("(none)")); + gtk_label_set_text (GTK_LABEL (view), g_strdup (_("(none)"))); view->details->nautilus_view = nautilus_view_new (GTK_WIDGET (view)); gtk_signal_connect (GTK_OBJECT (view->details->nautilus_view), "load_location", - GTK_SIGNAL_FUNC (sample_load_location_callback), + sample_load_location_callback, view); - /* - * Get notified when our bonobo control is activated so we - * can merge menu & toolbar items into Nautilus's UI. + /* Get notified when our bonobo control is activated so we can + * merge menu & toolbar items into the shell's UI. */ gtk_signal_connect (GTK_OBJECT (nautilus_view_get_bonobo_control (view->details->nautilus_view)), @@ -100,7 +110,7 @@ nautilus_sample_content_view_destroy (GtkObject *object) view = NAUTILUS_SAMPLE_CONTENT_VIEW (object); - g_free (view->details->uri); + g_free (view->details->location); g_free (view->details); NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object)); @@ -111,31 +121,30 @@ nautilus_sample_content_view_destroy (GtkObject *object) * * Return the NautilusView object associated with this view; this * is needed to export the view via CORBA/Bonobo. + * * @view: NautilusSampleContentView to get the nautilus_view from.. - * **/ NautilusView * nautilus_sample_content_view_get_nautilus_view (NautilusSampleContentView *view) { + g_return_val_if_fail (NAUTILUS_IS_SAMPLE_CONTENT_VIEW (view), NULL); + return view->details->nautilus_view; } -/** - * nautilus_sample_content_view_load_uri: - * - * Load the resource pointed to by the specified URI. - * - **/ -void -nautilus_sample_content_view_load_uri (NautilusSampleContentView *view, - const char *uri) +static void +load_location (NautilusSampleContentView *view, + const char *location) { char *label_text; + + g_assert (NAUTILUS_IS_SAMPLE_CONTENT_VIEW (view)); + g_assert (location != NULL); - g_free (view->details->uri); - view->details->uri = g_strdup (uri); + g_free (view->details->location); + view->details->location = g_strdup (location); - label_text = g_strdup_printf (_("%s\n\nThis is a sample Nautilus content view component."), uri); + label_text = g_strdup_printf (_("%s\n\nThis is a sample Nautilus content view component."), location); gtk_label_set_text (GTK_LABEL (view), label_text); g_free (label_text); } @@ -143,8 +152,15 @@ nautilus_sample_content_view_load_uri (NautilusSampleContentView *view, static void sample_load_location_callback (NautilusView *nautilus_view, const char *location, - NautilusSampleContentView *view) + gpointer user_data) { + NautilusSampleContentView *view; + + g_assert (NAUTILUS_IS_VIEW (nautilus_view)); + g_assert (location != NULL); + + view = NAUTILUS_SAMPLE_CONTENT_VIEW (user_data); + g_assert (nautilus_view == view->details->nautilus_view); /* It's mandatory to send an underway message once the @@ -157,7 +173,7 @@ sample_load_location_callback (NautilusView *nautilus_view, nautilus_view_report_load_underway (nautilus_view); /* Do the actual load. */ - nautilus_sample_content_view_load_uri (view, location); + load_location (view, location); /* It's mandatory to call report_load_complete once the * component is done loading successfully, or @@ -176,15 +192,18 @@ bonobo_sample_callback (BonoboUIHandler *ui_handler, gpointer user_data, const c NautilusSampleContentView *view; char *label_text; - g_assert (NAUTILUS_IS_SAMPLE_CONTENT_VIEW (user_data)); + g_assert (BONOBO_IS_UI_HANDLER (ui_handler)); + g_assert (path != NULL); view = NAUTILUS_SAMPLE_CONTENT_VIEW (user_data); - if (strcmp (path, "/File/Sample") == 0) { - label_text = g_strdup_printf ("%s\n\nYou selected the Sample menu item.", view->details->uri); + if (strcmp (path, SAMPLE_MENU_ITEM_PATH) == 0) { + label_text = g_strdup_printf ("%s\n\nYou selected the Sample menu item.", + view->details->location); } else { - g_assert (strcmp (path, "/Main/Sample") == 0); - label_text = g_strdup_printf (_("%s\n\nYou clicked the Sample toolbar button."), view->details->uri); + g_assert (strcmp (path, SAMPLE_TOOLBAR_ITEM_PATH) == 0); + label_text = g_strdup_printf (_("%s\n\nYou clicked the Sample toolbar button."), + view->details->location); } gtk_label_set_text (GTK_LABEL (view), label_text); @@ -192,59 +211,51 @@ bonobo_sample_callback (BonoboUIHandler *ui_handler, gpointer user_data, const c } static void -sample_merge_bonobo_items_callback (BonoboObject *control, gboolean state, gpointer user_data) +sample_merge_bonobo_items_callback (BonoboControl *control, gboolean state, gpointer user_data) { NautilusSampleContentView *view; - BonoboUIHandler *local_ui_handler; - GdkPixbuf *pixbuf; + BonoboUIHandler *ui_handler; + GdkPixbuf *pixbuf; BonoboUIHandlerPixmapType pixmap_type; - char *path; - - g_assert (NAUTILUS_IS_SAMPLE_CONTENT_VIEW (user_data)); + g_assert (BONOBO_IS_CONTROL (control)); + view = NAUTILUS_SAMPLE_CONTENT_VIEW (user_data); - local_ui_handler = bonobo_control_get_ui_handler (BONOBO_CONTROL (control)); + ui_handler = bonobo_control_get_ui_handler (control); if (state) { /* Tell the Nautilus window to merge our bonobo_ui_handler items with its ones */ - bonobo_ui_handler_set_container (local_ui_handler, - bonobo_control_get_remote_ui_handler (BONOBO_CONTROL (control))); + bonobo_ui_handler_set_container (ui_handler, + bonobo_control_get_remote_ui_handler (control)); - /* Load test pixbuf */ - pixbuf = gdk_pixbuf_new_from_file ("/gnome/share/pixmaps/nautilus/i-directory-24.png"); - if (pixbuf != NULL) + /* Load test pixbuf (used for both menu item and toolbar). */ + pixbuf = gdk_pixbuf_new_from_file (ICON_DIR "/i-directory-24.png"); + if (pixbuf != NULL) { pixmap_type = BONOBO_UI_HANDLER_PIXMAP_PIXBUF_DATA; - else + } else { pixmap_type = BONOBO_UI_HANDLER_PIXMAP_NONE; + } - /* Create our sample menu item. */ - path = bonobo_ui_handler_build_path (NULL, - "File", - "Sample", - NULL); + /* Create our sample menu item. */ bonobo_ui_handler_menu_new_item - (local_ui_handler, /* BonoboUIHandler */ - path, /* menu item path, must start with /some-existing-menu-path and be otherwise unique */ - _("_Sample"), /* menu item user-displayed label */ - _("This is a sample merged menu item"), /* hint that appears in status bar */ - bonobo_ui_handler_menu_get_pos - (local_ui_handler, - NAUTILUS_MENU_PATH_NEW_WINDOW_ITEM) + 1, /* position within menu; -1 means last */ - pixmap_type, /* pixmap type */ - pixbuf, /* pixmap data */ - 'M', /* accelerator key, couldn't bear the thought of using Control-S for anything except Save */ - GDK_CONTROL_MASK, /* accelerator key modifiers */ - bonobo_sample_callback, /* callback function */ - view); /* callback function data */ - g_free (path); + (ui_handler, + SAMPLE_MENU_ITEM_PATH, /* menu item path, must start with /some-existing-menu-path and be otherwise unique */ + _("_Sample"), /* menu item user-displayed label */ + _("This is a sample merged menu item"), /* hint that appears in status bar */ + bonobo_ui_handler_menu_get_pos /* position within menu; -1 means last */ + (ui_handler, + NAUTILUS_MENU_PATH_NEW_WINDOW_ITEM) + 1, + pixmap_type, /* pixmap type */ + pixbuf, /* pixmap data */ + 'M', /* accelerator key (couldn't bear the thought of using Control-S for anything except Save) */ + GDK_CONTROL_MASK, /* accelerator key modifiers */ + bonobo_sample_callback, /* callback function */ + view); /* callback function data */ /* Create our sample toolbar button. */ - path = bonobo_ui_handler_build_path (NAUTILUS_TOOLBAR_PATH_MAIN_TOOLBAR, - "Sample", - NULL); bonobo_ui_handler_toolbar_new_item - (local_ui_handler, /* BonoboUIHandler */ - path, /* button path, must start with /some-existing-toolbar-path and be otherwise unique */ + (ui_handler, + SAMPLE_TOOLBAR_ITEM_PATH, /* button path, must start with /some-existing-toolbar-path and be otherwise unique */ _("Sample"), /* button user-displayed label */ _("This is a sample merged toolbar button"), /* hint that appears in status bar */ -1, /* position, -1 means last */ @@ -254,15 +265,13 @@ sample_merge_bonobo_items_callback (BonoboObject *control, gboolean state, gpoin 0, /* accelerator key modifiers */ bonobo_sample_callback, /* callback function */ view); /* callback function's data */ - g_free (path); - } else { - /* Do nothing. */ } - /* - * Note that we do nothing if state is FALSE. Nautilus content views are activated - * when installed, but never explicitly deactivated. When the view changes to another, - * the content view object is destroyed, which ends up calling bonobo_ui_handler_unset_container, - * which removes its merged menu & toolbar items. - */ + /* Note that we do nothing if state is FALSE. Nautilus content + * views are activated when installed, but never explicitly + * deactivated. When the view changes to another, the content + * view object is destroyed, which ends up calling + * bonobo_ui_handler_unset_container, which removes its merged + * menu & toolbar items. + */ } diff --git a/components/sample/nautilus-sample-content-view.h b/components/sample/nautilus-sample-content-view.h index 58dc91763..75d705f7c 100644 --- a/components/sample/nautilus-sample-content-view.h +++ b/components/sample/nautilus-sample-content-view.h @@ -21,36 +21,34 @@ * Author: Maciej Stachowiak */ -/* nautilus-sample-content-view.h - sample content view - component. This component just displays a simple label of the URI - and does nothing else. It should be a good basis for writing - out-of-proc content views.*/ +/* nautilus-sample-content-view.h - Sample view component. This + * component just displays a simple message and includes a menu item + * and a toolbar button else. It should be a good basis for writing + * Nautilus view components. + */ #ifndef NAUTILUS_SAMPLE_CONTENT_VIEW_H #define NAUTILUS_SAMPLE_CONTENT_VIEW_H -#include #include - -typedef struct NautilusSampleContentView NautilusSampleContentView; -typedef struct NautilusSampleContentViewClass NautilusSampleContentViewClass; +#include #define NAUTILUS_TYPE_SAMPLE_CONTENT_VIEW (nautilus_sample_content_view_get_type ()) #define NAUTILUS_SAMPLE_CONTENT_VIEW(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_SAMPLE_CONTENT_VIEW, NautilusSampleContentView)) #define NAUTILUS_SAMPLE_CONTENT_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_SAMPLE_CONTENT_VIEW, NautilusSampleContentViewClass)) #define NAUTILUS_IS_SAMPLE_CONTENT_VIEW(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_SAMPLE_CONTENT_VIEW)) -#define NAUTILUS_IS_SAMPLE_CONTENT_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), NAUTILUS_TYPE_SAMPLE_CONTENT_VIEW)) +#define NAUTILUS_IS_SAMPLE_CONTENT_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_SAMPLE_CONTENT_VIEW)) typedef struct NautilusSampleContentViewDetails NautilusSampleContentViewDetails; -struct NautilusSampleContentView { - GtkLabel parent; +typedef struct { + GtkLabel parent_slot; NautilusSampleContentViewDetails *details; -}; +} NautilusSampleContentView; -struct NautilusSampleContentViewClass { - GtkLabelClass parent_class; -}; +typedef struct { + GtkLabelClass parent_slot; +} NautilusSampleContentViewClass; /* GtkObject support */ GtkType nautilus_sample_content_view_get_type (void); @@ -58,8 +56,4 @@ GtkType nautilus_sample_content_view_get_type (void); /* Component embedding support */ NautilusView *nautilus_sample_content_view_get_nautilus_view (NautilusSampleContentView *view); -/* URI handling */ -void nautilus_sample_content_view_load_uri (NautilusSampleContentView *view, - const char *uri); - #endif /* NAUTILUS_SAMPLE_CONTENT_VIEW_H */ diff --git a/components/services/install-view/Makefile.am b/components/services/install-view/Makefile.am index b9bec2707..df30d52b6 100644 --- a/components/services/install-view/Makefile.am +++ b/components/services/install-view/Makefile.am @@ -14,7 +14,6 @@ INCLUDES = \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ $(GNOMEUI_CFLAGS) \ $(VFS_CFLAGS) \ - $(WERROR) \ $(NULL) oafdir = $(datadir)/oaf diff --git a/components/services/install/command-line/Makefile.am b/components/services/install/command-line/Makefile.am index 8abfc5423..6b25e70ac 100644 --- a/components/services/install/command-line/Makefile.am +++ b/components/services/install/command-line/Makefile.am @@ -14,7 +14,6 @@ INCLUDES = \ $(GCONF_CFLAGS) \ $(XML_CFLAGS) \ $(GHTTP_CFLAGS) \ - $(WERROR) \ $(NULL) LDADD = \ diff --git a/components/services/install/lib/Makefile.am b/components/services/install/lib/Makefile.am index 2bd69fedb..5d9c04a46 100644 --- a/components/services/install/lib/Makefile.am +++ b/components/services/install/lib/Makefile.am @@ -16,7 +16,6 @@ INCLUDES = \ $(GCONF_CFLAGS) \ $(XML_CFLAGS) \ $(GHTTP_CFLAGS) \ - $(WERROR) \ $(NULL) lib_LTLIBRARIES = libeazelinstall.la diff --git a/components/services/install/nautilus-view/Makefile.am b/components/services/install/nautilus-view/Makefile.am index b9bec2707..df30d52b6 100644 --- a/components/services/install/nautilus-view/Makefile.am +++ b/components/services/install/nautilus-view/Makefile.am @@ -14,7 +14,6 @@ INCLUDES = \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ $(GNOMEUI_CFLAGS) \ $(VFS_CFLAGS) \ - $(WERROR) \ $(NULL) oafdir = $(datadir)/oaf diff --git a/components/services/install/server/Makefile.am b/components/services/install/server/Makefile.am index c9ba6db0e..6f7c22d04 100644 --- a/components/services/install/server/Makefile.am +++ b/components/services/install/server/Makefile.am @@ -18,7 +18,6 @@ INCLUDES = \ $(GNOME_INCLUDEDIR) \ $(OAF_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ $(NULL) LDFLAGS = \ diff --git a/components/services/inventory/lib/Makefile.am b/components/services/inventory/lib/Makefile.am index 657173028..847620ef0 100644 --- a/components/services/inventory/lib/Makefile.am +++ b/components/services/inventory/lib/Makefile.am @@ -14,7 +14,6 @@ INCLUDES = \ $(GNOME_CFLAGS) \ $(GCONF_CFLAGS) \ $(GHTTP_CFLAGS) \ - $(WERROR) \ $(NULL) noinst_LIBRARIES = libinventory.a libinventory_corba.a diff --git a/components/services/inventory/nautilus-view/Makefile.am b/components/services/inventory/nautilus-view/Makefile.am index 0bde68aa5..4776c4c14 100644 --- a/components/services/inventory/nautilus-view/Makefile.am +++ b/components/services/inventory/nautilus-view/Makefile.am @@ -16,7 +16,6 @@ INCLUDES = \ $(GCONF_CFLAGS) \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ $(VFS_CFLAGS) \ - $(WERROR) \ $(NULL) oafdir = $(datadir)/oaf diff --git a/components/services/inventory/service/Makefile.am b/components/services/inventory/service/Makefile.am index b3a61b348..761389037 100644 --- a/components/services/inventory/service/Makefile.am +++ b/components/services/inventory/service/Makefile.am @@ -16,7 +16,6 @@ INCLUDES = \ $(GNOME_INCLUDEDIR) \ $(OAF_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ $(NULL) LDFLAGS = \ diff --git a/components/services/login/lib/Makefile.am b/components/services/login/lib/Makefile.am index b23dfc2e3..4a1e93a4d 100644 --- a/components/services/login/lib/Makefile.am +++ b/components/services/login/lib/Makefile.am @@ -13,7 +13,6 @@ INCLUDES = \ $(GNOME_CFLAGS) \ $(GCONF_CFLAGS) \ $(GHTTP_CFLAGS) \ - $(WERROR) \ $(NULL) noinst_LIBRARIES = liblogin_corba.a diff --git a/components/services/login/nautilus-view/Makefile.am b/components/services/login/nautilus-view/Makefile.am index 368695dd6..c2ce27eba 100644 --- a/components/services/login/nautilus-view/Makefile.am +++ b/components/services/login/nautilus-view/Makefile.am @@ -16,7 +16,6 @@ INCLUDES = \ $(GCONF_CFLAGS) \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ $(VFS_CFLAGS) \ - $(WERROR) \ $(NULL) oafdir = $(datadir)/oaf diff --git a/components/services/login/service/Makefile.am b/components/services/login/service/Makefile.am index 17ef53d46..8d9a67a87 100644 --- a/components/services/login/service/Makefile.am +++ b/components/services/login/service/Makefile.am @@ -16,7 +16,6 @@ INCLUDES = \ $(GNOME_INCLUDEDIR) \ $(OAF_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ $(NULL) LDFLAGS = \ diff --git a/components/services/startup/command-line/Makefile.am b/components/services/startup/command-line/Makefile.am index 9aa97ac4b..73300328c 100644 --- a/components/services/startup/command-line/Makefile.am +++ b/components/services/startup/command-line/Makefile.am @@ -9,7 +9,6 @@ INCLUDES = \ -I$(top_builddir) \ $(GNOMEUI_CFLAGS) \ $(GCONF_CFLAGS) \ - $(WERROR) \ $(NULL) oafdir = $(datadir)/oaf diff --git a/components/services/startup/lib/Makefile.am b/components/services/startup/lib/Makefile.am index eb5b5e951..a7b914edd 100644 --- a/components/services/startup/lib/Makefile.am +++ b/components/services/startup/lib/Makefile.am @@ -11,7 +11,6 @@ INCLUDES = \ $(GNOME_CFLAGS) \ $(GCONF_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ $(NULL) noinst_LIBRARIES = libstartup.a diff --git a/components/services/startup/nautilus-view/Makefile.am b/components/services/startup/nautilus-view/Makefile.am index 199bf5ce5..1c7242874 100644 --- a/components/services/startup/nautilus-view/Makefile.am +++ b/components/services/startup/nautilus-view/Makefile.am @@ -15,7 +15,6 @@ INCLUDES = \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ $(GHTTP_CFLAGS) \ $(VFS_CFLAGS) \ - $(WERROR) \ $(NULL) oafdir = $(datadir)/oaf diff --git a/components/services/summary/lib/Makefile.am b/components/services/summary/lib/Makefile.am index 95f399a3c..52fabfe7e 100644 --- a/components/services/summary/lib/Makefile.am +++ b/components/services/summary/lib/Makefile.am @@ -13,7 +13,6 @@ INCLUDES = \ $(GNOME_CFLAGS) \ $(GCONF_CFLAGS) \ $(GHTTP_CFLAGS) \ - $(WERROR) \ $(NULL) noinst_LIBRARIES = libsummary_corba.a diff --git a/components/services/summary/nautilus-view/Makefile.am b/components/services/summary/nautilus-view/Makefile.am index 27102793b..9bb82d7c3 100644 --- a/components/services/summary/nautilus-view/Makefile.am +++ b/components/services/summary/nautilus-view/Makefile.am @@ -16,7 +16,6 @@ INCLUDES = \ $(GCONF_CFLAGS) \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ $(VFS_CFLAGS) \ - $(WERROR) \ $(NULL) oafdir = $(datadir)/oaf diff --git a/components/services/summary/service/Makefile.am b/components/services/summary/service/Makefile.am index e5110a4ac..c41a46b54 100644 --- a/components/services/summary/service/Makefile.am +++ b/components/services/summary/service/Makefile.am @@ -16,7 +16,6 @@ INCLUDES = \ $(GNOME_INCLUDEDIR) \ $(OAF_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ $(NULL) LDFLAGS = \ diff --git a/components/services/time/command-line/Makefile.am b/components/services/time/command-line/Makefile.am index f018cfa63..d793e1d76 100644 --- a/components/services/time/command-line/Makefile.am +++ b/components/services/time/command-line/Makefile.am @@ -10,7 +10,6 @@ INCLUDES = \ -I$(top_srcdir)/components/services/trilobite \ $(GNOMEUI_CFLAGS) \ $(GCONF_CFLAGS) \ - $(WERROR) \ $(NULL) diff --git a/components/services/time/nautilus-view/Makefile.am b/components/services/time/nautilus-view/Makefile.am index 3a3974256..d8e4b2f63 100644 --- a/components/services/time/nautilus-view/Makefile.am +++ b/components/services/time/nautilus-view/Makefile.am @@ -16,7 +16,6 @@ INCLUDES = \ $(GNOME_INCLUDEDIR) \ $(OAF_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ $(NULL) diff --git a/components/services/time/service/Makefile.am b/components/services/time/service/Makefile.am index a6945855c..3e0930262 100644 --- a/components/services/time/service/Makefile.am +++ b/components/services/time/service/Makefile.am @@ -17,7 +17,6 @@ INCLUDES = \ $(GNOME_INCLUDEDIR) \ $(OAF_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ $(NULL) LDFLAGS = \ diff --git a/components/services/trilobite/helper/Makefile.am b/components/services/trilobite/helper/Makefile.am index 674f89b33..1e1c6f77f 100644 --- a/components/services/trilobite/helper/Makefile.am +++ b/components/services/trilobite/helper/Makefile.am @@ -26,7 +26,6 @@ eazel_helper_LDADD = \ INCLUDES = \ $(GLIB_CFLAGS) \ - $(WERROR) \ $(NULL) EXTRA_DIST = \ diff --git a/components/services/trilobite/libtrilobite/Makefile.am b/components/services/trilobite/libtrilobite/Makefile.am index 2cd38f740..f344de9e3 100644 --- a/components/services/trilobite/libtrilobite/Makefile.am +++ b/components/services/trilobite/libtrilobite/Makefile.am @@ -16,7 +16,6 @@ INCLUDES = \ $(GCONF_CFLAGS) \ $(OAF_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ $(NULL) libtrilobite_la_LDFLAGS = \ diff --git a/components/services/trilobite/sample/command-line/.cvsignore b/components/services/trilobite/sample/command-line/.cvsignore index dda33b07e..bea2ed8db 100644 --- a/components/services/trilobite/sample/command-line/.cvsignore +++ b/components/services/trilobite/sample/command-line/.cvsignore @@ -2,4 +2,4 @@ .libs Makefile Makefile.in -trilobite-eazel-sample-client +eazel-sample-client diff --git a/components/services/trilobite/sample/command-line/Makefile.am b/components/services/trilobite/sample/command-line/Makefile.am index 3729f65e1..707288705 100644 --- a/components/services/trilobite/sample/command-line/Makefile.am +++ b/components/services/trilobite/sample/command-line/Makefile.am @@ -11,7 +11,6 @@ INCLUDES = \ -I$(top_srcdir)/components/services/trilobite/sample/lib \ $(GNOMEUI_CFLAGS) \ $(GCONF_CFLAGS) \ - $(WERROR) \ $(NULL) bin_PROGRAMS = \ diff --git a/components/services/trilobite/sample/lib/Makefile.am b/components/services/trilobite/sample/lib/Makefile.am index 286af775f..f3300f715 100644 --- a/components/services/trilobite/sample/lib/Makefile.am +++ b/components/services/trilobite/sample/lib/Makefile.am @@ -13,7 +13,6 @@ INCLUDES = \ $(GNOME_CFLAGS) \ $(GCONF_CFLAGS) \ $(GHTTP_CFLAGS) \ - $(WERROR) \ $(NULL) noinst_LIBRARIES = libsample_corba.a diff --git a/components/services/trilobite/sample/nautilus-view/Makefile.am b/components/services/trilobite/sample/nautilus-view/Makefile.am index e79bb726e..a2c912f62 100644 --- a/components/services/trilobite/sample/nautilus-view/Makefile.am +++ b/components/services/trilobite/sample/nautilus-view/Makefile.am @@ -14,7 +14,6 @@ INCLUDES = \ -I$(top_builddir) \ $(GNOMEUI_CFLAGS) \ $(GCONF_CFLAGS) \ - $(WERROR) \ $(NULL) oafdir = $(datadir)/oaf diff --git a/components/services/trilobite/sample/service/Makefile.am b/components/services/trilobite/sample/service/Makefile.am index 40b6cae2d..b404637f2 100644 --- a/components/services/trilobite/sample/service/Makefile.am +++ b/components/services/trilobite/sample/service/Makefile.am @@ -17,7 +17,6 @@ INCLUDES = \ $(GNOME_INCLUDEDIR) \ $(OAF_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ $(NULL) LDFLAGS = \ diff --git a/components/services/vault/command-line/Makefile.am b/components/services/vault/command-line/Makefile.am index 6a6869ba9..4f89c4647 100644 --- a/components/services/vault/command-line/Makefile.am +++ b/components/services/vault/command-line/Makefile.am @@ -11,7 +11,6 @@ INCLUDES = \ -I$(top_srcdir)/components/services/vault/lib \ $(GNOMEUI_CFLAGS) \ $(GCONF_CFLAGS) \ - $(WERROR) \ $(NULL) bin_PROGRAMS = \ diff --git a/components/services/vault/lib/Makefile.am b/components/services/vault/lib/Makefile.am index 40484f9f1..1baaa872e 100644 --- a/components/services/vault/lib/Makefile.am +++ b/components/services/vault/lib/Makefile.am @@ -13,7 +13,6 @@ INCLUDES = \ $(GNOME_CFLAGS) \ $(GCONF_CFLAGS) \ $(GHTTP_CFLAGS) \ - $(WERROR) \ $(NULL) noinst_LIBRARIES = libvault_corba.a diff --git a/components/services/vault/nautilus-view/Makefile.am b/components/services/vault/nautilus-view/Makefile.am index bd530fb86..4b341a868 100644 --- a/components/services/vault/nautilus-view/Makefile.am +++ b/components/services/vault/nautilus-view/Makefile.am @@ -14,7 +14,6 @@ INCLUDES = \ -I$(top_builddir) \ $(GNOMEUI_CFLAGS) \ $(GCONF_CFLAGS) \ - $(WERROR) \ $(NULL) oafdir = $(datadir)/oaf diff --git a/components/services/vault/service/Makefile.am b/components/services/vault/service/Makefile.am index 266a68c32..7d087835b 100644 --- a/components/services/vault/service/Makefile.am +++ b/components/services/vault/service/Makefile.am @@ -16,7 +16,6 @@ INCLUDES = \ $(GNOME_INCLUDEDIR) \ $(OAF_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ $(NULL) LDFLAGS = \ diff --git a/components/tree/Makefile.am b/components/tree/Makefile.am index 259d6b3c6..321f59898 100644 --- a/components/tree/Makefile.am +++ b/components/tree/Makefile.am @@ -8,8 +8,7 @@ INCLUDES = \ -I$(top_builddir) \ $(VFS_CFLAGS) \ $(GCONF_CFLAGS) \ - $(GNOMEUI_CFLAGS) \ - $(WERROR) + $(GNOMEUI_CFLAGS) oafdir = $(datadir)/oaf diff --git a/components/websearch/Makefile.am b/components/websearch/Makefile.am index 38dc1db4d..5331943fc 100644 --- a/components/websearch/Makefile.am +++ b/components/websearch/Makefile.am @@ -7,8 +7,7 @@ INCLUDES=\ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ $(GNOMEUI_CFLAGS) \ $(GCONF_CFLAGS) \ - $(BONOBO_CFLAGS) \ - $(WERROR) + $(BONOBO_CFLAGS) LDADD=\ $(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \ diff --git a/configure.in b/configure.in index 49da08491..dee8c6f6d 100644 --- a/configure.in +++ b/configure.in @@ -21,24 +21,6 @@ AC_PROG_LN_S AC_PROG_MAKE_SET AC_ISC_POSIX -AC_ARG_ENABLE(more-warnings, -[--enable-more-warnings Maximum compiler warnings], -set_more_warnings="$enableval", set_more_warnings=yes) - -# Arg is enabled -if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then - echo "enable compile warnings = $set_more_warnings" - CFLAGS="$CFLAGS \ - -Wall -Wno-uninitialized \ - -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \ - -Wnested-externs -Wpointer-arith \ - -Wno-sign-compare -Wsign-promo" -fi -if test "$GCC" = "yes"; then - WERROR="-Werror" -fi -AC_SUBST(WERROR) - dnl ORBit AM_PATH_ORBIT @@ -361,11 +343,26 @@ AM_GNOME_GETTEXT gnomelocaledir='${prefix}/${DATADIRNAME}/locale' AC_SUBST(gnomelocaledir) - - dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST +dnl Turn on the additional warnings last, so -Werror doesn't affect other tests. +AC_ARG_ENABLE(more-warnings, +[--enable-more-warnings Maximum compiler warnings], +set_more_warnings="$enableval", set_more_warnings=yes) +AC_MSG_CHECKING(for more warnings, including -Werror) +if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then + AC_MSG_RESULT(yes) + CFLAGS="$CFLAGS \ + -Wall -Wno-uninitialized \ + -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \ + -Wnested-externs -Wpointer-arith \ + -Wno-sign-compare -Wsign-promo \ + -Werror" +else + AC_MSG_RESULT(no) +fi + AC_OUTPUT([ nautilus.spec Makefile diff --git a/cut-n-paste-code/widgets/nautilus-druid/Makefile.am b/cut-n-paste-code/widgets/nautilus-druid/Makefile.am index f4f1c63ac..e5671afdd 100644 --- a/cut-n-paste-code/widgets/nautilus-druid/Makefile.am +++ b/cut-n-paste-code/widgets/nautilus-druid/Makefile.am @@ -6,7 +6,6 @@ INCLUDES = \ -I$(top_builddir)/cut-n-paste-code \ $(GNOME_CFLAGS) \ $(GDK_PIXBUF_CFLAGS) \ - $(WERROR) \ $(NULL) libnautilus_druid_la_LDFLAGS=\ diff --git a/helper-utilities/authenticate/Makefile.am b/helper-utilities/authenticate/Makefile.am index 959037297..5cb6c9041 100644 --- a/helper-utilities/authenticate/Makefile.am +++ b/helper-utilities/authenticate/Makefile.am @@ -7,7 +7,6 @@ CPPFLAGS = \ INCLUDES = \ -I$(top_srcdir) \ $(GNOMEUI_CFLAGS) \ - $(WERROR) \ $(NULL) bin_PROGRAMS = nautilus-authenticate diff --git a/libnautilus-extensions/Makefile.am b/libnautilus-extensions/Makefile.am index 1514fb304..66ee8a968 100644 --- a/libnautilus-extensions/Makefile.am +++ b/libnautilus-extensions/Makefile.am @@ -12,7 +12,6 @@ INCLUDES = \ $(GHTTP_CFLAGS) \ $(VFS_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ -D_REENTRANT \ -DDATADIR=\""$(datadir)"\" \ -DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \ diff --git a/libnautilus-extensions/nautilus-bookmark.c b/libnautilus-extensions/nautilus-bookmark.c index fca6608cd..4e401a871 100644 --- a/libnautilus-extensions/nautilus-bookmark.c +++ b/libnautilus-extensions/nautilus-bookmark.c @@ -79,7 +79,7 @@ nautilus_bookmark_destroy (GtkObject *object) g_free (bookmark->details->name); g_free (bookmark->details->uri); - if (bookmark->details->icon) { + if (bookmark->details->icon != NULL) { nautilus_scalable_icon_unref (bookmark->details->icon); } nautilus_file_unref (bookmark->details->file); @@ -382,7 +382,6 @@ nautilus_bookmark_new_with_icon (const char *uri, const char *name, new_bookmark->details->icon = icon; new_bookmark->details->file = nautilus_file_get (uri); - nautilus_file_ref (new_bookmark->details->file); /* Set initial icon based on available information. */ if (!nautilus_bookmark_update_icon (new_bookmark)) { diff --git a/libnautilus-private/Makefile.am b/libnautilus-private/Makefile.am index 1514fb304..66ee8a968 100644 --- a/libnautilus-private/Makefile.am +++ b/libnautilus-private/Makefile.am @@ -12,7 +12,6 @@ INCLUDES = \ $(GHTTP_CFLAGS) \ $(VFS_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ -D_REENTRANT \ -DDATADIR=\""$(datadir)"\" \ -DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \ diff --git a/libnautilus-private/nautilus-bookmark.c b/libnautilus-private/nautilus-bookmark.c index fca6608cd..4e401a871 100644 --- a/libnautilus-private/nautilus-bookmark.c +++ b/libnautilus-private/nautilus-bookmark.c @@ -79,7 +79,7 @@ nautilus_bookmark_destroy (GtkObject *object) g_free (bookmark->details->name); g_free (bookmark->details->uri); - if (bookmark->details->icon) { + if (bookmark->details->icon != NULL) { nautilus_scalable_icon_unref (bookmark->details->icon); } nautilus_file_unref (bookmark->details->file); @@ -382,7 +382,6 @@ nautilus_bookmark_new_with_icon (const char *uri, const char *name, new_bookmark->details->icon = icon; new_bookmark->details->file = nautilus_file_get (uri); - nautilus_file_ref (new_bookmark->details->file); /* Set initial icon based on available information. */ if (!nautilus_bookmark_update_icon (new_bookmark)) { diff --git a/libnautilus/Makefile.am b/libnautilus/Makefile.am index 8a7be19f4..d5333536f 100644 --- a/libnautilus/Makefile.am +++ b/libnautilus/Makefile.am @@ -8,7 +8,6 @@ INCLUDES=-I$(top_srcdir) -I$(top_builddir) -I. \ $(OAF_CFLAGS) \ $(VFS_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ -D_REENTRANT libnautilus_la_LDFLAGS=\ diff --git a/librsvg/Makefile.am b/librsvg/Makefile.am index 5fa7a1a5f..ac268a05c 100644 --- a/librsvg/Makefile.am +++ b/librsvg/Makefile.am @@ -4,6 +4,7 @@ bin_PROGRAMS=test-rsvg test_rsvg_LDADD =\ $(GNOMEUI_LIBS) \ + $(LIBPNG) \ librsvg.la lib_LTLIBRARIES=librsvg.la @@ -12,7 +13,6 @@ INCLUDES=-I$(top_srcdir) -I$(top_builddir) \ $(GNOME_CFLAGS) \ $(GDK_PIXBUF_CFLAGS) \ $(XML_CFLAGS) \ - $(WERROR) \ -D_REENTRANT librsvg_la_LDFLAGS=\ diff --git a/nautilus-installer/src/Makefile.am b/nautilus-installer/src/Makefile.am index 8ffe712c3..6093d5fbd 100644 --- a/nautilus-installer/src/Makefile.am +++ b/nautilus-installer/src/Makefile.am @@ -16,7 +16,7 @@ INCLUDES = \ CPPFLAGS = -DEAZEL_INSTALL_NO_CORBA -CFLAGS = -g $(WERROR) +CFLAGS = -g ##LDFLAGS = -static bin_PROGRAMS = nautilus-installer diff --git a/src/Makefile.am b/src/Makefile.am index cbb0119dd..367b48d33 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,7 +17,6 @@ INCLUDES =\ $(XML_CFLAGS) \ -DVERSION="\"$(VERSION)\"" \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - $(WERROR) \ -DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \ $(NULL) diff --git a/src/file-manager/Makefile.am b/src/file-manager/Makefile.am index 538906616..0b75394a2 100644 --- a/src/file-manager/Makefile.am +++ b/src/file-manager/Makefile.am @@ -10,7 +10,6 @@ INCLUDES = \ $(GNOMEUI_CFLAGS) \ $(VFS_CFLAGS) \ -DVERSION="\"$(VERSION)\"" \ - $(WERROR) \ -D_REENTRANT \ -DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \ $(NULL) diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c index 49918195c..d6e053a8b 100644 --- a/src/file-manager/fm-desktop-icon-view.c +++ b/src/file-manager/fm-desktop-icon-view.c @@ -59,7 +59,7 @@ fm_desktop_icon_view_initialize (FMDesktopIconView *desktop_icon_view) static void fm_desktop_icon_view_quit_menu_item_callback (GtkMenuItem *item, gpointer callback_data) { - fm_directory_view_quit_nautilus( FM_DIRECTORY_VIEW (callback_data)); + fm_directory_view_quit_nautilus (FM_DIRECTORY_VIEW (callback_data)); } static void @@ -83,4 +83,3 @@ fm_desktop_icon_view_create_background_context_menu_items (FMDirectoryView *view gtk_widget_show (menu_item); gtk_menu_append (menu, menu_item); } - diff --git a/src/nautilus-application.c b/src/nautilus-application.c index 659243039..38530de35 100644 --- a/src/nautilus-application.c +++ b/src/nautilus-application.c @@ -408,6 +408,9 @@ static void nautilus_application_destroy_window (GtkObject *obj, NautilusApplication *application) { application->windows = g_slist_remove (application->windows, obj); + if (application->windows == NULL && !application->has_desktop) { + gtk_main_quit (); + } } void diff --git a/src/nautilus-main.c b/src/nautilus-main.c index 29c59a62f..2ebae5708 100644 --- a/src/nautilus-main.c +++ b/src/nautilus-main.c @@ -156,6 +156,7 @@ main (int argc, char *argv[]) bonobo_object_unref (BONOBO_OBJECT (application)); } + bonobo_shutdown (); gnome_vfs_shutdown (); return EXIT_SUCCESS; diff --git a/src/nautilus-view-frame.c b/src/nautilus-view-frame.c index 4cc7309f0..b224163f1 100644 --- a/src/nautilus-view-frame.c +++ b/src/nautilus-view-frame.c @@ -41,9 +41,6 @@ #include #include -/* FIXME bugzilla.eazel.com 917: This should be removed. See below. */ -void bonobo_object_destroy (BonoboObject *object); - enum { OPEN_LOCATION, OPEN_LOCATION_IN_NEW_WINDOW, @@ -232,12 +229,7 @@ nautilus_view_frame_destroy_client (NautilusViewFrame *view) view->component_class->destroy (view, &ev); } - /* FIXME bugzilla.eazel.com 917: This should be removed, but - * there is a circular reference between Bonobo_Control and - * Bonobo_ControlFrame that prevents it from working. Once - * that's fixed, we'd really like to remove it. - */ - bonobo_object_destroy (view->view_frame); + bonobo_object_unref (view->view_frame); view->view_frame = NULL; diff --git a/test/Makefile.am b/test/Makefile.am index 2af54435c..132117e2e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -14,7 +14,6 @@ INCLUDES =\ $(XML_CFLAGS) \ -DVERSION="\"$(VERSION)\"" \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - $(WERROR) \ $(NULL) LDADD =\ -- cgit v1.2.1