Commit b99fa350 authored by Michael Meeks's avatar Michael Meeks Committed by Michael Meeks

setup both the rgba and GdkColor variants. (update_label_color): upd.

2002-02-17  Michael Meeks  <michael@ximian.com>

	* libnautilus-private/nautilus-icon-container.c
	(nautilus_icon_container_theme_changed): setup both
	the rgba and GdkColor variants.
	(update_label_color): upd. color handling.
	(alloc_colors): allocate the colors on realize

2002-02-15  Michael Meeks  <michael@ximian.com>

	* libnautilus-private/nautilus-icon-container.c
	(nautilus_icon_container_get_label_color): return
	the colors we need, grab them from the style's text
	information though.

2002-02-14  Michael Meeks  <michael@ximian.com>

	* libnautilus-private/nautilus-icon-canvas-item.c
	(nautilus_icon_canvas_item_get_property),
	(nautilus_icon_canvas_item_set_property): port to
	properties.
	(draw_or_measure_label_text): update color handling,
	could we re-use the gc here ?
	(draw_stretch_handles): upd gc unref.
	(nautilus_icon_canvas_item_class_init): upd.

	* libnautilus-private/nautilus-theme.c
	(nautilus_pixmap_file_may_be_local),
	(nautilus_theme_install_user_theme),
	(nautilus_theme_make_preview_pixbuf),
	(theme_get_property),
	(load_theme_document): upd. file tests.

	* libnautilus-private/nautilus-monitor.c
	(get_event_uri): use g_build_filename.

	* libnautilus-private/nautilus-find-icon-image.c
	(get_user_emblem_path, make_full_icon_path),
	(make_full_icon_path): upd. file test.

	* libnautilus-private/nautilus-file-utilities.c
	(nautilus_pixmap_file),
	(nautilus_get_data_file_path),
	(nautilus_get_user_directory),
	(nautilus_get_desktop_directory): upd. file tests.

	* libnautilus-private/nautilus-directory-metafile.c
	(nautilus_directory_get_boolean_file_metadata): use
	strcasecmp not ascii_strdown to save yet more malloc
	locking penalty.

	* libnautilus-private/nautilus-directory-background.c
	(nautilus_file_background_receive_root_window_changes),
	(desktop_background_destroyed_callback): upd. root
	window macro.
	(nautilus_connect_background_to_file_metadata),
	(initialize_background_from_settings),
	(image_loading_done_callback): upd g_signal bits.

	* libnautilus-private/nautilus-volume-monitor.c
	(nautilus_volume_monitor_class_init): upd file test.

	* libnautilus-private/nautilus-undo-signal-handlers.c
	(nautilus_undo_tear_down_nautilus_entry_for_undo): upd.

	* libnautilus-private/nautilus-undo-manager.c
	(nautilus_undo_manager_class_init): upd. signal bits.

	* libnautilus-private/nautilus-trash-monitor.c
	(nautilus_trash_monitor_class_init): g_cclosureize.
	(nautilus_trash_monitor_init): g_signal upds.

	* libnautilus-private/nautilus-trash-file.c
	(trash_destroy, nautilus_trash_file_init),
	(remove_real_file): upd. g_signal bits.

	* libnautilus-private/nautilus-trash-directory.c
	(nautilus_trash_directory_init): upd. signal connect.
	(trash_destroy): upd. signal bits.

	* libnautilus-private/nautilus-program-choosing.c
	(get_xalf_prefix): upd. find_program_in_path.

	* libnautilus-private/nautilus-program-chooser.c
	(nautilus_program_chooser_init): upd. window policy

	* libnautilus-private/nautilus-merged-directory.c
	(merged_remove_real_directory): upd. g_signal.
	(nautilus_merged_directory_class_init): upd. g_closure

	* libnautilus-private/nautilus-link-desktop-file.c
	(nautilus_link_desktop_file_get_link_icon_from_desktop):
	upd. pixmap location.

	* libnautilus-private/nautilus-icon-factory.c
	(nautilus_icon_factory_class_init): upd. marshallers
	(is_theme_in_user_directory): upd. file test.

	* libnautilus-private/nautilus-icon-dnd.c
	(auto_scroll_timeout_callback): do a queue_draw_area
	instead of a widget_draw.

	* libnautilus-private/nautilus-icon-container.c
	(nautilus_icon_container_init),
	(set_pending_icon_to_reveal): g_signal updates.
	(nautilus_icon_container_new): remove visual
	push/pop.

	* libnautilus-private/nautilus-file.c
	(nautilus_file_fit_date_as_string): upd. julian date get.
	(nautilus_file_class_init): upd. marshallers.

	* libnautilus-private/nautilus-file-operations.c
	(extract_and_ellipsize_file_name_for_dialog): use
	get_basename.
	(nautilus_file_operations_copy_move): use gtk stock.


	* libnautilus-private/nautilus-file-operations-progress.c
	(nautilus_file_operations_progress_update): use
	progress_bar_set_fraction.
	(nautilus_file_operations_progress_init): prune
	progress setup - these are the defaults.

	* libnautilus-private/nautilus-entry.c
	(nautilus_entry_key_press): upd select_region.

	* libnautilus-private/nautilus-drag-window.c
	(get_ancestor_blocked_by): upd type_is_a.

	* libnautilus-private/nautilus-dnd.c
	(nautilus_drag_finalize),
	(nautilus_drag_init): g_object ref upd.

	* libnautilus-private/nautilus-directory.c
	(nautilus_directory_class_init): marshaller upd..
	(nautilus_directory_schedule_metadata_remove),
	(nautilus_directory_schedule_metadata_copy),
	(nautilus_directory_schedule_metadata_move):
	basename upd.

	* libnautilus-private/nautilus-directory-background.c
	(desktop_background_realized): g_signal upd.
	(theme_image_path_to_uri): file test upd.
	(image_loading_done_callback): object unref on gc & pixmap.
	(background_changed_callback): g_signal upd.

	* libnautilus-private/nautilus-bookmark.c
	(nautilus_bookmark_disconnect_file): g_signal upd.
	(nautilus_bookmark_uri_known_not_to_exist): upd
	file test.

	* libnautilus-private/nautilus-authn-manager.c
	(authentication_dialog_button_clicked): use
	GTK_RESPONSE_OK

	* libnautilus-private/Makefile.am: add deprc.
	CFLAGS.

	* libnautilus/Makefile.am: ditto.

	* configure.in (DISABLE_DEPRECATED_CFLAGS): add.

2002-02-13  Michael Meeks  <michael@ximian.com>

	* libnautilus-private/nautilus-icon-dnd.c
	(nautilus_icon_container_free_drag_data):
	re-enterancy protection.
parent cad4a60e
2002-02-17 Michael Meeks <michael@ximian.com>
* libnautilus-private/nautilus-icon-container.c
(nautilus_icon_container_theme_changed): setup both
the rgba and GdkColor variants.
(update_label_color): upd. color handling.
(alloc_colors): allocate the colors on realize
2002-02-15 Michael Meeks <michael@ximian.com>
* libnautilus-private/nautilus-icon-container.c
(nautilus_icon_container_get_label_color): return
the colors we need, grab them from the style's text
information though.
2002-02-14 Michael Meeks <michael@ximian.com>
* libnautilus-private/nautilus-icon-canvas-item.c
(nautilus_icon_canvas_item_get_property),
(nautilus_icon_canvas_item_set_property): port to
properties.
(draw_or_measure_label_text): update color handling,
could we re-use the gc here ?
(draw_stretch_handles): upd gc unref.
(nautilus_icon_canvas_item_class_init): upd.
* libnautilus-private/nautilus-theme.c
(nautilus_pixmap_file_may_be_local),
(nautilus_theme_install_user_theme),
(nautilus_theme_make_preview_pixbuf),
(theme_get_property),
(load_theme_document): upd. file tests.
* libnautilus-private/nautilus-monitor.c
(get_event_uri): use g_build_filename.
* libnautilus-private/nautilus-find-icon-image.c
(get_user_emblem_path, make_full_icon_path),
(make_full_icon_path): upd. file test.
* libnautilus-private/nautilus-file-utilities.c
(nautilus_pixmap_file),
(nautilus_get_data_file_path),
(nautilus_get_user_directory),
(nautilus_get_desktop_directory): upd. file tests.
* libnautilus-private/nautilus-directory-metafile.c
(nautilus_directory_get_boolean_file_metadata): use
strcasecmp not ascii_strdown to save yet more malloc
locking penalty.
* libnautilus-private/nautilus-directory-background.c
(nautilus_file_background_receive_root_window_changes),
(desktop_background_destroyed_callback): upd. root
window macro.
(nautilus_connect_background_to_file_metadata),
(initialize_background_from_settings),
(image_loading_done_callback): upd g_signal bits.
* libnautilus-private/nautilus-volume-monitor.c
(nautilus_volume_monitor_class_init): upd file test.
* libnautilus-private/nautilus-undo-signal-handlers.c
(nautilus_undo_tear_down_nautilus_entry_for_undo): upd.
* libnautilus-private/nautilus-undo-manager.c
(nautilus_undo_manager_class_init): upd. signal bits.
* libnautilus-private/nautilus-trash-monitor.c
(nautilus_trash_monitor_class_init): g_cclosureize.
(nautilus_trash_monitor_init): g_signal upds.
* libnautilus-private/nautilus-trash-file.c
(trash_destroy, nautilus_trash_file_init),
(remove_real_file): upd. g_signal bits.
* libnautilus-private/nautilus-trash-directory.c
(nautilus_trash_directory_init): upd. signal connect.
(trash_destroy): upd. signal bits.
* libnautilus-private/nautilus-program-choosing.c
(get_xalf_prefix): upd. find_program_in_path.
* libnautilus-private/nautilus-program-chooser.c
(nautilus_program_chooser_init): upd. window policy
* libnautilus-private/nautilus-merged-directory.c
(merged_remove_real_directory): upd. g_signal.
(nautilus_merged_directory_class_init): upd. g_closure
* libnautilus-private/nautilus-link-desktop-file.c
(nautilus_link_desktop_file_get_link_icon_from_desktop):
upd. pixmap location.
* libnautilus-private/nautilus-icon-factory.c
(nautilus_icon_factory_class_init): upd. marshallers
(is_theme_in_user_directory): upd. file test.
* libnautilus-private/nautilus-icon-dnd.c
(auto_scroll_timeout_callback): do a queue_draw_area
instead of a widget_draw.
* libnautilus-private/nautilus-icon-container.c
(nautilus_icon_container_init),
(set_pending_icon_to_reveal): g_signal updates.
(nautilus_icon_container_new): remove visual
push/pop.
* libnautilus-private/nautilus-file.c
(nautilus_file_fit_date_as_string): upd. julian date get.
(nautilus_file_class_init): upd. marshallers.
* libnautilus-private/nautilus-file-operations.c
(extract_and_ellipsize_file_name_for_dialog): use
get_basename.
(nautilus_file_operations_copy_move): use gtk stock.
* libnautilus-private/nautilus-file-operations-progress.c
(nautilus_file_operations_progress_update): use
progress_bar_set_fraction.
(nautilus_file_operations_progress_init): prune
progress setup - these are the defaults.
* libnautilus-private/nautilus-entry.c
(nautilus_entry_key_press): upd select_region.
* libnautilus-private/nautilus-drag-window.c
(get_ancestor_blocked_by): upd type_is_a.
* libnautilus-private/nautilus-dnd.c
(nautilus_drag_finalize),
(nautilus_drag_init): g_object ref upd.
* libnautilus-private/nautilus-directory.c
(nautilus_directory_class_init): marshaller upd..
(nautilus_directory_schedule_metadata_remove),
(nautilus_directory_schedule_metadata_copy),
(nautilus_directory_schedule_metadata_move):
basename upd.
* libnautilus-private/nautilus-directory-background.c
(desktop_background_realized): g_signal upd.
(theme_image_path_to_uri): file test upd.
(image_loading_done_callback): object unref on gc & pixmap.
(background_changed_callback): g_signal upd.
* libnautilus-private/nautilus-bookmark.c
(nautilus_bookmark_disconnect_file): g_signal upd.
(nautilus_bookmark_uri_known_not_to_exist): upd
file test.
* libnautilus-private/nautilus-authn-manager.c
(authentication_dialog_button_clicked): use
GTK_RESPONSE_OK
* libnautilus-private/Makefile.am: add deprc.
CFLAGS.
* libnautilus/Makefile.am: ditto.
* configure.in (DISABLE_DEPRECATED_CFLAGS): add.
2002-02-13 Michael Meeks <michael@ximian.com>
* libnautilus-private/nautilus-icon-dnd.c
(nautilus_icon_container_free_drag_data):
re-enterancy protection.
2002-02-17 Kjartan Maraas <kmaraas@gnome.org> 2002-02-17 Kjartan Maraas <kmaraas@gnome.org>
* libnautilus-private/nautilus-icon-container.c: Remove calls to * libnautilus-private/nautilus-icon-container.c: Remove calls to
......
...@@ -295,6 +295,15 @@ AC_SUBST(MUSIC_COMPONENT_CFLAGS) ...@@ -295,6 +295,15 @@ AC_SUBST(MUSIC_COMPONENT_CFLAGS)
MUSIC_COMPONENT_LIBS="`$PKG_CONFIG --libs $MUSIC_COMPONENT_MODULES`" MUSIC_COMPONENT_LIBS="`$PKG_CONFIG --libs $MUSIC_COMPONENT_MODULES`"
AC_SUBST(MUSIC_COMPONENT_LIBS) AC_SUBST(MUSIC_COMPONENT_LIBS)
DISABLE_DEPRECATED_CFLAGS=" \
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED \
-DBONOBO_DISABLE_DEPRECATED"
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
dnl ========================================================================== dnl ==========================================================================
AC_OUTPUT([ AC_OUTPUT([
......
...@@ -6,6 +6,7 @@ INCLUDES = \ ...@@ -6,6 +6,7 @@ INCLUDES = \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir) \ -I$(top_builddir) \
$(CORE_CFLAGS) \ $(CORE_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \ -DDATADIR=\""$(datadir)"\" \
-DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \ -DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \
$(NULL) $(NULL)
......
...@@ -124,7 +124,7 @@ authentication_dialog_button_clicked (GtkDialog *dialog, ...@@ -124,7 +124,7 @@ authentication_dialog_button_clicked (GtkDialog *dialog,
{ {
DEBUG_MSG (("+%s button: %d\n", G_GNUC_FUNCTION, button_number)); DEBUG_MSG (("+%s button: %d\n", G_GNUC_FUNCTION, button_number));
if (button_number == GNOME_OK) { if (button_number == GTK_RESPONSE_OK) {
info->out_args->username info->out_args->username
= eel_password_dialog_get_username (EEL_PASSWORD_DIALOG (dialog)); = eel_password_dialog_get_username (EEL_PASSWORD_DIALOG (dialog));
info->out_args->password info->out_args->password
......
...@@ -472,9 +472,10 @@ nautilus_bookmark_disconnect_file (NautilusBookmark *bookmark) ...@@ -472,9 +472,10 @@ nautilus_bookmark_disconnect_file (NautilusBookmark *bookmark)
g_assert (NAUTILUS_IS_BOOKMARK (bookmark)); g_assert (NAUTILUS_IS_BOOKMARK (bookmark));
if (bookmark->details->file != NULL) { if (bookmark->details->file != NULL) {
gtk_signal_disconnect_by_func (GTK_OBJECT (bookmark->details->file), g_signal_handlers_disconnect_by_func (
G_CALLBACK (bookmark_file_changed_callback), bookmark->details->file,
bookmark); G_CALLBACK (bookmark_file_changed_callback),
bookmark);
nautilus_file_unref (bookmark->details->file); nautilus_file_unref (bookmark->details->file);
bookmark->details->file = NULL; bookmark->details->file = NULL;
} }
...@@ -601,7 +602,8 @@ nautilus_bookmark_uri_known_not_to_exist (NautilusBookmark *bookmark) ...@@ -601,7 +602,8 @@ nautilus_bookmark_uri_known_not_to_exist (NautilusBookmark *bookmark)
} }
/* Now check if the file exists (sync. call OK because it is local). */ /* Now check if the file exists (sync. call OK because it is local). */
exists = g_file_exists (path_name); exists = g_file_test (path_name, G_FILE_TEST_EXISTS);
g_free (path_name); g_free (path_name);
return !exists; return !exists;
} }
...@@ -69,9 +69,10 @@ desktop_background_realized (NautilusIconContainer *icon_container, void *discon ...@@ -69,9 +69,10 @@ desktop_background_realized (NautilusIconContainer *icon_container, void *discon
EelBackground *background; EelBackground *background;
if ((gboolean) GPOINTER_TO_INT (disconnect_signal)) { if ((gboolean) GPOINTER_TO_INT (disconnect_signal)) {
gtk_signal_disconnect_by_func (GTK_OBJECT (icon_container), g_signal_handlers_disconnect_by_func (
G_CALLBACK (desktop_background_realized), icon_container,
disconnect_signal); G_CALLBACK (desktop_background_realized),
disconnect_signal);
} }
background = eel_get_widget_background (GTK_WIDGET (icon_container)); background = eel_get_widget_background (GTK_WIDGET (icon_container));
...@@ -154,7 +155,7 @@ theme_image_path_to_uri (char *image_file, const char *theme_name) ...@@ -154,7 +155,7 @@ theme_image_path_to_uri (char *image_file, const char *theme_name)
image_path = g_strdup_printf ("%s/%s", NAUTILUS_DATADIR, image_file); image_path = g_strdup_printf ("%s/%s", NAUTILUS_DATADIR, image_file);
} }
if (image_path && g_file_exists (image_path)) { if (image_path && g_file_test (image_path, G_FILE_TEST_EXISTS)) {
image_uri = gnome_vfs_get_uri_from_local_path (image_path); image_uri = gnome_vfs_get_uri_from_local_path (image_path);
} else { } else {
image_uri = NULL; image_uri = NULL;
...@@ -519,7 +520,9 @@ nautilus_file_background_event_filter (GdkXEvent *gdk_xevent, GdkEvent *event, g ...@@ -519,7 +520,9 @@ nautilus_file_background_event_filter (GdkXEvent *gdk_xevent, GdkEvent *event, g
static void static void
desktop_background_destroyed_callback (EelBackground *background, void *georgeWBush) desktop_background_destroyed_callback (EelBackground *background, void *georgeWBush)
{ {
gdk_window_remove_filter (GDK_ROOT_PARENT(), nautilus_file_background_event_filter, background); gdk_window_remove_filter (
gdk_get_default_root_window (),
nautilus_file_background_event_filter, background);
} }
static void static void
...@@ -528,7 +531,9 @@ nautilus_file_background_receive_root_window_changes (EelBackground *background) ...@@ -528,7 +531,9 @@ nautilus_file_background_receive_root_window_changes (EelBackground *background)
XWindowAttributes attribs = { 0 }; XWindowAttributes attribs = { 0 };
/* set up a filter on the root window to get notified about property changes */ /* set up a filter on the root window to get notified about property changes */
gdk_window_add_filter (GDK_ROOT_PARENT(), nautilus_file_background_event_filter, background); gdk_window_add_filter (
gdk_get_default_root_window (),
nautilus_file_background_event_filter, background);
gdk_error_trap_push (); gdk_error_trap_push ();
...@@ -640,9 +645,10 @@ image_loading_done_callback (EelBackground *background, gboolean successful_load ...@@ -640,9 +645,10 @@ image_loading_done_callback (EelBackground *background, gboolean successful_load
GdkWindow *background_window; GdkWindow *background_window;
if ((gboolean) GPOINTER_TO_INT (disconnect_signal)) { if ((gboolean) GPOINTER_TO_INT (disconnect_signal)) {
gtk_signal_disconnect_by_func (GTK_OBJECT (background), g_signal_handlers_disconnect_by_func
G_CALLBACK (image_loading_done_callback), (background,
disconnect_signal); G_CALLBACK (image_loading_done_callback),
disconnect_signal);
} }
width = gdk_screen_width (); width = gdk_screen_width ();
...@@ -651,7 +657,7 @@ image_loading_done_callback (EelBackground *background, gboolean successful_load ...@@ -651,7 +657,7 @@ image_loading_done_callback (EelBackground *background, gboolean successful_load
pixmap = make_root_pixmap (width, height); pixmap = make_root_pixmap (width, height);
gc = gdk_gc_new (pixmap); gc = gdk_gc_new (pixmap);
eel_background_draw_to_drawable (background, pixmap, gc, 0, 0, width, height, width, height); eel_background_draw_to_drawable (background, pixmap, gc, 0, 0, width, height, width, height);
gdk_gc_unref (gc); g_object_unref (gc);
set_root_pixmap (pixmap); set_root_pixmap (pixmap);
...@@ -662,7 +668,7 @@ image_loading_done_callback (EelBackground *background, gboolean successful_load ...@@ -662,7 +668,7 @@ image_loading_done_callback (EelBackground *background, gboolean successful_load
#endif #endif
} }
gdk_pixmap_unref (pixmap); g_object_unref (pixmap);
} }
static void static void
...@@ -753,9 +759,8 @@ background_changed_callback (EelBackground *background, ...@@ -753,9 +759,8 @@ background_changed_callback (EelBackground *background,
/* Block the other handler while we are writing metadata so it doesn't /* Block the other handler while we are writing metadata so it doesn't
* try to change the background. * try to change the background.
*/ */
gtk_signal_handler_block_by_func (GTK_OBJECT (file), g_signal_handlers_block_by_func (
G_CALLBACK (saved_settings_changed_callback), file, G_CALLBACK (saved_settings_changed_callback), background);
background);
nautilus_file_set_metadata (file, nautilus_file_set_metadata (file,
NAUTILUS_METADATA_KEY_LOCATION_BACKGROUND_COLOR, NAUTILUS_METADATA_KEY_LOCATION_BACKGROUND_COLOR,
...@@ -768,9 +773,8 @@ background_changed_callback (EelBackground *background, ...@@ -768,9 +773,8 @@ background_changed_callback (EelBackground *background,
image); image);
/* Unblock the handler. */ /* Unblock the handler. */
gtk_signal_handler_unblock_by_func (GTK_OBJECT (file), g_signal_handlers_unblock_by_func (
G_CALLBACK (saved_settings_changed_callback), file, G_CALLBACK (saved_settings_changed_callback), background);
background);
} }
g_free (color); g_free (color);
...@@ -816,9 +820,10 @@ initialize_background_from_settings (NautilusFile *file, ...@@ -816,9 +820,10 @@ initialize_background_from_settings (NautilusFile *file,
/* Block the other handler while we are responding to changes /* Block the other handler while we are responding to changes
* in the metadata so it doesn't try to change the metadata. * in the metadata so it doesn't try to change the metadata.
*/ */
gtk_signal_handler_block_by_func (GTK_OBJECT (background), g_signal_handlers_block_by_func
G_CALLBACK (background_changed_callback), (background,
file); G_CALLBACK (background_changed_callback),
file);
eel_background_set_color (background, color); eel_background_set_color (background, color);
if (background_is_desktop(background)) { if (background_is_desktop(background)) {
...@@ -830,9 +835,10 @@ initialize_background_from_settings (NautilusFile *file, ...@@ -830,9 +835,10 @@ initialize_background_from_settings (NautilusFile *file,
eel_background_set_image_placement (background, placement); eel_background_set_image_placement (background, placement);
/* Unblock the handler. */ /* Unblock the handler. */
gtk_signal_handler_unblock_by_func (GTK_OBJECT (background), g_signal_handlers_unblock_by_func
G_CALLBACK (background_changed_callback), (background,
file); G_CALLBACK (background_changed_callback),
file);
g_free (color); g_free (color);
g_free (image); g_free (image);
...@@ -867,7 +873,7 @@ nautilus_file_background_theme_changed (gpointer user_data) ...@@ -867,7 +873,7 @@ nautilus_file_background_theme_changed (gpointer user_data)
/* handle the background reset signal by setting values from the current theme */ /* handle the background reset signal by setting values from the current theme */
static void static void
background_reset_callback (EelBackground *background, background_reset_callback (EelBackground *background,
NautilusFile *file) NautilusFile *file)
{ {
if (background_is_desktop (background)) { if (background_is_desktop (background)) {
nautilus_file_background_write_desktop_default_settings (); nautilus_file_background_write_desktop_default_settings ();
...@@ -875,9 +881,10 @@ background_reset_callback (EelBackground *background, ...@@ -875,9 +881,10 @@ background_reset_callback (EelBackground *background,
/* Block the other handler while we are writing metadata so it doesn't /* Block the other handler while we are writing metadata so it doesn't
* try to change the background. * try to change the background.
*/ */
gtk_signal_handler_block_by_func (GTK_OBJECT (file), g_signal_handlers_block_by_func (
G_CALLBACK (saved_settings_changed_callback), file,
background); G_CALLBACK (saved_settings_changed_callback),
background);
/* reset the metadata */ /* reset the metadata */
nautilus_file_set_metadata (file, nautilus_file_set_metadata (file,
...@@ -890,9 +897,10 @@ background_reset_callback (EelBackground *background, ...@@ -890,9 +897,10 @@ background_reset_callback (EelBackground *background,
NULL, NULL,
NULL); NULL);
/* Unblock the handler. */ /* Unblock the handler. */
gtk_signal_handler_unblock_by_func (GTK_OBJECT (file), g_signal_handlers_unblock_by_func (
G_CALLBACK (saved_settings_changed_callback), file,
background); G_CALLBACK (saved_settings_changed_callback),
background);
} }
saved_settings_changed_callback (file, background); saved_settings_changed_callback (file, background);
...@@ -903,9 +911,10 @@ static void ...@@ -903,9 +911,10 @@ static void
background_destroyed_callback (EelBackground *background, background_destroyed_callback (EelBackground *background,
NautilusFile *file) NautilusFile *file)
{ {
gtk_signal_disconnect_by_func (GTK_OBJECT (file), g_signal_handlers_disconnect_by_func (
G_CALLBACK (saved_settings_changed_callback), file,
background); G_CALLBACK (saved_settings_changed_callback),
background);
nautilus_file_monitor_remove (file, background); nautilus_file_monitor_remove (file, background);
eel_preferences_remove_callback (NAUTILUS_PREFERENCES_THEME, eel_preferences_remove_callback (NAUTILUS_PREFERENCES_THEME,
nautilus_file_background_theme_changed, nautilus_file_background_theme_changed,
...@@ -933,18 +942,22 @@ nautilus_connect_background_to_file_metadata (GtkWidget *widget, ...@@ -933,18 +942,22 @@ nautilus_connect_background_to_file_metadata (GtkWidget *widget,
/* Disconnect old signal handlers. */ /* Disconnect old signal handlers. */
if (old_file != NULL) { if (old_file != NULL) {
g_assert (NAUTILUS_IS_FILE (old_file)); g_assert (NAUTILUS_IS_FILE (old_file));
gtk_signal_disconnect_by_func (GTK_OBJECT (background), g_signal_handlers_disconnect_by_func
G_CALLBACK (background_changed_callback), (background,
old_file); G_CALLBACK (background_changed_callback),
gtk_signal_disconnect_by_func (GTK_OBJECT (background), old_file);
G_CALLBACK (background_destroyed_callback), g_signal_handlers_disconnect_by_func
old_file); (background,
gtk_signal_disconnect_by_func (GTK_OBJECT (background), G_CALLBACK (background_destroyed_callback),
G_CALLBACK (background_reset_callback), old_file);
old_file); g_signal_handlers_disconnect_by_func
gtk_signal_disconnect_by_func (GTK_OBJECT (old_file), (background,
G_CALLBACK (saved_settings_changed_callback), G_CALLBACK (background_reset_callback),
background); old_file);
g_signal_handlers_disconnect_by_func
(old_file,
G_CALLBACK (saved_settings_changed_callback),
background);
nautilus_file_monitor_remove (old_file, background); nautilus_file_monitor_remove (old_file, background);
eel_preferences_remove_callback (NAUTILUS_PREFERENCES_THEME, eel_preferences_remove_callback (NAUTILUS_PREFERENCES_THEME,
nautilus_file_background_theme_changed, nautilus_file_background_theme_changed,
......
...@@ -366,10 +366,9 @@ nautilus_directory_get_boolean_file_metadata (NautilusDirectory *directory, ...@@ -366,10 +366,9 @@ nautilus_directory_get_boolean_file_metadata (NautilusDirectory *directory,
(directory, file_name, key, (directory, file_name, key,
default_metadata ? "true" : "false"); default_metadata ? "true" : "false");
g_strdown (result_as_string); if (g_ascii_strcasecmp (result_as_string, "true") == 0) {
if (strcmp (result_as_string, "true") == 0) {
result = TRUE; result = TRUE;
} else if (strcmp (result_as_string, "false") == 0) { } else if (g_ascii_strcasecmp (result_as_string, "false") == 0) {
result = FALSE; result = FALSE;
} else { } else {
if (result_as_string != NULL) { if (result_as_string != NULL) {
......
...@@ -90,7 +90,7 @@ nautilus_directory_class_init (NautilusDirectoryClass *klass) ...@@ -90,7 +90,7 @@ nautilus_directory_class_init (NautilusDirectoryClass *klass)
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusDirectoryClass, files_added), G_STRUCT_OFFSET (NautilusDirectoryClass, files_added),
NULL, NULL, NULL, NULL,
gtk_marshal_VOID__POINTER, g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER); G_TYPE_NONE, 1, G_TYPE_POINTER);
signals[FILES_CHANGED] = signals[FILES_CHANGED] =
g_signal_new ("files_changed", g_signal_new ("files_changed",
...@@ -98,7 +98,7 @@ nautilus_directory_class_init (NautilusDirectoryClass *klass) ...@@ -98,7 +98,7 @@ nautilus_directory_class_init (NautilusDirectoryClass *klass)
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusDirectoryClass, files_changed), G_STRUCT_OFFSET (NautilusDirectoryClass, files_changed),
NULL, NULL, NULL, NULL,
gtk_marshal_VOID__POINTER, g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER); G_TYPE_NONE, 1, G_TYPE_POINTER);
signals[DONE_LOADING] = signals[DONE_LOADING] =
g_signal_new ("done_loading", g_signal_new ("done_loading",
...@@ -106,7 +106,7 @@ nautilus_directory_class_init (NautilusDirectoryClass *klass) ...@@ -106,7 +106,7 @@ nautilus_directory_class_init (NautilusDirectoryClass *klass)
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusDirectoryClass, done_loading), G_STRUCT_OFFSET (NautilusDirectoryClass, done_loading),
NULL, NULL, NULL, NULL,
gtk_marshal_VOID__VOID, g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0); G_TYPE_NONE, 0);
signals[LOAD_ERROR] = signals[LOAD_ERROR] =
g_signal_new ("load_error", g_signal_new ("load_error",
...@@ -114,7 +114,7 @@ nautilus_directory_class_init (NautilusDirectoryClass *klass) ...@@ -114,7 +114,7 @@ nautilus_directory_class_init (NautilusDirectoryClass *klass)
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusDirectoryClass, load_error), G_STRUCT_OFFSET (NautilusDirectoryClass, load_error),
NULL, NULL, NULL, NULL,
gtk_marshal_VOID__INT, g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT); G_TYPE_NONE, 1, G_TYPE_INT);
klass->get_name_for_self_as_new_file = real_get_name_for_self_as_new_file; klass->get_name_for_self_as_new_file = real_get_name_for_self_as_new_file;
...@@ -1301,7 +1301,7 @@ nautilus_directory_schedule_metadata_copy (GList *uri_pairs) ...@@ -1301,7 +1301,7 @@ nautilus_directory_schedule_metadata_copy (GList *uri_pairs)
GList *p; GList *p;
URIPair *pair; URIPair *pair;
NautilusDirectory *source_directory, *destination_directory; NautilusDirectory *source_directory, *destination_directory;
const char *source_relative_uri, *destination_relative_uri; char *source_relative_uri, *destination_relative_uri;
for (p = uri_pairs; p != NULL; p = p->next) { for (p = uri_pairs; p != NULL; p = p->next) {
pair = (URIPair *) p->data; pair = (URIPair *) p->data;
...@@ -1309,13 +1309,16 @@ nautilus_directory_schedule_metadata_copy (GList *uri_pairs) ...@@ -1309,13 +1309,16 @@ nautilus_directory_schedule_metadata_copy (GList *uri_pairs)
source_directory = get_parent_directory (pair->from_uri); source_directory = get_parent_directory (pair->from_uri);
destination_directory = get_parent_directory (pair->to_uri); destination_directory = get_parent_directory (pair->to_uri);
source_relative_uri = g_basename (pair->from_uri); source_relative_uri = g_path_get_basename (pair->from_uri);
destination_relative_uri = g_basename (pair->to_uri); destination_relative_uri = g_path_get_basename (pair->to_uri);
nautilus_directory_copy_file_metadata (source_directory, nautilus_directory_copy_file_metadata (source_directory,
source_relative_uri, source_relative_uri,
destination_directory, destination_directory,
destination_relative_uri); destination_relative_uri);
g_free (source_relative_uri);
g_free (destination_relative_uri);
nautilus_directory_unref (source_directory); nautilus_directory_unref (source_directory);
nautilus_directory_unref (destination_directory); nautilus_directory_unref (destination_directory);
...@@ -1328,7 +1331,7 @@ nautilus_directory_schedule_metadata_move (GList *uri_pairs) ...@@ -1328,7 +1331,7 @@ nautilus_directory_schedule_metadata_move (GList *uri_pairs)
GList *p; GList *p;
URIPair *pair; URIPair *pair;
NautilusDirectory *source_directory, *destination_directory; NautilusDirectory *source_directory, *destination_directory;
const char *source_relative_uri, *destination_relative_uri; char *source_relative_uri, *destination_relative_uri;
for (p = uri_pairs; p != NULL; p = p->next) { for (p = uri_pairs; p != NULL; p = p->next) {
pair = (URIPair *) p->data; pair = (URIPair *) p->data;
...@@ -1336,8 +1339,8 @@ nautilus_directory_schedule_metadata_move (GList *uri_pairs) ...@@ -1336,8 +1339,8 @@ nautilus_directory_schedule_metadata_move (GList *uri_pairs)
source_directory = get_parent_directory (pair->from_uri); source_directory = get_parent_directory (pair->from_uri);
destination_directory = get_parent_directory (pair->to_uri); destination_directory = get_parent_directory (pair->to_uri);
source_relative_uri = g_basename (pair->from_uri); source_relative_uri = g_path_get_basename (pair->from_uri);
destination_relative_uri = g_basename (pair->to_uri); destination_relative_uri = g_path_get_basename (pair->to_uri);
nautilus_directory_copy_file_metadata (source_directory, nautilus_directory_copy_file_metadata (source_directory,
source_relative_uri, source_relative_uri,
...@@ -1346,6 +1349,9 @@ nautilus_directory_schedule_metadata_move (GList *uri_pairs) ...@@ -1346,6 +1349,9 @@ nautilus_directory_schedule_metadata_move (GList *uri_pairs)
nautilus_directory_remove_file_metadata (source_directory, nautilus_directory_remove_file_metadata (source_directory,
source_relative_uri); source_relative_uri);
g_free (source_relative_uri);
g_free (destination_relative_uri);
nautilus_directory_unref (source_directory); nautilus_directory_unref (source_directory);
nautilus_directory_unref (destination_directory); nautilus_directory_unref (destination_directory);
} }
...@@ -1357,16 +1363,18 @@ nautilus_directory_schedule_metadata_remove (GList *uris) ...@@ -1357,16 +1363,18 @@ nautilus_directory_schedule_metadata_remove (GList *uris)
GList *p; GList *p;
const char *uri; const char *uri;
NautilusDirectory *directory; NautilusDirectory *directory;
const char *relative_uri; char *relative_uri;
for (p = uris; p != NULL; p = p->next) { for (p = uris; p != NULL; p = p->next) {
uri = (const char *) p->data; uri = (const char *) p->data;
directory = get_parent_directory (uri); directory = get_parent_directory (uri);
relative_uri = g_basename (uri); relative_uri = g_path_get_basename (uri);
nautilus_directory_remove_file_metadata (directory, nautilus_directory_remove_file_metadata (directory,
relative_uri); relative_uri);
g_free (relative_uri);
nautilus_directory_unref (directory); nautilus_directory_unref (directory);
} }
......
...@@ -67,15 +67,16 @@ ...@@ -67,15 +67,16 @@
#define MAX_AUTOSCROLL_DELTA 50 #define MAX_AUTOSCROLL_DELTA 50