Local time - UTC offset and daylight saving correction
[geeqie.git] / src / preferences.c
index 6c29cde..d242f0f 100644 (file)
@@ -38,6 +38,7 @@
 #include "layout_util.h"
 #include "pixbuf_util.h"
 #include "slideshow.h"
+#include "toolbar.h"
 #include "trash.h"
 #include "utilops.h"
 #include "ui_fileops.h"
@@ -45,6 +46,7 @@
 #include "ui_tabcomp.h"
 #include "ui_utildlg.h"
 #include "window.h"
+#include "zonedetect.h"
 
 #include <math.h>
 
@@ -106,7 +108,8 @@ static gchar *format_class_list[] = {
        N_("Unknown"),
        N_("Image"),
        N_("RAW Image"),
-       N_("Metadata")
+       N_("Metadata"),
+       N_("Video")
        };
 
 /* config memory values */
@@ -139,21 +142,53 @@ static GtkWidget *sidecar_ext_entry;
  *-----------------------------------------------------------------------------
  */
 
-static void scroll_reset_cb(GtkWidget *widget, gpointer data)
+static void zoom_increment_cb(GtkWidget *spin, gpointer data)
 {
-       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
-               c_options->image.scroll_reset_method = GPOINTER_TO_INT(data);
+       c_options->image.zoom_increment = (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * 100.0 + 0.01);
 }
 
-static void zoom_increment_cb(GtkWidget *spin, gpointer data)
+static void slideshow_delay_hours_cb(GtkWidget *spin, gpointer data)
 {
-       c_options->image.zoom_increment = (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * 100.0 + 0.01);
+       gint mins_secs_tenths, delay;
+
+       mins_secs_tenths = c_options->slideshow.delay %
+                                               (3600 * SLIDESHOW_SUBSECOND_PRECISION);
+
+       delay = (gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) *
+                                                               (3600 * SLIDESHOW_SUBSECOND_PRECISION) +
+                                                               mins_secs_tenths);
+
+       c_options->slideshow.delay = delay > 0 ? delay : SLIDESHOW_MIN_SECONDS *
+                                                                                                       SLIDESHOW_SUBSECOND_PRECISION;
 }
 
-static void slideshow_delay_cb(GtkWidget *spin, gpointer data)
+static void slideshow_delay_minutes_cb(GtkWidget *spin, gpointer data)
 {
-       c_options->slideshow.delay = (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) *
-                                  (gdouble)SLIDESHOW_SUBSECOND_PRECISION + 0.01);
+       gint hours, secs_tenths, delay;
+
+       hours = c_options->slideshow.delay / (3600 * SLIDESHOW_SUBSECOND_PRECISION);
+       secs_tenths = c_options->slideshow.delay % (60 * SLIDESHOW_SUBSECOND_PRECISION);
+
+       delay = hours * (3600 * SLIDESHOW_SUBSECOND_PRECISION) +
+                                       (gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) *
+                                       (60 * SLIDESHOW_SUBSECOND_PRECISION) + secs_tenths);
+
+       c_options->slideshow.delay = delay > 0 ? delay : SLIDESHOW_MIN_SECONDS *
+                                                                                                       SLIDESHOW_SUBSECOND_PRECISION;
+}
+
+static void slideshow_delay_seconds_cb(GtkWidget *spin, gpointer data)
+{
+       gint hours_mins, delay;
+
+       hours_mins = c_options->slideshow.delay / (60 * SLIDESHOW_SUBSECOND_PRECISION);
+
+       delay = (hours_mins * (60 * SLIDESHOW_SUBSECOND_PRECISION)) +
+                                                       (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) *
+                                                       (gdouble)(SLIDESHOW_SUBSECOND_PRECISION) + 0.01);
+
+       c_options->slideshow.delay = delay > 0 ? delay : SLIDESHOW_MIN_SECONDS *
+                                                                                                       SLIDESHOW_SUBSECOND_PRECISION;
 }
 
 /*
@@ -221,6 +256,8 @@ static void config_window_apply(void)
        options->tools_restore_state = c_options->tools_restore_state;
        options->save_window_positions = c_options->save_window_positions;
        options->use_saved_window_positions_for_new_windows = c_options->use_saved_window_positions_for_new_windows;
+       options->save_dialog_window_positions = c_options->save_dialog_window_positions;
+       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;
        options->image.fit_window_to_image = c_options->image.fit_window_to_image;
@@ -247,6 +284,8 @@ static void config_window_apply(void)
        options->thumbnails.enable_caching = c_options->thumbnails.enable_caching;
        options->thumbnails.cache_into_dirs = c_options->thumbnails.cache_into_dirs;
        options->thumbnails.use_exif = c_options->thumbnails.use_exif;
+       options->thumbnails.use_ft_metadata = c_options->thumbnails.use_ft_metadata;
+//     options->thumbnails.use_ft_metadata_small = c_options->thumbnails.use_ft_metadata_small;
        options->thumbnails.spec_standard = c_options->thumbnails.spec_standard;
        options->metadata.enable_metadata_dirs = c_options->metadata.enable_metadata_dirs;
        options->file_filter.show_hidden_files = c_options->file_filter.show_hidden_files;
@@ -267,6 +306,8 @@ static void config_window_apply(void)
 
        options->mousewheel_scrolls = c_options->mousewheel_scrolls;
        options->image_lm_click_nav = c_options->image_lm_click_nav;
+       options->image_l_click_video = c_options->image_l_click_video;
+       options->image_l_click_video_editor = c_options->image_l_click_video_editor;
 
        options->file_ops.enable_in_place_rename = c_options->file_ops.enable_in_place_rename;
 
@@ -324,6 +365,7 @@ static void config_window_apply(void)
 
        options->open_recent_list_maxsize = c_options->open_recent_list_maxsize;
        options->dnd_icon_size = c_options->dnd_icon_size;
+       options->clipboard_selection = c_options->clipboard_selection;
 
        options->metadata.save_in_image_file = c_options->metadata.save_in_image_file;
        options->metadata.save_legacy_IPTC = c_options->metadata.save_legacy_IPTC;
@@ -393,6 +435,8 @@ static void config_window_apply(void)
                }
 
        if (accel_store) gtk_tree_model_foreach(GTK_TREE_MODEL(accel_store), accel_apply_cb, NULL);
+
+       toolbar_apply();
 }
 
 /*
@@ -422,8 +466,9 @@ static void config_window_help_cb(GtkWidget *widget, gpointer data)
        "GuideOptionsFiltering.html",
        "GuideOptionsMetadata.html",
        "GuideOptionsColor.html",
-       "GuideOptionsSteroa.html",
-       "GuideOptionsBehavior.html"
+       "GuideOptionsStereo.html",
+       "GuideOptionsBehavior.html",
+       "GuideOptionsToolbar.html"
        };
 
        i = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook));
@@ -485,6 +530,22 @@ static void quality_menu_cb(GtkWidget *combo, gpointer data)
                }
 }
 
+static void clipboard_selection_menu_cb(GtkWidget *combo, gpointer data)
+{
+       gint *option = data;
+
+       switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)))
+               {
+               case 0:
+               default:
+                       *option = PRIMARY;
+                       break;
+               case 1:
+                       *option = CLIPBOARD;
+                       break;
+               }
+}
+
 static void add_quality_menu(GtkWidget *table, gint column, gint row, const gchar *text,
                             guint option, guint *option_c)
 {
@@ -516,6 +577,33 @@ static void add_quality_menu(GtkWidget *table, gint column, gint row, const gcha
        gtk_widget_show(combo);
 }
 
+static void add_clipboard_selection_menu(GtkWidget *table, gint column, gint row, const gchar *text,
+                            gint option, gint *option_c)
+{
+       GtkWidget *combo;
+       gint current = 0;
+
+       *option_c = option;
+
+       pref_table_label(table, column, row, text, 0.0);
+
+       combo = gtk_combo_box_text_new();
+
+       gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("PRIMARY"));
+       if (option == PRIMARY) current = 0;
+       gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("CLIPBOARD"));
+       if (option == CLIPBOARD) current = 1;
+
+       gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current);
+
+       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_EXPAND | GTK_FILL, 0, 0, 0);
+       gtk_widget_show(combo);
+}
+
 static void thumb_size_menu_cb(GtkWidget *combo, gpointer data)
 {
        gint n;
@@ -704,6 +792,48 @@ static void add_stereo_mode_menu(GtkWidget *table, gint column, gint row, const
        gtk_widget_show(combo);
 }
 
+static void video_menu_cb(GtkWidget *combo, gpointer data)
+{
+       gchar **option = data;
+
+       EditorDescription *ed = g_list_nth_data(editor_list_get(), gtk_combo_box_get_active(GTK_COMBO_BOX(combo)));
+       *option = ed->key;
+}
+
+static void video_menu_populate(gpointer data, gpointer user_data)
+{
+       GtkWidget *combo = user_data;
+       EditorDescription *ed = data;
+
+       gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), ed->name);
+}
+
+static void add_video_menu(GtkWidget *table, gint column, gint row, const gchar *text,
+                            gchar *option, gchar **option_c)
+{
+       GtkWidget *combo;
+       gint current;
+/* use lists since they are sorted */
+       GList *eds = editor_list_get();
+
+       *option_c = option;
+
+       pref_table_label(table, column, row, text, 0.0);
+
+       combo = gtk_combo_box_text_new();
+       g_list_foreach(eds,video_menu_populate,(gpointer)combo);
+       current = option ? g_list_index(eds,g_hash_table_lookup(editors,option)): -1;
+
+       gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current);
+
+       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_EXPAND | GTK_FILL, 0, 0, 0);
+       gtk_widget_show(combo);
+}
+
 static void filter_store_populate(void)
 {
        GList *work;
@@ -1423,7 +1553,6 @@ static void cache_standard_cb(GtkWidget *widget, gpointer data)
                {
                c_options->thumbnails.spec_standard =FALSE;
                }
-               DEBUG_0("standard %d",c_options->thumbnails.spec_standard);
 }
 
 static void cache_geeqie_cb(GtkWidget *widget, gpointer data)
@@ -1437,7 +1566,6 @@ static void cache_geeqie_cb(GtkWidget *widget, gpointer data)
                {
                c_options->thumbnails.spec_standard =FALSE;
                }
-               DEBUG_0("geeqie %d",c_options->thumbnails.spec_standard);
 }
 
 static void cache_local_cb(GtkWidget *widget, gpointer data)
@@ -1465,6 +1593,8 @@ static void config_tab_general(GtkWidget *notebook)
        GtkWidget *ct_button;
        GtkWidget *table;
        GtkWidget *spin;
+       gint hours, minutes, remainder;
+       gdouble seconds;
 
        vbox = scrolled_notebook_page(notebook, _("General"));
 
@@ -1503,13 +1633,39 @@ static void config_tab_general(GtkWidget *notebook)
        pref_checkbox_new_int(group, _("Use EXIF thumbnails when available (EXIF thumbnails may be outdated)"),
                              options->thumbnails.use_exif, &c_options->thumbnails.use_exif);
 
+#ifdef 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);
+
+//     pref_checkbox_new_int(group, _("Ignore embedded metadata if size is too small"),
+//                           options->thumbnails.use_ft_metadata_small, &c_options->thumbnails.use_ft_metadata_small);
+#endif
+
        group = pref_group_new(vbox, FALSE, _("Slide show"), GTK_ORIENTATION_VERTICAL);
 
        c_options->slideshow.delay = options->slideshow.delay;
-       spin = pref_spin_new(group, _("Delay between image change:"), _("seconds"),
-                            SLIDESHOW_MIN_SECONDS, SLIDESHOW_MAX_SECONDS, 1.0, 1,
-                            options->slideshow.delay ? (gdouble)options->slideshow.delay / SLIDESHOW_SUBSECOND_PRECISION : 10.0,
-                            G_CALLBACK(slideshow_delay_cb), NULL);
+       hours = options->slideshow.delay / (3600 * SLIDESHOW_SUBSECOND_PRECISION);
+       remainder = options->slideshow.delay % (3600 * SLIDESHOW_SUBSECOND_PRECISION);
+       minutes = remainder / (60 * SLIDESHOW_SUBSECOND_PRECISION);
+       seconds = (gdouble)(remainder % (60 * SLIDESHOW_SUBSECOND_PRECISION)) /
+                                                                                       SLIDESHOW_SUBSECOND_PRECISION;
+
+       hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
+
+       spin = pref_spin_new(hbox, _("Delay between image change hrs:mins:secs.dec"), NULL,
+                                                                               0, 23, 1.0, 0,
+                                                                               options->slideshow.delay ? hours : 0.0,
+                                                                               G_CALLBACK(slideshow_delay_hours_cb), NULL);
+       gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS);
+       spin = pref_spin_new(hbox, ":" , NULL,
+                                                                               0, 59, 1.0, 0,
+                                                                               options->slideshow.delay ? minutes: 0.0,
+                                                                               G_CALLBACK(slideshow_delay_minutes_cb), NULL);
+       gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS);
+       spin = pref_spin_new(hbox, ":", NULL,
+                                                                               SLIDESHOW_MIN_SECONDS, 59, 1.0, 1,
+                                                                               options->slideshow.delay ? seconds : 10.0,
+                                                                               G_CALLBACK(slideshow_delay_seconds_cb), NULL);
        gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS);
 
        pref_checkbox_new_int(group, _("Random"), options->slideshow.random, &c_options->slideshow.random);
@@ -1547,9 +1703,7 @@ static void config_tab_image(GtkWidget *notebook)
 {
        GtkWidget *hbox;
        GtkWidget *vbox;
-       GtkWidget *vbox2;
        GtkWidget *group;
-       GtkWidget *button;
        GtkWidget *ct_button;
        GtkWidget *enlargement_button;
        GtkWidget *table;
@@ -1570,27 +1724,31 @@ static void config_tab_image(GtkWidget *notebook)
        pref_checkbox_new_int(group, _("Two pass rendering (apply HQ zoom and color correction in second pass)"),
                              options->image.zoom_2pass, &c_options->image.zoom_2pass);
 
+       c_options->image.zoom_increment = options->image.zoom_increment;
+       spin = pref_spin_new(group, _("Zoom increment:"), NULL,
+                            0.01, 4.0, 0.01, 2, (gdouble)options->image.zoom_increment / 100.0,
+                            G_CALLBACK(zoom_increment_cb), NULL);
+       gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS);
+
+       group = pref_group_new(vbox, FALSE, _("Fit image to window"), GTK_ORIENTATION_VERTICAL);
+
        hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
-       enlargement_button = pref_checkbox_new_int(hbox, _("Allow enlargement of image for zoom to fit (max. size in %)"),
+       enlargement_button = pref_checkbox_new_int(hbox, _("Allow enlargement of image (max. size in %)"),
                              options->image.zoom_to_fit_allow_expand, &c_options->image.zoom_to_fit_allow_expand);
        spin = pref_spin_new_int(hbox, NULL, NULL,
                                 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."));
 
        hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
-       ct_button = pref_checkbox_new_int(hbox, _("Limit image size when autofitting (% of 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, NULL, NULL,
                                 10, 150, 1,
                                 options->image.max_autofit_size, &c_options->image.max_autofit_size);
        pref_checkbox_link_sensitivity(ct_button, spin);
-
-       c_options->image.zoom_increment = options->image.zoom_increment;
-       spin = pref_spin_new(group, _("Zoom increment:"), NULL,
-                            0.01, 4.0, 0.01, 2, (gdouble)options->image.zoom_increment / 100.0,
-                            G_CALLBACK(zoom_increment_cb), NULL);
-       gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS);
+       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, _("Appearance"), GTK_ORIENTATION_VERTICAL);
 
@@ -1647,6 +1805,12 @@ static void config_tab_windows(GtkWidget *notebook)
        pref_checkbox_new_int(group, _("Remember tool state (float/hidden)"),
                              options->tools_restore_state, &c_options->tools_restore_state);
 
+       pref_checkbox_new_int(group, _("Remember dialog window positions"),
+                             options->save_dialog_window_positions, &c_options->save_dialog_window_positions);
+
+       pref_checkbox_new_int(group, _("Show window IDs"),
+                             options->show_window_ids, &c_options->show_window_ids);
+
        group = pref_group_new(vbox, FALSE, _("Size"), GTK_ORIENTATION_VERTICAL);
 
        pref_checkbox_new_int(group, _("Fit window to image when tools are hidden/floating"),
@@ -1691,7 +1855,8 @@ static void config_tab_windows(GtkWidget *notebook)
        gtk_widget_set_tooltip_markup(image_overlay_template_view,
        _("<i>%name%</i> results in the filename of the picture.\n"
          "Also available: <i>%collection%</i>, <i>%number%</i>, <i>%total%</i>, <i>%date%</i>,\n"
-         "<i>%size%</i> (filesize), <i>%width%</i>, <i>%height%</i>, <i>%res%</i> (resolution)\n"
+         "<i>%size%</i> (filesize), <i>%width%</i>, <i>%height%</i>, <i>%res%</i> (resolution),\n"
+         "<i>%rating%</i>, <i>%keywords%</i>, <i>%comment%</i> (XMP), <i>%imagecomment%</i> (JPEG)\n"
          "To access exif data use the exif name, e. g. <i>%formatted.Camera%</i> is the formatted camera name,\n"
          "<i>%Exif.Photo.DateTimeOriginal%</i> the date of the original shot.\n"
          "<i>%formatted.Camera:20</i> notation will truncate the displayed data to 20 characters and will add 3 dots at the end to denote the truncation.\n"
@@ -2124,7 +2289,7 @@ static void config_tab_color(GtkWidget *notebook)
                gtk_widget_show(entry);
                color_profile_input_name_entry[i] = entry;
 
-               tabcomp = tab_completion_new(&entry, options->color_profile.input_file[i], NULL, NULL);
+               tabcomp = tab_completion_new(&entry, options->color_profile.input_file[i], NULL, ".icc", "ICC Files", NULL);
                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,
@@ -2144,7 +2309,7 @@ static void config_tab_color(GtkWidget *notebook)
 
        pref_table_label(table, 0, 0, _("Screen:"), 1.0);
        tabcomp = tab_completion_new(&color_profile_screen_file_entry,
-                                    options->color_profile.screen_file, NULL, NULL);
+                                    options->color_profile.screen_file, NULL, ".icc", "ICC Files", NULL);
        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
@@ -2167,6 +2332,7 @@ static void config_tab_behavior(GtkWidget *notebook)
        GtkWidget *tabcomp;
        GtkWidget *ct_button;
        GtkWidget *spin;
+       GtkWidget *table;
 
        vbox = scrolled_notebook_page(notebook, _("Behavior"));
 
@@ -2186,7 +2352,7 @@ static void config_tab_behavior(GtkWidget *notebook)
        pref_spacer(hbox, PREF_PAD_INDENT - PREF_PAD_SPACE);
        pref_label_new(hbox, _("Folder:"));
 
-       tabcomp = tab_completion_new(&safe_delete_path_entry, options->file_ops.safe_delete_path, NULL, NULL);
+       tabcomp = tab_completion_new(&safe_delete_path_entry, options->file_ops.safe_delete_path, NULL, NULL, NULL, NULL);
        tab_completion_add_select_button(safe_delete_path_entry, NULL, TRUE);
        gtk_box_pack_start(GTK_BOX(hbox), tabcomp, TRUE, TRUE, 0);
        gtk_widget_show(tabcomp);
@@ -2226,6 +2392,9 @@ static void config_tab_behavior(GtkWidget *notebook)
        pref_spin_new_int(group, _("Drag'n drop icon size"), NULL,
                          16, 256, 16, options->dnd_icon_size, &c_options->dnd_icon_size);
 
+       table = pref_table_new(group, 2, 1, FALSE, FALSE);
+       add_clipboard_selection_menu(table, 0, 0, _("Copy path clipboard selection:"), options->clipboard_selection, &c_options->clipboard_selection);
+
        group = pref_group_new(vbox, FALSE, _("Navigation"), GTK_ORIENTATION_VERTICAL);
 
        pref_checkbox_new_int(group, _("Progressive keyboard scrolling"),
@@ -2236,6 +2405,11 @@ static void config_tab_behavior(GtkWidget *notebook)
                              options->mousewheel_scrolls, &c_options->mousewheel_scrolls);
        pref_checkbox_new_int(group, _("Navigation by left or middle click on image"),
                              options->image_lm_click_nav, &c_options->image_lm_click_nav);
+       pref_checkbox_new_int(group, _("Play video by left click on image"),
+                             options->image_l_click_video, &c_options->image_l_click_video);
+       table = pref_table_new(group, 2, 1, FALSE, FALSE);
+       add_video_menu(table, 0, 0, _("Play with:"), options->image_l_click_video_editor, &c_options->image_l_click_video_editor);
+
 
 #ifdef DEBUG
        group = pref_group_new(vbox, FALSE, _("Debugging"), GTK_ORIENTATION_VERTICAL);
@@ -2243,6 +2417,9 @@ static void config_tab_behavior(GtkWidget *notebook)
        pref_spin_new_int(group, _("Debug level:"), NULL,
                          DEBUG_LEVEL_MIN, DEBUG_LEVEL_MAX, 1, get_debug_level(), &debug_c);
 
+       pref_checkbox_new_int(group, _("Timer data"),
+                       options->log_window.timer_data, &c_options->log_window.timer_data);
+
        pref_spin_new_int(group, _("Log Window max. lines:"), NULL,
                          1, 99999, 1, options->log_window_lines, &options->log_window_lines);
 #endif
@@ -2352,6 +2529,22 @@ static void config_tab_accelerators(GtkWidget *notebook)
        gtk_widget_show(button);
 }
 
+/* toolbar tab */
+static void config_tab_toolbar(GtkWidget *notebook)
+{
+       GtkWidget *vbox;
+       GtkWidget *toolbardata;
+       LayoutWindow *lw;
+
+       lw = layout_window_list->data;
+
+       vbox = scrolled_notebook_page(notebook, _("Toolbar"));
+
+       toolbardata = toolbar_select_new(lw);
+       gtk_box_pack_start(GTK_BOX(vbox), toolbardata, TRUE, TRUE, 0);
+       gtk_widget_show(vbox);
+}
+
 /* stereo tab */
 static void config_tab_stereo(GtkWidget *notebook)
 {
@@ -2465,6 +2658,7 @@ static void config_window_create(void)
        config_tab_color(notebook);
        config_tab_stereo(notebook);
        config_tab_behavior(notebook);
+       config_tab_toolbar(notebook);
 
        hbox = gtk_hbutton_box_new();
        gtk_button_box_set_layout(GTK_BUTTON_BOX(hbox), GTK_BUTTONBOX_END);
@@ -2538,29 +2732,6 @@ void show_config_window(void)
  *-----------------
  */
 
-static GtkWidget *about = NULL;
-
-static gboolean about_delete_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
-{
-       gtk_widget_destroy(about);
-       about = NULL;
-
-       return TRUE;
-}
-
-static void about_window_close(GtkWidget *widget, gpointer data)
-{
-       if (!about) return;
-
-       gtk_widget_destroy(about);
-       about = NULL;
-}
-
-static void about_credits_cb(GtkWidget *widget, gpointer data)
-{
-       help_window_show("credits");
-}
-
 void show_about_window(LayoutWindow *lw)
 {
        GdkPixbuf *pixbuf_logo;
@@ -2569,26 +2740,24 @@ void show_about_window(LayoutWindow *lw)
        gchar *comment;
        gint i_authors = 0;
        gchar *path;
+       GString *copyright;
+       gchar *zd_path;
+       ZoneDetect *cd;
        FILE *fp = NULL;
 #define LINE_LENGTH 1000
        gchar line[LINE_LENGTH];
 
-#if !GTK_CHECK_VERSION(3,0,0)
-       GString *copyright;
-
        copyright = g_string_new(NULL);
-       path = g_build_filename(GQ_HELPDIR, "COPYING", NULL);
-       fp = fopen(path, "r");
-       if (fp)
+       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");
+
+       zd_path = g_build_filename(GQ_BIN_DIR, TIMEZONE_DATABASE, NULL);
+       cd = ZDOpenDatabase(zd_path);
+       if (cd)
                {
-               while(fgets(line, LINE_LENGTH, fp))
-                       {
-                       copyright = g_string_append(copyright, line);
-                       }
-               fclose(fp);
+               copyright = g_string_append(copyright, ZDGetNotice(cd));
                }
-       g_free(path);
-#endif
+       ZDCloseDatabase(cd);
+       g_free(zd_path);
 
        authors[0] = NULL;
        path = g_build_filename(GQ_HELPDIR, "AUTHORS", NULL);
@@ -2624,16 +2793,12 @@ void show_about_window(LayoutWindow *lw)
                "comments", comment,
                "authors", authors,
                "translator-credits", _("translator-credits"),
-#if GTK_CHECK_VERSION(3,0,0)
-               "license-type", GTK_LICENSE_GPL_2_0,
-#else
-               "license",  copyright->str,
-#endif
+               "wrap-license", TRUE,
+               "license", copyright->str,
                NULL);
 
-#if !GTK_CHECK_VERSION(3,0,0)
        g_string_free(copyright, TRUE);
-#endif
+
        gint n = 0;
        while(n < i_authors)
                {