/*
- * Geeqie
- * (C) 2004 John Ellis
- * Copyright (C) 2008 - 2012 The Geeqie Team
+ * Copyright (C) 2004 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
*
* Author: John Ellis
*
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "main.h"
ret = filelist_read(vd->dir_fd, NULL, &VDLIST(vd)->list);
VDLIST(vd)->list = filelist_sort(VDLIST(vd)->list, sort_type, sort_ascend);
- /* add . */
+ /* add . and .. */
+
+ if (options->file_filter.show_parent_directory && strcmp(vd->dir_fd->path, G_DIR_SEPARATOR_S) != 0)
+ {
+ filepath = g_build_filename(vd->dir_fd->path, "..", NULL);
+ fd = file_data_new_dir(filepath);
+ VDLIST(vd)->list = g_list_prepend(VDLIST(vd)->list, fd);
+ g_free(filepath);
+ }
if (options->file_filter.show_dot_directory)
{
}
vd->click_fd = fd;
- vd_color_set(vd, vd->click_fd, TRUE);
+
+ if (options->view_dir_list_single_click_enter)
+ vd_color_set(vd, vd->click_fd, TRUE);
if (bevent->button == MOUSE_BUTTON_RIGHT)
{
vd->popup = vd_pop_menu(vd, vd->click_fd);
gtk_menu_popup(GTK_MENU(vd->popup), NULL, NULL, NULL, NULL,
bevent->button, bevent->time);
+ return TRUE;
}
- return TRUE;
+ return options->view_dir_list_single_click_enter;
}
void vdlist_destroy_cb(GtkWidget *widget, gpointer data)