nautilus/nautilus-clean.sh
Andy Hertzfeld 995813813f fixed bug 4369, throbber frozen during long refresh, by making the
fixed bug 4369, throbber frozen during long refresh, by making the
	throbber a bonobo component so it's driven by its own thread.
	Note that clicking on the throbber is temporarily broken; I'll
	fix that soon.  Also, made the frame delay be specified by the
	theme and set the default to spin somewhat slower than before.

	* configure.in:
	* components/Makefile.am:
	* components/throbber/.cvsignore:
	* components/throbber/Makefile.am:
	* components/throbber/nautilus-throbber.oafinfo:
	added throbber component

	* components/throbber/main.c: (throbber_object_destroyed),
	(throbber_make_object), (main):
	factory for the throbber component

	* components/throbber/nautilus-throbber.c,h:
	(nautilus_throbber_initialize_class), (is_throbbing),
	(get_bonobo_properties), (set_bonobo_properties),
	(nautilus_throbber_destroy), (nautilus_throbber_get_control),
	(get_throbber_dimensions), (nautilus_throbber_initialize),
	(nautilus_throbber_new), (nautilus_throbber_theme_changed),
	(draw_pixbuf), (select_throbber_image), (draw_throbber_image),
	(nautilus_throbber_draw), (nautilus_throbber_expose),
	(nautilus_throbber_map), (bump_throbber_frame),
	(nautilus_throbber_start),
	(nautilus_throbber_remove_update_callback),
	(nautilus_throbber_stop), (nautilus_throbber_unload_images),
	(load_themed_image), (make_throbber_frame_name),
	(nautilus_throbber_load_images),
	(nautilus_throbber_button_press_event),
	(nautilus_throbber_set_small_mode),
	(nautilus_throbber_size_allocate),
	(nautilus_throbber_size_request):
	throbber widget for the bonobo component

	* src/nautilus-window-toolbars.c: (theme_changed_callback),
	(nautilus_window_initialize_toolbars):
	set up throbber component in the toolbar

	* src/nautilus-window.c,h: (nautilus_window_constructed),
	(nautilus_window_allow_stop):
	use property interface to start and stop the throbber

	* icons/default.xml:
	added delay specification to throbber in default theme

	* nautilus-clean.sh:
	clean throbber component as necessary

	* src/Makefile.am:
	* src/nautilus-throbber.c,h
	removed old throbber widget
2001-01-16 03:44:40 +00:00

143 lines
2.5 KiB
Bash
Executable file

#!/bin/sh
# This is a quick hack to check if any nautilus auxiliary processes
# are running, and if so, list them and kill them. It is not
# portable, and should be be expected to be used in any kind of
# production capacity.
quiet=no
extreme=no
medusa=no
if [ $# -gt 0 ]
then
arg=$1
if [ "$arg" = "-q" ]
then
quiet=yes
elif [ "$arg" = "-x" ]
then
extreme=yes
elif [ "$arg" = "-m" ]
then
medusa=yes
fi
fi
if [ $# -gt 1 ]
then
arg=$2
if [ "$arg" = "-q" ]
then
quiet=yes
elif [ "$arg" = "-x" ]
then
extreme=yes
elif [ "$arg" = "-m" ]
then
medusa=yes
fi
fi
if [ $# -gt 2 ]
then
arg=$3
if [ "$arg" = "-q" ]
then
quiet=yes
elif [ "$arg" = "-x" ]
then
extreme=yes
elif [ "$arg" = "-m" ]
then
medusa=yes
fi
fi
echo_unless_quiet ()
{
if [ "$quiet" != "yes" ]
then
echo "$*"
fi
}
# Add any new auxiliary programs here.
AUX_PROGS="\
bonobo-application-x-pdf \
bonobo-image-generic \
bonobo-text-plain \
eazel-proxy \
eazel-proxy-util \
gnome-vfs-slave \
hyperbola \
nautilus-adapter \
nautilus-change-password-view \
nautilus-content-loser \
nautilus-hardware-view \
nautilus-history-view \
nautilus-image-view \
nautilus-inventory-view \
nautilus-mozilla-content-view \
nautilus-mpg123 \
nautilus-music-view \
nautilus-notes \
nautilus-rpm-view \
nautilus-sample-content-view \
nautilus-sample-service-view \
nautilus-service-install-view \
nautilus-service-startup-view \
nautilus-sidebar-loser \
nautilus-summary-view \
nautilus-text-view \
nautilus-throbber \
nautilus-tree-view \
trilobite-eazel-install-service \
trilobite-eazel-time-view \
"
if [ "$extreme" = "yes" ]
then
AUX_PROGS="oafd gconfd-1 $AUX_PROGS"
fi
unset FOUND_ANY
for NAME in $AUX_PROGS; do
EGREP_PATTERN=`echo $NAME | sed -e 's/\(.\)\(.*\)/[\1]\2/' | sed -e 's/\[\\\^\]/\[\\^\]/'`
COUNT=`ps auxww | egrep $EGREP_PATTERN | grep -v emacs | grep -v egrep | wc -l`
if [ $COUNT -gt 0 ]; then
if [ -z $FOUND_ANY ]; then
echo_unless_quiet "nautilus-clean: Stale processes found."
FOUND_ANY=true
fi
echo_unless_quiet "$NAME: $COUNT"
if [ "$quiet" != "yes" ]
then
killall "$NAME"
else
killall "$NAME" > /dev/null 2>&1
fi
fi
done
if [ -z $FOUND_ANY ]; then
echo_unless_quiet "nautilus-clean: No stale processes found."
fi
if [ "$medusa" = "yes" ]; then
if [ -f `which medusa-restart 2> /dev/null || echo xxx` ]; then
echo_unless_quiet "Restarting medusa search and index servers."
medusa-restart
fi
fi