summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/caja-file-management-properties.c14
-rw-r--r--src/file-manager/fm-directory-view.c4
-rw-r--r--src/file-manager/fm-list-view.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c
index 4a895962..764a988c 100644
--- a/src/caja-file-management-properties.c
+++ b/src/caja-file-management-properties.c
@@ -508,27 +508,27 @@ create_date_format_menu (GtkBuilder *builder)
{
GtkComboBoxText *combo_box;
gchar *date_string;
- time_t now_raw;
- struct tm* now;
+ GDateTime *now;
combo_box = GTK_COMBO_BOX_TEXT
(gtk_builder_get_object (builder,
CAJA_FILE_MANAGEMENT_PROPERTIES_DATE_FORMAT_WIDGET));
- now_raw = time (NULL);
- now = localtime (&now_raw);
+ now = g_date_time_new_now_local ();
- date_string = eel_strdup_strftime ("%c", now);
+ date_string = g_date_time_format (now, "%c");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), date_string);
g_free (date_string);
- date_string = eel_strdup_strftime ("%Y-%m-%d %H:%M:%S", now);
+ date_string = g_date_time_format (now, "%Y-%m-%d %H:%M:%S");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), date_string);
g_free (date_string);
- date_string = eel_strdup_strftime (_("today at %-I:%M:%S %p"), now);
+ date_string = g_date_time_format (now, _("today at %-I:%M:%S %p"));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), date_string);
g_free (date_string);
+
+ g_date_time_unref (now);
}
static void
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index dce96c56..41ea3f16 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -3198,7 +3198,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) {
@@ -3223,7 +3223,7 @@ static void
schedule_changes (FMDirectoryView *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 ||
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index d1b9cb89..c5bb473a 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -697,7 +697,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++;