[gnome-builder/search] document: avoid extra set to read only
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/search] document: avoid extra set to read only
- Date: Mon, 15 Dec 2014 09:52:54 +0000 (UTC)
commit 93b0e8449673bb8400f37c9cbb22b484afad56f3
Author: Christian Hergert <christian hergert me>
Date: Mon Dec 15 01:40:18 2014 -0800
document: avoid extra set to read only
src/editor/gb-editor-document.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/editor/gb-editor-document.c b/src/editor/gb-editor-document.c
index 198131f..7e9ede5 100644
--- a/src/editor/gb-editor-document.c
+++ b/src/editor/gb-editor-document.c
@@ -199,11 +199,11 @@ gb_editor_document_check_modified_cb (GObject *object,
read_only = !g_file_info_get_attribute_boolean (info,
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE);
- gb_editor_document_set_read_only (document, read_only);
+ if (gb_editor_document_get_read_only (GB_DOCUMENT (document)) != read_only)
+ gb_editor_document_set_read_only (document, read_only);
}
- if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_MODIFIED) &&
- document->priv->mtime_set)
+ if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_MODIFIED) && document->priv->mtime_set)
{
GTimeVal tv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]