[gedit/zbrown/deteplification-src: 17/633] Document: remove the :read-only property (deprecated)




commit 53f321e0e7b4a2aa3548e4584a1cb7c619e32505
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Nov 13 15:30:45 2019 +0100

    Document: remove the :read-only property (deprecated)

 gedit/gedit-document.c | 33 ---------------------------------
 1 file changed, 33 deletions(-)
---
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index 5eeb2602e..3032099ab 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -91,7 +91,6 @@ enum
        PROP_SHORTNAME,
        PROP_CONTENT_TYPE,
        PROP_MIME_TYPE,
-       PROP_READ_ONLY,
        PROP_EMPTY_SEARCH,
        PROP_USE_GVFS_METADATA,
        LAST_PROP
@@ -264,10 +263,6 @@ gedit_document_get_property (GObject    *object,
                        g_value_take_string (value, gedit_document_get_mime_type (doc));
                        break;
 
-               case PROP_READ_ONLY:
-                       g_value_set_boolean (value, gtk_source_file_is_readonly (priv->file));
-                       break;
-
                case PROP_EMPTY_SEARCH:
                        g_value_set_boolean (value, priv->empty_search);
                        break;
@@ -449,20 +444,6 @@ gedit_document_class_init (GeditDocumentClass *klass)
                                     "text/plain",
                                     G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
 
-       /**
-        * GeditDocument:read-only:
-        *
-        * Whether the document is read-only or not.
-        *
-        * Deprecated: 3.18: Use the #GtkSourceFile API.
-        */
-       properties[PROP_READ_ONLY] =
-               g_param_spec_boolean ("read-only",
-                                     "Read Only",
-                                     "Whether the document is read-only or not",
-                                     FALSE,
-                                     G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED);
-
        /**
         * GeditDocument:empty-search:
         *
@@ -818,14 +799,6 @@ on_location_changed (GtkSourceFile *file,
        }
 }
 
-static void
-on_readonly_changed (GtkSourceFile *file,
-                    GParamSpec    *pspec,
-                    GeditDocument *doc)
-{
-       g_object_notify_by_pspec (G_OBJECT (doc), properties[PROP_READ_ONLY]);
-}
-
 static void
 gedit_document_init (GeditDocument *doc)
 {
@@ -853,12 +826,6 @@ gedit_document_init (GeditDocument *doc)
                                 doc,
                                 0);
 
-       g_signal_connect_object (priv->file,
-                                "notify::read-only",
-                                G_CALLBACK (on_readonly_changed),
-                                doc,
-                                0);
-
        g_settings_bind (priv->editor_settings,
                         GEDIT_SETTINGS_MAX_UNDO_ACTIONS,
                         doc,


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