diff options
author | Nelson Benitez <nbenitezl@gmail.com> | 2009-04-21 15:37:34 +0200 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2009-04-21 15:37:34 +0200 |
commit | 60e58366e06f42b03072e06a19f8adeece0ded6a (patch) | |
tree | 353c1d2c617b91a2a97c5b04d464aa84f0381af3 /src | |
parent | 99e66a93605e056c80cebb4c3ac9b6b58167ad1c (diff) | |
download | nautilus-60e58366e06f42b03072e06a19f8adeece0ded6a.tar.gz |
Use g_timeout_add_seconds where appropriate
Use g_timeout_add_seconds instead of g_timeout_add where appropriate.
Fix bug #574033.
Signed-off-by: Cosimo Cecchi <cosimoc@gnome.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/file-manager/fm-desktop-icon-view.c | 4 | ||||
-rw-r--r-- | src/file-manager/fm-icon-view.c | 2 | ||||
-rw-r--r-- | src/file-manager/fm-list-view.c | 4 | ||||
-rw-r--r-- | src/nautilus-notes-viewer.c | 4 | ||||
-rw-r--r-- | src/nautilus-spatial-window.c | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c index 6c43a075c..080459891 100644 --- a/src/file-manager/fm-desktop-icon-view.c +++ b/src/file-manager/fm-desktop-icon-view.c @@ -65,7 +65,7 @@ #include <unistd.h> /* Timeout to check the desktop directory for updates */ -#define RESCAN_TIMEOUT 4000 +#define RESCAN_TIMEOUT 4 struct FMDesktopIconViewDetails { @@ -480,7 +480,7 @@ delayed_init (FMDesktopIconView *desktop_icon_view) /* Monitor desktop directory. */ desktop_icon_view->details->reload_desktop_timeout = - g_timeout_add (RESCAN_TIMEOUT, do_desktop_rescan, desktop_icon_view); + g_timeout_add_seconds (RESCAN_TIMEOUT, do_desktop_rescan, desktop_icon_view); g_signal_handler_disconnect (desktop_icon_view, desktop_icon_view->details->delayed_init_signal); diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c index 55e90d5b3..2fa23360d 100644 --- a/src/file-manager/fm-icon-view.c +++ b/src/file-manager/fm-icon-view.c @@ -1991,7 +1991,7 @@ preview_audio (FMIconView *icon_view, NautilusFile *file, gboolean start_flag) if (start_flag) { icon_view->details->audio_preview_file = file; - icon_view->details->audio_preview_timeout = g_timeout_add (1000, play_file, icon_view); + icon_view->details->audio_preview_timeout = g_timeout_add_seconds (1, play_file, icon_view); } } diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c index ca378605a..86f6ebdcb 100644 --- a/src/file-manager/fm-list-view.c +++ b/src/file-manager/fm-list-view.c @@ -120,7 +120,7 @@ struct SelectionForeachData { #define LIST_VIEW_MINIMUM_ROW_HEIGHT 28 /* We wait two seconds after row is collapsed to unload the subdirectory */ -#define COLLAPSE_TO_UNLOAD_DELAY 2000 +#define COLLAPSE_TO_UNLOAD_DELAY 2 /* Wait for the rename to end when activating a file being renamed */ #define WAIT_FOR_RENAME_ON_ACTIVATE 200 @@ -890,7 +890,7 @@ row_collapsed_callback (GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *p eel_add_weak_pointer (&unload_data->view); - g_timeout_add (COLLAPSE_TO_UNLOAD_DELAY, + g_timeout_add_seconds (COLLAPSE_TO_UNLOAD_DELAY, unload_file_timeout, unload_data); } diff --git a/src/nautilus-notes-viewer.c b/src/nautilus-notes-viewer.c index 6bdecd81a..894dc2d71 100644 --- a/src/nautilus-notes-viewer.c +++ b/src/nautilus-notes-viewer.c @@ -46,7 +46,7 @@ #include <libnautilus-private/nautilus-window-slot-info.h> #include <libnautilus-extension/nautilus-property-page-provider.h> -#define SAVE_TIMEOUT (3 * 1000) +#define SAVE_TIMEOUT 3 static void load_note_text_from_metadata (NautilusFile *file, NautilusNotesViewer *notes); @@ -124,7 +124,7 @@ schedule_save (NautilusNotesViewer *notes) { cancel_pending_save (notes); - notes->details->save_timeout_id = g_timeout_add (SAVE_TIMEOUT, schedule_save_callback, notes); + notes->details->save_timeout_id = g_timeout_add_seconds (SAVE_TIMEOUT, schedule_save_callback, notes); } /* notifies event listeners if the notes data actually changed */ diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c index 176db5d77..692a0ad21 100644 --- a/src/nautilus-spatial-window.c +++ b/src/nautilus-spatial-window.c @@ -154,7 +154,7 @@ nautilus_spatial_window_configure_event (GtkWidget *widget, window->details->last_geometry = geometry_string; window->details->save_geometry_timeout_id = - g_timeout_add (1000, save_window_geometry_timeout, window); + g_timeout_add_seconds (1, save_window_geometry_timeout, window); } return FALSE; |