diff options
author | Darin Adler <darin@src.gnome.org> | 2001-11-01 01:24:25 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2001-11-01 01:24:25 +0000 |
commit | 097991a9d017975f4a02871e419d97ed700eafd6 (patch) | |
tree | f08d2c9748e58bfc68e855b1069e4ad26ecd3752 | |
parent | 2d5e846c73050bc36a2d04ef8c3f9339029071cb (diff) | |
download | nautilus-097991a9d017975f4a02871e419d97ed700eafd6.tar.gz |
Removed nautilus-config and nautilusConf.sh stuff. Get rid of applets,
* configure.in:
* Makefile.am:
Removed nautilus-config and nautilusConf.sh stuff.
Get rid of applets, helper-scripts, and helper-utilities.
Compile user-guide, help, and omf-install.
* applets/
* helper-scripts/
* helper-utilities/
Removed.
* src/Nautilus_shell.oaf.in: Renamed to .server.in.
* src/.cvsignore: Ignore the new .server.
* src/nautilus-view-frame.c: Add missing include.
* src/nautilus-window.c: (nautilus_window_allow_stop):
Put code in #if GNOME2_CONVERSION_COMPLETE.
33 files changed, 34 insertions, 1681 deletions
@@ -1,5 +1,26 @@ 2001-10-31 Darin Adler <darin@bentspoon.com> + * configure.in: + * Makefile.am: + Removed nautilus-config and nautilusConf.sh stuff. + Get rid of applets, helper-scripts, and helper-utilities. + Compile user-guide, help, and omf-install. + + * applets/ + * helper-scripts/ + * helper-utilities/ + Removed. + + * src/Nautilus_shell.oaf.in: Renamed to .server.in. + * src/.cvsignore: Ignore the new .server. + + * src/nautilus-view-frame.c: Add missing include. + + * src/nautilus-window.c: (nautilus_window_allow_stop): + Put code in #if GNOME2_CONVERSION_COMPLETE. + +2001-10-31 Darin Adler <darin@bentspoon.com> + * README: Try to be kinda up to date. * configure.in: Fix dependencies. I removed too many last time so idl compiles all failed. diff --git a/Makefile.am b/Makefile.am index c1a64340f..204778096 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,10 +5,6 @@ include $(top_srcdir)/Makefile.shared DESKTOP_IN_FILES=nautilus.desktop.in nautilus-help.desktop.in DESKTOP_FILES=$(DESKTOP_IN_FILES:.desktop.in=.desktop) -if HAVE_APPLETS -APPLETS_SUBDIRS = applets -endif - SUBDIRS = \ libnautilus \ libnautilus-private \ @@ -18,17 +14,14 @@ SUBDIRS = \ po \ data \ icons \ + user-guide \ + help \ + omf-install \ $(NULL) XXX = \ components \ - helper-utilities \ - helper-scripts \ - $(APPLETS_SUBDIRS) \ test \ - user-guide \ - help \ - omf-install \ $(NULL) EXTRA_DIST= \ @@ -70,53 +63,9 @@ Applications_DATA = $(DESKTOP_FILES) Toplevelmenudir = $(datadir)/gnome/apps Toplevelmenu_DATA = nautilus-help.desktop -## [The following is shamelessly copied from gnome-vfs.] - -## We create `nautilusConf.sh' here and not from configure because we -## want to get the paths expanded correctly. Macros like srcdir are -## given the value NONE in configure if the user doesn't specify them -## (this is an autoconf feature, not a bug). - -bin_SCRIPTS = $(top_builddir)/nautilus-config - -confexecdir=$(libdir) -confexec_DATA = \ - nautilusConf.sh \ - $(NULL) - -nautilusConf.sh: nautilusConf.sh.in Makefile - sed -e 's?\@NAUTILUS_LIBDIR\@?$(NAUTILUS_LIBDIR)?g' \ - -e 's?\@NAUTILUS_INCLUDEDIR\@?$(NAUTILUS_INCLUDEDIR)?g' \ - -e 's?\@VERSION\@?$(VERSION)?g' \ - -e 's?\@NAUTILUS_LIBS\@?$(NAUTILUS_LIBS)?g' \ - < $(srcdir)/nautilusConf.sh.in > nautilusConf.tmp \ - && mv nautilusConf.tmp nautilusConf.sh - -nautilus-config: nautilus-config.in Makefile - sed -e 's?\@LIBDIR\@?$(libdir)?g' \ - -e 's?\@NAUTIlUS_LIBDIR\@?$(NAUTILUS_LIBDIR)?g' \ - -e 's?\@NAUTILUS_INCLUDEDIR\@?$(NAUTILUS_INCLUDEDIR)?g' \ - -e 's?\@VERSION\@?$(VERSION)?g' \ - -e 's?\@NAUTILUS_LIBS\@?$(NAUTILUS_LIBS)?g' \ - < $(srcdir)/nautilus-config.in > nautilus-config.tmp \ - && mv nautilus-config.tmp nautilus-config && \ - chmod 755 nautilus-config - -################################################################## -# -# dist-hook -# -################################################################## - dist-hook: nautilus.spec cp nautilus.spec $(distdir) -################################################################## -# -# install-data-hook -# -################################################################## - install-data-hook: nautilus-clean.sh $(mkinstalldirs) $(DESTDIR)$(prefix)/bin @list='nautilus-clean.sh'; for p in $$list; do\ diff --git a/applets/.cvsignore b/applets/.cvsignore deleted file mode 100644 index bb67b016d..000000000 --- a/applets/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile.in -Makefile -*~
\ No newline at end of file diff --git a/applets/Makefile.am b/applets/Makefile.am deleted file mode 100644 index f17e756e5..000000000 --- a/applets/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -include $(top_srcdir)/Makefile.shared - -SUBDIRS = \ - launcher \ - preferences-applet \ - $(NULL) diff --git a/applets/launcher/.cvsignore b/applets/launcher/.cvsignore deleted file mode 100644 index 2fd5037f4..000000000 --- a/applets/launcher/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile -Makefile.in -nautilus-launcher-applet -.deps -.libs diff --git a/applets/launcher/Makefile.am b/applets/launcher/Makefile.am deleted file mode 100644 index ec95c391a..000000000 --- a/applets/launcher/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -include $(top_srcdir)/Makefile.shared - -INCLUDES =\ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - -DDATADIR=\""$(datadir)"\" \ - -DBINDIR=\""$(bindir)"\" \ - -I$(top_srcdir) \ - $(NAUTILUS_PRIVATE_CFLAGS) \ - $(NULL) - -bin_PROGRAMS = nautilus-launcher-applet - -nautilus_launcher_applet_SOURCES =\ - nautilus-launcher-applet.c \ - $(NULL) - -nautilus_launcher_applet_LDADD = \ - $(top_builddir)/libnautilus/libnautilus.la \ - $(top_builddir)/libnautilus-private/libnautilus-private.la \ - $(NAUTILUS_PRIVATE_LIBS) \ - $(NULL) - -gnorbadir = $(sysconfdir)/CORBA/servers -gnorba_DATA = nautilus-launcher-applet.gnorba - -EXTRA_DIST =\ - $(gnorba_DATA) \ - $(NULL) diff --git a/applets/launcher/nautilus-launcher-applet.c b/applets/launcher/nautilus-launcher-applet.c deleted file mode 100644 index 340f72424..000000000 --- a/applets/launcher/nautilus-launcher-applet.c +++ /dev/null @@ -1,307 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* - Copyright (C) 2000 Eazel, Inc. - - The Gnome Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The Gnome Library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the Gnome Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - - Authors: Mathieu Lacage <mathieu@eazel.com> - Ramiro Estrugo <ramiro@eazel.com> - */ - -/* Everything beyond this point is pure evil. */ - -#include <config.h> -#include <applet-widget.h> -#include <eel/eel-image.h> -#include <eel/eel-graphic-effects.h> -#include <libgnome/gnome-exec.h> -#include <gtk/gtkobject.h> -#include <gtk/gtkeventbox.h> -#include <gdk/gdkx.h> -#include <gdk/gdkprivate.h> -#include <X11/Xatom.h> -#include <gdk/gdkx.h> - -/* - * The purpose of this applet is to launch Nautilus. The applet tries very hard to - * give good feedback to the user by changing the appearance of the launch icon. - * The launch icon cursor and the desktop cursor are also updated in concert when - * a new Nautilus window is launching. - */ - -#define ICON_NAME "nautilus-launch-icon.png" -#define VERTICAL_OFFSET 2 -#define HORIZONTAL_OFFSET 2 - -static GdkPixbuf *icon_pixbuf = NULL; -static GdkPixbuf *icon_prelight_pixbuf = NULL; -static long last_window_realize_time = 0; -static GtkWidget *icon_image = NULL; -static GtkWidget *icon_event_box = NULL; - -static void set_is_launching (gboolean state); -static gboolean get_is_launching (void); - -static void -create_pixbufs () -{ - if (icon_pixbuf == NULL) { - char *path; - - path = g_strdup_printf ("%s/pixmaps/%s", DATADIR, ICON_NAME); - - icon_pixbuf = gdk_pixbuf_new_from_file (path, NULL); - g_free (path); - - g_assert (icon_pixbuf != NULL); - - icon_prelight_pixbuf = eel_create_spotlight_pixbuf (icon_pixbuf); - } -} - -static void -applet_change_pixel_size(GtkWidget *widget, int size, gpointer data) -{ - /* need to change the size of the button here */ -} - -static gint -image_enter_event (GtkWidget *event_box, - GdkEventCrossing *event, - gpointer client_data) -{ - g_return_val_if_fail (GTK_IS_EVENT_BOX (event_box), TRUE); - g_return_val_if_fail (EEL_IS_IMAGE (client_data), TRUE); - - if (!get_is_launching ()) { - eel_image_set_pixbuf (EEL_IMAGE (client_data), icon_prelight_pixbuf); - } - - return TRUE; -} - -static gint -image_leave_event (GtkWidget *event_box, - GdkEventCrossing *event, - gpointer client_data) -{ - g_return_val_if_fail (GTK_IS_EVENT_BOX (event_box), TRUE); - g_return_val_if_fail (EEL_IS_IMAGE (client_data), TRUE); - - eel_image_set_pixbuf (EEL_IMAGE (client_data), icon_pixbuf); - gtk_object_set_data (GTK_OBJECT (event_box), "was-pressed", FALSE); - - return TRUE; -} - -static GdkWindow * -get_root_window (void) -{ - return GDK_ROOT_PARENT (); -} - -static void -window_set_cursor_for_state (GdkWindow *window, gboolean busy) -{ - GdkCursor *cursor; - - g_return_if_fail (window != NULL); - - cursor = gdk_cursor_new (busy ? GDK_WATCH : GDK_LEFT_PTR); - gdk_window_set_cursor (window, cursor); - gdk_cursor_destroy (cursor); -} - -static gboolean is_launching = FALSE; - -static void -set_is_launching (gboolean state) -{ - if (is_launching == state) { - return; - } - - is_launching = state; - - window_set_cursor_for_state (get_root_window (), is_launching); - window_set_cursor_for_state (GTK_WIDGET (icon_event_box)->window, is_launching); - - eel_image_set_pixbuf_opacity (EEL_IMAGE (icon_image), is_launching ? 128 : 255); -} - -static gboolean -get_is_launching (void) -{ - return is_launching; -} - -static gint -image_button_press_event (GtkWidget *event_box, - GdkEventButton *event, - gpointer client_data) -{ - GtkWidget *icon = GTK_WIDGET (client_data); - - g_return_val_if_fail (GTK_IS_EVENT_BOX (event_box), TRUE); - g_return_val_if_fail (EEL_IS_IMAGE (icon), TRUE); - - if (!get_is_launching ()) { - gtk_object_set_data (GTK_OBJECT (event_box), "was-pressed", GINT_TO_POINTER (TRUE)); - } - - return TRUE; -} - -static gint -image_button_release_event (GtkWidget *event_box, - GdkEventButton *event, - gpointer client_data) -{ - GtkWidget *icon = GTK_WIDGET (client_data); - - g_return_val_if_fail (GTK_IS_EVENT_BOX (event_box), TRUE); - g_return_val_if_fail (EEL_IS_IMAGE (icon), TRUE); - - if (GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (event_box), "was-pressed"))) { - gtk_object_set_data (GTK_OBJECT (event_box), "was-pressed", FALSE); - - if (!get_is_launching ()) - { - char *path; - gint pid; - - path = g_strdup_printf ("%s/%s", BINDIR, "run-nautilus"); - - pid = gnome_execute_async (NULL, 1, &path); - - if (pid != 0) { - set_is_launching (TRUE); - } - - g_free (path); - } - } - - return TRUE; -} - -static GdkFilterReturn -event_filter (GdkXEvent *gdk_xevent, - GdkEvent *event, - gpointer client_data) -{ - XEvent *xevent = (XEvent *) gdk_xevent; - - if (xevent->type == PropertyNotify) { - GdkAtom actual_property_type; - gint actual_format; - gint actual_length; - guchar *data; - - if (gdk_property_get (get_root_window (), - gdk_atom_intern ("_NAUTILUS_LAST_WINDOW_REALIZE_TIME", FALSE), - 0, - 0, - 1L, - FALSE, - &actual_property_type, - &actual_format, - &actual_length, - &data)) { - - if (actual_format == 32 && actual_length == 4) { - long realize_time; - - realize_time = *((long *) data); - - if (last_window_realize_time != realize_time) { - last_window_realize_time = realize_time; - set_is_launching (FALSE); - } - } - - g_free (data); - - } - } - - return GDK_FILTER_CONTINUE; -} - -static void -root_listen_for_property_changes (void) -{ - XWindowAttributes attribs = { 0 }; - - gdk_window_add_filter (get_root_window (), event_filter, NULL); - - XGetWindowAttributes (GDK_DISPLAY (), GDK_ROOT_WINDOW (), &attribs); - - XSelectInput (GDK_DISPLAY (), GDK_ROOT_WINDOW (), attribs.your_event_mask | PropertyChangeMask); - - gdk_flush (); -} - -int -main (int argc, char **argv) -{ - GtkWidget *applet; - int size; - - bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE); - - applet_widget_init ("nautilus_launcher_applet", VERSION, argc, - argv, NULL, 0, NULL); - - applet = applet_widget_new ("nautilus_launcher_applet"); - if (applet == NULL) - g_error (_("Can't create nautilus-launcher-applet!")); - - root_listen_for_property_changes (); - - create_pixbufs (); - - icon_event_box = gtk_event_box_new (); - gtk_object_set_data (GTK_OBJECT (icon_event_box), "was-pressed", FALSE); - - icon_image = eel_image_new (NULL); - gtk_misc_set_padding (GTK_MISC (icon_image), 2, 2); - - gtk_signal_connect (GTK_OBJECT (icon_event_box), "enter_notify_event", GTK_SIGNAL_FUNC (image_enter_event), icon_image); - gtk_signal_connect (GTK_OBJECT (icon_event_box), "leave_notify_event", GTK_SIGNAL_FUNC (image_leave_event), icon_image); - gtk_signal_connect (GTK_OBJECT (icon_event_box), "button_press_event", GTK_SIGNAL_FUNC (image_button_press_event), icon_image); - gtk_signal_connect (GTK_OBJECT (icon_event_box), "button_release_event", GTK_SIGNAL_FUNC (image_button_release_event), icon_image); - - eel_image_set_pixbuf (EEL_IMAGE (icon_image), icon_pixbuf); - - gtk_container_add (GTK_CONTAINER (icon_event_box), icon_image); - gtk_object_set_data (GTK_OBJECT (applet), "widget", icon_event_box); - applet_widget_add (APPLET_WIDGET (applet), icon_event_box); - - size = applet_widget_get_panel_pixel_size(APPLET_WIDGET(applet)) - 2; - applet_change_pixel_size (GTK_WIDGET (applet), size, NULL); - - gtk_widget_show_all (applet); - - gtk_signal_connect(GTK_OBJECT(applet),"change_pixel_size", - GTK_SIGNAL_FUNC(applet_change_pixel_size), - NULL); - - applet_widget_gtk_main (); - - return 0; -} diff --git a/applets/launcher/nautilus-launcher-applet.gnorba b/applets/launcher/nautilus-launcher-applet.gnorba deleted file mode 100644 index f2feb22e7..000000000 --- a/applets/launcher/nautilus-launcher-applet.gnorba +++ /dev/null @@ -1,5 +0,0 @@ -[nautilus_preferences_applet] -type=exe -repo_id=IDL:GNOME/Applet:1.0 -description=Nautilus Preferences Applet -location_info=nautilus-preferences-applet diff --git a/applets/preferences-applet/.cvsignore b/applets/preferences-applet/.cvsignore deleted file mode 100644 index 5176ec72e..000000000 --- a/applets/preferences-applet/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile -Makefile.in -nautilus-preferences-applet -.deps -.libs diff --git a/applets/preferences-applet/Makefile.am b/applets/preferences-applet/Makefile.am deleted file mode 100644 index 37d385ecd..000000000 --- a/applets/preferences-applet/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -include $(top_srcdir)/Makefile.shared - -INCLUDES =\ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - -DDATADIR=\""$(datadir)"\" \ - -DBINDIR=\""$(bindir)"\" \ - -I$(top_srcdir) \ - $(NAUTILUS_PRIVATE_CFLAGS) \ - $(NULL) - -bin_PROGRAMS = nautilus-preferences-applet - -nautilus_preferences_applet_SOURCES =\ - nautilus-preferences-applet.c \ - $(NULL) - -nautilus_preferences_applet_LDADD = \ - $(top_builddir)/libnautilus/libnautilus.la \ - $(top_builddir)/libnautilus-private/libnautilus-private.la \ - $(NAUTILUS_PRIVATE_LIBS) \ - $(NULL) - -gnorbadir = $(sysconfdir)/CORBA/servers -gnorba_DATA = nautilus-preferences-applet.gnorba - -EXTRA_DIST =\ - $(gnorba_DATA) \ - $(NULL) diff --git a/applets/preferences-applet/nautilus-preferences-applet.c b/applets/preferences-applet/nautilus-preferences-applet.c deleted file mode 100644 index 6cf16fef8..000000000 --- a/applets/preferences-applet/nautilus-preferences-applet.c +++ /dev/null @@ -1,282 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* - Copyright (C) 2000 Eazel, Inc. - - The Gnome Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The Gnome Library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the Gnome Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - - Authors: Ramiro Estrugo <ramiro@eazel.com> - */ - -/* - * A very simple applet to toggle some Nautilus preferences. - */ - -#include <config.h> -#include <applet-widget.h> -#include <eel/eel-image.h> -#include <libnautilus-private/nautilus-global-preferences.h> -#include <eel/eel-gnome-extensions.h> -#include <eel/eel-gtk-extensions.h> -#include <gtk/gtkvbox.h> -#include <gtk/gtkhbox.h> -#include <gtk/gtktogglebutton.h> - -/* UTTER HACK */ -static ORBit_MessageValidationResult -accept_all_cookies (CORBA_unsigned_long request_id, - CORBA_Principal *principal, - CORBA_char *operation) -{ - /* allow ALL cookies */ - return ORBIT_MESSAGE_ALLOW_ALL; -} - - -typedef struct -{ - char *preference_name; - GtkWidget *button; -} Foo; - -static void -preference_toggle_destroy_callback (GtkObject *object, gpointer callback_data) -{ - Foo *foo = callback_data; - - g_return_if_fail (foo != NULL); - g_return_if_fail (foo->preference_name != NULL); - g_return_if_fail (GTK_IS_TOGGLE_BUTTON (foo->button)); - - g_free (foo->preference_name); - g_free (foo); -} - -static void -boolean_preference_changed_callback (gpointer callback_data) -{ - Foo *foo = callback_data; - - g_return_if_fail (foo != NULL); - g_return_if_fail (foo->preference_name != NULL); - g_return_if_fail (GTK_IS_TOGGLE_BUTTON (foo->button)); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (foo->button), - eel_preferences_get_boolean (foo->preference_name)); -} - -static void -button_toggled (GtkWidget *button, - gpointer callback_data) -{ - Foo *foo = callback_data; - - g_return_if_fail (foo != NULL); - g_return_if_fail (foo->preference_name != NULL); - g_return_if_fail (GTK_IS_TOGGLE_BUTTON (foo->button)); - - eel_preferences_set_boolean (foo->preference_name, GTK_TOGGLE_BUTTON (foo->button)->active); -} - -static GtkWidget * -boolean_toggle_button_new (const char *preference_name, - const char *button_label) -{ - Foo *foo; - GtkWidget *button; - - g_return_val_if_fail (preference_name != NULL, NULL); - g_return_val_if_fail (button_label != NULL, NULL); - - - button = gtk_toggle_button_new_with_label (button_label); - eel_gtk_label_make_smaller (GTK_LABEL (GTK_BIN (button)->child), 4); - - foo = g_new (Foo, 1); - foo->preference_name = g_strdup (preference_name); - foo->button = button; - - gtk_signal_connect (GTK_OBJECT (button), - "destroy", - GTK_SIGNAL_FUNC (preference_toggle_destroy_callback), - foo); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), - eel_preferences_get_boolean (preference_name)); - - gtk_signal_connect_while_alive (GTK_OBJECT (button), - "toggled", - GTK_SIGNAL_FUNC (button_toggled), - foo, - GTK_OBJECT (button)); - - eel_preferences_add_callback_while_alive (preference_name, - boolean_preference_changed_callback, - foo, - GTK_OBJECT (button)); - - return button; -} - -static void -quit_nautilus_button_clicked_callback (GtkWidget *button, - gpointer callback_data) -{ - g_return_if_fail (GTK_IS_BUTTON (button)); - - eel_gnome_shell_execute ("nautilus --quit"); -} - -static void -start_nautilus_button_clicked_callback (GtkWidget *button, - gpointer callback_data) -{ - g_return_if_fail (GTK_IS_BUTTON (button)); - - eel_gnome_shell_execute ("nautilus"); -} - -static void -restart_nautilus_button_clicked_callback (GtkWidget *button, - gpointer callback_data) -{ - g_return_if_fail (GTK_IS_BUTTON (button)); - - eel_gnome_shell_execute ("nautilus --restart"); -} - -static void -exit_button_clicked_callback (GtkWidget *button, - gpointer callback_data) -{ - g_return_if_fail (GTK_IS_BUTTON (button)); - - gtk_main_quit (); -} - -static void -user_level_changed_callback (gpointer callback_data) -{ - g_return_if_fail (GTK_IS_TOGGLE_BUTTON (callback_data)); - - gtk_widget_set_sensitive (GTK_WIDGET (callback_data), - eel_preferences_get_user_level () > 0); -} - -int -main (int argc, char **argv) -{ - GtkWidget *applet; - GtkWidget *main_hbox; - GtkWidget *preference_vbox; - GtkWidget *command_hbox; - GtkWidget *show_desktop_button; - GtkWidget *smooth_graphics_button; - GtkWidget *quit_button; - GtkWidget *start_button; - GtkWidget *restart_button; - GtkWidget *exit_button; - - bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE); - - applet_widget_init ("nautilus_preferences_applet", - VERSION, - argc, - argv, - NULL, - 0, - NULL); - - /* want to accept all corba messages so we setup the request validator - * to just "accept all". With Orbit 5.1 and higher this should be - * secure */ - ORBit_set_request_validation_handler (accept_all_cookies); - - applet = applet_widget_new ("nautilus_preferences_applet"); - - if (applet == NULL) { - g_error (_("Can't create nautilus-preferences-applet!")); - exit (1); - } - - nautilus_global_preferences_init (); - - main_hbox = gtk_hbox_new (FALSE, 1); - - preference_vbox = gtk_vbox_new (FALSE, 1); - gtk_box_pack_start (GTK_BOX (main_hbox), preference_vbox, TRUE, TRUE, 1); - - command_hbox = gtk_hbox_new (FALSE, 1); - gtk_box_pack_start (GTK_BOX (main_hbox), command_hbox, TRUE, TRUE, 1); - - show_desktop_button = boolean_toggle_button_new (NAUTILUS_PREFERENCES_SHOW_DESKTOP, - _("Show Desktop")); - gtk_box_pack_start (GTK_BOX (preference_vbox), show_desktop_button, TRUE, TRUE, 1); - - smooth_graphics_button = boolean_toggle_button_new (NAUTILUS_PREFERENCES_SMOOTH_GRAPHICS_MODE, - _("Smooth Graphics")); - gtk_box_pack_start (GTK_BOX (preference_vbox), smooth_graphics_button, TRUE, TRUE, 1); - - eel_preferences_add_callback ("user_level", - user_level_changed_callback, - show_desktop_button); - user_level_changed_callback (show_desktop_button); - - eel_preferences_add_callback ("user_level", - user_level_changed_callback, - smooth_graphics_button); - user_level_changed_callback (smooth_graphics_button); - - quit_button = gtk_button_new_with_label (_("Quit")); - eel_gtk_label_make_smaller (GTK_LABEL (GTK_BIN (quit_button)->child), 4); - gtk_box_pack_start (GTK_BOX (command_hbox), quit_button, TRUE, TRUE, 1); - gtk_signal_connect (GTK_OBJECT (quit_button), - "clicked", - GTK_SIGNAL_FUNC (quit_nautilus_button_clicked_callback), - NULL); - - start_button = gtk_button_new_with_label (_("Start")); - eel_gtk_label_make_smaller (GTK_LABEL (GTK_BIN (start_button)->child), 4); - gtk_box_pack_start (GTK_BOX (command_hbox), start_button, TRUE, TRUE, 1); - gtk_signal_connect (GTK_OBJECT (start_button), - "clicked", - GTK_SIGNAL_FUNC (start_nautilus_button_clicked_callback), - NULL); - - restart_button = gtk_button_new_with_label (_("Restart")); - eel_gtk_label_make_smaller (GTK_LABEL (GTK_BIN (restart_button)->child), 4); - gtk_box_pack_start (GTK_BOX (command_hbox), restart_button, TRUE, TRUE, 1); - gtk_signal_connect (GTK_OBJECT (restart_button), - "clicked", - GTK_SIGNAL_FUNC (restart_nautilus_button_clicked_callback), - NULL); - - exit_button = gtk_button_new_with_label ("[x]"); - eel_gtk_label_make_smaller (GTK_LABEL (GTK_BIN (exit_button)->child), 4); - gtk_box_pack_start (GTK_BOX (command_hbox), exit_button, TRUE, TRUE, 1); - gtk_signal_connect (GTK_OBJECT (exit_button), - "clicked", - GTK_SIGNAL_FUNC (exit_button_clicked_callback), - NULL); - - gtk_container_add (GTK_CONTAINER (applet), main_hbox); - - gtk_widget_show_all (applet); - - applet_widget_gtk_main (); - - return 0; -} diff --git a/applets/preferences-applet/nautilus-preferences-applet.gnorba b/applets/preferences-applet/nautilus-preferences-applet.gnorba deleted file mode 100644 index a94f3bd81..000000000 --- a/applets/preferences-applet/nautilus-preferences-applet.gnorba +++ /dev/null @@ -1,5 +0,0 @@ -[nautilus_launcher_applet] -type=exe -repo_id=IDL:GNOME/Applet:1.0 -description=Nautilus Launcher Applet -location_info=nautilus-launcher-applet diff --git a/configure.in b/configure.in index 9aff495e3..6c901ae98 100644 --- a/configure.in +++ b/configure.in @@ -587,9 +587,6 @@ dnl ========================================================================== AC_OUTPUT([ Makefile -applets/Makefile -applets/launcher/Makefile -applets/preferences-applet/Makefile components/Makefile components/adapter/Makefile components/hardware/Makefile @@ -642,10 +639,6 @@ help/nautilus-user-manual/C/Makefile help/nautilus-user-manual/Makefile help/nautilus-user-manual/es/Makefile help/nautilus-user-manual/ko/Makefile -helper-scripts/Makefile -helper-utilities/Makefile -helper-utilities/error-dialog/Makefile -helper-utilities/xml-migrate/Makefile icons/Makefile icons/crux_eggplant/Makefile icons/crux_eggplant/backgrounds/Makefile @@ -719,6 +712,5 @@ esac dnl <= Snapshot things => echo "NAUTILUS_SOURCE_DIRECTORY : $NAUTILUS_SOURCE_DIRECTORY" -echo "HAVE_APPLETS : $HAVE_APPLETS" dnl <= End of configuration summary => diff --git a/helper-scripts/.cvsignore b/helper-scripts/.cvsignore deleted file mode 100644 index 282522db0..000000000 --- a/helper-scripts/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/helper-scripts/Makefile.am b/helper-scripts/Makefile.am deleted file mode 100644 index 0e8c3cf3e..000000000 --- a/helper-scripts/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -include $(top_srcdir)/Makefile.shared - -EXTRA_DIST= \ - nautilus-verify-rpm.sh \ - nautilus-restore-settings-to-default.sh \ - $(NULL) - -install-data-hook: nautilus-verify-rpm.sh nautilus-restore-settings-to-default.sh - $(mkinstalldirs) $(DESTDIR)$(prefix)/bin - @list='nautilus-verify-rpm.sh nautilus-restore-settings-to-default.sh'; for p in $$list; do\ - if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_PROGRAM) $(srcdir)/$$p $(DESTDIR)$(prefix)/bin/$$p"; \ - $(INSTALL_PROGRAM) $(srcdir)/$$p $(DESTDIR)$(prefix)/bin/$$p; \ - else :; fi; \ - done - diff --git a/helper-scripts/nautilus-restore-settings-to-default.sh b/helper-scripts/nautilus-restore-settings-to-default.sh deleted file mode 100755 index aed48eee6..000000000 --- a/helper-scripts/nautilus-restore-settings-to-default.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -nautilus --quit -gconftool --shutdown - -nautilus_dir=$HOME/.nautilus -fonts_tmp=$HOME/nautilus-fonts-$$ - -if [ -d $nautilus_dir/fonts ] -then - mv $nautilus_dir/fonts $fonts_tmp -fi - -rm -rf $nautilus_dir/ -rm -rf $HOME/.gconf/apps/nautilus/ -rm -rf $HOME/.gconfd - -if [ -d $fonts_tmp ] -then - mkdir -p $nautilus_dir/ - mv $fonts_tmp $nautilus_dir/fonts -fi - diff --git a/helper-scripts/nautilus-verify-rpm.sh b/helper-scripts/nautilus-verify-rpm.sh deleted file mode 100755 index 2ed05c249..000000000 --- a/helper-scripts/nautilus-verify-rpm.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/sh - -# This is a script meant for RPM based systems. -# -# It verifies that the currently installed Nautilus -# RPM has the correct version of Bonobo installed. -# -# We will probably add more sanity checks here -# as we learn of specific problems that break the -# Nautilus RPM. -# - -# This script is meant to be call by the script that -# launched Nautilus. Currently that is run-nautilus. -# -# The result value of this script is: -# -# 0: Nautilus launch may continue. This happens if -# one of the following occured: -# -# a. No error was detected -# b. An unknown error was detected but the user -# chose to continue. -# c. This is not an RPM based system. -# d. Either Bonobo or Nautilus RPMS were not -# found in the system. This is a special -# case which occurs in debug builds. -# Lots of people use run-nautilus with -# with debug builds, so we dont want to -# break that for them. Its possible we -# might handle this case differently in -# the future. For example, we could have -# separate launch scripts for debug and -# rpm installations of Nautilus. -# -# 1: Nautilus launch should be aborted. An error -# known to break Nautilus was detected. -# - -# Check for RPM bases systems only -if [ ! -f /etc/redhat-release ] -then - exit 0 -fi - -# check for nautilus -rpm -q nautilus > /dev/null 2>&1 -if [ $? -ne 0 ] -then - exit 0 -fi - -# check for bonobo -rpm -q bonobo > /dev/null 2>&1 -if [ $? -ne 0 ] -then - exit 0 -fi - -# Verify the nautilus rpm. The idea here is to detect -# whether the Nautilus rpm has been broken by something -# else. One possibility is a forced installed of a newer -# bonobo. -log=/tmp/run-nautilus-log-$$ -rm -f $log -rpm --verify nautilus > $log 2>&1 - -if [ $? -eq 0 ] -then - rm -f $log - exit 0 -fi - -grep "Unsatisfied dependencies" $log | grep bonobo > /dev/null 2>&1 - -if [ $? -eq 0 ] -then - bonobo_version=`rpm -qi bonobo | grep "Version" | awk '{ print $3; }'` - - if [ "$bonobo_version" != "0.26" ] - then - title="Problem Running Nautilus" - - message=`printf "This version of Nautilus requires Bonobo 0.26. This computer has Bonobo version %s installed. There might be a newer version of Nautilus available that will work with this version of Bonobo. - -Please check our download site at http://www.eazel.com/download" $bonobo_version` - - nautilus-error-dialog --message "$message" --title "$title" - exit 1 - fi -fi - -title="Problem Running Nautilus" -button_one="Yes" -button_two="Cancel" - -message="Nautilus or some library it uses is damaged or missing. It might work, but more -likely it will not. You could try to reinstall Nautilus from: -http://www.eazel.com/download. - -Do you want to try to run Nautilus anyway? -" - -nautilus-error-dialog --message "$message" --title "$title" --button-one $button_one --button-two $button_two -rv=$? - -if [ $rv -eq 0 ] -then - exit 0 -fi - -exit 1 - diff --git a/helper-utilities/.cvsignore b/helper-utilities/.cvsignore deleted file mode 100644 index 282522db0..000000000 --- a/helper-utilities/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/helper-utilities/Makefile.am b/helper-utilities/Makefile.am deleted file mode 100644 index 307dc0272..000000000 --- a/helper-utilities/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -NULL= - -SUBDIRS = \ - error-dialog \ - xml-migrate \ - $(NULL) diff --git a/helper-utilities/error-dialog/.cvsignore b/helper-utilities/error-dialog/.cvsignore deleted file mode 100644 index d271c8170..000000000 --- a/helper-utilities/error-dialog/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -nautilus-error-dialog diff --git a/helper-utilities/error-dialog/Makefile.am b/helper-utilities/error-dialog/Makefile.am deleted file mode 100644 index c3ba05d1a..000000000 --- a/helper-utilities/error-dialog/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -NULL = - -INCLUDES = \ - -DG_LOG_DOMAIN=\"NautilusErrorDialog\" \ - -I$(top_srcdir) \ - -DVERSION="\"$(VERSION)\"" \ - $(NULL) - -bin_PROGRAMS = nautilus-error-dialog - -nautilus_error_dialog_SOURCES =\ - nautilus-error-dialog.c \ - $(NULL) - -nautilus_error_dialog_LDADD = diff --git a/helper-utilities/error-dialog/nautilus-error-dialog.c b/helper-utilities/error-dialog/nautilus-error-dialog.c deleted file mode 100644 index 49b91b356..000000000 --- a/helper-utilities/error-dialog/nautilus-error-dialog.c +++ /dev/null @@ -1,219 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* - * Copyright (C) 2000 Eazel, Inc - * - * This program 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. - * - * Authors: Ramiro Estrugo <ramiro@eazel.com> - */ - -/* nautilus-error-dialog.c - A very simple program used to post an - * error dialog or a question dialog. - * - * To post a error dialog: - * - * nautilus-error-dialog --message "My message" --title "My Title" - * - * Posts a error dialog (error icon) with an OK button. - * - * - * To post a warning dialog: - * - * nautilus-error-dialog --button-one "No" --button-two "Yes" \ - * --message "My Question" --title "My Question" - * - * Posts a question dialog (question icon) with two buttons ordered - * left to right such that "No" is left and "Yes" is right. "Yes" - * is the default button. - * - * The result value of the script is the number of the clicked button - * starting at 0. In the question example above, "Yes" would return - * "1" and "No" would return "0". - * - */ - -#include <config.h> - -#include <gnome.h> -#include <popt.h> - -#include <gtk/gtkbox.h> -#include <gtk/gtklabel.h> -#include <gtk/gtkmain.h> -#include <gtk/gtksignal.h> -#include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-messagebox.h> -#include <libgnomeui/gnome-stock-icons.h> -#include <libgnomeui/gnome-uidefs.h> - -/* - * The following dialog widgetry code cut-n-pasted from libnautilus-extension. - * The reason why we dont use libnautilus-private is that we dont want to - * incur its dependencies, especially libnautilus and thus libbonobo. - */ -static void find_message_label_callback (GtkWidget *widget, - gpointer callback_data); - -static void -find_message_label (GtkWidget *widget, const char *message) -{ - char *text; - - /* Turn on the flag if we find a label with the message - * in it. - */ - if (GTK_IS_LABEL (widget)) { - gtk_label_get (GTK_LABEL (widget), &text); - if (strcmp (text, message) == 0) { - gtk_object_set_data (GTK_OBJECT (gtk_widget_get_toplevel (widget)), - "message label", widget); - } - } - - /* Recurse for children. */ - if (GTK_IS_CONTAINER (widget)) { - gtk_container_foreach (GTK_CONTAINER (widget), - find_message_label_callback, - (char *) message); - } -} - -static void -find_message_label_callback (GtkWidget *widget, gpointer callback_data) -{ - find_message_label (widget, callback_data); -} - -static GnomeDialog * -show_message_box (const char *message, - const char *dialog_title, - const char *type, - const char *button_one, - const char *button_two, - GtkWindow *parent) -{ - GtkWidget *box; - GtkLabel *message_label; - - g_assert (dialog_title != NULL); - - box = gnome_message_box_new (message, type, button_one, button_two, NULL); - gtk_window_set_title (GTK_WINDOW (box), dialog_title); - gtk_window_set_wmclass (GTK_WINDOW (box), "error_dialog", "Nautilus"); - - /* A bit of a hack. We want to use gnome_message_box_new, - * but we want the message to be wrapped. So, we search - * for the label with this message so we can mark it. - */ - find_message_label (box, message); - message_label = GTK_LABEL (gtk_object_get_data (GTK_OBJECT (box), "message label")); - gtk_label_set_line_wrap (message_label, TRUE); - - if (parent != NULL) { - gnome_dialog_set_parent (GNOME_DIALOG (box), parent); - } - gtk_widget_show (box); - return GNOME_DIALOG (box); -} - -static GnomeDialog * -show_ok_box (const char *message, - const char *dialog_title, - const char *type, - GtkWindow *parent) -{ - return show_message_box (message, dialog_title, type, GNOME_STOCK_BUTTON_OK, NULL, parent); -} - -static GnomeDialog * -nautilus_error_dialog (const char *error, - const char *dialog_title, - GtkWindow *parent) -{ - return show_ok_box (error, - dialog_title == NULL ? _("Error") : dialog_title, - GNOME_MESSAGE_BOX_ERROR, parent); -} - -/** - * nautilus_yes_no_dialog: - * - * Create a dialog asking a question with two choices. - * The caller needs to set up any necessary callbacks - * for the buttons. - * @question: The text of the question. - * @yes_label: The label of the "yes" button. - * @no_label: The label of the "no" button. - * @parent: The parent window for this dialog. - */ -static GnomeDialog * -nautilus_yes_no_dialog (const char *question, - const char *dialog_title, - const char *yes_label, - const char *no_label, - GtkWindow *parent) -{ - return show_message_box (question, - dialog_title == NULL ? _("Question") : dialog_title, - GNOME_MESSAGE_BOX_QUESTION, - yes_label, - no_label, - parent); -} - -int main (int argc, char *argv[]) -{ - GnomeDialog *dialog; - poptContext popt_context; - char *title = NULL; - char *message = NULL; - char *button_one_label = NULL; - char *button_two_label = NULL; - - struct poptOption options[] = { - { "message", '\0', POPT_ARG_STRING, &message, 0, N_("Message."), NULL }, - { "title", '\0', POPT_ARG_STRING, &title, 0, N_("Title."), NULL }, - { "button-one", '\0', POPT_ARG_STRING, &button_one_label, 0, N_("Button one label."), NULL }, - { "button-two", '\0', POPT_ARG_STRING, &button_two_label, 0, N_("Button two label."), NULL }, - POPT_AUTOHELP - { NULL, '\0', 0, NULL, 0, NULL, NULL } - }; - - g_log_set_always_fatal ((GLogLevelFlags) 0xFFFF); - - gnome_init_with_popt_table ("nautilus-error-dialog", - VERSION, - argc, - argv, - options, - 0, - &popt_context); - - if (button_two_label) { - dialog = nautilus_yes_no_dialog (message ? message : _("Question"), - title ? title : _("Question"), - button_one_label ? button_one_label : _("Ok"), - button_two_label, - NULL); - } - else { - dialog = nautilus_error_dialog (message ? message : _("Question"), - title ? title : _("Question"), - NULL); - } - - return gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); -} diff --git a/helper-utilities/xml-migrate/.cvsignore b/helper-utilities/xml-migrate/.cvsignore deleted file mode 100644 index 11e294685..000000000 --- a/helper-utilities/xml-migrate/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile -Makefile.in -nautilus-xml-migrate -.libs -.deps diff --git a/helper-utilities/xml-migrate/Makefile.am b/helper-utilities/xml-migrate/Makefile.am deleted file mode 100644 index 1e22ad295..000000000 --- a/helper-utilities/xml-migrate/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -NULL = - -man_MANS = \ - nautilus-xml-migrate.1 \ - $(NULL) - -bin_PROGRAMS = nautilus-xml-migrate - -EXTRA_DIST = $(man_MANS) - -nautilus_xml_migrate_SOURCES = xml-migrate.c diff --git a/helper-utilities/xml-migrate/nautilus-xml-migrate.1 b/helper-utilities/xml-migrate/nautilus-xml-migrate.1 deleted file mode 100644 index 05722a967..000000000 --- a/helper-utilities/xml-migrate/nautilus-xml-migrate.1 +++ /dev/null @@ -1,37 +0,0 @@ -.TH NAUTILUS-XML-MIGRATE 1 "February 26, 2001" Eazel -.SH NAME -nautilus-xml-migrate \- update old Nautilus links and metafiles -.SH SYNOPSIS -.B nautilus-xml-migrate -[ -.I directory -] -.SH DESCRIPTION -Old versions of -.BR nautilus (1) -created XML files (links and metafiles) with incorrect capitalization. -If your -.B nautilus -links now show up as plain-text files beginning with ``<?xml'' rather -than as links, you can use -.B nautilus-xml-migrate -to correct them. -.LP -When you run -.B nautilus-xml-migrate -it will search the -.I directory -you specify -(or the current directory if you don't specify one) -and all its subdirectories -for files named -.B \&.nautilus-metafile.xml -and for files that begin the first line with -``<?xml'' and the second line with ``<NAUTILUS''. -If any such files are found, it will correct all their -XML tags to be lowercase instead of uppercase. -.LP -As it proceeds it will display its best guess about the percentage -of the process that is complete. -.SH SEE ALSO -.BR nautilus (1) diff --git a/helper-utilities/xml-migrate/xml-migrate.c b/helper-utilities/xml-migrate/xml-migrate.c deleted file mode 100644 index 47dd13f1a..000000000 --- a/helper-utilities/xml-migrate/xml-migrate.c +++ /dev/null @@ -1,388 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <ctype.h> -#include <errno.h> -#include <string.h> - -#include <unistd.h> -#include <dirent.h> -#include <sys/stat.h> - -/* - * Nautilus - * - * Copyright (C) 2001 Eazel, Inc. - * - * Nautilus 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. - * - * Nautilus 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 - * - * Author: Eric Fischer <eric@eazel.com> - * Based on a Perl program by Kenneth Christiansen - * - * This program turns old uppercase nautilus XML metafiles into new - * lowercase ones. - * - */ - -char **av; -int lastreport = 0; - -int failures = 0; -int successes = 0; -int unneeded = 0; - -struct list { - char *s; - struct list *next; -}; - -void recurse (char *, char *, float, float); -void check_ptr (void *); -void fix (char *, char *); -void examine (char *, char *); -void do_inside (char *, float, float); - -void -check_ptr (void *p) -{ - if (!p) { - fprintf (stderr, "%s: out of memory: %s\n", *av, - strerror (errno)); - exit (EXIT_FAILURE); - } -} - -void -fix (char *prefix, char *file) -{ - FILE *f; - int c; - int dquote, squote; - int changed, read_only, failed_to_change; - - changed = 0; - read_only = 0; - failed_to_change = 0; - - /* - * Verified that the file modification time only changes if the - * file's content is actually changed; it doesn't change solely - * because the file was opened r+. - */ - - f = fopen (file, "r+"); - if (!f) { - read_only = errno; - - f = fopen (file, "r"); - if (!f) { - fprintf (stderr, "%s: couldn't read %s/%s: %s\n", *av, - prefix, file, strerror (errno)); - return; - } - } - - /* - * I'm sure XML lexical analysis is actually more complicated - * than this, but I can't find something that really says. - * and it works on all the files I have to test on. It does - * a more accurate job than the perl script, anyway. - */ - - /* - * The "no change" comments refer to places where what's in the - * file is already correct and doesn't need to be altered. If - * this were writing to a new file rather than making the changes - * in place, these would be calls to putc() to write the changes. - */ - - while ((c = getc (f)) != EOF) { - if (c != '<') { - ; /* no change */ - } else { - ; /* no change */ - - while ((c = getc (f)) != EOF) { - if (c == '>') { - ungetc (c, f); - break; - } else if (c == '=') { - dquote = squote = 0; - ; /* no change */ - - while ((c = getc (f)) != EOF) { - if (c == '>' && !dquote && - !squote) { - ungetc (c, f); - break; - } else if (c == '\'' && - !dquote) { - squote = !squote; - ; /* no change */ - } else if (c == '\"' && - !squote) { - dquote = !dquote; - ; /* no change */ - } else if (isspace (c) && - !dquote && - !squote) { - ; /* no change */ - break; - } else { - ; /* no change */ - } - } - } else if (isupper (c)) { - if (read_only) { - failed_to_change = 1; - } else { - fseek (f, -1L, SEEK_CUR); - putc (tolower (c), f); - - /* Looks useless, but have to - * seek between reads and - * writes to the same file - */ - fseek (f, 0L, SEEK_CUR); - changed = 1; - } - } else { - ; /* no change */ - } - } - } - } - - fclose (f); - - if (failed_to_change) { - fprintf (stderr, "%s: couldn't fix %s/%s: %s\n", - *av, prefix, file, strerror (read_only)); - lastreport = 0; - failures++; - } else if (changed) { - printf ("%s/%s: fixed\n", prefix, file); - lastreport = 0; - successes++; - } else { - unneeded++; - } -} - -void -examine (char *prefix, char *file) -{ - FILE *f; - int shouldfix = 0; - int c; - - f = fopen (file, "r"); - if (!f) { - fprintf (stderr, "%s: couldn't examine %s/%s: %s\n", *av, - prefix, file, strerror (errno)); - return; - } - - /* - * The assumption: for files we have to examine (as opposed to - * those that are named .nautilus-metafile.xml), if the first - * line begins with "<?xml" and the second with "<NAUTILUS", - * then it's one we need to fix; otherwise, it's somebody - * else's and we should leave it alone. - */ - - if (getc (f) == '<' && - getc (f) == '?' && - getc (f) == 'x' && - getc (f) == 'm' && - getc (f) == 'l') { - while ((c = getc (f)) != EOF) { - if (c == '\n') { - break; - } - } - - if (getc (f) == '<' && - getc (f) == 'N' && - getc (f) == 'A' && - getc (f) == 'U' && - getc (f) == 'T' && - getc (f) == 'I' && - getc (f) == 'L' && - getc (f) == 'U' && - getc (f) == 'S') { - shouldfix = 1; - } - } - - fclose (f); - - if (shouldfix) { - fix (prefix, file); - } -} - -void -do_inside (char *prefix, float done, float frac) -{ - DIR *d; - struct dirent *de; - - struct list *files; - int nfiles = 0; - - struct list *lp; - int n; - - struct stat buf; - - int report; - float frac_over_nfiles; - - d = opendir ("."); - if (!d) { - fprintf (stderr, "%s: couldn't read directory %s: %s\n", - *av, prefix, strerror (errno)); - return; - } - - files = NULL; - while ((de = readdir (d)) != NULL) { - if (strcmp (de->d_name, ".") == 0) - continue; - if (strcmp (de->d_name, "..") == 0) - continue; - - lp = malloc (sizeof (struct list)); - check_ptr (lp); - - lp->s = strdup (de->d_name); - check_ptr (lp->s); - - lp->next = files; - files = lp; - - nfiles++; - } - - closedir (d); - - frac_over_nfiles = frac / nfiles; - - n = 0; - while (files) { - report = 10000 * (done + n * frac_over_nfiles); - if (report != lastreport) { - fprintf (stderr, "%7.2f%%\r", report / 100.0); - lastreport = report; - } - - if (strcmp (files->s, ".nautilus-metafile.xml") == 0) { - fix (prefix, files->s); - } else if (lstat (files->s, &buf) != 0) { - fprintf (stderr, - "%s: couldn't check status of %s/%s: %s\n", - *av, prefix, files->s, strerror (errno)); - } else if (buf.st_mode & S_IFDIR) { - recurse (prefix, files->s, - done + n * frac_over_nfiles, frac_over_nfiles); - } else { - examine (prefix, files->s); - } - - lp = files->next; - free (files->s); - free (files); - files = lp; - n++; - } -} - -void -recurse (char *prefix, char *dir, float done, float frac) -{ - char *new_prefix; - struct stat buf1, buf2; - - if (lstat (".", &buf1) != 0) { - fprintf (stderr, "%s: couldn't check status of %s: %s\n", - *av, prefix, strerror (errno)); - return; - } - - new_prefix = malloc (strlen (prefix) + strlen (dir) + 2); - check_ptr (new_prefix); - - if (strcmp (dir, ".") == 0) { - strcpy (new_prefix, prefix); - } else { - sprintf (new_prefix, "%s/%s", prefix, dir); - } - - if (chdir (dir) != 0) { - fprintf (stderr, "%s: couldn't change directory to %s: %s\n", - *av, new_prefix, strerror (errno)); - free (new_prefix); - return; - } - - do_inside (new_prefix, done, frac); - - if (strcmp (dir, ".") != 0) { - chdir (".."); - - if (lstat (".", &buf2) != 0) { - fprintf (stderr, - "%s: couldn't check status of %s: %s\n", - *av, ".", strerror (errno)); - exit (EXIT_FAILURE); - } - - if (buf1.st_dev != buf2.st_dev || buf1.st_ino != buf2.st_ino) { - fprintf (stderr, "%s: cd .. from %s did not lead " - "back to %s\n", *av, new_prefix, prefix); - exit (EXIT_FAILURE); - } - } - - free (new_prefix); -} - -int -main (int argc, char **argv) -{ - av = argv; - - if (argc == 1) { - recurse (".", ".", 0.0, 1.0); - } else if (argc == 2) { - if (chdir (argv[1]) != 0) { - fprintf (stderr, - "%s: couldn't change directory to %s: %s\n", - *av, argv[1], strerror (errno)); - exit (EXIT_FAILURE); - } - - recurse (argv[1], ".", 0.0, 1.0); - } else { - fprintf (stderr, "Usage: %s [directory]\n", *av); - exit (EXIT_FAILURE); - } - - printf ("Files that couldn't be fixed: %10d\n", failures); - printf ("Files that didn't need to be fixed: %10d\n", unneeded); - printf ("Files that were fixed: %10d\n", successes); - - return EXIT_SUCCESS; -} diff --git a/src/.cvsignore b/src/.cvsignore index 2f06aef59..6f604bf04 100644 --- a/src/.cvsignore +++ b/src/.cvsignore @@ -9,4 +9,4 @@ nautilus-shell-interface-stubs.c nautilus-shell-interface.h nautilus-shell-ui.xml.h nautilus_shell_interface_idl_stamp -Nautilus_shell.oaf +Nautilus_shell.server diff --git a/src/Nautilus_shell.oaf.in b/src/Nautilus_shell.oaf.in deleted file mode 100644 index 2467c09c7..000000000 --- a/src/Nautilus_shell.oaf.in +++ /dev/null @@ -1,102 +0,0 @@ -<oaf_info> - -<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/ObjectFactory: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_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-directory/normal"/> - <item value="x-directory/webdav"/> - <item value="x-directory/webdav-prefer-directory"/> - </oaf_attribute> - <oaf_attribute name="bonobo:additional_uri_schemes" type="stringv"> - <item value="gnome-trash"/> - <item value="trash"/> - </oaf_attribute> - <oaf_attribute name="nautilus:view_as_name" type="string" _value="Icons"/> - <oaf_attribute name="nautilus:view_as_label" type="string" _value="View as Icons"/> - <oaf_attribute name="nautilus:viewer_label" type="string" _value="Icons Viewer"/> -</oaf_server> - -<oaf_server iid="OAFIID:nautilus_file_manager_desktop_icon_view:8d8121b1-0f1e-400b-bf0d-5b0f4555f5e1" 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"/> - <item value="IDL:Bonobo/Zoomable:1.0"/> - </oaf_attribute> - <oaf_attribute name="name" type="string" _value="Nautilus file manager desktop icon view"/> - <oaf_attribute name="description" type="string" _value="Nautilus file manager component that shows icons on the desktop"/> -</oaf_server> - -<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"/> - <item value="IDL:Bonobo/Zoomable: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-directory/normal"/> - <item value="x-directory/webdav"/> - <item value="x-directory/webdav-prefer-directory"/> - </oaf_attribute> - <oaf_attribute name="bonobo:additional_uri_schemes" type="stringv"> - <item value="gnome-trash"/> - <item value="trash"/> - </oaf_attribute> - <oaf_attribute name="nautilus:view_as_name" type="string" _value="List"/> - <oaf_attribute name="nautilus:view_as_label" type="string" _value="View as List"/> - <oaf_attribute name="nautilus:viewer_label" type="string" _value="List Viewer"/> -</oaf_server> - -<oaf_server iid="OAFIID:nautilus_file_manager_search_list_view:b186e381-198e-43cf-9c46-60b6bb35db0b" 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"/> - <item value="IDL:Bonobo/Zoomable:1.0"/> - </oaf_attribute> - <oaf_attribute name="name" type="string" _value="Nautilus file manager search results list view"/> - <oaf_attribute name="description" type="string" _value="Nautilus file manager component that shows a scrollable list for search results"/> - <oaf_attribute name="bonobo:supported_mime_types" type="stringv"> - <item value="x-directory/search"/> - </oaf_attribute> - <oaf_attribute name="nautilus:view_as_name" type="string" _value="Search List"/> - <oaf_attribute name="nautilus:view_as_label" type="string" value="View as Search List"/> - <oaf_attribute name="nautilus:viewer_label" type="string" value="Search List Viewer"/> -</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_server iid="OAFIID:nautilus_metafile_factory:bc318c01-4106-4622-8d6c-b419ec89e4c6" 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/MetafileFactory:1.0"/> - </oaf_attribute> - <oaf_attribute name="name" type="string" _value="Nautilus metafile factory"/> - <oaf_attribute name="description" type="string" _value="Produces metafile objects for accessing Nautilus metadata"/> -</oaf_server> - -</oaf_info> diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index 5731f93c9..dfaafaf85 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -1790,7 +1790,9 @@ nautilus_window_allow_stop (NautilusWindow *window, gboolean allow) CORBA_exception_init (&ev); property_bag = Bonobo_Control_getProperties (window->throbber, &ev); if (!BONOBO_EX (&ev) && property_bag != CORBA_OBJECT_NIL) { +#if GNOME2_CONVERSION_COMPLETE bonobo_property_bag_client_set_value_gboolean (property_bag, "throbbing", allow, &ev); +#endif bonobo_object_release_unref (property_bag, NULL); } CORBA_exception_free (&ev); diff --git a/src/nautilus-object-window.c b/src/nautilus-object-window.c index 5731f93c9..dfaafaf85 100644 --- a/src/nautilus-object-window.c +++ b/src/nautilus-object-window.c @@ -1790,7 +1790,9 @@ nautilus_window_allow_stop (NautilusWindow *window, gboolean allow) CORBA_exception_init (&ev); property_bag = Bonobo_Control_getProperties (window->throbber, &ev); if (!BONOBO_EX (&ev) && property_bag != CORBA_OBJECT_NIL) { +#if GNOME2_CONVERSION_COMPLETE bonobo_property_bag_client_set_value_gboolean (property_bag, "throbbing", allow, &ev); +#endif bonobo_object_release_unref (property_bag, NULL); } CORBA_exception_free (&ev); diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c index 5731f93c9..dfaafaf85 100644 --- a/src/nautilus-spatial-window.c +++ b/src/nautilus-spatial-window.c @@ -1790,7 +1790,9 @@ nautilus_window_allow_stop (NautilusWindow *window, gboolean allow) CORBA_exception_init (&ev); property_bag = Bonobo_Control_getProperties (window->throbber, &ev); if (!BONOBO_EX (&ev) && property_bag != CORBA_OBJECT_NIL) { +#if GNOME2_CONVERSION_COMPLETE bonobo_property_bag_client_set_value_gboolean (property_bag, "throbbing", allow, &ev); +#endif bonobo_object_release_unref (property_bag, NULL); } CORBA_exception_free (&ev); diff --git a/src/nautilus-view-frame.c b/src/nautilus-view-frame.c index 622db4ee8..8383b770c 100644 --- a/src/nautilus-view-frame.c +++ b/src/nautilus-view-frame.c @@ -35,6 +35,7 @@ #include "nautilus-signaller.h" #include "nautilus-view-frame-private.h" #include "nautilus-window.h" +#include <bonobo/bonobo-control-frame.h> #include <bonobo/bonobo-zoomable-frame.h> #include <bonobo/bonobo-zoomable.h> #include <eel/eel-gtk-extensions.h> diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 5731f93c9..dfaafaf85 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -1790,7 +1790,9 @@ nautilus_window_allow_stop (NautilusWindow *window, gboolean allow) CORBA_exception_init (&ev); property_bag = Bonobo_Control_getProperties (window->throbber, &ev); if (!BONOBO_EX (&ev) && property_bag != CORBA_OBJECT_NIL) { +#if GNOME2_CONVERSION_COMPLETE bonobo_property_bag_client_set_value_gboolean (property_bag, "throbbing", allow, &ev); +#endif bonobo_object_release_unref (property_bag, NULL); } CORBA_exception_free (&ev); |