Modify Search and Run list display
[geeqie.git] / src / preferences.cc
index 2eb8802..acc0afe 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include "main.h"
 #include "preferences.h"
 
+#include <config.h>
+
+#include <cstdlib>
+#include <cstring>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <gio/gio.h>
+#include <glib-object.h>
+
+#if HAVE_SPELL
+#include <gspell/gspell.h>
+#endif
+
+#if HAVE_LCMS
+#if HAVE_LCMS2
+#include <lcms2.h>
+#else
+#include <lcms.h>
+#endif
+#endif
+
+#include <pango/pango.h>
+
+#include "archives.h"
 #include "bar-keywords.h"
 #include "cache.h"
+#include "color-man.h"
+#include "compat.h"
+#include "debug.h"
 #include "editors.h"
 #include "filedata.h"
 #include "filefilter.h"
 #include "fullscreen.h"
-#include "image.h"
 #include "image-overlay.h"
-#include "color-man.h"
+#include "image.h"
 #include "img-view.h"
+#include "intl.h"
 #include "layout-util.h"
+#include "layout.h"
+#include "main-defines.h"
+#include "main.h"
 #include "metadata.h"
 #include "misc.h"
+#include "options.h"
 #include "osd.h"
 #include "pixbuf-util.h"
 #include "rcfile.h"
 #include "slideshow.h"
+#include "third-party/zonedetect.h"
 #include "toolbar.h"
 #include "trash.h"
-#include "utilops.h"
+#include "typedefs.h"
 #include "ui-fileops.h"
 #include "ui-misc.h"
-#include "ui-spinner.h"
 #include "ui-tabcomp.h"
+#include "ui-utildlg.h"
+#include "utilops.h"
 #include "window.h"
-#include "zonedetect.h"
 
-#ifdef HAVE_LCMS
-#ifdef HAVE_LCMS2
-#include <lcms2.h>
-#else
-#include <lcms.h>
-#endif
-#endif
+namespace
+{
 
-#ifdef HAVE_SPELL
-#include <gspell/gspell.h>
-#endif
+constexpr gint PRE_FORMATTED_COLUMNS = 5;
+constexpr gint KEYWORD_DIALOG_WIDTH = 400;
+
+} // namespace
+
+struct ZoneDetect;
 
-#define EDITOR_NAME_MAX_LENGTH 32
-#define EDITOR_COMMAND_MAX_LENGTH 1024
+enum {
+       EDITOR_NAME_MAX_LENGTH = 32,
+       EDITOR_COMMAND_MAX_LENGTH = 1024
+};
 
-static void image_overlay_set_text_colours();
+static void image_overlay_set_text_colors();
 
 GtkWidget *keyword_text;
 static void config_tab_keywords_save();
@@ -106,7 +138,8 @@ enum {
        AE_ACTION,
        AE_KEY,
        AE_TOOLTIP,
-       AE_ACCEL
+       AE_ACCEL,
+       AE_ICON
 };
 
 enum {
@@ -153,9 +186,13 @@ static GtkWidget *external_preview_extract_entry;
 static GtkWidget *sidecar_ext_entry;
 static GtkWidget *help_search_engine_entry;
 
+static GtkWidget *log_window_f1_entry;
 
-#define CONFIG_WINDOW_DEF_WIDTH                700
-#define CONFIG_WINDOW_DEF_HEIGHT       600
+
+enum {
+       CONFIG_WINDOW_DEF_WIDTH =               700,
+       CONFIG_WINDOW_DEF_HEIGHT =      600
+};
 
 /*
  *-----------------------------------------------------------------------------
@@ -170,7 +207,8 @@ static void zoom_increment_cb(GtkWidget *spin, gpointer)
 
 static void slideshow_delay_hours_cb(GtkWidget *spin, gpointer)
 {
-       gint mins_secs_tenths, delay;
+       gint mins_secs_tenths;
+       gint delay;
 
        mins_secs_tenths = c_options->slideshow.delay %
                                                (3600 * SLIDESHOW_SUBSECOND_PRECISION);
@@ -185,7 +223,9 @@ static void slideshow_delay_hours_cb(GtkWidget *spin, gpointer)
 
 static void slideshow_delay_minutes_cb(GtkWidget *spin, gpointer)
 {
-       gint hours, secs_tenths, delay;
+       gint hours;
+       gint secs_tenths;
+       gint delay;
 
        hours = c_options->slideshow.delay / (3600 * SLIDESHOW_SUBSECOND_PRECISION);
        secs_tenths = c_options->slideshow.delay % (60 * SLIDESHOW_SUBSECOND_PRECISION);
@@ -200,7 +240,8 @@ static void slideshow_delay_minutes_cb(GtkWidget *spin, gpointer)
 
 static void slideshow_delay_seconds_cb(GtkWidget *spin, gpointer)
 {
-       gint hours_mins, delay;
+       gint hours_mins;
+       gint delay;
 
        hours_mins = c_options->slideshow.delay / (60 * SLIDESHOW_SUBSECOND_PRECISION);
 
@@ -224,7 +265,7 @@ void config_entry_to_option(GtkWidget *entry, gchar **option, gchar *(*func)(con
 
        g_free(*option);
        *option = nullptr;
-       buf = gtk_entry_get_text(GTK_ENTRY(entry));
+       buf = gq_gtk_entry_get_text(GTK_ENTRY(entry));
        if (buf && strlen(buf) > 0)
                {
                if (func)
@@ -237,7 +278,8 @@ void config_entry_to_option(GtkWidget *entry, gchar **option, gchar *(*func)(con
 
 static gboolean accel_apply_cb(GtkTreeModel *model, GtkTreePath *, GtkTreeIter *iter, gpointer)
 {
-       gchar *accel_path, *accel;
+       gchar *accel_path;
+       gchar *accel;
 
        gtk_tree_model_get(model, iter, AE_ACCEL, &accel_path, AE_KEY, &accel, -1);
 
@@ -258,7 +300,7 @@ static gboolean accel_apply_cb(GtkTreeModel *model, GtkTreePath *, GtkTreeIter *
 static void config_window_apply()
 {
        gboolean refresh = FALSE;
-#ifdef HAVE_LCMS2
+#if HAVE_LCMS2
        int i = 0;
 #endif
 
@@ -268,7 +310,6 @@ static void config_window_apply()
        if (options->file_filter.show_parent_directory != c_options->file_filter.show_parent_directory) refresh = TRUE;
        if (options->file_filter.show_dot_directory != c_options->file_filter.show_dot_directory) refresh = TRUE;
        if (options->file_sort.case_sensitive != c_options->file_sort.case_sensitive) refresh = TRUE;
-       if (options->file_sort.natural != c_options->file_sort.natural) refresh = TRUE;
        if (options->file_filter.disable_file_extension_checks != c_options->file_filter.disable_file_extension_checks) refresh = TRUE;
        if (options->file_filter.disable != c_options->file_filter.disable) refresh = TRUE;
 
@@ -283,6 +324,7 @@ static void config_window_apply()
        options->use_saved_window_positions_for_new_windows = c_options->use_saved_window_positions_for_new_windows;
        options->save_window_workspace = c_options->save_window_workspace;
        options->save_dialog_window_positions = c_options->save_dialog_window_positions;
+       options->hide_window_decorations = c_options->hide_window_decorations;
        options->show_window_ids = c_options->show_window_ids;
        options->image.scroll_reset_method = c_options->image.scroll_reset_method;
        options->image.zoom_2pass = c_options->image.zoom_2pass;
@@ -300,8 +342,8 @@ static void config_window_apply()
        if (options->thumbnails.max_width != c_options->thumbnails.max_width
            || options->thumbnails.max_height != c_options->thumbnails.max_height
            || options->thumbnails.quality != c_options->thumbnails.quality)
-               {
-               thumb_format_changed = TRUE;
+               {
+               thumb_format_changed = TRUE;
                refresh = TRUE;
                options->thumbnails.max_width = c_options->thumbnails.max_width;
                options->thumbnails.max_height = c_options->thumbnails.max_height;
@@ -321,7 +363,6 @@ static void config_window_apply()
        options->file_filter.disable_file_extension_checks = c_options->file_filter.disable_file_extension_checks;
 
        options->file_sort.case_sensitive = c_options->file_sort.case_sensitive;
-       options->file_sort.natural = c_options->file_sort.natural;
        options->file_filter.disable = c_options->file_filter.disable;
 
        config_entry_to_option(sidecar_ext_entry, &options->sidecar.ext, nullptr);
@@ -355,7 +396,7 @@ static void config_window_apply()
 
        if (options->image.use_custom_border_color != c_options->image.use_custom_border_color
            || options->image.use_custom_border_color_in_fullscreen != c_options->image.use_custom_border_color_in_fullscreen
-           || !gdk_color_equal(&options->image.border_color, &c_options->image.border_color))
+           || !gdk_rgba_equal(&options->image.border_color, &c_options->image.border_color))
                {
                options->image.use_custom_border_color_in_fullscreen = c_options->image.use_custom_border_color_in_fullscreen;
                options->image.use_custom_border_color = c_options->image.use_custom_border_color;
@@ -444,11 +485,18 @@ static void config_window_apply()
 
        options->show_predefined_keyword_tree = c_options->show_predefined_keyword_tree;
        options->expand_menu_toolbar = c_options->expand_menu_toolbar;
+       options->hamburger_menu = c_options->hamburger_menu;
+
+       options->selectable_bars.menu_bar = c_options->selectable_bars.menu_bar;
+       options->selectable_bars.tool_bar = c_options->selectable_bars.tool_bar;
+       options->selectable_bars.status_bar = c_options->selectable_bars.status_bar;
 
        options->marks_save = c_options->marks_save;
        options->with_rename = c_options->with_rename;
+       options->collections_duplicates = c_options->collections_duplicates;
        options->collections_on_top = c_options->collections_on_top;
        options->hide_window_in_fullscreen = c_options->hide_window_in_fullscreen;
+       options->hide_osd_in_fullscreen = c_options->hide_osd_in_fullscreen;
        config_entry_to_option(help_search_engine_entry, &options->help_search_engine, nullptr);
 
        options->external_preview.enable = c_options->external_preview.enable;
@@ -462,11 +510,15 @@ static void config_window_apply()
 
        options->threads.duplicates = c_options->threads.duplicates > 0 ? c_options->threads.duplicates : -1;
 
+       options->alternate_similarity_algorithm.enabled = c_options->alternate_similarity_algorithm.enabled;
+       options->alternate_similarity_algorithm.grayscale = c_options->alternate_similarity_algorithm.grayscale;
+
 #ifdef DEBUG
        set_debug_level(debug_c);
+       config_entry_to_option(log_window_f1_entry, &options->log_window.action, nullptr);
 #endif
 
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
        for (i = 0; i < COLOR_PROFILE_INPUTS; i++)
                {
                config_entry_to_option(color_profile_input_name_entry[i], &options->color_profile.input_name[i], nullptr);
@@ -510,7 +562,7 @@ static void config_window_apply()
 
 static void config_window_close_cb(GtkWidget *, gpointer)
 {
-       gtk_widget_destroy(configwindow);
+       gq_gtk_widget_destroy(configwindow);
        configwindow = nullptr;
        filter_store = nullptr;
 }
@@ -650,7 +702,7 @@ static void add_quality_menu(GtkWidget *table, gint column, gint row, const gcha
 
        *option_c = option;
 
-       pref_table_label(table, column, row, text, 0.0);
+       pref_table_label(table, column, row, text, GTK_ALIGN_START);
 
        combo = gtk_combo_box_text_new();
 
@@ -666,7 +718,7 @@ static void add_quality_menu(GtkWidget *table, gint column, gint row, const gcha
        g_signal_connect(G_OBJECT(combo), "changed",
                         G_CALLBACK(quality_menu_cb), option_c);
 
-       gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
+       gq_gtk_grid_attach(GTK_GRID(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
        gtk_widget_show(combo);
 }
 
@@ -677,7 +729,7 @@ static void add_dnd_default_action_selection_menu(GtkWidget *table, gint column,
 
        *option_c = option;
 
-       pref_table_label(table, column, row, text, 0.0);
+       pref_table_label(table, column, row, text, GTK_ALIGN_START);
 
        combo = gtk_combo_box_text_new();
 
@@ -693,7 +745,7 @@ static void add_dnd_default_action_selection_menu(GtkWidget *table, gint column,
        g_signal_connect(G_OBJECT(combo), "changed",
                         G_CALLBACK(dnd_default_action_selection_menu_cb), option_c);
 
-       gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
+       gq_gtk_grid_attach(GTK_GRID(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
        gtk_widget_show(combo);
 }
 
@@ -705,7 +757,7 @@ static void add_clipboard_selection_menu(GtkWidget *table, gint column, gint row
 
        *option_c = option;
 
-       pref_table_label(table, column, row, text, 0.0);
+       pref_table_label(table, column, row, text, GTK_ALIGN_START);
 
        combo = gtk_combo_box_text_new();
 
@@ -721,7 +773,7 @@ static void add_clipboard_selection_menu(GtkWidget *table, gint column, gint row
        g_signal_connect(G_OBJECT(combo), "changed",
                         G_CALLBACK(clipboard_selection_menu_cb), option_c);
 
-       gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
+       gq_gtk_grid_attach(GTK_GRID(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
        gtk_widget_show(combo);
 }
 
@@ -749,7 +801,7 @@ static void add_zoom_style_selection_menu(GtkWidget *table, gint column, gint ro
 
        *option_c = option;
 
-       pref_table_label(table, column, row, text, 0.0);
+       pref_table_label(table, column, row, text, GTK_ALIGN_START);
 
        combo = gtk_combo_box_text_new();
 
@@ -762,146 +814,70 @@ static void add_zoom_style_selection_menu(GtkWidget *table, gint column, gint ro
 
        g_signal_connect(G_OBJECT(combo), "changed", G_CALLBACK(zoom_style_selection_menu_cb), option_c);
 
-       gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
+       gq_gtk_grid_attach(GTK_GRID(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
        gtk_widget_show(combo);
 }
 
-struct UseableMouseItems
-{
-       const gchar *name; /* GtkActionEntry terminology */
-       const gchar *label;
-       const gchar *icon_name;
-};
-
-static const UseableMouseItems useable_mouse_items[] = {
-       {"", "", nullptr},
-       {"FirstImage",  N_("First Image"), GQ_ICON_GO_TOP},
-       {"PrevImage",   N_("Previous Image"), GQ_ICON_GO_UP},
-       {"NextImage",   N_("Next Image"), GQ_ICON_GO_DOWN},
-       {"LastImage",   N_("Last Image"), GQ_ICON_GO_BOTTOM},
-       {"Back",        N_("Back"), GQ_ICON_GO_PREV},
-       {"Forward",     N_("Forward"), GQ_ICON_GO_NEXT},
-       {"Home",        N_("Home"), GQ_ICON_HOME},
-       {"Up",  N_("Up"), GQ_ICON_GO_UP},
-       {"FirstPage",   N_("First page"), GQ_ICON_PREV_PAGE},
-       {"LastPage",    N_("Last Page"), GQ_ICON_NEXT_PAGE},
-       {"NextPage",    N_("Next page"), GQ_ICON_FORWARD_PAGE},
-       {"PrevPage",    N_("Previous Page"), GQ_ICON_BACK_PAGE},
-       {"NewWindow",   N_("New _window"), GQ_ICON_NEW},
-       {"NewCollection",       N_("New collection"), GQ_ICON_COLLECTION},
-       {"OpenCollection",      N_("Open collection"), GQ_ICON_OPEN},
-       {"Search",      N_("Search"), GQ_ICON_FIND},
-       {"FindDupes",   N_("Find duplicates"), GQ_ICON_FIND},
-       {"NewFolder",   N_("New folder"),GQ_ICON_DIRECTORY},
-       {"Copy",        N_("Copy"), GQ_ICON_COPY},
-       {"Move",        N_("Move"), PIXBUF_INLINE_ICON_MOVE},
-       {"Rename",      N_("Rename"), PIXBUF_INLINE_ICON_RENAME},
-       {"Delete",      N_("Delete"), GQ_ICON_DELETE},
-       {"CloseWindow", N_("Close Window"), GQ_ICON_CLOSE},
-       {"PanView",     N_("Pan view"), PIXBUF_INLINE_ICON_PANORAMA},
-       {"SelectAll",   N_("Select all"), PIXBUF_INLINE_ICON_SELECT_ALL},
-       {"SelectNone",  N_("Select none"), PIXBUF_INLINE_ICON_SELECT_NONE},
-       {"SelectInvert",        N_("Select invert"), PIXBUF_INLINE_ICON_SELECT_INVERT},
-       {"ShowFileFilter",      N_("Show file filter"), PIXBUF_INLINE_ICON_FILE_FILTER},
-       {"RectangularSelection",        N_("Select rectangle"), PIXBUF_INLINE_ICON_SELECT_RECTANGLE},
-       {"Print",       N_("Print"), GQ_ICON_PRINT},
-       {"Preferences", N_("Preferences"), GQ_ICON_PREFERENCES},
-       {"LayoutConfig",        N_("Configure this window"), GQ_ICON_PREFERENCES},
-       {"Maintenance", N_("Cache maintenance"), PIXBUF_INLINE_ICON_MAINTENANCE},
-       {"RotateCW",    N_("Rotate clockwise 90°"), PIXBUF_INLINE_ICON_CW},
-       {"RotateCCW",   N_("Rotate counterclockwise 90°"), PIXBUF_INLINE_ICON_CCW},
-       {"Rotate180",   N_("Rotate 180°"), PIXBUF_INLINE_ICON_180},
-       {"Mirror",      N_("Mirror"), PIXBUF_INLINE_ICON_MIRROR},
-       {"Flip",        N_("Flip"), PIXBUF_INLINE_ICON_FLIP},
-       {"AlterNone",   N_("Original state"), PIXBUF_INLINE_ICON_ORIGINAL},
-       {"ZoomIn",      N_("Zoom in"), GQ_ICON_ZOOM_IN},
-       {"ZoomOut",     N_("Zoom out"), GQ_ICON_ZOOM_OUT},
-       {"Zoom100",     N_("Zoom 1:1"), GQ_ICON_ZOOM_100},
-       {"ZoomFit",     N_("Zoom to fit"), GQ_ICON_ZOOM_FIT},
-       {"ZoomFillHor", N_("Fit Horizontaly"), PIXBUF_INLINE_ICON_ZOOMFILLHOR},
-       {"ZoomFillVert",        N_("Fit vertically"), PIXBUF_INLINE_ICON_ZOOMFILLVERT},
-       {"Zoom200",     N_("Zoom 2:1"), GQ_ICON_GENERIC},
-       {"Zoom300",     N_("Zoom 3:1"), GQ_ICON_GENERIC},
-       {"Zoom400",     N_("Zoom 4:1"), GQ_ICON_GENERIC},
-       {"Zoom50",      N_("Zoom 1:2"), GQ_ICON_GENERIC},
-       {"Zoom33",      N_("Zoom 1:3"), GQ_ICON_GENERIC},
-       {"Zoom25",      N_("Zoom 1:4"), GQ_ICON_GENERIC},
-       {"ConnectZoomIn",       N_("Connected Zoom in"), GQ_ICON_ZOOM_IN},
-       {"SplitPaneSync",       N_("Split Pane Sync"), PIXBUF_INLINE_SPLIT_PANE_SYNC},
-       {"Grayscale",   N_("Grayscale"), PIXBUF_INLINE_ICON_GRAYSCALE},
-       {"OverUnderExposed",    N_("Over Under Exposed"), PIXBUF_INLINE_ICON_EXPOSURE},
-       {"HideTools",   N_("Hide file list"), PIXBUF_INLINE_ICON_HIDETOOLS},
-       {"SlideShowPause",      N_("Pause slideshow"), GQ_ICON_PAUSE},
-       {"SlideShowFaster",     N_("Slideshow Faster"), GQ_ICON_GENERIC},
-       {"SlideShowSlower",     N_("Slideshow Slower"), GQ_ICON_GENERIC},
-       {"Refresh",     N_("Refresh"), GQ_ICON_REFRESH},
-       {"HelpContents",        N_("Help"), GQ_ICON_HELP},
-       {"ExifWin",     N_("Exif window"), PIXBUF_INLINE_ICON_EXIF},
-       {"Thumbnails",  N_("Show thumbnails"), PIXBUF_INLINE_ICON_THUMB},
-       {"ShowMarks",   N_("Show marks"), PIXBUF_INLINE_ICON_MARKS},
-       {"DrawRectangle",       N_("Draw Rectangle"), PIXBUF_INLINE_ICON_DRAW_RECTANGLE},
-       {"FloatTools",  N_("Float file list"), PIXBUF_INLINE_ICON_FLOAT},
-       {"SBar",        N_("Info sidebar"), PIXBUF_INLINE_ICON_INFO},
-       {"SBarSort",    N_("Sort manager"), PIXBUF_INLINE_ICON_SORT},
-       {"Quit",        N_("Quit"), GQ_ICON_QUIT},
-       {nullptr,               nullptr, nullptr}
-};
-
 static void mouse_buttons_selection_menu_cb(GtkWidget *combo, gpointer data)
 {
        auto option = static_cast<gchar **>(data);
        gchar *label;
+       GList *list;
+       GList *work;
 
        label = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(combo));
 
-       const UseableMouseItems *list = useable_mouse_items;
-
-       while (list->name)
+       list = get_action_items();
+       work = g_list_find_custom(list, label, reinterpret_cast<GCompareFunc>(action_item_compare_label));
+       if (work)
                {
-               if (g_strcmp0(list->label, label) == 0)
-                       {
-                       break;
-                       }
-               list++;
+               auto *action_item = static_cast<ActionItem *>(work->data);
+
+               g_free(*option);
+               *option = g_strdup(action_item->name);
                }
 
-       g_free(*option);
-       *option = g_strdup(list->name);
        g_free(label);
+       action_items_free(list);
 }
 
-static void add_mouse_selection_menu(GtkWidget *table, gint column, gint row, const gchar *text,
-                            gchar *option, gchar **option_c)
+static void add_mouse_selection_menu(GtkWidget *table, gint column, gint row, const gchar *text, gchar *option, gchar **option_c)
 {
-       GtkWidget *combo;
+       ActionItem *action_item;
        gint current = 0;
        gint i = 0;
+       GList *list;
+       GList *work;
+       GtkWidget *combo;
 
        *option_c = option;
 
-       pref_table_label(table, column, row, text, 0.0);
+       pref_table_label(table, column, row, text, GTK_ALIGN_START);
 
        combo = gtk_combo_box_text_new();
 
-       const UseableMouseItems *list = useable_mouse_items;
-
-       while (list->name)
+       list = get_action_items();
+       work = list;
+       while (work)
                {
-               gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), list->label);
-               if (g_strcmp0(list->name, option) == 0)
+               action_item = static_cast<ActionItem *>(work->data);
+               gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), action_item->label);
+
+               if (g_strcmp0(action_item->name, option) == 0)
                        {
                        current = i;
                        }
                i++;
-               list++;
+               work = work->next;
                }
 
+       action_items_free(list);
+
        gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current);
 
-       g_signal_connect(G_OBJECT(combo), "changed",
-                        G_CALLBACK(mouse_buttons_selection_menu_cb), option_c);
+       g_signal_connect(G_OBJECT(combo), "changed", G_CALLBACK(mouse_buttons_selection_menu_cb), option_c);
 
-       gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
+       gq_gtk_grid_attach(GTK_GRID(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
        gtk_widget_show(combo);
 }
 
@@ -933,14 +909,15 @@ static void add_thumb_size_menu(GtkWidget *table, gint column, gint row, gchar *
        c_options->thumbnails.max_width = options->thumbnails.max_width;
        c_options->thumbnails.max_height = options->thumbnails.max_height;
 
-       pref_table_label(table, column, row, text, 0.0);
+       pref_table_label(table, column, row, text, GTK_ALIGN_START);
 
        combo = gtk_combo_box_text_new();
 
        current = -1;
        for (i = 0; static_cast<guint>(i) < sizeof(thumb_size_list) / sizeof(ThumbSize); i++)
                {
-               gint w, h;
+               gint w;
+               gint h;
                gchar *buf;
 
                w = thumb_size_list[i].w;
@@ -968,7 +945,7 @@ static void add_thumb_size_menu(GtkWidget *table, gint column, gint row, gchar *
        g_signal_connect(G_OBJECT(combo), "changed",
                         G_CALLBACK(thumb_size_menu_cb), NULL);
 
-       gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
+       gq_gtk_grid_attach(GTK_GRID(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
        gtk_widget_show(combo);
 }
 
@@ -1035,7 +1012,7 @@ static void add_stereo_mode_menu(GtkWidget *table, gint column, gint row, const
 
        *option_c = option;
 
-       pref_table_label(table, column, row, text, 0.0);
+       pref_table_label(table, column, row, text, GTK_ALIGN_START);
 
        combo = gtk_combo_box_text_new();
 
@@ -1087,7 +1064,7 @@ static void add_stereo_mode_menu(GtkWidget *table, gint column, gint row, const
        g_signal_connect(G_OBJECT(combo), "changed",
                         G_CALLBACK(stereo_mode_menu_cb), option_c);
 
-       gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
+       gq_gtk_grid_attach(GTK_GRID(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
        gtk_widget_show(combo);
 }
 
@@ -1117,7 +1094,7 @@ static void add_video_menu(GtkWidget *table, gint column, gint row, const gchar
 
        *option_c = option;
 
-       pref_table_label(table, column, row, text, 0.0);
+       pref_table_label(table, column, row, text, GTK_ALIGN_START);
 
        combo = gtk_combo_box_text_new();
        g_list_foreach(eds,video_menu_populate,combo);
@@ -1128,7 +1105,7 @@ static void add_video_menu(GtkWidget *table, gint column, gint row, const gchar
        g_signal_connect(G_OBJECT(combo), "changed",
                         G_CALLBACK(video_menu_cb), option_c);
 
-       gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
+       gq_gtk_grid_attach(GTK_GRID(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
        gtk_widget_show(combo);
 }
 
@@ -1306,6 +1283,8 @@ static void filter_set_func(GtkTreeViewColumn *, GtkCellRenderer *cell,
                        g_object_set(GTK_CELL_RENDERER(cell),
                                     "active", fe->allow_sidecar, NULL);
                        break;
+               default:
+                       break;
                }
 }
 
@@ -1439,7 +1418,7 @@ static void filter_disable_cb(GtkWidget *widget, gpointer data)
 
 static void safe_delete_view_cb(GtkWidget *, gpointer)
 {
-       layout_set_path(nullptr, gtk_entry_get_text(GTK_ENTRY(safe_delete_path_entry)));
+       layout_set_path(nullptr, gq_gtk_entry_get_text(GTK_ENTRY(safe_delete_path_entry)));
 }
 
 static void safe_delete_clear_ok_cb(GenericDialog *, gpointer)
@@ -1460,8 +1439,8 @@ static void safe_delete_clear_cb(GtkWidget *widget, gpointer)
        entry = gtk_entry_new();
        gtk_widget_set_can_focus(entry, FALSE);
        gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE);
-       if (options->file_ops.safe_delete_path) gtk_entry_set_text(GTK_ENTRY(entry), options->file_ops.safe_delete_path);
-       gtk_box_pack_start(GTK_BOX(gd->vbox), entry, FALSE, FALSE, 0);
+       if (options->file_ops.safe_delete_path) gq_gtk_entry_set_text(GTK_ENTRY(entry), options->file_ops.safe_delete_path);
+       gq_gtk_box_pack_start(GTK_BOX(gd->vbox), entry, FALSE, FALSE, 0);
        gtk_widget_show(entry);
        gtk_widget_show(gd->dialog);
 }
@@ -1513,82 +1492,154 @@ static void image_overlay_help_cb(GtkWidget *, gpointer)
        help_window_show("GuideOptionsOSD.html");
 }
 
-static void image_overlay_set_font_cb(GtkWidget *widget, gpointer)
+static void font_activated_cb(GtkFontChooser *widget, gchar *fontname, gpointer)
 {
-       GtkWidget *dialog;
-       char *font;
-       PangoFontDescription *font_desc;
+       g_free(c_options->image_overlay.font);
+       c_options->image_overlay.font = g_strdup(fontname);
+       g_free(fontname);
 
-       dialog = gtk_font_chooser_dialog_new("Image Overlay Font", GTK_WINDOW(gtk_widget_get_toplevel(widget)));
-       gtk_font_chooser_set_font(GTK_FONT_CHOOSER(dialog), options->image_overlay.font);
+       gq_gtk_widget_destroy(GTK_WIDGET(widget));
+}
 
-       if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL)
+static void font_response_cb(GtkDialog *dialog, gint response_id, gpointer)
+{
+       gchar *font;
+
+       g_free(c_options->image_overlay.font);
+       c_options->image_overlay.font = g_strdup(options->image_overlay.font);
+
+       if (response_id == GTK_RESPONSE_OK)
                {
-               font_desc = gtk_font_chooser_get_font_desc(GTK_FONT_CHOOSER(dialog));
-               font = pango_font_description_to_string(font_desc);
+               font = gtk_font_chooser_get_font(GTK_FONT_CHOOSER(dialog));
                g_free(c_options->image_overlay.font);
                c_options->image_overlay.font = g_strdup(font);
                g_free(font);
                }
 
-       gtk_widget_destroy(dialog);
+       gq_gtk_widget_destroy(GTK_WIDGET(dialog));
 }
 
-static void image_overlay_set_text_colour_cb(GtkWidget *widget, gpointer)
+static void image_overlay_set_font_cb(GtkWidget *widget, gpointer)
 {
        GtkWidget *dialog;
-       GdkRGBA colour;
-
-       dialog = gtk_color_chooser_dialog_new("Image Overlay Text Colour", GTK_WINDOW(gtk_widget_get_toplevel(widget)));
-       colour.red = options->image_overlay.text_red;
-       colour.green = options->image_overlay.text_green;
-       colour.blue = options->image_overlay.text_blue;
-       colour.alpha = options->image_overlay.text_alpha;
-       gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(dialog), &colour);
-       gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(dialog), TRUE);
 
-       if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL)
+       dialog = gtk_font_chooser_dialog_new(_("Image Overlay Font"), GTK_WINDOW(gtk_widget_get_toplevel(widget)));
+       gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
+       gtk_font_chooser_set_font(GTK_FONT_CHOOSER(dialog), options->image_overlay.font);
+
+       g_signal_connect(dialog, "font-activated", G_CALLBACK(font_activated_cb), nullptr);
+       g_signal_connect(dialog, "response", G_CALLBACK(font_response_cb), nullptr);
+
+       gtk_widget_show(dialog);
+}
+
+static void text_color_activated_cb(GtkColorChooser *chooser, GdkRGBA *color, gpointer)
+{
+       c_options->image_overlay.text_red = color->red * 255;
+       c_options->image_overlay.text_green = color->green * 255;
+       c_options->image_overlay.text_blue = color->blue * 255;
+       c_options->image_overlay.text_alpha = color->alpha * 255;
+
+       gq_gtk_widget_destroy(GTK_WIDGET(chooser));
+}
+
+static void text_color_response_cb(GtkDialog *dialog, gint response_id, gpointer)
+{
+       GdkRGBA color;
+
+       c_options->image_overlay.text_red = options->image_overlay.text_red;
+       c_options->image_overlay.text_green = options->image_overlay.text_green;
+       c_options->image_overlay.text_blue = options->image_overlay.text_blue;
+       c_options->image_overlay.text_alpha = options->image_overlay.text_alpha;
+
+       if (response_id == GTK_RESPONSE_OK)
                {
-               gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(dialog), &colour);
-               c_options->image_overlay.text_red = colour.red*255;
-               c_options->image_overlay.text_green = colour.green*255;
-               c_options->image_overlay.text_blue = colour.blue*255;
-               c_options->image_overlay.text_alpha = colour.alpha*255;
+               gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(dialog), &color);
+               c_options->image_overlay.text_red = color.red * 255;
+               c_options->image_overlay.text_green = color.green * 255;
+               c_options->image_overlay.text_blue = color.blue * 255;
+               c_options->image_overlay.text_alpha = color.alpha * 255;
                }
-       gtk_widget_destroy(dialog);
-}
 
+       gq_gtk_widget_destroy(GTK_WIDGET(dialog));
+}
 
-static void image_overlay_set_background_colour_cb(GtkWidget *widget, gpointer)
+static void image_overlay_set_text_color_cb(GtkWidget *widget, gpointer)
 {
        GtkWidget *dialog;
-       GdkRGBA colour;
-
-       dialog = gtk_color_chooser_dialog_new("Image Overlay Background Colour", GTK_WINDOW(gtk_widget_get_toplevel(widget)));
-       colour.red = options->image_overlay.background_red;
-       colour.green = options->image_overlay.background_green;
-       colour.blue = options->image_overlay.background_blue;
-       colour.alpha = options->image_overlay.background_alpha;
-       gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(dialog), &colour);
+       GdkRGBA color;
+
+       dialog = gtk_color_chooser_dialog_new(_("Image Overlay Text Color"), GTK_WINDOW(gtk_widget_get_toplevel(widget)));
+       color.red = options->image_overlay.text_red;
+       color.green = options->image_overlay.text_green;
+       color.blue = options->image_overlay.text_blue;
+       color.alpha = options->image_overlay.text_alpha;
+       gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(dialog), &color);
        gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(dialog), TRUE);
 
-       if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL)
+       g_signal_connect(dialog, "color-activated", G_CALLBACK(text_color_activated_cb), nullptr);
+       g_signal_connect(dialog, "response", G_CALLBACK(text_color_response_cb), nullptr);
+
+       gtk_widget_show(dialog);
+}
+
+static void bg_color_activated_cb(GtkColorChooser *chooser, GdkRGBA *color, gpointer)
+{
+       c_options->image_overlay.background_red = color->red * 255;
+       c_options->image_overlay.background_green = color->green * 255;
+       c_options->image_overlay.background_blue = color->blue * 255;
+       c_options->image_overlay.background_alpha = color->alpha * 255;
+
+       gq_gtk_widget_destroy(GTK_WIDGET(chooser));
+}
+
+static void bg_color_response_cb(GtkDialog *dialog, gint response_id, gpointer)
+{
+       GdkRGBA color;
+
+       c_options->image_overlay.background_red = options->image_overlay.background_red;
+       c_options->image_overlay.background_green = options->image_overlay.background_green;
+       c_options->image_overlay.background_blue = options->image_overlay.background_blue;
+       c_options->image_overlay.background_alpha = options->image_overlay.background_alpha;
+
+       if (response_id == GTK_RESPONSE_OK)
                {
-               gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(dialog), &colour);
-               c_options->image_overlay.background_red = colour.red*255;
-               c_options->image_overlay.background_green = colour.green*255;
-               c_options->image_overlay.background_blue = colour.blue*255;
-               c_options->image_overlay.background_alpha = colour.alpha*255;
+               gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(dialog), &color);
+               c_options->image_overlay.background_red = color.red * 255;
+               c_options->image_overlay.background_green = color.green * 255;
+               c_options->image_overlay.background_blue = color.blue * 255;
+               c_options->image_overlay.background_alpha = color.alpha * 255;
                }
-       gtk_widget_destroy(dialog);
+       gq_gtk_widget_destroy(GTK_WIDGET(dialog));
+}
+
+static void image_overlay_set_background_color_cb(GtkWidget *widget, gpointer)
+{
+       GtkWidget *dialog;
+       GdkRGBA color;
+
+       dialog = gtk_color_chooser_dialog_new(_("Image Overlay Background Color"), GTK_WINDOW(gtk_widget_get_toplevel(widget)));
+       color.red = options->image_overlay.background_red;
+       color.green = options->image_overlay.background_green;
+       color.blue = options->image_overlay.background_blue;
+       color.alpha = options->image_overlay.background_alpha;
+       gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(dialog), &color);
+       gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(dialog), TRUE);
+
+       g_signal_connect(dialog, "color-activated", G_CALLBACK(bg_color_activated_cb), nullptr);
+       g_signal_connect(dialog, "response", G_CALLBACK(bg_color_response_cb), nullptr);
+
+       gtk_widget_show(dialog);
 }
 
 static void accel_store_populate()
 {
        LayoutWindow *lw;
-       GList *groups, *actions;
+       GList *groups;
+       GList *actions;
        GtkAction *action;
        const gchar *accel_path;
+       const gchar *icon_name;
        GtkAccelKey key;
        GtkTreeIter iter;
 
@@ -1598,17 +1649,20 @@ static void accel_store_populate()
        lw = static_cast<LayoutWindow *>(layout_window_list->data); /* get the actions from the first window, it should not matter, they should be the same in all windows */
 
        g_assert(lw && lw->ui_manager);
-       groups = gtk_ui_manager_get_action_groups(lw->ui_manager);
+       groups = gq_gtk_ui_manager_get_action_groups(lw->ui_manager);
        while (groups)
                {
-               actions = gtk_action_group_list_actions(GTK_ACTION_GROUP(groups->data));
+               actions = gq_gtk_action_group_list_actions(GTK_ACTION_GROUP(groups->data));
                while (actions)
                        {
                        action = GTK_ACTION(actions->data);
-                       accel_path = gtk_action_get_accel_path(action);
+                       accel_path = gq_gtk_action_get_accel_path(action);
                        if (accel_path && gtk_accel_map_lookup_entry(accel_path, &key))
                                {
-                               gchar *label, *label2, *tooltip, *accel;
+                               gchar *label;
+                               gchar *label2;
+                               gchar *tooltip;
+                               gchar *accel;
                                g_object_get(action,
                                             "tooltip", &tooltip,
                                             "label", &label,
@@ -1621,6 +1675,7 @@ static void accel_store_populate()
                                        }
 
                                accel = gtk_accelerator_name(key.accel_key, key.accel_mods);
+                               icon_name = gq_gtk_action_get_icon_name(action);
 
                                if (tooltip)
                                        {
@@ -1630,6 +1685,7 @@ static void accel_store_populate()
                                                           AE_KEY, accel,
                                                           AE_TOOLTIP, tooltip ? tooltip : "",
                                                           AE_ACCEL, accel_path,
+                                                          AE_ICON, icon_name,
                                                           -1);
                                        }
 
@@ -1679,7 +1735,8 @@ static void accel_store_edited_cb(GtkCellRendererAccel *, gchar *path_string, gu
        GtkTreeIter iter;
        gchar *acc;
        gchar *accel_path;
-       GtkAccelKey old_key, key;
+       GtkAccelKey old_key;
+       GtkAccelKey key;
        GtkTreePath *path = gtk_tree_path_new_from_string(path_string);
 
        gtk_tree_model_get_iter(model, &iter, path);
@@ -1737,7 +1794,8 @@ void accel_clear_selection(GtkTreeModel *, GtkTreePath *, GtkTreeIter *iter, gpo
 void accel_reset_selection(GtkTreeModel *model, GtkTreePath *, GtkTreeIter *iter, gpointer)
 {
        GtkAccelKey key;
-       gchar *accel_path, *accel;
+       gchar *accel_path;
+       gchar *accel;
 
        gtk_tree_model_get(model, iter, AE_ACCEL, &accel_path, -1);
        gtk_accel_map_lookup_entry(accel_path, &key);
@@ -1777,7 +1835,7 @@ static GtkWidget *scrolled_notebook_page(GtkWidget *notebook, const gchar *title
        GtkWidget *scrolled;
        GtkWidget *viewport;
 
-       scrolled = gtk_scrolled_window_new(nullptr, nullptr);
+       scrolled = gq_gtk_scrolled_window_new(nullptr, nullptr);
        gtk_container_set_border_width(GTK_CONTAINER(scrolled), PREF_PAD_BORDER);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
                                       GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
@@ -1787,11 +1845,11 @@ static GtkWidget *scrolled_notebook_page(GtkWidget *notebook, const gchar *title
 
        viewport = gtk_viewport_new(nullptr, nullptr);
        gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_NONE);
-       gtk_container_add(GTK_CONTAINER(scrolled), viewport);
+       gq_gtk_container_add(GTK_WIDGET(scrolled), viewport);
        gtk_widget_show(viewport);
 
        vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
-       gtk_container_add(GTK_CONTAINER(viewport), vbox);
+       gq_gtk_container_add(GTK_WIDGET(viewport), vbox);
        gtk_widget_show(vbox);
 
        return vbox;
@@ -1828,11 +1886,11 @@ static void help_search_engine_entry_icon_cb(GtkEntry *, GtkEntryIconPosition po
 {
        if (pos == GTK_ENTRY_ICON_PRIMARY)
                {
-               gtk_entry_set_text(GTK_ENTRY(userdata), HELP_SEARCH_ENGINE);
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), HELP_SEARCH_ENGINE);
                }
        else
                {
-               gtk_entry_set_text(GTK_ENTRY(userdata), "");
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), "");
                }
 }
 
@@ -1843,12 +1901,12 @@ static void star_rating_star_icon_cb(GtkEntry *, GtkEntryIconPosition pos, GdkEv
        if (pos == GTK_ENTRY_ICON_PRIMARY)
                {
                rating_symbol = g_strdup_printf("U+%X", STAR_RATING_STAR);
-               gtk_entry_set_text(GTK_ENTRY(userdata), rating_symbol);
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), rating_symbol);
                g_free(rating_symbol);
                }
        else
                {
-               gtk_entry_set_text(GTK_ENTRY(userdata), "U+");
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), "U+");
                gtk_widget_grab_focus(GTK_WIDGET(userdata));
                gtk_editable_select_region(GTK_EDITABLE(userdata), 2, 2);
                }
@@ -1861,12 +1919,12 @@ static void star_rating_rejected_icon_cb(GtkEntry *, GtkEntryIconPosition pos, G
        if (pos == GTK_ENTRY_ICON_PRIMARY)
                {
                rating_symbol = g_strdup_printf("U+%X", STAR_RATING_REJECTED);
-               gtk_entry_set_text(GTK_ENTRY(userdata), rating_symbol);
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), rating_symbol);
                g_free(rating_symbol);
                }
        else
                {
-               gtk_entry_set_text(GTK_ENTRY(userdata), "U+");
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), "U+");
                gtk_widget_grab_focus(GTK_WIDGET(userdata));
                gtk_editable_select_region(GTK_EDITABLE(userdata), 2, 2);
                }
@@ -1885,7 +1943,7 @@ static guint star_rating_symbol_test(GtkWidget *, gpointer data)
        list = gtk_container_get_children(hbox);
 
        hex_code_entry = static_cast<GtkEntry *>(g_list_nth_data(list, 2));
-       hex_code_full = g_strdup(gtk_entry_get_text(hex_code_entry));
+       hex_code_full = g_strdup(gq_gtk_entry_get_text(hex_code_entry));
 
        hex_code = g_strsplit(hex_code_full, "+", 2);
        if (hex_code[0] && hex_code[1])
@@ -1946,7 +2004,9 @@ static void config_tab_general(GtkWidget *notebook)
        GtkWidget *ct_button;
        GtkWidget *table;
        GtkWidget *spin;
-       gint hours, minutes, remainder;
+       gint hours;
+       gint minutes;
+       gint remainder;
        gdouble seconds;
        GtkWidget *star_rating_entry;
        GString *str;
@@ -2011,7 +2071,7 @@ static void config_tab_general(GtkWidget *notebook)
                                 options->thumbnails.collection_preview, &c_options->thumbnails.collection_preview);
        gtk_widget_set_tooltip_text(spin, _("The maximum number of thumbnails shown in a Collection preview montage"));
 
-#ifdef HAVE_FFMPEGTHUMBNAILER_METADATA
+#if HAVE_FFMPEGTHUMBNAILER_METADATA
        pref_checkbox_new_int(group, _("Use embedded metadata in video files as thumbnails when available"),
                              options->thumbnails.use_ft_metadata, &c_options->thumbnails.use_ft_metadata);
 #endif
@@ -2030,14 +2090,14 @@ static void config_tab_general(GtkWidget *notebook)
        pref_label_new(hbox, g_strdup(str->str));
        rating_symbol = g_strdup_printf("U+%X", options->star_rating.star);
        star_rating_entry = gtk_entry_new();
-       gtk_entry_set_text(GTK_ENTRY(star_rating_entry), rating_symbol);
-       gtk_box_pack_start(GTK_BOX(hbox), star_rating_entry, FALSE, FALSE, 0);
+       gq_gtk_entry_set_text(GTK_ENTRY(star_rating_entry), rating_symbol);
+       gq_gtk_box_pack_start(GTK_BOX(hbox), star_rating_entry, FALSE, FALSE, 0);
        gtk_entry_set_width_chars(GTK_ENTRY(star_rating_entry), 15);
        gtk_widget_show(star_rating_entry);
        button = pref_button_new(nullptr, nullptr, _("Set"),
                                        G_CALLBACK(star_rating_star_test_cb), hbox);
        gtk_widget_set_tooltip_text(button, _("Display selected character"));
-       gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
        gtk_widget_set_tooltip_text(star_rating_entry, _("Hexadecimal representation of a Unicode character. A list of all Unicode characters may be found on the Internet."));
        gtk_entry_set_icon_from_icon_name(GTK_ENTRY(star_rating_entry),
@@ -2062,14 +2122,14 @@ static void config_tab_general(GtkWidget *notebook)
        pref_label_new(hbox, g_strdup(str->str));
        rating_symbol = g_strdup_printf("U+%X", options->star_rating.rejected);
        star_rating_entry = gtk_entry_new();
-       gtk_entry_set_text(GTK_ENTRY(star_rating_entry), rating_symbol);
-       gtk_box_pack_start(GTK_BOX(hbox), star_rating_entry, FALSE, FALSE, 0);
+       gq_gtk_entry_set_text(GTK_ENTRY(star_rating_entry), rating_symbol);
+       gq_gtk_box_pack_start(GTK_BOX(hbox), star_rating_entry, FALSE, FALSE, 0);
        gtk_entry_set_width_chars(GTK_ENTRY(star_rating_entry), 15);
        gtk_widget_show(star_rating_entry);
        button = pref_button_new(nullptr, nullptr, _("Set"),
                                        G_CALLBACK(star_rating_rejected_test_cb), hbox);
        gtk_widget_set_tooltip_text(button, _("Display selected character"));
-       gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
        gtk_widget_set_tooltip_text(star_rating_entry, _("Hexadecimal representation of a Unicode character. A list of all Unicode characters may be found on the Internet."));
        gtk_entry_set_icon_from_icon_name(GTK_ENTRY(star_rating_entry),
@@ -2134,15 +2194,37 @@ static void config_tab_general(GtkWidget *notebook)
 
        pref_spacer(group, PREF_PAD_GROUP);
 
-       group = pref_group_new(vbox, FALSE, _("Expand menu and toolbar"), GTK_ORIENTATION_VERTICAL);
+       group = pref_group_new(vbox, FALSE, _("Menu style"), GTK_ORIENTATION_VERTICAL);
+
+       pref_checkbox_new_int(group, _("☰ style menu button (NOTE! Geeqie must be restarted for change to take effect)"),
+                               options->hamburger_menu, &c_options->hamburger_menu);
+       gtk_widget_set_tooltip_text(group, _("Use a ☰ style menu button instead of the classic style across the top of the frame"));
+
+       pref_spacer(group, PREF_PAD_GROUP);
+
+       group = pref_group_new(vbox, FALSE, _("Expand toolbar"), GTK_ORIENTATION_VERTICAL);
 
-       pref_checkbox_new_int(group, _("Expand menu and toolbar (NOTE! Geeqie must be restarted for change to take effect)"),
+       pref_checkbox_new_int(group, _("Expand menu/toolbar (NOTE! Geeqie must be restarted for change to take effect)"),
                                options->expand_menu_toolbar, &c_options->expand_menu_toolbar);
-       gtk_widget_set_tooltip_text(group, _("Expand the menu and toolbar to the full width of the window"));
+       gtk_widget_set_tooltip_text(group, _("Expand the menu/toolbar to the full width of the window"));
 
        pref_spacer(group, PREF_PAD_GROUP);
 
-       if (g_getenv("APPDIR") && strstr(g_getenv("APPDIR"), "/tmp/.mount_Geeqie"))
+       group = pref_group_new(vbox, FALSE, _("Hide Selectable Bars"), GTK_ORIENTATION_VERTICAL);
+
+       pref_checkbox_new_int(group, _("Menu bar"),
+                               options->selectable_bars.menu_bar, &c_options->selectable_bars.menu_bar);
+
+       pref_checkbox_new_int(group, _("Tool bar"),
+                               options->selectable_bars.tool_bar, &c_options->selectable_bars.tool_bar);
+
+       pref_checkbox_new_int(group, _("Status bar"),
+                               options->selectable_bars.status_bar, &c_options->selectable_bars.status_bar);
+       gtk_widget_set_tooltip_text(group, _("The Hide Selectable Bars menu item (default keystroke is control-backtick) will toggle the display of the bars selected here"));
+
+       pref_spacer(group, PREF_PAD_GROUP);
+
+       if ((g_getenv("APPDIR") && strstr(g_getenv("APPDIR"), "/tmp/.mount_Geeqie")) || (g_strstr_len(gq_executable_path, -1, "squashfs-root")))
                {
                group = pref_group_new(vbox, FALSE, _("AppImage updates notifications"), GTK_ORIENTATION_VERTICAL);
                hbox = pref_box_new(group, TRUE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
@@ -2205,8 +2287,8 @@ static void config_tab_general(GtkWidget *notebook)
        group = pref_group_new(vbox, FALSE, _("On-line help search engine"), GTK_ORIENTATION_VERTICAL);
 
        help_search_engine_entry = gtk_entry_new();
-       gtk_entry_set_text(GTK_ENTRY(help_search_engine_entry), options->help_search_engine);
-       gtk_box_pack_start(GTK_BOX(group), help_search_engine_entry, FALSE, FALSE, 0);
+       gq_gtk_entry_set_text(GTK_ENTRY(help_search_engine_entry), options->help_search_engine);
+       gq_gtk_box_pack_start(GTK_BOX(group), help_search_engine_entry, FALSE, FALSE, 0);
        gtk_widget_show(help_search_engine_entry);
 
        gtk_widget_set_tooltip_text(help_search_engine_entry, _("The format varies between search engines, e.g the format may be:\nhttps://www.search_engine.com/search?q=site:geeqie.org/help\nhttps://www.search_engine.com/?q=site:geeqie.org/help"));
@@ -2264,16 +2346,16 @@ static void config_tab_image(GtkWidget *notebook)
                                 100, 999, 1,
                                 options->image.max_enlargement_size, &c_options->image.max_enlargement_size);
        pref_checkbox_link_sensitivity(enlargement_button, spin);
-       gtk_widget_set_tooltip_text(GTK_WIDGET(hbox), _("Enable this to allow Geeqie to increase the image size for images that are smaller than the current view area when the zoom is set to \"Fit image to window\". This value sets the maximum expansion permitted in percent i.e. 100% is full-size."));
+       gtk_widget_set_tooltip_text(GTK_WIDGET(hbox), _("Enable this to allow Geeqie to increase the image size for images that are smaller than the current view area when the zoom is set to 'Fit image to window'. This value sets the maximum expansion permitted in percent i.e. 100% is full-size."));
 
        hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
-       ct_button = pref_checkbox_new_int(hbox, _("Virtual window size (% of actual window):"),
+       ct_button = pref_checkbox_new_int(hbox, _("Virtual window size (%% of actual window):"),
                                          options->image.limit_autofit_size, &c_options->image.limit_autofit_size);
        spin = pref_spin_new_int(hbox, nullptr, nullptr,
                                 10, 150, 1,
                                 options->image.max_autofit_size, &c_options->image.max_autofit_size);
        pref_checkbox_link_sensitivity(ct_button, spin);
-       gtk_widget_set_tooltip_text(GTK_WIDGET(hbox), _("This value will set the virtual size of the window when \"Fit image to window\" is set. Instead of using the actual size of the window, the specified percentage of the window will be used. It allows one to keep a border around the image (values lower than 100%) or to auto zoom the image (values greater than 100%). It affects fullscreen mode too."));
+       gtk_widget_set_tooltip_text(GTK_WIDGET(hbox), _("This value will set the virtual size of the window when 'Fit image to window' is set. Instead of using the actual size of the window, the specified percentage of the window will be used. It allows one to keep a border around the image (values lower than 100%) or to auto zoom the image (values greater than 100%). It affects fullscreen mode too."));
 
        group = pref_group_new(vbox, FALSE, _("Tile size"), GTK_ORIENTATION_VERTICAL);
 
@@ -2318,7 +2400,7 @@ static void save_default_window_layout_cb(GtkWidget *, gpointer)
        layout_valid(&lw);
 
        tmp_id = lw->options.id;
-       lw->options.id = g_strdup("lw_default");
+       lw->options.id = g_strdup("");
 
        default_path = g_build_filename(get_rc_dir(), DEFAULT_WINDOW_LAYOUT, NULL);
        save_default_layout_options_to_file(default_path, options, lw);
@@ -2349,7 +2431,7 @@ static GtkWidget *create_popover(GtkWidget *parent, GtkWidget *child, GtkPositio
 
        popover = gtk_popover_new(parent);
        gtk_popover_set_position(GTK_POPOVER (popover), pos);
-       gtk_container_add (GTK_CONTAINER(popover), child);
+       gq_gtk_container_add(GTK_WIDGET(popover), child);
        gtk_container_set_border_width(GTK_CONTAINER (popover), 6);
        gtk_widget_show (child);
 
@@ -2363,8 +2445,10 @@ static void config_tab_windows(GtkWidget *notebook)
        GtkWidget *group;
        GtkWidget *subgroup;
        GtkWidget *button;
+       GtkWidget *checkbox;
        GtkWidget *ct_button;
        GtkWidget *spin;
+       GtkWidget *widget;
 
        vbox = scrolled_notebook_page(notebook, _("Windows"));
 
@@ -2373,13 +2457,13 @@ static void config_tab_windows(GtkWidget *notebook)
        ct_button = pref_checkbox_new_int(group, _("Remember session"),
                                          options->save_window_positions, &c_options->save_window_positions);
 
-       button = pref_checkbox_new_int(group, _("Use saved window positions also for new windows"),
+       checkbox = pref_checkbox_new_int(group, _("Use saved window positions also for new windows"),
                                       options->use_saved_window_positions_for_new_windows, &c_options->use_saved_window_positions_for_new_windows);
-       pref_checkbox_link_sensitivity(ct_button, button);
+       pref_checkbox_link_sensitivity(ct_button, checkbox);
 
-       button = pref_checkbox_new_int(group, _("Remember window workspace"),
+       checkbox = pref_checkbox_new_int(group, _("Remember window workspace"),
                              options->save_window_workspace, &c_options->save_window_workspace);
-       pref_checkbox_link_sensitivity(ct_button, button);
+       pref_checkbox_link_sensitivity(ct_button, checkbox);
 
        pref_checkbox_new_int(group, _("Remember tool state (float/hidden)"),
                              options->tools_restore_state, &c_options->tools_restore_state);
@@ -2387,6 +2471,10 @@ static void config_tab_windows(GtkWidget *notebook)
        pref_checkbox_new_int(group, _("Remember dialog window positions"),
                              options->save_dialog_window_positions, &c_options->save_dialog_window_positions);
 
+       widget = pref_checkbox_new_int(group, _("Hide window decorations"),
+                             options->hide_window_decorations, &c_options->hide_window_decorations);
+       gtk_widget_set_tooltip_text(widget, _("Remove borders and title bar from windows. A restart of Geeqie is required for this feature to take effect on the main layout window"));
+
        pref_checkbox_new_int(group, _("Show window IDs"),
                              options->show_window_ids, &c_options->show_window_ids);
 
@@ -2418,7 +2506,7 @@ static void config_tab_windows(GtkWidget *notebook)
        c_options->fullscreen.screen = options->fullscreen.screen;
        c_options->fullscreen.above = options->fullscreen.above;
        hbox = fullscreen_prefs_selection_new(_("Location:"), &c_options->fullscreen.screen, &c_options->fullscreen.above);
-       gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
 
        pref_checkbox_new_int(group, _("Smooth image flip"),
@@ -2427,7 +2515,6 @@ static void config_tab_windows(GtkWidget *notebook)
                              options->fullscreen.disable_saver, &c_options->fullscreen.disable_saver);
 }
 
-#define PRE_FORMATTED_COLUMNS 5
 static void config_tab_osd(GtkWidget *notebook)
 {
        GtkWidget *hbox;
@@ -2451,7 +2538,7 @@ static void config_tab_osd(GtkWidget *notebook)
 
        scrolled_pre_formatted = osd_new(PRE_FORMATTED_COLUMNS, image_overlay_template_view);
        gtk_widget_set_size_request(scrolled_pre_formatted, 200, 150);
-       gtk_box_pack_start(GTK_BOX(subgroup), scrolled_pre_formatted, FALSE, FALSE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(subgroup), scrolled_pre_formatted, FALSE, FALSE, 0);
        gtk_widget_show(scrolled_pre_formatted);
        gtk_widget_show(subgroup);
 
@@ -2459,18 +2546,18 @@ static void config_tab_osd(GtkWidget *notebook)
 
        pref_label_new(group, _("Image overlay template"));
 
-       scrolled = gtk_scrolled_window_new(nullptr, nullptr);
+       scrolled = gq_gtk_scrolled_window_new(nullptr, nullptr);
        gtk_widget_set_size_request(scrolled, 200, 150);
-       gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN);
+       gq_gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
                                                                        GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-       gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 5);
+       gq_gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 5);
        gtk_widget_show(scrolled);
 
        gtk_widget_set_tooltip_markup(image_overlay_template_view,
                                        _("Extensive formatting options are shown in the Help file"));
 
-       gtk_container_add(GTK_CONTAINER(scrolled), image_overlay_template_view);
+       gq_gtk_container_add(GTK_WIDGET(scrolled), image_overlay_template_view);
        gtk_widget_show(image_overlay_template_view);
 
        hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP);
@@ -2478,28 +2565,26 @@ static void config_tab_osd(GtkWidget *notebook)
        button = pref_button_new(nullptr, GQ_ICON_SELECT_FONT, _("Font"),
                                 G_CALLBACK(image_overlay_set_font_cb), notebook);
 
-       gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 
-       button = pref_button_new(nullptr, GQ_ICON_SELECT_COLOR, _("Text"),
-                                G_CALLBACK(image_overlay_set_text_colour_cb), nullptr);
-       gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       button = pref_button_new(nullptr, GQ_ICON_SELECT_COLOR, _("Text"), G_CALLBACK(image_overlay_set_text_color_cb), nullptr);
+       gq_gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 
-       button = pref_button_new(nullptr, GQ_ICON_SELECT_COLOR, _("Background"),
-                                G_CALLBACK(image_overlay_set_background_colour_cb), nullptr);
-       gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       button = pref_button_new(nullptr, GQ_ICON_SELECT_COLOR, _("Background"), G_CALLBACK(image_overlay_set_background_color_cb), nullptr);
+       gq_gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
-       image_overlay_set_text_colours();
+       image_overlay_set_text_colors();
 
        button = pref_button_new(nullptr, nullptr, _("Defaults"),
                                 G_CALLBACK(image_overlay_default_template_cb), image_overlay_template_view);
-       gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 
        button = pref_button_new(nullptr, GQ_ICON_HELP, _("Help"),
                                 G_CALLBACK(image_overlay_help_cb), nullptr);
-       gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 
        buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(image_overlay_template_view));
@@ -2511,46 +2596,46 @@ static void config_tab_osd(GtkWidget *notebook)
 
        group = pref_group_new(vbox, FALSE, _("Exif, XMP or IPTC tags"), GTK_ORIENTATION_VERTICAL);
        hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
-       gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
        label = gtk_label_new(_("%Exif.Image.Orientation%"));
-       gtk_box_pack_start(GTK_BOX(hbox),label, FALSE,FALSE,0);
+       gq_gtk_box_pack_start(GTK_BOX(hbox),label, FALSE,FALSE,0);
        gtk_widget_show(label);
        pref_spacer(group,TRUE);
 
        group = pref_group_new(vbox, FALSE, _("Field separators"), GTK_ORIENTATION_VERTICAL);
        hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
-       gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
        label = gtk_label_new(_("Separator shown only if both fields are non-null:\n%formatted.ShutterSpeed%|%formatted.ISOSpeedRating%"));
-       gtk_box_pack_start(GTK_BOX(hbox),label, FALSE,FALSE,0);
+       gq_gtk_box_pack_start(GTK_BOX(hbox),label, FALSE,FALSE,0);
        gtk_widget_show(label);
        pref_spacer(group,TRUE);
 
        group = pref_group_new(vbox, FALSE, _("Field maximum length"), GTK_ORIENTATION_VERTICAL);
        hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
-       gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
        label = gtk_label_new(_("%path:39%"));
-       gtk_box_pack_start(GTK_BOX(hbox),label, FALSE,FALSE,0);
+       gq_gtk_box_pack_start(GTK_BOX(hbox),label, FALSE,FALSE,0);
        gtk_widget_show(label);
        pref_spacer(group,TRUE);
 
        group = pref_group_new(vbox, FALSE, _("Pre- and post- text"), GTK_ORIENTATION_VERTICAL);
        hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
-       gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
        label = gtk_label_new(_("Text shown only if the field is non-null:\n%formatted.Aperture:F no. * setting%\n %formatted.Aperture:10:F no. * setting%"));
-       gtk_box_pack_start(GTK_BOX(hbox),label, FALSE,FALSE,0);
+       gq_gtk_box_pack_start(GTK_BOX(hbox),label, FALSE,FALSE,0);
        gtk_widget_show(label);
        pref_spacer(group,TRUE);
 
        group = pref_group_new(vbox, FALSE, _("Pango markup"), GTK_ORIENTATION_VERTICAL);
        hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
-       gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
        label = gtk_label_new(_("<b>bold</b>\n<u>underline</u>\n<i>italic</i>\n<s>strikethrough</s>"));
-       gtk_box_pack_start(GTK_BOX(hbox),label, FALSE,FALSE,0);
+       gq_gtk_box_pack_start(GTK_BOX(hbox),label, FALSE,FALSE,0);
        gtk_widget_show(label);
 }
 
@@ -2658,10 +2743,7 @@ static void config_tab_files(GtkWidget *notebook)
                              options->file_filter.show_hidden_files, &c_options->file_filter.show_hidden_files);
        pref_checkbox_new_int(group, _("Show parent folder (..)"),
                              options->file_filter.show_parent_directory, &c_options->file_filter.show_parent_directory);
-       pref_checkbox_new_int(group, _("Case sensitive sort"),
-                             options->file_sort.case_sensitive, &c_options->file_sort.case_sensitive);
-       pref_checkbox_new_int(group, _("Natural sort order - Requires restart"),
-                                         options->file_sort.natural, &c_options->file_sort.natural);
+       pref_checkbox_new_int(group, _("Case sensitive sort (Search and Collection windows, and tab completion)"), options->file_sort.case_sensitive, &c_options->file_sort.case_sensitive);
        pref_checkbox_new_int(group, _("Disable file extension checks"),
                              options->file_filter.disable_file_extension_checks, &c_options->file_filter.disable_file_extension_checks);
 
@@ -2672,8 +2754,8 @@ static void config_tab_files(GtkWidget *notebook)
        group = pref_group_new(vbox, FALSE, _("Grouping sidecar extensions"), GTK_ORIENTATION_VERTICAL);
 
        sidecar_ext_entry = gtk_entry_new();
-       gtk_entry_set_text(GTK_ENTRY(sidecar_ext_entry), options->sidecar.ext);
-       gtk_box_pack_start(GTK_BOX(group), sidecar_ext_entry, FALSE, FALSE, 0);
+       gq_gtk_entry_set_text(GTK_ENTRY(sidecar_ext_entry), options->sidecar.ext);
+       gq_gtk_box_pack_start(GTK_BOX(group), sidecar_ext_entry, FALSE, FALSE, 0);
        gtk_widget_show(sidecar_ext_entry);
 
        group = pref_group_new(vbox, TRUE, _("File types"), GTK_ORIENTATION_VERTICAL);
@@ -2683,10 +2765,10 @@ static void config_tab_files(GtkWidget *notebook)
                         G_CALLBACK(filter_disable_cb), frame);
        gtk_widget_set_sensitive(frame, !options->file_filter.disable);
 
-       scrolled = gtk_scrolled_window_new(nullptr, nullptr);
-       gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN);
+       scrolled = gq_gtk_scrolled_window_new(nullptr, nullptr);
+       gq_gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
-       gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 0);
        gtk_widget_show(scrolled);
 
        filter_store = gtk_list_store_new(1, G_TYPE_POINTER);
@@ -2793,24 +2875,24 @@ static void config_tab_files(GtkWidget *notebook)
        gtk_tree_view_column_set_sort_column_id(column, FILETYPES_COLUMN_SIDECAR);
 
        filter_store_populate();
-       gtk_container_add(GTK_CONTAINER(scrolled), filter_view);
+       gq_gtk_container_add(GTK_WIDGET(scrolled), filter_view);
        gtk_widget_show(filter_view);
 
        hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP);
 
        button = pref_button_new(nullptr, nullptr, _("Defaults"),
                                 G_CALLBACK(filter_default_cb), filter_view);
-       gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 
        button = pref_button_new(nullptr, GQ_ICON_REMOVE, _("Remove"),
                                 G_CALLBACK(filter_remove_cb), filter_view);
-       gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 
        button = pref_button_new(nullptr, GQ_ICON_ADD, _("Add"),
                                 G_CALLBACK(filter_add_cb), filter_view);
-       gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 }
 
@@ -2830,7 +2912,7 @@ static void config_tab_metadata(GtkWidget *notebook)
 
 
        group = pref_group_new(vbox, FALSE, _("Metadata writing sequence"), GTK_ORIENTATION_VERTICAL);
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
        label = pref_label_new(group, _("Warning: Geeqie is built without Exiv2. Some options are disabled."));
 #endif
        label = pref_label_new(group, _("When writing metadata, Geeqie will follow these steps, if selected. This process will stop when the first successful write occurs."));
@@ -2848,7 +2930,7 @@ static void config_tab_metadata(GtkWidget *notebook)
        gtk_widget_set_tooltip_markup(ct_button, markup);
        g_free(markup);
 
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
        gtk_widget_set_sensitive(ct_button, FALSE);
 #endif
 
@@ -2865,11 +2947,11 @@ static void config_tab_metadata(GtkWidget *notebook)
 
        gtk_label_set_xalign(GTK_LABEL(label), 0.0);
        gtk_label_set_yalign(GTK_LABEL(label), 0.5);
-       gtk_misc_set_padding(GTK_MISC(label), 22, 0);
+       gtk_widget_set_margin_start(label, 22);
        pref_spacer(group, PREF_PAD_GROUP);
 
        group = pref_group_new(vbox, FALSE, _("Step 1 Options:"), GTK_ORIENTATION_VERTICAL);
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
        gtk_widget_set_sensitive(group, FALSE);
 #endif
 
@@ -2893,7 +2975,7 @@ static void config_tab_metadata(GtkWidget *notebook)
        pref_spacer(group, PREF_PAD_GROUP);
 
        group = pref_group_new(vbox, FALSE, _("Steps 2 and 3 Option:"), GTK_ORIENTATION_VERTICAL);
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
        gtk_widget_set_sensitive(group, FALSE);
 #endif
 
@@ -2906,12 +2988,12 @@ static void config_tab_metadata(GtkWidget *notebook)
        gtk_widget_set_tooltip_text(tmp_widget, _("See the Help file for a list of the tags used"));
 
        tmp_widget = pref_checkbox_new_int(group, _("Permit Keywords to be case-sensitive"), options->metadata.keywords_case_sensitive, &c_options->metadata.keywords_case_sensitive);
-       gtk_widget_set_tooltip_text(tmp_widget, _("When selected, \"Place\" and \"place\" are two different keywords"));
+       gtk_widget_set_tooltip_text(tmp_widget, _("When selected, 'Place' and 'place' are two different keywords"));
 
        ct_button = pref_checkbox_new_int(group, _("Write altered image orientation to the metadata"), options->metadata.write_orientation, &c_options->metadata.write_orientation);
        gtk_widget_set_tooltip_text(ct_button, _("If checked, the results of orientation commands (Rotate, Mirror and Flip) issued on an image will be written to metadata\nNote: If this option is not checked, the results of orientation commands will be lost when Geeqie closes"));
 
-#ifndef HAVE_EXIV2
+#if !HAVE_EXIV2
        gtk_widget_set_sensitive(ct_button, FALSE);
 #endif
 
@@ -2932,7 +3014,7 @@ static void config_tab_metadata(GtkWidget *notebook)
 
        pref_spacer(group, PREF_PAD_GROUP);
 
-#ifdef HAVE_SPELL
+#if HAVE_SPELL
        group = pref_group_new(vbox, FALSE, _("Spelling checks"), GTK_ORIENTATION_VERTICAL);
 
        ct_button = pref_checkbox_new_int(group, _("Check spelling - Requires restart"), options->metadata.check_spelling, &c_options->metadata.check_spelling);
@@ -2944,7 +3026,7 @@ static void config_tab_metadata(GtkWidget *notebook)
        group = pref_group_new(vbox, FALSE, _("Pre-load metadata"), GTK_ORIENTATION_VERTICAL);
 
        ct_button = pref_checkbox_new_int(group, _("Read metadata in background"), options->read_metadata_in_idle, &c_options->read_metadata_in_idle);
-       gtk_widget_set_tooltip_text(ct_button,"On folder change, read DateTimeOriginal, DateTimeDigitized and Star Rating in the idle loop.\nIf this is not selected, initial loading of the folder will be faster but sorting on these items will be slower");
+       gtk_widget_set_tooltip_text(ct_button,_("On folder change, read DateTimeOriginal, DateTimeDigitized and Star Rating in the idle loop.\nIf this is not selected, initial loading of the folder will be faster but sorting on these items will be slower"));
 }
 
 /* keywords tab */
@@ -2970,8 +3052,6 @@ struct KeywordFindData
        guint idle_id; /* event source id */
 };
 
-#define KEYWORD_DIALOG_WIDTH 400
-
 static void keywords_find_folder(KeywordFindData *kfd, FileData *dir_fd)
 {
        GList *list_d = nullptr;
@@ -3017,8 +3097,8 @@ static void keywords_find_finish(KeywordFindData *kfd)
 {
        keywords_find_reset(kfd);
 
-       gtk_entry_set_text(GTK_ENTRY(kfd->progress), _("done"));
-       spinner_set_interval(kfd->spinner, -1);
+       gq_gtk_entry_set_text(GTK_ENTRY(kfd->progress), _("done"));
+       gtk_spinner_stop(GTK_SPINNER(kfd->spinner));
 
        gtk_widget_set_sensitive(kfd->group, TRUE);
        gtk_widget_set_sensitive(kfd->button_start, TRUE);
@@ -3062,13 +3142,14 @@ static gboolean keywords_find_file(gpointer data)
                        keywords = keywords->next;
                        }
 
-               gtk_entry_set_text(GTK_ENTRY(kfd->progress), fd->path);
+               gq_gtk_entry_set_text(GTK_ENTRY(kfd->progress), fd->path);
                file_data_unref(fd);
                g_list_free_full(keywords, g_free);
 
                return (G_SOURCE_CONTINUE);
                }
-       else if (kfd->list_dir)
+
+       if (kfd->list_dir)
                {
                FileData *fd;
 
@@ -3094,7 +3175,7 @@ static void keywords_find_start_cb(GenericDialog *, gpointer data)
 
        if (kfd->list || !gtk_widget_get_sensitive(kfd->button_start)) return;
 
-       path = remove_trailing_slash((gtk_entry_get_text(GTK_ENTRY(kfd->entry))));
+       path = remove_trailing_slash((gq_gtk_entry_get_text(GTK_ENTRY(kfd->entry))));
        parse_out_relatives(path);
 
        if (!isdir(path))
@@ -3111,7 +3192,7 @@ static void keywords_find_start_cb(GenericDialog *, gpointer data)
                gtk_widget_set_sensitive(kfd->button_start, FALSE);
                gtk_widget_set_sensitive(kfd->button_stop, TRUE);
                gtk_widget_set_sensitive(kfd->button_close, FALSE);
-               spinner_set_interval(kfd->spinner, SPINNER_SPEED);
+               gtk_spinner_start(GTK_SPINNER(kfd->spinner));
 
                dir_fd = file_data_new_dir(path);
                keywords_find_folder(kfd, dir_fd);
@@ -3155,7 +3236,7 @@ static void keywords_find_dialog(GtkWidget *widget, const gchar *path)
 
        label = tab_completion_new(&kfd->entry, path, nullptr, nullptr, nullptr, nullptr);
        tab_completion_add_select_button(kfd->entry,_("Select folder") , TRUE);
-       gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
        gtk_widget_show(label);
 
        pref_checkbox_new_int(kfd->group, _("Include subfolders"), FALSE, &kfd->recurse);
@@ -3166,12 +3247,12 @@ static void keywords_find_dialog(GtkWidget *widget, const gchar *path)
        kfd->progress = gtk_entry_new();
        gtk_widget_set_can_focus(kfd->progress, FALSE);
        gtk_editable_set_editable(GTK_EDITABLE(kfd->progress), FALSE);
-       gtk_entry_set_text(GTK_ENTRY(kfd->progress), _("click start to begin"));
-       gtk_box_pack_start(GTK_BOX(hbox), kfd->progress, TRUE, TRUE, 0);
+       gq_gtk_entry_set_text(GTK_ENTRY(kfd->progress), _("click start to begin"));
+       gq_gtk_box_pack_start(GTK_BOX(hbox), kfd->progress, TRUE, TRUE, 0);
        gtk_widget_show(kfd->progress);
 
-       kfd->spinner = spinner_new(nullptr, -1);
-       gtk_box_pack_start(GTK_BOX(hbox), kfd->spinner, FALSE, FALSE, 0);
+       kfd->spinner = gtk_spinner_new();
+       gq_gtk_box_pack_start(GTK_BOX(hbox), kfd->spinner, FALSE, FALSE, 0);
        gtk_widget_show(kfd->spinner);
 
        kfd->list = nullptr;
@@ -3189,13 +3270,12 @@ static void keywords_find_cb(GtkWidget *widget, gpointer)
 
 static void config_tab_keywords_save()
 {
-       GtkTextIter start, end;
+       GtkTextIter start;
+       GtkTextIter end;
        GtkTextBuffer *buffer;
        GList *kw_list = nullptr;
-       GList *work;
        gchar *buffer_text;
        gchar *kw_split;
-       gboolean found;
 
        buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(keyword_text));
        gtk_text_buffer_get_bounds(buffer, &start, &end);
@@ -3205,18 +3285,7 @@ static void config_tab_keywords_save()
        kw_split = strtok(buffer_text, "\n");
        while (kw_split != nullptr)
                {
-               work = kw_list;
-               found = FALSE;
-               while (work)
-                       {
-                       if (g_strcmp0(static_cast<const gchar *>(work->data), kw_split) == 0)
-                               {
-                               found = TRUE;
-                               break;
-                               }
-                       work = work->next;
-                       }
-               if (!found)
+               if (!g_list_find_custom(kw_list, kw_split, reinterpret_cast<GCompareFunc>(g_strcmp0)))
                        {
                        kw_list = g_list_append(kw_list, g_strdup(kw_split));
                        }
@@ -3239,7 +3308,7 @@ static void config_tab_keywords(GtkWidget *notebook)
        GtkTextIter iter;
        GtkTextBuffer *buffer;
        gchar *tmp;
-#ifdef HAVE_SPELL
+#if HAVE_SPELL
        GspellTextView *gspell_view;
 #endif
 
@@ -3251,16 +3320,16 @@ static void config_tab_keywords(GtkWidget *notebook)
 
        button = pref_button_new(hbox, GQ_ICON_RUN, _("Search"),
                                   G_CALLBACK(keywords_find_cb), keyword_text);
-       gtk_widget_set_tooltip_text(button, "Search for existing keywords");
+       gtk_widget_set_tooltip_text(button, _("Search for existing keywords"));
 
 
        keyword_text = gtk_text_view_new();
        gtk_widget_set_size_request(keyword_text, 20, 20);
-       scrolled = gtk_scrolled_window_new(nullptr, nullptr);
-       gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 0);
+       scrolled = gq_gtk_scrolled_window_new(nullptr, nullptr);
+       gq_gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 0);
        gtk_widget_show(scrolled);
 
-#ifdef HAVE_SPELL
+#if HAVE_SPELL
        if (options->metadata.check_spelling)
                {
                gspell_view = gspell_text_view_get_from_gtk_text_view(GTK_TEXT_VIEW(keyword_text));
@@ -3268,7 +3337,7 @@ static void config_tab_keywords(GtkWidget *notebook)
                }
 #endif
 
-       gtk_container_add(GTK_CONTAINER(scrolled), keyword_text);
+       gq_gtk_container_add(GTK_WIDGET(scrolled), keyword_text);
        gtk_widget_show(keyword_text);
 
        gtk_text_view_set_editable(GTK_TEXT_VIEW(keyword_text), TRUE);
@@ -3301,7 +3370,7 @@ static void config_tab_keywords(GtkWidget *notebook)
 }
 
 /* metadata tab */
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
 static void intent_menu_cb(GtkWidget *combo, gpointer data)
 {
        auto option = static_cast<gint *>(data);
@@ -3332,7 +3401,7 @@ static void add_intent_menu(GtkWidget *table, gint column, gint row, const gchar
 
        *option_c = option;
 
-       pref_table_label(table, column, row, text, 0.0);
+       pref_table_label(table, column, row, text, GTK_ALIGN_START);
 
        combo = gtk_combo_box_text_new();
 
@@ -3347,12 +3416,12 @@ static void add_intent_menu(GtkWidget *table, gint column, gint row, const gchar
 
        gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current);
 
-       gtk_widget_set_tooltip_text(combo,"Refer to the lcms documentation for the defaults used when the selected Intent is not available");
+       gtk_widget_set_tooltip_text(combo,_("Refer to the lcms documentation for the defaults used when the selected Intent is not available"));
 
        g_signal_connect(G_OBJECT(combo), "changed",
                         G_CALLBACK(intent_menu_cb), option_c);
 
-       gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
+       gq_gtk_grid_attach(GTK_GRID(table), combo, column + 1, column + 2, row, row + 1, GTK_SHRINK, static_cast<GtkAttachOptions>(0), 0, 0);
        gtk_widget_show(combo);
 }
 #endif
@@ -3369,20 +3438,20 @@ static void config_tab_color(GtkWidget *notebook)
        vbox = scrolled_notebook_page(notebook, _("Color management"));
 
        group =  pref_group_new(vbox, FALSE, _("Input profiles"), GTK_ORIENTATION_VERTICAL);
-#ifndef HAVE_LCMS
+#if !HAVE_LCMS
        gtk_widget_set_sensitive(pref_group_parent(group), FALSE);
 #endif
 
        table = pref_table_new(group, 3, COLOR_PROFILE_INPUTS + 1, FALSE, FALSE);
-       gtk_table_set_col_spacings(GTK_TABLE(table), PREF_PAD_GAP);
+       gtk_grid_set_column_spacing(GTK_GRID(table), PREF_PAD_GAP);
 
-       label = pref_table_label(table, 0, 0, _("Type"), 0.0);
+       label = pref_table_label(table, 0, 0, _("Type"), GTK_ALIGN_START);
        pref_label_bold(label, TRUE, FALSE);
 
-       label = pref_table_label(table, 1, 0, _("Menu name"), 0.0);
+       label = pref_table_label(table, 1, 0, _("Menu name"), GTK_ALIGN_START);
        pref_label_bold(label, TRUE, FALSE);
 
-       label = pref_table_label(table, 2, 0, _("File"), 0.0);
+       label = pref_table_label(table, 2, 0, _("File"), GTK_ALIGN_START);
        pref_label_bold(label, TRUE, FALSE);
 
        for (i = 0; i < COLOR_PROFILE_INPUTS; i++)
@@ -3391,31 +3460,29 @@ static void config_tab_color(GtkWidget *notebook)
                gchar *buf;
 
                buf = g_strdup_printf(_("Input %d:"), i + COLOR_PROFILE_FILE);
-               pref_table_label(table, 0, i + 1, buf, 1.0);
+               pref_table_label(table, 0, i + 1, buf, GTK_ALIGN_END);
                g_free(buf);
 
                entry = gtk_entry_new();
                gtk_entry_set_max_length(GTK_ENTRY(entry), EDITOR_NAME_MAX_LENGTH);
                if (options->color_profile.input_name[i])
                        {
-                       gtk_entry_set_text(GTK_ENTRY(entry), options->color_profile.input_name[i]);
+                       gq_gtk_entry_set_text(GTK_ENTRY(entry), options->color_profile.input_name[i]);
                        }
-               gtk_table_attach(GTK_TABLE(table), entry, 1, 2, i + 1, i + 2,
-                                static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), static_cast<GtkAttachOptions>(0), 0, 0);
+               gq_gtk_grid_attach(GTK_GRID(table), entry, 1, 2, i + 1, i + 2, static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), static_cast<GtkAttachOptions>(0), 0, 0);
                gtk_widget_show(entry);
                color_profile_input_name_entry[i] = entry;
 
                tabcomp = tab_completion_new(&entry, options->color_profile.input_file[i], nullptr, ".icc", "ICC Files", nullptr);
                tab_completion_add_select_button(entry, _("Select color profile"), FALSE);
                gtk_widget_set_size_request(entry, 160, -1);
-               gtk_table_attach(GTK_TABLE(table), tabcomp, 2, 3, i + 1, i + 2,
-                                static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), static_cast<GtkAttachOptions>(0), 0, 0);
+               gq_gtk_grid_attach(GTK_GRID(table), tabcomp, 2, 3, i + 1, i + 2, static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), static_cast<GtkAttachOptions>(0), 0, 0);
                gtk_widget_show(tabcomp);
                color_profile_input_file_entry[i] = entry;
                }
 
        group =  pref_group_new(vbox, FALSE, _("Screen profile"), GTK_ORIENTATION_VERTICAL);
-#ifndef HAVE_LCMS
+#if !HAVE_LCMS
        gtk_widget_set_sensitive(pref_group_parent(group), FALSE);
 #endif
        pref_checkbox_new_int(group, _("Use system screen profile if available"),
@@ -3423,17 +3490,15 @@ static void config_tab_color(GtkWidget *notebook)
 
        table = pref_table_new(group, 2, 1, FALSE, FALSE);
 
-       pref_table_label(table, 0, 0, _("Screen:"), 1.0);
+       pref_table_label(table, 0, 0, _("Screen:"), GTK_ALIGN_END);
        tabcomp = tab_completion_new(&color_profile_screen_file_entry,
                                     options->color_profile.screen_file, nullptr, ".icc", "ICC Files", nullptr);
        tab_completion_add_select_button(color_profile_screen_file_entry, _("Select color profile"), FALSE);
        gtk_widget_set_size_request(color_profile_screen_file_entry, 160, -1);
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
        add_intent_menu(table, 0, 1, _("Render Intent:"), options->color_profile.render_intent, &c_options->color_profile.render_intent);
 #endif
-       gtk_table_attach(GTK_TABLE(table), tabcomp, 1, 2,
-                        0, 1,
-                        static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), static_cast<GtkAttachOptions>(0), 0, 0);
+       gq_gtk_grid_attach(GTK_GRID(table), tabcomp, 1, 2, 0, 1, static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), static_cast<GtkAttachOptions>(0), 0, 0);
 
        gtk_widget_show(tabcomp);
 }
@@ -3479,6 +3544,7 @@ static void config_tab_behavior(GtkWidget *notebook)
        GtkWidget *with_rename;
        GtkWidget *collections_on_top;
        GtkWidget *hide_window_in_fullscreen;
+       GtkWidget *hide_osd_in_fullscreen;
        GtkWidget *checkbox;
        GtkWidget *tmp;
 
@@ -3504,7 +3570,7 @@ static void config_tab_behavior(GtkWidget *notebook)
 
        tabcomp = tab_completion_new(&safe_delete_path_entry, options->file_ops.safe_delete_path, nullptr, nullptr, nullptr, nullptr);
        tab_completion_add_select_button(safe_delete_path_entry, nullptr, TRUE);
-       gtk_box_pack_start(GTK_BOX(hbox), tabcomp, TRUE, TRUE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(hbox), tabcomp, TRUE, TRUE, 0);
        gtk_widget_show(tabcomp);
 
        hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP);
@@ -3516,12 +3582,12 @@ static void config_tab_behavior(GtkWidget *notebook)
        gtk_widget_set_tooltip_markup(spin, _("Set to 0 for unlimited size"));
        button = pref_button_new(nullptr, nullptr, _("View"),
                                 G_CALLBACK(safe_delete_view_cb), nullptr);
-       gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 
        button = pref_button_new(nullptr, GQ_ICON_CLEAR, nullptr,
                                 G_CALLBACK(safe_delete_clear_cb), nullptr);
-       gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
 
        c_options->file_ops.no_trash = options->file_ops.no_trash;
        c_options->file_ops.use_system_trash = options->file_ops.use_system_trash;
@@ -3554,19 +3620,27 @@ static void config_tab_behavior(GtkWidget *notebook)
 
        marks = pref_checkbox_new_int(group, _("Save marks on exit"),
                                options->marks_save, &c_options->marks_save);
-       gtk_widget_set_tooltip_text(marks,"Note that marks linked to a keyword will be saved irrespective of this setting");
+       gtk_widget_set_tooltip_text(marks,_("Note that marks linked to a keyword will be saved irrespective of this setting"));
 
-       with_rename = pref_checkbox_new_int(group, _("Use \"With Rename\" as default for Copy/Move dialogs"),
+       with_rename = pref_checkbox_new_int(group, _("Use 'With Rename' as default for Copy/Move dialogs"),
                                options->with_rename, &c_options->with_rename);
-       gtk_widget_set_tooltip_text(with_rename,"Change the default button for Copy/Move dialogs");
+       gtk_widget_set_tooltip_text(with_rename,_("Change the default button for Copy/Move dialogs"));
+
+       collections_on_top = pref_checkbox_new_int(group, _("Permit duplicates in Collections"),
+                               options->collections_duplicates, &c_options->collections_duplicates);
+       gtk_widget_set_tooltip_text(collections_on_top, _("Allow the same image to be in a Collection more than once"));
 
        collections_on_top = pref_checkbox_new_int(group, _("Open collections on top"),
                                options->collections_on_top, &c_options->collections_on_top);
-       gtk_widget_set_tooltip_text(collections_on_top,"Open collections window on top");
+       gtk_widget_set_tooltip_text(collections_on_top, _("Open collections window on top"));
 
        hide_window_in_fullscreen = pref_checkbox_new_int(group, _("Hide window in fullscreen"),
                                options->hide_window_in_fullscreen, &c_options->hide_window_in_fullscreen);
-       gtk_widget_set_tooltip_text(hide_window_in_fullscreen,"When alt-tabbing, prevent Geeqie window showing twice");
+       gtk_widget_set_tooltip_text(hide_window_in_fullscreen, _("When alt-tabbing, prevent Geeqie window showing twice"));
+
+       hide_osd_in_fullscreen = pref_checkbox_new_int(group, _("Hide OSD in fullscreen"),
+                               options->hide_osd_in_fullscreen, &c_options->hide_osd_in_fullscreen);
+       gtk_widget_set_tooltip_text(hide_osd_in_fullscreen, _("Hide Overlay Screen Display in fullscreen mode"));
 
        pref_spin_new_int(group, _("Recent folder list maximum size"), nullptr,
                          1, 50, 1, options->open_recent_list_maxsize, &c_options->open_recent_list_maxsize);
@@ -3614,7 +3688,7 @@ static void config_tab_behavior(GtkWidget *notebook)
 
        checkbox = pref_checkbox_new_int(group, _("Override disable GPU"),
                                options->override_disable_gpu, &c_options->override_disable_gpu);
-       gtk_widget_set_tooltip_text(checkbox, "Contact the developers for usage");
+       gtk_widget_set_tooltip_text(checkbox, _("Contact the developers for usage"));
 
 #ifdef DEBUG
        pref_spacer(group, PREF_PAD_GROUP);
@@ -3629,6 +3703,14 @@ static void config_tab_behavior(GtkWidget *notebook)
 
        pref_spin_new_int(group, _("Log Window max. lines:"), nullptr,
                          1, 99999, 1, options->log_window_lines, &options->log_window_lines);
+
+       hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
+       pref_label_new(hbox, _("Log Window F1 command: "));
+       log_window_f1_entry = gtk_entry_new();
+       gq_gtk_entry_set_text(GTK_ENTRY(log_window_f1_entry), options->log_window.action);
+       gq_gtk_box_pack_start(GTK_BOX(hbox), log_window_f1_entry, FALSE, FALSE, 0);
+       gtk_entry_set_width_chars(GTK_ENTRY(log_window_f1_entry), 15);
+       gtk_widget_show(log_window_f1_entry);
 #endif
 }
 
@@ -3686,13 +3768,13 @@ static void config_tab_accelerators(GtkWidget *notebook)
 
        group = pref_group_new(vbox, TRUE, _("Accelerators"), GTK_ORIENTATION_VERTICAL);
 
-       scrolled = gtk_scrolled_window_new(nullptr, nullptr);
-       gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN);
+       scrolled = gq_gtk_scrolled_window_new(nullptr, nullptr);
+       gq_gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
-       gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 0);
        gtk_widget_show(scrolled);
 
-       accel_store = gtk_tree_store_new(4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
+       accel_store = gtk_tree_store_new(5, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
 
        accel_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(accel_store));
        g_object_unref(accel_store);
@@ -3756,6 +3838,15 @@ static void config_tab_accelerators(GtkWidget *notebook)
        gtk_tree_view_column_set_resizable(column, TRUE);
        gtk_tree_view_append_column(GTK_TREE_VIEW(accel_view), column);
 
+       column = gtk_tree_view_column_new_with_attributes("Icon",
+                                                         renderer,
+                                                         "text", AE_ICON,
+                                                         NULL);
+
+       gtk_tree_view_column_set_sort_column_id(column, AE_ICON);
+       gtk_tree_view_column_set_resizable(column, TRUE);
+       gtk_tree_view_append_column(GTK_TREE_VIEW(accel_view), column);
+
        /* Search on text in column */
        gtk_tree_view_set_activate_on_single_click(GTK_TREE_VIEW(accel_view), TRUE);
        g_signal_connect(accel_view, "row_activated", G_CALLBACK(accel_row_activated_cb), accel_store);
@@ -3764,25 +3855,25 @@ static void config_tab_accelerators(GtkWidget *notebook)
        gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(accel_view), accel_search_function_cb, nullptr, nullptr);
 
        accel_store_populate();
-       gtk_container_add(GTK_CONTAINER(scrolled), accel_view);
+       gq_gtk_container_add(GTK_WIDGET(scrolled), accel_view);
        gtk_widget_show(accel_view);
 
        hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP);
 
        button = pref_button_new(nullptr, nullptr, _("Defaults"),
                                 G_CALLBACK(accel_default_cb), accel_view);
-       gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 
        button = pref_button_new(nullptr, nullptr, _("Reset selected"),
                                 G_CALLBACK(accel_reset_cb), accel_view);
        gtk_widget_set_tooltip_text(button, _("Will only reset changes made before the settings are saved"));
-       gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 
        button = pref_button_new(nullptr, nullptr, _("Clear selected"),
                                 G_CALLBACK(accel_clear_cb), accel_view);
-       gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+       gq_gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 }
 
@@ -3798,7 +3889,7 @@ static void config_tab_toolbar_main(GtkWidget *notebook)
        vbox = scrolled_notebook_page(notebook, _("Toolbar Main"));
 
        toolbardata = toolbar_select_new(lw, TOOLBAR_MAIN);
-       gtk_box_pack_start(GTK_BOX(vbox), toolbardata, TRUE, TRUE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(vbox), toolbardata, TRUE, TRUE, 0);
        gtk_widget_show(vbox);
 }
 
@@ -3814,30 +3905,27 @@ static void config_tab_toolbar_status(GtkWidget *notebook)
        vbox = scrolled_notebook_page(notebook, _("Toolbar Status"));
 
        toolbardata = toolbar_select_new(lw, TOOLBAR_STATUS);
-       gtk_box_pack_start(GTK_BOX(vbox), toolbardata, TRUE, TRUE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(vbox), toolbardata, TRUE, TRUE, 0);
        gtk_widget_show(vbox);
 }
 
 /* advanced tab */
-static gint extension_sort_cb(gconstpointer a, gconstpointer b)
-{
-       return g_strcmp0(static_cast<const gchar *>(a), static_cast<const gchar *>(b));
-}
-
 static void config_tab_advanced(GtkWidget *notebook)
 {
-       GtkWidget *vbox;
-       GtkWidget *group;
-       GSList *formats_list;
-       GList *extensions_list = nullptr;
        gchar **extensions;
-       GtkWidget *tabcomp;
        GdkPixbufFormat *fm;
        gint i;
+       GList *extensions_list = nullptr;
+       GSList *formats_list;
        GString *types_string = g_string_new(nullptr);
-       GtkWidget *types_string_label;
-       GtkWidget *threads_string_label;
+       GtkWidget *alternate_checkbox;
        GtkWidget *dupes_threads_spin;
+       GtkWidget *group;
+       GtkWidget *subgroup;
+       GtkWidget *tabcomp;
+       GtkWidget *threads_string_label;
+       GtkWidget *types_string_label;
+       GtkWidget *vbox;
 
        vbox = scrolled_notebook_page(notebook, _("Advanced"));
        group = pref_group_new(vbox, FALSE, _("External preview extraction"), GTK_ORIENTATION_VERTICAL);
@@ -3856,7 +3944,7 @@ static void config_tab_advanced(GtkWidget *notebook)
                i = 0;
                while (extensions[i])
                        {
-                       extensions_list = g_list_insert_sorted(extensions_list, g_strdup(extensions[i]), extension_sort_cb);
+                       extensions_list = g_list_insert_sorted(extensions_list, g_strdup(extensions[i]), reinterpret_cast<GCompareFunc>(g_strcmp0));
                        i++;
                        }
 
@@ -3889,14 +3977,14 @@ static void config_tab_advanced(GtkWidget *notebook)
        external_preview_select_entry = gtk_entry_new();
        tabcomp = tab_completion_new(&external_preview_select_entry, options->external_preview.select, nullptr, nullptr, nullptr, nullptr);
        tab_completion_add_select_button(external_preview_select_entry, _("Select file identification tool"), FALSE);
-       gtk_box_pack_start(GTK_BOX(group), tabcomp, TRUE, TRUE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(group), tabcomp, TRUE, TRUE, 0);
        gtk_widget_show(tabcomp);
 
        group = pref_group_new(vbox, FALSE, _("Preview extraction tool"), GTK_ORIENTATION_VERTICAL);
        external_preview_extract_entry = gtk_entry_new();
        tabcomp = tab_completion_new(&external_preview_extract_entry, options->external_preview.extract, nullptr, nullptr, nullptr, nullptr);
        tab_completion_add_select_button(external_preview_extract_entry, _("Select preview extraction tool"), FALSE);
-       gtk_box_pack_start(GTK_BOX(group), tabcomp, TRUE, TRUE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(group), tabcomp, TRUE, TRUE, 0);
        gtk_widget_show(tabcomp);
 
        gtk_widget_show(vbox);
@@ -3910,13 +3998,27 @@ static void config_tab_advanced(GtkWidget *notebook)
        pref_line(vbox, PREF_PAD_SPACE);
        group = pref_group_new(vbox, FALSE, _("Thread pool limits"), GTK_ORIENTATION_VERTICAL);
 
-       threads_string_label = pref_label_new(group, "This option limits the number of threads (or cpu cores)\nthat Geeqie will use when running duplicate checks. The default value is 0, which means all available cores will be used.");
+       threads_string_label = pref_label_new(group, _("This option limits the number of threads (or cpu cores) that Geeqie will use when running duplicate checks.\nThe value 0 means all available cores will be used."));
        gtk_label_set_line_wrap(GTK_LABEL(threads_string_label), TRUE);
 
        pref_spacer(vbox, PREF_PAD_GROUP);
 
        dupes_threads_spin = pref_spin_new_int(vbox, _("Duplicate check:"), _("max. threads"), 0, get_cpu_cores(), 1, options->threads.duplicates, &c_options->threads.duplicates);
        gtk_widget_set_tooltip_markup(dupes_threads_spin, _("Set to 0 for unlimited"));
+
+       pref_spacer(group, PREF_PAD_GROUP);
+
+       pref_line(vbox, PREF_PAD_SPACE);
+
+       group = pref_group_new(vbox, FALSE, _("Alternate similarity alogorithm"), GTK_ORIENTATION_VERTICAL);
+
+       alternate_checkbox = pref_checkbox_new_int(group, _("Enable alternate similarity algorithm"), options->alternate_similarity_algorithm.enabled, &c_options->alternate_similarity_algorithm.enabled);
+
+       subgroup = pref_box_new(group, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
+       pref_checkbox_link_sensitivity(alternate_checkbox, subgroup);
+
+       alternate_checkbox = pref_checkbox_new_int(subgroup, _("Use grayscale"), options->alternate_similarity_algorithm.grayscale, &c_options->alternate_similarity_algorithm.grayscale);
+       gtk_widget_set_tooltip_text(alternate_checkbox, _("Reduce fingerprint to grayscale"));
 }
 
 /* stereo tab */
@@ -4007,7 +4109,7 @@ static void config_window_create(LayoutWindow *lw)
 
        if (!c_options) c_options = init_options(nullptr);
 
-       configwindow = window_new(GTK_WINDOW_TOPLEVEL, "preferences", PIXBUF_INLINE_ICON_CONFIG, nullptr, _("Preferences"));
+       configwindow = window_new("preferences", PIXBUF_INLINE_ICON_CONFIG, nullptr, _("Preferences"));
        DEBUG_NAME(configwindow);
        gtk_window_set_type_hint(GTK_WINDOW(configwindow), GDK_WINDOW_TYPE_HINT_DIALOG);
        g_signal_connect(G_OBJECT(configwindow), "delete_event",
@@ -4015,7 +4117,7 @@ static void config_window_create(LayoutWindow *lw)
        if (options->save_dialog_window_positions)
                {
                gtk_window_resize(GTK_WINDOW(configwindow), lw->options.preferences_window.w, lw->options.preferences_window.h);
-               gtk_window_move(GTK_WINDOW(configwindow), lw->options.preferences_window.x, lw->options.preferences_window.y);
+               gq_gtk_window_move(GTK_WINDOW(configwindow), lw->options.preferences_window.x, lw->options.preferences_window.y);
                }
        else
                {
@@ -4025,13 +4127,13 @@ static void config_window_create(LayoutWindow *lw)
        gtk_container_set_border_width(GTK_CONTAINER(configwindow), PREF_PAD_BORDER);
 
        win_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE);
-       gtk_container_add(GTK_CONTAINER(configwindow), win_vbox);
+       gq_gtk_container_add(GTK_WIDGET(configwindow), win_vbox);
        gtk_widget_show(win_vbox);
 
        notebook = gtk_notebook_new();
        gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_LEFT);
        gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), TRUE);
-       gtk_box_pack_start(GTK_BOX(win_vbox), notebook, TRUE, TRUE, 0);
+       gq_gtk_box_pack_start(GTK_BOX(win_vbox), notebook, TRUE, TRUE, 0);
 
        config_tab_general(notebook);
        config_tab_image(notebook);
@@ -4050,21 +4152,21 @@ static void config_window_create(LayoutWindow *lw)
 
        gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), lw->options.preferences_window.page_number);
 
-       hbox = gtk_hbutton_box_new();
+       hbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
        gtk_button_box_set_layout(GTK_BUTTON_BOX(hbox), GTK_BUTTONBOX_END);
        gtk_box_set_spacing(GTK_BOX(hbox), PREF_PAD_BUTTON_GAP);
-       gtk_box_pack_end(GTK_BOX(win_vbox), hbox, FALSE, FALSE, 0);
+       gq_gtk_box_pack_end(GTK_BOX(win_vbox), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
 
        button = pref_button_new(nullptr, GQ_ICON_HELP, _("Help"),
                                 G_CALLBACK(config_window_help_cb), notebook);
-       gtk_container_add(GTK_CONTAINER(hbox), button);
+       gq_gtk_container_add(GTK_WIDGET(hbox), button);
        gtk_widget_set_can_default(button, TRUE);
        gtk_widget_show(button);
 
        button = pref_button_new(nullptr, GQ_ICON_OK, "OK",
                                 G_CALLBACK(config_window_ok_cb), notebook);
-       gtk_container_add(GTK_CONTAINER(hbox), button);
+       gq_gtk_container_add(GTK_WIDGET(hbox), button);
        gtk_widget_set_can_default(button, TRUE);
        gtk_widget_grab_default(button);
        gtk_widget_show(button);
@@ -4073,7 +4175,7 @@ static void config_window_create(LayoutWindow *lw)
 
        button = pref_button_new(nullptr, GQ_ICON_CANCEL, _("Cancel"),
                                 G_CALLBACK(config_window_close_cb), nullptr);
-       gtk_container_add(GTK_CONTAINER(hbox), button);
+       gq_gtk_container_add(GTK_WIDGET(hbox), button);
        gtk_widget_set_can_default(button, TRUE);
        gtk_widget_show(button);
 
@@ -4122,11 +4224,9 @@ void show_about_window(LayoutWindow *lw)
        gchar *artists[2];
        gchar *author_line;
        gchar *authors[1000];
-       gchar *authors_path;
        gchar *comment;
        gchar *timezone_path;
        gchar *translators;
-       gchar *translators_path;
        gint i_authors = 0;
        gint n = 0;
        gsize bytes_read;
@@ -4134,8 +4234,7 @@ void show_about_window(LayoutWindow *lw)
        gsize size;
        guint32 flags;
 
-       copyright = g_string_new(nullptr);
-       copyright = g_string_append(copyright, "This program comes with absolutely no warranty.\nGNU General Public License, version 2 or later.\nSee https://www.gnu.org/licenses/old-licenses/gpl-2.0.html\n\n");
+       copyright = g_string_new(_("This program comes with absolutely no warranty.\nGNU General Public License, version 2 or later.\nSee https://www.gnu.org/licenses/old-licenses/gpl-2.0.html\n\n"));
 
        timezone_path = g_build_filename(get_rc_dir(), TIMEZONE_DATABASE_FILE, NULL);
        if (g_file_test(timezone_path, G_FILE_TEST_EXISTS))
@@ -4153,9 +4252,9 @@ void show_about_window(LayoutWindow *lw)
                }
        g_free(timezone_path);
 
-       authors_path = g_build_filename(GQ_RESOURCE_PATH_CREDITS, "authors", NULL);
+       copyright = g_string_append(copyright, _("\n\nSome icons by https://www.flaticon.com"));
 
-       in_stream_authors = g_resources_open_stream(authors_path, G_RESOURCE_LOOKUP_FLAGS_NONE, nullptr);
+       in_stream_authors = g_resources_open_stream(GQ_RESOURCE_PATH_CREDITS "/authors", G_RESOURCE_LOOKUP_FLAGS_NONE, nullptr);
 
        data_stream = g_data_input_stream_new(in_stream_authors);
 
@@ -4170,7 +4269,7 @@ void show_about_window(LayoutWindow *lw)
 
        g_input_stream_close(in_stream_authors, nullptr, nullptr);
 
-       translators_path = g_build_filename(GQ_RESOURCE_PATH_CREDITS, "translators", NULL);
+       constexpr auto translators_path = GQ_RESOURCE_PATH_CREDITS "/translators";
 
        g_resources_get_info(translators_path, G_RESOURCE_LOOKUP_FLAGS_NONE, &size, &flags, nullptr);
 
@@ -4179,7 +4278,7 @@ void show_about_window(LayoutWindow *lw)
        g_input_stream_read_all(in_stream_translators, translators, size, &bytes_read, nullptr, nullptr);
        g_input_stream_close(in_stream_translators, nullptr, nullptr);
 
-       comment = g_strconcat("Project created by John Ellis\nGQview 1998\nGeeqie 2007\n\n\nDevelopment and bug reports:\n", GQ_EMAIL_ADDRESS, "\nhttps://github.com/BestImageViewer/geeqie/issues",NULL);
+       comment = g_strconcat(_("Project created by John Ellis\nGQview 1998\nGeeqie 2007\n\n\nDevelopment and bug reports:\n"), GQ_EMAIL_ADDRESS, _("\nhttps://github.com/BestImageViewer/geeqie/issues"), NULL);
 
        artists[0] = g_strdup("Néstor Díaz Valencia <nestor@estudionexos.com>");
        artists[1] = nullptr;
@@ -4194,7 +4293,7 @@ void show_about_window(LayoutWindow *lw)
                "logo", pixbuf_logo,
                "icon", pixbuf_icon,
                "website", GQ_WEBSITE,
-               "website-label", "Website",
+               "website-label", _("Website"),
                "comments", comment,
                "artists", artists,
                "authors", authors,
@@ -4212,16 +4311,14 @@ void show_about_window(LayoutWindow *lw)
                }
 
        g_free(artists[0]);
-       g_free(authors_path);
        g_free(comment);
        g_free(translators);
-       g_free(translators_path);
        g_object_unref(data_stream);
        g_object_unref(in_stream_authors);
        g_object_unref(in_stream_translators);
 }
 
-static void image_overlay_set_text_colours()
+static void image_overlay_set_text_colors()
 {
        c_options->image_overlay.text_red = options->image_overlay.text_red;
        c_options->image_overlay.text_green = options->image_overlay.text_green;
@@ -4340,7 +4437,7 @@ static void timezone_database_install_cb(GtkWidget *widget, gpointer data)
                generic_dialog_add_message(tz->gd, GQ_ICON_DIALOG_INFO, _("Downloading timezone database"), nullptr, FALSE);
 
                tz->progress = gtk_progress_bar_new();
-               gtk_box_pack_start(GTK_BOX(tz->gd->vbox), tz->progress, FALSE, FALSE, 0);
+               gq_gtk_box_pack_start(GTK_BOX(tz->gd->vbox), tz->progress, FALSE, FALSE, 0);
                gtk_widget_show(tz->progress);
 
                gtk_widget_show(tz->gd->dialog);