summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file-dnd.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-05-02 01:09:20 +0200
committerraveit65 <[email protected]>2019-05-06 13:53:37 +0200
commita110c542bd7a16625f03c97e2fefa3be8da50c85 (patch)
tree7af078f9084b33eb0d5df7f3657a1f8049ff6b83 /libcaja-private/caja-file-dnd.c
parent476f56a25be636970b336d525a7766b6d1eb3fff (diff)
downloadcaja-a110c542bd7a16625f03c97e2fefa3be8da50c85.tar.bz2
caja-a110c542bd7a16625f03c97e2fefa3be8da50c85.tar.xz
libcaja-private: reduce the scope of some variables
Diffstat (limited to 'libcaja-private/caja-file-dnd.c')
-rw-r--r--libcaja-private/caja-file-dnd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libcaja-private/caja-file-dnd.c b/libcaja-private/caja-file-dnd.c
index 061019e9..e5322486 100644
--- a/libcaja-private/caja-file-dnd.c
+++ b/libcaja-private/caja-file-dnd.c
@@ -35,10 +35,9 @@
static gboolean
caja_drag_can_accept_files (CajaFile *drop_target_item)
{
- CajaDirectory *directory;
-
if (caja_file_is_directory (drop_target_item))
{
+ CajaDirectory *directory;
gboolean res;
/* target is a directory, accept if editable */
@@ -154,7 +153,7 @@ void
caja_drag_file_receive_dropped_keyword (CajaFile *file,
const char *keyword)
{
- GList *keywords, *word;
+ GList *keywords;
g_return_if_fail (CAJA_IS_FILE (file));
g_return_if_fail (keyword != NULL);
@@ -166,6 +165,8 @@ caja_drag_file_receive_dropped_keyword (CajaFile *file,
}
else
{
+ GList *word;
+
keywords = caja_file_get_keywords (file);
word = g_list_find_custom (keywords, keyword, (GCompareFunc) strcmp);
if (word == NULL)