This request was made some years ago:
https://sourceforge.net/p/geeqie/feature-requests/70/
I have attached a patch which implements this. Also, keyboard-only users
will be able to use keyboard-accelerators to map a key to the Up function.
Unfortunately there is a usability problem. If the configuration file
geeqirc.xml exists (which it will except for first-time installations)
geeqie will not look at the programmed defaults, but will create the
toolbar from the config file - and the Up icon will not be displayed.
If the user first executes a command such as this:
sed -i '/toolitem action = "Back"/a <toolitem action = "Up" />'
~/.config/geeqie/geeqierc.xml
then all will be well.
This is not ideal, but I see no other solution.
Colin Clark
+static void layout_menu_up_cb(GtkAction *action, gpointer data)
+{
+ LayoutWindow *lw = data;
+ ViewDir *vd = lw->vd;
+ gchar *path;
+
+ if (!vd->dir_fd || strcmp(vd->dir_fd->path, G_DIR_SEPARATOR_S) == 0) return;
+ path = remove_level_from_path(vd->dir_fd->path);
+
+ if (vd->select_func)
+ {
+ FileData *fd = file_data_new_dir(path);
+ vd->select_func(vd, fd, vd->select_data);
+ file_data_unref(fd);
+ }
+
+ g_free(path);
+}
+
/*
*-----------------------------------------------------------------------------
/*
*-----------------------------------------------------------------------------
{ "LastImage", GTK_STOCK_GOTO_BOTTOM, N_("_Last Image"), "End", N_("Last Image"), CB(layout_menu_image_last_cb) },
{ "Back", GTK_STOCK_GO_BACK, N_("_Back"), NULL, N_("Back"), CB(layout_menu_back_cb) },
{ "Home", GTK_STOCK_HOME, N_("_Home"), NULL, N_("Home"), CB(layout_menu_home_cb) },
{ "LastImage", GTK_STOCK_GOTO_BOTTOM, N_("_Last Image"), "End", N_("Last Image"), CB(layout_menu_image_last_cb) },
{ "Back", GTK_STOCK_GO_BACK, N_("_Back"), NULL, N_("Back"), CB(layout_menu_back_cb) },
{ "Home", GTK_STOCK_HOME, N_("_Home"), NULL, N_("Home"), CB(layout_menu_home_cb) },
+ { "Up", GTK_STOCK_GO_UP, N_("_Up"), NULL, N_("Up"), CB(layout_menu_up_cb) },
{ "NewWindow", GTK_STOCK_NEW, N_("New _window"), "<control>N", N_("New window"), CB(layout_menu_new_window_cb) },
{ "NewCollection", GTK_STOCK_INDEX, N_("_New collection"), "C", N_("New collection"), CB(layout_menu_new_cb) },
{ "NewWindow", GTK_STOCK_NEW, N_("New _window"), "<control>N", N_("New window"), CB(layout_menu_new_window_cb) },
{ "NewCollection", GTK_STOCK_INDEX, N_("_New collection"), "C", N_("New collection"), CB(layout_menu_new_cb) },
" <menuitem action='LastImage'/>"
" <separator/>"
" <menuitem action='Back'/>"
" <menuitem action='LastImage'/>"
" <separator/>"
" <menuitem action='Back'/>"
+" <menuitem action='Up'/>"
" <menuitem action='Home'/>"
" <separator/>"
" </menu>"
" <menuitem action='Home'/>"
" <separator/>"
" </menu>"
case TOOLBAR_MAIN:
layout_toolbar_add(lw, type, "Thumbnails");
layout_toolbar_add(lw, type, "Back");
case TOOLBAR_MAIN:
layout_toolbar_add(lw, type, "Thumbnails");
layout_toolbar_add(lw, type, "Back");
+ layout_toolbar_add(lw, type, "Up");
layout_toolbar_add(lw, type, "Home");
layout_toolbar_add(lw, type, "Refresh");
layout_toolbar_add(lw, type, "ZoomIn");
layout_toolbar_add(lw, type, "Home");
layout_toolbar_add(lw, type, "Refresh");
layout_toolbar_add(lw, type, "ZoomIn");
ret = filelist_read(vd->dir_fd, NULL, &VDLIST(vd)->list);
VDLIST(vd)->list = filelist_sort(VDLIST(vd)->list, sort_type, sort_ascend);
ret = filelist_read(vd->dir_fd, NULL, &VDLIST(vd)->list);
VDLIST(vd)->list = filelist_sort(VDLIST(vd)->list, sort_type, sort_ascend);
- /* add . and .. */
-
- if (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)
{
if (options->file_filter.show_dot_directory)
{