Commit 37b156b5 authored by Paolo Borelli's avatar Paolo Borelli

Kill another util that these days is just an alias for a gio function

parent 66a52328
......@@ -1242,7 +1242,7 @@ gedit_document_get_uri_for_display (GeditDocument *doc)
}
else
{
return gedit_utils_uri_for_display (doc->priv->location);
return g_file_get_parse_name (doc->priv->location);
}
}
......
......@@ -399,7 +399,7 @@ gedit_unrecoverable_reverting_error_info_bar_new (GFile *location,
g_return_val_if_fail ((error->domain == GEDIT_DOCUMENT_ERROR) ||
(error->domain == G_IO_ERROR), NULL);
full_formatted_uri = gedit_utils_uri_for_display (location);
full_formatted_uri = g_file_get_parse_name (location);
/* Truncate the URI so it doesn't get insanely wide. Note that even
* though the dialog uses wrapped text, if the URI doesn't contain
......@@ -584,7 +584,7 @@ gedit_io_loading_error_info_bar_new (GFile *location,
if (location)
{
full_formatted_uri = gedit_utils_uri_for_display (location);
full_formatted_uri = g_file_get_parse_name (location);
}
else
{
......@@ -698,7 +698,7 @@ gedit_conversion_error_while_saving_info_bar_new (GFile *location,
error->domain == G_IO_ERROR, NULL);
g_return_val_if_fail (encoding != NULL, NULL);
full_formatted_uri = gedit_utils_uri_for_display (location);
full_formatted_uri = g_file_get_parse_name (location);
/* Truncate the URI so it doesn't get insanely wide. Note that even
* though the dialog uses wrapped text, if the URI doesn't contain
......@@ -766,7 +766,7 @@ gedit_file_already_open_warning_info_bar_new (GFile *location)
g_return_val_if_fail (G_IS_FILE (location), NULL);
full_formatted_uri = gedit_utils_uri_for_display (location);
full_formatted_uri = g_file_get_parse_name (location);
/* Truncate the URI so it doesn't get insanely wide. Note that even
* though the dialog uses wrapped text, if the URI doesn't contain
......@@ -858,7 +858,7 @@ gedit_externally_modified_saving_error_info_bar_new (GFile *location,
g_return_val_if_fail (error->domain == GEDIT_DOCUMENT_ERROR, NULL);
g_return_val_if_fail (error->code == GEDIT_DOCUMENT_ERROR_EXTERNALLY_MODIFIED, NULL);
full_formatted_uri = gedit_utils_uri_for_display (location);
full_formatted_uri = g_file_get_parse_name (location);
/* Truncate the URI so it doesn't get insanely wide. Note that even
* though the dialog uses wrapped text, if the URI doesn't contain
......@@ -956,7 +956,7 @@ gedit_no_backup_saving_error_info_bar_new (GFile *location,
(error->domain == G_IO_ERROR &&
error->code == G_IO_ERROR_CANT_CREATE_BACKUP)), NULL);
full_formatted_uri = gedit_utils_uri_for_display (location);
full_formatted_uri = g_file_get_parse_name (location);
/* Truncate the URI so it doesn't get insanely wide. Note that even
* though the dialog uses wrapped text, if the URI doesn't contain
......@@ -1059,7 +1059,7 @@ gedit_unrecoverable_saving_error_info_bar_new (GFile *location,
g_return_val_if_fail ((error->domain == GEDIT_DOCUMENT_ERROR) ||
(error->domain == G_IO_ERROR), NULL);
full_formatted_uri = gedit_utils_uri_for_display (location);
full_formatted_uri = g_file_get_parse_name (location);
/* Truncate the URI so it doesn't get insanely wide. Note that even
* though the dialog uses wrapped text, if the URI doesn't contain
......@@ -1177,7 +1177,7 @@ gedit_externally_modified_info_bar_new (GFile *location,
g_return_val_if_fail (G_IS_FILE (location), NULL);
full_formatted_uri = gedit_utils_uri_for_display (location);
full_formatted_uri = g_file_get_parse_name (location);
/* Truncate the URI so it doesn't get insanely wide. Note that even
* though the dialog uses wrapped text, if the URI doesn't contain
......
......@@ -821,9 +821,7 @@ show_saving_info_bar (GeditTab *tab)
gchar *str;
from = short_name;
to = gedit_utils_uri_for_display (tab->priv->tmp_save_location);
to = g_file_get_parse_name (tab->priv->tmp_save_location);
str = gedit_utils_str_middle_truncate (to,
MAX (20, MAX_MSG_LENGTH - len));
g_free (to);
......
......@@ -1310,23 +1310,6 @@ gedit_utils_basename_for_display (GFile *location)
return name;
}
/**
* gedit_utils_uri_for_display:
* @location: location to be displayed.
*
* Filter, modify, unescape and change @uri to make it appropriate
* for display to users.
*
* This function is a convenient wrapper for g_file_get_parse_name
*
* Return value: a string which represents @uri and can be displayed.
*/
gchar *
gedit_utils_uri_for_display (GFile *location)
{
return g_file_get_parse_name (location);
}
/**
* gedit_utils_drop_get_uris:
* @selection_data: the #GtkSelectionData from drag_data_received
......
......@@ -137,7 +137,6 @@ gboolean gedit_utils_get_ui_objects (const gchar *filename,
gchar *gedit_utils_make_canonical_uri_from_shell_arg
(const gchar *str);
gchar *gedit_utils_uri_for_display (GFile *location);
gchar *gedit_utils_basename_for_display (GFile *location);
gboolean gedit_utils_decode_uri (const gchar *uri,
gchar **scheme,
......
......@@ -1466,7 +1466,7 @@ update_recent_files_menu (GeditWindow *window)
/* gtk_recent_info_get_uri_display (info) is buggy and
* works only for local files */
location = g_file_new_for_uri (gtk_recent_info_get_uri (info));
uri = gedit_utils_uri_for_display (location);
uri = g_file_get_parse_name (location);
g_object_unref (location);
ruri = gedit_utils_replace_home_dir_with_tilde (uri);
g_free (uri);
......
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