Commit fffa1cdb authored by Paolo Borelli's avatar Paolo Borelli

Remove gedit_utils_location_has_file_scheme

This was now just a wrapper around the corresponding Gio method and
since we are breaking compat we can drop it now
parent 74cf9539
......@@ -499,8 +499,6 @@ gedit_metadata_manager_set
GBOOLEAN_TO_POINTER
GPOINTER_TO_BOOLEAN
IS_VALID_BOOLEAN
gedit_utils_uri_has_writable_scheme
gedit_utils_uri_has_file_scheme
gedit_utils_menu_position_under_widget
gedit_utils_menu_position_under_tree_view
gedit_gtk_button_new_with_stock_icon
......
......@@ -1464,7 +1464,7 @@ document_loader_loaded (GeditDocumentLoader *loader,
/* special case creating a named new doc */
else if (doc->priv->create &&
(error->domain == G_IO_ERROR && error->code == G_IO_ERROR_NOT_FOUND) &&
(gedit_utils_location_has_file_scheme (doc->priv->location)))
(g_file_has_uri_scheme (doc->priv->location, "file")))
{
reset_temp_loading_data (doc);
......@@ -1475,7 +1475,7 @@ document_loader_loaded (GeditDocumentLoader *loader,
return;
}
g_signal_emit (doc,
document_signals[LOADED],
0,
......@@ -1897,7 +1897,7 @@ gedit_document_is_local (GeditDocument *doc)
return FALSE;
}
return gedit_utils_location_has_file_scheme (doc->priv->location);
return g_file_has_uri_scheme (doc->priv->location, "file");
}
static void
......
......@@ -65,18 +65,6 @@
#define STDIN_DELAY_MICROSECONDS 100000
/**
* gedit_utils_location_has_file_scheme:
* @location: the location to check
*
* Returns: %TRUE if @location is a file: uri and is not a chained uri
*/
gboolean
gedit_utils_location_has_file_scheme (GFile *location)
{
return g_file_has_uri_scheme (location, "file");
}
static void
widget_get_origin (GtkWidget *widget,
gint *x,
......@@ -1273,9 +1261,10 @@ gedit_utils_basename_for_display (GFile *location)
uri = g_file_get_uri (location);
/* First, try to query the display name, but only on local files */
if (gedit_utils_location_has_file_scheme (location))
if (g_file_has_uri_scheme (location, "file"))
{
GFileInfo *info;
info = g_file_query_info (location,
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME,
G_FILE_QUERY_INFO_NONE,
......
......@@ -50,8 +50,6 @@ G_BEGIN_DECLS
enum { GEDIT_ALL_WORKSPACES = 0xffffffff };
gboolean gedit_utils_location_has_file_scheme (GFile *location);
void gedit_utils_menu_position_under_widget (GtkMenu *menu,
gint *x,
gint *y,
......
......@@ -521,7 +521,7 @@ on_selection_changed_cb (GtkTreeSelection *selection,
if (location)
{
sensitive = gedit_utils_location_has_file_scheme (location);
sensitive = g_file_has_uri_scheme (location, "file");
g_object_unref (location);
}
else
......@@ -1029,7 +1029,7 @@ on_tab_added_cb (GeditWindow *window,
if (location != NULL)
{
if (gedit_utils_location_has_file_scheme (location))
if (g_file_has_uri_scheme (location, "file"))
{
prepare_auto_root (plugin);
set_root_from_doc (plugin, doc);
......
......@@ -744,7 +744,7 @@ class Manager(Gtk.Dialog, Gtk.Buildable):
success = True
for gfile in files:
if not Gedit.utils_location_has_file_scheme(gfile):
if not gfile.has_uri_scheme('file'):
continue
# Remove file://
......
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