Remove xed_utils_location_has_file_scheme

This commit is contained in:
JosephMcc 2017-01-21 14:44:55 -08:00
parent ed03c490d1
commit f546598d83
5 changed files with 5 additions and 20 deletions

View File

@ -506,8 +506,6 @@ xed_metadata_manager_set
GBOOLEAN_TO_POINTER GBOOLEAN_TO_POINTER
GPOINTER_TO_BOOLEAN GPOINTER_TO_BOOLEAN
IS_VALID_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_widget
xed_utils_menu_position_under_tree_view xed_utils_menu_position_under_tree_view
xed_gtk_button_new_with_stock_icon xed_gtk_button_new_with_stock_icon

View File

@ -416,7 +416,7 @@ on_selection_changed_cb (GtkTreeSelection *selection,
{ {
gtk_tree_model_get (model, &iter, XED_FILE_BROWSER_STORE_COLUMN_LOCATION, &location, -1); 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); 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 (location != NULL)
{ {
if (xed_utils_location_has_file_scheme (location)) if (g_file_has_uri_scheme (location, "file"))
{ {
prepare_auto_root (plugin); prepare_auto_root (plugin);
set_root_from_doc (plugin, doc); set_root_from_doc (plugin, doc);

View File

@ -1323,7 +1323,7 @@ document_loader_loaded (XedDocumentLoader *loader,
/* special case creating a named new doc */ /* special case creating a named new doc */
else if (doc->priv->create && else if (doc->priv->create &&
(error->domain == G_IO_ERROR && error->code == G_IO_ERROR_NOT_FOUND) && (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); reset_temp_loading_data (doc);
@ -1655,7 +1655,7 @@ xed_document_is_local (XedDocument *doc)
return FALSE; return FALSE;
} }
return xed_utils_location_has_file_scheme (doc->priv->location); return g_file_has_uri_scheme (doc->priv->location, "file");
} }
static void static void

View File

@ -60,17 +60,6 @@
#define STDIN_DELAY_MICROSECONDS 100000 #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 static void
widget_get_origin (GtkWidget *widget, widget_get_origin (GtkWidget *widget,
gint *x, gint *x,
@ -1257,7 +1246,7 @@ xed_utils_basename_for_display (GFile *location)
uri = g_file_get_uri (location); uri = g_file_get_uri (location);
/* First, try to query the display name, but only on local files */ /* 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; GFileInfo *info;
info = g_file_query_info (location, info = g_file_query_info (location,

View File

@ -49,8 +49,6 @@ G_BEGIN_DECLS
enum { XED_ALL_WORKSPACES = 0xffffffff }; enum { XED_ALL_WORKSPACES = 0xffffffff };
gboolean xed_utils_location_has_file_scheme (GFile *location);
void xed_utils_menu_position_under_widget (GtkMenu *menu, void xed_utils_menu_position_under_widget (GtkMenu *menu,
gint *x, gint *x,
gint *y, gint *y,