[gedit] Document: deprecate goto_line() and goto_line_offset()



commit 5fdeaee22bae754b470bc56296a6a92f2f6da9fa
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Apr 12 19:33:28 2020 +0200

    Document: deprecate goto_line() and goto_line_offset()
    
    The functions are better documented in Tepl.

 gedit/gedit-document.c | 19 +++++++++++++++++--
 gedit/gedit-document.h | 16 +++++++++-------
 2 files changed, 26 insertions(+), 9 deletions(-)
---
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index ebb312832..017ac317c 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -1243,8 +1243,14 @@ _gedit_document_needs_saving (GeditDocument *doc)
        return (externally_modified || deleted) && !priv->create;
 }
 
-/* If @line is bigger than the lines of the document, the cursor is moved
- * to the last line and FALSE is returned.
+/**
+ * gedit_document_goto_line:
+ * @doc: a #GeditDocument.
+ * @line: the line number.
+ *
+ * Returns: if @line is bigger than the lines of the document, the cursor is moved
+ * to the last line and %FALSE is returned.
+ * Deprecated: 3.38: Use tepl_view_goto_line() instead.
  */
 gboolean
 gedit_document_goto_line (GeditDocument *doc,
@@ -1266,6 +1272,15 @@ gedit_document_goto_line (GeditDocument *doc,
        return gtk_text_iter_get_line (&iter) == line;
 }
 
+/**
+ * gedit_document_goto_line_offset:
+ * @doc: a #GeditDocument.
+ * @line: the line.
+ * @line_offset: the line offset.
+ *
+ * Returns: the return value.
+ * Deprecated: 3.38: Use tepl_view_goto_line_offset() instead.
+ */
 gboolean
 gedit_document_goto_line_offset (GeditDocument *doc,
                                 gint           line,
diff --git a/gedit/gedit-document.h b/gedit/gedit-document.h
index 331773e21..4498dabef 100644
--- a/gedit/gedit-document.h
+++ b/gedit/gedit-document.h
@@ -64,13 +64,6 @@ gboolean      gedit_document_is_untouched                    (GeditDocument       *doc);
 
 gboolean        gedit_document_is_untitled                     (GeditDocument       *doc);
 
-gboolean        gedit_document_goto_line                       (GeditDocument       *doc,
-                                                               gint                 line);
-
-gboolean        gedit_document_goto_line_offset                (GeditDocument       *doc,
-                                                                gint                 line,
-                                                                gint                 line_offset);
-
 void            gedit_document_set_language                    (GeditDocument       *doc,
                                                                 GtkSourceLanguage   *lang);
 GtkSourceLanguage
@@ -89,6 +82,15 @@ void          gedit_document_set_search_context              (GeditDocument          *doc,
 GtkSourceSearchContext *
                 gedit_document_get_search_context              (GeditDocument       *doc);
 
+G_DEPRECATED_FOR (tepl_view_goto_line)
+gboolean        gedit_document_goto_line                       (GeditDocument       *doc,
+                                                                gint                 line);
+
+G_DEPRECATED_FOR (tepl_view_goto_line_offset)
+gboolean        gedit_document_goto_line_offset                (GeditDocument       *doc,
+                                                                gint                 line,
+                                                                gint                 line_offset);
+
 G_END_DECLS
 
 #endif /* GEDIT_DOCUMENT_H */


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