[gnome-commander] noop: code cleanup
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] noop: code cleanup
- Date: Sun, 21 Nov 2010 22:42:05 +0000 (UTC)
commit 6d8beabd08c43f609a3b2c5a8cc5e477d13d1f57
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sun Nov 21 23:41:52 2010 +0100
noop: code cleanup
src/gnome-cmd-file-list.cc | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 90815eb..0509e0a 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -2848,13 +2848,9 @@ static void drag_data_received (GtkWidget *widget, GdkDragContext *context, gint
if (f && f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
{
- /* The drop was over a directory in the list, which means that the
- * xfer should be done to that directory instead of the current one in the list
- */
- if (strcmp (f->info->name, "..") == 0)
- to = gnome_cmd_dir_get_parent (cwd);
- else
- to = gnome_cmd_dir_get_child (cwd, f->info->name);
+ // The drop was over a directory in the list, which means that the
+ // xfer should be done to that directory instead of the current one in the list
+ to = f->is_dotdot ? gnome_cmd_dir_get_parent (cwd) : gnome_cmd_dir_get_child (cwd, f->info->name);
}
else
to = cwd;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]