Commit 4396a25f authored by Cosimo Cecchi's avatar Cosimo Cecchi

all: use g_str_has_prefix()

Instead of the eel helper.
parent f9a02d23
...@@ -43,19 +43,19 @@ ...@@ -43,19 +43,19 @@
gboolean gboolean
eel_uri_is_trash (const char *uri) eel_uri_is_trash (const char *uri)
{ {
return eel_istr_has_prefix (uri, "trash:"); return g_str_has_prefix (uri, "trash:");
} }
gboolean gboolean
eel_uri_is_search (const char *uri) eel_uri_is_search (const char *uri)
{ {
return eel_istr_has_prefix (uri, EEL_SEARCH_URI); return g_str_has_prefix (uri, EEL_SEARCH_URI);
} }
gboolean gboolean
eel_uri_is_desktop (const char *uri) eel_uri_is_desktop (const char *uri)
{ {
return eel_istr_has_prefix (uri, EEL_DESKTOP_URI); return g_str_has_prefix (uri, EEL_DESKTOP_URI);
} }
char * char *
......
...@@ -627,7 +627,7 @@ add_one_compatible_uri (const char *uri, int x, int y, int w, int h, gpointer da ...@@ -627,7 +627,7 @@ add_one_compatible_uri (const char *uri, int x, int y, int w, int h, gpointer da
* gnome-libs function or nothing will be able to understand * gnome-libs function or nothing will be able to understand
* it. * it.
*/ */
if (!eel_istr_has_prefix (uri, "file:")) { if (!g_str_has_prefix (uri, "file:")) {
g_string_append (result, uri); g_string_append (result, uri);
g_string_append (result, "\r\n"); g_string_append (result, "\r\n");
} else { } else {
......
...@@ -1019,7 +1019,7 @@ selection_is_image_file (GList *selection_list) ...@@ -1019,7 +1019,7 @@ selection_is_image_file (GList *selection_list)
mime_type = g_file_info_get_content_type (info); mime_type = g_file_info_get_content_type (info);
} }
result = eel_istr_has_prefix (mime_type, "image/"); result = g_str_has_prefix (mime_type, "image/");
if (info) { if (info) {
g_object_unref (info); g_object_unref (info);
......
...@@ -7544,11 +7544,11 @@ file_should_show_foreach (NautilusFile *file, ...@@ -7544,11 +7544,11 @@ file_should_show_foreach (NautilusFile *file,
if (nautilus_file_is_nautilus_link (file)) { if (nautilus_file_is_nautilus_link (file)) {
uri = nautilus_file_get_activation_uri (file); uri = nautilus_file_get_activation_uri (file);
if (uri != NULL && if (uri != NULL &&
(eel_istr_has_prefix (uri, "ftp:") || (g_str_has_prefix (uri, "ftp:") ||
eel_istr_has_prefix (uri, "ssh:") || g_str_has_prefix (uri, "ssh:") ||
eel_istr_has_prefix (uri, "sftp:") || g_str_has_prefix (uri, "sftp:") ||
eel_istr_has_prefix (uri, "dav:") || g_str_has_prefix (uri, "dav:") ||
eel_istr_has_prefix (uri, "davs:"))) { g_str_has_prefix (uri, "davs:"))) {
*show_connect = TRUE; *show_connect = TRUE;
} }
g_free (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