Commit 0bdc094f authored by Darin Adler's avatar Darin Adler
Browse files

Remove nautilus-clean.sh -- use bonobo-slay instead.

	* Makefile.am:
	* README:
	* nautilus-clean.sh:
	* nautilus.spec.in:
	* src/nautilus-application.c: (nautilus_application_startup):
	Remove nautilus-clean.sh -- use bonobo-slay instead.

	* libnautilus-private/nautilus-program-chooser.c:
	(nautilus_program_chooser_new): The -2 feature is gone from
	gtk_window_set_default_size, so use -1.

	* src/nautilus-sidebar-title.c: (smooth_font_changed_callback),
	(nautilus_sidebar_title_select_text_color), (update_title_font),
	(update_title), (measure_width_callback), (update_more_info),
	(sidebar_title_create_title_label),
	(sidebar_title_create_more_info_label): Change to use GtkLabel
	instead of EelLabel for now -- that makes us actually get a label.
parent 1884c7e3
2001-11-07 Darin Adler <darin@bentspoon.com>
* Makefile.am:
* README:
* nautilus-clean.sh:
* nautilus.spec.in:
* src/nautilus-application.c: (nautilus_application_startup):
Remove nautilus-clean.sh -- use bonobo-slay instead.
* libnautilus-private/nautilus-program-chooser.c:
(nautilus_program_chooser_new): The -2 feature is gone from
gtk_window_set_default_size, so use -1.
* src/nautilus-sidebar-title.c: (smooth_font_changed_callback),
(nautilus_sidebar_title_select_text_color), (update_title_font),
(update_title), (measure_width_callback), (update_more_info),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label): Change to use GtkLabel
instead of EelLabel for now -- that makes us actually get a label.
2001-11-07 Darin Adler <darin@bentspoon.com>
* components/help/help-method.c:
......
......@@ -31,7 +31,6 @@ EXTRA_DIST= \
HACKING \
MAINTAINERS \
nautilus.spec.in \
nautilus-clean.sh \
nautilus.desktop \
nautilus.desktop.in \
nautilus-help.desktop \
......@@ -65,12 +64,3 @@ Toplevelmenu_DATA = nautilus-help.desktop
dist-hook: nautilus.spec
cp nautilus.spec $(distdir)
install-data-hook: nautilus-clean.sh
$(mkinstalldirs) $(DESTDIR)$(prefix)/bin
@list='nautilus-clean.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
......@@ -185,12 +185,10 @@ Then get root and:
5: Issues when running Nautilus
===============================
There's a script named nautilus-clean.sh, at the top level of the
Nautilus sources. If bonobo-activation or GConf changes, you may need
to run this script to get Nautilus to work properly. One way to invoke
it is like this:
If bonobo-activation changes, you may need to run the bonobo-slay
script.
nautilus-clean.sh -x
bonobo-slay
==================
6: Mozilla support
......
......@@ -71,11 +71,6 @@ typedef struct {
ProgramFileStatus status;
} ProgramFilePair;
/* gtk_window_set_default_width (and some other functions) use a
* magic undocumented number of -2 to mean "ignore this parameter".
*/
#define NO_DEFAULT_MAGIC_NUMBER -2
/* Scrolling list has no idea how tall to make itself. Its
* "natural height" is just enough to draw the scroll bar controls.
* Hardwire an initial window size here, but let user resize
......@@ -1285,9 +1280,7 @@ nautilus_program_chooser_new (GnomeVFSMimeActionType action_type,
gtk_container_set_border_width (GTK_CONTAINER (window), GNOME_PAD);
gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE);
gtk_window_set_default_size (GTK_WINDOW (window),
NO_DEFAULT_MAGIC_NUMBER,
PROGRAM_CHOOSER_DEFAULT_HEIGHT);
gtk_window_set_default_size (GTK_WINDOW (window), -1, PROGRAM_CHOOSER_DEFAULT_HEIGHT);
gtk_window_set_wmclass (GTK_WINDOW (window), "program_chooser", "Nautilus");
g_object_set_data (G_OBJECT (window), "type", GINT_TO_POINTER (action_type));
......
#!/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.
extreme=no
medusa=no
nokill=no
quiet=no
while ( [ $# -gt 0 ] )
do
case "$1" in
'-a')
quiet=yes
shift
;;
'-m')
medusa=yes
shift
;;
'-n')
nokill=yes
shift
;;
'-x')
extreme=yes
shift
;;
*)
echo "nautilus-clean.sh unknown option: $1"
shift
;;
esac
done
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-news \
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="gconfd-2 $AUX_PROGS bonobo-activation-server"
fi
unset FOUND_ANY
sysname=`uname -s`
if [ "$sysname" = "SunOS" ]; then
killcmd="pkill"
else
killcmd="killall"
fi
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 | 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 [ "$nokill" != "yes" ]; then
if [ "$quiet" != "yes" ]; then
$killcmd "$NAME"
else
$killcmd "$NAME" > /dev/null 2>&1
fi
if [ "$NAME" = "gconfd-2" ]; then
rm -f "$HOME/.gconfd/saved_state"
fi
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
......@@ -156,7 +156,6 @@ scrollkeeper-update
%{_bindir}/hyperbola
%{_bindir}/nautilus
%{_bindir}/nautilus-adapter
%{_bindir}/nautilus-clean.sh
%{_bindir}/nautilus-error-dialog
%{_bindir}/nautilus-hardware-view
%{_bindir}/nautilus-history-view
......
......@@ -472,13 +472,13 @@ nautilus_application_startup (NautilusApplication *application,
* since neither of the above causes explain it.
*/
message = _("Nautilus can't be used now. "
"Running the command \"nautilus-clean.sh -x\""
"Running the command \"bonobo-slay\""
" from the console may fix the problem. If not,"
" you can try rebooting the computer or"
" installing Nautilus again.");
/* FIXME bugzilla.gnome.org 42536: The guesses and stuff here are lame. */
detailed_message = _("Nautilus can't be used now. "
"Running the command \"nautilus-clean.sh -x\" "
"Running the command \"bonobo-slay\" "
"from the console may fix the problem. If not, "
"you can try rebooting the computer or "
"installing Nautilus again.\n\n"
......@@ -487,7 +487,7 @@ nautilus_application_startup (NautilusApplication *application,
"that does not include the bonobo-activation library's directory. "
"Another possible cause would be bad install "
"with a missing Nautilus_Shell.server file.\n\n"
"Running \"nautilus-clean.sh -x\" will kill all "
"Running \"bonobo-slay\" will kill all "
"Bonobo Activation and GConf processes, which may be needed by "
"other applications.\n\n"
"Sometimes killing bonobo-activation-server and gconfd fixes "
......
......@@ -30,9 +30,18 @@
#include "nautilus-sidebar.h"
#include "nautilus-window.h"
#include <ctype.h>
#include <bonobo/bonobo-property-bag-client.h>
#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-property-bag-client.h>
#include <ctype.h>
#include <eel/eel-background.h>
#include <eel/eel-gdk-extensions.h>
#include <eel/eel-gdk-font-extensions.h>
#include <eel/eel-gdk-pixbuf-extensions.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-gtk-macros.h>
#include <eel/eel-image-with-background.h>
#include <eel/eel-string.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkpixmap.h>
......@@ -41,26 +50,20 @@
#include <libgnome/gnome-i18n.h>
#include <libgnomevfs/gnome-vfs-types.h>
#include <libgnomevfs/gnome-vfs-uri.h>
#include <eel/eel-background.h>
#include <libnautilus-private/nautilus-file-attributes.h>
#include <libnautilus-private/nautilus-font-factory.h>
#include <eel/eel-gdk-extensions.h>
#include <eel/eel-gdk-font-extensions.h>
#include <eel/eel-gdk-pixbuf-extensions.h>
#include <eel/eel-glib-extensions.h>
#include <libnautilus-private/nautilus-global-preferences.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-gtk-macros.h>
#include <libnautilus-private/nautilus-icon-factory.h>
#include <eel/eel-image-with-background.h>
#include <eel/eel-label-with-background.h>
#include <libnautilus-private/nautilus-metadata.h>
#include <libnautilus-private/nautilus-search-uri.h>
#include <eel/eel-string.h>
#include <libnautilus-private/nautilus-theme.h>
#include <math.h>
#include <string.h>
#if GNOME2_CONVERSION_COMPLETE
#include <eel/eel-label-with-background.h>
#endif
/* maximum allowable size to be displayed as the title */
#define MAX_TITLE_SIZE 256
#define MINIMUM_INFO_WIDTH 32
......@@ -143,6 +146,7 @@ realize_callback (NautilusSidebarTitle *sidebar_title)
static void
smooth_font_changed_callback (gpointer callback_data)
{
#if GNOME2_CONVERSION_COMPLETE
EelScalableFont *new_font;
EelScalableFont *new_bold_font;
NautilusSidebarTitle *sidebar_title;
......@@ -159,6 +163,7 @@ smooth_font_changed_callback (gpointer callback_data)
g_object_unref (G_OBJECT (new_font));
g_object_unref (G_OBJECT (new_bold_font));
#endif
}
#if GNOME2_CONVERSION_COMPLETE
......@@ -399,6 +404,7 @@ nautilus_sidebar_title_select_text_color (NautilusSidebarTitle *sidebar_title)
}
}
#if GNOME2_CONVERSION_COMPLETE
eel_label_set_text_color (EEL_LABEL (sidebar_title->details->title_label),
eel_parse_rgb_with_white_default (sidebar_title_color));
......@@ -416,6 +422,7 @@ nautilus_sidebar_title_select_text_color (NautilusSidebarTitle *sidebar_title)
eel_label_set_smooth_drop_shadow_offset (EEL_LABEL (sidebar_title->details->more_info_label),
sidebar_title->details->shadow_offset);
#endif
g_free (sidebar_title_color);
g_free (sidebar_info_title_color);
......@@ -540,9 +547,9 @@ update_title_font (NautilusSidebarTitle *sidebar_title)
GdkFont *template_font;
GdkFont *bold_template_font;
GdkFont *largest_fitting_font;
#endif
int largest_fitting_smooth_font_size;
EelScalableFont *smooth_font;
#endif
/* Make sure theres work to do */
if (eel_strlen (sidebar_title->details->title_text) < 1) {
......@@ -556,6 +563,7 @@ update_title_font (NautilusSidebarTitle *sidebar_title)
return;
}
#if GNOME2_CONVERSION_COMPLETE
/* Update the smooth font */
smooth_font = eel_label_get_smooth_font (EEL_LABEL (sidebar_title->details->title_label));
largest_fitting_smooth_font_size = eel_scalable_font_largest_fitting_font_size
......@@ -570,7 +578,6 @@ update_title_font (NautilusSidebarTitle *sidebar_title)
g_object_unref (G_OBJECT (smooth_font));
#if GNOME2_CONVERSION_COMPLETE
/* Update the regular font */
template_font = get_non_smooth_font (MAX_TITLE_FONT_SIZE);
bold_template_font = eel_gdk_font_get_bold (template_font);
......@@ -599,10 +606,15 @@ static void
update_title (NautilusSidebarTitle *sidebar_title)
{
/* FIXME bugzilla.gnome.org 42500: We could defer showing the title until the icon is ready. */
#ifdef GNOME2_CONVERSION_COMPLETE
if (eel_label_set_text (EEL_LABEL (sidebar_title->details->title_label),
sidebar_title->details->title_text)) {
update_title_font (sidebar_title);
}
#else
gtk_label_set_text (GTK_LABEL (sidebar_title->details->title_label),
sidebar_title->details->title_text);
#endif
}
static void
......@@ -634,6 +646,7 @@ file_is_search_location (NautilusFile *file)
static int
measure_width_callback (const char *string, void *context)
{
#if GNOME2_CONVERSION_COMPLETE
EelLabel *label;
EelScalableFont *smooth_font;
int smooth_font_size;
......@@ -642,6 +655,9 @@ measure_width_callback (const char *string, void *context)
smooth_font = eel_label_get_smooth_font (label);
smooth_font_size = eel_label_get_smooth_font_size (label);
return eel_scalable_font_text_width (smooth_font, smooth_font_size, string, strlen (string));
#else
return 0;
#endif
}
static void
......@@ -687,16 +703,22 @@ update_more_info (NautilusSidebarTitle *sidebar_title)
sidebar_width = GTK_WIDGET (sidebar_title)->allocation.width - 2 * SIDEBAR_INFO_MARGIN;
if (sidebar_width > MINIMUM_INFO_WIDTH) {
date_modified_str = nautilus_file_fit_modified_date_as_string (file, sidebar_width,
measure_width_callback, NULL,
sidebar_title->details->more_info_label);
date_modified_str = nautilus_file_fit_modified_date_as_string
(file, sidebar_width,
measure_width_callback, NULL,
sidebar_title->details->more_info_label);
append_and_eat (info_string, "\n", date_modified_str);
g_string_append_c (info_string, '\0');
}
}
}
#if GNOME2_CONVERSION_COMPLETE
eel_label_set_text (EEL_LABEL (sidebar_title->details->more_info_label),
info_string->str);
#else
gtk_label_set_text (GTK_LABEL (sidebar_title->details->more_info_label),
info_string->str);
#endif
g_string_free (info_string, TRUE);
}
......@@ -873,10 +895,16 @@ sidebar_title_create_title_label (void)
{
GtkWidget *title_label;
#if GNOME2_CONVERSION_COMPLETE
title_label = eel_label_new_with_background ("");
eel_label_make_bold (EEL_LABEL (title_label));
eel_label_set_wrap (EEL_LABEL (title_label), TRUE);
eel_label_set_justify (EEL_LABEL (title_label), GTK_JUSTIFY_CENTER);
#else
title_label = gtk_label_new ("");
gtk_label_set_line_wrap (GTK_LABEL (title_label), TRUE);
gtk_label_set_justify (GTK_LABEL (title_label), GTK_JUSTIFY_CENTER);
#endif
return title_label;
}
......@@ -886,11 +914,14 @@ sidebar_title_create_more_info_label (void)
{
GtkWidget *more_info_label;
more_info_label = eel_label_new_with_background ("");
#if GNOME2_CONVERSION_COMPLETE
more_info_label = eel_label_new_with_background ("");
eel_label_make_smaller (EEL_LABEL (more_info_label), 2);
#endif
eel_label_set_justify (EEL_LABEL (more_info_label), GTK_JUSTIFY_CENTER);
#else
more_info_label = gtk_label_new ("");
gtk_label_set_justify (GTK_LABEL (more_info_label), GTK_JUSTIFY_CENTER);
#endif
return more_info_label;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment