[gedit] Remove all the deprecated API
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Remove all the deprecated API
- Date: Fri, 9 Oct 2020 01:31:53 +0000 (UTC)
commit 21d94f23b98094d7f652cd3fe9785fd1cc890afb
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Oct 9 03:24:15 2020 +0200
Remove all the deprecated API
Haircut.
docs/reference/gedit-sections.txt | 10 -----
gedit/gedit-document.c | 60 ---------------------------
gedit/gedit-document.h | 9 -----
gedit/gedit-utils.c | 78 -----------------------------------
gedit/gedit-utils.h | 13 ------
gedit/gedit-view.c | 85 ---------------------------------------
gedit/gedit-view.h | 18 ---------
7 files changed, 273 deletions(-)
---
diff --git a/docs/reference/gedit-sections.txt b/docs/reference/gedit-sections.txt
index 198389221..3cc0a6d96 100644
--- a/docs/reference/gedit-sections.txt
+++ b/docs/reference/gedit-sections.txt
@@ -57,8 +57,6 @@ gedit_document_get_short_name_for_display
gedit_document_get_mime_type
gedit_document_is_untouched
gedit_document_is_untitled
-gedit_document_goto_line
-gedit_document_goto_line_offset
gedit_document_set_language
gedit_document_get_content_type
gedit_document_get_metadata
@@ -223,12 +221,6 @@ GeditViewPrivate
<TITLE>GeditView</TITLE>
GeditView
gedit_view_new
-gedit_view_cut_clipboard
-gedit_view_copy_clipboard
-gedit_view_paste_clipboard
-gedit_view_delete_selection
-gedit_view_select_all
-gedit_view_scroll_to_cursor
gedit_view_set_font
<SUBSECTION Standard>
GEDIT_VIEW
@@ -362,6 +354,4 @@ gedit_utils_is_valid_location
gedit_utils_location_get_dirname_for_display
gedit_utils_set_direct_save_filename
gedit_utils_newline_type_to_string
-gedit_warning
-gedit_utils_decode_uri
</SECTION>
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index e321bfd16..127799ea7 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -1267,66 +1267,6 @@ _gedit_document_needs_saving (GeditDocument *doc)
return (externally_modified || deleted) && !priv->create;
}
-/**
- * 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,
- gint line)
-{
- GtkTextIter iter;
-
- gedit_debug (DEBUG_DOCUMENT);
-
- g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), FALSE);
- g_return_val_if_fail (line >= -1, FALSE);
-
- gtk_text_buffer_get_iter_at_line (GTK_TEXT_BUFFER (doc),
- &iter,
- line);
-
- gtk_text_buffer_place_cursor (GTK_TEXT_BUFFER (doc), &iter);
-
- 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,
- gint line_offset)
-{
- GtkTextIter iter;
-
- g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), FALSE);
- g_return_val_if_fail (line >= -1, FALSE);
- g_return_val_if_fail (line_offset >= -1, FALSE);
-
- gtk_text_buffer_get_iter_at_line_offset (GTK_TEXT_BUFFER (doc),
- &iter,
- line,
- line_offset);
-
- gtk_text_buffer_place_cursor (GTK_TEXT_BUFFER (doc), &iter);
-
- return (gtk_text_iter_get_line (&iter) == line &&
- gtk_text_iter_get_line_offset (&iter) == line_offset);
-}
-
/**
* gedit_document_set_language:
* @doc:
diff --git a/gedit/gedit-document.h b/gedit/gedit-document.h
index 4498dabef..cbd6b19c6 100644
--- a/gedit/gedit-document.h
+++ b/gedit/gedit-document.h
@@ -82,15 +82,6 @@ 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 */
diff --git a/gedit/gedit-utils.c b/gedit/gedit-utils.c
index 744b4d86c..9fc9e4fb0 100644
--- a/gedit/gedit-utils.c
+++ b/gedit/gedit-utils.c
@@ -87,55 +87,6 @@ gedit_utils_set_atk_name_description (GtkWidget *widget,
atk_object_set_description (aobj, description);
}
-/**
- * gedit_warning:
- * @parent:
- * @format:
- * @...:
- *
- * Deprecated: 3.38: Use tepl_utils_show_warning_dialog() instead.
- */
-void
-gedit_warning (GtkWindow *parent, const gchar *format, ...)
-{
- va_list args;
- gchar *str;
- GtkWidget *dialog;
- GtkWindowGroup *wg = NULL;
-
- g_return_if_fail (format != NULL);
-
- if (parent != NULL)
- wg = gtk_window_get_group (parent);
-
- va_start (args, format);
- str = g_strdup_vprintf (format, args);
- va_end (args);
-
- dialog = gtk_message_dialog_new_with_markup (
- parent,
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- "%s", str);
-
- g_free (str);
-
- if (wg != NULL)
- gtk_window_group_add_window (wg, GTK_WINDOW (dialog));
-
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
-
- gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
-
- g_signal_connect (G_OBJECT (dialog),
- "response",
- G_CALLBACK (gtk_widget_destroy),
- NULL);
-
- gtk_widget_show (dialog);
-}
-
static gchar *
uri_get_dirname (const gchar *uri)
{
@@ -487,35 +438,6 @@ gedit_utils_drop_get_uris (GtkSelectionData *selection_data)
return uri_list;
}
-/**
- * gedit_utils_decode_uri:
- * @uri: the uri to decode
- * @scheme: (out) (allow-none): return value pointer for the uri's
- * scheme (e.g. http, sftp, ...), or %NULL
- * @user: (out) (allow-none): return value pointer for the uri user info, or %NULL
- * @port: (out) (allow-none): return value pointer for the uri port, or %NULL
- * @host: (out) (allow-none): return value pointer for the uri host, or %NULL
- * @path: (out) (allow-none): return value pointer for the uri path, or %NULL
- *
- * Parse and break an uri apart in its individual components like the uri
- * scheme, user info, port, host and path. The return value pointer can be
- * %NULL to ignore certain parts of the uri. If the function returns %TRUE, then
- * all return value pointers should be freed using g_free
- *
- * Return value: %TRUE if the uri could be properly decoded, %FALSE otherwise.
- * Deprecated: 3.38: Use tepl_utils_decode_uri() instead.
- */
-gboolean
-gedit_utils_decode_uri (const gchar *uri,
- gchar **scheme,
- gchar **user,
- gchar **host,
- gchar **port,
- gchar **path)
-{
- return tepl_utils_decode_uri (uri, scheme, user, host, port, path);
-}
-
GtkSourceCompressionType
gedit_utils_get_compression_type_from_content_type (const gchar *content_type)
{
diff --git a/gedit/gedit-utils.h b/gedit/gedit-utils.h
index 9869ab629..a6b423db0 100644
--- a/gedit/gedit-utils.h
+++ b/gedit/gedit-utils.h
@@ -49,19 +49,6 @@ GtkSourceCompressionType gedit_utils_get_compression_type_from_content_type (c
const gchar *gedit_utils_newline_type_to_string (GtkSourceNewlineType
newline_type);
-G_DEPRECATED_FOR (tepl_utils_show_warning_dialog)
-void gedit_warning (GtkWindow *parent,
- const gchar *format,
- ...) G_GNUC_PRINTF(2, 3);
-
-G_DEPRECATED_FOR (tepl_utils_decode_uri)
-gboolean gedit_utils_decode_uri (const gchar *uri,
- gchar **scheme,
- gchar **user,
- gchar **host,
- gchar **port,
- gchar **path);
-
G_END_DECLS
#endif /* GEDIT_UTILS_H */
diff --git a/gedit/gedit-view.c b/gedit/gedit-view.c
index f1698f0d3..a7f75c978 100644
--- a/gedit/gedit-view.c
+++ b/gedit/gedit-view.c
@@ -770,91 +770,6 @@ gedit_view_new (GeditDocument *doc)
NULL);
}
-/**
- * gedit_view_cut_clipboard:
- * @view: a #GeditView.
- *
- * Deprecated: 3.38: Use tepl_view_cut_clipboard() instead.
- */
-void
-gedit_view_cut_clipboard (GeditView *view)
-{
- g_return_if_fail (GEDIT_IS_VIEW (view));
- tepl_view_cut_clipboard (TEPL_VIEW (view));
-}
-
-/**
- * gedit_view_copy_clipboard:
- * @view: a #GeditView.
- *
- * Deprecated: 3.38: Use tepl_view_copy_clipboard() instead.
- */
-void
-gedit_view_copy_clipboard (GeditView *view)
-{
- g_return_if_fail (GEDIT_IS_VIEW (view));
- tepl_view_copy_clipboard (TEPL_VIEW (view));
-}
-
-/**
- * gedit_view_paste_clipboard:
- * @view: a #GeditView.
- *
- * Deprecated: 3.38: Use tepl_view_paste_clipboard() instead.
- */
-void
-gedit_view_paste_clipboard (GeditView *view)
-{
- g_return_if_fail (GEDIT_IS_VIEW (view));
- tepl_view_paste_clipboard (TEPL_VIEW (view));
-}
-
-/**
- * gedit_view_delete_selection:
- * @view: a #GeditView
- *
- * Deletes the text currently selected in the #GtkTextBuffer associated
- * to the view and scroll to the cursor position.
- *
- * Deprecated: 3.38: use tepl_view_delete_selection() instead.
- */
-void
-gedit_view_delete_selection (GeditView *view)
-{
- g_return_if_fail (GEDIT_IS_VIEW (view));
- tepl_view_delete_selection (TEPL_VIEW (view));
-}
-
-/**
- * gedit_view_select_all:
- * @view: a #GeditView
- *
- * Selects all the text.
- *
- * Deprecated: 3.38: use tepl_view_select_all() instead.
- */
-void
-gedit_view_select_all (GeditView *view)
-{
- g_return_if_fail (GEDIT_IS_VIEW (view));
- tepl_view_select_all (TEPL_VIEW (view));
-}
-
-/**
- * gedit_view_scroll_to_cursor:
- * @view: a #GeditView
- *
- * Scrolls the @view to the cursor position.
- *
- * Deprecated: 3.38: Use tepl_view_scroll_to_cursor() instead.
- */
-void
-gedit_view_scroll_to_cursor (GeditView *view)
-{
- g_return_if_fail (GEDIT_IS_VIEW (view));
- tepl_view_scroll_to_cursor (TEPL_VIEW (view));
-}
-
static void
update_css_provider (GeditView *view)
{
diff --git a/gedit/gedit-view.h b/gedit/gedit-view.h
index 36935f978..742d390a4 100644
--- a/gedit/gedit-view.h
+++ b/gedit/gedit-view.h
@@ -65,24 +65,6 @@ void gedit_view_set_font (GeditView *view,
gboolean default_font,
const gchar *font_name);
-G_DEPRECATED_FOR (tepl_view_cut_clipboard)
-void gedit_view_cut_clipboard (GeditView *view);
-
-G_DEPRECATED_FOR (tepl_view_copy_clipboard)
-void gedit_view_copy_clipboard (GeditView *view);
-
-G_DEPRECATED_FOR (tepl_view_paste_clipboard)
-void gedit_view_paste_clipboard (GeditView *view);
-
-G_DEPRECATED_FOR (tepl_view_delete_selection)
-void gedit_view_delete_selection (GeditView *view);
-
-G_DEPRECATED_FOR (tepl_view_select_all)
-void gedit_view_select_all (GeditView *view);
-
-G_DEPRECATED_FOR (tepl_view_scroll_to_cursor)
-void gedit_view_scroll_to_cursor (GeditView *view);
-
G_END_DECLS
#endif /* GEDIT_VIEW_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]