Commit 4a673884 authored by Paolo Borelli's avatar Paolo Borelli

Remove util function now available in gio

parent 5debd84f
......@@ -1252,28 +1252,6 @@ gedit_utils_make_canonical_uri_from_shell_arg (const gchar *str)
return NULL;
}
/**
* gedit_utils_file_has_parent:
* @gfile: the GFile to check the parent for
*
* Return %TRUE if the specified gfile has a parent (is not the root), %FALSE
* otherwise
*/
gboolean
gedit_utils_file_has_parent (GFile *gfile)
{
GFile *parent;
gboolean ret;
parent = g_file_get_parent (gfile);
ret = parent != NULL;
if (parent)
g_object_unref (parent);
return ret;
}
/**
* gedit_utils_basename_for_display:
* @location: location for which the basename should be displayed
......@@ -1318,7 +1296,8 @@ gedit_utils_basename_for_display (GFile *location)
g_free (local_path);
}
}
else if (gedit_utils_file_has_parent (location) || !gedit_utils_decode_uri (uri, NULL, NULL, &hn, NULL, NULL))
else if (g_file_has_parent (location, NULL) ||
!gedit_utils_decode_uri (uri, NULL, NULL, &hn, NULL, NULL))
{
/* For remote files with a parent (so not just http://foo.com)
or remote file for which the decoding of the host name fails,
......
......@@ -132,19 +132,17 @@ void gedit_utils_activate_url (GtkAboutDialog *about,
gboolean gedit_utils_is_valid_location (GFile *location);
gboolean gedit_utils_get_ui_objects (const gchar *filename,
gchar **root_objects,
gchar **root_objects,
GtkWidget **error_widget,
const gchar *object_name,
...) G_GNUC_NULL_TERMINATED;
gboolean gedit_utils_file_has_parent (GFile *gfile);
/* Return NULL if str is not a valid URI and/or 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);
gchar *gedit_utils_basename_for_display (GFile *location);
gboolean gedit_utils_decode_uri (const gchar *uri,
gchar **scheme,
gchar **user,
......@@ -154,7 +152,7 @@ gboolean gedit_utils_decode_uri (const gchar *uri,
/* Turns data from a drop into a list of well formatted uris */
gchar **gedit_utils_drop_get_uris (GtkSelectionData *selection_data);
gchar **gedit_utils_drop_get_uris (GtkSelectionData *selection_data);
gboolean gedit_utils_can_read_from_stdin (void);
......
......@@ -688,7 +688,8 @@ insert_location_path (GeditFileBrowserWidget *obj)
obj);
}
if (g_file_equal (current, loc->root) || !gedit_utils_file_has_parent (current))
if (g_file_equal (current, loc->root) ||
!g_file_has_parent (current, NULL))
{
if (current != loc->virtual_root)
g_object_unref (current);
......
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