Mercurial > hg > forks > geeqie
annotate src/options.c @ 2817:e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
https://github.com/BestImageViewer/geeqie/issues/624
An option on Select/Show File Filter (or the toolbar) to provide regular
expression file-filtering of the currently displayed folder.
author | Colin Clark <colin.clark@cclark.uk> |
---|---|
date | Wed, 15 Aug 2018 19:43:06 +0100 |
parents | 0ecd4885dc09 |
children | d0c6c5ae586b |
rev | line source |
---|---|
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
1 /* |
2350
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
2 * Copyright (C) 2008, 2016 The Geeqie Team - |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
3 * |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
4 * Authors: Vladimir Nadvornik, Laurent Monin |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
5 * |
2350
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
6 * This program is free software; you can redistribute it and/or modify |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
7 * it under the terms of the GNU General Public License as published by |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
8 * the Free Software Foundation; either version 2 of the License, or |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
9 * (at your option) any later version. |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
10 * |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
11 * This program is distributed in the hope that it will be useful, |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
14 * GNU General Public License for more details. |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
15 * |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
16 * You should have received a copy of the GNU General Public License along |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
17 * with this program; if not, write to the Free Software Foundation, Inc., |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2335
diff
changeset
|
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
19 |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
20 #include "main.h" |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
21 #include "options.h" |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
22 |
740
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
23 #include "bar_exif.h" |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
24 #include "editors.h" |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
25 #include "filefilter.h" |
612
a7932dffc6ff
Preserve last histogram modes.
Laurent Monin <geeqie@norz.org>
parents:
594
diff
changeset
|
26 #include "histogram.h" /* HCHAN_RGB */ |
619
2060eff74498
Initialize to correct value (OSD_SHOW_NOTHING instead of FALSE).
Laurent Monin <geeqie@norz.org>
parents:
612
diff
changeset
|
27 #include "image-overlay.h" /* OSD_SHOW_NOTHING */ |
740
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
28 #include "layout.h" |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
29 #include "layout_image.h" |
1019
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
30 #include "rcfile.h" |
740
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
31 #include "ui_bookmark.h" |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
32 #include "ui_fileops.h" |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
33 #include "window.h" |
612
a7932dffc6ff
Preserve last histogram modes.
Laurent Monin <geeqie@norz.org>
parents:
594
diff
changeset
|
34 |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
35 ConfOptions *init_options(ConfOptions *options) |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
36 { |
2752
829c6cb08dd9
Mnemonic text for marks
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
37 gint i; |
829c6cb08dd9
Mnemonic text for marks
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
38 |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
39 if (!options) options = g_new0(ConfOptions, 1); |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
40 |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
41 options->collections.rectangular_selection = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
42 |
1034
bd1fccd7aecd
adjusted default options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1019
diff
changeset
|
43 options->color_profile.enabled = TRUE; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
44 options->color_profile.input_type = 0; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
45 options->color_profile.screen_file = NULL; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
46 options->color_profile.use_image = TRUE; |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
47 options->color_profile.use_x11_screen_profile = TRUE; |
2386 | 48 options->color_profile.render_intent = 0; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
49 |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
50 options->dnd_icon_size = 48; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
51 options->duplicates_similarity_threshold = 99; |
2328
ad005c02001a
Allow to configure rotation invariance
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2301
diff
changeset
|
52 options->rot_invariant_sim = TRUE; |
2489
ab6a0d1bd821
Fix #477: similarity duplicate search
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
53 options->sort_totals = FALSE; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2164
diff
changeset
|
54 |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
55 options->file_filter.disable = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
56 options->file_filter.show_dot_directory = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
57 options->file_filter.show_hidden_files = FALSE; |
2265
15d51cf8ff3d
Allow to choose to show parent folder
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2221
diff
changeset
|
58 options->file_filter.show_parent_directory = TRUE; |
2301
dec8d9db5770
Fix #333 Renaming file extensions
Colin Clark <cclark@mcb.net>
parents:
2291
diff
changeset
|
59 options->file_filter.disable_file_extension_checks = FALSE; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
60 |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
61 options->save_window_positions = TRUE; |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
62 options->use_saved_window_positions_for_new_windows = FALSE; |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
63 options->tools_restore_state = TRUE; |
2741
fa71e9331b53
Bug fix: Option to display window ID
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
64 options->save_dialog_window_positions = FALSE; |
2740
808983eb036e
Option to display window ID
Colin Clark <colin.clark@cclark.uk>
parents:
2675
diff
changeset
|
65 options->show_window_ids = FALSE; |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
66 |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
67 options->file_ops.confirm_delete = TRUE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
68 options->file_ops.enable_delete_key = TRUE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
69 options->file_ops.enable_in_place_rename = TRUE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
70 options->file_ops.safe_delete_enable = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
71 options->file_ops.safe_delete_folder_maxsize = 128; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
72 options->file_ops.safe_delete_path = NULL; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
73 |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
74 options->file_sort.ascending = TRUE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
75 options->file_sort.case_sensitive = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
76 options->file_sort.method = SORT_NAME; |
2406 | 77 options->file_sort.natural = FALSE; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
78 |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
79 options->fullscreen.above = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
80 options->fullscreen.clean_flip = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
81 options->fullscreen.disable_saver = TRUE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
82 options->fullscreen.screen = -1; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
83 |
2750
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2741
diff
changeset
|
84 options->marks_save = TRUE; |
2769
ed8cc78cb9dd
Option to change default button for copy/move dialogs
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
85 options->with_rename = FALSE; |
2793 | 86 options->collections_on_top = FALSE; |
2750
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2741
diff
changeset
|
87 |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
88 memset(&options->image.border_color, 0, sizeof(options->image.border_color)); |
2457
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
89 memset(&options->image.alpha_color_1, 0, sizeof(options->image.alpha_color_1)); |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
90 memset(&options->image.alpha_color_2, 0, sizeof(options->image.alpha_color_2)); |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
91 /* alpha channel checkerboard background (same as gimp) */ |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
92 options->image.alpha_color_1.red = 0x009999; |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
93 options->image.alpha_color_1.green = 0x009999; |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
94 options->image.alpha_color_1.blue = 0x009999; |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
95 options->image.alpha_color_2.red = 0x006666; |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
96 options->image.alpha_color_2.green = 0x006666; |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
97 options->image.alpha_color_2.blue = 0x006666; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
98 options->image.enable_read_ahead = TRUE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
99 options->image.exif_rotate_enable = TRUE; |
2066
01d2c966209e
exif autorotate for proofs
Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
parents:
2043
diff
changeset
|
100 options->image.exif_proof_rotate_enable = TRUE; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
101 options->image.fit_window_to_image = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
102 options->image.limit_autofit_size = FALSE; |
1034
bd1fccd7aecd
adjusted default options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1019
diff
changeset
|
103 options->image.limit_window_size = TRUE; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
104 options->image.max_autofit_size = 100; |
2474
f591509cb3d3
Fix #123: Limit image expansion in Fit To Window
Colin Clark <colin.clark@cclark.uk>
parents:
2458
diff
changeset
|
105 options->image.max_enlargement_size = 900; |
1034
bd1fccd7aecd
adjusted default options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1019
diff
changeset
|
106 options->image.max_window_size = 90; |
1037
e7adeebbbe5d
fixed various problems with preserving viewport on image change,
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1034
diff
changeset
|
107 options->image.scroll_reset_method = SCROLL_RESET_NOCHANGE; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
108 options->image.tile_cache_max = 10; |
848
79fc2c215d64
cache size made configurable
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
825
diff
changeset
|
109 options->image.image_cache_max = 128; /* 4 x 10MPix */ |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
110 options->image.use_custom_border_color = FALSE; |
1644
2b10e2bee592
the options for custom border color were made independent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1626
diff
changeset
|
111 options->image.use_custom_border_color_in_fullscreen = TRUE; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
112 options->image.zoom_2pass = TRUE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
113 options->image.zoom_increment = 5; |
1034
bd1fccd7aecd
adjusted default options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1019
diff
changeset
|
114 options->image.zoom_mode = ZOOM_RESET_NONE; |
870
9934892744f7
Make better matching between options types in options.h and the rest of the code.
Laurent Monin <geeqie@norz.org>
parents:
848
diff
changeset
|
115 options->image.zoom_quality = GDK_INTERP_BILINEAR; |
1034
bd1fccd7aecd
adjusted default options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1019
diff
changeset
|
116 options->image.zoom_to_fit_allow_expand = FALSE; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
117 |
1336
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1329
diff
changeset
|
118 options->image_overlay.template_string = NULL; |
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1329
diff
changeset
|
119 options->image_overlay.x = 10; |
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1329
diff
changeset
|
120 options->image_overlay.y = -10; |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
121 options->image_overlay.font = NULL; |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
122 options->image_overlay.text_red = 0; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
123 options->image_overlay.text_green = 0; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
124 options->image_overlay.text_blue = 0; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
125 options->image_overlay.text_alpha = 255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
126 options->image_overlay.background_red = 240; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
127 options->image_overlay.background_green = 240; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
128 options->image_overlay.background_blue = 240; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
129 options->image_overlay.background_alpha = 210; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
130 |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
131 options->lazy_image_sync = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
132 options->mousewheel_scrolls = FALSE; |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
133 options->image_lm_click_nav = TRUE; |
2631
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2596
diff
changeset
|
134 options->image_l_click_video = FALSE; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2596
diff
changeset
|
135 options->image_l_click_video_editor = NULL; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
136 options->open_recent_list_maxsize = 10; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
137 options->place_dialogs_under_mouse = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
138 |
1034
bd1fccd7aecd
adjusted default options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1019
diff
changeset
|
139 options->progressive_key_scrolling = TRUE; |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
140 options->keyboard_scroll_step = 1; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2164
diff
changeset
|
141 |
1208
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1145
diff
changeset
|
142 options->metadata.enable_metadata_dirs = FALSE; |
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1145
diff
changeset
|
143 options->metadata.save_in_image_file = FALSE; |
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1145
diff
changeset
|
144 options->metadata.save_legacy_IPTC = FALSE; |
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1145
diff
changeset
|
145 options->metadata.warn_on_write_problems = TRUE; |
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1145
diff
changeset
|
146 options->metadata.save_legacy_format = FALSE; |
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1145
diff
changeset
|
147 options->metadata.sync_grouped_files = TRUE; |
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1145
diff
changeset
|
148 options->metadata.confirm_write = TRUE; |
1244
eeefa0f10d39
improved metadata preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
149 options->metadata.confirm_after_timeout = FALSE; |
eeefa0f10d39
improved metadata preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
150 options->metadata.confirm_timeout = 10; |
1208
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1145
diff
changeset
|
151 options->metadata.confirm_on_image_change = FALSE; |
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1145
diff
changeset
|
152 options->metadata.confirm_on_dir_change = TRUE; |
1590
32a63a57690f
use "keywords" instead of "tags" in option name, it is more consistent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
153 options->metadata.keywords_case_sensitive = FALSE; |
1567
ef3ca18df43f
added an option to write image orientation to the metadata
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
154 options->metadata.write_orientation = TRUE; |
2454
93d1c77a312b
Fix #147: Alternative format for sidecar extension
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2406
diff
changeset
|
155 options->metadata.sidecar_extended_name = FALSE; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2164
diff
changeset
|
156 |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
157 options->show_icon_names = TRUE; |
2771
3aa4c31b93ff
Show star rating in files pane
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
158 options->show_star_rating = FALSE; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
159 |
1034
bd1fccd7aecd
adjusted default options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1019
diff
changeset
|
160 options->slideshow.delay = 50; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
161 options->slideshow.random = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
162 options->slideshow.repeat = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
163 |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
164 options->thumbnails.cache_into_dirs = FALSE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
165 options->thumbnails.enable_caching = TRUE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
166 options->thumbnails.max_height = DEFAULT_THUMB_HEIGHT; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
167 options->thumbnails.max_width = DEFAULT_THUMB_WIDTH; |
870
9934892744f7
Make better matching between options types in options.h and the rest of the code.
Laurent Monin <geeqie@norz.org>
parents:
848
diff
changeset
|
168 options->thumbnails.quality = GDK_INTERP_TILES; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
169 options->thumbnails.spec_standard = TRUE; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
170 options->thumbnails.use_xvpics = TRUE; |
1060
54806f8e4af5
added option to use exif thumbnails
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1055
diff
changeset
|
171 options->thumbnails.use_exif = FALSE; |
2673
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
172 options->thumbnails.use_ft_metadata = TRUE; |
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
173 // options->thumbnails.use_ft_metadata_small = TRUE; |
2800
0ecd4885dc09
Bug fix: Collection preview
Colin Clark <colin.clark@cclark.uk>
parents:
2793
diff
changeset
|
174 options->thumbnails.collection_preview = 20; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
175 |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
176 options->tree_descend_subdirs = FALSE; |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
177 options->view_dir_list_single_click_enter = TRUE; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
178 options->update_on_time_change = TRUE; |
2662
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
179 options->clipboard_selection = PRIMARY; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2164
diff
changeset
|
180 |
1922
4f200abfccd7
set stereo.fixed default values to hdmi stereo standard
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
181 options->stereo.fixed_w = 1920; |
4f200abfccd7
set stereo.fixed default values to hdmi stereo standard
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
182 options->stereo.fixed_h = 1080; |
1891
25645af65caf
added fixed stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1809
diff
changeset
|
183 options->stereo.fixed_x1 = 0; |
1922
4f200abfccd7
set stereo.fixed default values to hdmi stereo standard
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
184 options->stereo.fixed_y1 = 0; |
1891
25645af65caf
added fixed stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1809
diff
changeset
|
185 options->stereo.fixed_x2 = 0; |
1922
4f200abfccd7
set stereo.fixed default values to hdmi stereo standard
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
186 options->stereo.fixed_y2 = 1125; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
187 |
2505
d01e5b8e80d9
Eliminate FIXME: Log window line limit
Colin Clark <colin.clark@cclark.uk>
parents:
2489
diff
changeset
|
188 options->log_window_lines = 1000; |
2508
a39331032807
Additional debug features
Colin Clark <colin.clark@cclark.uk>
parents:
2506
diff
changeset
|
189 options->log_window.line_wrap = TRUE; |
a39331032807
Additional debug features
Colin Clark <colin.clark@cclark.uk>
parents:
2506
diff
changeset
|
190 options->log_window.paused = FALSE; |
2596
9c435c86a296
Optional timer data in log window
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
191 options->log_window.timer_data = FALSE; |
2505
d01e5b8e80d9
Eliminate FIXME: Log window line limit
Colin Clark <colin.clark@cclark.uk>
parents:
2489
diff
changeset
|
192 |
2770
2e819f4a7a41
Read metadata in the idle loop
Colin Clark <colin.clark@cclark.uk>
parents:
2769
diff
changeset
|
193 options->read_metadata_in_idle = FALSE; |
2777
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2771
diff
changeset
|
194 options->star_rating.star = STAR_RATING_STAR; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2771
diff
changeset
|
195 options->star_rating.rejected = STAR_RATING_REJECTED; |
508
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
196 return options; |
a1b9ad02cf71
Move options stuff to options.{c,h} and remove globals.c
Laurent Monin <geeqie@norz.org>
parents:
diff
changeset
|
197 } |
740
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
198 |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
199 void setup_default_options(ConfOptions *options) |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
200 { |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
201 gchar *path; |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
202 gint i; |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
203 |
2291
eccae4bd9d18
Issue #329 easier way to get cwd when copying
Colin Clark <cclark@mcb.net>
parents:
2265
diff
changeset
|
204 bookmark_add_default(".", get_current_dir()); |
740
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
205 bookmark_add_default(_("Home"), homedir()); |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
206 path = g_build_filename(homedir(), "Desktop", NULL); |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
207 bookmark_add_default(_("Desktop"), path); |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
208 g_free(path); |
1145
94adf34fe826
Use functions to return directories instead of constants.
Laurent Monin <geeqie@norz.org>
parents:
1060
diff
changeset
|
209 bookmark_add_default(_("Collections"), get_collections_dir()); |
740
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
210 |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
211 g_free(options->file_ops.safe_delete_path); |
1145
94adf34fe826
Use functions to return directories instead of constants.
Laurent Monin <geeqie@norz.org>
parents:
1060
diff
changeset
|
212 options->file_ops.safe_delete_path = g_strdup(get_trash_dir()); |
740
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
213 |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
214 for (i = 0; i < COLOR_PROFILE_INPUTS; i++) |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
215 { |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
216 options->color_profile.input_file[i] = NULL; |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
217 options->color_profile.input_name[i] = NULL; |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
218 } |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
219 |
1336
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1329
diff
changeset
|
220 set_default_image_overlay_template_string(&options->image_overlay.template_string); |
1809
40850a3d4289
Add unknown file class to grouping
Klaus Ethgen <Klaus@Ethgen.de>
parents:
1802
diff
changeset
|
221 options->sidecar.ext = g_strdup(".jpg;%raw;.ufraw;.xmp;%unknown"); |
740
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
222 |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
223 options->shell.path = g_strdup(GQ_DEFAULT_SHELL_PATH); |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
224 options->shell.options = g_strdup(GQ_DEFAULT_SHELL_OPTIONS); |
2755
db7fa530da47
Bug fix: Mnemonic text for marks
Colin Clark <colin.clark@cclark.uk>
parents:
2752
diff
changeset
|
225 |
db7fa530da47
Bug fix: Mnemonic text for marks
Colin Clark <colin.clark@cclark.uk>
parents:
2752
diff
changeset
|
226 for (i = 0; i < FILEDATA_MARKS_SIZE; i++) |
db7fa530da47
Bug fix: Mnemonic text for marks
Colin Clark <colin.clark@cclark.uk>
parents:
2752
diff
changeset
|
227 { |
db7fa530da47
Bug fix: Mnemonic text for marks
Colin Clark <colin.clark@cclark.uk>
parents:
2752
diff
changeset
|
228 options->marks_tooltips[i] = g_strdup_printf("%s%d", _("Mark "), i + 1); |
db7fa530da47
Bug fix: Mnemonic text for marks
Colin Clark <colin.clark@cclark.uk>
parents:
2752
diff
changeset
|
229 } |
2756
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2755
diff
changeset
|
230 |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2755
diff
changeset
|
231 options->help_search_engine = g_strdup(HELP_SEARCH_ENGINE); |
740
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
232 } |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
233 |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
234 void copy_layout_options(LayoutOptions *dest, const LayoutOptions *src) |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
235 { |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
236 free_layout_options_content(dest); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2164
diff
changeset
|
237 |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
238 *dest = *src; |
1466
a8a7e7feeefc
added possibility to update existing layout window from config
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1436
diff
changeset
|
239 dest->id = g_strdup(src->id); |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
240 dest->order = g_strdup(src->order); |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
241 dest->home_path = g_strdup(src->home_path); |
1511
ce48bdc8350d
startup path options simplified and moved to layout options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1486
diff
changeset
|
242 dest->last_path = g_strdup(src->last_path); |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
243 } |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
244 |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
245 void free_layout_options_content(LayoutOptions *dest) |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
246 { |
1466
a8a7e7feeefc
added possibility to update existing layout window from config
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1436
diff
changeset
|
247 g_free(dest->id); |
a8a7e7feeefc
added possibility to update existing layout window from config
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1436
diff
changeset
|
248 g_free(dest->order); |
a8a7e7feeefc
added possibility to update existing layout window from config
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1436
diff
changeset
|
249 g_free(dest->home_path); |
1511
ce48bdc8350d
startup path options simplified and moved to layout options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1486
diff
changeset
|
250 g_free(dest->last_path); |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
251 } |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
252 |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
253 LayoutOptions *init_layout_options(LayoutOptions *options) |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
254 { |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
255 memset(options, 0, sizeof(LayoutOptions)); |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
256 |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
257 options->dir_view_type = DIRVIEW_LIST; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
258 options->file_view_type = FILEVIEW_LIST; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
259 options->float_window.h = 450; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
260 options->float_window.vdivider_pos = -1; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
261 options->float_window.w = 260; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
262 options->float_window.x = 0; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
263 options->float_window.y = 0; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
264 options->home_path = NULL; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
265 options->main_window.h = 540; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
266 options->main_window.hdivider_pos = -1; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
267 options->main_window.maximized = FALSE; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
268 options->main_window.vdivider_pos = 200; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
269 options->main_window.w = 720; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
270 options->main_window.x = 0; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
271 options->main_window.y = 0; |
2458 | 272 options->folder_window.vdivider_pos = 100; |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
273 options->order = g_strdup("123"); |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
274 options->show_directory_date = FALSE; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
275 options->show_marks = FALSE; |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2800
diff
changeset
|
276 options->show_file_filter = FALSE; |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
277 options->show_thumbnails = FALSE; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
278 options->style = 0; |
1584
c97dea5d82d7
improved pixel info, changed the menu entry from "Hide" to "Show",
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1567
diff
changeset
|
279 options->show_info_pixel = FALSE; |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
280 options->toolbar_hidden = FALSE; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
281 options->tools_float = FALSE; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
282 options->tools_hidden = FALSE; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
283 options->image_overlay.histogram_channel = HCHAN_RGB; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
284 options->image_overlay.histogram_mode = 1; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
285 options->image_overlay.state = OSD_SHOW_NOTHING; |
2675
5580d9c6e929
Addl fix #254: GIF animation support
Colin Clark <colin.clark@cclark.uk>
parents:
2673
diff
changeset
|
286 options->animate = TRUE; |
2506
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2505
diff
changeset
|
287 options->bars_state.hidden = FALSE; |
2508
a39331032807
Additional debug features
Colin Clark <colin.clark@cclark.uk>
parents:
2506
diff
changeset
|
288 options->log_window.w = 520; |
a39331032807
Additional debug features
Colin Clark <colin.clark@cclark.uk>
parents:
2506
diff
changeset
|
289 options->log_window.h = 400; |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
290 return options; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
291 } |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
292 |
1019
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
293 static void sync_options_with_current_state(ConfOptions *options) |
740
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
294 { |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
295 LayoutWindow *lw = NULL; |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
296 |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
297 if (layout_valid(&lw)) |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
298 { |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
299 layout_sync_options_with_current_state(lw); |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
300 layout_sort_get(lw, &options->file_sort.method, &options->file_sort.ascending); |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
301 |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
302 options->color_profile.enabled = layout_image_color_profile_get_use(lw); |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
303 layout_image_color_profile_get(lw, |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
304 &options->color_profile.input_type, |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
305 &options->color_profile.use_image); |
740
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
306 } |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
307 |
004aa8fe7914
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
638
diff
changeset
|
308 } |
1019
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
309 |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
310 void save_options(ConfOptions *options) |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
311 { |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
312 gchar *rc_path; |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
313 |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
314 sync_options_with_current_state(options); |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
315 |
1145
94adf34fe826
Use functions to return directories instead of constants.
Laurent Monin <geeqie@norz.org>
parents:
1060
diff
changeset
|
316 rc_path = g_build_filename(get_rc_dir(), RC_FILE_NAME, NULL); |
1484
f3b033a71fc9
improved sidebar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1466
diff
changeset
|
317 save_config_to_file(rc_path, options); |
1019
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
318 g_free(rc_path); |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
319 } |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
320 |
1313
29ff0de0a67e
enabled commandline again
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
321 gboolean load_options(ConfOptions *options) |
1019
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
322 { |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
323 gboolean success; |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
324 gchar *rc_path; |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
325 |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
326 if (isdir(GQ_SYSTEM_WIDE_DIR)) |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
327 { |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
328 rc_path = g_build_filename(GQ_SYSTEM_WIDE_DIR, RC_FILE_NAME, NULL); |
1484
f3b033a71fc9
improved sidebar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1466
diff
changeset
|
329 success = load_config_from_file(rc_path, TRUE); |
1019
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
330 DEBUG_1("Loading options from %s ... %s", rc_path, success ? "done" : "failed"); |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
331 g_free(rc_path); |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
332 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2164
diff
changeset
|
333 |
1145
94adf34fe826
Use functions to return directories instead of constants.
Laurent Monin <geeqie@norz.org>
parents:
1060
diff
changeset
|
334 rc_path = g_build_filename(get_rc_dir(), RC_FILE_NAME, NULL); |
1484
f3b033a71fc9
improved sidebar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1466
diff
changeset
|
335 success = load_config_from_file(rc_path, TRUE); |
1019
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
336 DEBUG_1("Loading options from %s ... %s", rc_path, success ? "done" : "failed"); |
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
337 g_free(rc_path); |
1313
29ff0de0a67e
enabled commandline again
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
338 return(success); |
1019
90fb159e5161
Move save/load_options() to options.[ch].
Laurent Monin <geeqie@norz.org>
parents:
1013
diff
changeset
|
339 } |
1055
4bbdfab3c89a
Adding a vim modeline to all files - patch by Klaus Ethgen
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1037
diff
changeset
|
340 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |