summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Boles <dboles@src.gnome.org>2016-11-29 20:20:24 +0000
committerDaniel Boles <dboles@src.gnome.org>2016-11-29 20:20:24 +0000
commit3050a9c6e2131aa96faf3516e86711ad0dd4c0c1 (patch)
tree032f820ce6a176e1476b465d6303e59a655505fb
parentc0cdf8b9ffa419d95c122d0c682a2f2a240dc34e (diff)
downloadnautilus-3050a9c6e2131aa96faf3516e86711ad0dd4c0c1.tar.gz
files-view: remove an unnecessary helper function
selection_not_empty_in_menu_callback was simply a verbose way to test whether the selection GList was NULL, which is tidier to just do inline. The call giving this function its name would be out-of-order if it were really needed, but it's not since can_set_wallpaper already checks this.
-rw-r--r--src/nautilus-files-view.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 6f0c2d2aa..dffcc643c 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1067,18 +1067,6 @@ nautilus_files_view_confirm_multiple (GtkWindow *parent_window,
return response == GTK_RESPONSE_YES;
}
-static gboolean
-selection_not_empty_in_menu_callback (NautilusFilesView *view,
- GList *selection)
-{
- if (selection != NULL)
- {
- return TRUE;
- }
-
- return FALSE;
-}
-
static char *
get_view_directory (NautilusFilesView *view)
{
@@ -5919,7 +5907,7 @@ real_action_rename (NautilusFilesView *view)
selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
- if (selection_not_empty_in_menu_callback (view, selection))
+ if (selection != NULL)
{
/* If there is more than one file selected, invoke a batch renamer */
if (selection->next != NULL)
@@ -6318,8 +6306,7 @@ action_set_as_wallpaper (GSimpleAction *action,
selection = nautilus_view_get_selection (user_data);
- if (can_set_wallpaper (selection)
- && selection_not_empty_in_menu_callback (user_data, selection))
+ if (can_set_wallpaper (selection))
{
NautilusFile *file;
char *target_uri;