[gimp] app: if --verbose, make GimpDataFactory print each loaded and saved data
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: if --verbose, make GimpDataFactory print each loaded and saved data
- Date: Sun, 10 Jun 2018 13:57:12 +0000 (UTC)
commit 50911fedfe1b99e382392d65dd94df168d258ed5
Author: Michael Natterer <mitch gimp org>
Date: Sun Jun 10 15:52:06 2018 +0200
app: if --verbose, make GimpDataFactory print each loaded and saved data
(cherry picked from commit bd30f28b090ed069d801043b1c4e6cadfa8b3300)
app/core/gimpdatafactory.c | 18 ++++++++++++++++++
app/core/gimpdataloaderfactory.c | 3 +++
2 files changed, 21 insertions(+)
---
diff --git a/app/core/gimpdatafactory.c b/app/core/gimpdatafactory.c
index 4df5b9dd2f..e969a57ee1 100644
--- a/app/core/gimpdatafactory.c
+++ b/app/core/gimpdatafactory.c
@@ -364,6 +364,15 @@ gimp_data_factory_real_data_save (GimpDataFactory *factory)
if (! gimp_data_get_file (data))
gimp_data_create_filename (data, writable_dir);
+ if (factory->priv->gimp->be_verbose)
+ {
+ GFile *file = gimp_data_get_file (data);
+
+ if (file)
+ g_print ("Writing dirty data '%s'\n",
+ gimp_file_get_utf8_name (file));
+ }
+
if (! gimp_data_save (data, &error))
{
/* check if there actually was an error (no error
@@ -702,6 +711,15 @@ gimp_data_factory_data_save_single (GimpDataFactory *factory,
if (! gimp_data_is_writable (data))
return FALSE;
+ if (factory->priv->gimp->be_verbose)
+ {
+ GFile *file = gimp_data_get_file (data);
+
+ if (file)
+ g_print ("Writing dirty data '%s'\n",
+ gimp_file_get_utf8_name (file));
+ }
+
if (! gimp_data_save (data, error))
{
/* check if there actually was an error (no error
diff --git a/app/core/gimpdataloaderfactory.c b/app/core/gimpdataloaderfactory.c
index 6d2ac8ab81..409f91e0a3 100644
--- a/app/core/gimpdataloaderfactory.c
+++ b/app/core/gimpdataloaderfactory.c
@@ -425,6 +425,9 @@ gimp_data_loader_factory_load_data (GimpDataFactory *factory,
container = gimp_data_factory_get_container (factory);
container_obsolete = gimp_data_factory_get_container_obsolete (factory);
+ if (gimp_data_factory_get_gimp (factory)->be_verbose)
+ g_print (" Loading %s\n", gimp_file_get_utf8_name (file));
+
mtime = g_file_info_get_attribute_uint64 (info,
G_FILE_ATTRIBUTE_TIME_MODIFIED);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]