[nautilus] all: don't use eel_get_system_time()



commit 13982305a26865d0f13196044223138324aa8823
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Apr 11 10:50:02 2012 -0400

    all: don't use eel_get_system_time()
    
    Use g_get_monotonic_time() instead.

 eel/eel-stock-dialogs.c                       |    4 ++--
 libnautilus-private/nautilus-dnd.c            |    2 +-
 libnautilus-private/nautilus-icon-container.c |    4 ++--
 libnautilus-private/nautilus-icon-dnd.c       |    2 +-
 src/nautilus-list-view.c                      |    2 +-
 src/nautilus-view.c                           |    4 ++--
 6 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/eel/eel-stock-dialogs.c b/eel/eel-stock-dialogs.c
index bc5bb29..7d9ffca 100644
--- a/eel/eel-stock-dialogs.c
+++ b/eel/eel-stock-dialogs.c
@@ -133,7 +133,7 @@ timed_wait_free (TimedWait *wait)
 						      wait);
 
 		/* compute time up in milliseconds */
-		time_up = (eel_get_system_time () - wait->dialog_creation_time) / 1000;
+		time_up = (g_get_monotonic_time () - wait->dialog_creation_time) / 1000;
 		
 		if (time_up < TIMED_WAIT_MIN_TIME_UP) {
 			delayed_close_handler_id = g_timeout_add (TIMED_WAIT_MIN_TIME_UP - time_up,
@@ -216,7 +216,7 @@ timed_wait_callback (gpointer callback_data)
 	gtk_window_set_default_size (GTK_WINDOW (dialog),
 				     TIMED_WAIT_MINIMUM_DIALOG_WIDTH,
 				     -1);
-	wait->dialog_creation_time = eel_get_system_time ();
+	wait->dialog_creation_time = g_get_monotonic_time ();
 	gtk_widget_show (GTK_WIDGET (dialog));
 
 	/* FIXME bugzilla.eazel.com 2441: 
diff --git a/libnautilus-private/nautilus-dnd.c b/libnautilus-private/nautilus-dnd.c
index 72cde45..5ed52f0 100644
--- a/libnautilus-private/nautilus-dnd.c
+++ b/libnautilus-private/nautilus-dnd.c
@@ -916,7 +916,7 @@ nautilus_drag_autoscroll_start (NautilusDragInfo *drag_info,
 	if (nautilus_drag_autoscroll_in_scroll_region (widget)) {
 		if (drag_info->auto_scroll_timeout_id == 0) {
 			drag_info->waiting_to_autoscroll = TRUE;
-			drag_info->start_auto_scroll_in = eel_get_system_time() 
+			drag_info->start_auto_scroll_in = g_get_monotonic_time () 
 				+ AUTOSCROLL_INITIAL_DELAY;
 			
 			drag_info->auto_scroll_timeout_id = g_timeout_add
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index fea75b6..7179f5f 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -4349,7 +4349,7 @@ nautilus_icon_container_did_not_drag (NautilusIconContainer *container,
 		g_object_get (G_OBJECT (gtk_widget_get_settings (GTK_WIDGET (container))), 
 			      "gtk-double-click-time", &double_click_time,
 			      NULL);
-		current_time = eel_get_system_time ();
+		current_time = g_get_monotonic_time ();
 		if (current_time - last_click_time < double_click_time * 1000) {
 			click_count++;
 		} else {
@@ -4397,7 +4397,7 @@ clicked_within_double_click_interval (NautilusIconContainer *container)
 	g_object_get (G_OBJECT (gtk_widget_get_settings (GTK_WIDGET (container))), 
 		      "gtk-double-click-time", &double_click_time,
 		      NULL);
-	current_time = eel_get_system_time ();
+	current_time = g_get_monotonic_time ();
 	if (current_time - last_click_time < double_click_time * 1000) {
 		click_count++;
 	} else {
diff --git a/libnautilus-private/nautilus-icon-dnd.c b/libnautilus-private/nautilus-icon-dnd.c
index c1146a9..1f8b101 100644
--- a/libnautilus-private/nautilus-icon-dnd.c
+++ b/libnautilus-private/nautilus-icon-dnd.c
@@ -702,7 +702,7 @@ auto_scroll_timeout_callback (gpointer data)
 	container = NAUTILUS_ICON_CONTAINER (widget);
 
 	if (container->details->dnd_info->drag_info.waiting_to_autoscroll
-	    && container->details->dnd_info->drag_info.start_auto_scroll_in > eel_get_system_time()) {
+	    && container->details->dnd_info->drag_info.start_auto_scroll_in > g_get_monotonic_time ()) {
 		/* not yet */
 		return TRUE;
 	}
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 95faa2e..e913245 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -669,7 +669,7 @@ button_press_callback (GtkWidget *widget, GdkEventButton *event, gpointer callba
 		      NULL);
 
 	/* Determine click count */
-	current_time = eel_get_system_time ();
+	current_time = g_get_monotonic_time ();
 	if (current_time - last_click_time < double_click_time * 1000) {
 		click_count++;
 	} else {
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 7d6a5f8..c17ff99 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -3655,7 +3655,7 @@ changes_timeout_callback (gpointer data)
 
 	g_object_ref (G_OBJECT (view));
 
-	now = eel_get_system_time();
+	now = g_get_monotonic_time ();
 	time_delta = now - view->details->last_queued;
 
 	if (time_delta < UPDATE_INTERVAL_RESET*1000) {
@@ -3680,7 +3680,7 @@ static void
 schedule_changes (NautilusView *view)
 {
 	/* Remember when the change was queued */
-	view->details->last_queued = eel_get_system_time();
+	view->details->last_queued = g_get_monotonic_time ();
 
 	/* No need to schedule if there are already changes pending or during loading */
 	if (view->details->changes_timeout_id != 0 ||



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]