Sort headers using clang-tidy
[geeqie.git] / src / layout-util.cc
index 503c48a..ee9f68f 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include "main.h"
 #include "layout-util.h"
 
+#include <sys/wait.h>
+
+#include <config.h>
+
 #include "advanced-exif.h"
+#include "bar-keywords.h"
 #include "bar-sort.h"
 #include "bar.h"
-#include "bar-keywords.h"
 #include "cache-maint.h"
-#include "collect.h"
 #include "collect-dlg.h"
+#include "collect-io.h"
+#include "collect.h"
 #include "color-man.h"
+#include "compat.h"
+#include "debug.h"
+#include "desktop-file.h"
 #include "dupe.h"
 #include "editors.h"
+#include "filedata.h"
+#include "fullscreen.h"
+#include "histogram.h"
 #include "history-list.h"
-#include "image.h"
 #include "image-overlay.h"
-#include "histogram.h"
+#include "image.h"
 #include "img-view.h"
+#include "intl.h"
+#include "keymap-template.h"
 #include "layout-image.h"
 #include "logwindow.h"
+#include "main-defines.h"
+#include "main.h"
+#include "metadata.h"
 #include "misc.h"
 #include "pan-view.h"
 #include "pixbuf-util.h"
 #include "preferences.h"
 #include "print.h"
 #include "rcfile.h"
-#include "search.h"
 #include "search-and-run.h"
+#include "search.h"
 #include "slideshow.h"
 #include "ui-fileops.h"
 #include "ui-menu.h"
 #include "view-dir.h"
 #include "view-file.h"
 #include "window.h"
-#include "metadata.h"
-#include "desktop-file.h"
-
-#include <sys/wait.h>
-#include "keymap-template.h"
 
-#define MENU_EDIT_ACTION_OFFSET 16
-#define FILE_COLUMN_POINTER 0
+enum {
+       MENU_EDIT_ACTION_OFFSET = 16,
+       FILE_COLUMN_POINTER = 0
+};
 
 static gboolean layout_bar_enabled(LayoutWindow *lw);
 static gboolean layout_bar_sort_enabled(LayoutWindow *lw);
@@ -97,7 +108,7 @@ static gboolean layout_key_match(guint keyval)
 
 gboolean layout_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        GtkWidget *focused;
        gboolean stop_signal = FALSE;
        gint x = 0;
@@ -107,13 +118,13 @@ gboolean layout_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer dat
                {
                if (event->keyval == GDK_KEY_Escape && lw->dir_fd)
                        {
-                       gtk_entry_set_text(GTK_ENTRY(lw->path_entry), lw->dir_fd->path);
+                       gq_gtk_entry_set_text(GTK_ENTRY(lw->path_entry), lw->dir_fd->path);
                        }
 
                /* the gtkaccelgroup of the window is stealing presses before they get to the entry (and more),
                 * so when the some widgets have focus, give them priority (HACK)
                 */
-               if (gtk_widget_event(lw->path_entry, (GdkEvent *)event))
+               if (gtk_widget_event(lw->path_entry, reinterpret_cast<GdkEvent *>(event)))
                        {
                        return TRUE;
                        }
@@ -121,7 +132,7 @@ gboolean layout_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer dat
 
        if (lw->vf->file_filter.combo && gtk_widget_has_focus(gtk_bin_get_child(GTK_BIN(lw->vf->file_filter.combo))))
                {
-               if (gtk_widget_event(gtk_bin_get_child(GTK_BIN(lw->vf->file_filter.combo)), (GdkEvent *)event))
+               if (gtk_widget_event(gtk_bin_get_child(GTK_BIN(lw->vf->file_filter.combo)), reinterpret_cast<GdkEvent *>(event)))
                        {
                        return TRUE;
                        }
@@ -129,12 +140,12 @@ gboolean layout_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer dat
 
        if (lw->vd && lw->options.dir_view_type == DIRVIEW_TREE && gtk_widget_has_focus(lw->vd->view) &&
            !layout_key_match(event->keyval) &&
-           gtk_widget_event(lw->vd->view, (GdkEvent *)event))
+           gtk_widget_event(lw->vd->view, reinterpret_cast<GdkEvent *>(event)))
                {
                return TRUE;
                }
        if (lw->bar &&
-           bar_event(lw->bar, (GdkEvent *)event))
+           bar_event(lw->bar, reinterpret_cast<GdkEvent *>(event)))
                {
                return TRUE;
                }
@@ -217,318 +228,335 @@ static void layout_exit_fullscreen(LayoutWindow *lw)
        layout_image_full_screen_stop(lw);
 }
 
-static void clear_marks_cancel_cb(GenericDialog *gd, gpointer UNUSED(data))
+static void clear_marks_cancel_cb(GenericDialog *gd, gpointer)
 {
        generic_dialog_close(gd);
 }
 
-static void clear_marks_help_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
+static void clear_marks_help_cb(GenericDialog *, gpointer)
 {
        help_window_show("GuideMainWindowMenus.html");
 }
 
-void layout_menu_clear_marks_ok_cb(GenericDialog *gd, gpointer UNUSED(data))
+void layout_menu_clear_marks_ok_cb(GenericDialog *gd, gpointer)
 {
        marks_clear_all();
        generic_dialog_close(gd);
 }
 
-static void layout_menu_clear_marks_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
+static void layout_menu_clear_marks_cb(GtkAction *, gpointer)
 {
        GenericDialog *gd;
 
        gd = generic_dialog_new(_("Clear Marks"),
-                               "marks_clear", NULL, FALSE, clear_marks_cancel_cb, NULL);
-       generic_dialog_add_message(gd, GTK_STOCK_DIALOG_QUESTION, "Clear all marks?",
+                               "marks_clear", nullptr, FALSE, clear_marks_cancel_cb, nullptr);
+       generic_dialog_add_message(gd, GQ_ICON_DIALOG_QUESTION, "Clear all marks?",
                                "This will clear all marks for all images,\nincluding those linked to keywords",
                                TRUE);
-       generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, layout_menu_clear_marks_ok_cb, TRUE);
-       generic_dialog_add_button(gd, GTK_STOCK_HELP, NULL,
+       generic_dialog_add_button(gd, GQ_ICON_OK, "OK", layout_menu_clear_marks_ok_cb, TRUE);
+       generic_dialog_add_button(gd, GQ_ICON_HELP, _("Help"),
                                clear_marks_help_cb, FALSE);
 
        gtk_widget_show(gd->dialog);
 }
 
-static void layout_menu_new_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_new_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
-       collection_window_new(NULL);
+       collection_window_new(nullptr);
 }
 
-static void layout_menu_open_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_open_cb(GtkAction *widget, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
+       gchar *path;
+       gint n;
+       GList *collection_list = nullptr;
 
        layout_exit_fullscreen(lw);
-       collection_dialog_load(NULL);
+
+       n = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "recent_index"));
+       collect_manager_list(nullptr, nullptr, &collection_list);
+
+       path = static_cast<gchar *>(g_list_nth_data(collection_list, n));
+
+       if (path)
+               {
+               /* make a copy of it */
+               path = g_strdup(path);
+               collection_window_new(path);
+               g_free(path);
+               }
+
+       string_list_free(collection_list);
 }
 
-static void layout_menu_search_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_search_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        search_new(lw->dir_fd, layout_image_get_fd(lw));
 }
 
-static void layout_menu_dupes_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_dupes_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        dupe_window_new();
 }
 
-static void layout_menu_pan_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_pan_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        pan_window_new(lw->dir_fd);
 }
 
-static void layout_menu_print_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_print_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        print_window_new(layout_image_get_fd(lw), layout_selection_list(lw), layout_list(lw), layout_window(lw));
 }
 
-static void layout_menu_dir_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_dir_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        if (lw->vd) vd_new_folder(lw->vd, lw->dir_fd);
 }
 
-static void layout_menu_copy_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_copy_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
-       file_util_copy(NULL, layout_selection_list(lw), NULL, layout_window(lw));
+       file_util_copy(nullptr, layout_selection_list(lw), nullptr, layout_window(lw));
 }
 
-static void layout_menu_copy_path_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_copy_path_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        file_util_copy_path_list_to_clipboard(layout_selection_list(lw), TRUE);
 }
 
-static void layout_menu_copy_path_unquoted_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_copy_path_unquoted_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        file_util_copy_path_list_to_clipboard(layout_selection_list(lw), FALSE);
 }
 
-static void layout_menu_move_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_move_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
-       file_util_move(NULL, layout_selection_list(lw), NULL, layout_window(lw));
+       file_util_move(nullptr, layout_selection_list(lw), nullptr, layout_window(lw));
 }
 
-static void layout_menu_rename_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_rename_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
-       file_util_rename(NULL, layout_selection_list(lw), layout_window(lw));
+       file_util_rename(nullptr, layout_selection_list(lw), layout_window(lw));
 }
 
-static void layout_menu_delete_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_delete_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        options->file_ops.safe_delete_enable = FALSE;
-       file_util_delete(NULL, layout_selection_list(lw), layout_window(lw));
+       file_util_delete(nullptr, layout_selection_list(lw), layout_window(lw));
 }
 
-static void layout_menu_move_to_trash_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_move_to_trash_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        options->file_ops.safe_delete_enable = TRUE;
-       file_util_delete(NULL, layout_selection_list(lw), layout_window(lw));
+       file_util_delete(nullptr, layout_selection_list(lw), layout_window(lw));
 }
 
-static void layout_menu_move_to_trash_key_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_move_to_trash_key_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        if (options->file_ops.enable_delete_key)
                {
                options->file_ops.safe_delete_enable = TRUE;
-               file_util_delete(NULL, layout_selection_list(lw), layout_window(lw));
+               file_util_delete(nullptr, layout_selection_list(lw), layout_window(lw));
                }
 }
 
-static void layout_menu_disable_grouping_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_disable_grouping_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        file_data_disable_grouping_list(layout_selection_list(lw), TRUE);
 }
 
-static void layout_menu_enable_grouping_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_enable_grouping_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        file_data_disable_grouping_list(layout_selection_list(lw), FALSE);
 }
 
-void layout_menu_close_cb(GtkAction *UNUSED(action), gpointer data)
+void layout_menu_close_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        layout_close(lw);
 }
 
-static void layout_menu_exit_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
+static void layout_menu_exit_cb(GtkAction *, gpointer)
 {
        exit_program();
 }
 
-static void layout_menu_alter_90_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_alter_90_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_alter_orientation(lw, ALTER_ROTATE_90);
 }
 
-static void layout_menu_rating_0_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_rating_0_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_rating(lw, "0");
 }
 
-static void layout_menu_rating_1_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_rating_1_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_rating(lw, "1");
 }
 
-static void layout_menu_rating_2_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_rating_2_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_rating(lw, "2");
 }
 
-static void layout_menu_rating_3_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_rating_3_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_rating(lw, "3");
 }
 
-static void layout_menu_rating_4_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_rating_4_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_rating(lw, "4");
 }
 
-static void layout_menu_rating_5_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_rating_5_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_rating(lw, "5");
 }
 
-static void layout_menu_rating_m1_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_rating_m1_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_rating(lw, "-1");
 }
 
-static void layout_menu_alter_90cc_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_alter_90cc_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_alter_orientation(lw, ALTER_ROTATE_90_CC);
 }
 
-static void layout_menu_alter_180_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_alter_180_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_alter_orientation(lw, ALTER_ROTATE_180);
 }
 
-static void layout_menu_alter_mirror_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_alter_mirror_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_alter_orientation(lw, ALTER_MIRROR);
 }
 
-static void layout_menu_alter_flip_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_alter_flip_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_alter_orientation(lw, ALTER_FLIP);
 }
 
 static void layout_menu_alter_desaturate_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_set_desaturate(lw, gtk_toggle_action_get_active(action));
 }
 
 static void layout_menu_alter_ignore_alpha_cb(GtkToggleAction *action, gpointer data)
 {
-   LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+   auto lw = static_cast<LayoutWindow *>(data);
 
        if (lw->options.ignore_alpha == gtk_toggle_action_get_active(action)) return;
 
    layout_image_set_ignore_alpha(lw, gtk_toggle_action_get_active(action));
 }
 
-static void layout_menu_alter_none_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_alter_none_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_alter_orientation(lw, ALTER_NONE);
 }
 
 static void layout_menu_exif_rotate_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        options->image.exif_rotate_enable = gtk_toggle_action_get_active(action);
        layout_image_reset_orientation(lw);
 }
 
-static void layout_menu_select_rectangle_cb(GtkToggleAction *action, gpointer UNUSED(data))
+static void layout_menu_select_rectangle_cb(GtkToggleAction *action, gpointer)
 {
        options->draw_rectangle = gtk_toggle_action_get_active(action);
 }
 
 static void layout_menu_split_pane_sync_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        lw->options.split_pane_sync = gtk_toggle_action_get_active(action);
 }
 
 static void layout_menu_select_overunderexposed_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_set_overunderexposed(lw, gtk_toggle_action_get_active(action));
 }
 
-static void layout_menu_write_rotate(GtkToggleAction *UNUSED(action), gpointer data, gboolean keep_date)
+static void layout_menu_write_rotate(GtkToggleAction *, gpointer data, gboolean keep_date)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        GtkTreeModel *store;
        GList *work;
        GtkTreeSelection *selection;
@@ -583,8 +611,7 @@ static void layout_menu_write_rotate(GtkToggleAction *UNUSED(action), gpointer d
                        }
                else
                        {
-                       message = g_string_new("");
-                       message = g_string_append(message, _("Operation failed:\n"));
+                       message = g_string_new(_("Operation failed:\n"));
 
                        if (run_result == 1)
                                message = g_string_append(message, _("No file extension\n"));
@@ -602,10 +629,10 @@ static void layout_menu_write_rotate(GtkToggleAction *UNUSED(action), gpointer d
                        message = g_string_append(message, fd_n->name);
 
                        gd = generic_dialog_new(_("Image orientation"),
-                       "Image orientation", NULL, TRUE, NULL, NULL);
-                       generic_dialog_add_message(gd, GTK_STOCK_DIALOG_ERROR,
+                       "Image orientation", nullptr, TRUE, nullptr, nullptr);
+                       generic_dialog_add_message(gd, GQ_ICON_DIALOG_ERROR,
                        "Image orientation", message->str, TRUE);
-                       generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, NULL, TRUE);
+                       generic_dialog_add_button(gd, GQ_ICON_OK, "OK", nullptr, TRUE);
 
                        gtk_widget_show(gd->dialog);
 
@@ -627,244 +654,244 @@ static void layout_menu_write_rotate_cb(GtkToggleAction *action, gpointer data)
        layout_menu_write_rotate(action, data, FALSE);
 }
 
-static void layout_menu_config_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_config_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        show_config_window(lw);
 }
 
-static void layout_menu_editors_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_editors_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        show_editor_list_window();
 }
 
-static void layout_menu_layout_config_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_layout_config_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        layout_show_config_window(lw);
 }
 
-static void layout_menu_remove_thumb_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_remove_thumb_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        cache_manager_show();
 }
 
-static void layout_menu_wallpaper_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_wallpaper_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_to_root(lw);
 }
 
 /* single window zoom */
-static void layout_menu_zoom_in_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_zoom_in_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_adjust(lw, get_zoom_increment(), FALSE);
 }
 
-static void layout_menu_zoom_out_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_zoom_out_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_adjust(lw, -get_zoom_increment(), FALSE);
 }
 
-static void layout_menu_zoom_1_1_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_zoom_1_1_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, 1.0, FALSE);
 }
 
-static void layout_menu_zoom_fit_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_zoom_fit_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, 0.0, FALSE);
 }
 
-static void layout_menu_zoom_fit_hor_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_zoom_fit_hor_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set_fill_geometry(lw, FALSE, FALSE);
 }
 
-static void layout_menu_zoom_fit_vert_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_zoom_fit_vert_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set_fill_geometry(lw, TRUE, FALSE);
 }
 
-static void layout_menu_zoom_2_1_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_zoom_2_1_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, 2.0, FALSE);
 }
 
-static void layout_menu_zoom_3_1_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_zoom_3_1_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, 3.0, FALSE);
 }
-static void layout_menu_zoom_4_1_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_zoom_4_1_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, 4.0, FALSE);
 }
 
-static void layout_menu_zoom_1_2_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_zoom_1_2_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, -2.0, FALSE);
 }
 
-static void layout_menu_zoom_1_3_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_zoom_1_3_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, -3.0, FALSE);
 }
 
-static void layout_menu_zoom_1_4_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_zoom_1_4_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, -4.0, FALSE);
 }
 
 /* connected zoom */
-static void layout_menu_connect_zoom_in_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_connect_zoom_in_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_adjust(lw, get_zoom_increment(), TRUE);
 }
 
-static void layout_menu_connect_zoom_out_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_connect_zoom_out_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_adjust(lw, -get_zoom_increment(), TRUE);
 }
 
-static void layout_menu_connect_zoom_1_1_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_connect_zoom_1_1_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, 1.0, TRUE);
 }
 
-static void layout_menu_connect_zoom_fit_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_connect_zoom_fit_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, 0.0, TRUE);
 }
 
-static void layout_menu_connect_zoom_fit_hor_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_connect_zoom_fit_hor_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set_fill_geometry(lw, FALSE, TRUE);
 }
 
-static void layout_menu_connect_zoom_fit_vert_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_connect_zoom_fit_vert_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set_fill_geometry(lw, TRUE, TRUE);
 }
 
-static void layout_menu_connect_zoom_2_1_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_connect_zoom_2_1_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, 2.0, TRUE);
 }
 
-static void layout_menu_connect_zoom_3_1_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_connect_zoom_3_1_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, 3.0, TRUE);
 }
-static void layout_menu_connect_zoom_4_1_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_connect_zoom_4_1_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, 4.0, TRUE);
 }
 
-static void layout_menu_connect_zoom_1_2_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_connect_zoom_1_2_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, -2.0, TRUE);
 }
 
-static void layout_menu_connect_zoom_1_3_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_connect_zoom_1_3_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, -3.0, TRUE);
 }
 
-static void layout_menu_connect_zoom_1_4_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_connect_zoom_1_4_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_zoom_set(lw, -4.0, TRUE);
 }
 
 
-static void layout_menu_split_cb(GtkRadioAction *action, GtkRadioAction *UNUSED(current), gpointer data)
+static void layout_menu_split_cb(GtkRadioAction *action, GtkRadioAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        ImageSplitMode mode;
 
        layout_exit_fullscreen(lw);
-       mode = gtk_radio_action_get_current_value(action);
+       mode = static_cast<ImageSplitMode>(gtk_radio_action_get_current_value(action));
        layout_split_change(lw, mode);
 }
 
 
 static void layout_menu_thumb_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_thumb_set(lw, gtk_toggle_action_get_active(action));
 }
 
 
-static void layout_menu_list_cb(GtkRadioAction *action, GtkRadioAction *UNUSED(current), gpointer data)
+static void layout_menu_list_cb(GtkRadioAction *action, GtkRadioAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
-       layout_views_set(lw, lw->options.dir_view_type, (FileViewType) gtk_radio_action_get_current_value(action));
+       layout_views_set(lw, lw->options.dir_view_type, static_cast<FileViewType>(gtk_radio_action_get_current_value(action)));
 }
 
 static void layout_menu_view_dir_as_cb(GtkToggleAction *action,  gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
 
@@ -878,17 +905,106 @@ static void layout_menu_view_dir_as_cb(GtkToggleAction *action,  gpointer data)
                }
 }
 
-static void layout_menu_view_in_new_window_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_view_in_new_window_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        view_window_new(layout_image_get_fd(lw));
 }
 
-static void layout_menu_open_archive_cb(GtkAction *UNUSED(action), gpointer data)
+struct OpenWithData
+{
+       GAppInfo *application;
+       GList *g_file_list;
+       GtkWidget *app_chooser_dialog;
+};
+
+void open_with_response_cb(GtkDialog *, gint response_id, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       GError *error = nullptr;
+       auto open_with_data = static_cast<OpenWithData *>(data);
+
+       if (response_id == GTK_RESPONSE_OK)
+               {
+               g_app_info_launch(open_with_data->application, open_with_data->g_file_list, nullptr, &error);
+
+               if (error)
+                       {
+                       log_printf("Error launching app: %s\n", error->message);
+                       g_error_free(error);
+                       }
+               }
+
+       g_object_unref(open_with_data->application);
+       g_object_unref(g_list_first(open_with_data->g_file_list)->data);
+       g_list_free(open_with_data->g_file_list);
+       gtk_widget_destroy(GTK_WIDGET(open_with_data->app_chooser_dialog));
+       g_free(open_with_data);
+}
+
+static void open_with_application_selected_cb(GtkAppChooserWidget *, GAppInfo *application, gpointer data)
+{
+       auto open_with_data = static_cast<OpenWithData *>(data);
+
+       g_object_unref(open_with_data->application);
+
+       open_with_data->application = g_app_info_dup(application);
+}
+
+static void open_with_application_activated_cb(GtkAppChooserWidget *, GAppInfo *application, gpointer data)
+{
+       GError *error = nullptr;
+       auto open_with_data = static_cast<OpenWithData *>(data);
+
+       g_app_info_launch(application, open_with_data->g_file_list, nullptr, &error);
+
+       if (error)
+               {
+               log_printf("Error launching app.: %s\n", error->message);
+               g_error_free(error);
+               }
+
+       g_object_unref(open_with_data->application);
+       g_object_unref(g_list_first(open_with_data->g_file_list)->data);
+       g_list_free(open_with_data->g_file_list);
+       gtk_widget_destroy(GTK_WIDGET(open_with_data->app_chooser_dialog));
+       g_free(open_with_data);
+}
+
+static void layout_menu_open_with_cb(GtkAction *, gpointer data)
+{
+       auto lw = static_cast<LayoutWindow *>(data);
+       FileData *fd;
+       GtkWidget *widget;
+       OpenWithData *open_with_data;
+
+       if (layout_selection_list(lw))
+               {
+               open_with_data = g_new(OpenWithData, 1);
+
+               fd = static_cast<FileData *>(g_list_first(layout_selection_list(lw))->data);
+
+               open_with_data->g_file_list = g_list_append(nullptr, g_file_new_for_path(fd->path));
+
+               open_with_data->app_chooser_dialog = gtk_app_chooser_dialog_new(nullptr, GTK_DIALOG_DESTROY_WITH_PARENT, G_FILE(g_list_first(open_with_data->g_file_list)->data));
+
+               widget = gtk_app_chooser_dialog_get_widget(GTK_APP_CHOOSER_DIALOG(open_with_data->app_chooser_dialog));
+
+               open_with_data->application = gtk_app_chooser_get_app_info(GTK_APP_CHOOSER(open_with_data->app_chooser_dialog));
+
+               g_signal_connect(G_OBJECT(widget), "application-selected", G_CALLBACK(open_with_application_selected_cb), open_with_data);
+               g_signal_connect(G_OBJECT(widget), "application-activated", G_CALLBACK(open_with_application_activated_cb), open_with_data);
+               g_signal_connect(G_OBJECT(open_with_data->app_chooser_dialog), "response", G_CALLBACK(open_with_response_cb), open_with_data);
+               g_signal_connect(G_OBJECT(open_with_data->app_chooser_dialog), "close", G_CALLBACK(open_with_response_cb), open_with_data);
+
+               gtk_widget_show(open_with_data->app_chooser_dialog);
+               }
+}
+
+static void layout_menu_open_archive_cb(GtkAction *, gpointer data)
+{
+       auto lw = static_cast<LayoutWindow *>(data);
        LayoutWindow *lw_new;
        gchar *dest_dir;
        FileData *fd;
@@ -907,28 +1023,28 @@ static void layout_menu_open_archive_cb(GtkAction *UNUSED(action), gpointer data
                        }
                else
                        {
-                       warning_dialog(_("Cannot open archive file"), _("See the Log Window"), GTK_STOCK_DIALOG_WARNING, NULL);
+                       warning_dialog(_("Cannot open archive file"), _("See the Log Window"), GQ_ICON_DIALOG_WARNING, nullptr);
                        }
                }
 }
 
-static void layout_menu_fullscreen_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_fullscreen_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_full_screen_toggle(lw);
 }
 
-static void layout_menu_escape_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_escape_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
 }
 
-static void layout_menu_overlay_toggle_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_overlay_toggle_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        image_osd_toggle(lw->image);
        layout_util_sync_views(lw);
@@ -937,14 +1053,14 @@ static void layout_menu_overlay_toggle_cb(GtkAction *UNUSED(action), gpointer da
 
 static void layout_menu_overlay_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        if (gtk_toggle_action_get_active(action))
                {
                OsdShowFlags flags = image_osd_get(lw->image);
 
                if ((flags | OSD_SHOW_INFO | OSD_SHOW_STATUS) != flags)
-                       image_osd_set(lw->image, flags | OSD_SHOW_INFO | OSD_SHOW_STATUS);
+                       image_osd_set(lw->image, static_cast<OsdShowFlags>(flags | OSD_SHOW_INFO | OSD_SHOW_STATUS));
                }
        else
                {
@@ -957,53 +1073,53 @@ static void layout_menu_overlay_cb(GtkToggleAction *action, gpointer data)
 
 static void layout_menu_histogram_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        if (gtk_toggle_action_get_active(action))
                {
-               image_osd_set(lw->image, OSD_SHOW_INFO | OSD_SHOW_STATUS | OSD_SHOW_HISTOGRAM);
+               image_osd_set(lw->image, static_cast<OsdShowFlags>(OSD_SHOW_INFO | OSD_SHOW_STATUS | OSD_SHOW_HISTOGRAM));
                layout_util_sync_views(lw); /* show the overlay state, default channel and mode in the menu */
                }
        else
                {
                OsdShowFlags flags = image_osd_get(lw->image);
                if (flags & OSD_SHOW_HISTOGRAM)
-                       image_osd_set(lw->image, flags & ~OSD_SHOW_HISTOGRAM);
+                       image_osd_set(lw->image, static_cast<OsdShowFlags>(flags & ~OSD_SHOW_HISTOGRAM));
                }
 }
 
 static void layout_menu_animate_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        if (lw->options.animate == gtk_toggle_action_get_active(action)) return;
        layout_image_animate_toggle(lw);
 }
 
-static void layout_menu_rectangular_selection_cb(GtkToggleAction *action, gpointer UNUSED(data))
+static void layout_menu_rectangular_selection_cb(GtkToggleAction *action, gpointer)
 {
        options->collections.rectangular_selection = gtk_toggle_action_get_active(action);
 }
 
-static void layout_menu_histogram_toggle_channel_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_histogram_toggle_channel_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        image_osd_histogram_toggle_channel(lw->image);
        layout_util_sync_views(lw);
 }
 
-static void layout_menu_histogram_toggle_mode_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_histogram_toggle_mode_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        image_osd_histogram_toggle_mode(lw->image);
        layout_util_sync_views(lw);
 }
 
-static void layout_menu_histogram_channel_cb(GtkRadioAction *action, GtkRadioAction *UNUSED(current), gpointer data)
+static void layout_menu_histogram_channel_cb(GtkRadioAction *action, GtkRadioAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint channel = gtk_radio_action_get_current_value(action);
        GtkToggleAction *histogram_action = GTK_TOGGLE_ACTION(gtk_action_group_get_action(lw->action_group, "ImageHistogram"));
 
@@ -1013,9 +1129,9 @@ static void layout_menu_histogram_channel_cb(GtkRadioAction *action, GtkRadioAct
        image_osd_histogram_set_channel(lw->image, channel);
 }
 
-static void layout_menu_histogram_mode_cb(GtkRadioAction *action, GtkRadioAction *UNUSED(current), gpointer data)
+static void layout_menu_histogram_mode_cb(GtkRadioAction *action, GtkRadioAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint mode = gtk_radio_action_get_current_value(action);
        GtkToggleAction *histogram_action = GTK_TOGGLE_ACTION(gtk_action_group_get_action(lw->action_group, "ImageHistogram"));
 
@@ -1025,24 +1141,24 @@ static void layout_menu_histogram_mode_cb(GtkRadioAction *action, GtkRadioAction
        image_osd_histogram_set_mode(lw->image, mode);
 }
 
-static void layout_menu_refresh_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_refresh_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_refresh(lw);
 }
 
-static void layout_menu_bar_exif_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_bar_exif_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        layout_exif_window_new(lw);
 }
 
-static void layout_menu_search_and_run_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_search_and_run_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        layout_search_and_run_window_new(lw);
@@ -1051,7 +1167,7 @@ static void layout_menu_search_and_run_cb(GtkAction *UNUSED(action), gpointer da
 
 static void layout_menu_float_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        if (lw->options.tools_float == gtk_toggle_action_get_active(action)) return;
 
@@ -1059,27 +1175,27 @@ static void layout_menu_float_cb(GtkToggleAction *action, gpointer data)
        layout_tools_float_toggle(lw);
 }
 
-static void layout_menu_hide_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_hide_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        layout_tools_hide_toggle(lw);
 }
 
-static void layout_menu_toolbar_cb(GtkToggleAction *action, gpointer data)
+static void layout_menu_selectable_toolbars_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
-       if (lw->options.toolbar_hidden == gtk_toggle_action_get_active(action)) return;
+       if (lw->options.selectable_toolbars_hidden == gtk_toggle_action_get_active(action)) return;
 
        layout_exit_fullscreen(lw);
-       layout_toolbar_toggle(lw);
+       layout_selectable_toolbars_toggle(lw);
 }
 
 static void layout_menu_info_pixel_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        if (lw->options.show_info_pixel == gtk_toggle_action_get_active(action)) return;
 
@@ -1090,7 +1206,7 @@ static void layout_menu_info_pixel_cb(GtkToggleAction *action, gpointer data)
 /* NOTE: these callbacks are called also from layout_util_sync_views */
 static void layout_menu_bar_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        if (layout_bar_enabled(lw) == gtk_toggle_action_get_active(action)) return;
 
@@ -1100,7 +1216,7 @@ static void layout_menu_bar_cb(GtkToggleAction *action, gpointer data)
 
 static void layout_menu_bar_sort_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        if (layout_bar_sort_enabled(lw) == gtk_toggle_action_get_active(action)) return;
 
@@ -1110,7 +1226,7 @@ static void layout_menu_bar_sort_cb(GtkToggleAction *action, gpointer data)
 
 static void layout_menu_hide_bars_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        if (lw->options.bars_state.hidden == gtk_toggle_action_get_active(action))
                {
@@ -1121,27 +1237,27 @@ static void layout_menu_hide_bars_cb(GtkToggleAction *action, gpointer data)
 
 static void layout_menu_slideshow_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        if (layout_image_slideshow_active(lw) == gtk_toggle_action_get_active(action)) return;
        layout_image_slideshow_toggle(lw);
 }
 
-static void layout_menu_slideshow_pause_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_slideshow_pause_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_image_slideshow_pause_toggle(lw);
 }
 
-static void layout_menu_slideshow_slower_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
+static void layout_menu_slideshow_slower_cb(GtkAction *, gpointer)
 {
        options->slideshow.delay = options->slideshow.delay + 5;
        if (options->slideshow.delay > SLIDESHOW_MAX_SECONDS)
                options->slideshow.delay = SLIDESHOW_MAX_SECONDS;
 }
 
-static void layout_menu_slideshow_faster_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
+static void layout_menu_slideshow_faster_cb(GtkAction *, gpointer)
 {
        options->slideshow.delay = options->slideshow.delay - 5;
        if (options->slideshow.delay < SLIDESHOW_MIN_SECONDS * 10)
@@ -1149,9 +1265,9 @@ static void layout_menu_slideshow_faster_cb(GtkAction *UNUSED(action), gpointer
 }
 
 
-static void layout_menu_stereo_mode_next_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_stereo_mode_next_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint mode = layout_image_stereo_pixbuf_get(lw);
 
        /* 0->1, 1->2, 2->3, 3->1 - disable auto, then cycle */
@@ -1167,54 +1283,54 @@ static void layout_menu_stereo_mode_next_cb(GtkAction *UNUSED(action), gpointer
 
 }
 
-static void layout_menu_stereo_mode_cb(GtkRadioAction *action, GtkRadioAction *UNUSED(current), gpointer data)
+static void layout_menu_stereo_mode_cb(GtkRadioAction *action, GtkRadioAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint mode = gtk_radio_action_get_current_value(action);
        layout_image_stereo_pixbuf_set(lw, mode);
 }
 
-static void layout_menu_help_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_help_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        help_window_show("index.html");
 }
 
-static void layout_menu_help_search_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_help_search_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        help_search_window_show();
 }
 
-static void layout_menu_help_keys_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_help_keys_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        help_window_show("GuideReferenceKeyboardShortcuts.html");
 }
 
-static void layout_menu_notes_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_notes_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        help_window_show("release_notes");
 }
 
-static void layout_menu_changelog_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_changelog_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        help_window_show("changelog");
 }
 
-static const char *keyboard_map_hardcoded[][2] = {
+static constexpr const char *keyboard_map_hardcoded[][2] = {
        {"Scroll","Left"},
        {"FastScroll", "&lt;Shift&gt;Left"},
        {"Left Border", "&lt;Primary&gt;Left"},
@@ -1241,7 +1357,6 @@ static const char *keyboard_map_hardcoded[][2] = {
        {"ScrollDown", "&lt;Shift&gt;MW5"},
        {"ZoomIn", "&lt;Primary&gt;MW4"},
        {"ZoomOut", "&lt;Primary&gt;MW5"},
-       {NULL, NULL}
 };
 
 static void layout_menu_foreach_func(
@@ -1249,15 +1364,19 @@ static void layout_menu_foreach_func(
                                        const gchar *accel_path,
                                        guint accel_key,
                                        GdkModifierType accel_mods,
-                                       gboolean UNUSED(changed))
+                                       gboolean)
 {
-       gchar *path, *name;
-       gchar *key_name, *menu_name;
-       gchar **subset_lt_arr, **subset_gt_arr;
-       gchar *subset_lt, *converted_name;
-       GPtrArray *array = static_cast<GPtrArray *>(data);
-
-       path = g_strescape(accel_path, NULL);
+       gchar *path;
+       gchar *name;
+       gchar *key_name;
+       gchar *menu_name;
+       gchar **subset_lt_arr;
+       gchar **subset_gt_arr;
+       gchar *subset_lt;
+       gchar *converted_name;
+       auto array = static_cast<GPtrArray *>(data);
+
+       path = g_strescape(accel_path, nullptr);
        name = gtk_accelerator_name(accel_key, accel_mods);
 
        menu_name = g_strdup(g_strrstr(path, "/")+1);
@@ -1278,22 +1397,24 @@ static void layout_menu_foreach_func(
        else
                key_name = g_strdup(name);
 
-       g_ptr_array_add(array, (gpointer)menu_name);
-       g_ptr_array_add(array, (gpointer)key_name);
+       g_ptr_array_add(array, menu_name);
+       g_ptr_array_add(array, key_name);
 
        g_free(name);
        g_free(path);
 }
 
-static void layout_menu_kbd_map_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
+static void layout_menu_kbd_map_cb(GtkAction *, gpointer)
 {
        gint fd = -1;
        GPtrArray *array;
        char * tmp_file;
-       GError *error = NULL;
+       GError *error = nullptr;
        GIOChannel *channel;
-       char **pre_key, **post_key;
-       char *key_name, *converted_line;
+       char **pre_key;
+       char **post_key;
+       const char *key_name;
+       char *converted_line;
        int keymap_index;
        guint index;
 
@@ -1323,26 +1444,24 @@ static void layout_menu_kbd_map_cb(GtkAction *UNUSED(action), gpointer UNUSED(da
                                key_name = " ";
                                for (index=0; index < array->len-2; index=index+2)
                                        {
-                                       if (!(g_ascii_strcasecmp(g_ptr_array_index(array,index+1), post_key[0])))
+                                       if (!(g_ascii_strcasecmp(static_cast<const gchar *>(g_ptr_array_index(array,index+1)), post_key[0])))
                                                {
-                                               key_name = g_ptr_array_index(array,index+0);
+                                               key_name = static_cast<const gchar *>(g_ptr_array_index(array,index+0));
                                                break;
                                                }
                                        }
 
-                               index=0;
-                               while (keyboard_map_hardcoded[index][0])
+                               for (const auto& m : keyboard_map_hardcoded)
                                        {
-                                       if (!(g_strcmp0(keyboard_map_hardcoded[index][1], post_key[0])))
+                                       if (!(g_strcmp0(m[1], post_key[0])))
                                                {
-                                               key_name = keyboard_map_hardcoded[index][0];
+                                               key_name = m[0];
                                                break;
                                                }
-                                       index++;
                                        }
 
                                converted_line = g_strconcat(pre_key[0], ">", key_name, "<", post_key[1], "\n", NULL);
-                               g_io_channel_write_chars(channel, converted_line, -1, NULL, &error);
+                               g_io_channel_write_chars(channel, converted_line, -1, nullptr, &error);
                                if (error) {log_printf("Warning: Keyboard Map:%s\n",error->message); g_error_free(error);}
 
                                g_free(converted_line);
@@ -1351,9 +1470,9 @@ static void layout_menu_kbd_map_cb(GtkAction *UNUSED(action), gpointer UNUSED(da
                                }
                        else
                                {
-                               g_io_channel_write_chars(channel, keymap_template[keymap_index], -1, NULL, &error);
+                               g_io_channel_write_chars(channel, keymap_template[keymap_index], -1, nullptr, &error);
                                if (error) {log_printf("Warning: Keyboard Map:%s\n",error->message); g_error_free(error);}
-                               g_io_channel_write_chars(channel, "\n", -1, NULL, &error);
+                               g_io_channel_write_chars(channel, "\n", -1, nullptr, &error);
                                if (error) {log_printf("Warning: Keyboard Map:%s\n",error->message); g_error_free(error);}
                                }
                        keymap_index++;
@@ -1376,17 +1495,17 @@ static void layout_menu_kbd_map_cb(GtkAction *UNUSED(action), gpointer UNUSED(da
                }
 }
 
-static void layout_menu_about_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_about_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        show_about_window(lw);
 }
 
-static void layout_menu_log_window_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_log_window_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_exit_fullscreen(lw);
        log_window_new(lw);
@@ -1399,37 +1518,37 @@ static void layout_menu_log_window_cb(GtkAction *UNUSED(action), gpointer data)
  *-----------------------------------------------------------------------------
  */
 
-static void layout_menu_select_all_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_select_all_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_select_all(lw);
 }
 
-static void layout_menu_unselect_all_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_unselect_all_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_select_none(lw);
 }
 
-static void layout_menu_invert_selection_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_invert_selection_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_select_invert(lw);
 }
 
 static void layout_menu_file_filter_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_file_filter_set(lw, gtk_toggle_action_get_active(action));
 }
 
 static void layout_menu_marks_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_marks_set(lw, gtk_toggle_action_get_active(action));
 }
@@ -1437,7 +1556,7 @@ static void layout_menu_marks_cb(GtkToggleAction *action, gpointer data)
 
 static void layout_menu_set_mark_sel_cb(GtkAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
 
@@ -1446,7 +1565,7 @@ static void layout_menu_set_mark_sel_cb(GtkAction *action, gpointer data)
 
 static void layout_menu_res_mark_sel_cb(GtkAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
 
@@ -1455,7 +1574,7 @@ static void layout_menu_res_mark_sel_cb(GtkAction *action, gpointer data)
 
 static void layout_menu_toggle_mark_sel_cb(GtkAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
 
@@ -1464,7 +1583,7 @@ static void layout_menu_toggle_mark_sel_cb(GtkAction *action, gpointer data)
 
 static void layout_menu_sel_mark_cb(GtkAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
 
@@ -1473,7 +1592,7 @@ static void layout_menu_sel_mark_cb(GtkAction *action, gpointer data)
 
 static void layout_menu_sel_mark_or_cb(GtkAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
 
@@ -1482,7 +1601,7 @@ static void layout_menu_sel_mark_or_cb(GtkAction *action, gpointer data)
 
 static void layout_menu_sel_mark_and_cb(GtkAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
 
@@ -1491,7 +1610,7 @@ static void layout_menu_sel_mark_and_cb(GtkAction *action, gpointer data)
 
 static void layout_menu_sel_mark_minus_cb(GtkAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
 
@@ -1500,7 +1619,7 @@ static void layout_menu_sel_mark_minus_cb(GtkAction *action, gpointer data)
 
 static void layout_menu_mark_filter_toggle_cb(GtkAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
 
@@ -1515,15 +1634,15 @@ static void layout_menu_mark_filter_toggle_cb(GtkAction *action, gpointer data)
  *-----------------------------------------------------------------------------
  */
 
-static void layout_menu_image_first_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_image_first_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        layout_image_first(lw);
 }
 
-static void layout_menu_image_prev_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_image_prev_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint i;
 
        if (lw->options.split_pane_sync)
@@ -1547,9 +1666,9 @@ static void layout_menu_image_prev_cb(GtkAction *UNUSED(action), gpointer data)
                }
 }
 
-static void layout_menu_image_next_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_image_next_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint i;
 
        if (lw->options.split_pane_sync)
@@ -1573,9 +1692,9 @@ static void layout_menu_image_next_cb(GtkAction *UNUSED(action), gpointer data)
                }
 }
 
-static void layout_menu_page_first_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_page_first_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        FileData *fd = layout_image_get_fd(lw);
 
        if (fd->page_total > 0)
@@ -1584,9 +1703,9 @@ static void layout_menu_page_first_cb(GtkAction *UNUSED(action), gpointer data)
                }
 }
 
-static void layout_menu_page_last_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_page_last_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        FileData *fd = layout_image_get_fd(lw);
 
        if (fd->page_total > 0)
@@ -1595,9 +1714,9 @@ static void layout_menu_page_last_cb(GtkAction *UNUSED(action), gpointer data)
                }
 }
 
-static void layout_menu_page_next_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_page_next_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        FileData *fd = layout_image_get_fd(lw);
 
        if (fd->page_total > 0)
@@ -1606,9 +1725,9 @@ static void layout_menu_page_next_cb(GtkAction *UNUSED(action), gpointer data)
                }
 }
 
-static void layout_menu_page_previous_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_page_previous_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        FileData *fd = layout_image_get_fd(lw);
 
        if (fd->page_total > 0)
@@ -1617,25 +1736,25 @@ static void layout_menu_page_previous_cb(GtkAction *UNUSED(action), gpointer dat
                }
 }
 
-static void layout_menu_image_forward_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_image_forward_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        /* Obtain next image */
        layout_set_path(lw, image_chain_forward());
 }
 
-static void layout_menu_image_back_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_image_back_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        /* Obtain previous image */
        layout_set_path(lw, image_chain_back());
 }
 
-static void layout_menu_split_pane_next_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_split_pane_next_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint active_frame;
 
        active_frame = lw->active_split_image;
@@ -1651,9 +1770,9 @@ static void layout_menu_split_pane_next_cb(GtkAction *UNUSED(action), gpointer d
        layout_image_activate(lw, active_frame, FALSE);
 }
 
-static void layout_menu_split_pane_prev_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_split_pane_prev_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint active_frame;
 
        active_frame = lw->active_split_image;
@@ -1673,9 +1792,9 @@ static void layout_menu_split_pane_prev_cb(GtkAction *UNUSED(action), gpointer d
        layout_image_activate(lw, active_frame, FALSE);
 }
 
-static void layout_menu_split_pane_updown_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_split_pane_updown_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint active_frame;
 
        active_frame = lw->active_split_image;
@@ -1691,15 +1810,15 @@ static void layout_menu_split_pane_updown_cb(GtkAction *UNUSED(action), gpointer
        layout_image_activate(lw, active_frame, FALSE);
 }
 
-static void layout_menu_image_last_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_image_last_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        layout_image_last(lw);
 }
 
-static void layout_menu_back_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_back_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        FileData *dir_fd;
 
        /* Obtain previous path */
@@ -1708,9 +1827,9 @@ static void layout_menu_back_cb(GtkAction *UNUSED(action), gpointer data)
        file_data_unref(dir_fd);
 }
 
-static void layout_menu_forward_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_forward_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        FileData *dir_fd;
 
        /* Obtain next path */
@@ -1719,9 +1838,9 @@ static void layout_menu_forward_cb(GtkAction *UNUSED(action), gpointer data)
        file_data_unref(dir_fd);
 }
 
-static void layout_menu_home_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_home_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        const gchar *path;
 
        if (lw->options.home_path && *lw->options.home_path)
@@ -1737,9 +1856,9 @@ static void layout_menu_home_cb(GtkAction *UNUSED(action), gpointer data)
                }
 }
 
-static void layout_menu_up_cb(GtkAction *UNUSED(action), gpointer data)
+static void layout_menu_up_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        ViewDir *vd = lw->vd;
        gchar *path;
 
@@ -1765,7 +1884,7 @@ static void layout_menu_up_cb(GtkAction *UNUSED(action), gpointer data)
 
 static void layout_menu_edit_cb(GtkAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        const gchar *key = gtk_action_get_name(action);
 
        if (!editor_window_flag_set(key))
@@ -1775,15 +1894,15 @@ static void layout_menu_edit_cb(GtkAction *action, gpointer data)
 }
 
 
-static void layout_menu_metadata_write_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
+static void layout_menu_metadata_write_cb(GtkAction *, gpointer)
 {
-       metadata_write_queue_confirm(TRUE, NULL, NULL);
+       metadata_write_queue_confirm(TRUE, nullptr, nullptr);
 }
 
-static GtkWidget *last_focussed = NULL;
-static void layout_menu_keyword_autocomplete_cb(GtkAction *UNUSED(action), gpointer data)
+static GtkWidget *last_focussed = nullptr;
+static void layout_menu_keyword_autocomplete_cb(GtkAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        GtkWidget *tmp;
        gboolean auto_has_focus;
 
@@ -1808,7 +1927,7 @@ static void layout_menu_keyword_autocomplete_cb(GtkAction *UNUSED(action), gpoin
 #ifdef HAVE_LCMS
 static void layout_color_menu_enable_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        if (layout_image_color_profile_get_use(lw) == gtk_toggle_action_get_active(action)) return;
 
@@ -1825,7 +1944,7 @@ static void layout_color_menu_enable_cb()
 #ifdef HAVE_LCMS
 static void layout_color_menu_use_image_cb(GtkToggleAction *action, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint input;
        gboolean use_image;
 
@@ -1842,9 +1961,9 @@ static void layout_color_menu_use_image_cb()
 #endif
 
 #ifdef HAVE_LCMS
-static void layout_color_menu_input_cb(GtkRadioAction *action, GtkRadioAction *UNUSED(current), gpointer data)
+static void layout_color_menu_input_cb(GtkRadioAction *action, GtkRadioAction *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint type;
        gint input;
        gboolean use_image;
@@ -1871,7 +1990,7 @@ static void layout_color_menu_input_cb()
  *-----------------------------------------------------------------------------
  */
 
-static void layout_menu_recent_cb(GtkWidget *widget, gpointer UNUSED(data))
+static void layout_menu_recent_cb(GtkWidget *widget, gpointer)
 {
        gint n;
        gchar *path;
@@ -1888,7 +2007,7 @@ static void layout_menu_recent_cb(GtkWidget *widget, gpointer UNUSED(data))
        g_free(path);
 }
 
-static void layout_menu_recent_update(LayoutWindow *lw)
+static void layout_menu_collection_recent_update(LayoutWindow *lw)
 {
        GtkWidget *menu;
        GtkWidget *recent;
@@ -1905,7 +2024,7 @@ static void layout_menu_recent_update(LayoutWindow *lw)
 
        while (list)
                {
-               const gchar *filename = filename_from_path((gchar *)list->data);
+               const gchar *filename = filename_from_path(static_cast<gchar *>(list->data));
                gchar *name;
                gboolean free_name = FALSE;
 
@@ -1916,7 +2035,7 @@ static void layout_menu_recent_update(LayoutWindow *lw)
                        }
                else
                        {
-                       name = (gchar *) filename;
+                       name = const_cast<gchar *>(filename);
                        }
 
                item = menu_item_add_simple(menu, name, G_CALLBACK(layout_menu_recent_cb), lw);
@@ -1928,25 +2047,82 @@ static void layout_menu_recent_update(LayoutWindow *lw)
 
        if (n == 0)
                {
-               menu_item_add(menu, _("Empty"), NULL, NULL);
+               menu_item_add(menu, _("Empty"), nullptr, nullptr);
                }
 
-       recent = gtk_ui_manager_get_widget(lw->ui_manager, "/MainMenu/FileMenu/OpenRecent");
+       recent = gtk_ui_manager_get_widget(lw->ui_manager, options->hamburger_menu ? "/MainMenu/OpenMenu/FileMenu/OpenRecent" : "/MainMenu/FileMenu/OpenRecent");
        gtk_menu_item_set_submenu(GTK_MENU_ITEM(recent), menu);
        gtk_widget_set_sensitive(recent, (n != 0));
 }
 
-void layout_recent_update_all(void)
+static void layout_menu_collection_open_update(LayoutWindow *lw)
+{
+       gboolean free_name = FALSE;
+       gchar *name;
+       gint n;
+       GList *collection_list = nullptr;
+       GList *work;
+       GtkWidget *item;
+       GtkWidget *menu;
+       GtkWidget *recent;
+
+       if (!lw->ui_manager) return;
+
+       collect_manager_list(&collection_list, nullptr, nullptr);
+
+       n = 0;
+
+       menu = gtk_menu_new();
+
+       work = collection_list;
+       while (work)
+               {
+               const gchar *filename = static_cast<gchar *>(work->data);
+
+               if (file_extension_match(filename, GQ_COLLECTION_EXT))
+                       {
+                       name = remove_extension_from_path(filename);
+                       free_name = TRUE;
+                       }
+               else
+                       {
+                       name = const_cast<gchar *>(filename);
+                       }
+
+               item = menu_item_add_simple(menu, name, G_CALLBACK(layout_menu_open_cb), lw);
+               if (free_name)
+                       {
+                       g_free(name);
+                       }
+               g_object_set_data(G_OBJECT(item), "recent_index", GINT_TO_POINTER(n));
+               work = work->next;
+               n++;
+               }
+
+       string_list_free(collection_list);
+
+       if (n == 0)
+               {
+               menu_item_add(menu, _("Empty"), nullptr, nullptr);
+               }
+
+       recent = gtk_ui_manager_get_widget(lw->ui_manager, options->hamburger_menu ? "/MainMenu/OpenMenu/FileMenu/OpenCollection" : "/MainMenu/FileMenu/OpenCollection");
+       gtk_menu_item_set_submenu(GTK_MENU_ITEM(recent), menu);
+       gtk_widget_set_sensitive(recent, (n != 0));
+}
+
+void layout_recent_update_all()
 {
        GList *work;
 
        work = layout_window_list;
        while (work)
                {
-               LayoutWindow *lw = static_cast<LayoutWindow *>(work->data);
+               auto lw = static_cast<LayoutWindow *>(work->data);
                work = work->next;
 
-               layout_menu_recent_update(lw);
+               layout_menu_collection_recent_update(lw);
+               layout_menu_collection_open_update(lw);
                }
 }
 
@@ -1964,16 +2140,14 @@ void layout_recent_add_path(const gchar *path)
  * window layout menu
  *-----------------------------------------------------------------------------
  */
-typedef struct _WindowNames WindowNames;
-struct _WindowNames
+struct WindowNames
 {
        gboolean displayed;
        gchar *name;
        gchar *path;
 };
 
-typedef struct _RenameWindow RenameWindow;
-struct _RenameWindow
+struct RenameWindow
 {
        GenericDialog *gd;
        LayoutWindow *lw;
@@ -1982,8 +2156,7 @@ struct _RenameWindow
        GtkWidget *window_name_entry;
 };
 
-typedef struct _DeleteWindow DeleteWindow;
-struct _DeleteWindow
+struct DeleteWindow
 {
        GenericDialog *gd;
        LayoutWindow *lw;
@@ -1994,10 +2167,10 @@ struct _DeleteWindow
 
 static gint layout_window_menu_list_sort_cb(gconstpointer a, gconstpointer b)
 {
-       const WindowNames *wna = static_cast<const WindowNames *>(a);
-       const WindowNames *wnb = static_cast<const WindowNames *>(b);
+       auto wna = static_cast<const WindowNames *>(a);
+       auto wnb = static_cast<const WindowNames *>(b);
 
-       return g_strcmp0((gchar *)wna->name, (gchar *)wnb->name);
+       return g_strcmp0(wna->name, wnb->name);
 }
 
 static GList *layout_window_menu_list(GList *listin)
@@ -2018,7 +2191,7 @@ static GList *layout_window_menu_list(GList *listin)
                return listin;
                }
 
-       while ((dir = readdir(dp)) != NULL)
+       while ((dir = readdir(dp)) != nullptr)
                {
                gchar *name_file = dir->d_name;
 
@@ -2057,15 +2230,15 @@ static GList *layout_window_menu_list(GList *listin)
        return g_list_sort(listin, layout_window_menu_list_sort_cb);
 }
 
-static void layout_menu_new_window_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void layout_menu_new_window_cb(GtkWidget *, gpointer data)
 {
        gint n;
 
        n = GPOINTER_TO_INT(data);
-       GList *menulist = NULL;
+       GList *menulist = nullptr;
 
        menulist = layout_window_menu_list(menulist);
-       WindowNames *wn = static_cast<WindowNames *>(g_list_nth(menulist, n )->data);
+       auto wn = static_cast<WindowNames *>(g_list_nth(menulist, n )->data);
 
        if (wn->path)
                {
@@ -2082,9 +2255,10 @@ static void layout_menu_new_window_update(LayoutWindow *lw)
        GtkWidget *menu;
        GtkWidget *sub_menu;
        GtkWidget *item;
-       GList *children, *iter;
+       GList *children;
+       GList *iter;
        gint n;
-       GList *list = NULL;
+       GList *list = nullptr;
        gint i = 0;
        WindowNames *wn;
 
@@ -2092,15 +2266,15 @@ static void layout_menu_new_window_update(LayoutWindow *lw)
 
        list = layout_window_menu_list(list);
 
-       menu = gtk_ui_manager_get_widget(lw->ui_manager, "/MainMenu/WindowsMenu/NewWindow");
+       menu = gtk_ui_manager_get_widget(lw->ui_manager, options->hamburger_menu ? "/MainMenu/OpenMenu/WindowsMenu/NewWindow" : "/MainMenu/WindowsMenu/NewWindow");
        sub_menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(menu));
 
        children = gtk_container_get_children(GTK_CONTAINER(sub_menu));
-       for (iter = children; iter != NULL; iter = g_list_next(iter), i++)
+       for (iter = children; iter != nullptr; iter = g_list_next(iter), i++)
                {
                if (i >= 4) // separator, default, from current, separator
                        {
-                       gtk_widget_destroy(GTK_WIDGET(iter->data));
+                       gq_gtk_widget_destroy(GTK_WIDGET(iter->data));
                        }
                }
        g_list_free(children);
@@ -2121,34 +2295,34 @@ static void layout_menu_new_window_update(LayoutWindow *lw)
                }
 }
 
-static void window_rename_cancel_cb(GenericDialog *UNUSED(gd), gpointer data)
+static void window_rename_cancel_cb(GenericDialog *, gpointer data)
 {
-       RenameWindow *rw = static_cast<RenameWindow *>(data);
+       auto rw = static_cast<RenameWindow *>(data);
 
        generic_dialog_close(rw->gd);
        g_free(rw);
 }
 
-static void window_rename_ok(GenericDialog *UNUSED(gd), gpointer data)
+static void window_rename_ok(GenericDialog *, gpointer data)
 {
-       RenameWindow *rw = static_cast<RenameWindow *>(data);
+       auto rw = static_cast<RenameWindow *>(data);
        gchar *path;
        gboolean window_layout_name_exists = FALSE;
-       GList *list = NULL;
+       GList *list = nullptr;
        gchar *xml_name;
        gchar *new_id;
 
-       new_id = g_strdup(gtk_entry_get_text(GTK_ENTRY(rw->window_name_entry)));
+       new_id = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(rw->window_name_entry)));
 
        list = layout_window_menu_list(list);
        while (list)
                {
-               WindowNames *ln = static_cast<WindowNames *>(list->data);
+               auto ln = static_cast<WindowNames *>(list->data);
                if (g_strcmp0(ln->name, new_id) == 0)
                        {
                        gchar *buf;
                        buf = g_strdup_printf(_("Window layout name \"%s\" already exists."), new_id);
-                       warning_dialog(_("Rename window"), buf, GTK_STOCK_DIALOG_WARNING, rw->gd->dialog);
+                       warning_dialog(_("Rename window"), buf, GQ_ICON_DIALOG_WARNING, rw->gd->dialog);
                        g_free(buf);
                        window_layout_name_exists = TRUE;
                        break;
@@ -2184,28 +2358,28 @@ static void window_rename_ok(GenericDialog *UNUSED(gd), gpointer data)
 
 static void window_rename_ok_cb(GenericDialog *gd, gpointer data)
 {
-       RenameWindow *rw = static_cast<RenameWindow *>(data);
+       auto rw = static_cast<RenameWindow *>(data);
 
        window_rename_ok(gd, rw);
 }
 
 static void window_rename_entry_activate_cb(GenericDialog *gd, gpointer data)
 {
-       RenameWindow *rw = static_cast<RenameWindow *>(data);
+       auto rw = static_cast<RenameWindow *>(data);
 
        window_rename_ok(gd, rw);
 }
 
-static void window_delete_cancel_cb(GenericDialog *UNUSED(gd), gpointer data)
+static void window_delete_cancel_cb(GenericDialog *, gpointer data)
 {
-       DeleteWindow *dw = static_cast<DeleteWindow *>(data);
+       auto dw = static_cast<DeleteWindow *>(data);
 
        g_free(dw);
 }
 
-static void window_delete_ok_cb(GenericDialog *UNUSED(gd), gpointer data)
+static void window_delete_ok_cb(GenericDialog *, gpointer data)
 {
-       DeleteWindow *dw = static_cast<DeleteWindow *>(data);
+       auto dw = static_cast<DeleteWindow *>(data);
        gchar *path;
        gchar *xml_name;
 
@@ -2223,21 +2397,23 @@ static void window_delete_ok_cb(GenericDialog *UNUSED(gd), gpointer data)
        g_free(path);
 }
 
-static void layout_menu_window_default_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
+static void layout_menu_window_default_cb(GtkWidget *, gpointer)
 {
        layout_new_from_default();
 }
 
-static void layout_menu_windows_menu_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void layout_menu_windows_menu_cb(GtkWidget *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        GtkWidget *menu;
        GtkWidget *sub_menu;
        gchar *menu_label;
-       GList *children, *iter;
+       GList *children;
+       GList *iter;
        gint i;
 
-       menu = gtk_ui_manager_get_widget(lw->ui_manager, "/MainMenu/WindowsMenu/");
+       menu = gtk_ui_manager_get_widget(lw->ui_manager, options->hamburger_menu ? "/MainMenu/OpenMenu/WindowsMenu/" : "/MainMenu/WindowsMenu/");
+
        sub_menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(menu));
 
        /* disable Delete for temporary windows */
@@ -2245,7 +2421,7 @@ static void layout_menu_windows_menu_cb(GtkWidget *UNUSED(widget), gpointer data
                {
                i = 0;
                children = gtk_container_get_children(GTK_CONTAINER(sub_menu));
-               for (iter = children; iter != NULL; iter = g_list_next(iter), i++)
+               for (iter = children; iter != nullptr; iter = g_list_next(iter), i++)
                        {
                        menu_label = g_strdup(gtk_menu_item_get_label(GTK_MENU_ITEM(iter->data)));
                        if (g_strcmp0(menu_label, _("Delete window")) == 0)
@@ -2258,24 +2434,25 @@ static void layout_menu_windows_menu_cb(GtkWidget *UNUSED(widget), gpointer data
                }
 }
 
-static void layout_menu_view_menu_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void layout_menu_view_menu_cb(GtkWidget *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        GtkWidget *menu;
        GtkWidget *sub_menu;
        gchar *menu_label;
-       GList *children, *iter;
+       GList *children;
+       GList *iter;
        gint i;
        FileData *fd;
 
-       menu = gtk_ui_manager_get_widget(lw->ui_manager, "/MainMenu/ViewMenu/");
+       menu = gtk_ui_manager_get_widget(lw->ui_manager, options->hamburger_menu ? "/MainMenu/OpenMenu/ViewMenu/" : "/MainMenu/ViewMenu/");
        sub_menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(menu));
 
        fd = layout_image_get_fd(lw);
 
        i = 0;
        children = gtk_container_get_children(GTK_CONTAINER(sub_menu));
-       for (iter = children; iter != NULL; iter = g_list_next(iter), i++)
+       for (iter = children; iter != nullptr; iter = g_list_next(iter), i++)
                {
                menu_label = g_strdup(gtk_menu_item_get_label(GTK_MENU_ITEM(iter->data)));
                if (g_strcmp0(menu_label, _("Open archive")) == 0)
@@ -2308,30 +2485,30 @@ static void change_window_id(const gchar *infile, const gchar *outfile)
        id_name = layout_get_unique_id();
 
        in_file = g_file_new_for_path(infile);
-       in_file_stream = g_file_read(in_file, NULL, NULL);
+       in_file_stream = g_file_read(in_file, nullptr, nullptr);
        in_data_stream = g_data_input_stream_new(G_INPUT_STREAM(in_file_stream));
 
        out_file = g_file_new_for_path(outfile);
-       out_file_stream = g_file_append_to(out_file, G_FILE_CREATE_PRIVATE, NULL, NULL);
+       out_file_stream = g_file_append_to(out_file, G_FILE_CREATE_PRIVATE, nullptr, nullptr);
        out_data_stream = g_data_output_stream_new(G_OUTPUT_STREAM(out_file_stream));
 
-       while ((line = g_data_input_stream_read_line(in_data_stream, NULL, NULL, NULL)))
+       while ((line = g_data_input_stream_read_line(in_data_stream, nullptr, nullptr, nullptr)))
                {
                if (g_str_has_suffix(line, "<layout"))
                        {
-                       g_data_output_stream_put_string(out_data_stream, line, NULL, NULL);
-                       g_data_output_stream_put_string(out_data_stream, "\n", NULL, NULL);
+                       g_data_output_stream_put_string(out_data_stream, line, nullptr, nullptr);
+                       g_data_output_stream_put_string(out_data_stream, "\n", nullptr, nullptr);
                        g_free(line);
 
-                       line = g_data_input_stream_read_line(in_data_stream, NULL, NULL, NULL);
-                       g_data_output_stream_put_string(out_data_stream, "id = \"", NULL, NULL);
-                       g_data_output_stream_put_string(out_data_stream, id_name, NULL, NULL);
-                       g_data_output_stream_put_string(out_data_stream, "\"\n", NULL, NULL);
+                       line = g_data_input_stream_read_line(in_data_stream, nullptr, nullptr, nullptr);
+                       g_data_output_stream_put_string(out_data_stream, "id = \"", nullptr, nullptr);
+                       g_data_output_stream_put_string(out_data_stream, id_name, nullptr, nullptr);
+                       g_data_output_stream_put_string(out_data_stream, "\"\n", nullptr, nullptr);
                        }
                else
                        {
-                       g_data_output_stream_put_string(out_data_stream, line, NULL, NULL);
-                       g_data_output_stream_put_string(out_data_stream, "\n", NULL, NULL);
+                       g_data_output_stream_put_string(out_data_stream, line, nullptr, nullptr);
+                       g_data_output_stream_put_string(out_data_stream, "\n", nullptr, nullptr);
                        }
                g_free(line);
                }
@@ -2345,14 +2522,14 @@ static void change_window_id(const gchar *infile, const gchar *outfile)
        g_object_unref(in_file);
 }
 
-static void layout_menu_window_from_current_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void layout_menu_window_from_current_cb(GtkWidget *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        gint fd_in = -1;
        gint fd_out = -1;
        char * tmp_file_in;
        char * tmp_file_out;
-       GError *error = NULL;
+       GError *error = nullptr;
 
        fd_in = g_file_open_tmp("geeqie_layout_name_XXXXXX.xml", &tmp_file_in, &error);
        if (error)
@@ -2381,26 +2558,26 @@ static void layout_menu_window_from_current_cb(GtkWidget *UNUSED(widget), gpoint
        g_free(tmp_file_out);
 }
 
-static void layout_menu_window_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void layout_menu_window_cb(GtkWidget *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
        layout_menu_new_window_update(lw);
 }
 
-static void layout_menu_window_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void layout_menu_window_rename_cb(GtkWidget *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        RenameWindow *rw;
        GtkWidget *hbox;
 
        rw = g_new0(RenameWindow, 1);
        rw->lw = lw;
 
-       rw->gd = generic_dialog_new(_("Rename window"), "rename_window", NULL, FALSE, window_rename_cancel_cb, rw);
-       rw->button_ok = generic_dialog_add_button(rw->gd, GTK_STOCK_OK, _("OK"), window_rename_ok_cb, TRUE);
+       rw->gd = generic_dialog_new(_("Rename window"), "rename_window", nullptr, FALSE, window_rename_cancel_cb, rw);
+       rw->button_ok = generic_dialog_add_button(rw->gd, GQ_ICON_OK, _("OK"), window_rename_ok_cb, TRUE);
 
-       generic_dialog_add_message(rw->gd, NULL, _("rename window"), NULL, FALSE);
+       generic_dialog_add_message(rw->gd, nullptr, _("rename window"), nullptr, FALSE);
 
        hbox = pref_box_new(rw->gd->vbox, FALSE, GTK_ORIENTATION_HORIZONTAL, 0);
        pref_spacer(hbox, PREF_PAD_INDENT);
@@ -2410,8 +2587,8 @@ static void layout_menu_window_rename_cb(GtkWidget *UNUSED(widget), gpointer dat
        rw->window_name_entry = gtk_entry_new();
        gtk_widget_set_can_focus(rw->window_name_entry, TRUE);
        gtk_editable_set_editable(GTK_EDITABLE(rw->window_name_entry), TRUE);
-       gtk_entry_set_text(GTK_ENTRY(rw->window_name_entry), lw->options.id);
-       gtk_box_pack_start(GTK_BOX(hbox), rw->window_name_entry, TRUE, TRUE, 0);
+       gq_gtk_entry_set_text(GTK_ENTRY(rw->window_name_entry), lw->options.id);
+       gq_gtk_box_pack_start(GTK_BOX(hbox), rw->window_name_entry, TRUE, TRUE, 0);
        gtk_widget_grab_focus(GTK_WIDGET(rw->window_name_entry));
        gtk_widget_show(rw->window_name_entry);
        g_signal_connect(rw->window_name_entry, "activate", G_CALLBACK(window_rename_entry_activate_cb), rw);
@@ -2419,19 +2596,19 @@ static void layout_menu_window_rename_cb(GtkWidget *UNUSED(widget), gpointer dat
        gtk_widget_show(rw->gd->dialog);
 }
 
-static void layout_menu_window_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void layout_menu_window_delete_cb(GtkWidget *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
        DeleteWindow *dw;
        GtkWidget *hbox;
 
        dw = g_new0(DeleteWindow, 1);
        dw->lw = lw;
 
-       dw->gd = generic_dialog_new(_("Delete window"), "delete_window", NULL, TRUE, window_delete_cancel_cb, dw);
-       dw->button_ok = generic_dialog_add_button(dw->gd, GTK_STOCK_OK, _("OK"), window_delete_ok_cb, TRUE);
+       dw->gd = generic_dialog_new(_("Delete window"), "delete_window", nullptr, TRUE, window_delete_cancel_cb, dw);
+       dw->button_ok = generic_dialog_add_button(dw->gd, GQ_ICON_OK, _("OK"), window_delete_ok_cb, TRUE);
 
-       generic_dialog_add_message(dw->gd, NULL, _("Delete window layout"), NULL, FALSE);
+       generic_dialog_add_message(dw->gd, nullptr, _("Delete window layout"), nullptr, FALSE);
 
        hbox = pref_box_new(dw->gd->vbox, FALSE, GTK_ORIENTATION_HORIZONTAL, 0);
        pref_spacer(hbox, PREF_PAD_INDENT);
@@ -2457,520 +2634,235 @@ static void layout_menu_window_delete_cb(GtkWidget *UNUSED(widget), gpointer dat
  *  name, stock_id, label, accelerator, tooltip, callback
  */
 static GtkActionEntry menu_entries[] = {
-  { "FileMenu",                NULL,                   N_("_File"),                            NULL,                   NULL,                                   NULL },
-  { "GoMenu",          NULL,                   N_("_Go"),                              NULL,                   NULL,                                   NULL },
-  { "EditMenu",                NULL,                   N_("_Edit"),                            NULL,                   NULL,                                   NULL },
-  { "SelectMenu",      NULL,                   N_("_Select"),                          NULL,                   NULL,                                   NULL },
-  { "OrientationMenu", NULL,                   N_("_Orientation"),                     NULL,                   NULL,                                   NULL },
-  { "RatingMenu",      NULL,                   N_("_Rating"),                                  NULL,                   NULL,                                   NULL },
-  { "PreferencesMenu", NULL,                   N_("P_references"),                     NULL,                   NULL,                                   NULL },
-  { "ViewMenu",                NULL,                   N_("_View"),                            NULL,                   NULL,                                   CB(layout_menu_view_menu_cb)  },
-  { "FileDirMenu",     NULL,                   N_("_Files and Folders"),               NULL,                   NULL,                                   NULL },
-  { "ZoomMenu",                NULL,                   N_("_Zoom"),                            NULL,                   NULL,                                   NULL },
-  { "ColorMenu",       NULL,                   N_("_Color Management"),                NULL,                   NULL,                                   NULL },
-  { "ConnectZoomMenu", NULL,                   N_("_Connected Zoom"),                  NULL,                   NULL,                                   NULL },
-  { "SplitMenu",       NULL,                   N_("Spli_t"),                           NULL,                   NULL,                                   NULL },
-  { "StereoMenu",      NULL,                   N_("Stere_o"),                          NULL,                   NULL,                                   NULL },
-  { "OverlayMenu",     NULL,                   N_("Image _Overlay"),                   NULL,                   NULL,                                   NULL },
-  { "PluginsMenu",     NULL,                   N_("_Plugins"),                         NULL,                   NULL,                                   NULL },
-  { "WindowsMenu",             NULL,           N_("_Windows"),                         NULL,                   NULL,                                   CB(layout_menu_windows_menu_cb)  },
-  { "HelpMenu",                NULL,                   N_("_Help"),                            NULL,                   NULL,                                   NULL },
-
-  { "Copy",            GTK_STOCK_COPY,         N_("_Copy..."),                         "<control>C",           N_("Copy..."),                          CB(layout_menu_copy_cb) },
-  { "Move",    PIXBUF_INLINE_ICON_MOVE,                        N_("_Move..."),                         "<control>M",           N_("Move..."),                          CB(layout_menu_move_cb) },
-  { "Rename",  PIXBUF_INLINE_ICON_RENAME,      N_("_Rename..."),                       "<control>R",           N_("Rename..."),                        CB(layout_menu_rename_cb) },
-  { "Delete",  PIXBUF_INLINE_ICON_TRASH,       N_("Move to Trash..."),         "<control>D",   N_("Move to Trash..."),         CB(layout_menu_move_to_trash_cb) },
-  { "DeleteAlt1",      PIXBUF_INLINE_ICON_TRASH,N_("Move to Trash..."),        "Delete",               N_("Move to Trash..."),         CB(layout_menu_move_to_trash_key_cb) },
-  { "DeleteAlt2",      PIXBUF_INLINE_ICON_TRASH,N_("Move to Trash..."),        "KP_Delete",    N_("Move to Trash..."),         CB(layout_menu_move_to_trash_key_cb) },
-  { "PermanentDelete", GTK_STOCK_DELETE,       N_("Delete..."),                        "<shift>Delete",N_("Delete..."),                        CB(layout_menu_delete_cb) }, 
-  { "SelectAll",       PIXBUF_INLINE_ICON_SELECT_ALL,                  N_("Select _all"),                      "<control>A",           N_("Select all"),                       CB(layout_menu_select_all_cb) },
-  { "SelectNone",      PIXBUF_INLINE_ICON_SELECT_NONE,                 N_("Select _none"),                     "<control><shift>A",    N_("Select none"),                      CB(layout_menu_unselect_all_cb) },
-  { "SelectInvert",    PIXBUF_INLINE_ICON_SELECT_INVERT,                       N_("_Invert Selection"),                "<control><shift>I",    N_("Invert Selection"),                 CB(layout_menu_invert_selection_cb) },
-  { "CloseWindow",     GTK_STOCK_CLOSE,        N_("C_lose window"),                    "<control>W",           N_("Close window"),                     CB(layout_menu_close_cb) },
-  { "Quit",            GTK_STOCK_QUIT,         N_("_Quit"),                            "<control>Q",           N_("Quit"),                             CB(layout_menu_exit_cb) },
-  { "FirstImage",      GTK_STOCK_GOTO_TOP,     N_("_First Image"),                     "Home",                 N_("First Image"),                      CB(layout_menu_image_first_cb) },
-  { "PrevImage",       GTK_STOCK_GO_UP,        N_("_Previous Image"),                  "BackSpace",            N_("Previous Image"),                   CB(layout_menu_image_prev_cb) },
-  { "PrevImageAlt1",   GTK_STOCK_GO_UP,        N_("_Previous Image"),                  "Page_Up",              N_("Previous Image"),                   CB(layout_menu_image_prev_cb) },
-  { "PrevImageAlt2",   GTK_STOCK_GO_UP,        N_("_Previous Image"),                  "KP_Page_Up",           N_("Previous Image"),                   CB(layout_menu_image_prev_cb) },
-  { "NextImage",       GTK_STOCK_GO_DOWN,      N_("_Next Image"),                      "space",                N_("Next Image"),                       CB(layout_menu_image_next_cb) },
-  { "NextImageAlt1",   GTK_STOCK_GO_DOWN,      N_("_Next Image"),                      "Page_Down",            N_("Next Image"),                       CB(layout_menu_image_next_cb) },
-
-  { "ImageForward",    GTK_STOCK_GOTO_LAST,    N_("Image Forward"),    NULL,   N_("Forward in image history"), CB(layout_menu_image_forward_cb) },
-  { "ImageBack",       GTK_STOCK_GOTO_FIRST,   N_("Image Back"),               NULL,   N_("Back in image history"),            CB(layout_menu_image_back_cb) },
-
-  { "FirstPage",GTK_STOCK_MEDIA_PREVIOUS,      N_("_First Page"),              NULL,   N_( "First Page of multi-page image"),  CB(layout_menu_page_first_cb) },
-  { "LastPage",        GTK_STOCK_MEDIA_NEXT,           N_("_Last Page"),               NULL,   N_("Last Page of multi-page image"),    CB(layout_menu_page_last_cb) },
-  { "NextPage",        GTK_STOCK_MEDIA_FORWARD,        N_("_Next Page"),               NULL,   N_("Next Page of multi-page image"),    CB(layout_menu_page_next_cb) },
-  { "PrevPage",        GTK_STOCK_MEDIA_REWIND,         N_("_Previous Page"),   NULL,   N_("Previous Page of multi-page image"),        CB(layout_menu_page_previous_cb) },
-
-
-  { "NextImageAlt2",   GTK_STOCK_GO_DOWN,      N_("_Next Image"),                      "KP_Page_Down",         N_("Next Image"),               CB(layout_menu_image_next_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 in folder history"),           CB(layout_menu_back_cb) },
-  { "Forward", GTK_STOCK_GO_FORWARD,   N_("_Forward"),         NULL,   N_("Forward in folder history"),        CB(layout_menu_forward_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 one folder"),                            CB(layout_menu_up_cb) },
-  { "NewWindow",       NULL,           N_("New window"),                       NULL,           N_("New window"),       CB(layout_menu_window_cb) },
-  { "NewWindowDefault",        NULL,   N_("default"),                  "<control>N",           N_("New window (default)"),     CB(layout_menu_window_default_cb)  },
-  { "NewWindowFromCurrent",    NULL,   N_("from current"),                     NULL,           N_("from current"),     CB(layout_menu_window_from_current_cb)  },
-  { "RenameWindow",    GTK_STOCK_EDIT,         N_("Rename window"),    NULL,   N_("Rename window"),    CB(layout_menu_window_rename_cb) },
-  { "DeleteWindow",    GTK_STOCK_DELETE,               N_("Delete window"),    NULL,   N_("Delete window"),    CB(layout_menu_window_delete_cb) },
-  { "NewCollection",   GTK_STOCK_INDEX,        N_("_New collection"),                  "C",                    N_("New collection"),                   CB(layout_menu_new_cb) },
-  { "OpenCollection",  GTK_STOCK_OPEN,         N_("_Open collection..."),              "O",                    N_("Open collection..."),               CB(layout_menu_open_cb) },
-  { "OpenRecent",      NULL,                   N_("Open recen_t"),                     NULL,                   N_("Open recent collection"),                   NULL },
-  { "Search",          GTK_STOCK_FIND,         N_("_Search..."),                       "F3",                   N_("Search..."),                        CB(layout_menu_search_cb) },
-  { "FindDupes",       GTK_STOCK_FIND,         N_("_Find duplicates..."),              "D",                    N_("Find duplicates..."),               CB(layout_menu_dupes_cb) },
-  { "PanView", PIXBUF_INLINE_ICON_PANORAMA,    N_("Pa_n view"),                        "<control>J",           N_("Pan view"),                         CB(layout_menu_pan_cb) },
-  { "Print",           GTK_STOCK_PRINT,        N_("_Print..."),                        "<shift>P",             N_("Print..."),                         CB(layout_menu_print_cb) },
-  { "NewFolder",       GTK_STOCK_DIRECTORY,    N_("N_ew folder..."),                   "<control>F",           N_("New folder..."),                    CB(layout_menu_dir_cb) },
-  { "EnableGrouping",  NULL,                   N_("Enable file _grouping"),            NULL,                   N_("Enable file grouping"),             CB(layout_menu_enable_grouping_cb) },
-  { "DisableGrouping", NULL,                   N_("Disable file groupi_ng"),           NULL,                   N_("Disable file grouping"),            CB(layout_menu_disable_grouping_cb) },
-  { "CopyPath",                NULL,                   N_("_Copy path to clipboard"),          NULL,                   N_("Copy path to clipboard"),           CB(layout_menu_copy_path_cb) },
-  { "CopyPathUnquoted",                NULL,                   N_("_Copy path unquoted to clipboard"),         NULL,                   N_("Copy path unquoted to clipboard"),          CB(layout_menu_copy_path_unquoted_cb) },
-  { "Rating0",         NULL,                   N_("_Rating 0"),        "<alt>KP_0",    N_("Rating 0"),                 CB(layout_menu_rating_0_cb) },
-  { "Rating1",         NULL,                   N_("_Rating 1"),        "<alt>KP_1",    N_("Rating 1"),                 CB(layout_menu_rating_1_cb) },
-  { "Rating2",         NULL,                   N_("_Rating 2"),        "<alt>KP_2",    N_("Rating 2"),                 CB(layout_menu_rating_2_cb) },
-  { "Rating3",         NULL,                   N_("_Rating 3"),        "<alt>KP_3",    N_("Rating 3"),                 CB(layout_menu_rating_3_cb) },
-  { "Rating4",         NULL,                   N_("_Rating 4"),        "<alt>KP_4",    N_("Rating 4"),                 CB(layout_menu_rating_4_cb) },
-  { "Rating5",         NULL,                   N_("_Rating 5"),        "<alt>KP_5",    N_("Rating 5"),                 CB(layout_menu_rating_5_cb) },
-  { "RatingM1",                NULL,                   N_("_Rating -1"),       "<alt>KP_Subtract",     N_("Rating -1"),        CB(layout_menu_rating_m1_cb) },
-  { "RotateCW",                PIXBUF_INLINE_ICON_CW,                  N_("_Rotate clockwise 90°"),           "bracketright",         N_("Image Rotate clockwise 90°"),                      CB(layout_menu_alter_90_cb) },
-  { "RotateCCW",       PIXBUF_INLINE_ICON_CCW, N_("Rotate _counterclockwise 90°"),            "bracketleft",          N_("Rotate counterclockwise 90°"),             CB(layout_menu_alter_90cc_cb) },
-  { "Rotate180",       PIXBUF_INLINE_ICON_180, N_("Rotate 1_80°"),    "<shift>R",             N_("Image Rotate 180°"),                       CB(layout_menu_alter_180_cb) },
-  { "Mirror",          PIXBUF_INLINE_ICON_MIRROR,      N_("_Mirror"),  "<shift>M",             N_("Image Mirror"),                             CB(layout_menu_alter_mirror_cb) },
-  { "Flip",            PIXBUF_INLINE_ICON_FLIP,        N_("_Flip"),    "<shift>F",             N_("Image Flip"),                               CB(layout_menu_alter_flip_cb) },
-  { "AlterNone",       PIXBUF_INLINE_ICON_ORIGINAL,    N_("_Original state"),  "<shift>O",             N_("Image rotate Original state"),                      CB(layout_menu_alter_none_cb) },
-  { "Preferences",     GTK_STOCK_PREFERENCES,  N_("P_references..."),                  "<control>O",           N_("Preferences..."),                   CB(layout_menu_config_cb) },
-  { "Plugins",         GTK_STOCK_PREFERENCES,  N_("Configure _Plugins..."),            NULL,                   N_("Configure Plugins..."),             CB(layout_menu_editors_cb) },
-  { "LayoutConfig",    GTK_STOCK_PREFERENCES,  N_("_Configure this window..."),        NULL,                   N_("Configure this window..."),         CB(layout_menu_layout_config_cb) },
-  { "Maintenance",     PIXBUF_INLINE_ICON_MAINTENANCE, N_("_Cache maintenance..."),    NULL,                   N_("Cache maintenance..."),             CB(layout_menu_remove_thumb_cb) },
-  { "Wallpaper",       NULL,                   N_("Set as _wallpaper"),                NULL,                   N_("Set as wallpaper"),                 CB(layout_menu_wallpaper_cb) },
-  { "SaveMetadata",    GTK_STOCK_SAVE,         N_("_Save metadata"),                   "<control>S",           N_("Save metadata"),                    CB(layout_menu_metadata_write_cb) },
-  { "KeywordAutocomplete",     NULL,   N_("Keyword autocomplete"),             "<alt>K",               N_("Keyword Autocomplete"),                     CB(layout_menu_keyword_autocomplete_cb) },
-  { "ZoomInAlt1",      GTK_STOCK_ZOOM_IN,      N_("Zoom _in"),                         "KP_Add",               N_("Zoom in"),                          CB(layout_menu_zoom_in_cb) },
-  { "ZoomIn",          GTK_STOCK_ZOOM_IN,      N_("Zoom _in"),                         "equal",                N_("Zoom in"),                          CB(layout_menu_zoom_in_cb) },
-  { "ZoomOut",         GTK_STOCK_ZOOM_OUT,     N_("Zoom _out"),                        "minus",                N_("Zoom out"),                         CB(layout_menu_zoom_out_cb) },
-  { "ZoomOutAlt1",     GTK_STOCK_ZOOM_OUT,     N_("Zoom _out"),                        "KP_Subtract",          N_("Zoom out"),                         CB(layout_menu_zoom_out_cb) },
-  { "Zoom100",         GTK_STOCK_ZOOM_100,     N_("Zoom _1:1"),                        "Z",                    N_("Zoom 1:1"),                         CB(layout_menu_zoom_1_1_cb) },
-  { "Zoom100Alt1",     GTK_STOCK_ZOOM_100,     N_("Zoom _1:1"),                        "KP_Divide",            N_("Zoom 1:1"),                         CB(layout_menu_zoom_1_1_cb) },
-  { "ZoomFitAlt1",     GTK_STOCK_ZOOM_FIT,     N_("_Zoom to fit"),                     "KP_Multiply",          N_("Zoom to fit"),                      CB(layout_menu_zoom_fit_cb) },
-  { "ZoomFit",         GTK_STOCK_ZOOM_FIT,     N_("_Zoom to fit"),                     "X",                    N_("Zoom to fit"),                      CB(layout_menu_zoom_fit_cb) },
-  { "ZoomFillHor",     PIXBUF_INLINE_ICON_ZOOMFILLHOR, N_("Fit _Horizontally"),                "H",                    N_("Fit Horizontally"),                 CB(layout_menu_zoom_fit_hor_cb) },
-  { "ZoomFillVert",    PIXBUF_INLINE_ICON_ZOOMFILLVERT,        N_("Fit _Vertically"),                  "W",                    N_("Fit Vertically"),                   CB(layout_menu_zoom_fit_vert_cb) },
-  { "Zoom200",         GTK_STOCK_FILE,                 N_("Zoom _2:1"),                        NULL,                   N_("Zoom 2:1"),                         CB(layout_menu_zoom_2_1_cb) },
-  { "Zoom300",         GTK_STOCK_FILE,                 N_("Zoom _3:1"),                        NULL,                   N_("Zoom 3:1"),                         CB(layout_menu_zoom_3_1_cb) },
-  { "Zoom400",         GTK_STOCK_FILE,                 N_("Zoom _4:1"),                        NULL,                   N_("Zoom 4:1"),                         CB(layout_menu_zoom_4_1_cb) },
-  { "Zoom50",          GTK_STOCK_FILE,                 N_("Zoom 1:2"),                         NULL,                   N_("Zoom 1:2"),                         CB(layout_menu_zoom_1_2_cb) },
-  { "Zoom33",          GTK_STOCK_FILE,                 N_("Zoom 1:3"),                         NULL,                   N_("Zoom 1:3"),                         CB(layout_menu_zoom_1_3_cb) },
-  { "Zoom25",          GTK_STOCK_FILE,                 N_("Zoom 1:4"),                         NULL,                   N_("Zoom 1:4"),                         CB(layout_menu_zoom_1_4_cb) },
-  { "ConnectZoomIn",   GTK_STOCK_ZOOM_IN,      N_("Zoom _in"),                         "plus",                 N_("Connected Zoom in"),                CB(layout_menu_connect_zoom_in_cb) },
-  { "ConnectZoomInAlt1",GTK_STOCK_ZOOM_IN,     N_("Zoom _in"),                         "<shift>KP_Add",        N_("Connected Zoom in"),                CB(layout_menu_connect_zoom_in_cb) },
-  { "ConnectZoomOut",  GTK_STOCK_ZOOM_OUT,     N_("Zoom _out"),                        "underscore",           N_("Connected Zoom out"),               CB(layout_menu_connect_zoom_out_cb) },
-  { "ConnectZoomOutAlt1",GTK_STOCK_ZOOM_OUT,   N_("Zoom _out"),                        "<shift>KP_Subtract",   N_("Connected Zoom out"),               CB(layout_menu_connect_zoom_out_cb) },
-  { "ConnectZoom100",  GTK_STOCK_ZOOM_100,     N_("Zoom _1:1"),                        "<shift>Z",             N_("Connected Zoom 1:1"),               CB(layout_menu_connect_zoom_1_1_cb) },
-  { "ConnectZoom100Alt1",GTK_STOCK_ZOOM_100,   N_("Zoom _1:1"),                        "<shift>KP_Divide",     N_("Connected Zoom 1:1"),               CB(layout_menu_connect_zoom_1_1_cb) },
-  { "ConnectZoomFit",  GTK_STOCK_ZOOM_FIT,     N_("_Zoom to fit"),                     "<shift>X",             N_("Connected Zoom to fit"),            CB(layout_menu_connect_zoom_fit_cb) },
-  { "ConnectZoomFitAlt1",GTK_STOCK_ZOOM_FIT,   N_("_Zoom to fit"),                     "<shift>KP_Multiply",   N_("Connected Zoom to fit"),            CB(layout_menu_connect_zoom_fit_cb) },
-  { "ConnectZoomFillHor",NULL,                 N_("Fit _Horizontally"),                "<shift>H",             N_("Connected Fit Horizontally"),       CB(layout_menu_connect_zoom_fit_hor_cb) },
-  { "ConnectZoomFillVert",NULL,                        N_("Fit _Vertically"),                  "<shift>W",             N_("Connected Fit Vertically"),         CB(layout_menu_connect_zoom_fit_vert_cb) },
-  { "ConnectZoom200",  NULL,                   N_("Zoom _2:1"),                        NULL,                   N_("Connected Zoom 2:1"),               CB(layout_menu_connect_zoom_2_1_cb) },
-  { "ConnectZoom300",  NULL,                   N_("Zoom _3:1"),                        NULL,                   N_("Connected Zoom 3:1"),               CB(layout_menu_connect_zoom_3_1_cb) },
-  { "ConnectZoom400",  NULL,                   N_("Zoom _4:1"),                        NULL,                   N_("Connected Zoom 4:1"),               CB(layout_menu_connect_zoom_4_1_cb) },
-  { "ConnectZoom50",   NULL,                   N_("Zoom 1:2"),                         NULL,                   N_("Connected Zoom 1:2"),               CB(layout_menu_connect_zoom_1_2_cb) },
-  { "ConnectZoom33",   NULL,                   N_("Zoom 1:3"),                         NULL,                   N_("Connected Zoom 1:3"),               CB(layout_menu_connect_zoom_1_3_cb) },
-  { "ConnectZoom25",   NULL,                   N_("Zoom 1:4"),                         NULL,                   N_("Connected Zoom 1:4"),               CB(layout_menu_connect_zoom_1_4_cb) },
-  { "ViewInNewWindow", NULL,                   N_("_View in new window"),              "<control>V",           N_("View in new window"),               CB(layout_menu_view_in_new_window_cb) },
-  { "OpenArchive",     GTK_STOCK_OPEN,                 N_("Open archive"),             NULL,           N_("Open archive"),             CB(layout_menu_open_archive_cb) },
-  { "FullScreen",      GTK_STOCK_FULLSCREEN,   N_("F_ull screen"),                     "F",                    N_("Full screen"),                      CB(layout_menu_fullscreen_cb) },
-  { "FullScreenAlt1",  GTK_STOCK_FULLSCREEN,   N_("F_ull screen"),                     "V",                    N_("Full screen"),                      CB(layout_menu_fullscreen_cb) },
-  { "FullScreenAlt2",  GTK_STOCK_FULLSCREEN,   N_("F_ull screen"),                     "F11",                  N_("Full screen"),                      CB(layout_menu_fullscreen_cb) },
-  { "Escape",          GTK_STOCK_LEAVE_FULLSCREEN,N_("_Leave full screen"),            "Escape",               N_("Leave full screen"),                CB(layout_menu_escape_cb) },
-  { "EscapeAlt1",      GTK_STOCK_LEAVE_FULLSCREEN,N_("_Leave full screen"),            "Q",                    N_("Leave full screen"),                CB(layout_menu_escape_cb) },
-  { "ImageOverlayCycle",NULL,                  N_("_Cycle through overlay modes"),     "I",                    N_("Cycle through Overlay modes"),      CB(layout_menu_overlay_toggle_cb) },
-  { "HistogramChanCycle",NULL,                 N_("Cycle through histogram ch_annels"),"K",                    N_("Cycle through histogram channels"), CB(layout_menu_histogram_toggle_channel_cb) },
-  { "HistogramModeCycle",NULL,                 N_("Cycle through histogram mo_des"),   "J",                    N_("Cycle through histogram modes"),    CB(layout_menu_histogram_toggle_mode_cb) },
-  { "HideTools",       PIXBUF_INLINE_ICON_HIDETOOLS,   N_("_Hide file list"),                  "<control>H",           N_("Hide file list"),                   CB(layout_menu_hide_cb) },
-  { "SlideShowPause",  GTK_STOCK_MEDIA_PAUSE,  N_("_Pause slideshow"),                 "P",                    N_("Pause slideshow"),                  CB(layout_menu_slideshow_pause_cb) },
-  { "SlideShowFaster", GTK_STOCK_FILE, N_("Faster"),           "<control>equal",                       N_("Slideshow Faster"),                         CB(layout_menu_slideshow_faster_cb) },
-  { "SlideShowSlower", GTK_STOCK_FILE, N_("Slower"),           "<control>minus",                       N_("Slideshow Slower"),                         CB(layout_menu_slideshow_slower_cb) },
-  { "Refresh",         GTK_STOCK_REFRESH,      N_("_Refresh"),                         "R",                    N_("Refresh"),                          CB(layout_menu_refresh_cb) },
-  { "HelpContents",    GTK_STOCK_HELP,         N_("_Help manual"),                     "F1",                   N_("Help manual"),                              CB(layout_menu_help_cb) },
-  { "HelpSearch",      NULL,           N_("On-line help search"),                      NULL,                   N_("On-line help search"),                              CB(layout_menu_help_search_cb) },
-  { "HelpShortcuts",   NULL,                   N_("_Keyboard shortcuts"),              NULL,                   N_("Keyboard shortcuts"),               CB(layout_menu_help_keys_cb) },
-  { "HelpKbd",         NULL,                   N_("_Keyboard map"),                    NULL,                   N_("Keyboard map"),                     CB(layout_menu_kbd_map_cb) },
-  { "HelpNotes",       NULL,                   N_("_Readme"),                  NULL,                   N_("Readme"),                   CB(layout_menu_notes_cb) },
-  { "HelpChangeLog",   NULL,                   N_("_ChangeLog"),                       NULL,                   N_("ChangeLog notes"),                  CB(layout_menu_changelog_cb) },
-  { "SearchAndRunCommand",     GTK_STOCK_FIND,         N_("Search and Run command"),   "slash",        N_("Search commands by keyword and run them"),  CB(layout_menu_search_and_run_cb) },
-  { "About",           GTK_STOCK_ABOUT,        N_("_About"),                           NULL,                   N_("About"),                            CB(layout_menu_about_cb) },
-  { "LogWindow",       NULL,                   N_("_Log Window"),                      NULL,                   N_("Log Window"),                       CB(layout_menu_log_window_cb) },
-  { "ExifWin",         PIXBUF_INLINE_ICON_EXIF,        N_("_Exif window"),                     "<control>E",           N_("Exif window"),                      CB(layout_menu_bar_exif_cb) },
-  { "StereoCycle",     NULL,                   N_("_Cycle through stereo modes"),      NULL,                   N_("Cycle through stereo modes"),       CB(layout_menu_stereo_mode_next_cb) },
-  { "SplitNextPane",   NULL,                   N_("_Next Pane"),       "<alt>Right",                   N_("Next Split Pane"),  CB(layout_menu_split_pane_next_cb) },
-  { "SplitPreviousPane",       NULL,                   N_("_Previous Pane"),   "<alt>Left",                    N_("Previous Split Pane"),      CB(layout_menu_split_pane_prev_cb) },
-  { "SplitUpPane",     NULL,                   N_("_Up Pane"), "<alt>Up",                      N_("Up Split Pane"),    CB(layout_menu_split_pane_updown_cb) },
-  { "SplitDownPane",   NULL,                   N_("_Down Pane"),       "<alt>Down",                    N_("Down Split Pane"),  CB(layout_menu_split_pane_updown_cb) },
-  { "WriteRotation",   NULL,                   N_("_Write orientation to file"),               NULL,           N_("Write orientation to file"),                        CB(layout_menu_write_rotate_cb) },
-  { "WriteRotationKeepDate",   NULL,                   N_("_Write orientation to file (preserve timestamp)"),                  NULL,           N_("Write orientation to file (preserve timestamp)"),                   CB(layout_menu_write_rotate_keep_date_cb) },
-  { "ClearMarks",      NULL,           N_("Clear Marks..."),                   NULL,           N_("Clear Marks"),                      CB(layout_menu_clear_marks_cb) },
+  { "About",                 GQ_ICON_ABOUT,                     N_("_About"),                                           nullptr,               N_("About"),                                           CB(layout_menu_about_cb) },
+  { "AlterNone",             PIXBUF_INLINE_ICON_ORIGINAL,       N_("_Original state"),                                  "<shift>O",            N_("Image rotate Original state"),                     CB(layout_menu_alter_none_cb) },
+  { "Back",                  GQ_ICON_GO_PREV,                   N_("_Back"),                                            nullptr,               N_("Back in folder history"),                          CB(layout_menu_back_cb) },
+  { "ClearMarks",            nullptr,                           N_("Clear Marks..."),                                   nullptr,               N_("Clear Marks"),                                     CB(layout_menu_clear_marks_cb) },
+  { "CloseWindow",           GQ_ICON_CLOSE,                     N_("C_lose window"),                                    "<control>W",          N_("Close window"),                                    CB(layout_menu_close_cb) },
+  { "ColorMenu",             nullptr,                           N_("_Color Management"),                                nullptr,               nullptr,                                               nullptr },
+  { "ConnectZoom100Alt1",    GQ_ICON_ZOOM_100,                  N_("Zoom _1:1"),                                        "<shift>KP_Divide",    N_("Connected Zoom 1:1"),                              CB(layout_menu_connect_zoom_1_1_cb) },                 
+  { "ConnectZoom100",        GQ_ICON_ZOOM_100,                  N_("Zoom _1:1"),                                        "<shift>Z",            N_("Connected Zoom 1:1"),                              CB(layout_menu_connect_zoom_1_1_cb) },
+  { "ConnectZoom200",        nullptr,                           N_("Zoom _2:1"),                                        nullptr,               N_("Connected Zoom 2:1"),                              CB(layout_menu_connect_zoom_2_1_cb) },
+  { "ConnectZoom25",         nullptr,                           N_("Zoom 1:4"),                                         nullptr,               N_("Connected Zoom 1:4"),                              CB(layout_menu_connect_zoom_1_4_cb) },
+  { "ConnectZoom300",        nullptr,                           N_("Zoom _3:1"),                                        nullptr,               N_("Connected Zoom 3:1"),                              CB(layout_menu_connect_zoom_3_1_cb) },
+  { "ConnectZoom33",         nullptr,                           N_("Zoom 1:3"),                                         nullptr,               N_("Connected Zoom 1:3"),                              CB(layout_menu_connect_zoom_1_3_cb) },
+  { "ConnectZoom400",        nullptr,                           N_("Zoom _4:1"),                                        nullptr,               N_("Connected Zoom 4:1"),                              CB(layout_menu_connect_zoom_4_1_cb) },
+  { "ConnectZoom50",         nullptr,                           N_("Zoom 1:2"),                                         nullptr,               N_("Connected Zoom 1:2"),                              CB(layout_menu_connect_zoom_1_2_cb) },
+  { "ConnectZoomFillHor",    nullptr,                           N_("Fit _Horizontally"),                                "<shift>H",            N_("Connected Fit Horizontally"),                      CB(layout_menu_connect_zoom_fit_hor_cb) },             
+  { "ConnectZoomFillVert",   nullptr,                           N_("Fit _Vertically"),                                  "<shift>W",            N_("Connected Fit Vertically"),                        CB(layout_menu_connect_zoom_fit_vert_cb) },            
+  { "ConnectZoomFitAlt1",    GQ_ICON_ZOOM_FIT,                  N_("_Zoom to fit"),                                     "<shift>KP_Multiply",  N_("Connected Zoom to fit"),                           CB(layout_menu_connect_zoom_fit_cb) },                 
+  { "ConnectZoomFit",        GQ_ICON_ZOOM_FIT,                  N_("_Zoom to fit"),                                     "<shift>X",            N_("Connected Zoom to fit"),                           CB(layout_menu_connect_zoom_fit_cb) },
+  { "ConnectZoomInAlt1",     GQ_ICON_ZOOM_IN,                   N_("Zoom _in"),                                         "<shift>KP_Add",       N_("Connected Zoom in"),                               CB(layout_menu_connect_zoom_in_cb) },                  
+  { "ConnectZoomIn",         GQ_ICON_ZOOM_IN,                   N_("Zoom _in"),                                         "plus",                N_("Connected Zoom in"),                               CB(layout_menu_connect_zoom_in_cb) },
+  { "ConnectZoomMenu",       nullptr,                           N_("_Connected Zoom"),                                  nullptr,               nullptr,                                               nullptr },
+  { "ConnectZoomOutAlt1",    GQ_ICON_ZOOM_OUT,                  N_("Zoom _out"),                                        "<shift>KP_Subtract",  N_("Connected Zoom out"),                              CB(layout_menu_connect_zoom_out_cb) },                 
+  { "ConnectZoomOut",        GQ_ICON_ZOOM_OUT,                  N_("Zoom _out"),                                        "underscore",          N_("Connected Zoom out"),                              CB(layout_menu_connect_zoom_out_cb) },
+  { "Copy",                  GQ_ICON_COPY,                      N_("_Copy..."),                                         "<control>C",          N_("Copy..."),                                         CB(layout_menu_copy_cb) },
+  { "CopyPath",              nullptr,                           N_("_Copy path to clipboard"),                          nullptr,               N_("Copy path to clipboard"),                          CB(layout_menu_copy_path_cb) },
+  { "CopyPathUnquoted",      nullptr,                           N_("_Copy path unquoted to clipboard"),                 nullptr,               N_("Copy path unquoted to clipboard"),                 CB(layout_menu_copy_path_unquoted_cb) },
+  { "DeleteAlt1",            GQ_ICON_USER_TRASH,                N_("Move to Trash..."),                                 "Delete",              N_("Move to Trash..."),                                CB(layout_menu_move_to_trash_key_cb) },                
+  { "DeleteAlt2",            GQ_ICON_USER_TRASH,                N_("Move to Trash..."),                                 "KP_Delete",           N_("Move to Trash..."),                                CB(layout_menu_move_to_trash_key_cb) },                
+  { "Delete",                GQ_ICON_USER_TRASH,                N_("Move to Trash..."),                                 "<control>D",          N_("Move to Trash..."),                                CB(layout_menu_move_to_trash_cb) },
+  { "DeleteWindow",          GQ_ICON_DELETE,                    N_("Delete window"),                                    nullptr,               N_("Delete window"),                                   CB(layout_menu_window_delete_cb) },
+  { "DisableGrouping",       nullptr,                           N_("Disable file groupi_ng"),                           nullptr,               N_("Disable file grouping"),                           CB(layout_menu_disable_grouping_cb) },
+  { "EditMenu",              nullptr,                           N_("_Edit"),                                            nullptr,               nullptr,                                               nullptr },
+  { "EnableGrouping",        nullptr,                           N_("Enable file _grouping"),                            nullptr,               N_("Enable file grouping"),                            CB(layout_menu_enable_grouping_cb) },
+  { "EscapeAlt1",            GQ_ICON_LEAVE_FULLSCREEN,          N_("_Leave full screen"),                               "Q",                   N_("Leave full screen"),                               CB(layout_menu_escape_cb) },                           
+  { "Escape",                GQ_ICON_LEAVE_FULLSCREEN,          N_("_Leave full screen"),                              "Escape",               N_("Leave full screen"),                               CB(layout_menu_escape_cb) },                           
+  { "ExifWin",               PIXBUF_INLINE_ICON_EXIF,           N_("_Exif window"),                                     "<control>E",          N_("Exif window"),                                     CB(layout_menu_bar_exif_cb) },
+  { "FileDirMenu",           nullptr,                           N_("_Files and Folders"),                               nullptr,               nullptr,                                               nullptr },
+  { "FileMenu",              nullptr,                           N_("_File"),                                            nullptr,               nullptr,                                               nullptr },
+  { "FindDupes",             GQ_ICON_FIND,                      N_("_Find duplicates..."),                              "D",                   N_("Find duplicates..."),                              CB(layout_menu_dupes_cb) },
+  { "FirstImage",            GQ_ICON_GO_TOP,                    N_("_First Image"),                                     "Home",                N_("First Image"),                                     CB(layout_menu_image_first_cb) },
+  { "FirstPage",             GQ_ICON_PREV_PAGE,                 N_("_First Page"),                                      nullptr,               N_( "First Page of multi-page image"),                 CB(layout_menu_page_first_cb) },                       
+  { "Flip",                  GQ_ICON_FLIP_VERTICAL,             N_("_Flip"),                                            "<shift>F",            N_("Image Flip"),                                      CB(layout_menu_alter_flip_cb) },
+  { "Forward",               GQ_ICON_GO_NEXT,                   N_("_Forward"),                                         nullptr,               N_("Forward in folder history"),                       CB(layout_menu_forward_cb) },
+  { "FullScreenAlt1",        GQ_ICON_FULLSCREEN,                N_("F_ull screen"),                                     "V",                   N_("Full screen"),                                     CB(layout_menu_fullscreen_cb) },
+  { "FullScreenAlt2",        GQ_ICON_FULLSCREEN,                N_("F_ull screen"),                                     "F11",                 N_("Full screen"),                                     CB(layout_menu_fullscreen_cb) },
+  { "FullScreen",            GQ_ICON_FULLSCREEN,                N_("F_ull screen"),                                     "F",                   N_("Full screen"),                                     CB(layout_menu_fullscreen_cb) },
+  { "GoMenu",                nullptr,                           N_("_Go"),                                              nullptr,               nullptr,                                               nullptr },
+  { "HelpChangeLog",         nullptr,                           N_("_ChangeLog"),                                       nullptr,               N_("ChangeLog notes"),                                 CB(layout_menu_changelog_cb) },
+  { "HelpContents",          GQ_ICON_HELP,                      N_("_Help manual"),                                     "F1",                  N_("Help manual"),                                     CB(layout_menu_help_cb) },
+  { "HelpKbd",               nullptr,                           N_("_Keyboard map"),                                    nullptr,               N_("Keyboard map"),                                    CB(layout_menu_kbd_map_cb) },
+  { "HelpMenu",              nullptr,                           N_("_Help"),                                            nullptr,               nullptr,                                               nullptr },
+  { "HelpNotes",             nullptr,                           N_("_Readme"),                                          nullptr,               N_("Readme"),                                          CB(layout_menu_notes_cb) },
+  { "HelpSearch",            nullptr,                           N_("On-line help search"),                              nullptr,               N_("On-line help search"),                             CB(layout_menu_help_search_cb) },
+  { "HelpShortcuts",         nullptr,                           N_("_Keyboard shortcuts"),                              nullptr,               N_("Keyboard shortcuts"),                              CB(layout_menu_help_keys_cb) },
+  { "HideTools",             PIXBUF_INLINE_ICON_HIDETOOLS,      N_("_Hide file list"),                                  "<control>H",          N_("Hide file list"),                                  CB(layout_menu_hide_cb) },
+  { "HistogramChanCycle",    nullptr,                           N_("Cycle through histogram ch_annels"),                "K",                   N_("Cycle through histogram channels"),                CB(layout_menu_histogram_toggle_channel_cb) },                                                         
+  { "HistogramModeCycle",    nullptr,                           N_("Cycle through histogram mo_des"),                   "J",                   N_("Cycle through histogram modes"),                   CB(layout_menu_histogram_toggle_mode_cb) },            
+  { "Home",                  GQ_ICON_HOME,                      N_("_Home"),                                            nullptr,               N_("Home"),                                            CB(layout_menu_home_cb) },
+  { "ImageBack",             GQ_ICON_GO_FIRST,                  N_("Image Back"),                                       nullptr,               N_("Back in image history"),                           CB(layout_menu_image_back_cb) },
+  { "ImageForward",          GQ_ICON_GO_LAST,                   N_("Image Forward"),                                    nullptr,               N_("Forward in image history"),                        CB(layout_menu_image_forward_cb) },
+  { "ImageOverlayCycle",     nullptr,                           N_("_Cycle through overlay modes"),                     "I",                   N_("Cycle through Overlay modes"),                     CB(layout_menu_overlay_toggle_cb) },                   
+  { "KeywordAutocomplete",   nullptr,                           N_("Keyword autocomplete"),                             "<alt>K",              N_("Keyword Autocomplete"),                            CB(layout_menu_keyword_autocomplete_cb) },
+  { "LastImage",             GQ_ICON_GO_BOTTOM,                 N_("_Last Image"),                                      "End",                 N_("Last Image"),                                      CB(layout_menu_image_last_cb) },
+  { "LastPage",              GQ_ICON_NEXT_PAGE,                 N_("_Last Page"),                                       nullptr,               N_("Last Page of multi-page image"),                   CB(layout_menu_page_last_cb) },
+  { "LayoutConfig",          GQ_ICON_PREFERENCES,               N_("_Configure this window..."),                        nullptr,               N_("Configure this window..."),                        CB(layout_menu_layout_config_cb) },
+  { "LogWindow",             nullptr,                           N_("_Log Window"),                                      nullptr,               N_("Log Window"),                                      CB(layout_menu_log_window_cb) },
+  { "Maintenance",           PIXBUF_INLINE_ICON_MAINTENANCE,    N_("_Cache maintenance..."),                            nullptr,               N_("Cache maintenance..."),                            CB(layout_menu_remove_thumb_cb) },
+  { "Mirror",                GQ_ICON_FLIP_HORIZONTAL,           N_("_Mirror"),                                          "<shift>M",            N_("Image Mirror"),                                    CB(layout_menu_alter_mirror_cb) },
+  { "Move",                  PIXBUF_INLINE_ICON_MOVE,           N_("_Move..."),                                         "<control>M",          N_("Move..."),                                         CB(layout_menu_move_cb) },
+  { "NewCollection",         GQ_ICON_COLLECTION,                N_("_New collection"),                                  "C",                   N_("New collection"),                                  CB(layout_menu_new_cb) },
+  { "NewFolder",             GQ_ICON_DIRECTORY,                 N_("N_ew folder..."),                                   "<control>F",          N_("New folder..."),                                   CB(layout_menu_dir_cb) },
+  { "NewWindowDefault",      nullptr,                           N_("default"),                                          "<control>N",          N_("New window (default)"),                            CB(layout_menu_window_default_cb)  },
+  { "NewWindowFromCurrent",  nullptr,                           N_("from current"),                                     nullptr,               N_("from current"),                                    CB(layout_menu_window_from_current_cb)  },
+  { "NewWindow",             nullptr,                           N_("New window"),                                       nullptr,               N_("New window"),                                      CB(layout_menu_window_cb) },
+  { "NextImageAlt1",         GQ_ICON_GO_DOWN,                   N_("_Next Image"),                                      "Page_Down",           N_("Next Image"),                                      CB(layout_menu_image_next_cb) },
+  { "NextImageAlt2",         GQ_ICON_GO_DOWN,                   N_("_Next Image"),                                      "KP_Page_Down",        N_("Next Image"),                                      CB(layout_menu_image_next_cb) },
+  { "NextImage",             GQ_ICON_GO_DOWN,                   N_("_Next Image"),                                      "space",               N_("Next Image"),                                      CB(layout_menu_image_next_cb) },
+  { "NextPage",              GQ_ICON_FORWARD_PAGE,              N_("_Next Page"),                                       nullptr,               N_("Next Page of multi-page image"),                   CB(layout_menu_page_next_cb) },
+  { "OpenArchive",           GQ_ICON_OPEN,                      N_("Open archive"),                                     nullptr,               N_("Open archive"),                                    CB(layout_menu_open_archive_cb) },
+  { "OpenCollection",        GQ_ICON_OPEN,                      N_("_Open collection..."),                              "O",                   N_("Open collection..."),                              nullptr },
+  { "OpenMenu",              nullptr,                           N_("☰"),                                                nullptr,               nullptr,                                               nullptr },
+  { "OpenRecent",            nullptr,                           N_("Open recen_t"),                                     nullptr,               N_("Open recent collection"),                          nullptr },
+  { "OpenWith",              GQ_ICON_OPEN_WITH,                 N_("Open With..."),                                     nullptr,               N_("Open With..."),                                    CB(layout_menu_open_with_cb) },
+  { "OrientationMenu",       nullptr,                           N_("_Orientation"),                                     nullptr,               nullptr,                                               nullptr },
+  { "OverlayMenu",           nullptr,                           N_("Image _Overlay"),                                   nullptr,               nullptr,                                               nullptr },
+  { "PanView",               PIXBUF_INLINE_ICON_PANORAMA,       N_("Pa_n view"),                                        "<control>J",          N_("Pan view"),                                        CB(layout_menu_pan_cb) },
+  { "PermanentDelete",       GQ_ICON_DELETE,                    N_("Delete..."),                                        "<shift>Delete",       N_("Delete..."),                                       CB(layout_menu_delete_cb) },                           
+  { "Plugins",               GQ_ICON_PREFERENCES,               N_("Configure _Plugins..."),                            nullptr,               N_("Configure Plugins..."),                            CB(layout_menu_editors_cb) },
+  { "PluginsMenu",           nullptr,                           N_("_Plugins"),                                         nullptr,               nullptr,                                               nullptr },
+  { "Preferences",           GQ_ICON_PREFERENCES,               N_("P_references..."),                                  "<control>O",          N_("Preferences..."),                                  CB(layout_menu_config_cb) },
+  { "PreferencesMenu",       nullptr,                           N_("P_references"),                                     nullptr,               nullptr,                                               nullptr },
+  { "PrevImageAlt1",         GQ_ICON_GO_UP,                     N_("_Previous Image"),                                  "Page_Up",             N_("Previous Image"),                                  CB(layout_menu_image_prev_cb) },
+  { "PrevImageAlt2",         GQ_ICON_GO_UP,                     N_("_Previous Image"),                                  "KP_Page_Up",          N_("Previous Image"),                                  CB(layout_menu_image_prev_cb) },
+  { "PrevImage",             GQ_ICON_GO_UP,                     N_("_Previous Image"),                                  "BackSpace",           N_("Previous Image"),                                  CB(layout_menu_image_prev_cb) },
+  { "PrevPage",              GQ_ICON_BACK_PAGE,                 N_("_Previous Page"),                                   nullptr,               N_("Previous Page of multi-page image"),               CB(layout_menu_page_previous_cb) },
+  { "Print",                 GQ_ICON_PRINT,                     N_("_Print..."),                                        "<shift>P",            N_("Print..."),                                        CB(layout_menu_print_cb) },
+  { "Quit",                  GQ_ICON_QUIT,                      N_("_Quit"),                                            "<control>Q",          N_("Quit"),                                            CB(layout_menu_exit_cb) },
+  { "Rating0",               nullptr,                           N_("_Rating 0"),                                        "<alt>KP_0",           N_("Rating 0"),                                        CB(layout_menu_rating_0_cb) },
+  { "Rating1",               nullptr,                           N_("_Rating 1"),                                        "<alt>KP_1",           N_("Rating 1"),                                        CB(layout_menu_rating_1_cb) },
+  { "Rating2",               nullptr,                           N_("_Rating 2"),                                        "<alt>KP_2",           N_("Rating 2"),                                        CB(layout_menu_rating_2_cb) },
+  { "Rating3",               nullptr,                           N_("_Rating 3"),                                        "<alt>KP_3",           N_("Rating 3"),                                        CB(layout_menu_rating_3_cb) },
+  { "Rating4",               nullptr,                           N_("_Rating 4"),                                        "<alt>KP_4",           N_("Rating 4"),                                        CB(layout_menu_rating_4_cb) },
+  { "Rating5",               nullptr,                           N_("_Rating 5"),                                        "<alt>KP_5",           N_("Rating 5"),                                        CB(layout_menu_rating_5_cb) },
+  { "RatingM1",              nullptr,                           N_("_Rating -1"),                                       "<alt>KP_Subtract",    N_("Rating -1"),                                       CB(layout_menu_rating_m1_cb) },
+  { "RatingMenu",            nullptr,                           N_("_Rating"),                                          nullptr,               nullptr,                                               nullptr },
+  { "Refresh",               GQ_ICON_REFRESH,                   N_("_Refresh"),                                         "R",                   N_("Refresh"),                                         CB(layout_menu_refresh_cb) },
+  { "Rename",                PIXBUF_INLINE_ICON_RENAME,         N_("_Rename..."),                                       "<control>R",          N_("Rename..."),                                       CB(layout_menu_rename_cb) },
+  { "RenameWindow",          GQ_ICON_EDIT,                      N_("Rename window"),                                    nullptr,               N_("Rename window"),                                   CB(layout_menu_window_rename_cb) },
+  { "Rotate180",             PIXBUF_INLINE_ICON_180,            N_("Rotate 1_80°"),                                     "<shift>R",            N_("Image Rotate 180°"),                               CB(layout_menu_alter_180_cb) },
+  { "RotateCCW",             GQ_ICON_ROTATE_LEFT,               N_("Rotate _counterclockwise 90°"),                     "bracketleft",         N_("Rotate counterclockwise 90°"),                     CB(layout_menu_alter_90cc_cb) },
+  { "RotateCW",              GQ_ICON_ROTATE_RIGHT,              N_("_Rotate clockwise 90°"),                            "bracketright",        N_("Image Rotate clockwise 90°"),                      CB(layout_menu_alter_90_cb) },
+  { "SaveMetadata",          GQ_ICON_SAVE,                      N_("_Save metadata"),                                   "<control>S",          N_("Save metadata"),                                   CB(layout_menu_metadata_write_cb) },
+  { "SearchAndRunCommand",   GQ_ICON_FIND,                      N_("Search and Run command"),                           "slash",               N_("Search commands by keyword and run them"),         CB(layout_menu_search_and_run_cb) },
+  { "Search",                GQ_ICON_FIND,                      N_("_Search..."),                                       "F3",                  N_("Search..."),                                       CB(layout_menu_search_cb) },
+  { "SelectAll",             PIXBUF_INLINE_ICON_SELECT_ALL,     N_("Select _all"),                                      "<control>A",          N_("Select all"),                                      CB(layout_menu_select_all_cb) },
+  { "SelectInvert",          PIXBUF_INLINE_ICON_SELECT_INVERT,  N_("_Invert Selection"),                                "<control><shift>I",   N_("Invert Selection"),                                CB(layout_menu_invert_selection_cb) },
+  { "SelectMenu",            nullptr,                           N_("_Select"),                                          nullptr,               nullptr,                                               nullptr },
+  { "SelectNone",            PIXBUF_INLINE_ICON_SELECT_NONE,    N_("Select _none"),                                     "<control><shift>A",   N_("Select none"),                                     CB(layout_menu_unselect_all_cb) },
+  { "SlideShowFaster",       GQ_ICON_GENERIC,                   N_("Faster"),                                           "<control>equal",      N_("Slideshow Faster"),                                CB(layout_menu_slideshow_faster_cb) },
+  { "SlideShowPause",        GQ_ICON_PAUSE,                     N_("_Pause slideshow"),                                 "P",                   N_("Pause slideshow"),                                 CB(layout_menu_slideshow_pause_cb) },
+  { "SlideShowSlower",       GQ_ICON_GENERIC,                   N_("Slower"),                                           "<control>minus",      N_("Slideshow Slower"),                                CB(layout_menu_slideshow_slower_cb) },
+  { "SplitDownPane",         nullptr,                           N_("_Down Pane"),                                       "<alt>Down",           N_("Down Split Pane"),                                 CB(layout_menu_split_pane_updown_cb) },
+  { "SplitMenu",             nullptr,                           N_("Spli_t"),                                           nullptr,               nullptr,                                               nullptr },
+  { "SplitNextPane",         nullptr,                           N_("_Next Pane"),                                       "<alt>Right",          N_("Next Split Pane"),                                 CB(layout_menu_split_pane_next_cb) },
+  { "SplitPreviousPane",     nullptr,                           N_("_Previous Pane"),                                   "<alt>Left",           N_("Previous Split Pane"),                             CB(layout_menu_split_pane_prev_cb) },
+  { "SplitUpPane",           nullptr,                           N_("_Up Pane"),                                         "<alt>Up",             N_("Up Split Pane"),                                   CB(layout_menu_split_pane_updown_cb) },
+  { "StereoCycle",           nullptr,                           N_("_Cycle through stereo modes"),                      nullptr,               N_("Cycle through stereo modes"),                      CB(layout_menu_stereo_mode_next_cb) },
+  { "StereoMenu",            nullptr,                           N_("Stere_o"),                                          nullptr,               nullptr,                                               nullptr },
+  { "Up",                    GQ_ICON_GO_UP,                     N_("_Up"),                                              nullptr,               N_("Up one folder"),                                   CB(layout_menu_up_cb) },
+  { "ViewInNewWindow",       nullptr,                           N_("_View in new window"),                              "<control>V",          N_("View in new window"),                              CB(layout_menu_view_in_new_window_cb) },
+  { "ViewMenu",              nullptr,                           N_("_View"),                                            nullptr,               nullptr,                                               CB(layout_menu_view_menu_cb)  },
+  { "Wallpaper",             nullptr,                           N_("Set as _wallpaper"),                                nullptr,               N_("Set as wallpaper"),                                CB(layout_menu_wallpaper_cb) },
+  { "WindowsMenu",           nullptr,                           N_("_Windows"),                                         nullptr,               nullptr,                                               CB(layout_menu_windows_menu_cb)  },
+  { "WriteRotationKeepDate", nullptr,                           N_("_Write orientation to file (preserve timestamp)"),  nullptr,               N_("Write orientation to file (preserve timestamp)"),  CB(layout_menu_write_rotate_keep_date_cb) },
+  { "WriteRotation",         nullptr,                           N_("_Write orientation to file"),                       nullptr,               N_("Write orientation to file"),                       CB(layout_menu_write_rotate_cb) },
+  { "Zoom100Alt1",           GQ_ICON_ZOOM_100,                  N_("Zoom _1:1"),                                        "KP_Divide",           N_("Zoom 1:1"),                                        CB(layout_menu_zoom_1_1_cb) },
+  { "Zoom100",               GQ_ICON_ZOOM_100,                  N_("Zoom _1:1"),                                        "Z",                   N_("Zoom 1:1"),                                        CB(layout_menu_zoom_1_1_cb) },
+  { "Zoom200",               GQ_ICON_GENERIC,                   N_("Zoom _2:1"),                                        nullptr,               N_("Zoom 2:1"),                                        CB(layout_menu_zoom_2_1_cb) },
+  { "Zoom25",                GQ_ICON_GENERIC,                   N_("Zoom 1:4"),                                         nullptr,               N_("Zoom 1:4"),                                        CB(layout_menu_zoom_1_4_cb) },
+  { "Zoom300",               GQ_ICON_GENERIC,                   N_("Zoom _3:1"),                                        nullptr,               N_("Zoom 3:1"),                                        CB(layout_menu_zoom_3_1_cb) },
+  { "Zoom33",                GQ_ICON_GENERIC,                   N_("Zoom 1:3"),                                         nullptr,               N_("Zoom 1:3"),                                        CB(layout_menu_zoom_1_3_cb) },
+  { "Zoom400",               GQ_ICON_GENERIC,                   N_("Zoom _4:1"),                                        nullptr,               N_("Zoom 4:1"),                                        CB(layout_menu_zoom_4_1_cb) },
+  { "Zoom50",                GQ_ICON_GENERIC,                   N_("Zoom 1:2"),                                         nullptr,               N_("Zoom 1:2"),                                        CB(layout_menu_zoom_1_2_cb) },
+  { "ZoomFillHor",           PIXBUF_INLINE_ICON_ZOOMFILLHOR,    N_("Fit _Horizontally"),                                "H",                   N_("Fit Horizontally"),                                CB(layout_menu_zoom_fit_hor_cb) },
+  { "ZoomFillVert",          PIXBUF_INLINE_ICON_ZOOMFILLVERT,   N_("Fit _Vertically"),                                  "W",                   N_("Fit Vertically"),                                  CB(layout_menu_zoom_fit_vert_cb) },
+  { "ZoomFitAlt1",           GQ_ICON_ZOOM_FIT,                  N_("_Zoom to fit"),                                     "KP_Multiply",         N_("Zoom to fit"),                                     CB(layout_menu_zoom_fit_cb) },
+  { "ZoomFit",               GQ_ICON_ZOOM_FIT,                  N_("_Zoom to fit"),                                     "X",                   N_("Zoom to fit"),                                     CB(layout_menu_zoom_fit_cb) },
+  { "ZoomInAlt1",            GQ_ICON_ZOOM_IN,                   N_("Zoom _in"),                                         "KP_Add",              N_("Zoom in"),                                         CB(layout_menu_zoom_in_cb) },
+  { "ZoomIn",                GQ_ICON_ZOOM_IN,                   N_("Zoom _in"),                                         "equal",               N_("Zoom in"),                                         CB(layout_menu_zoom_in_cb) },
+  { "ZoomMenu",              nullptr,                           N_("_Zoom"),                                            nullptr,               nullptr,                                               nullptr },
+  { "ZoomOutAlt1",           GQ_ICON_ZOOM_OUT,                  N_("Zoom _out"),                                        "KP_Subtract",         N_("Zoom out"),                                        CB(layout_menu_zoom_out_cb) },
+  { "ZoomOut",               GQ_ICON_ZOOM_OUT,                  N_("Zoom _out"),                                        "minus",               N_("Zoom out"),                                        CB(layout_menu_zoom_out_cb) }
 };
 
 static GtkToggleActionEntry menu_toggle_entries[] = {
-  { "Thumbnails",      PIXBUF_INLINE_ICON_THUMB,N_("Show _Thumbnails"),                "T",                    N_("Show Thumbnails"),                  CB(layout_menu_thumb_cb),        FALSE },
-  { "ShowMarks",        PIXBUF_INLINE_ICON_MARKS,      N_("Show _Marks"),                      "M",                    N_("Show Marks"),                       CB(layout_menu_marks_cb),        FALSE  },
-  { "ShowFileFilter", PIXBUF_INLINE_ICON_FILE_FILTER,  N_("Show File Filter"), NULL,   N_("Show File Filter"), CB(layout_menu_file_filter_cb),  FALSE  },
-  { "ShowInfoPixel",   GTK_STOCK_COLOR_PICKER, N_("Pi_xel Info"),                      NULL,                   N_("Show Pixel Info"),                  CB(layout_menu_info_pixel_cb),   FALSE  },
-  { "IgnoreAlpha", GTK_STOCK_STRIKETHROUGH,           N_("Hide _alpha"),          "<shift>A",     N_("Hide alpha channel"),       CB(layout_menu_alter_ignore_alpha_cb), FALSE},
-  { "FloatTools",      PIXBUF_INLINE_ICON_FLOAT,N_("_Float file list"),                "L",                    N_("Float file list"),                  CB(layout_menu_float_cb),        FALSE  },
-  { "HideToolbar",     NULL,                   N_("Hide tool_bar"),                    NULL,                   N_("Hide toolbar"),                     CB(layout_menu_toolbar_cb),      FALSE  },
-  { "SBar",    PIXBUF_INLINE_ICON_INFO,        N_("_Info sidebar"),                    "<control>K",           N_("Info sidebar"),                     CB(layout_menu_bar_cb),          FALSE  },
-  { "SBarSort",        PIXBUF_INLINE_ICON_SORT,        N_("Sort _manager"),                    "<shift>S",             N_("Sort manager"),                     CB(layout_menu_bar_sort_cb),     FALSE  },
-  { "HideBars",                NULL,                   N_("Hide Bars"),                        "grave",                N_("Hide Bars"),                        CB(layout_menu_hide_bars_cb),    FALSE  },
-  { "SlideShow",       GTK_STOCK_MEDIA_PLAY,   N_("Toggle _slideshow"),                "S",                    N_("Toggle slideshow"),                 CB(layout_menu_slideshow_cb),    FALSE  },
-  { "UseColorProfiles",        GTK_STOCK_SELECT_COLOR, N_("Use _color profiles"),              NULL,                   N_("Use color profiles"),               CB(layout_color_menu_enable_cb), FALSE},
-  { "UseImageProfile", NULL,                   N_("Use profile from _image"),          NULL,                   N_("Use profile from image"),           CB(layout_color_menu_use_image_cb), FALSE},
-  { "Grayscale",       PIXBUF_INLINE_ICON_GRAYSCALE,   N_("Toggle _grayscale"),        "<shift>G",             N_("Toggle grayscale"),         CB(layout_menu_alter_desaturate_cb), FALSE},
-  { "ImageOverlay",    NULL,                   N_("Image _Overlay"),                   NULL,                   N_("Image Overlay"),                    CB(layout_menu_overlay_cb),      FALSE },
-  { "ImageHistogram",  NULL,                   N_("_Show Histogram"),                  NULL,                   N_("Show Histogram"),                   CB(layout_menu_histogram_cb),    FALSE },
-  { "RectangularSelection",    PIXBUF_INLINE_ICON_SELECT_RECTANGLE,    N_("Rectangular Selection"),                    "<alt>R",                       N_("Rectangular Selection"),                    CB(layout_menu_rectangular_selection_cb),        FALSE },
-  { "Animate", NULL,   N_("_Animation"),               "A",                    N_("Toggle animation"),                 CB(layout_menu_animate_cb),      FALSE  },
-  { "ExifRotate",      GTK_STOCK_ORIENTATION_PORTRAIT,                 N_("_Exif rotate"),             "<alt>X",               N_("Toggle Exif rotate"),                       CB(layout_menu_exif_rotate_cb), FALSE },
-  { "DrawRectangle",   PIXBUF_INLINE_ICON_DRAW_RECTANGLE,                      N_("Draw Rectangle"),           NULL,           N_("Draw Rectangle"),                   CB(layout_menu_select_rectangle_cb), FALSE },
-  { "OverUnderExposed",        PIXBUF_INLINE_ICON_EXPOSURE,    N_("Over/Under Exposed"),       "<shift>E",             N_("Highlight over/under exposed"),             CB(layout_menu_select_overunderexposed_cb), FALSE },
-  { "SplitPaneSync",   PIXBUF_INLINE_SPLIT_PANE_SYNC,                  N_("Split Pane Sync"),  NULL,           N_("Split Pane Sync"),  CB(layout_menu_split_pane_sync_cb), FALSE },
+  { "Animate",                 nullptr,                              N_("_Animation"),               "A",               N_("Toggle animation"),              CB(layout_menu_animate_cb),                  FALSE  },
+  { "DrawRectangle",           PIXBUF_INLINE_ICON_DRAW_RECTANGLE,    N_("Draw Rectangle"),           nullptr,           N_("Draw Rectangle"),                CB(layout_menu_select_rectangle_cb),         FALSE  },
+  { "ExifRotate",              GQ_ICON_ROTATE_LEFT,                  N_("_Exif rotate"),             "<alt>X",          N_("Toggle Exif rotate"),            CB(layout_menu_exif_rotate_cb),              FALSE  },
+  { "FloatTools",              PIXBUF_INLINE_ICON_FLOAT,             N_("_Float file list"),         "L",               N_("Float file list"),               CB(layout_menu_float_cb),                    FALSE  },
+  { "Grayscale",               PIXBUF_INLINE_ICON_GRAYSCALE,         N_("Toggle _grayscale"),        "<shift>G",        N_("Toggle grayscale"),              CB(layout_menu_alter_desaturate_cb),         FALSE  },
+  { "HideBars",                nullptr,                              N_("Hide Bars and Files"),      "grave",           N_("Hide Bars and Files"),           CB(layout_menu_hide_bars_cb),                FALSE  },
+  { "HideSelectableToolbars",  nullptr,                              N_("Hide Selectable Bars"),     "<control>grave",  N_("Hide Selectable Bars"),          CB(layout_menu_selectable_toolbars_cb),      FALSE  },
+  { "IgnoreAlpha",             GQ_ICON_STRIKETHROUGH,                N_("Hide _alpha"),              "<shift>A",        N_("Hide alpha channel"),            CB(layout_menu_alter_ignore_alpha_cb),       FALSE  },
+  { "ImageHistogram",          nullptr,                              N_("_Show Histogram"),          nullptr,           N_("Show Histogram"),                CB(layout_menu_histogram_cb),                FALSE  },
+  { "ImageOverlay",            nullptr,                              N_("Image _Overlay"),           nullptr,           N_("Image Overlay"),                 CB(layout_menu_overlay_cb),                  FALSE  },
+  { "OverUnderExposed",        PIXBUF_INLINE_ICON_EXPOSURE,          N_("Over/Under Exposed"),       "<shift>E",        N_("Highlight over/under exposed"),  CB(layout_menu_select_overunderexposed_cb),  FALSE  },
+  { "RectangularSelection",    PIXBUF_INLINE_ICON_SELECT_RECTANGLE,  N_("Rectangular Selection"),    "<alt>R",          N_("Rectangular Selection"),         CB(layout_menu_rectangular_selection_cb),    FALSE  },
+  { "SBar",                    PIXBUF_INLINE_ICON_PROPERTIES,        N_("_Info sidebar"),            "<control>K",      N_("Info sidebar"),                  CB(layout_menu_bar_cb),                      FALSE  },
+  { "SBarSort",                PIXBUF_INLINE_ICON_SORT,              N_("Sort _manager"),            "<shift>S",        N_("Sort manager"),                  CB(layout_menu_bar_sort_cb),                 FALSE  },
+  { "ShowFileFilter",          GQ_ICON_FILE_FILTER,                  N_("Show File Filter"),         nullptr,           N_("Show File Filter"),              CB(layout_menu_file_filter_cb),              FALSE  },
+  { "ShowInfoPixel",           GQ_ICON_SELECT_COLOR,                 N_("Pi_xel Info"),              nullptr,           N_("Show Pixel Info"),               CB(layout_menu_info_pixel_cb),               FALSE  },
+  { "ShowMarks",               PIXBUF_INLINE_ICON_MARKS,             N_("Show _Marks"),              "M",               N_("Show Marks"),                    CB(layout_menu_marks_cb),                    FALSE  },
+  { "SlideShow",               GQ_ICON_PLAY,                         N_("Toggle _slideshow"),        "S",               N_("Toggle slideshow"),              CB(layout_menu_slideshow_cb),                FALSE  },
+  { "SplitPaneSync",           PIXBUF_INLINE_SPLIT_PANE_SYNC,        N_("Split Pane Sync"),          nullptr,           N_("Split Pane Sync"),               CB(layout_menu_split_pane_sync_cb),          FALSE  },
+  { "Thumbnails",              PIXBUF_INLINE_ICON_THUMB,             N_("Show _Thumbnails"),         "T",               N_("Show Thumbnails"),               CB(layout_menu_thumb_cb),                    FALSE  },
+  { "UseColorProfiles",        GQ_ICON_COLOR_MANAGEMENT,             N_("Use _color profiles"),      nullptr,           N_("Use color profiles"),            CB(layout_color_menu_enable_cb),             FALSE  },
+  { "UseImageProfile",         nullptr,                              N_("Use profile from _image"),  nullptr,           N_("Use profile from image"),        CB(layout_color_menu_use_image_cb),          FALSE  }
 };
 
 static GtkRadioActionEntry menu_radio_entries[] = {
-  { "ViewList",                NULL,                   N_("Images as _List"),                  "<control>L",           N_("View Images as List"),              FILEVIEW_LIST },
-  { "ViewIcons",       NULL,                   N_("Images as I_cons"),                 "<control>I",           N_("View Images as Icons"),             FILEVIEW_ICON }
+  { "ViewIcons",  nullptr,  N_("Images as I_cons"),  "<control>I",  N_("View Images as Icons"),  FILEVIEW_ICON },
+  { "ViewList",   nullptr,  N_("Images as _List"),   "<control>L",  N_("View Images as List"),   FILEVIEW_LIST }
 };
 
 static GtkToggleActionEntry menu_view_dir_toggle_entries[] = {
-  { "FolderTree",      NULL,                   N_("T_oggle Folder View"),                      "<control>T",           N_("Toggle Folders View"),              CB(layout_menu_view_dir_as_cb),FALSE },
+  { "FolderTree",  nullptr,  N_("T_oggle Folder View"),  "<control>T",  N_("Toggle Folders View"),  CB(layout_menu_view_dir_as_cb),FALSE },
 };
 
 static GtkRadioActionEntry menu_split_radio_entries[] = {
-  { "SplitHorizontal", NULL,                   N_("_Horizontal"),                      "E",                    N_("Split panes horizontal."),                  SPLIT_HOR },
-  { "SplitVertical",   NULL,                   N_("_Vertical"),                        "U",                    N_("Split panes vertical"),                             SPLIT_VERT },
-  { "SplitQuad",       NULL,                   N_("_Quad"),                            NULL,                   N_("Split panes quad"),                         SPLIT_QUAD },
-  { "SplitSingle",     NULL,                   N_("_Single"),                          "Y",                    N_("Single pane"),                              SPLIT_NONE }
+  { "SplitHorizontal",  nullptr,  N_("_Horizontal"),  "E",      N_("Split panes horizontal."),  SPLIT_HOR },
+  { "SplitQuad",        nullptr,  N_("_Quad"),        nullptr,  N_("Split panes quad"),         SPLIT_QUAD },
+  { "SplitSingle",      nullptr,  N_("_Single"),      "Y",      N_("Single pane"),              SPLIT_NONE },
+  { "SplitTriple",      nullptr,  N_("_Triple"),      nullptr,  N_("Split panes triple"),       SPLIT_TRIPLE },
+  { "SplitVertical",    nullptr,  N_("_Vertical"),    "U",      N_("Split panes vertical"),     SPLIT_VERT }
 };
 
 static GtkRadioActionEntry menu_color_radio_entries[] = {
-  { "ColorProfile0",   NULL,                   N_("Input _0: sRGB"),                   NULL,                   N_("Input 0: sRGB"),                    COLOR_PROFILE_SRGB },
-  { "ColorProfile1",   NULL,                   N_("Input _1: AdobeRGB compatible"),    NULL,                   N_("Input 1: AdobeRGB compatible"),     COLOR_PROFILE_ADOBERGB },
-  { "ColorProfile2",   NULL,                   N_("Input _2"),                         NULL,                   N_("Input 2"),                          COLOR_PROFILE_FILE },
-  { "ColorProfile3",   NULL,                   N_("Input _3"),                         NULL,                   N_("Input 3"),                          COLOR_PROFILE_FILE + 1 },
-  { "ColorProfile4",   NULL,                   N_("Input _4"),                         NULL,                   N_("Input 4"),                          COLOR_PROFILE_FILE + 2 },
-  { "ColorProfile5",   NULL,                   N_("Input _5"),                         NULL,                   N_("Input 5"),                          COLOR_PROFILE_FILE + 3 }
+  { "ColorProfile0",  nullptr,  N_("Input _0: sRGB"),                 nullptr,  N_("Input 0: sRGB"),                 COLOR_PROFILE_SRGB },
+  { "ColorProfile1",  nullptr,  N_("Input _1: AdobeRGB compatible"),  nullptr,  N_("Input 1: AdobeRGB compatible"),  COLOR_PROFILE_ADOBERGB },
+  { "ColorProfile2",  nullptr,  N_("Input _2"),                       nullptr,  N_("Input 2"),                       COLOR_PROFILE_FILE },
+  { "ColorProfile3",  nullptr,  N_("Input _3"),                       nullptr,  N_("Input 3"),                       COLOR_PROFILE_FILE + 1 },
+  { "ColorProfile4",  nullptr,  N_("Input _4"),                       nullptr,  N_("Input 4"),                       COLOR_PROFILE_FILE + 2 },
+  { "ColorProfile5",  nullptr,  N_("Input _5"),                       nullptr,  N_("Input 5"),                       COLOR_PROFILE_FILE + 3 }
 };
 
 static GtkRadioActionEntry menu_histogram_channel[] = {
-  { "HistogramChanR",  NULL,                   N_("Histogram on _Red"),                NULL,                   N_("Histogram on Red"),         HCHAN_R },
-  { "HistogramChanG",  NULL,                   N_("Histogram on _Green"),              NULL,                   N_("Histogram on Green"),       HCHAN_G },
-  { "HistogramChanB",  NULL,                   N_("Histogram on _Blue"),               NULL,                   N_("Histogram on Blue"),        HCHAN_B },
-  { "HistogramChanRGB",        NULL,                   N_("_Histogram on RGB"),                        NULL,                   N_("Histogram on RGB"),         HCHAN_RGB },
-  { "HistogramChanV",  NULL,                   N_("Histogram on _Value"),              NULL,                   N_("Histogram on Value"),       HCHAN_MAX }
+  { "HistogramChanB",    nullptr,  N_("Histogram on _Blue"),   nullptr,  N_("Histogram on Blue"),   HCHAN_B },
+  { "HistogramChanG",    nullptr,  N_("Histogram on _Green"),  nullptr,  N_("Histogram on Green"),  HCHAN_G },
+  { "HistogramChanRGB",  nullptr,  N_("_Histogram on RGB"),    nullptr,  N_("Histogram on RGB"),    HCHAN_RGB },
+  { "HistogramChanR",    nullptr,  N_("Histogram on _Red"),    nullptr,  N_("Histogram on Red"),    HCHAN_R },
+  { "HistogramChanV",    nullptr,  N_("Histogram on _Value"),  nullptr,  N_("Histogram on Value"),  HCHAN_MAX }
 };
 
 static GtkRadioActionEntry menu_histogram_mode[] = {
-  { "HistogramModeLin",        NULL,                   N_("Li_near Histogram"),                NULL,                   N_("Linear Histogram"),         0 },
-  { "HistogramModeLog",        NULL,                   N_("_Log Histogram"),                   NULL,                   N_("Log Histogram"),            1 },
+  { "HistogramModeLin",  nullptr,  N_("Li_near Histogram"),  nullptr,  N_("Linear Histogram"),  0 },
+  { "HistogramModeLog",  nullptr,  N_("_Log Histogram"),     nullptr,  N_("Log Histogram"),     1 },
 };
 
 static GtkRadioActionEntry menu_stereo_mode_entries[] = {
-  { "StereoAuto",      NULL,                   N_("_Auto"),                            NULL,                   N_("Stereo Auto"),              STEREO_PIXBUF_DEFAULT },
-  { "StereoSBS",       NULL,                   N_("_Side by Side"),                    NULL,                   N_("Stereo Side by Side"),      STEREO_PIXBUF_SBS },
-  { "StereoCross",     NULL,                   N_("_Cross"),                           NULL,                   N_("Stereo Cross"),             STEREO_PIXBUF_CROSS },
-  { "StereoOff",       NULL,                   N_("_Off"),                             NULL,                   N_("Stereo Off"),               STEREO_PIXBUF_NONE }
+  { "StereoAuto",   nullptr,  N_("_Auto"),          nullptr,  N_("Stereo Auto"),          STEREO_PIXBUF_DEFAULT },
+  { "StereoCross",  nullptr,  N_("_Cross"),         nullptr,  N_("Stereo Cross"),         STEREO_PIXBUF_CROSS },
+  { "StereoOff",    nullptr,  N_("_Off"),           nullptr,  N_("Stereo Off"),           STEREO_PIXBUF_NONE },
+  { "StereoSBS",    nullptr,  N_("_Side by Side"),  nullptr,  N_("Stereo Side by Side"),  STEREO_PIXBUF_SBS }
 };
-
-
 #undef CB
 
-static const gchar *menu_ui_description =
-"<ui>"
-"  <menubar name='MainMenu'>"
-"    <menu action='FileMenu'>"
-"      <menuitem action='NewCollection'/>"
-"      <menuitem action='OpenCollection'/>"
-"      <menuitem action='OpenRecent'/>"
-"      <placeholder name='OpenSection'/>"
-"      <separator/>"
-"      <menuitem action='Search'/>"
-"      <menuitem action='FindDupes'/>"
-"      <placeholder name='SearchSection'/>"
-"      <separator/>"
-"      <menuitem action='Print'/>"
-"      <placeholder name='PrintSection'/>"
-"      <separator/>"
-"      <menuitem action='NewFolder'/>"
-"      <menuitem action='Copy'/>"
-"      <menuitem action='Move'/>"
-"      <menuitem action='Rename'/>"
-"      <separator/>"
-"      <menuitem action='Delete'/>"
-"      <menuitem action='PermanentDelete'/>"
-"      <separator/>"
-"      <placeholder name='FileOpsSection'/>"
-"      <separator/>"
-"      <placeholder name='QuitSection'/>"
-"      <menuitem action='Quit'/>"
-"      <separator/>"
-"    </menu>"
-"    <menu action='GoMenu'>"
-"      <menuitem action='FirstImage'/>"
-"      <menuitem action='PrevImage'/>"
-"      <menuitem action='NextImage'/>"
-"      <menuitem action='LastImage'/>"
-"      <menuitem action='ImageBack'/>"
-"      <menuitem action='ImageForward'/>"
-"      <separator/>"
-"      <menuitem action='Back'/>"
-"      <menuitem action='Forward'/>"
-"      <menuitem action='Up'/>"
-"      <menuitem action='Home'/>"
-"      <separator/>"
-"      <menuitem action='FirstPage'/>"
-"      <menuitem action='LastPage'/>"
-"      <menuitem action='NextPage'/>"
-"      <menuitem action='PrevPage'/>"
-"    </menu>"
-"    <menu action='SelectMenu'>"
-"      <menuitem action='SelectAll'/>"
-"      <menuitem action='SelectNone'/>"
-"      <menuitem action='SelectInvert'/>"
-"      <menuitem action='RectangularSelection'/>"
-"      <menuitem action='ShowFileFilter'/>"
-"      <placeholder name='SelectSection'/>"
-"      <separator/>"
-"      <menuitem action='CopyPath'/>"
-"      <menuitem action='CopyPathUnquoted'/>"
-"      <placeholder name='ClipboardSection'/>"
-"      <separator/>"
-"      <menuitem action='ShowMarks'/>"
-"      <menuitem action='ClearMarks'/>"
-"      <placeholder name='MarksSection'/>"
-"      <separator/>"
-"    </menu>"
-"    <menu action='EditMenu'>"
-"      <placeholder name='EditSection'/>"
-"      <separator/>"
-"      <menu action='OrientationMenu'>"
-"        <menuitem action='RotateCW'/>"
-"        <menuitem action='RotateCCW'/>"
-"        <menuitem action='Rotate180'/>"
-"        <menuitem action='Mirror'/>"
-"        <menuitem action='Flip'/>"
-"        <menuitem action='AlterNone'/>"
-"        <separator/>"
-"        <menuitem action='ExifRotate'/>"
-"        <separator/>"
-"        <menuitem action='WriteRotation'/>"
-"        <menuitem action='WriteRotationKeepDate'/>"
-"        <separator/>"
-"      </menu>"
-"      <menu action='RatingMenu'>"
-"        <menuitem action='Rating0'/>"
-"        <menuitem action='Rating1'/>"
-"        <menuitem action='Rating2'/>"
-"        <menuitem action='Rating3'/>"
-"        <menuitem action='Rating4'/>"
-"        <menuitem action='Rating5'/>"
-"        <menuitem action='RatingM1'/>"
-"        <separator/>"
-"      </menu>"
-"      <menuitem action='SaveMetadata'/>"
-"      <menuitem action='KeywordAutocomplete'/>"
-"      <placeholder name='PropertiesSection'/>"
-"      <separator/>"
-"      <menuitem action='DrawRectangle'/>"
-"      <separator/>"
-"      <menuitem action='Preferences'/>"
-"      <menuitem action='Plugins'/>"
-"      <menuitem action='LayoutConfig'/>"
-"      <menuitem action='Maintenance'/>"
-"      <placeholder name='PreferencesSection'/>"
-"      <separator/>"
-"      <separator/>"
-"    </menu>"
-"    <menu action='PluginsMenu'>"
-"    </menu>"
-"    <menu action='ViewMenu'>"
-"      <menuitem action='ViewInNewWindow'/>"
-"      <menuitem action='PanView'/>"
-"      <menuitem action='ExifWin'/>"
-"      <menuitem action='OpenArchive'/>"
-"      <placeholder name='WindowSection'/>"
-"      <separator/>"
-"      <menu action='FileDirMenu'>"
-"        <menuitem action='FolderTree'/>"
-"        <placeholder name='FolderSection'/>"
-"        <separator/>"
-"        <menuitem action='ViewList'/>"
-"        <menuitem action='ViewIcons'/>"
-"        <menuitem action='Thumbnails'/>"
-"        <placeholder name='ListSection'/>"
-"        <separator/>"
-"        <menuitem action='FloatTools'/>"
-"        <menuitem action='HideTools'/>"
-"        <menuitem action='HideToolbar'/>"
-"      </menu>"
-"      <placeholder name='DirSection'/>"
-"      <separator/>"
-"      <menu action='ZoomMenu'>"
-"        <menu action='ConnectZoomMenu'>"
-"          <menuitem action='ConnectZoomIn'/>"
-"          <menuitem action='ConnectZoomOut'/>"
-"          <menuitem action='ConnectZoomFit'/>"
-"          <menuitem action='ConnectZoomFillHor'/>"
-"          <menuitem action='ConnectZoomFillVert'/>"
-"          <menuitem action='ConnectZoom100'/>"
-"          <menuitem action='ConnectZoom200'/>"
-"          <menuitem action='ConnectZoom300'/>"
-"          <menuitem action='ConnectZoom400'/>"
-"          <menuitem action='ConnectZoom50'/>"
-"          <menuitem action='ConnectZoom33'/>"
-"          <menuitem action='ConnectZoom25'/>"
-"        </menu>"
-"        <menuitem action='ZoomIn'/>"
-"        <menuitem action='ZoomOut'/>"
-"        <menuitem action='ZoomFit'/>"
-"        <menuitem action='ZoomFillHor'/>"
-"        <menuitem action='ZoomFillVert'/>"
-"        <menuitem action='Zoom100'/>"
-"        <menuitem action='Zoom200'/>"
-"        <menuitem action='Zoom300'/>"
-"        <menuitem action='Zoom400'/>"
-"        <menuitem action='Zoom50'/>"
-"        <menuitem action='Zoom33'/>"
-"        <menuitem action='Zoom25'/>"
-"      </menu>"
-"      <menu action='SplitMenu'>"
-"        <menuitem action='SplitHorizontal'/>"
-"        <menuitem action='SplitVertical'/>"
-"        <menuitem action='SplitQuad'/>"
-"        <menuitem action='SplitSingle'/>"
-"        <separator/>"
-"        <menuitem action='SplitNextPane'/>"
-"        <menuitem action='SplitPreviousPane'/>"
-"        <menuitem action='SplitUpPane'/>"
-"        <menuitem action='SplitDownPane'/>"
-"        <separator/>"
-"        <menuitem action='SplitPaneSync'/>"
-"      </menu>"
-"      <menu action='StereoMenu'>"
-"        <menuitem action='StereoAuto'/>"
-"        <menuitem action='StereoSBS'/>"
-"        <menuitem action='StereoCross'/>"
-"        <menuitem action='StereoOff'/>"
-"        <separator/>"
-"        <menuitem action='StereoCycle'/>"
-"      </menu>"
-"      <menu action='ColorMenu'>"
-"        <menuitem action='UseColorProfiles'/>"
-"        <menuitem action='UseImageProfile'/>"
-"        <menuitem action='ColorProfile0'/>"
-"        <menuitem action='ColorProfile1'/>"
-"        <menuitem action='ColorProfile2'/>"
-"        <menuitem action='ColorProfile3'/>"
-"        <menuitem action='ColorProfile4'/>"
-"        <menuitem action='ColorProfile5'/>"
-"        <separator/>"
-"        <menuitem action='Grayscale'/>"
-"      </menu>"
-"      <menu action='OverlayMenu'>"
-"        <menuitem action='ImageOverlay'/>"
-"        <menuitem action='ImageHistogram'/>"
-"        <menuitem action='ImageOverlayCycle'/>"
-"        <separator/>"
-"        <menuitem action='HistogramChanR'/>"
-"        <menuitem action='HistogramChanG'/>"
-"        <menuitem action='HistogramChanB'/>"
-"        <menuitem action='HistogramChanRGB'/>"
-"        <menuitem action='HistogramChanV'/>"
-"        <menuitem action='HistogramChanCycle'/>"
-"        <separator/>"
-"        <menuitem action='HistogramModeLin'/>"
-"        <menuitem action='HistogramModeLog'/>"
-"        <menuitem action='HistogramModeCycle'/>"
-"      </menu>"
-"      <menuitem action='OverUnderExposed'/>"
-"      <menuitem action='FullScreen'/>"
-"      <placeholder name='ViewSection'/>"
-"      <separator/>"
-"      <menuitem action='SBar'/>"
-"      <menuitem action='SBarSort'/>"
-"      <menuitem action='HideBars'/>"
-"      <menuitem action='ShowInfoPixel'/>"
-"      <menuitem action='IgnoreAlpha'/>"
-"      <placeholder name='ToolsSection'/>"
-"      <separator/>"
-"      <menuitem action='Animate'/>"
-"      <menuitem action='SlideShow'/>"
-"      <menuitem action='SlideShowPause'/>"
-"      <menuitem action='SlideShowFaster'/>"
-"      <menuitem action='SlideShowSlower'/>"
-"      <separator/>"
-"      <menuitem action='Refresh'/>"
-"      <placeholder name='SlideShowSection'/>"
-"      <separator/>"
-"    </menu>"
-"    <menu action='WindowsMenu'>"
-"      <menu action='NewWindow'>"
-"        <menuitem action='NewWindowDefault'/>"
-"        <menuitem action='NewWindowFromCurrent'/>"
-"        <separator/>"
-"       </menu>"
-"      <menuitem action='RenameWindow'/>"
-"      <menuitem action='DeleteWindow'/>"
-"      <menuitem action='CloseWindow'/>"
-"    </menu>"
-"    <menu action='HelpMenu'>"
-"      <separator/>"
-"      <menuitem action='HelpContents'/>"
-"      <menuitem action='SearchAndRunCommand'/>"
-"      <menuitem action='HelpSearch'/>"
-"      <menuitem action='HelpShortcuts'/>"
-"      <menuitem action='HelpKbd'/>"
-"      <menuitem action='HelpNotes'/>"
-"      <menuitem action='HelpChangeLog'/>"
-"      <placeholder name='HelpSection'/>"
-"      <separator/>"
-"      <menuitem action='About'/>"
-"      <separator/>"
-"      <menuitem action='LogWindow'/>"
-"      <separator/>"
-"    </menu>"
-"  </menubar>"
-"  <toolbar name='ToolBar'>"
-"  </toolbar>"
-"  <toolbar name='StatusBar'>"
-"  </toolbar>"
-"<accelerator action='PrevImageAlt1'/>"
-"<accelerator action='PrevImageAlt2'/>"
-"<accelerator action='NextImageAlt1'/>"
-"<accelerator action='NextImageAlt2'/>"
-"<accelerator action='DeleteAlt1'/>"
-"<accelerator action='DeleteAlt2'/>"
-"<accelerator action='FullScreenAlt1'/>"
-"<accelerator action='FullScreenAlt2'/>"
-"<accelerator action='Escape'/>"
-"<accelerator action='EscapeAlt1'/>"
-
-"<accelerator action='ZoomInAlt1'/>"
-"<accelerator action='ZoomOutAlt1'/>"
-"<accelerator action='Zoom100Alt1'/>"
-"<accelerator action='ZoomFitAlt1'/>"
-
-"<accelerator action='ConnectZoomInAlt1'/>"
-"<accelerator action='ConnectZoomOutAlt1'/>"
-"<accelerator action='ConnectZoom100Alt1'/>"
-"<accelerator action='ConnectZoomFitAlt1'/>"
-"</ui>";
-
-static gchar *menu_translate(const gchar *path, gpointer UNUSED(data))
-{
-       return (gchar *)(_(path));
+static gchar *menu_translate(const gchar *path, gpointer)
+{
+       return static_cast<gchar *>(_(path));
 }
 
 static void layout_actions_setup_mark(LayoutWindow *lw, gint mark, const gchar *name_tmpl,
@@ -2980,7 +2872,7 @@ static void layout_actions_setup_mark(LayoutWindow *lw, gint mark, const gchar *
        gchar label[100];
        gchar accel[50];
        gchar tooltip[100];
-       GtkActionEntry entry = { name, NULL, label, accel, tooltip, cb };
+       GtkActionEntry entry = { name, nullptr, label, accel, tooltip, cb };
        GtkAction *action;
 
        g_snprintf(name, sizeof(name), name_tmpl, mark);
@@ -2989,12 +2881,12 @@ static void layout_actions_setup_mark(LayoutWindow *lw, gint mark, const gchar *
        if (accel_tmpl)
                g_snprintf(accel, sizeof(accel), accel_tmpl, mark % 10);
        else
-               entry.accelerator = NULL;
+               entry.accelerator = nullptr;
 
        if (tooltip_tmpl)
                g_snprintf(tooltip, sizeof(tooltip), tooltip_tmpl, mark);
        else
-               entry.tooltip = NULL;
+               entry.tooltip = nullptr;
 
        gtk_action_group_add_actions(lw->action_group, &entry, 1, lw);
        action = gtk_action_group_get_action(lw->action_group, name);
@@ -3007,24 +2899,29 @@ static void layout_actions_setup_marks(LayoutWindow *lw)
        GError *error;
        GString *desc = g_string_new(
                                "<ui>"
-                               "  <menubar name='MainMenu'>"
-                               "    <menu action='SelectMenu'>");
+                               "  <menubar name='MainMenu'>");
+
+       if (options->hamburger_menu)
+               {
+               g_string_append(desc, "    <menu action='OpenMenu'>");
+               }
+       g_string_append(desc, "      <menu action='SelectMenu'>");
 
        for (mark = 1; mark <= FILEDATA_MARKS_SIZE; mark++)
                {
                gint i = (mark < 10 ? mark : 0);
 
-               layout_actions_setup_mark(lw, i, "Mark%d",              _("Mark _%d"), NULL, NULL, NULL);
-               layout_actions_setup_mark(lw, i, "SetMark%d",   _("_Set mark %d"),                      NULL,           _("Set mark %d"), G_CALLBACK(layout_menu_set_mark_sel_cb));
-               layout_actions_setup_mark(lw, i, "ResetMark%d", _("_Reset mark %d"),                    NULL,           _("Reset mark %d"), G_CALLBACK(layout_menu_res_mark_sel_cb));
+               layout_actions_setup_mark(lw, i, "Mark%d",              _("Mark _%d"), nullptr, nullptr, nullptr);
+               layout_actions_setup_mark(lw, i, "SetMark%d",   _("_Set mark %d"),                      nullptr,                _("Set mark %d"), G_CALLBACK(layout_menu_set_mark_sel_cb));
+               layout_actions_setup_mark(lw, i, "ResetMark%d", _("_Reset mark %d"),                    nullptr,                _("Reset mark %d"), G_CALLBACK(layout_menu_res_mark_sel_cb));
                layout_actions_setup_mark(lw, i, "ToggleMark%d",        _("_Toggle mark %d"),                   "%d",           _("Toggle mark %d"), G_CALLBACK(layout_menu_toggle_mark_sel_cb));
                layout_actions_setup_mark(lw, i, "ToggleMark%dAlt1",    _("_Toggle mark %d"),                   "KP_%d",        _("Toggle mark %d"), G_CALLBACK(layout_menu_toggle_mark_sel_cb));
                layout_actions_setup_mark(lw, i, "SelectMark%d",        _("Se_lect mark %d"),                   "<control>%d",  _("Select mark %d"), G_CALLBACK(layout_menu_sel_mark_cb));
                layout_actions_setup_mark(lw, i, "SelectMark%dAlt1",    _("_Select mark %d"),                   "<control>KP_%d", _("Select mark %d"), G_CALLBACK(layout_menu_sel_mark_cb));
-               layout_actions_setup_mark(lw, i, "AddMark%d",   _("_Add mark %d"),                      NULL,           _("Add mark %d"), G_CALLBACK(layout_menu_sel_mark_or_cb));
-               layout_actions_setup_mark(lw, i, "IntMark%d",   _("_Intersection with mark %d"),        NULL,           _("Intersection with mark %d"), G_CALLBACK(layout_menu_sel_mark_and_cb));
-               layout_actions_setup_mark(lw, i, "UnselMark%d", _("_Unselect mark %d"),                 NULL,           _("Unselect mark %d"), G_CALLBACK(layout_menu_sel_mark_minus_cb));
-               layout_actions_setup_mark(lw, i, "FilterMark%d",        _("_Filter mark %d"),                   NULL,           _("Filter mark %d"), G_CALLBACK(layout_menu_mark_filter_toggle_cb));
+               layout_actions_setup_mark(lw, i, "AddMark%d",   _("_Add mark %d"),                      nullptr,                _("Add mark %d"), G_CALLBACK(layout_menu_sel_mark_or_cb));
+               layout_actions_setup_mark(lw, i, "IntMark%d",   _("_Intersection with mark %d"),        nullptr,                _("Intersection with mark %d"), G_CALLBACK(layout_menu_sel_mark_and_cb));
+               layout_actions_setup_mark(lw, i, "UnselMark%d", _("_Unselect mark %d"),                 nullptr,                _("Unselect mark %d"), G_CALLBACK(layout_menu_sel_mark_minus_cb));
+               layout_actions_setup_mark(lw, i, "FilterMark%d",        _("_Filter mark %d"),                   nullptr,                _("Filter mark %d"), G_CALLBACK(layout_menu_mark_filter_toggle_cb));
 
                g_string_append_printf(desc,
                                "      <menu action='Mark%d'>"
@@ -3043,8 +2940,13 @@ static void layout_actions_setup_marks(LayoutWindow *lw)
                }
 
        g_string_append(desc,
-                               "    </menu>"
-                               "  </menubar>");
+                               "      </menu>");
+       if (options->hamburger_menu)
+               {
+               g_string_append(desc, "    </menu>");
+               }
+       g_string_append(desc, "  </menubar>");
+
        for (mark = 1; mark <= FILEDATA_MARKS_SIZE; mark++)
                {
                gint i = (mark < 10 ? mark : 0);
@@ -3056,7 +2958,7 @@ static void layout_actions_setup_marks(LayoutWindow *lw)
                }
        g_string_append(desc,   "</ui>" );
 
-       error = NULL;
+       error = nullptr;
        if (!gtk_ui_manager_add_ui_from_string(lw->ui_manager, desc->str, -1, &error))
                {
                g_message("building menus failed: %s", error->message);
@@ -3070,12 +2972,12 @@ static GList *layout_actions_editor_menu_path(EditorDescription *editor)
 {
        gchar **split = g_strsplit(editor->menu_path, "/", 0);
        gint i = 0;
-       GList *ret = NULL;
+       GList *ret = nullptr;
 
-       if (split[0] == NULL)
+       if (split[0] == nullptr)
                {
                g_strfreev(split);
-               return NULL;
+               return nullptr;
                }
 
        while (split[i])
@@ -3093,8 +2995,10 @@ static GList *layout_actions_editor_menu_path(EditorDescription *editor)
 
 static void layout_actions_editor_add(GString *desc, GList *path, GList *old_path)
 {
-       gint to_open, to_close, i;
-       while (path && old_path && strcmp((gchar *)path->data, (gchar *)old_path->data) == 0)
+       gint to_open;
+       gint to_close;
+       gint i;
+       while (path && old_path && strcmp(static_cast<gchar *>(path->data), static_cast<gchar *>(old_path->data)) == 0)
                {
                path = path->next;
                old_path = old_path->next;
@@ -3110,7 +3014,7 @@ static void layout_actions_editor_add(GString *desc, GList *path, GList *old_pat
 
        for (i =  0; i < to_close; i++)
                {
-               gchar *name = static_cast<gchar *>(old_path->data);
+               auto name = static_cast<gchar *>(old_path->data);
                if (g_str_has_suffix(name, "Section"))
                        {
                        g_string_append(desc,   "      </placeholder>");
@@ -3128,7 +3032,7 @@ static void layout_actions_editor_add(GString *desc, GList *path, GList *old_pat
 
        for (i =  0; i < to_open; i++)
                {
-               gchar *name = static_cast<gchar *>(path->data);
+               auto name = static_cast<gchar *>(path->data);
                if (g_str_has_suffix(name, "Section"))
                        {
                        g_string_append_printf(desc,    "      <placeholder name='%s'>", name);
@@ -3145,7 +3049,7 @@ static void layout_actions_editor_add(GString *desc, GList *path, GList *old_pat
                }
 
        if (path)
-               g_string_append_printf(desc, "      <menuitem action='%s'/>", (gchar *)path->data);
+               g_string_append_printf(desc, "      <menuitem action='%s'/>", static_cast<gchar *>(path->data));
 }
 
 static void layout_actions_setup_editors(LayoutWindow *lw)
@@ -3174,16 +3078,21 @@ static void layout_actions_setup_editors(LayoutWindow *lw)
                                "<ui>"
                                "  <menubar name='MainMenu'>");
 
+       if (options->hamburger_menu)
+               {
+               g_string_append(desc, "    <menu action='OpenMenu'>");
+               }
+
        editors_list = editor_list_get();
 
-       old_path = NULL;
+       old_path = nullptr;
        work = editors_list;
        while (work)
                {
                GList *path;
-               EditorDescription *editor = static_cast<EditorDescription *>(work->data);
+               auto editor = static_cast<EditorDescription *>(work->data);
                GtkActionEntry entry = { editor->key,
-                                        NULL,
+                                        nullptr,
                                         editor->name,
                                         editor->hotkey,
                                         editor->comment ? editor->comment : editor->name,
@@ -3198,18 +3107,23 @@ static void layout_actions_setup_editors(LayoutWindow *lw)
                path = layout_actions_editor_menu_path(editor);
                layout_actions_editor_add(desc, path, old_path);
 
-               string_list_free(old_path);
+               g_list_free_full(old_path, g_free);
                old_path = path;
                work = work->next;
                }
 
-       layout_actions_editor_add(desc, NULL, old_path);
-       string_list_free(old_path);
+       layout_actions_editor_add(desc, nullptr, old_path);
+       g_list_free_full(old_path, g_free);
 
-       g_string_append(desc,   "  </menubar>"
+       if (options->hamburger_menu)
+               {
+               g_string_append(desc, "</menu>");
+               }
+
+       g_string_append(desc,"  </menubar>"
                                "</ui>" );
 
-       error = NULL;
+       error = nullptr;
 
        lw->ui_editors_id = gtk_ui_manager_add_ui_from_string(lw->ui_manager, desc->str, -1, &error);
        if (!lw->ui_editors_id)
@@ -3231,7 +3145,7 @@ void layout_actions_setup(LayoutWindow *lw)
        if (lw->ui_manager) return;
 
        lw->action_group = gtk_action_group_new("MenuActions");
-       gtk_action_group_set_translate_func(lw->action_group, menu_translate, NULL, NULL);
+       gtk_action_group_set_translate_func(lw->action_group, menu_translate, nullptr, nullptr);
 
        gtk_action_group_add_actions(lw->action_group,
                                     menu_entries, G_N_ELEMENTS(menu_entries), lw);
@@ -3265,8 +3179,9 @@ void layout_actions_setup(LayoutWindow *lw)
        gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group, 0);
 
        DEBUG_1("%s layout_actions_setup: add menu", get_exec_time());
-       error = NULL;
-       if (!gtk_ui_manager_add_ui_from_string(lw->ui_manager, menu_ui_description, -1, &error))
+       error = nullptr;
+
+       if (!gtk_ui_manager_add_ui_from_resource(lw->ui_manager, options->hamburger_menu ? GQ_RESOURCE_PATH_UI "/menu-hamburger.ui" : GQ_RESOURCE_PATH_UI "/menu-classic.ui" , &error))
                {
                g_message("building menus failed: %s", error->message);
                g_error_free(error);
@@ -3276,8 +3191,8 @@ void layout_actions_setup(LayoutWindow *lw)
        DEBUG_1("%s layout_actions_setup: add toolbar", get_exec_time());
        for (i = 0; i < TOOLBAR_COUNT; i++)
                {
-               layout_toolbar_clear(lw, i);
-               layout_toolbar_add_default(lw, i);
+               layout_toolbar_clear(lw, static_cast<ToolbarType>(i));
+               layout_toolbar_add_default(lw, static_cast<ToolbarType>(i));
                }
 
        DEBUG_1("%s layout_actions_setup: marks", get_exec_time());
@@ -3295,18 +3210,18 @@ void layout_actions_setup(LayoutWindow *lw)
 }
 
 static gint layout_editors_reload_idle_id = -1;
-static GList *layout_editors_desktop_files = NULL;
+static GList *layout_editors_desktop_files = nullptr;
 
-static gboolean layout_editors_reload_idle_cb(gpointer UNUSED(data))
+static gboolean layout_editors_reload_idle_cb(gpointer)
 {
        if (!layout_editors_desktop_files)
                {
                DEBUG_1("%s layout_editors_reload_idle_cb: get_desktop_files", get_exec_time());
                layout_editors_desktop_files = editor_get_desktop_files();
-               return TRUE;
+               return G_SOURCE_CONTINUE;
                }
 
-       editor_read_desktop_file(layout_editors_desktop_files->data);
+       editor_read_desktop_file(static_cast<const gchar *>(layout_editors_desktop_files->data));
        g_free(layout_editors_desktop_files->data);
        layout_editors_desktop_files = g_list_delete_link(layout_editors_desktop_files, layout_editors_desktop_files);
 
@@ -3320,7 +3235,7 @@ static gboolean layout_editors_reload_idle_cb(gpointer UNUSED(data))
                work = layout_window_list;
                while (work)
                        {
-                       LayoutWindow *lw = static_cast<LayoutWindow *>(work->data);
+                       auto lw = static_cast<LayoutWindow *>(work->data);
                        work = work->next;
                        layout_actions_setup_editors(lw);
                        if (lw->bar_sort_enabled)
@@ -3332,26 +3247,26 @@ static gboolean layout_editors_reload_idle_cb(gpointer UNUSED(data))
                DEBUG_1("%s layout_editors_reload_idle_cb: setup_editors done", get_exec_time());
 
                layout_editors_reload_idle_id = -1;
-               return FALSE;
+               return G_SOURCE_REMOVE;
                }
-       return TRUE;
+       return G_SOURCE_CONTINUE;
 }
 
-void layout_editors_reload_start(void)
+void layout_editors_reload_start()
 {
        DEBUG_1("%s layout_editors_reload_start", get_exec_time());
 
        if (layout_editors_reload_idle_id != -1)
                {
                g_source_remove(layout_editors_reload_idle_id);
-               string_list_free(layout_editors_desktop_files);
+               g_list_free_full(layout_editors_desktop_files, g_free);
                }
 
        editor_table_clear();
-       layout_editors_reload_idle_id = g_idle_add(layout_editors_reload_idle_cb, NULL);
+       layout_editors_reload_idle_id = g_idle_add(layout_editors_reload_idle_cb, nullptr);
 }
 
-void layout_editors_reload_finish(void)
+void layout_editors_reload_finish()
 {
        if (layout_editors_reload_idle_id != -1)
                {
@@ -3359,7 +3274,7 @@ void layout_editors_reload_finish(void)
                g_source_remove(layout_editors_reload_idle_id);
                while (layout_editors_reload_idle_id != -1)
                        {
-                       layout_editors_reload_idle_cb(NULL);
+                       layout_editors_reload_idle_cb(nullptr);
                        }
                }
 }
@@ -3385,22 +3300,10 @@ GtkWidget *layout_actions_menu_bar(LayoutWindow *lw)
 GtkWidget *layout_actions_toolbar(LayoutWindow *lw, ToolbarType type)
 {
        if (lw->toolbar[type]) return lw->toolbar[type];
-       switch (type)
-               {
-               case TOOLBAR_MAIN:
-                       lw->toolbar[type] = gtk_ui_manager_get_widget(lw->ui_manager, "/ToolBar");
-                       gtk_toolbar_set_icon_size(GTK_TOOLBAR(lw->toolbar[type]), GTK_ICON_SIZE_SMALL_TOOLBAR);
-                       gtk_toolbar_set_style(GTK_TOOLBAR(lw->toolbar[type]), GTK_TOOLBAR_ICONS);
-                       break;
-               case TOOLBAR_STATUS:
-                       lw->toolbar[type] = gtk_ui_manager_get_widget(lw->ui_manager, "/StatusBar");
-                       gtk_toolbar_set_icon_size(GTK_TOOLBAR(lw->toolbar[type]), GTK_ICON_SIZE_MENU);
-                       gtk_toolbar_set_style(GTK_TOOLBAR(lw->toolbar[type]), GTK_TOOLBAR_ICONS);
-                       gtk_toolbar_set_show_arrow(GTK_TOOLBAR(lw->toolbar[type]), FALSE);
-                       break;
-               default:
-                       break;
-               }
+
+       lw->toolbar[type] = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+
+       gtk_widget_show(lw->toolbar[type]);
        g_object_ref(lw->toolbar[type]);
        return lw->toolbar[type];
 }
@@ -3412,19 +3315,38 @@ GtkWidget *layout_actions_menu_tool_bar(LayoutWindow *lw)
 
        if (lw->menu_tool_bar) return lw->menu_tool_bar;
 
-       menu_bar = layout_actions_menu_bar(lw);
-       DEBUG_NAME(menu_bar);
        toolbar = layout_actions_toolbar(lw, TOOLBAR_MAIN);
        DEBUG_NAME(toolbar);
        lw->menu_tool_bar = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
 
-       gtk_box_pack_start(GTK_BOX(lw->menu_tool_bar), menu_bar, FALSE, FALSE, 0);
-       gtk_box_pack_start(GTK_BOX(lw->menu_tool_bar), toolbar, FALSE, FALSE, 0);
+       if (!options->hamburger_menu)
+               {
+               menu_bar = layout_actions_menu_bar(lw);
+               DEBUG_NAME(menu_bar);
+               gq_gtk_box_pack_start(GTK_BOX(lw->menu_tool_bar), menu_bar, FALSE, FALSE, 0);
+               }
+
+       gq_gtk_box_pack_start(GTK_BOX(lw->menu_tool_bar), toolbar, FALSE, FALSE, 0);
 
        g_object_ref(lw->menu_tool_bar);
        return lw->menu_tool_bar;
 }
 
+void toolbar_clear_cb(GtkWidget *widget, gpointer)
+{
+       GtkAction *action;
+
+       if (GTK_IS_BUTTON(widget))
+               {
+               action = static_cast<GtkAction *>(g_object_get_data(G_OBJECT(widget), "action"));
+               if (g_object_get_data(G_OBJECT(widget), "id") )
+                       {
+                       g_signal_handler_disconnect(action, GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(widget), "id")));
+                       }
+               }
+       gtk_widget_destroy(widget);
+}
+
 void layout_toolbar_clear(LayoutWindow *lw, ToolbarType type)
 {
        if (lw->toolbar_merge_id[type])
@@ -3432,19 +3354,63 @@ void layout_toolbar_clear(LayoutWindow *lw, ToolbarType type)
                gtk_ui_manager_remove_ui(lw->ui_manager, lw->toolbar_merge_id[type]);
                gtk_ui_manager_ensure_update(lw->ui_manager);
                }
-       string_list_free(lw->toolbar_actions[type]);
-       lw->toolbar_actions[type] = NULL;
+       g_list_free_full(lw->toolbar_actions[type], g_free);
+       lw->toolbar_actions[type] = nullptr;
 
        lw->toolbar_merge_id[type] = gtk_ui_manager_new_merge_id(lw->ui_manager);
+
+       if (lw->toolbar[type])
+               {
+               gtk_container_foreach(GTK_CONTAINER(lw->toolbar[type]), (GtkCallback)G_CALLBACK(toolbar_clear_cb), nullptr);
+               }
+}
+
+void action_radio_changed_cb(GtkAction *action, GtkAction *current, gpointer data)
+{
+       auto button = static_cast<GtkToggleButton *>(data);
+
+       if (action == current )
+               {
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
+               }
+       else
+               {
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), FALSE);
+               }
 }
 
-void layout_toolbar_add(LayoutWindow *lw, ToolbarType type, const gchar *action)
+void action_toggle_activate_cb(GtkAction* self, gpointer data)
 {
-       const gchar *path = NULL;
+       auto button = static_cast<GtkToggleButton *>(data);
 
-       if (!action || !lw->ui_manager) return;
+       if (gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(self)) != gtk_toggle_button_get_active(button))
+               {
+               gtk_toggle_button_set_active(button, gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(self)));
+               }
+}
 
-       if (g_list_find_custom(lw->toolbar_actions[type], action, (GCompareFunc)strcmp)) return;
+gboolean toolbar_button_press_event_cb(GtkWidget *, GdkEvent *, gpointer data)
+{
+       gtk_action_activate(GTK_ACTION(data));
+
+       return TRUE;
+}
+
+void layout_toolbar_add(LayoutWindow *lw, ToolbarType type, const gchar *action_name)
+{
+       const gchar *path = nullptr;
+       const gchar *tooltip_text = nullptr;
+       GtkAction *action;
+       GtkWidget *action_icon = nullptr;
+       GtkWidget *button;
+       gulong id;
+
+       if (!action_name || !lw->ui_manager) return;
+
+       if (!lw->toolbar[type])
+               {
+               return;
+               }
 
        switch (type)
                {
@@ -3458,8 +3424,7 @@ void layout_toolbar_add(LayoutWindow *lw, ToolbarType type, const gchar *action)
                        break;
                }
 
-
-       if (g_str_has_suffix(action, ".desktop"))
+       if (g_str_has_suffix(action_name, ".desktop"))
                {
                /* this may be called before the external editors are read
                   create a dummy action for now */
@@ -3468,22 +3433,79 @@ void layout_toolbar_add(LayoutWindow *lw, ToolbarType type, const gchar *action)
                        lw->action_group_editors = gtk_action_group_new("MenuActionsExternal");
                        gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group_editors, 1);
                        }
-               if (!gtk_action_group_get_action(lw->action_group_editors, action))
+               if (!gtk_action_group_get_action(lw->action_group_editors, action_name))
                        {
-                       GtkActionEntry entry = { action,
-                                                GTK_STOCK_MISSING_IMAGE,
-                                                action,
-                                                NULL,
-                                                NULL,
-                                                NULL };
-                       DEBUG_1("Creating temporary action %s", action);
+                       GtkActionEntry entry = { action_name,
+                                                GQ_ICON_MISSING_IMAGE,
+                                                action_name,
+                                                nullptr,
+                                                nullptr,
+                                                nullptr
+                                              };
+                       DEBUG_1("Creating temporary action %s", action_name);
                        gtk_action_group_add_actions(lw->action_group_editors, &entry, 1, lw);
                        }
                }
-       gtk_ui_manager_add_ui(lw->ui_manager, lw->toolbar_merge_id[type], path, action, action, GTK_UI_MANAGER_TOOLITEM, FALSE);
-       lw->toolbar_actions[type] = g_list_append(lw->toolbar_actions[type], g_strdup(action));
-}
 
+       if (g_strcmp0(action_name, "Separator") == 0)
+               {
+               button = gtk_separator_new(GTK_ORIENTATION_VERTICAL);
+               }
+       else
+               {
+               action = gtk_action_group_get_action(lw->action_group, action_name);
+
+               action_icon = gtk_action_create_icon(action, GTK_ICON_SIZE_SMALL_TOOLBAR);
+               tooltip_text = gtk_action_get_tooltip(action);
+
+               gtk_ui_manager_add_ui(lw->ui_manager, lw->toolbar_merge_id[type], path, action_name, action_name, GTK_UI_MANAGER_TOOLITEM, FALSE);
+
+               if (GTK_IS_RADIO_ACTION(action) || GTK_IS_TOGGLE_ACTION(action))
+                       {
+                       button = gtk_toggle_button_new();
+                       }
+               else
+                       {
+                       button = gtk_button_new();
+                       }
+
+               if (GTK_IS_TOGGLE_ACTION(action) || GTK_IS_RADIO_ACTION(action))
+                       {
+                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)));
+                       }
+
+               if (action_icon)
+                       {
+                       gtk_button_set_image(GTK_BUTTON(button), action_icon);
+                       }
+               else
+                       {
+                       gtk_button_set_label(GTK_BUTTON(button), action_name);
+                       }
+
+               gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
+               gtk_widget_set_tooltip_text(button, tooltip_text);
+
+               if (GTK_IS_RADIO_ACTION(action))
+                       {
+                       id = g_signal_connect(G_OBJECT(action), "changed", G_CALLBACK(action_radio_changed_cb), button);
+                       g_object_set_data(G_OBJECT(button), "id", GUINT_TO_POINTER(id));
+                       }
+               else if (GTK_IS_TOGGLE_ACTION(action))
+                       {
+                       id = g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(action_toggle_activate_cb), button);
+                       g_object_set_data(G_OBJECT(button), "id", GUINT_TO_POINTER(id));
+                       }
+
+               g_signal_connect(G_OBJECT(button), "button_press_event", G_CALLBACK(toolbar_button_press_event_cb), action);
+               g_object_set_data(G_OBJECT(button), "action", action);
+               }
+
+       gq_gtk_container_add(GTK_WIDGET(lw->toolbar[type]), GTK_WIDGET(button));
+       gtk_widget_show(GTK_WIDGET(button));
+
+       lw->toolbar_actions[type] = g_list_append(lw->toolbar_actions[type], g_strdup(action_name));
+}
 
 void layout_toolbar_add_default(LayoutWindow *lw, ToolbarType type)
 {
@@ -3501,7 +3523,7 @@ void layout_toolbar_add_default(LayoutWindow *lw, ToolbarType type)
                                        work_action = lw_first->toolbar_actions[type];
                                        while (work_action)
                                                {
-                                               gchar *action = static_cast<gchar *>(work_action->data);
+                                               auto action = static_cast<gchar *>(work_action->data);
                                                work_action = work_action->next;
                                                layout_toolbar_add(lw, type, action);
                                                }
@@ -3547,7 +3569,7 @@ void layout_toolbar_add_default(LayoutWindow *lw, ToolbarType type)
                                        work_action = lw_first->toolbar_actions[type];
                                        while (work_action)
                                                {
-                                               gchar *action = static_cast<gchar *>(work_action->data);
+                                               auto action = static_cast<gchar *>(work_action->data);
                                                work_action = work_action->next;
                                                layout_toolbar_add(lw, type, action);
                                                }
@@ -3577,7 +3599,7 @@ void layout_toolbar_add_default(LayoutWindow *lw, ToolbarType type)
 
 void layout_toolbar_write_config(LayoutWindow *lw, ToolbarType type, GString *outstr, gint indent)
 {
-       const gchar *name = NULL;
+       const gchar *name = nullptr;
        GList *work = lw->toolbar_actions[type];
 
        switch (type)
@@ -3597,7 +3619,7 @@ void layout_toolbar_write_config(LayoutWindow *lw, ToolbarType type, GString *ou
        WRITE_NL(); WRITE_STRING("<clear/>");
        while (work)
                {
-               gchar *action = static_cast<gchar *>(work->data);
+               auto action = static_cast<gchar *>(work->data);
                work = work->next;
                WRITE_NL(); WRITE_STRING("<toolitem ");
                write_char_option(outstr, indent + 1, "action", action);
@@ -3609,7 +3631,7 @@ void layout_toolbar_write_config(LayoutWindow *lw, ToolbarType type, GString *ou
 
 void layout_toolbar_add_from_config(LayoutWindow *lw, ToolbarType type, const char **attribute_names, const gchar **attribute_values)
 {
-       gchar *action = NULL;
+       gchar *action = nullptr;
 
        while (*attribute_names)
                {
@@ -3649,14 +3671,14 @@ void layout_util_status_update_write(LayoutWindow *lw)
                }
 }
 
-void layout_util_status_update_write_all(void)
+void layout_util_status_update_write_all()
 {
        GList *work;
 
        work = layout_window_list;
        while (work)
                {
-               LayoutWindow *lw = static_cast<LayoutWindow *>(work->data);
+               auto lw = static_cast<LayoutWindow *>(work->data);
                work = work->next;
 
                layout_util_status_update_write(lw);
@@ -3802,8 +3824,8 @@ static void layout_util_sync_views(LayoutWindow *lw)
        action = gtk_action_group_get_action(lw->action_group, "SBarSort");
        gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), layout_bar_sort_enabled(lw));
 
-       action = gtk_action_group_get_action(lw->action_group, "HideToolbar");
-       gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.toolbar_hidden);
+       action = gtk_action_group_get_action(lw->action_group, "HideSelectableToolbars");
+       gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.selectable_toolbars_hidden);
 
        action = gtk_action_group_get_action(lw->action_group, "ShowInfoPixel");
        gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.show_info_pixel);
@@ -3883,18 +3905,18 @@ void layout_util_sync(LayoutWindow *lw)
 {
        layout_util_sync_views(lw);
        layout_util_sync_thumb(lw);
-       layout_menu_recent_update(lw);
-//     layout_menu_edit_update(lw);
+       layout_menu_collection_recent_update(lw);
+       layout_menu_collection_open_update(lw);
 }
 
 /**
  * @brief Checks if event key is mapped to Help
- * @param event 
- * @returns 
- * 
+ * @param event
+ * @returns
+ *
  * Used to check if the user has re-mapped the Help key
  * in Preferences/Keyboard
- * 
+ *
  * Note: help_key.accel_mods and event->state
  * differ in the higher bits
  */
@@ -3927,11 +3949,11 @@ static gboolean layout_bar_enabled(LayoutWindow *lw)
        return lw->bar && gtk_widget_get_visible(lw->bar);
 }
 
-static void layout_bar_destroyed(GtkWidget *UNUSED(widget), gpointer data)
+static void layout_bar_destroyed(GtkWidget *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
-       lw->bar = NULL;
+       lw->bar = nullptr;
 /*
     do not call layout_util_sync_views(lw) here
     this is called either when whole layout is destroyed - no need for update
@@ -3959,7 +3981,7 @@ static void layout_bar_close(LayoutWindow *lw)
        if (lw->bar)
                {
                bar_close(lw->bar);
-               lw->bar = NULL;
+               lw->bar = nullptr;
                }
 }
 
@@ -3976,8 +3998,6 @@ void layout_bar_set(LayoutWindow *lw, GtkWidget *bar)
        g_signal_connect(G_OBJECT(lw->bar), "destroy",
                         G_CALLBACK(layout_bar_destroyed), lw);
 
-
-//     gtk_box_pack_start(GTK_BOX(lw->utility_box), lw->bar, FALSE, FALSE, 0);
        gtk_paned_pack2(GTK_PANED(lw->utility_paned), lw->bar, FALSE, TRUE);
 
        bar_set_fd(lw->bar, layout_image_get_fd(lw));
@@ -4022,11 +4042,11 @@ static gboolean layout_bar_sort_enabled(LayoutWindow *lw)
 }
 
 
-static void layout_bar_sort_destroyed(GtkWidget *UNUSED(widget), gpointer data)
+static void layout_bar_sort_destroyed(GtkWidget *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
+       auto lw = static_cast<LayoutWindow *>(data);
 
-       lw->bar_sort = NULL;
+       lw->bar_sort = nullptr;
 
 /*
     do not call layout_util_sync_views(lw) here
@@ -4052,7 +4072,7 @@ static void layout_bar_sort_close(LayoutWindow *lw)
        if (lw->bar_sort)
                {
                bar_sort_close(lw->bar_sort);
-               lw->bar_sort = NULL;
+               lw->bar_sort = nullptr;
                }
 }
 
@@ -4068,7 +4088,7 @@ void layout_bar_sort_set(LayoutWindow *lw, GtkWidget *bar)
        g_signal_connect(G_OBJECT(lw->bar_sort), "destroy",
                         G_CALLBACK(layout_bar_sort_destroyed), lw);
 
-       gtk_box_pack_end(GTK_BOX(lw->utility_box), lw->bar_sort, FALSE, FALSE, 0);
+       gq_gtk_box_pack_end(GTK_BOX(lw->utility_box), lw->bar_sort, FALSE, FALSE, 0);
 }
 
 void layout_bar_sort_toggle(LayoutWindow *lw)
@@ -4140,7 +4160,7 @@ void layout_bars_new_image(LayoutWindow *lw)
 
        /* this should be called here to handle the metadata edited in bars */
        if (options->metadata.confirm_on_image_change)
-               metadata_write_queue_confirm(FALSE, NULL, NULL);
+               metadata_write_queue_confirm(FALSE, nullptr, nullptr);
 }
 
 void layout_bars_new_selection(LayoutWindow *lw, gint count)
@@ -4152,9 +4172,9 @@ GtkWidget *layout_bars_prepare(LayoutWindow *lw, GtkWidget *image)
 {
        if (lw->utility_box) return lw->utility_box;
        lw->utility_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_GAP);
-       lw->utility_paned = gtk_hpaned_new();
+       lw->utility_paned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
        DEBUG_NAME(lw->utility_paned);
-       gtk_box_pack_start(GTK_BOX(lw->utility_box), lw->utility_paned, TRUE, TRUE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(lw->utility_box), lw->utility_paned, TRUE, TRUE, 0);
 
        gtk_paned_pack1(GTK_PANED(lw->utility_paned), image, TRUE, FALSE);
        gtk_widget_show(lw->utility_paned);
@@ -4171,10 +4191,10 @@ void layout_bars_close(LayoutWindow *lw)
        layout_bar_close(lw);
 }
 
-static gboolean layout_exif_window_destroy(GtkWidget *UNUSED(widget), gpointer data)
+static gboolean layout_exif_window_destroy(GtkWidget *, gpointer data)
 {
-       LayoutWindow *lw = static_cast<LayoutWindow *>(data);
-       lw->exif_window = NULL;
+       auto lw = static_cast<LayoutWindow *>(data);
+       lw->exif_window = nullptr;
 
        return TRUE;
 }