[gedit/wip/loader-saver] GeditDocument: make set_readonly() static



commit ffc06d8cac8f2b9c41929b649227d985531c721f
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Jun 26 19:51:51 2014 +0200

    GeditDocument: make set_readonly() static

 gedit/gedit-document.c |   19 ++++++-------------
 gedit/gedit-document.h |    3 ---
 2 files changed, 6 insertions(+), 16 deletions(-)
---
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index faaec04..f264384 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -1173,16 +1173,9 @@ gedit_document_get_mime_type (GeditDocument *doc)
        return mime_type != NULL ? mime_type : g_strdup ("text/plain");
 }
 
-/**
- * _gedit_document_set_readonly:
- * @doc: a #GeditDocument
- * @readonly: the new setting.
- *
- * Sets whether the document is read-only.
- */
-void
-_gedit_document_set_readonly (GeditDocument *doc,
-                              gboolean       readonly)
+static void
+set_readonly (GeditDocument *doc,
+             gboolean       readonly)
 {
        gedit_debug (DEBUG_DOCUMENT);
 
@@ -1239,7 +1232,7 @@ loaded_query_info_cb (GFile         *location,
                g_object_unref (info);
        }
 
-       _gedit_document_set_readonly (doc, read_only);
+       set_readonly (doc, read_only);
 
        g_get_current_time (&doc->priv->time_of_last_save_or_load);
 
@@ -1313,7 +1306,7 @@ saved_query_info_cb (GFile         *location,
        doc->priv->deleted = FALSE;
        doc->priv->create = FALSE;
 
-       _gedit_document_set_readonly (doc, FALSE);
+       set_readonly (doc, FALSE);
 
        set_encoding (doc,
                      gtk_source_file_get_encoding (doc->priv->file),
@@ -1397,7 +1390,7 @@ check_file_on_disk (GeditDocument *doc)
                        read_only = !g_file_info_get_attribute_boolean (info,
                                                                        G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE);
 
-                       _gedit_document_set_readonly (doc, read_only);
+                       set_readonly (doc, read_only);
                }
 
                if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_MODIFIED))
diff --git a/gedit/gedit-document.h b/gedit/gedit-document.h
index 0b3748e..b74af04 100644
--- a/gedit/gedit-document.h
+++ b/gedit/gedit-document.h
@@ -216,9 +216,6 @@ GtkSourceSearchContext      *gedit_document_get_search_context      (GeditDocument
 
 /* Non exported functions */
 
-void            _gedit_document_set_readonly   (GeditDocument       *doc,
-                                                gboolean             readonly);
-
 glong           _gedit_document_get_seconds_since_last_save_or_load
                                                (GeditDocument       *doc);
 


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