app: Use gint64 for dirty_time

This commit is contained in:
Mukund Sivaraman 2014-08-25 13:34:17 +05:30
parent 0dd0f8ef2a
commit a805f8426a
4 changed files with 8 additions and 8 deletions

View File

@ -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 */

View File

@ -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);

View File

@ -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 */

View File

@ -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);