[gedit/zbrown/deteplification-src: 538/633] GeditDocument: make get_uri_for_display() private
- From: Zander Brown <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/zbrown/deteplification-src: 538/633] GeditDocument: make get_uri_for_display() private
- Date: Sat, 10 Apr 2021 12:48:09 +0000 (UTC)
commit 5fc3158e304dc54020b7d9641ee36ac9a0baa2d9
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Nov 19 13:39:48 2020 +0100
GeditDocument: make get_uri_for_display() private
In preparation to use more of the TeplBuffer and TeplFile API.
docs/reference/api-breaks.xml | 17 +++++++++++++++++
docs/reference/gedit-sections.txt | 1 -
gedit/gedit-commands-file.c | 6 +++---
gedit/gedit-document-private.h | 22 +++++++++++++++-------
gedit/gedit-document.c | 9 ++-------
gedit/gedit-document.h | 2 --
gedit/gedit-print-job.c | 1 +
gedit/gedit-tab.c | 2 +-
8 files changed, 39 insertions(+), 21 deletions(-)
---
diff --git a/docs/reference/api-breaks.xml b/docs/reference/api-breaks.xml
index 917cf5a94..c8a80c2c6 100644
--- a/docs/reference/api-breaks.xml
+++ b/docs/reference/api-breaks.xml
@@ -21,6 +21,23 @@
<link linkend="api-index-deprecated">index of deprecated symbols</link>.
</para>
+ <refsect1>
+ <title>3.38 -> 40</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ All previously deprecated APIs have been removed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <code>gedit_document_get_uri_for_display()</code> function has
+ been removed from the public API.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </refsect1>
+
<refsect1>
<title>3.36.0 -> 3.37.1</title>
<itemizedlist>
diff --git a/docs/reference/gedit-sections.txt b/docs/reference/gedit-sections.txt
index cbd1fe236..a71e00faa 100644
--- a/docs/reference/gedit-sections.txt
+++ b/docs/reference/gedit-sections.txt
@@ -52,7 +52,6 @@ gedit_commands_save_all_documents
GeditDocument
gedit_document_new
gedit_document_get_file
-gedit_document_get_uri_for_display
gedit_document_get_short_name_for_display
gedit_document_get_mime_type
gedit_document_is_untouched
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index 082903a75..d1d440a3e 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -247,7 +247,7 @@ load_file_list (GeditWindow *window,
g_return_val_if_fail (tab != NULL, loaded_files);
doc = gedit_tab_get_document (tab);
- uri_for_display = gedit_document_get_uri_for_display (doc);
+ uri_for_display = _gedit_document_get_uri_for_display (doc);
gedit_statusbar_flash_message (GEDIT_STATUSBAR (window->priv->statusbar),
window->priv->generic_message_cid,
@@ -956,7 +956,7 @@ gedit_commands_save_document_async (GeditDocument *document,
return;
}
- uri_for_display = gedit_document_get_uri_for_display (document);
+ uri_for_display = _gedit_document_get_uri_for_display (document);
gedit_statusbar_flash_message (GEDIT_STATUSBAR (window->priv->statusbar),
window->priv->generic_message_cid,
_("Saving file “%s”\342\200\246"),
@@ -1283,7 +1283,7 @@ save_documents_list (GeditWindow *window,
gchar *uri_for_display;
- uri_for_display = gedit_document_get_uri_for_display (doc);
+ uri_for_display = _gedit_document_get_uri_for_display (doc);
gedit_debug_message (DEBUG_COMMANDS,
"File '%s' not saved. State: %d",
uri_for_display,
diff --git a/gedit/gedit-document-private.h b/gedit/gedit-document-private.h
index dabb2a805..574c0bb89 100644
--- a/gedit/gedit-document-private.h
+++ b/gedit/gedit-document-private.h
@@ -5,7 +5,7 @@
* Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence
* Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi
* Copyright (C) 2002-2005 Paolo Maggi
- * Copyright (C) 2014 Sébastien Wilmet
+ * Copyright (C) 2014, 2020 Sébastien Wilmet
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -38,16 +38,24 @@ G_BEGIN_DECLS
#define GEDIT_METADATA_ATTRIBUTE_LANGUAGE "metadata::gedit-language"
#endif
-glong _gedit_document_get_seconds_since_last_save_or_load (GeditDocument *doc);
+G_GNUC_INTERNAL
+glong _gedit_document_get_seconds_since_last_save_or_load (GeditDocument *doc);
-gboolean _gedit_document_needs_saving (GeditDocument *doc);
+G_GNUC_INTERNAL
+gboolean _gedit_document_needs_saving (GeditDocument *doc);
-gboolean _gedit_document_get_empty_search (GeditDocument *doc);
+G_GNUC_INTERNAL
+gboolean _gedit_document_get_empty_search (GeditDocument *doc);
-void _gedit_document_set_create (GeditDocument *doc,
- gboolean create);
+G_GNUC_INTERNAL
+void _gedit_document_set_create (GeditDocument *doc,
+ gboolean create);
-gboolean _gedit_document_get_create (GeditDocument *doc);
+G_GNUC_INTERNAL
+gboolean _gedit_document_get_create (GeditDocument *doc);
+
+G_GNUC_INTERNAL
+gchar * _gedit_document_get_uri_for_display (GeditDocument *doc);
G_END_DECLS
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index f9d42b317..49cc589ba 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -1034,14 +1034,9 @@ set_content_type (GeditDocument *doc,
}
}
-/**
- * gedit_document_get_uri_for_display:
- * @doc: a #GeditDocument.
- *
- * Note: this never returns %NULL.
- **/
+/* Note: this never returns %NULL. */
gchar *
-gedit_document_get_uri_for_display (GeditDocument *doc)
+_gedit_document_get_uri_for_display (GeditDocument *doc)
{
GeditDocumentPrivate *priv;
GFile *location;
diff --git a/gedit/gedit-document.h b/gedit/gedit-document.h
index 331773e21..ed52a42fb 100644
--- a/gedit/gedit-document.h
+++ b/gedit/gedit-document.h
@@ -52,8 +52,6 @@ GeditDocument *gedit_document_new (void);
GtkSourceFile *gedit_document_get_file (GeditDocument *doc);
-gchar *gedit_document_get_uri_for_display (GeditDocument *doc);
-
gchar *gedit_document_get_short_name_for_display (GeditDocument *doc);
gchar *gedit_document_get_content_type (GeditDocument *doc);
diff --git a/gedit/gedit-print-job.c b/gedit/gedit-print-job.c
index 6d4afb2e0..8ab4ab707 100644
--- a/gedit/gedit-print-job.c
+++ b/gedit/gedit-print-job.c
@@ -26,6 +26,7 @@
#include <gtksourceview/gtksource.h>
#include "gedit-debug.h"
+#include "gedit-document-private.h"
#include "gedit-print-preview.h"
#include "gedit-utils.h"
#include "gedit-dirs.h"
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 76fb615ba..6bb38b160 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -1461,7 +1461,7 @@ _gedit_tab_get_tooltip (GeditTab *tab)
doc = gedit_tab_get_document (tab);
- uri = gedit_document_get_uri_for_display (doc);
+ uri = _gedit_document_get_uri_for_display (doc);
g_return_val_if_fail (uri != NULL, NULL);
ruri = gedit_utils_replace_home_dir_with_tilde (uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]