[gimp] app: Use gint64 for dirty_time



commit a805f8426a6bbbe7d380bb572c68486625aa174e
Author: Mukund Sivaraman <muks banu com>
Date:   Mon Aug 25 13:34:17 2014 +0530

    app: Use gint64 for dirty_time

 app/core/gimpimage-private.h         |    2 +-
 app/core/gimpimage.c                 |    2 +-
 app/core/gimpimage.h                 |    2 +-
 app/display/gimpdisplayshell-close.c |   10 +++++-----
 4 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/app/core/gimpimage-private.h b/app/core/gimpimage-private.h
index 4e92095..e7a87ad 100644
--- a/app/core/gimpimage-private.h
+++ b/app/core/gimpimage-private.h
@@ -65,7 +65,7 @@ struct _GimpImagePrivate
   GFile             *untitled_file;         /*  a file saying "Untitled"     */
 
   gint               dirty;                 /*  dirty flag -- # of ops       */
-  guint              dirty_time;            /*  time when image became dirty */
+  gint64             dirty_time;            /*  time when image became dirty */
   gint               export_dirty;          /*  'dirty' but for export       */
 
   gint               undo_freeze_count;     /*  counts the _freeze's         */
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 8bfe168..38e0511 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -3065,7 +3065,7 @@ gimp_image_is_export_dirty (const GimpImage *image)
   return GIMP_IMAGE_GET_PRIVATE (image)->export_dirty != 0;
 }
 
-gint
+gint64
 gimp_image_get_dirty_time (const GimpImage *image)
 {
   g_return_val_if_fail (GIMP_IS_IMAGE (image), 0);
diff --git a/app/core/gimpimage.h b/app/core/gimpimage.h
index 3f60e8a..af58882 100644
--- a/app/core/gimpimage.h
+++ b/app/core/gimpimage.h
@@ -271,7 +271,7 @@ void            gimp_image_clean_all             (GimpImage          *image);
 void            gimp_image_export_clean_all      (GimpImage          *image);
 gint            gimp_image_is_dirty              (const GimpImage    *image);
 gboolean        gimp_image_is_export_dirty       (const GimpImage    *image);
-gint            gimp_image_get_dirty_time        (const GimpImage    *image);
+gint64          gimp_image_get_dirty_time        (const GimpImage    *image);
 
 
 /*  flush this image's displays  */
diff --git a/app/display/gimpdisplayshell-close.c b/app/display/gimpdisplayshell-close.c
index 77d9b6f..554b745 100644
--- a/app/display/gimpdisplayshell-close.c
+++ b/app/display/gimpdisplayshell-close.c
@@ -67,7 +67,7 @@ static void      gimp_display_shell_close_accel_marshal(GClosure         *closur
                                                         const GValue     *param_values,
                                                         gpointer          invocation_hint,
                                                         gpointer          marshal_data);
-static void      gimp_time_since                       (guint             then,
+static void      gimp_time_since                       (gint64            then,
                                                         gint             *hours,
                                                         gint             *minutes);
 
@@ -290,7 +290,7 @@ static gboolean
 gimp_display_shell_close_time_changed (GimpMessageBox *box)
 {
   GimpImage   *image       = g_object_get_data (G_OBJECT (box), "gimp-image");
-  gint         dirty_time  = gimp_image_get_dirty_time (image);
+  gint64       dirty_time  = gimp_image_get_dirty_time (image);
   gchar       *time_text   = NULL;
   gchar       *export_text = NULL;
 
@@ -413,12 +413,12 @@ gimp_display_shell_close_accel_marshal (GClosure     *closure,
 }
 
 static void
-gimp_time_since (guint  then,
+gimp_time_since (gint64 then,
                  gint  *hours,
                  gint  *minutes)
 {
-  guint now  = time (NULL);
-  guint diff = 1 + now - then;
+  gint64 now  = time (NULL);
+  gint64 diff = 1 + now - then;
 
   g_return_if_fail (now >= then);
 


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