From f546598d8368a959b78c6f337dab2824027450dc Mon Sep 17 00:00:00 2001 From: JosephMcc Date: Sat, 21 Jan 2017 14:44:55 -0800 Subject: [PATCH] Remove xed_utils_location_has_file_scheme --- docs/reference/xed-sections.txt | 2 -- plugins/filebrowser/xed-file-browser-plugin.c | 4 ++-- xed/xed-document.c | 4 ++-- xed/xed-utils.c | 13 +------------ xed/xed-utils.h | 2 -- 5 files changed, 5 insertions(+), 20 deletions(-) diff --git a/docs/reference/xed-sections.txt b/docs/reference/xed-sections.txt index 2e43141..a3d5d00 100644 --- a/docs/reference/xed-sections.txt +++ b/docs/reference/xed-sections.txt @@ -506,8 +506,6 @@ xed_metadata_manager_set GBOOLEAN_TO_POINTER GPOINTER_TO_BOOLEAN IS_VALID_BOOLEAN -xed_utils_uri_has_writable_scheme -xed_utils_uri_has_file_scheme xed_utils_menu_position_under_widget xed_utils_menu_position_under_tree_view xed_gtk_button_new_with_stock_icon diff --git a/plugins/filebrowser/xed-file-browser-plugin.c b/plugins/filebrowser/xed-file-browser-plugin.c index 7319199..72e68ca 100644 --- a/plugins/filebrowser/xed-file-browser-plugin.c +++ b/plugins/filebrowser/xed-file-browser-plugin.c @@ -416,7 +416,7 @@ on_selection_changed_cb (GtkTreeSelection *selection, { gtk_tree_model_get (model, &iter, XED_FILE_BROWSER_STORE_COLUMN_LOCATION, &location, -1); - sensitive = xed_utils_location_has_file_scheme (location); + sensitive = g_file_has_uri_scheme (location, "file"); } gtk_action_set_sensitive (gtk_action_group_get_action (priv->single_selection_action_group, "OpenTerminal"), sensitive); @@ -902,7 +902,7 @@ on_tab_added_cb (XedWindow *window, if (location != NULL) { - if (xed_utils_location_has_file_scheme (location)) + if (g_file_has_uri_scheme (location, "file")) { prepare_auto_root (plugin); set_root_from_doc (plugin, doc); diff --git a/xed/xed-document.c b/xed/xed-document.c index ff9be4e..f2e9195 100644 --- a/xed/xed-document.c +++ b/xed/xed-document.c @@ -1323,7 +1323,7 @@ document_loader_loaded (XedDocumentLoader *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) && - (xed_utils_location_has_file_scheme (doc->priv->location))) + (g_file_has_uri_scheme (doc->priv->location, "file"))) { reset_temp_loading_data (doc); @@ -1655,7 +1655,7 @@ xed_document_is_local (XedDocument *doc) return FALSE; } - return xed_utils_location_has_file_scheme (doc->priv->location); + return g_file_has_uri_scheme (doc->priv->location, "file"); } static void diff --git a/xed/xed-utils.c b/xed/xed-utils.c index 148ba7e..bbf0391 100644 --- a/xed/xed-utils.c +++ b/xed/xed-utils.c @@ -60,17 +60,6 @@ #define STDIN_DELAY_MICROSECONDS 100000 -/** - * xed_utils_uris_has_file_scheme - * - * Returns: %TRUE if @location is a file: uri and is not a chained uri - */ -gboolean -xed_utils_location_has_file_scheme (GFile *location) -{ - return g_file_has_uri_scheme (location, "file"); -} - static void widget_get_origin (GtkWidget *widget, gint *x, @@ -1257,7 +1246,7 @@ xed_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 (xed_utils_location_has_file_scheme (location)) + if (g_file_has_uri_scheme (location, "file")) { GFileInfo *info; info = g_file_query_info (location, diff --git a/xed/xed-utils.h b/xed/xed-utils.h index 669b500..1c69a00 100644 --- a/xed/xed-utils.h +++ b/xed/xed-utils.h @@ -49,8 +49,6 @@ G_BEGIN_DECLS enum { XED_ALL_WORKSPACES = 0xffffffff }; -gboolean xed_utils_location_has_file_scheme (GFile *location); - void xed_utils_menu_position_under_widget (GtkMenu *menu, gint *x, gint *y,