diff --git a/app/tools/gimpfiltertool.c b/app/tools/gimpfiltertool.c index 9281326336..9669a935cd 100644 --- a/app/tools/gimpfiltertool.c +++ b/app/tools/gimpfiltertool.c @@ -894,7 +894,9 @@ gimp_filter_tool_real_set_config (GimpFilterTool *filter_tool, * will be considered to be among the automatically stored recently * used settings */ - g_object_set (filter_tool->config, "time", 0, NULL); + g_object_set (filter_tool->config, + "time", (gint64) 0, + NULL); } static void diff --git a/app/widgets/gimpsettingsbox.c b/app/widgets/gimpsettingsbox.c index ea797e5da6..08b8433e31 100644 --- a/app/widgets/gimpsettingsbox.c +++ b/app/widgets/gimpsettingsbox.c @@ -866,7 +866,7 @@ gimp_settings_box_truncate_list (GimpSettingsBox *box, while (list) { GimpConfig *config = list->data; - guint t; + gint64 t; list = g_list_next (list); @@ -944,7 +944,7 @@ gimp_settings_box_add_current (GimpSettingsBox *box, list; list = g_list_next (list)) { - guint t; + gint64 t; config = list->data; @@ -955,19 +955,27 @@ gimp_settings_box_add_current (GimpSettingsBox *box, if (t > 0 && gimp_config_is_equal_to (config, GIMP_CONFIG (private->config))) { + GDateTime *now = g_date_time_new_now_utc (); + g_object_set (config, - "time", (guint) time (NULL), + "time", g_date_time_to_unix (now), NULL); + g_date_time_unref (now); + break; } } if (! list) { + GDateTime *now = g_date_time_new_now_utc (); + config = gimp_config_duplicate (GIMP_CONFIG (private->config)); + g_object_set (config, - "time", (guint) time (NULL), + "time", g_date_time_to_unix (now), NULL); + g_date_time_unref (now); gimp_container_insert (private->container, GIMP_OBJECT (config), 0); g_object_unref (config); diff --git a/app/widgets/gimpsettingseditor.c b/app/widgets/gimpsettingseditor.c index e553d4453c..8ee14aea6d 100644 --- a/app/widgets/gimpsettingseditor.c +++ b/app/widgets/gimpsettingseditor.c @@ -395,12 +395,16 @@ gimp_settings_editor_name_edited (GtkCellRendererText *cell, if (strlen (name) && strcmp (old_name, name)) { - guint t; + gint64 t; - g_object_get (object, "time", &t, NULL); + g_object_get (object, + "time", &t, + NULL); if (t > 0) - g_object_set (object, "time", 0, NULL); + g_object_set (object, + "time", (gint64) 0, + NULL); /* set name after time so the object is reordered correctly */ gimp_object_take_name (object, name);