[nautilus] view: use g_list_length()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] view: use g_list_length()
- Date: Wed, 11 Apr 2012 16:15:49 +0000 (UTC)
commit 2aca9d4010502dbed929d24ef03d596fc7174ead
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Apr 11 10:53:33 2012 -0400
view: use g_list_length()
Instead of the eel helpers.
src/nautilus-desktop-icon-view.c | 2 +-
src/nautilus-view.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-desktop-icon-view.c b/src/nautilus-desktop-icon-view.c
index 7f09095..805a149 100644
--- a/src/nautilus-desktop-icon-view.c
+++ b/src/nautilus-desktop-icon-view.c
@@ -677,7 +677,7 @@ trash_link_is_selection (NautilusView *view)
selection = nautilus_view_get_selection (view);
- if (eel_g_list_exactly_one_item (selection) &&
+ if ((g_list_length (selection) == 1) &&
NAUTILUS_IS_DESKTOP_ICON_FILE (selection->data)) {
link = nautilus_desktop_icon_file_get_link (NAUTILUS_DESKTOP_ICON_FILE (selection->data));
/* link may be NULL if the link was recently removed (unmounted) */
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index c17ff99..a053141 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -976,7 +976,7 @@ nautilus_view_confirm_multiple (GtkWindow *parent_window,
static gboolean
selection_contains_one_item_in_menu_callback (NautilusView *view, GList *selection)
{
- if (eel_g_list_exactly_one_item (selection)) {
+ if (g_list_length (selection) == 1) {
return TRUE;
}
@@ -6693,7 +6693,7 @@ action_connect_to_server_link_callback (GtkAction *action,
selection = nautilus_view_get_selection (view);
- if (!eel_g_list_exactly_one_item (selection)) {
+ if (g_list_length (selection) != 1) {
nautilus_file_list_free (selection);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]