[gedit] GeditDocument: remove the :shortname property



commit 49c0c814a42fae28c345bfe1caf0290fbcde4177
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Nov 20 06:24:51 2020 +0100

    GeditDocument: remove the :shortname property
    
    But the gedit_document_get_short_name_for_display() function is still
    there.

 docs/reference/api-breaks.xml |  6 ++++++
 gedit/gedit-document.c        | 20 --------------------
 2 files changed, 6 insertions(+), 20 deletions(-)
---
diff --git a/docs/reference/api-breaks.xml b/docs/reference/api-breaks.xml
index c3cd11265..ff20fa2bd 100644
--- a/docs/reference/api-breaks.xml
+++ b/docs/reference/api-breaks.xml
@@ -55,6 +55,12 @@
           been removed from the public API.
         </para>
       </listitem>
+      <listitem>
+        <para>
+          The <code>GeditDocument:shortname</code> property has been removed.
+          You can use the <link linkend="TeplFile">TeplFile</link> API instead.
+        </para>
+      </listitem>
     </itemizedlist>
   </refsect1>
 
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index 36cfe09dd..faf71f76b 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -71,7 +71,6 @@ typedef struct
 enum
 {
        PROP_0,
-       PROP_SHORTNAME,
        PROP_CONTENT_TYPE,
        PROP_MIME_TYPE,
        PROP_EMPTY_SEARCH,
@@ -240,10 +239,6 @@ gedit_document_get_property (GObject    *object,
 
        switch (prop_id)
        {
-               case PROP_SHORTNAME:
-                       g_value_take_string (value, gedit_document_get_short_name_for_display (doc));
-                       break;
-
                case PROP_CONTENT_TYPE:
                        g_value_take_string (value, gedit_document_get_content_type (doc));
                        break;
@@ -314,18 +309,6 @@ gedit_document_class_init (GeditDocumentClass *klass)
        klass->loaded = gedit_document_loaded_real;
        klass->saved = gedit_document_saved_real;
 
-       /**
-        * GeditDocument:shortname:
-        *
-        * The document's short name.
-        */
-       properties[PROP_SHORTNAME] =
-               g_param_spec_string ("shortname",
-                                    "Short Name",
-                                    "The document's short name",
-                                    NULL,
-                                    G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
-
        /**
         * GeditDocument:content-type:
         *
@@ -650,10 +633,7 @@ on_location_changed (GtkSourceFile *file,
                     GeditDocument *doc)
 {
        gedit_debug (DEBUG_DOCUMENT);
-
        load_metadata_from_metadata_manager (doc);
-
-       g_object_notify_by_pspec (G_OBJECT (doc), properties[PROP_SHORTNAME]);
 }
 
 static void


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