Commit 2752e198 authored by Darin Adler's avatar Darin Adler

Fixed problem compiling with new gettext:

	* hack-macros/gnome.m4: Add BUILD_INCLUDED_LIBINTL for
	compatibility with the new gettext.

	Fixed a problem with the throbber detecting that its X window is
	gone. Based on suggestions from Owen Taylor.

	* libnautilus/nautilus-bonobo-workarounds.h:
	* libnautilus/nautilus-bonobo-workarounds.c:
	(destroy_later_callback), (destroyed_before_timeout_callback),
	(nautilus_bonobo_object_force_destroy_later): Changed to "destroy
	later" instead of "destroy at idle". This makes us less likely to
	experience race conditions.

	* src/nautilus-window.c: (nautilus_window_initialize_class),
	(nautilus_window_unrealize), (nautilus_window_destroy): Moved the
	throbber destruction to unrealize so we destroy the throbber
	before we destroy its X window.

	Starting with patch by Anders Carlsson <andersca@gnu.org>, added
	both prelighting and tracking to the throbber, also making it take
	action on release, not press.

	* components/throbber/nautilus-throbber.c:
	(nautilus_throbber_initialize_class): Add handlers for enter,
	leave, and release.
	(nautilus_throbber_initialize): Set flags so we get enter and
	leave events.
	(select_throbber_image): Ref the image that's returned.
	(draw_throbber_image): Make the image be prelit if the mouse is
	over the throbber but it wasn't clicked, and darkened if the mouse
	is over the throbber and it was clicked.
	(nautilus_throbber_enter_notify_event): Set flag and request
	redraw to prelight.
	(nautilus_throbber_leave_notify_event): Set flag and request
	redraw to un-prelight.
	(nautilus_throbber_button_press_event): Set flag to indicate we
	hit the button in the throbber. Also, respond only to left clicks.
	(nautilus_throbber_button_release_event): Look at flag set in
	press event. Do the work here now instead of at press time since
	we are more like a real button.

	Rolled in change by Miguel Rodríguez Pérez <migrax@terra.es> to
	fix volume mounting problems:

	* configure.in: Check for hasmntopt.
	* libnautilus-private/nautilus-volume-monitor.c:
	(get_removable_volumes): Fix typo (HAVE_MNTTENT_H ->
	HAVE_MNTENT_H).

	Integrated patch by Miguel Rodríguez Pérez <migrax@terra.es> to
	make Nautilus not try to preview MPEG lists:

	* src/file-manager/fm-icon-view.c:
	(icon_container_preview_callback): Made audio/x-mpegurl another
	exception to the list of audio types we can preview.

	Rolled in change by Dennis Smit <synap@area101.penguin.nl>:

	* THANKS: added more translators that were missing from the
	THANKS file (names from all the .po files in ./po).

	Other updates to THANKS:

	* THANKS: Added Jon K Hellan.
 	* check-THANKS.pl: Fixed logic so you can be credited as both an
	author and translator.

	Other changes:

	* src/file-manager/fm-list-view.c: (get_default_zoom_level): Fix
	typo (storaged -> storage).

	* src/nautilus-shell-ui.xml:
	* src/file-manager/nautilus-directory-view-ui.xml:
	Fixed keybindings entries to use the correct tags as described by
	ui-xml.txt.
parent 73e660ca
2001-05-22 Darin Adler <darin@eazel.com>
Fixed problem compiling with new gettext:
* hack-macros/gnome.m4: Add BUILD_INCLUDED_LIBINTL for
compatibility with the new gettext.
Fixed a problem with the throbber detecting that its X window is
gone. Based on suggestions from Owen Taylor.
* libnautilus/nautilus-bonobo-workarounds.h:
* libnautilus/nautilus-bonobo-workarounds.c:
(destroy_later_callback), (destroyed_before_timeout_callback),
(nautilus_bonobo_object_force_destroy_later): Changed to "destroy
later" instead of "destroy at idle". This makes us less likely to
experience race conditions.
* src/nautilus-window.c: (nautilus_window_initialize_class),
(nautilus_window_unrealize), (nautilus_window_destroy): Moved the
throbber destruction to unrealize so we destroy the throbber
before we destroy its X window.
Starting with patch by Anders Carlsson <andersca@gnu.org>, added
both prelighting and tracking to the throbber, also making it take
action on release, not press.
* components/throbber/nautilus-throbber.c:
(nautilus_throbber_initialize_class): Add handlers for enter,
leave, and release.
(nautilus_throbber_initialize): Set flags so we get enter and
leave events.
(select_throbber_image): Ref the image that's returned.
(draw_throbber_image): Make the image be prelit if the mouse is
over the throbber but it wasn't clicked, and darkened if the mouse
is over the throbber and it was clicked.
(nautilus_throbber_enter_notify_event): Set flag and request
redraw to prelight.
(nautilus_throbber_leave_notify_event): Set flag and request
redraw to un-prelight.
(nautilus_throbber_button_press_event): Set flag to indicate we
hit the button in the throbber. Also, respond only to left clicks.
(nautilus_throbber_button_release_event): Look at flag set in
press event. Do the work here now instead of at press time since
we are more like a real button.
Rolled in change by Miguel Rodríguez Pérez <migrax@terra.es> to
fix volume mounting problems:
* configure.in: Check for hasmntopt.
* libnautilus-private/nautilus-volume-monitor.c:
(get_removable_volumes): Fix typo (HAVE_MNTTENT_H ->
HAVE_MNTENT_H).
Integrated patch by Miguel Rodríguez Pérez <migrax@terra.es> to
make Nautilus not try to preview MPEG lists:
* src/file-manager/fm-icon-view.c:
(icon_container_preview_callback): Made audio/x-mpegurl another
exception to the list of audio types we can preview.
Rolled in change by Dennis Smit <synap@area101.penguin.nl>:
* THANKS: added more translators that were missing from the
THANKS file (names from all the .po files in ./po).
Other updates to THANKS:
* THANKS: Added Jon K Hellan.
* check-THANKS.pl: Fixed logic so you can be credited as both an
author and translator.
Other changes:
* src/file-manager/fm-list-view.c: (get_default_zoom_level): Fix
typo (storaged -> storage).
* src/nautilus-shell-ui.xml:
* src/file-manager/nautilus-directory-view-ui.xml:
Fixed keybindings entries to use the correct tags as described by
ui-xml.txt.
2001-05-21 Andy Hertzfeld <andy@eazel.com>
made the news panel flash less by defering async updates with a timer
......
......@@ -20,6 +20,7 @@ Jason Leach <jasonleach@usa.net> - Solaris fix
Jim Garrison <garrison@users.sourceforge.net> - bug fixes
Joe Shaw <joe@ximian.com> - installer code, bug fixes
John Fleck <jfleck@inkstain.net> - help browser work
Jon K Hellan <hellan@acm.org> - bug fixes
Jonathan Blandford <jrb@redhat.com> - help browser, bug fixes
Kenneth Christiansen <kenneth@gnu.org> - icons, internationalization tools
Kjartan Maraas <kmaraas@online.no> - bug fixes, i18n code
......@@ -58,6 +59,8 @@ As well as the following people who contributed translations:
Akira TAGOH <tagoh@gnome.gr.jp>
Alastair McKinstry <mckinstry@computer.org>
Almer S. Tigelaar <almer@gnome.org>
Andras Timar <timar@gnome.hu>
Andraz Tori <andraz.tori1@guest.arnes.si>
Andreas Hyden <a.hyden@cyberpoint.se>
Andrew V. Samoilov <sav@bcs.zp.ua>
Benedikt Roth <Benedikt.Roth@gmx.net>
......@@ -66,31 +69,50 @@ Christian Meyer <chrisime@gnome.org>
Christian Rose <menthos@menthos.com>
Christophe Merlet <redfox@eikonex.org>
Christopher R. Gabriel <cgabriel@softwarelibero.org>
Dennis Smit <synap@area101.penguin.nl>
Dirk-Jan C. Binnema <dirkjan@gnome.org>
Egle Girinaite <eglyte@centras.lt>
Emese Kovacs <emese@gnome.hu>
Eric Brayeur <eb@ibelgique.com>
Emese Kovacs <emese@gnome.hu>
Fatih Demir <kabalak@gmx.net>
Frederic Crozat <fcrozat@mandrakesoft.com>
Gaute Hvoslef Kvalnes <ai98ghk@stud.hib.no>
Gediminas Paulauskas <menesis@delfi.lt>
Grkem Cetin <gorkem@gelecek.com.tr>
George Lebl <jirka@5z.com>
Gong Yi LIAO <granziliao@sinamail.com>
Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
Grkem Cetin <gorkem@gelecek.com.tr>
Jarkko Ranta <jjranta@cc.joensuu.fi>
Jean-Michel Ardantz <jmardantz@ifrance.com>
Jesus Bravo Alvarez <jba@pobox.com>
Jess Bravo lvarez <jba@pobox.com>
Jorge Carrasquilla Soares <jorge@conectiva.com.br>
Keld Simonsen <keld@dkuug.dk>
Kenneth Christiansen <kenneth@gnu.org>
Kim Schulz <kim@schulz.dk>
Kjartan Maraas <kmaraas@gnome.org>
Kjenneth Christiansen <kenneth@gnu.org>
Mantas Kriauciunas <mantelis@centras.lt>
Manuel de Vega Barreiro <barreiro@arrakis.es>
Martin Norbck <d95mback@dtek.chalmers.se>
Matthias Warkus <mawarkus@gnome.org>
Mendel Mobach <mendel@mobach.nl>
Nam SungHyun
Ole Laursen <olau@hardworking.dk>
Pablo Gonzalo del Campo <pablodc@bigfoot.com>
Pablo Saratxaga <pablo@mandrakesoft.com>
Pauli Virtanen <pauli.virtanen@saunalahti.fi>
Richard Hult <rhult@hem.passagen.se>
Robert Brady <robert@suse.co.uk>
Satoru Sato <ss@gnome.gr.jp>
Simos Xenitellis <simos@hellug.gr>
Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
Szabolcs Ban <shooby@gnome.hu>
Takuo Kitame <kitame@debian.org>
Valek Filippov <frob@df.ru>
Young-Ho Cha <ganadist@dacome.co.kr>
Valentn Trilles <vtrilles@yahoo.es>
Vasif Ismailoglu MD <azerb_linux@hotmail.com>
Veeravanallore Madhavan <vbmadhu@hotmail.com>
Young-ho, Cha <ganadist@dacome.co.kr>
Yukihiro Nakai <nakai@gnome.gr.jp>
Yuri Syrota <rasta@renome.rovno.ua>
Zbigniew Chyla <cyba@gnome.pl>
......@@ -37,6 +37,7 @@ my %name_map =
"Darin as Andy" => "Darin Adler",
"Eskil Olsen" => "Eskil Heyn Olsen",
"J. Shane Culpepper" => "J Shane Culpepper",
"Jesus Bravo Alvarez" => "Jess Bravo lvarez",
"Michael Engber" => "Mike Engber",
"Michael K. Fleming" => "Mike Fleming",
"Pavel Csler" => "Pavel Cisler",
......@@ -163,11 +164,15 @@ close AUTHORS;
open THANKS, "THANKS" or die;
my @thanks_people;
my @non_translation_thanks_people;
my $in_translations = 0;
while (<THANKS>) {
chomp;
s/ - .*$//;
push @thanks_people, $_;
$in_translations = 1 if /contributed translations/;
push @non_translation_thanks_people, $_ if !$in_translations;
}
close THANKS;
......@@ -211,7 +216,7 @@ foreach my $person (@changelog_people)
my @double_credited;
foreach my $person (@authors)
{
if (grep {$_ eq $person} @thanks_people)
if (grep {$_ eq $person} @non_translation_thanks_people)
{
push @double_credited, $person;
}
......
......@@ -37,6 +37,7 @@
#include <libgnomeui/gnome-pixmap.h>
#include <libnautilus-private/nautilus-file-utilities.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-graphic-effects.h>
#include <libnautilus-private/nautilus-global-preferences.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-gtk-macros.h>
......@@ -57,10 +58,13 @@ struct NautilusThrobberDetails {
int max_frame;
int delay;
int current_frame;
int timer_task;
guint timer_task;
gboolean ready;
gboolean small_mode;
gboolean button_in;
gboolean button_down;
};
......@@ -73,6 +77,13 @@ static int nautilus_throbber_expose (GtkWidget *widget,
GdkEventExpose *event);
static gboolean nautilus_throbber_button_press_event (GtkWidget *widget,
GdkEventButton *event);
static gboolean nautilus_throbber_button_release_event (GtkWidget *widget,
GdkEventButton *event);
static gboolean nautilus_throbber_enter_notify_event (GtkWidget *widget,
GdkEventCrossing *event);
static gboolean nautilus_throbber_leave_notify_event (GtkWidget *widget,
GdkEventCrossing *event);
static void nautilus_throbber_map (GtkWidget *widget);
static void nautilus_throbber_load_images (NautilusThrobber *throbber);
......@@ -95,6 +106,9 @@ nautilus_throbber_initialize_class (NautilusThrobberClass *throbber_class)
widget_class->draw = nautilus_throbber_draw;
widget_class->expose_event = nautilus_throbber_expose;
widget_class->button_press_event = nautilus_throbber_button_press_event;
widget_class->button_release_event = nautilus_throbber_button_release_event;
widget_class->enter_notify_event = nautilus_throbber_enter_notify_event;
widget_class->leave_notify_event = nautilus_throbber_leave_notify_event;
widget_class->size_allocate = nautilus_throbber_size_allocate;
widget_class->size_request = nautilus_throbber_size_request;
widget_class->map = nautilus_throbber_map;
......@@ -111,7 +125,7 @@ enum {
static gboolean
is_throbbing (NautilusThrobber *throbber)
{
return throbber->details->timer_task > 0;
return throbber->details->timer_task != 0;
}
static void
......@@ -126,7 +140,7 @@ get_bonobo_properties (BonoboPropertyBag *bag,
switch (arg_id) {
case THROBBING:
{
BONOBO_ARG_SET_BOOLEAN (arg, throbber->details->timer_task > 0);
BONOBO_ARG_SET_BOOLEAN (arg, throbber->details->timer_task != 0);
break;
}
......@@ -186,7 +200,7 @@ nautilus_throbber_destroy (GtkObject *object)
{
NautilusThrobber *throbber = NAUTILUS_THROBBER (object);
nautilus_bonobo_object_force_destroy_at_idle (throbber->details->control);
nautilus_bonobo_object_force_destroy_later (throbber->details->control);
nautilus_throbber_remove_update_callback (throbber);
nautilus_throbber_unload_images (throbber);
......@@ -264,14 +278,12 @@ nautilus_throbber_initialize (NautilusThrobber *throbber)
GTK_WIDGET_UNSET_FLAGS (throbber, GTK_NO_WINDOW);
gtk_widget_set_events (widget,
gtk_widget_get_events (widget) | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
gtk_widget_get_events (widget)
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
| GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
throbber->details = g_new0 (NautilusThrobberDetails, 1);
throbber->details->ready = FALSE;
/* set up the instance variables to appropriate defaults */
throbber->details->timer_task = -1;
/* set up the delay from the theme */
delay_str = nautilus_theme_get_theme_data ("throbber", "delay");
......@@ -350,15 +362,17 @@ select_throbber_image (NautilusThrobber *throbber)
{
GList *element;
if (throbber->details->timer_task == -1)
return throbber->details->quiescent_pixbuf;
if (throbber->details->timer_task == 0) {
return gdk_pixbuf_ref (throbber->details->quiescent_pixbuf);
}
if (throbber->details->image_list == NULL)
if (throbber->details->image_list == NULL) {
return NULL;
}
element = g_list_nth (throbber->details->image_list, throbber->details->current_frame);
return (GdkPixbuf*) element->data;
return gdk_pixbuf_ref (element->data);
}
/* draw the throbber into the passed-in rectangle */
......@@ -367,7 +381,7 @@ static void
draw_throbber_image (GtkWidget *widget, GdkRectangle *box)
{
NautilusThrobber *throbber;
GdkPixbuf *pixbuf;
GdkPixbuf *pixbuf, *massaged_pixbuf;
int window_width, window_height;
int x_offset, y_offset;
......@@ -389,11 +403,27 @@ draw_throbber_image (GtkWidget *widget, GdkRectangle *box)
}
pixbuf = select_throbber_image (throbber);
if (pixbuf == NULL) {
return;
}
if (throbber->details->button_in) {
if (throbber->details->button_down) {
massaged_pixbuf = eel_create_darkened_pixbuf (pixbuf, 0.8 * 255, 0.8 * 255);
} else {
massaged_pixbuf = eel_create_spotlight_pixbuf (pixbuf);
}
gdk_pixbuf_unref (pixbuf);
pixbuf = massaged_pixbuf;
}
/* center the throbber image in the gdk window */
x_offset = (window_width - gdk_pixbuf_get_width (pixbuf)) / 2;
y_offset = (window_height - gdk_pixbuf_get_height (pixbuf)) / 2;
y_offset = (window_height - gdk_pixbuf_get_height (pixbuf)) / 2;
draw_pixbuf (pixbuf, widget->window, box->x + x_offset, box->y + y_offset);
gdk_pixbuf_unref (pixbuf);
}
static void
......@@ -436,9 +466,12 @@ nautilus_throbber_map (GtkWidget *widget)
/* here's the actual timeout task to bump the frame and schedule a redraw */
static int
bump_throbber_frame (NautilusThrobber *throbber)
static gboolean
bump_throbber_frame (gpointer callback_data)
{
NautilusThrobber *throbber;
throbber = NAUTILUS_THROBBER (callback_data);
if (!throbber->details->ready) {
return TRUE;
}
......@@ -462,23 +495,25 @@ nautilus_throbber_start (NautilusThrobber *throbber)
return;
}
if (throbber->details->timer_task != -1)
gtk_timeout_remove(throbber->details->timer_task);
if (throbber->details->timer_task != 0) {
gtk_timeout_remove (throbber->details->timer_task);
}
/* reset the frame count */
throbber->details->current_frame = 0;
throbber->details->timer_task = gtk_timeout_add (throbber->details->delay,
(GtkFunction) bump_throbber_frame,
throbber);
bump_throbber_frame,
throbber);
}
static void
nautilus_throbber_remove_update_callback (NautilusThrobber *throbber)
{
if (throbber->details->timer_task != -1)
gtk_timeout_remove(throbber->details->timer_task);
if (throbber->details->timer_task != 0) {
gtk_timeout_remove (throbber->details->timer_task);
}
throbber->details->timer_task = -1;
throbber->details->timer_task = 0;
}
void
......@@ -596,26 +631,86 @@ nautilus_throbber_load_images (NautilusThrobber *throbber)
g_free (image_theme);
}
static gboolean
nautilus_throbber_enter_notify_event (GtkWidget *widget, GdkEventCrossing *event)
{
NautilusThrobber *throbber;
throbber = NAUTILUS_THROBBER (widget);
if (!throbber->details->button_in) {
throbber->details->button_in = TRUE;
gtk_widget_queue_draw (widget);
}
return EEL_CALL_PARENT_WITH_RETURN_VALUE
(GTK_WIDGET_CLASS, enter_notify_event, (widget, event));
}
static gboolean
nautilus_throbber_leave_notify_event (GtkWidget *widget, GdkEventCrossing *event)
{
NautilusThrobber *throbber;
throbber = NAUTILUS_THROBBER (widget);
if (throbber->details->button_in) {
throbber->details->button_in = FALSE;
gtk_widget_queue_draw (widget);
}
return EEL_CALL_PARENT_WITH_RETURN_VALUE
(GTK_WIDGET_CLASS, leave_notify_event, (widget, event));
}
/* handle button presses by posting a change on the "location" property */
static gboolean
nautilus_throbber_button_press_event (GtkWidget *widget, GdkEventButton *event)
{
NautilusThrobber *throbber;
throbber = NAUTILUS_THROBBER (widget);
if (event->button == 1) {
throbber->details->button_down = TRUE;
throbber->details->button_in = TRUE;
gtk_widget_queue_draw (widget);
return TRUE;
}
return EEL_CALL_PARENT_WITH_RETURN_VALUE
(GTK_WIDGET_CLASS, button_press_event, (widget, event));
}
static gboolean
nautilus_throbber_button_release_event (GtkWidget *widget, GdkEventButton *event)
{
char *location;
NautilusThrobber *throbber;
char *location;
BonoboArg *location_arg;
throbber = NAUTILUS_THROBBER (widget);
location = nautilus_theme_get_theme_data ("throbber", "url");
if (location != NULL) {
location_arg = bonobo_arg_new (BONOBO_ARG_STRING);
BONOBO_ARG_SET_STRING (location_arg, location);
bonobo_property_bag_notify_listeners (throbber->details->property_bag, "location", location_arg, NULL);
bonobo_arg_release (location_arg);
g_free (location);
if (event->button == 1) {
if (throbber->details->button_in) {
location = nautilus_theme_get_theme_data ("throbber", "url");
if (location != NULL) {
location_arg = bonobo_arg_new (BONOBO_ARG_STRING);
BONOBO_ARG_SET_STRING (location_arg, location);
bonobo_property_bag_notify_listeners
(throbber->details->property_bag, "location", location_arg, NULL);
bonobo_arg_release (location_arg);
g_free (location);
}
}
throbber->details->button_down = FALSE;
gtk_widget_queue_draw (widget);
return TRUE;
}
return TRUE;
return EEL_CALL_PARENT_WITH_RETURN_VALUE
(GTK_WIDGET_CLASS, button_release_event, (widget, event));
}
void
......
......@@ -94,20 +94,13 @@ dnl ====================================
dnl ====================================
dnl = Check for different mount systems
dnl ====================================
echo "
Determining mount system properties:
"
AC_CHECK_FUNCS( setmntent endmntent )
AC_CHECK_HEADERS( mntent.h sys/mnttab.h sys/vfstab.h sys/cdio.h )
echo "
"
AC_CHECK_FUNCS(setmntent endmntent hasmntopt)
AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/vfstab.h sys/cdio.h)
dnl ====================================
dnl = Method for changing environment
dnl ====================================
AC_CHECK_FUNCS( setenv unsetenv putenv )
AC_CHECK_FUNCS(setenv unsetenv putenv)
dnl ====================================
dnl Check for FAM header -- we find the library at runtime
......
......@@ -445,7 +445,7 @@ get_removable_volumes (void)
volumes = mount_volume_prepend_filesystem (volumes, volume);
}
}
#elif defined (HAVE_MNTTENT_H)
#elif defined (HAVE_MNTENT_H)
while ((ent = getmntent (file)) != NULL) {
if (has_removable_mntent_options (ent)) {
volume = create_volume (ent->mnt_fsname, ent->mnt_dir, ent->mnt_type);
......
......@@ -50,6 +50,12 @@ typedef struct {
#endif
/* By waiting a minute before self-destructing, we minimize the race
* conditions that can occur if we self-destruct right when we notice
* an X window going away.
*/
#define MINIMIZE_RACE_CONDITIONS_DELAY 60000
/* FIXME bugzilla.eazel.com 2456: Is a hard-coded 20 seconds wait to
* detect that a remote object's process is hung acceptable? Can a
* component that is working still take 20 seconds to respond?
......@@ -69,9 +75,9 @@ typedef struct {
typedef struct {
BonoboObject *object;
guint idle_id;
guint timeout_id;
guint destroy_handler_id;
} IdleDestroyData;
} DestroyLaterData;
POA_Bonobo_Unknown__epv *
nautilus_bonobo_object_get_epv (void)
......@@ -195,9 +201,9 @@ nautilus_bonobo_object_force_destroy (BonoboObject *object)
#endif /* RELY_ON_BONOBO_INTERNALS */
static gboolean
destroy_at_idle_callback (gpointer callback_data)
destroy_later_callback (gpointer callback_data)
{
IdleDestroyData *data;
DestroyLaterData *data;
data = callback_data;
g_assert (BONOBO_IS_OBJECT (data->object));
......@@ -210,22 +216,22 @@ destroy_at_idle_callback (gpointer callback_data)
}
static void
destroyed_before_idle_callback (GtkObject *object,
gpointer callback_data)
destroyed_before_timeout_callback (GtkObject *object,
gpointer callback_data)
{
IdleDestroyData *data;
DestroyLaterData *data;
data = callback_data;
g_assert (data->object == BONOBO_OBJECT (object));
gtk_idle_remove (data->idle_id);
gtk_timeout_remove (data->timeout_id);
g_free (data);
}
void
nautilus_bonobo_object_force_destroy_at_idle (BonoboObject *object)
nautilus_bonobo_object_force_destroy_later (BonoboObject *object)
{
IdleDestroyData *data;
DestroyLaterData *data;
if (object == NULL) {
return;
......@@ -234,13 +240,14 @@ nautilus_bonobo_object_force_destroy_at_idle (BonoboObject *object)
g_return_if_fail (BONOBO_IS_OBJECT (object));
g_return_if_fail (!GTK_OBJECT_DESTROYED (object));
data = g_new (IdleDestroyData, 1);
data = g_new (DestroyLaterData, 1);
data->object = object;
data->idle_id = gtk_idle_add
(destroy_at_idle_callback, data);
data->timeout_id = gtk_timeout_add
(MINIMIZE_RACE_CONDITIONS_DELAY,
destroy_later_callback, data);
data->destroy_handler_id = gtk_signal_connect
(GTK_OBJECT (object), "destroy",
destroyed_before_idle_callback, data);
destroyed_before_timeout_callback, data);
}
/* Same as bonobo_unknown_ping, but this one works. */
......
......@@ -37,7 +37,7 @@ POA_Bonobo_Stream__epv * nautilus_bonobo_stream_get_epv
/* Bonobo will address this problem some day. */
void nautilus_bonobo_object_force_destroy (BonoboObject *object);
void nautilus_bonobo_object_force_destroy_at_idle (BonoboObject *object);
void nautilus_bonobo_object_force_destroy_later (BonoboObject *object);
void nautilus_bonobo_object_call_when_remote_object_disappears (BonoboObject *object,
Bonobo_Unknown remote_object,
NautilusBonoboObjectCallback function,
......
......@@ -452,7 +452,7 @@ widget_destroyed_callback (GtkWidget *widget,
{
g_assert (NAUTILUS_IS_VIEW (callback_data));
nautilus_bonobo_object_force_destroy_at_idle
nautilus_bonobo_object_force_destroy_later
(BONOBO_OBJECT (callback_data));
}
......
......@@ -1685,20 +1685,22 @@ icon_container_preview_callback (NautilusIconContainer *container,
/* preview files based on the mime_type. */
/* at first, we just handle sounds */
if (should_preview_sound (file)) {
if (should_preview_sound (file)
&& nautilus_sound_can_play_sound ()) {
mime_type = nautilus_file_get_mime_type (file);
if ((eel_istr_has_prefix (mime_type, "audio/") ||
eel_istr_has_prefix (mime_type, "application/x-ogg")) &&
eel_strcasecmp (mime_type, "audio/x-pn-realaudio") != 0) {
if (nautilus_sound_can_play_sound ()) {
result = 1;
preview_audio (icon_view, file, start_flag);
}
if ((eel_istr_has_prefix (mime_type, "audio/")
|| eel_istr_has_prefix (mime_type, "application/x-ogg"))
&& eel_strcasecmp (mime_type, "audio/x-pn-realaudio") != 0
&& eel_strcasecmp (mime_type, "audio/x-mpegurl") != 0) {
result = 1;
preview_audio (icon_view, file, start_flag);
}
g_free (mime_type);
}
/* display file name in status area at low zoom levels, since the name is not displayed or hard to read */
/* Display file name in status area at low zoom levels, since
* the name is not displayed or hard to read in the icon view.
*/
if (fm_icon_view_get_zoom_level (icon_view) <= NAUTILUS_ZOOM_LEVEL_SMALLER) {
if (start_flag) {
file_name = nautilus_file_get_name (file);
......
......@@ -1379,10 +1379,10 @@ static NautilusZoomLevel default_zoom_level = NAUTILUS_ZOOM_LEVEL_SMALLER;
static NautilusZoomLevel
get_default_zoom_level (void)
{
static gboolean auto_storaged_added = FALSE;
static gboolean auto_storage_added = FALSE;
if (auto_storaged_added == FALSE) {
auto_storaged_added = TRUE;
if (!auto_storage_added) {
auto_storage_added = TRUE;
eel_preferences_add_auto_integer (NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL,
(int *) &default_zoom_level);
}
......
......@@ -62,11 +62,11 @@
_tip="Move each selected item to the Trash"/>
</commands>
<keybindings>
<keybinding name="*Control*BackSpace" id="Trash"/>
<keybinding name="Delete" id="Trash"/>
<keybinding name="KP_Delete" id="Trash"/>
<keybinding name="*Shift*Delete" id="Delete"/>
<keybinding name="*Shift*KP_Delete" id="Delete"/>
<accel name="*Control*BackSpace" verb="Trash"/>
<accel name="Delete" verb="Trash"/>
<accel name="KP_Delete" verb="Trash"/>
<accel name="*Shift*Delete" verb="Delete"/>
<accel name="*Shift*KP_Delete" verb="Delete"/>
</keybindings>
<menu>
<submenu name="File">
......
......@@ -117,23 +117,24 @@ static GList *history_list = NULL;
static GdkPixmap *mini_icon_pixmap;
static GdkBitmap *mini_icon_mask;
static void nautilus_window_initialize_class (NautilusWindowClass *klass);
static void nautilus_window_initialize (NautilusWindow *window);
static void nautilus_window_destroy (GtkObject *object);
static void nautilus_window_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void nautilus_window_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void nautilus_window_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void nautilus_window_realize (GtkWidget *widget);
static void update_sidebar_panels_from_preferences (NautilusWindow *window);
static void sidebar_panels_changed_callback (gpointer user_data);
static void nautilus_window_show (GtkWidget *widget);
static void cancel_view_as_callback (NautilusWindow *window);
static void real_add_current_location_to_history_list (NautilusWindow *window);
static void nautilus_window_initialize_class (NautilusWindowClass *klass);
static void nautilus_window_initialize (NautilusWindow *window);
static void nautilus_window_destroy (GtkObject *object);
static void nautilus_window_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void nautilus_window_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void nautilus_window_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void nautilus_window_realize (GtkWidget *widget);
static void update_sidebar_panels_from_preferences (NautilusWindow *window);
static void sidebar_panels_changed_callback (gpointer user_data);
static void nautilus_window_show (GtkWidget *widget);
static void nautilus_window_unrealize (GtkWidget *widget);
static void cancel_view_as_callback (NautilusWindow *window);
static void real_add_current_location_to_history_list (NautilusWindow *window);