Commit 655bae08 authored by Jordi Mas's avatar Jordi Mas

gedit_document_get_location still used by Python plugins

parent 6d85d6c7
Pipeline #75301 passed with stage
in 6 minutes and 32 seconds
......@@ -55,6 +55,7 @@ gedit_commands_save_all_documents
GeditDocument
gedit_document_new
gedit_document_get_file
gedit_document_get_location
gedit_document_get_uri_for_display
gedit_document_get_short_name_for_display
gedit_document_set_short_name_for_display
......
......@@ -1016,6 +1016,32 @@ set_content_type (GeditDocument *doc,
}
}
/**
* gedit_document_get_location:
* @doc: a #GeditDocument
*
* Returns: (allow-none) (transfer full): a copy of the internal #GFile
*
* Deprecated: 3.14: use gtk_source_file_get_location() instead. Attention,
* gedit_document_get_location() has a transfer full for the return value, while
* gtk_source_file_get_location() has a transfer none.
*/
GFile *
gedit_document_get_location (GeditDocument *doc)
{
GeditDocumentPrivate *priv;
GFile *location;
priv = gedit_document_get_instance_private (doc);
g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL);
location = gtk_source_file_get_location (priv->file);
return location != NULL ? g_object_ref (location) : NULL;
}
/**
* gedit_document_get_uri_for_display:
* @doc: a #GeditDocument.
......
......@@ -52,6 +52,8 @@ GeditDocument *gedit_document_new (void);
GtkSourceFile *gedit_document_get_file (GeditDocument *doc);
G_DEPRECATED_FOR (gtk_source_file_get_location)
GFile *gedit_document_get_location (GeditDocument *doc);
gchar *gedit_document_get_uri_for_display (GeditDocument *doc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment