[gimp] Bug 785427 - GIMP crashes after applying any GEGL filter
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 785427 - GIMP crashes after applying any GEGL filter
- Date: Thu, 27 Jul 2017 20:21:47 +0000 (UTC)
commit bb93e3401f0481dba8be80a387f04e7e8a76db07
Author: Michael Natterer <mitch gimp org>
Date: Thu Jul 27 22:20:09 2017 +0200
Bug 785427 - GIMP crashes after applying any GEGL filter
Need to access GimpSettings' "time" property using gint64 variables
now.
app/tools/gimpfiltertool.c | 4 +++-
app/widgets/gimpsettingsbox.c | 16 ++++++++++++----
app/widgets/gimpsettingseditor.c | 10 +++++++---
3 files changed, 22 insertions(+), 8 deletions(-)
---
diff --git a/app/tools/gimpfiltertool.c b/app/tools/gimpfiltertool.c
index 9281326..9669a93 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 ea797e5..08b8433 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 e553d44..8ee14ae 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]