[nautilus] all: use g_str_has_prefix()



commit 4396a25f9a018a92fb5272649398126a91221d84
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Apr 11 11:33:55 2012 -0400

    all: use g_str_has_prefix()
    
    Instead of the eel helper.

 eel/eel-vfs-extensions.c                |    6 +++---
 libnautilus-private/nautilus-dnd.c      |    2 +-
 libnautilus-private/nautilus-icon-dnd.c |    2 +-
 src/nautilus-view.c                     |   10 +++++-----
 4 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/eel/eel-vfs-extensions.c b/eel/eel-vfs-extensions.c
index d1b9201..aac2708 100644
--- a/eel/eel-vfs-extensions.c
+++ b/eel/eel-vfs-extensions.c
@@ -43,19 +43,19 @@
 gboolean
 eel_uri_is_trash (const char *uri)
 {
-	return eel_istr_has_prefix (uri, "trash:");
+	return g_str_has_prefix (uri, "trash:");
 }
 
 gboolean
 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
 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 *
diff --git a/libnautilus-private/nautilus-dnd.c b/libnautilus-private/nautilus-dnd.c
index 5ed52f0..804ede3 100644
--- a/libnautilus-private/nautilus-dnd.c
+++ b/libnautilus-private/nautilus-dnd.c
@@ -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
 	 * it.
 	 */
-	if (!eel_istr_has_prefix (uri, "file:")) {
+	if (!g_str_has_prefix (uri, "file:")) {
 		g_string_append (result, uri);
 		g_string_append (result, "\r\n");
 	} else {
diff --git a/libnautilus-private/nautilus-icon-dnd.c b/libnautilus-private/nautilus-icon-dnd.c
index 1f8b101..eb85f1b 100644
--- a/libnautilus-private/nautilus-icon-dnd.c
+++ b/libnautilus-private/nautilus-icon-dnd.c
@@ -1019,7 +1019,7 @@ selection_is_image_file (GList *selection_list)
 		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) {
 		g_object_unref (info);
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index ea70aa4..3457f95 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -7544,11 +7544,11 @@ file_should_show_foreach (NautilusFile        *file,
 	if (nautilus_file_is_nautilus_link (file)) {
 		uri = nautilus_file_get_activation_uri (file);
 		if (uri != NULL &&
-		    (eel_istr_has_prefix (uri, "ftp:") ||
-		     eel_istr_has_prefix (uri, "ssh:") ||
-		     eel_istr_has_prefix (uri, "sftp:") ||
-		     eel_istr_has_prefix (uri, "dav:") ||
-		     eel_istr_has_prefix (uri, "davs:"))) {
+		    (g_str_has_prefix (uri, "ftp:") ||
+		     g_str_has_prefix (uri, "ssh:") ||
+		     g_str_has_prefix (uri, "sftp:") ||
+		     g_str_has_prefix (uri, "dav:") ||
+		     g_str_has_prefix (uri, "davs:"))) {
 			*show_connect = TRUE;
 		}
 		g_free (uri);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]