/*
- * Geeqie
- * (C) 2006 John Ellis
- * Copyright (C) 2008 - 2012 The Geeqie Team
+ * Copyright (C) 2006 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
*
* Author: John Ellis
*
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
#include "main.h"
#include "preferences.h"
#define EDITOR_NAME_MAX_LENGTH 32
#define EDITOR_COMMAND_MAX_LENGTH 1024
+static void image_overlay_set_text_colours();
typedef struct _ThumbSize ThumbSize;
struct _ThumbSize
static void zoom_increment_cb(GtkWidget *spin, gpointer data)
{
- c_options->image.zoom_increment = (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * 10.0 + 0.01);
+ c_options->image.zoom_increment = (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * 100.0 + 0.01);
}
static void slideshow_delay_cb(GtkWidget *spin, gpointer data)
config_entry_to_option(safe_delete_path_entry, &options->file_ops.safe_delete_path, remove_trailing_slash);
if (options->file_filter.show_hidden_files != c_options->file_filter.show_hidden_files) refresh = TRUE;
+ 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_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;
options->file_ops.confirm_delete = c_options->file_ops.confirm_delete;
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;
-#if 0
- options->thumbnails.use_xvpics = c_options->thumbnails.use_xvpics;
-#endif
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;
+ options->file_filter.show_parent_directory = c_options->file_filter.show_parent_directory;
options->file_filter.show_dot_directory = c_options->file_filter.show_dot_directory;
+ 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_filter.disable = c_options->file_filter.disable;
if (c_options->image_overlay.template_string)
set_image_overlay_template_string(&options->image_overlay.template_string,
c_options->image_overlay.template_string);
-
+ if (c_options->image_overlay.font)
+ set_image_overlay_font_string(&options->image_overlay.font,
+ c_options->image_overlay.font);
+ options->image_overlay.text_red = c_options->image_overlay.text_red;
+ options->image_overlay.text_green = c_options->image_overlay.text_green;
+ options->image_overlay.text_blue = c_options->image_overlay.text_blue;
+ options->image_overlay.text_alpha = c_options->image_overlay.text_alpha;
+ options->image_overlay.background_red = c_options->image_overlay.background_red;
+ options->image_overlay.background_green = c_options->image_overlay.background_green;
+ options->image_overlay.background_blue = c_options->image_overlay.background_blue;
+ options->image_overlay.background_alpha = c_options->image_overlay.background_alpha;
options->update_on_time_change = c_options->update_on_time_change;
options->image.exif_rotate_enable = c_options->image.exif_rotate_enable;
options->image.exif_proof_rotate_enable = c_options->image.exif_proof_rotate_enable;
options->duplicates_similarity_threshold = c_options->duplicates_similarity_threshold;
+ options->rot_invariant_sim = c_options->rot_invariant_sim;
options->tree_descend_subdirs = c_options->tree_descend_subdirs;
options->color_profile.use_x11_screen_profile = c_options->color_profile.use_x11_screen_profile;
#endif
-#if 0
- for (i = 0; ExifUIList[i].key; i++)
- {
- ExifUIList[i].current = ExifUIList[i].temp;
- }
-
-#endif
image_options_sync();
if (refresh)
*option = PR_STEREO_ANAGLYPH_RC;
break;
case 2:
- *option = PR_STEREO_ANAGLYPH_GRAY;
+ *option = PR_STEREO_ANAGLYPH_GM;
break;
case 3:
- *option = PR_STEREO_ANAGLYPH_DB;
+ *option = PR_STEREO_ANAGLYPH_YB;
break;
case 4:
- *option = PR_STEREO_HORIZ;
+ *option = PR_STEREO_ANAGLYPH_GRAY_RC;
break;
case 5:
- *option = PR_STEREO_HORIZ | PR_STEREO_HALF;
+ *option = PR_STEREO_ANAGLYPH_GRAY_GM;
break;
case 6:
- *option = PR_STEREO_VERT;
+ *option = PR_STEREO_ANAGLYPH_GRAY_YB;
break;
case 7:
- *option = PR_STEREO_VERT | PR_STEREO_HALF;
+ *option = PR_STEREO_ANAGLYPH_DB_RC;
break;
case 8:
+ *option = PR_STEREO_ANAGLYPH_DB_GM;
+ break;
+ case 9:
+ *option = PR_STEREO_ANAGLYPH_DB_YB;
+ break;
+ case 10:
+ *option = PR_STEREO_HORIZ;
+ break;
+ case 11:
+ *option = PR_STEREO_HORIZ | PR_STEREO_HALF;
+ break;
+ case 12:
+ *option = PR_STEREO_VERT;
+ break;
+ case 13:
+ *option = PR_STEREO_VERT | PR_STEREO_HALF;
+ break;
+ case 14:
*option = PR_STEREO_FIXED;
break;
}
}
static void add_stereo_mode_menu(GtkWidget *table, gint column, gint row, const gchar *text,
- guint option, guint *option_c, gboolean add_fixed)
+ gint option, gint *option_c, gboolean add_fixed)
{
GtkWidget *combo;
gint current = 0;
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Red-Cyan"));
if (option & PR_STEREO_ANAGLYPH_RC) current = 1;
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Green-Magenta"));
+ if (option & PR_STEREO_ANAGLYPH_GM) current = 2;
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Yellow-Blue"));
+ if (option & PR_STEREO_ANAGLYPH_YB) current = 3;
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Gray Red-Cyan"));
- if (option & PR_STEREO_ANAGLYPH_GRAY) current = 2;
- gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Dubois"));
- if (option & PR_STEREO_ANAGLYPH_DB) current = 3;
+ if (option & PR_STEREO_ANAGLYPH_GRAY_RC) current = 4;
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Gray Green-Magenta"));
+ if (option & PR_STEREO_ANAGLYPH_GRAY_GM) current = 5;
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Gray Yellow-Blue"));
+ if (option & PR_STEREO_ANAGLYPH_GRAY_YB) current = 6;
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Dubois Red-Cyan"));
+ if (option & PR_STEREO_ANAGLYPH_DB_RC) current = 7;
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Dubois Green-Magenta"));
+ if (option & PR_STEREO_ANAGLYPH_DB_GM) current = 8;
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Dubois Yellow-Blue"));
+ if (option & PR_STEREO_ANAGLYPH_DB_YB) current = 9;
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Side by Side"));
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Side by Side Half size"));
- if (option & PR_STEREO_HORIZ)
+ if (option & PR_STEREO_HORIZ)
{
- current = 4;
- if (option & PR_STEREO_HALF) current = 5;
+ current = 10;
+ if (option & PR_STEREO_HALF) current = 11;
}
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Top - Bottom"));
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Top - Bottom Half size"));
- if (option & PR_STEREO_VERT)
+ if (option & PR_STEREO_VERT)
{
- current = 6;
- if (option & PR_STEREO_HALF) current = 7;
+ current = 12;
+ if (option & PR_STEREO_HALF) current = 13;
}
-
+
if (add_fixed)
{
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Fixed position"));
- if (option & PR_STEREO_FIXED) current = 8;
+ if (option & PR_STEREO_FIXED) current = 14;
}
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current);
help_window_show("overlay");
}
-#if GTK_CHECK_VERSION(2, 10, 0)
+static void image_overlay_set_font_cb(GtkWidget *widget, gpointer data)
+{
+#if GTK_CHECK_VERSION(3,4,0)
+ GtkWidget *dialog;
+ char *font;
+ PangoFontDescription *font_desc;
+
+ 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);
+
+ if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL)
+ {
+ font_desc = gtk_font_chooser_get_font_desc(GTK_FONT_CHOOSER(dialog));
+ font = pango_font_description_to_string(font_desc);
+ g_free(c_options->image_overlay.font);
+ c_options->image_overlay.font = g_strdup(font);
+ g_free(font);
+ }
+
+ gtk_widget_destroy(dialog);
+#else
+ const char *font;
+
+ font = gtk_font_button_get_font_name(GTK_FONT_BUTTON(widget));
+ c_options->image_overlay.font = g_strdup(font);
+#endif
+}
+
+static void image_overlay_set_text_colour_cb(GtkWidget *widget, gpointer data)
+{
+ GtkWidget *dialog;
+#if GTK_CHECK_VERSION(3,4,0)
+ 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)
+ {
+ 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_widget_destroy(dialog);
+#else
+ GdkColor colour;
+ GtkColorSelection *colorsel;
+
+ dialog = gtk_color_selection_dialog_new("Image Overlay Text Colour");
+ gtk_window_set_keep_above(GTK_WINDOW(dialog),TRUE);
+ colour.red = options->image_overlay.text_red*257;
+ colour.green = options->image_overlay.text_green*257;
+ colour.blue = options->image_overlay.text_blue*257;
+ colorsel = GTK_COLOR_SELECTION(gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dialog)));
+ gtk_color_selection_set_has_opacity_control(colorsel, TRUE);
+ gtk_color_selection_set_current_color(colorsel, &colour);
+ gtk_color_selection_set_current_alpha(colorsel, options->image_overlay.text_alpha*257);
+
+ if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK)
+ {
+ gtk_color_selection_get_current_color(colorsel, &colour);
+ c_options->image_overlay.text_red = colour.red/257;
+ c_options->image_overlay.text_green = colour.green/257;
+ c_options->image_overlay.text_blue = colour.blue/257;
+ c_options->image_overlay.text_alpha = gtk_color_selection_get_current_alpha(colorsel)/257;
+ }
+ gtk_widget_destroy (dialog);
+#endif
+}
+
+
+static void image_overlay_set_background_colour_cb(GtkWidget *widget, gpointer data)
+{
+ GtkWidget *dialog;
+#if GTK_CHECK_VERSION(3,4,0)
+ 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);
+ gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(dialog), TRUE);
+
+ if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL)
+ {
+ 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_widget_destroy(dialog);
+#else
+ GdkColor colour;
+ GtkColorSelection *colorsel;
+
+ dialog = gtk_color_selection_dialog_new("Image Overlay Background Colour");
+ gtk_window_set_keep_above(GTK_WINDOW(dialog),TRUE);
+ colour.red = options->image_overlay.background_red*257;
+ colour.green = options->image_overlay.background_green*257;
+ colour.blue = options->image_overlay.background_blue*257;
+ colorsel = GTK_COLOR_SELECTION(gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dialog)));
+ gtk_color_selection_set_has_opacity_control(colorsel, TRUE);
+ gtk_color_selection_set_current_color(colorsel, &colour);
+ gtk_color_selection_set_current_alpha(colorsel, options->image_overlay.background_alpha*257);
+
+ if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK)
+ {
+ gtk_color_selection_get_current_color(colorsel, &colour);
+ c_options->image_overlay.background_red = colour.red/257;
+ c_options->image_overlay.background_green = colour.green/257;
+ c_options->image_overlay.background_blue = colour.blue/257;
+ c_options->image_overlay.background_alpha = gtk_color_selection_get_current_alpha(colorsel)/257;
+ }
+ gtk_widget_destroy(dialog);
+#endif
+}
+
static void accel_store_populate(void)
{
LayoutWindow *lw;
gtk_tree_store_set(accel_store, iter, AE_KEY, "", -1);
}
-#if 0
-static void accel_remove_cb(GtkWidget *widget, gpointer data)
-{
- GtkTreeSelection *selection;
-
- if (!accel_store) return;
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(data));
- gtk_tree_selection_selected_foreach(selection, &accel_remove_selection, NULL);
-}
-#endif
-
void accel_reset_selection(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
{
GtkAccelKey key;
}
-#if 0
-static void accel_alternate_activate_cb(GtkWidget *widget, gpointer data)
-{
- gtk_action_activate((GtkAction*)data);
-}
-
-#define DUPL "-alt-"
-
-void accel_add_alt_selection(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
-{
- LayoutWindow *lw;
- GList *groups, *actions;
- GtkAction *action;
- GtkAccelKey key, *key2;
- GtkAccelMap *map;
- gchar *accel_path2, *accel;
- const gchar *accel_path;
- gint freeduplnum = 1;
- gint len;
- GClosure* closure;
- GtkAccelGroup *group;
- GtkAction *action_new, *action_new2;
- gchar *name, *accel_path_new, *accel_path_new2;
-
- if (!accel_store || !layout_window_list || !layout_window_list->data) return;
-
- gtk_tree_model_get(model, iter, AE_ACCEL, &accel_path2, -1);
- len = strlen(accel_path2);
-
- gtk_tree_store_clear(accel_store);
- lw = layout_window_list->data;
-
- g_assert(lw && lw->ui_manager);
- groups = gtk_ui_manager_get_action_groups(lw->ui_manager);
- group = gtk_ui_manager_get_accel_group(lw->ui_manager);
-
- while (groups)
- {
- actions = gtk_action_group_list_actions(GTK_ACTION_GROUP(groups->data));
- while (actions)
- {
- gchar *dupl;
- guint64 num;
-
- action = GTK_ACTION(actions->data);
- actions = actions->next;
-
- accel_path = gtk_action_get_accel_path(action);
- if (!accel_path) continue;
-
- dupl = g_strrstr(accel_path, DUPL);
-
- printf("D: %s %s %s\n", accel_path, accel_path2, dupl);
-
- if ((dupl && (len != (dupl - accel_path)) ) ||
- g_ascii_strncasecmp(accel_path, accel_path2, len) != 0)
- continue;
-
- if (dupl && (num = g_ascii_strtoull(dupl + strlen(DUPL), NULL, 10)) > 0 &&
- num > freeduplnum)
- {
- freeduplnum = num + 1;
- }
- else
- {
- closure = gtk_action_get_accel_closure(action);
- name = gtk_action_get_name(action);
- accel_path_new = g_strdup(accel_path);
- action_new2 = action;
- }
- }
- groups = groups->next;
- }
-
- action_new = gtk_action_new(name, NULL, NULL, NULL);
- gtk_action_set_accel_group(action_new, group);
-
- g_signal_connect(G_OBJECT(action_new), "activate",
- G_CALLBACK(accel_alternate_activate_cb), action_new2);
-
-// accel_path_new2 = g_strdup_printf("%s%s%d", accel_path_new, dupl, freeduplnum);
- g_free(accel_path_new);
-
- gtk_action_set_accel_path(action_new, accel_path_new);
-
-// gtk_tree_store_set(accel_store, iter, AE_KEY, "", -1);
- printf("D: %s\n", accel_path_new2);
-
- g_free(accel_path_new2);
- gtk_action_connect_accelerator(action_new);
-}
-
-static void accel_add_alt_cb(GtkWidget *widget, gpointer data)
-{
- GtkWidget *accel_view = data;
- GtkTreeSelection *selection;
-
- if (!accel_store) return;
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(data));
- gtk_tree_selection_selected_foreach(selection, &accel_add_alt_selection, NULL);
-}
-
-static void accel_default_ok_cb(GenericDialog *gd, gpointer data)
-{
- accel_store_populate();
-}
-
-#endif
-#endif
static GtkWidget *scrolled_notebook_page(GtkWidget *notebook, const gchar *title)
{
pref_checkbox_new_int(subgroup, _("Store thumbnails in '.thumbnails' folder, local to image folder (non-standard)"),
options->thumbnails.cache_into_dirs, &c_options->thumbnails.cache_into_dirs);
-#if 0
- pref_checkbox_new_int(subgroup, _("Use xvpics thumbnails when found (read only)"),
- options->thumbnails.use_xvpics, &c_options->thumbnails.use_xvpics);
-#endif
-
pref_checkbox_new_int(group, _("Use EXIF thumbnails when available (EXIF thumbnails may be outdated)"),
options->thumbnails.use_exif, &c_options->thumbnails.use_exif);
group = pref_group_new(vbox, FALSE, _("Image loading and caching"), GTK_ORIENTATION_VERTICAL);
-#if 0
- pref_spin_new_int(group, _("Offscreen cache size (Mb per image):"), NULL,
- 0, 128, 1, options->image.tile_cache_max, &c_options->image.tile_cache_max);
-#endif
-
pref_spin_new_int(group, _("Decoded image cache size (Mb):"), NULL,
0, 1024, 1, options->image.image_cache_max, &c_options->image.image_cache_max);
pref_checkbox_new_int(group, _("Preload next image"),
c_options->image.zoom_increment = options->image.zoom_increment;
spin = pref_spin_new(group, _("Zoom increment:"), NULL,
- 0.1, 4.0, 0.1, 1, (gdouble)options->image.zoom_increment / 10.0,
+ 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);
image_overlay_template_view = gtk_text_view_new();
-#if GTK_CHECK_VERSION(2,12,0)
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>%formatted.ShutterSpeed%</i>|<i>%formatted.ISOSpeedRating%</i>|<i>%formatted.FocalLength%</i> could show \"1/20s - 400 - 80 mm\" or \"1/200 - 80 mm\",\n"
"if there's no ISO information in the Exif data.\n"
"If a line is empty, it is removed. This allows one to add lines that totally disappear when no data is available.\n"
-));
-#endif
+ ));
gtk_container_add(GTK_CONTAINER(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);
+#if GTK_CHECK_VERSION(3,4,0)
+ button = pref_button_new(NULL, GTK_STOCK_SELECT_FONT, _("Font"), FALSE,
+ G_CALLBACK(image_overlay_set_font_cb), notebook);
+#else
+ button = gtk_font_button_new();
+ gtk_font_button_set_title(GTK_FONT_BUTTON(button), "Image Overlay Font");
+ gtk_font_button_set_font_name(GTK_FONT_BUTTON(button), options->image_overlay.font);
+ g_signal_connect(G_OBJECT(button), "font-set",
+ G_CALLBACK(image_overlay_set_font_cb),NULL);
+#endif
+ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show(button);
+
+ button = pref_button_new(NULL, GTK_STOCK_COLOR_PICKER, _("Text"), FALSE,
+ G_CALLBACK(image_overlay_set_text_colour_cb), NULL);
+ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show(button);
+
+ button = pref_button_new(NULL, GTK_STOCK_COLOR_PICKER, _("Background"), FALSE,
+ G_CALLBACK(image_overlay_set_background_colour_cb), NULL);
+ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show(button);
+ image_overlay_set_text_colours();
+
button = pref_button_new(NULL, NULL, _("Defaults"), FALSE,
G_CALLBACK(image_overlay_default_template_cb), image_overlay_template_view);
gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
pref_checkbox_new_int(group, _("Show hidden files or folders"),
options->file_filter.show_hidden_files, &c_options->file_filter.show_hidden_files);
-#if 0
- pref_checkbox_new_int(group, _("Show dot directory"),
- options->file_filter.show_dot_directory, &c_options->file_filter.show_dot_directory);
-#endif
+ 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, _("Disable file extension checks"),
+ options->file_filter.disable_file_extension_checks, &c_options->file_filter.disable_file_extension_checks);
ct_button = pref_checkbox_new_int(group, _("Disable File Filtering"),
options->file_filter.disable, &c_options->file_filter.disable);
entry = gtk_entry_new();
gtk_entry_set_max_length(GTK_ENTRY(entry), EDITOR_NAME_MAX_LENGTH);
-// gtk_widget_set_size_request(editor_name_entry[i], 30, -1);
if (options->color_profile.input_name[i])
{
gtk_entry_set_text(GTK_ENTRY(entry), options->color_profile.input_name[i]);
pref_spacer(hbox, PREF_PAD_INDENT - PREF_PAD_GAP);
spin = pref_spin_new_int(hbox, _("Maximum size:"), _("MB"),
0, 2048, 1, options->file_ops.safe_delete_folder_maxsize, &c_options->file_ops.safe_delete_folder_maxsize);
-#if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_markup(spin, _("Set to 0 for unlimited size"));
-#endif
button = pref_button_new(NULL, NULL, _("View"), FALSE,
G_CALLBACK(safe_delete_view_cb), NULL);
gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
pref_checkbox_new_int(group, _("Mouse wheel scrolls image"),
options->mousewheel_scrolls, &c_options->mousewheel_scrolls);
- group = pref_group_new(vbox, FALSE, _("Miscellaneous"), GTK_ORIENTATION_VERTICAL);
+ group = pref_group_new(vbox, FALSE, _("Similarities"), GTK_ORIENTATION_VERTICAL);
pref_spin_new_int(group, _("Custom similarity threshold:"), NULL,
0, 100, 1, options->duplicates_similarity_threshold, (int *)&c_options->duplicates_similarity_threshold);
-
+ pref_checkbox_new_int(group, _("Rotation invariant duplicate check"),
+ options->rot_invariant_sim, &c_options->rot_invariant_sim);
#ifdef DEBUG
group = pref_group_new(vbox, FALSE, _("Debugging"), GTK_ORIENTATION_VERTICAL);
/* accelerators tab */
static void config_tab_accelerators(GtkWidget *notebook)
{
-#if GTK_CHECK_VERSION(2, 10, 0)
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *group;
gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
gtk_widget_show(button);
-#if 0
- button = pref_button_new(NULL, GTK_STOCK_REMOVE, NULL, FALSE,
- G_CALLBACK(accel_remove_cb), accel_view);
- gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
- gtk_widget_show(button);
-#endif
-
button = pref_button_new(NULL, NULL, _("Reset selected"), FALSE,
G_CALLBACK(accel_reset_cb), accel_view);
gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
gtk_widget_show(button);
-
-#if 0
- button = pref_button_new(NULL, _("Add Alt"), NULL, FALSE,
- G_CALLBACK(accel_add_alt_cb), accel_view);
- gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
- gtk_widget_show(button);
-#endif
-#endif
}
/* stereo tab */
buf = g_strdup_printf(_("%s %s\n\nCopyright (c) 2006 John Ellis\nCopyright (c) %s The Geeqie Team\nwebsite: %s\nemail: %s\n\nReleased under the GNU General Public License"),
GQ_APPNAME,
VERSION,
- "2008 - 2012",
+ "2008 - 2016",
GQ_WEBSITE,
GQ_EMAIL_ADDRESS);
label = gtk_label_new(buf);
gtk_widget_show(about);
}
+
+static void image_overlay_set_text_colours()
+{
+ 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;
+ 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;
+}
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */