[gnome-builder] libide: allow setting the mtime externally
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: allow setting the mtime externally
- Date: Tue, 24 Mar 2015 00:37:20 +0000 (UTC)
commit be4f45298ce90c9f9ddac038bcf877def7c07e5b
Author: Christian Hergert <christian hergert me>
Date: Sun Mar 22 18:48:23 2015 -0700
libide: allow setting the mtime externally
libide/ide-buffer.c | 21 +++++++++++++++++++++
libide/ide-internal.h | 2 ++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-buffer.c b/libide/ide-buffer.c
index b0d98e5..d359be5 100644
--- a/libide/ide-buffer.c
+++ b/libide/ide-buffer.c
@@ -1568,3 +1568,24 @@ ide_buffer_check_for_volume_change (IdeBuffer *self)
ide_buffer__check_for_volume_cb,
g_object_ref (self));
}
+
+void
+_ide_buffer_set_mtime (IdeBuffer *self,
+ const GTimeVal *mtime)
+{
+ IdeBufferPrivate *priv = ide_buffer_get_instance_private (self);
+
+ g_return_if_fail (IDE_IS_BUFFER (self));
+
+ if (mtime == NULL)
+ {
+ priv->mtime_set = FALSE;
+ priv->mtime.tv_sec = 0;
+ priv->mtime.tv_usec = 0;
+ }
+ else
+ {
+ priv->mtime = *mtime;
+ priv->mtime_set = TRUE;
+ }
+}
diff --git a/libide/ide-internal.h b/libide/ide-internal.h
index 404201e..6d91878 100644
--- a/libide/ide-internal.h
+++ b/libide/ide-internal.h
@@ -53,6 +53,8 @@ IdeBackForwardItem *_ide_back_forward_list_find (IdeBackForwardList *s
gboolean _ide_buffer_get_loading (IdeBuffer *self);
void _ide_buffer_set_loading (IdeBuffer *self,
gboolean loading);
+void _ide_buffer_set_mtime (IdeBuffer *self,
+ const GTimeVal *mtime);
void _ide_build_system_set_project_file (IdeBuildSystem *self,
GFile *project_file);
void _ide_diagnostic_add_range (IdeDiagnostic *self,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]