Commit 5e85711b authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Don't use deprecated APIs. Patch by iain <iain@prettypeople.org>

2003-02-28  Alexander Larsson  <alexl@redhat.com>

	* components/throbber/nautilus-throbber.c:
	* libnautilus-private/nautilus-bonobo-extensions.c:
	* libnautilus-private/nautilus-directory-async.c:
	* libnautilus-private/nautilus-directory.c:
	* libnautilus-private/nautilus-dnd.c:
	* libnautilus-private/nautilus-drag-window.c:
	* libnautilus-private/nautilus-entry.c:
	* libnautilus-private/nautilus-file-operations-progress.c:
	* libnautilus-private/nautilus-icon-canvas-item.c:
	* libnautilus-private/nautilus-icon-container.c:
	* libnautilus-private/nautilus-metafile.c:
	* libnautilus-private/nautilus-tree-view-drag-dest.c:
	* libnautilus-private/nautilus-volume-monitor.c:
	* libnautilus/nautilus-idle-queue.c:
	* src/file-manager/fm-desktop-icon-view.c:
	* src/file-manager/fm-directory-view.c:
	* src/file-manager/fm-icon-view.c:
	* src/file-manager/fm-properties-window.c:
	* src/nautilus-bookmarks-window.c:
	* src/nautilus-location-bar.c:
	* src/nautilus-main.c:
	* src/nautilus-view-frame.c:
	* src/nautilus-window-menus.c:
	* src/nautilus-window.c:
	Don't use deprecated APIs.
	Patch by iain <iain@prettypeople.org>
parent 48c4c004
2003-02-28 Alexander Larsson <alexl@redhat.com>
* components/throbber/nautilus-throbber.c:
* libnautilus-private/nautilus-bonobo-extensions.c:
* libnautilus-private/nautilus-directory-async.c:
* libnautilus-private/nautilus-directory.c:
* libnautilus-private/nautilus-dnd.c:
* libnautilus-private/nautilus-drag-window.c:
* libnautilus-private/nautilus-entry.c:
* libnautilus-private/nautilus-file-operations-progress.c:
* libnautilus-private/nautilus-icon-canvas-item.c:
* libnautilus-private/nautilus-icon-container.c:
* libnautilus-private/nautilus-metafile.c:
* libnautilus-private/nautilus-tree-view-drag-dest.c:
* libnautilus-private/nautilus-volume-monitor.c:
* libnautilus/nautilus-idle-queue.c:
* src/file-manager/fm-desktop-icon-view.c:
* src/file-manager/fm-directory-view.c:
* src/file-manager/fm-icon-view.c:
* src/file-manager/fm-properties-window.c:
* src/nautilus-bookmarks-window.c:
* src/nautilus-location-bar.c:
* src/nautilus-main.c:
* src/nautilus-view-frame.c:
* src/nautilus-window-menus.c:
* src/nautilus-window.c:
Don't use deprecated APIs.
Patch by iain <iain@prettypeople.org>
2003-02-28 Alexander Larsson <alexl@redhat.com>
* components/text/nautilus-text-view.c (nautilus_text_view_instance_init):
......
......@@ -284,7 +284,7 @@ nautilus_throbber_expose (GtkWidget *widget, GdkEventExpose *event)
GdkPixbuf *pixbuf;
int x_offset, y_offset, width, height;
GdkRectangle pix_area, dest;
g_return_val_if_fail (NAUTILUS_IS_THROBBER (widget), FALSE);
throbber = NAUTILUS_THROBBER (widget);
......@@ -313,15 +313,12 @@ nautilus_throbber_expose (GtkWidget *widget, GdkEventExpose *event)
g_object_unref (pixbuf);
return FALSE;
}
gdk_pixbuf_render_to_drawable_alpha (
pixbuf, widget->window,
dest.x - x_offset, dest.y - y_offset,
dest.x, dest.y,
dest.width, dest.height,
GDK_PIXBUF_ALPHA_BILEVEL, 128,
GDK_RGB_DITHER_MAX,
0, 0);
gdk_draw_pixbuf (widget->window, NULL, pixbuf,
dest.x - x_offset, dest.y - y_offset,
dest.x, dest.y,
dest.width, dest.height,
GDK_RGB_DITHER_MAX, 0, 0);
g_object_unref (pixbuf);
......@@ -371,21 +368,21 @@ nautilus_throbber_start (NautilusThrobber *throbber)
}
if (throbber->details->timer_task != 0) {
gtk_timeout_remove (throbber->details->timer_task);
g_source_remove (throbber->details->timer_task);
}
/* reset the frame count */
throbber->details->current_frame = 0;
throbber->details->timer_task = gtk_timeout_add (throbber->details->delay,
bump_throbber_frame,
throbber);
throbber->details->timer_task = g_timeout_add (throbber->details->delay,
bump_throbber_frame,
throbber);
}
static void
nautilus_throbber_remove_update_callback (NautilusThrobber *throbber)
{
if (throbber->details->timer_task != 0) {
gtk_timeout_remove (throbber->details->timer_task);
g_source_remove (throbber->details->timer_task);
}
throbber->details->timer_task = 0;
......
......@@ -547,8 +547,8 @@ bonobo_activation_activation_callback (Bonobo_Unknown activated_object,
if (handle->cancel) {
activation_cancel (handle);
} else {
handle->idle_id = gtk_idle_add (activation_idle_callback,
handle);
handle->idle_id = g_idle_add (activation_idle_callback,
handle);
}
}
......@@ -610,7 +610,7 @@ nautilus_bonobo_activate_cancel (NautilusBonoboActivationHandle *handle)
/* no way to cancel the underlying bonobo-activation call, so we just set a flag */
handle->cancel = TRUE;
} else {
gtk_idle_remove (handle->idle_id);
g_source_remove (handle->idle_id);
activation_cancel (handle);
}
}
......
......@@ -970,7 +970,7 @@ nautilus_directory_schedule_dequeue_pending (NautilusDirectory *directory)
{
if (directory->details->dequeue_pending_idle_id == 0) {
directory->details->dequeue_pending_idle_id
= gtk_idle_add (dequeue_pending_idle_callback, directory);
= g_idle_add (dequeue_pending_idle_callback, directory);
}
}
......@@ -1005,7 +1005,7 @@ file_list_cancel (NautilusDirectory *directory)
directory_load_cancel (directory);
if (directory->details->dequeue_pending_idle_id != 0) {
gtk_idle_remove (directory->details->dequeue_pending_idle_id);
g_source_remove (directory->details->dequeue_pending_idle_id);
directory->details->dequeue_pending_idle_id = 0;
}
......@@ -1049,7 +1049,7 @@ directory_load_done (NautilusDirectory *directory,
/* Call the idle function right away. */
if (directory->details->dequeue_pending_idle_id != 0) {
gtk_idle_remove (directory->details->dequeue_pending_idle_id);
g_source_remove (directory->details->dequeue_pending_idle_id);
}
dequeue_pending_idle_callback (directory);
}
......
......@@ -188,7 +188,7 @@ nautilus_directory_finalize (GObject *object)
bonobo_object_release_unref (directory->details->metafile_corba_object, NULL);
if (directory->details->dequeue_pending_idle_id != 0) {
gtk_idle_remove (directory->details->dequeue_pending_idle_id);
g_source_remove (directory->details->dequeue_pending_idle_id);
}
g_free (directory->details->uri);
......
......@@ -764,14 +764,14 @@ nautilus_drag_autoscroll_start (NautilusDragInfo *drag_info,
drag_info->start_auto_scroll_in = eel_get_system_time()
+ AUTOSCROLL_INITIAL_DELAY;
drag_info->auto_scroll_timeout_id = gtk_timeout_add
drag_info->auto_scroll_timeout_id = g_timeout_add
(AUTOSCROLL_TIMEOUT_INTERVAL,
callback,
user_data);
}
} else {
if (drag_info->auto_scroll_timeout_id != 0) {
gtk_timeout_remove (drag_info->auto_scroll_timeout_id);
g_source_remove (drag_info->auto_scroll_timeout_id);
drag_info->auto_scroll_timeout_id = 0;
}
}
......@@ -781,7 +781,7 @@ void
nautilus_drag_autoscroll_stop (NautilusDragInfo *drag_info)
{
if (drag_info->auto_scroll_timeout_id != 0) {
gtk_timeout_remove (drag_info->auto_scroll_timeout_id);
g_source_remove (drag_info->auto_scroll_timeout_id);
drag_info->auto_scroll_timeout_id = 0;
}
}
......
......@@ -145,7 +145,7 @@ remove_focus_timeout (GtkWindow *window)
details = get_details (window);
if (details != NULL && details->focus_timeout_tag != 0) {
gtk_timeout_remove (details->focus_timeout_tag);
g_source_remove (details->focus_timeout_tag);
details->focus_timeout_tag = 0;
}
}
......@@ -160,8 +160,8 @@ set_focus_timeout (GtkWindow *window)
if (details != NULL) {
remove_focus_timeout (window);
details->focus_timeout_tag
= gtk_timeout_add (WINDOW_FOCUS_TIMEOUT,
focus_timeout_callback, window);
= g_timeout_add (WINDOW_FOCUS_TIMEOUT,
focus_timeout_callback, window);
}
}
......
......@@ -95,7 +95,7 @@ nautilus_entry_finalize (GObject *object)
entry = NAUTILUS_ENTRY (object);
if (entry->details->select_idle_id != 0) {
gtk_idle_remove (entry->details->select_idle_id);
g_source_remove (entry->details->select_idle_id);
}
g_free (entry->details);
......@@ -236,7 +236,7 @@ nautilus_entry_select_all_at_idle (NautilusEntry *entry)
*/
if (entry->details->select_idle_id == 0) {
entry->details->select_idle_id = gtk_idle_add (select_all_at_idle, entry);
entry->details->select_idle_id = g_idle_add (select_all_at_idle, entry);
}
}
......
......@@ -532,7 +532,7 @@ nautilus_file_operations_progress_done (NautilusFileOperationsProgress *progress
/* No cancel button once the operation is done. */
gtk_dialog_set_response_sensitive (GTK_DIALOG (progress), GTK_RESPONSE_CANCEL, FALSE);
progress->details->delayed_close_timeout_id = gtk_timeout_add
progress->details->delayed_close_timeout_id = g_timeout_add
(MINIMUM_TIME_UP - time_up,
delayed_close_callback,
progress);
......
......@@ -1106,11 +1106,10 @@ draw_pixbuf (GdkPixbuf *pixbuf, GdkDrawable *drawable, int x, int y)
/* FIXME bugzilla.gnome.org 40703:
* Dither would be better if we passed dither values.
*/
gdk_pixbuf_render_to_drawable_alpha (pixbuf, drawable, 0, 0, x, y,
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf),
GDK_PIXBUF_ALPHA_BILEVEL, 128, GDK_RGB_DITHER_NORMAL,
0, 0);
gdk_draw_pixbuf (drawable, NULL, pixbuf, 0, 0, x, y,
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf),
GDK_RGB_DITHER_NORMAL, 0, 0);
}
/* shared code to highlight or dim the passed-in pixbuf */
......
......@@ -611,7 +611,7 @@ unschedule_keyboard_icon_reveal (NautilusIconContainer *container)
details = container->details;
if (details->keyboard_icon_reveal_timer_id != 0) {
gtk_timeout_remove (details->keyboard_icon_reveal_timer_id);
g_source_remove (details->keyboard_icon_reveal_timer_id);
}
}
......@@ -627,9 +627,9 @@ schedule_keyboard_icon_reveal (NautilusIconContainer *container,
details->keyboard_icon_to_reveal = icon;
details->keyboard_icon_reveal_timer_id
= gtk_timeout_add (KEYBOARD_ICON_REVEAL_TIMEOUT,
keyboard_icon_reveal_timeout_callback,
container);
= g_timeout_add (KEYBOARD_ICON_REVEAL_TIMEOUT,
keyboard_icon_reveal_timeout_callback,
container);
}
static void
......@@ -1309,7 +1309,7 @@ static void
unschedule_redo_layout (NautilusIconContainer *container)
{
if (container->details->idle_id != 0) {
gtk_idle_remove (container->details->idle_id);
g_source_remove (container->details->idle_id);
container->details->idle_id = 0;
}
}
......@@ -1319,7 +1319,7 @@ schedule_redo_layout (NautilusIconContainer *container)
{
if (container->details->idle_id == 0
&& container->details->has_been_allocated) {
container->details->idle_id = gtk_idle_add
container->details->idle_id = g_idle_add
(redo_layout_callback, container);
}
}
......@@ -1716,7 +1716,7 @@ start_rubberbanding (NautilusIconContainer *container,
band_info->active = TRUE;
if (band_info->timer_id == 0) {
band_info->timer_id = gtk_timeout_add
band_info->timer_id = g_timeout_add
(RUBBERBAND_TIMEOUT_INTERVAL,
rubberband_timeout_callback,
container);
......@@ -1737,7 +1737,7 @@ stop_rubberbanding (NautilusIconContainer *container,
band_info = &container->details->rubberband_info;
g_assert (band_info->timer_id != 0);
gtk_timeout_remove (band_info->timer_id);
g_source_remove (band_info->timer_id);
band_info->timer_id = 0;
band_info->active = FALSE;
......@@ -2395,17 +2395,17 @@ destroy (GtkObject *object)
nautilus_icon_container_clear (container);
if (container->details->rubberband_info.timer_id != 0) {
gtk_timeout_remove (container->details->rubberband_info.timer_id);
g_source_remove (container->details->rubberband_info.timer_id);
container->details->rubberband_info.timer_id = 0;
}
if (container->details->idle_id != 0) {
gtk_idle_remove (container->details->idle_id);
g_source_remove (container->details->idle_id);
container->details->idle_id = 0;
}
if (container->details->stretch_idle_id != 0) {
gtk_idle_remove (container->details->stretch_idle_id);
g_source_remove (container->details->stretch_idle_id);
container->details->stretch_idle_id = 0;
}
......@@ -2697,7 +2697,7 @@ static void
remove_context_menu_timeout (NautilusIconContainer *container)
{
if (container->details->context_menu_timeout_id != 0) {
gtk_timeout_remove (container->details->context_menu_timeout_id);
g_source_remove (container->details->context_menu_timeout_id);
container->details->context_menu_timeout_id = 0;
}
}
......@@ -2804,7 +2804,7 @@ continue_stretching (NautilusIconContainer *container,
container->details->world_y = world_y;
if (container->details->stretch_idle_id == 0) {
container->details->stretch_idle_id = gtk_idle_add ((GtkFunction) update_stretch_at_idle, container);
container->details->stretch_idle_id = g_idle_add ((GtkFunction) update_stretch_at_idle, container);
}
}
......
......@@ -1851,7 +1851,7 @@ directory_request_write_metafile (NautilusMetafile *metafile)
if (metafile->details->write_idle_id == 0) {
bonobo_object_ref (metafile);
metafile->details->write_idle_id =
gtk_idle_add (metafile_write_idle_callback, metafile);
g_idle_add (metafile_write_idle_callback, metafile);
}
}
......
......@@ -126,7 +126,7 @@ static void
remove_scroll_timeout (NautilusTreeViewDragDest *dest)
{
if (dest->details->scroll_id) {
gtk_timeout_remove (dest->details->scroll_id);
g_source_remove (dest->details->scroll_id);
dest->details->scroll_id = 0;
}
}
......@@ -388,9 +388,9 @@ drag_motion_callback (GtkWidget *widget,
if (dest->details->scroll_id == 0) {
dest->details->scroll_id =
gtk_timeout_add (150,
scroll_timeout,
dest->details->tree_view);
g_timeout_add (150,
scroll_timeout,
dest->details->tree_view);
}
gdk_drag_status (context, action, time);
......
......@@ -367,7 +367,7 @@ nautilus_volume_monitor_finalize (GObject *object)
monitor = NAUTILUS_VOLUME_MONITOR (object);
/* Remove timer function */
gtk_timeout_remove (monitor->details->mount_volume_timer_id);
g_source_remove (monitor->details->mount_volume_timer_id);
/* Clean up mount info */
free_mount_list (monitor->details->mounts);
......@@ -1316,9 +1316,9 @@ find_volumes (NautilusVolumeMonitor *monitor)
/* Add a timer function to check for status change in mounted volumes periodically */
monitor->details->mount_volume_timer_id =
gtk_timeout_add (CHECK_STATUS_INTERVAL,
(GtkFunction) mount_volumes_check_status,
monitor);
g_timeout_add (CHECK_STATUS_INTERVAL,
(GtkFunction) mount_volumes_check_status,
monitor);
}
void
......@@ -1558,7 +1558,7 @@ close_error_pipe (gboolean mount, const char *mount_path)
info->detailed_message = g_strdup (detailed_msg);
info->mount_point = g_strdup (mount_path);
info->mount = mount;
gtk_idle_add (display_mount_error, info);
g_idle_add (display_mount_error, info);
}
......
......@@ -109,7 +109,7 @@ nautilus_idle_queue_add (NautilusIdleQueue *queue,
queue->functions = g_list_prepend (queue->functions, function);
if (queue->idle_id == 0) {
queue->idle_id = gtk_idle_add (execute_queued_functions, queue);
queue->idle_id = g_idle_add (execute_queued_functions, queue);
}
}
......@@ -137,7 +137,7 @@ nautilus_idle_queue_destroy (NautilusIdleQueue *queue)
g_list_free (queue->functions);
if (queue->idle_id != 0) {
gtk_idle_remove (queue->idle_id);
g_source_remove (queue->idle_id);
}
g_free (queue);
......
......@@ -263,7 +263,7 @@ fm_desktop_icon_view_finalize (GObject *object)
/* Remove desktop rescan timeout. */
if (icon_view->details->reload_desktop_timeout != 0) {
gtk_timeout_remove (icon_view->details->reload_desktop_timeout);
g_source_remove (icon_view->details->reload_desktop_timeout);
}
/* Delete all of the link files. */
......@@ -618,7 +618,7 @@ delayed_init (FMDesktopIconView *desktop_icon_view)
/* Monitor desktop directory. */
desktop_icon_view->details->reload_desktop_timeout =
gtk_timeout_add (RESCAN_TIMEOUT, do_desktop_rescan, desktop_icon_view);
g_timeout_add (RESCAN_TIMEOUT, do_desktop_rescan, desktop_icon_view);
g_signal_handler_disconnect (desktop_icon_view,
desktop_icon_view->details->delayed_init_signal);
......
......@@ -1410,7 +1410,7 @@ fm_directory_view_finalize (GObject *object)
nautilus_file_unref (view->details->directory_as_file);
if (view->details->display_selection_idle_id != 0) {
gtk_idle_remove (view->details->display_selection_idle_id);
g_source_remove (view->details->display_selection_idle_id);
}
remove_update_menus_timeout_callback (view);
......@@ -2246,7 +2246,7 @@ static void
remove_update_menus_timeout_callback (FMDirectoryView *view)
{
if (view->details->update_menus_timeout_id != 0) {
gtk_timeout_remove (view->details->update_menus_timeout_id);
g_source_remove (view->details->update_menus_timeout_id);
view->details->update_menus_timeout_id = 0;
}
}
......@@ -2334,7 +2334,7 @@ schedule_idle_display_of_pending_files (FMDirectoryView *view)
unschedule_timeout_display_of_pending_files (view);
view->details->display_pending_idle_id =
gtk_idle_add_priority (G_PRIORITY_LOW, display_pending_idle_callback, view);
g_idle_add_full (G_PRIORITY_LOW, display_pending_idle_callback, view, NULL);
}
static void
......@@ -2351,8 +2351,8 @@ schedule_timeout_display_of_pending_files (FMDirectoryView *view)
}
view->details->display_pending_timeout_id =
gtk_timeout_add (DISPLAY_TIMEOUT_INTERVAL_MSECS,
display_pending_timeout_callback, view);
g_timeout_add (DISPLAY_TIMEOUT_INTERVAL_MSECS,
display_pending_timeout_callback, view);
}
static void
......@@ -2361,7 +2361,7 @@ unschedule_idle_display_of_pending_files (FMDirectoryView *view)
/* Get rid of idle if it's active. */
if (view->details->display_pending_idle_id != 0) {
g_assert (view->details->display_pending_timeout_id == 0);
gtk_idle_remove (view->details->display_pending_idle_id);
g_source_remove (view->details->display_pending_idle_id);
view->details->display_pending_idle_id = 0;
}
}
......@@ -2372,7 +2372,7 @@ unschedule_timeout_display_of_pending_files (FMDirectoryView *view)
/* Get rid of timeout if it's active. */
if (view->details->display_pending_timeout_id != 0) {
g_assert (view->details->display_pending_idle_id == 0);
gtk_timeout_remove (view->details->display_pending_timeout_id);
g_source_remove (view->details->display_pending_timeout_id);
view->details->display_pending_timeout_id = 0;
}
}
......@@ -4893,7 +4893,7 @@ schedule_update_menus (FMDirectoryView *view)
if (view->details->menus_merged
&& view->details->update_menus_timeout_id == 0) {
view->details->update_menus_timeout_id
= gtk_timeout_add (300, update_menus_timeout_callback, view);
= g_timeout_add (300, update_menus_timeout_callback, view);
}
}
......@@ -4917,8 +4917,8 @@ fm_directory_view_notify_selection_changed (FMDirectoryView *view)
/* Schedule a display of the new selection. */
if (view->details->display_selection_idle_id == 0) {
view->details->display_selection_idle_id
= gtk_idle_add (display_selection_info_idle_callback,
view);
= g_idle_add (display_selection_info_idle_callback,
view);
}
if (view->details->batching_selection_level != 0) {
......
......@@ -226,7 +226,7 @@ fm_icon_view_finalize (GObject *object)
}
if (icon_view->details->react_to_icon_change_idle_id != 0) {
gtk_idle_remove (icon_view->details->react_to_icon_change_idle_id);
g_source_remove (icon_view->details->react_to_icon_change_idle_id);
}
/* kill any sound preview process that is ongoing */
......@@ -1704,17 +1704,17 @@ preview_audio (FMIconView *icon_view, NautilusFile *file, gboolean start_flag)
}
#endif
if (icon_view->details->audio_preview_timeout != 0) {
gtk_timeout_remove (icon_view->details->audio_preview_timeout);
g_source_remove (icon_view->details->audio_preview_timeout);
icon_view->details->audio_preview_timeout = 0;
}
if (start_flag) {
icon_view->details->audio_preview_file = file;
#if USE_OLD_AUDIO_PREVIEW
icon_view->details->audio_preview_timeout = gtk_timeout_add (1000, play_file, icon_view);
icon_view->details->audio_preview_timeout = g_timeout_add (1000, play_file, icon_view);
#else
/* FIXME: Need to kill the existing timeout if there is one? */
icon_view->details->audio_preview_timeout = gtk_timeout_add (1000, play_file, icon_view);
icon_view->details->audio_preview_timeout = g_timeout_add (1000, play_file, icon_view);
#endif
}
}
......@@ -1925,8 +1925,8 @@ icon_position_changed_callback (NautilusIconContainer *container,
*/
if (icon_view->details->react_to_icon_change_idle_id == 0) {
icon_view->details->react_to_icon_change_idle_id
= gtk_idle_add (fm_icon_view_react_to_icon_change_idle_callback,
icon_view);
= g_idle_add (fm_icon_view_react_to_icon_change_idle_callback,
icon_view);
}
/* Store the new position of the icon in the metadata. */
......
......@@ -1281,9 +1281,9 @@ schedule_directory_contents_update (FMPropertiesWindow *window)
if (window->details->update_directory_contents_timeout_id == 0) {
window->details->update_directory_contents_timeout_id
= gtk_timeout_add (DIRECTORY_CONTENTS_UPDATE_INTERVAL,
update_directory_contents_callback,
window);
= g_timeout_add (DIRECTORY_CONTENTS_UPDATE_INTERVAL,
update_directory_contents_callback,
window);
}
}
......@@ -2663,7 +2663,7 @@ real_destroy (GtkObject *object)
window->details->special_flags_widgets = NULL;
if (window->details->update_directory_contents_timeout_id != 0) {
gtk_timeout_remove (window->details->update_directory_contents_timeout_id);
g_source_remove (window->details->update_directory_contents_timeout_id);
window->details->update_directory_contents_timeout_id = 0;
}
......
......@@ -712,7 +712,7 @@ on_window_hide_event (GtkWidget *widget,
nautilus_undo_unregister (G_OBJECT (uri_field));
/* restore_geometry only works after window is hidden */
gtk_idle_add (restore_geometry, widget);
g_idle_add (restore_geometry, widget);
}
static void
......@@ -720,7 +720,7 @@ on_window_destroy_event (GtkWidget *widget,
gpointer user_data)
{
g_message ("destroying bookmarks window");
gtk_idle_remove_by_data (widget);
g_source_remove_by_user_data (widget);
}
static void
......
......@@ -603,7 +603,7 @@ editable_event_after_callback (GtkEntry *entry,
if (position_and_selection_are_at_end (editable)) {
if (entry_would_have_inserted_characters (keyevent)) {
if (bar->details->idle_id == 0) {
bar->details->idle_id = gtk_idle_add (try_to_expand_path, bar);
bar->details->idle_id = g_idle_add (try_to_expand_path, bar);
}
}
} else {
......@@ -611,7 +611,7 @@ editable_event_after_callback (GtkEntry *entry,
* to change the position or selection.
*/
if (bar->details->idle_id != 0) {
gtk_idle_remove (bar->details->idle_id);
g_source_remove (bar->details->idle_id);
bar->details->idle_id = 0;
}
}
......@@ -654,7 +654,7 @@ destroy (GtkObject *object)
/* cancel the pending idle call, if any */
if (bar->details->idle_id != 0) {
gtk_idle_remove (bar->details->idle_id);
g_source_remove (bar->details->idle_id);
bar->details->idle_id = 0;
}
......
......@@ -92,7 +92,7 @@ eel_gtk_main_quit_all (void)
* This idler will be run by the current event loop, killing it, and then
* by the next event loop, ...
*/
gtk_idle_add (quit_if_in_main_loop, NULL);
g_idle_add (quit_if_in_main_loop, NULL);
}
static void
......
......@@ -1281,7 +1281,7 @@ void
nautilus_window_remove_bookmarks_menu_callback (NautilusWindow *window)
{
if (window->details->refresh_bookmarks_menu_idle_id != 0) {
gtk_idle_remove (window->details->refresh_bookmarks_menu_idle_id);
g_source_remove (window->details->refresh_bookmarks_menu_idle_id);
window->details->refresh_bookmarks_menu_idle_id = 0;
}
}
......@@ -1290,7 +1290,7 @@ void
nautilus_window_remove_go_menu_callback (NautilusWindow *window)
{
if (window->details->refresh_go_menu_idle_id != 0) {
gtk_idle_remove (window->details->refresh_go_menu_idle_id);
g_source_remove (window->details->refresh_go_menu_idle_id);
window->details->refresh_go_menu_idle_id = 0;
}
}
......@@ -1362,8 +1362,8 @@ schedule_refresh_bookmarks_menu (NautilusWindow *window)
if (window->details->refresh_bookmarks_menu_idle_id == 0) {
window->details->refresh_bookmarks_menu_idle_id
= gtk_idle_add (refresh_bookmarks_menu_idle_callback,
window);
= g_idle_add (refresh_bookmarks_menu_idle_callback,
window);
}
}
......@@ -1421,7 +1421,7 @@ schedule_refresh_go_menu (NautilusWindow *window)
if (window->details->refresh_go_menu_idle_id == 0) {
window->details->refresh_go_menu_idle_id
= gtk_idle_add (refresh_go_menu_idle_callback,
window);
= g_idle_add (refresh_go_menu_idle_callback,
window);
}
}
......@@ -931,7 +931,7 @@ nautilus_window_finalize (GObject *object)
nautilus_window_remove_go_menu_callback (window);
if (window->details->ui_idle_id != 0) {
gtk_idle_remove (window->details->ui_idle_id);
g_source_remove (window->details->ui_idle_id);
}
if (window->details->shell_ui != NULL) {
......@@ -965,7 +965,7 @@ nautilus_window_finalize (GObject *object)
bonobo_object_unref (window->details->ui_container);
if (window->details->location_change_at_idle_id != 0) {
gtk_idle_remove (window->details->location_change_at_idle_id);
g_source_remove (window->details->location_change_at_idle_id);
}
g_free (window->details->title);
......
......@@ -931,7 +931,7 @@ nautilus_window_finalize (GObject *object)
nautilus_window_remove_go_menu_callback (window);
if (window->details->ui_idle_id != 0) {
gtk_idle_remove (window->details->ui_idle_id);
g_source_remove (window->details->ui_idle_id);
}
if (window->details->shell_ui != NULL) {
......@@ -965,7 +965,7 @@ nautilus_window_finalize (GObject *object)
bonobo_object_unref (window->details->ui_container);
if (window->details->location_change_at_idle_id != 0) {
gtk_idle_remove (window->details->location_change_at_idle_id);
g_source_remove (window->details->location_change_at_idle_id);
}
g_free (window->details->title);
......
......@@ -931,7 +931,7 @@ nautilus_window_finalize (GObject *object)
nautilus_window_remove_go_menu_callback (window);
if (window->details->ui_idle_id != 0) {
gtk_idle_remove (window->details->ui_idle_id);
g_source_remove (window->details->ui_idle_id);
}
if (window->details->shell_ui != NULL) {
......@@ -965,7 +965,7 @@ nautilus_window_finalize (GObject *object)
bonobo_object_unref (window->details->ui_container);
if (window->details->location_change_at_idle_id != 0) {
gtk_idle_remove (window->details->location_change_at_idle_id);
g_source_remove (window->details->location_change_at_idle_id);
}
g_free (window->details->title);
......