[nautilus] all: don't use eel_strcmp()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] all: don't use eel_strcmp()
- Date: Wed, 5 Oct 2011 16:32:11 +0000 (UTC)
commit 3daaaf4a9efa2913bbfbadf1492e670b3e83c4a0
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Oct 5 12:25:53 2011 -0400
all: don't use eel_strcmp()
eel/eel-glib-extensions.c | 2 +-
libnautilus-private/nautilus-bookmark.c | 4 +-
libnautilus-private/nautilus-directory.c | 2 +-
libnautilus-private/nautilus-file.c | 36 +++++++++++-----------
libnautilus-private/nautilus-icon-canvas-item.c | 6 ++--
libnautilus-private/nautilus-progress-info.c | 8 ++--
src/nautilus-properties-window.c | 2 +-
src/nautilus-window-slot.c | 2 +-
8 files changed, 31 insertions(+), 31 deletions(-)
---
diff --git a/eel/eel-glib-extensions.c b/eel/eel-glib-extensions.c
index 3190dc1..d6fee1a 100644
--- a/eel/eel-glib-extensions.c
+++ b/eel/eel-glib-extensions.c
@@ -297,7 +297,7 @@ eel_g_str_list_equal (GList *list_a, GList *list_b)
GList *p, *q;
for (p = list_a, q = list_b; p != NULL && q != NULL; p = p->next, q = q->next) {
- if (eel_strcmp (p->data, q->data) != 0) {
+ if (g_strcmp0 (p->data, q->data) != 0) {
return FALSE;
}
}
diff --git a/libnautilus-private/nautilus-bookmark.c b/libnautilus-private/nautilus-bookmark.c
index 914bea8..4b4affc 100644
--- a/libnautilus-private/nautilus-bookmark.c
+++ b/libnautilus-private/nautilus-bookmark.c
@@ -491,8 +491,8 @@ nautilus_bookmark_compare_with (gconstpointer a, gconstpointer b)
return 1;
}
- if (eel_strcmp (bookmark_a->details->name,
- bookmark_b->details->name) != 0) {
+ if (g_strcmp0 (bookmark_a->details->name,
+ bookmark_b->details->name) != 0) {
return 1;
}
diff --git a/libnautilus-private/nautilus-directory.c b/libnautilus-private/nautilus-directory.c
index 3f50e44..9038b49 100644
--- a/libnautilus-private/nautilus-directory.c
+++ b/libnautilus-private/nautilus-directory.c
@@ -702,7 +702,7 @@ nautilus_directory_find_file_by_internal_filename (NautilusDirectory *directory,
{
NautilusFile *result;
- if (eel_strcmp (internal_filename, ".") == 0) {
+ if (g_strcmp0 (internal_filename, ".") == 0) {
result = nautilus_directory_get_existing_corresponding_file (directory);
if (result != NULL) {
nautilus_file_unref (result);
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index 3dcc926..e69a794 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -220,12 +220,12 @@ nautilus_file_set_display_name (NautilusFile *file,
changed = FALSE;
- if (eel_strcmp (eel_ref_str_peek (file->details->display_name), display_name) != 0) {
+ if (g_strcmp0 (eel_ref_str_peek (file->details->display_name), display_name) != 0) {
changed = TRUE;
eel_ref_str_unref (file->details->display_name);
- if (eel_strcmp (eel_ref_str_peek (file->details->name), display_name) == 0) {
+ if (g_strcmp0 (eel_ref_str_peek (file->details->name), display_name) == 0) {
file->details->display_name = eel_ref_str_ref (file->details->name);
} else {
file->details->display_name = eel_ref_str_new (display_name);
@@ -235,11 +235,11 @@ nautilus_file_set_display_name (NautilusFile *file,
file->details->display_name_collation_key = g_utf8_collate_key_for_filename (display_name, -1);
}
- if (eel_strcmp (eel_ref_str_peek (file->details->edit_name), edit_name) != 0) {
+ if (g_strcmp0 (eel_ref_str_peek (file->details->edit_name), edit_name) != 0) {
changed = TRUE;
eel_ref_str_unref (file->details->edit_name);
- if (eel_strcmp (eel_ref_str_peek (file->details->display_name), edit_name) == 0) {
+ if (g_strcmp0 (eel_ref_str_peek (file->details->display_name), edit_name) == 0) {
file->details->edit_name = eel_ref_str_ref (file->details->display_name);
} else {
file->details->edit_name = eel_ref_str_new (edit_name);
@@ -2316,19 +2316,19 @@ update_info_internal (NautilusFile *file,
file->details->uid = uid;
file->details->gid = gid;
- if (eel_strcmp (eel_ref_str_peek (file->details->owner), owner) != 0) {
+ if (g_strcmp0 (eel_ref_str_peek (file->details->owner), owner) != 0) {
changed = TRUE;
eel_ref_str_unref (file->details->owner);
file->details->owner = eel_ref_str_get_unique (owner);
}
- if (eel_strcmp (eel_ref_str_peek (file->details->owner_real), owner_real) != 0) {
+ if (g_strcmp0 (eel_ref_str_peek (file->details->owner_real), owner_real) != 0) {
changed = TRUE;
eel_ref_str_unref (file->details->owner_real);
file->details->owner_real = eel_ref_str_get_unique (owner_real);
}
- if (eel_strcmp (eel_ref_str_peek (file->details->group), group) != 0) {
+ if (g_strcmp0 (eel_ref_str_peek (file->details->group), group) != 0) {
changed = TRUE;
eel_ref_str_unref (file->details->group);
file->details->group = eel_ref_str_get_unique (group);
@@ -2390,7 +2390,7 @@ update_info_internal (NautilusFile *file,
}
thumbnail_path = g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_THUMBNAIL_PATH);
- if (eel_strcmp (file->details->thumbnail_path, thumbnail_path) != 0) {
+ if (g_strcmp0 (file->details->thumbnail_path, thumbnail_path) != 0) {
changed = TRUE;
g_free (file->details->thumbnail_path);
file->details->thumbnail_path = g_strdup (thumbnail_path);
@@ -2403,35 +2403,35 @@ update_info_internal (NautilusFile *file,
}
symlink_name = g_file_info_get_symlink_target (info);
- if (eel_strcmp (file->details->symlink_name, symlink_name) != 0) {
+ if (g_strcmp0 (file->details->symlink_name, symlink_name) != 0) {
changed = TRUE;
g_free (file->details->symlink_name);
file->details->symlink_name = g_strdup (symlink_name);
}
mime_type = g_file_info_get_content_type (info);
- if (eel_strcmp (eel_ref_str_peek (file->details->mime_type), mime_type) != 0) {
+ if (g_strcmp0 (eel_ref_str_peek (file->details->mime_type), mime_type) != 0) {
changed = TRUE;
eel_ref_str_unref (file->details->mime_type);
file->details->mime_type = eel_ref_str_get_unique (mime_type);
}
selinux_context = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_SELINUX_CONTEXT);
- if (eel_strcmp (file->details->selinux_context, selinux_context) != 0) {
+ if (g_strcmp0 (file->details->selinux_context, selinux_context) != 0) {
changed = TRUE;
g_free (file->details->selinux_context);
file->details->selinux_context = g_strdup (selinux_context);
}
description = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION);
- if (eel_strcmp (file->details->description, description) != 0) {
+ if (g_strcmp0 (file->details->description, description) != 0) {
changed = TRUE;
g_free (file->details->description);
file->details->description = g_strdup (description);
}
filesystem_id = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_ID_FILESYSTEM);
- if (eel_strcmp (eel_ref_str_peek (file->details->filesystem_id), filesystem_id) != 0) {
+ if (g_strcmp0 (eel_ref_str_peek (file->details->filesystem_id), filesystem_id) != 0) {
changed = TRUE;
eel_ref_str_unref (file->details->filesystem_id);
file->details->filesystem_id = eel_ref_str_get_unique (filesystem_id);
@@ -2449,7 +2449,7 @@ update_info_internal (NautilusFile *file,
}
trash_orig_path = g_file_info_get_attribute_byte_string (info, "trash::orig-path");
- if (eel_strcmp (file->details->trash_orig_path, trash_orig_path) != 0) {
+ if (g_strcmp0 (file->details->trash_orig_path, trash_orig_path) != 0) {
changed = TRUE;
g_free (file->details->trash_orig_path);
file->details->trash_orig_path = g_strdup (trash_orig_path);
@@ -2468,8 +2468,8 @@ update_info_internal (NautilusFile *file,
(file->details->directory, file);
eel_ref_str_unref (file->details->name);
- if (eel_strcmp (eel_ref_str_peek (file->details->display_name),
- name) == 0) {
+ if (g_strcmp0 (eel_ref_str_peek (file->details->display_name),
+ name) == 0) {
file->details->name = eel_ref_str_ref (file->details->display_name);
} else {
file->details->name = eel_ref_str_new (name);
@@ -5155,8 +5155,8 @@ get_real_name (const char *name, const char *gecos)
if (eel_str_is_empty (real_name)
- || eel_strcmp (name, real_name) == 0
- || eel_strcmp (capitalized_login_name, real_name) == 0) {
+ || g_strcmp0 (name, real_name) == 0
+ || g_strcmp0 (capitalized_login_name, real_name) == 0) {
g_free (real_name);
real_name = NULL;
}
diff --git a/libnautilus-private/nautilus-icon-canvas-item.c b/libnautilus-private/nautilus-icon-canvas-item.c
index 87373b4..6445981 100644
--- a/libnautilus-private/nautilus-icon-canvas-item.c
+++ b/libnautilus-private/nautilus-icon-canvas-item.c
@@ -307,7 +307,7 @@ nautilus_icon_canvas_item_set_property (GObject *object,
switch (property_id) {
case PROP_EDITABLE_TEXT:
- if (eel_strcmp (details->editable_text,
+ if (g_strcmp0 (details->editable_text,
g_value_get_string (value)) == 0) {
return;
}
@@ -328,8 +328,8 @@ nautilus_icon_canvas_item_set_property (GObject *object,
break;
case PROP_ADDITIONAL_TEXT:
- if (eel_strcmp (details->additional_text,
- g_value_get_string (value)) == 0) {
+ if (g_strcmp0 (details->additional_text,
+ g_value_get_string (value)) == 0) {
return;
}
diff --git a/libnautilus-private/nautilus-progress-info.c b/libnautilus-private/nautilus-progress-info.c
index b66e8b1..56aabcd 100644
--- a/libnautilus-private/nautilus-progress-info.c
+++ b/libnautilus-private/nautilus-progress-info.c
@@ -458,7 +458,7 @@ nautilus_progress_info_take_status (NautilusProgressInfo *info,
{
G_LOCK (progress_info);
- if (eel_strcmp (info->status, status) != 0) {
+ if (g_strcmp0 (info->status, status) != 0) {
g_free (info->status);
info->status = status;
@@ -477,7 +477,7 @@ nautilus_progress_info_set_status (NautilusProgressInfo *info,
{
G_LOCK (progress_info);
- if (eel_strcmp (info->status, status) != 0) {
+ if (g_strcmp0 (info->status, status) != 0) {
g_free (info->status);
info->status = g_strdup (status);
@@ -495,7 +495,7 @@ nautilus_progress_info_take_details (NautilusProgressInfo *info,
{
G_LOCK (progress_info);
- if (eel_strcmp (info->details, details) != 0) {
+ if (g_strcmp0 (info->details, details) != 0) {
g_free (info->details);
info->details = details;
@@ -514,7 +514,7 @@ nautilus_progress_info_set_details (NautilusProgressInfo *info,
{
G_LOCK (progress_info);
- if (eel_strcmp (info->details, details) != 0) {
+ if (g_strcmp0 (info->details, details) != 0) {
g_free (info->details);
info->details = g_strdup (details);
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 8a70bb0..2aea6f7 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -687,7 +687,7 @@ update_name_field (NautilusPropertiesWindow *window)
set_name_field (window, original_name, current_name);
if (original_name == NULL ||
- eel_strcmp (original_name, current_name) != 0) {
+ g_strcmp0 (original_name, current_name) != 0) {
g_object_set_data_full (G_OBJECT (window->details->name_field),
"original_name",
current_name,
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 4feb973..2ce7632 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -352,7 +352,7 @@ nautilus_window_slot_set_title (NautilusWindowSlot *slot,
changed = FALSE;
- if (eel_strcmp (title, slot->title) != 0) {
+ if (g_strcmp0 (title, slot->title) != 0) {
changed = TRUE;
g_free (slot->title);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]