Mercurial > hg > forks > geeqie
annotate src/layout_util.c @ 2824:c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
https://github.com/BestImageViewer/geeqie/issues/305
Keyword autocompletion - see the Info Sidebar section in the Help file
for details
author | Colin Clark <colin.clark@cclark.uk> |
---|---|
date | Sun, 26 Aug 2018 13:32:42 +0100 |
parents | f1c975235feb |
children | e88128f85953 |
rev | line source |
---|---|
9 | 1 /* |
2350
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
2 * Copyright (C) 2004 John Ellis |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
3 * Copyright (C) 2008 - 2016 The Geeqie Team |
9 | 4 * |
5 * Author: John Ellis | |
6 * | |
2350
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
7 * This program is free software; you can redistribute it and/or modify |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
8 * 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:
2340
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
10 * (at your option) any later version. |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
11 * |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
15 * GNU General Public License for more details. |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
16 * |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
17 * 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:
2340
diff
changeset
|
18 * with this program; if not, write to the Free Software Foundation, Inc., |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2340
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
9 | 20 */ |
21 | |
281 | 22 #include "main.h" |
9 | 23 #include "layout_util.h" |
24 | |
1293
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
25 #include "advanced_exif.h" |
9 | 26 #include "bar_sort.h" |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
27 #include "bar.h" |
2824
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
28 #include "bar_keywords.h" |
9 | 29 #include "cache_maint.h" |
30 #include "collect.h" | |
31 #include "collect-dlg.h" | |
457
7e4db6824ad8
Add a replacement for gtk_radio_action_set_current_value() which
Laurent Monin <geeqie@norz.org>
parents:
454
diff
changeset
|
32 #include "compat.h" |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
33 #include "color-man.h" |
9 | 34 #include "dupe.h" |
35 #include "editors.h" | |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
571
diff
changeset
|
36 #include "filedata.h" |
902
ee3a7b7dbc33
Move history_list_*() functions to separate files:
Laurent Monin <geeqie@norz.org>
parents:
894
diff
changeset
|
37 #include "history_list.h" |
284
8dae20c78d18
Fix missing header files inclusions.
Laurent Monin <geeqie@norz.org>
parents:
281
diff
changeset
|
38 #include "image-overlay.h" |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
39 #include "histogram.h" |
94
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
40 #include "img-view.h" |
9 | 41 #include "layout_image.h" |
678
fbb7a20c06b7
Add a log window that shows normal and debug messages. For now, it was added to Help menu.
Laurent Monin <geeqie@norz.org>
parents:
654
diff
changeset
|
42 #include "logwindow.h" |
1022
d09059a8b243
Move miscellaneous functions to their own files (new misc.[ch]).
Laurent Monin <geeqie@norz.org>
parents:
1004
diff
changeset
|
43 #include "misc.h" |
12
8e6d90233b6d
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
44 #include "pan-view.h" |
9 | 45 #include "pixbuf_util.h" |
46 #include "preferences.h" | |
47 #include "print.h" | |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
48 #include "rcfile.h" |
9 | 49 #include "search.h" |
2590
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
50 #include "slideshow.h" |
9 | 51 #include "ui_fileops.h" |
52 #include "ui_menu.h" | |
53 #include "ui_misc.h" | |
54 #include "ui_tabcomp.h" | |
1022
d09059a8b243
Move miscellaneous functions to their own files (new misc.[ch]).
Laurent Monin <geeqie@norz.org>
parents:
1004
diff
changeset
|
55 #include "utilops.h" |
380
41079d11eba7
Introduce a new struct ViewDir to handle directory views common
Laurent Monin <geeqie@norz.org>
parents:
343
diff
changeset
|
56 #include "view_dir.h" |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
57 #include "view_file.h" |
648
36e8da5a771d
Move some functions from main.[ch] to new window.[ch].
Laurent Monin <geeqie@norz.org>
parents:
601
diff
changeset
|
58 #include "window.h" |
1214
1e36edfd2a43
write metadata after timeout, image change or dir change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1176
diff
changeset
|
59 #include "metadata.h" |
1479
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
60 #include "desktop_file.h" |
9 | 61 |
62 #include <gdk/gdkkeysyms.h> /* for keyboard values */ | |
2362 | 63 #include "keymap_template.c" |
9 | 64 |
65 #define MENU_EDIT_ACTION_OFFSET 16 | |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
66 #define FILE_COLUMN_POINTER 0 |
9 | 67 |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
68 static gboolean layout_bar_enabled(LayoutWindow *lw); |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
69 static gboolean layout_bar_sort_enabled(LayoutWindow *lw); |
2506
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
70 static void layout_bars_hide_toggle(LayoutWindow *lw); |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
71 static void layout_util_sync_views(LayoutWindow *lw); |
9 | 72 |
73 /* | |
74 *----------------------------------------------------------------------------- | |
75 * keyboard handler | |
76 *----------------------------------------------------------------------------- | |
77 */ | |
78 | |
79 static guint tree_key_overrides[] = { | |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
80 GDK_KEY_Page_Up, GDK_KEY_KP_Page_Up, |
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
81 GDK_KEY_Page_Down, GDK_KEY_KP_Page_Down, |
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
82 GDK_KEY_Home, GDK_KEY_KP_Home, |
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
83 GDK_KEY_End, GDK_KEY_KP_End |
9 | 84 }; |
85 | |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
731
diff
changeset
|
86 static gboolean layout_key_match(guint keyval) |
9 | 87 { |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
731
diff
changeset
|
88 guint i; |
9 | 89 |
90 for (i = 0; i < sizeof(tree_key_overrides) / sizeof(guint); i++) | |
91 { | |
92 if (keyval == tree_key_overrides[i]) return TRUE; | |
93 } | |
94 | |
95 return FALSE; | |
96 } | |
97 | |
1433
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
98 gboolean layout_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) |
9 | 99 { |
100 LayoutWindow *lw = data; | |
2042
c3b477b5aec1
fixed keyboard controll of image widget
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2036
diff
changeset
|
101 GtkWidget *focused; |
1433
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
102 gboolean stop_signal = FALSE; |
9 | 103 gint x = 0; |
104 gint y = 0; | |
105 | |
1810
c3a79dda8ea7
GTK marks several functions as deprecated
Klaus Ethgen <Klaus@Ethgen.de>
parents:
1802
diff
changeset
|
106 if (lw->path_entry && gtk_widget_has_focus(lw->path_entry)) |
9 | 107 { |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
108 if (event->keyval == GDK_KEY_Escape && lw->dir_fd) |
9 | 109 { |
783
0e45ed008a1c
replaced directory path with FileData* dir_fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
753
diff
changeset
|
110 gtk_entry_set_text(GTK_ENTRY(lw->path_entry), lw->dir_fd->path); |
9 | 111 } |
112 | |
113 /* the gtkaccelgroup of the window is stealing presses before they get to the entry (and more), | |
114 * so when the some widgets have focus, give them priority (HACK) | |
115 */ | |
116 if (gtk_widget_event(lw->path_entry, (GdkEvent *)event)) | |
117 { | |
118 return TRUE; | |
119 } | |
120 } | |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
121 |
2818
f1c975235feb
Bug fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2817
diff
changeset
|
122 if (lw->vf->file_filter.combo && gtk_widget_has_focus(gtk_bin_get_child(GTK_BIN(lw->vf->file_filter.combo)))) |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
123 { |
2818
f1c975235feb
Bug fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2817
diff
changeset
|
124 if (gtk_widget_event(gtk_bin_get_child(GTK_BIN(lw->vf->file_filter.combo)), (GdkEvent *)event)) |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
125 { |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
126 return TRUE; |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
127 } |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
128 } |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
129 |
1810
c3a79dda8ea7
GTK marks several functions as deprecated
Klaus Ethgen <Klaus@Ethgen.de>
parents:
1802
diff
changeset
|
130 if (lw->vd && lw->options.dir_view_type == DIRVIEW_TREE && gtk_widget_has_focus(lw->vd->view) && |
9 | 131 !layout_key_match(event->keyval) && |
380
41079d11eba7
Introduce a new struct ViewDir to handle directory views common
Laurent Monin <geeqie@norz.org>
parents:
343
diff
changeset
|
132 gtk_widget_event(lw->vd->view, (GdkEvent *)event)) |
9 | 133 { |
134 return TRUE; | |
135 } | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
136 if (lw->bar && |
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
137 bar_event(lw->bar, (GdkEvent *)event)) |
9 | 138 { |
139 return TRUE; | |
140 } | |
141 | |
2042
c3b477b5aec1
fixed keyboard controll of image widget
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2036
diff
changeset
|
142 focused = gtk_container_get_focus_child(GTK_CONTAINER(lw->image->widget)); |
9 | 143 if (lw->image && |
2129
88f4e906cd37
Add parenthesis to silent a possible warning.
Laurent Monin <zas@norz.org>
parents:
2095
diff
changeset
|
144 ((focused && gtk_widget_has_focus(focused)) || (lw->tools && widget == lw->window) || lw->full_screen) ) |
9 | 145 { |
84
34319746590d
Fri Oct 20 08:00:08 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
82
diff
changeset
|
146 stop_signal = TRUE; |
9 | 147 switch (event->keyval) |
148 { | |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
149 case GDK_KEY_Left: case GDK_KEY_KP_Left: |
9 | 150 x -= 1; |
151 break; | |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
152 case GDK_KEY_Right: case GDK_KEY_KP_Right: |
9 | 153 x += 1; |
154 break; | |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
155 case GDK_KEY_Up: case GDK_KEY_KP_Up: |
9 | 156 y -= 1; |
157 break; | |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
158 case GDK_KEY_Down: case GDK_KEY_KP_Down: |
9 | 159 y += 1; |
160 break; | |
84
34319746590d
Fri Oct 20 08:00:08 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
82
diff
changeset
|
161 default: |
34319746590d
Fri Oct 20 08:00:08 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
82
diff
changeset
|
162 stop_signal = FALSE; |
9 | 163 break; |
164 } | |
94
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
165 |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
166 if (!stop_signal && |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
167 !(event->state & GDK_CONTROL_MASK)) |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
168 { |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
169 stop_signal = TRUE; |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
170 switch (event->keyval) |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
171 { |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
172 case GDK_KEY_Menu: |
94
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
173 layout_image_menu_popup(lw); |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
174 break; |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
175 default: |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
176 stop_signal = FALSE; |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
177 break; |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
178 } |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
179 } |
9 | 180 } |
181 | |
182 if (x != 0 || y!= 0) | |
183 { | |
2736
83c5953c719d
Fix #599: Shift + Direction is not accelerated in image viewer like help file suggests
Colin Clark <colin.clark@cclark.uk>
parents:
2726
diff
changeset
|
184 if (event->state & GDK_SHIFT_MASK) |
83c5953c719d
Fix #599: Shift + Direction is not accelerated in image viewer like help file suggests
Colin Clark <colin.clark@cclark.uk>
parents:
2726
diff
changeset
|
185 { |
83c5953c719d
Fix #599: Shift + Direction is not accelerated in image viewer like help file suggests
Colin Clark <colin.clark@cclark.uk>
parents:
2726
diff
changeset
|
186 x *= 3; |
83c5953c719d
Fix #599: Shift + Direction is not accelerated in image viewer like help file suggests
Colin Clark <colin.clark@cclark.uk>
parents:
2726
diff
changeset
|
187 y *= 3; |
83c5953c719d
Fix #599: Shift + Direction is not accelerated in image viewer like help file suggests
Colin Clark <colin.clark@cclark.uk>
parents:
2726
diff
changeset
|
188 } |
9 | 189 keyboard_scroll_calc(&x, &y, event); |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
190 layout_image_scroll(lw, x, y, (event->state & GDK_SHIFT_MASK)); |
9 | 191 } |
192 | |
193 return stop_signal; | |
194 } | |
195 | |
196 void layout_keyboard_init(LayoutWindow *lw, GtkWidget *window) | |
197 { | |
198 g_signal_connect(G_OBJECT(window), "key_press_event", | |
199 G_CALLBACK(layout_key_press_cb), lw); | |
200 } | |
201 | |
202 /* | |
203 *----------------------------------------------------------------------------- | |
204 * menu callbacks | |
205 *----------------------------------------------------------------------------- | |
206 */ | |
442 | 207 |
208 | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
209 static GtkWidget *layout_window(LayoutWindow *lw) |
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
210 { |
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
211 return lw->full_screen ? lw->full_screen->window : lw->window; |
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
212 } |
9 | 213 |
894 | 214 static void layout_exit_fullscreen(LayoutWindow *lw) |
215 { | |
216 if (!lw->full_screen) return; | |
217 layout_image_full_screen_stop(lw); | |
218 } | |
219 | |
2739
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
220 LayoutWindow *layout_menu_new_window(GtkAction *action, gpointer data) |
9 | 221 { |
222 LayoutWindow *lw = data; | |
223 LayoutWindow *nw; | |
1472
3eb241afb6c6
do not copy existing layout id to new window
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1470
diff
changeset
|
224 LayoutOptions lop; |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
225 gboolean tmp = options->save_window_positions; |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2362
diff
changeset
|
226 |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2362
diff
changeset
|
227 if (!options->use_saved_window_positions_for_new_windows) |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2362
diff
changeset
|
228 options->save_window_positions = FALSE; /* let the windowmanager decide for the first time */ |
1472
3eb241afb6c6
do not copy existing layout id to new window
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1470
diff
changeset
|
229 |
894 | 230 layout_exit_fullscreen(lw); |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
231 |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
232 layout_sync_options_with_current_state(lw); |
1472
3eb241afb6c6
do not copy existing layout id to new window
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1470
diff
changeset
|
233 lop = lw->options; /* we can copy it directly, no strings are modified */ |
3eb241afb6c6
do not copy existing layout id to new window
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1470
diff
changeset
|
234 |
3eb241afb6c6
do not copy existing layout id to new window
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1470
diff
changeset
|
235 lop.id = NULL; /* get a new id */ |
3eb241afb6c6
do not copy existing layout id to new window
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1470
diff
changeset
|
236 nw = layout_new(NULL, &lop); |
329
056872a2bdf7
Rename file sorting options.
Laurent Monin <geeqie@norz.org>
parents:
318
diff
changeset
|
237 layout_sort_set(nw, options->file_sort.method, options->file_sort.ascending); |
783
0e45ed008a1c
replaced directory path with FileData* dir_fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
753
diff
changeset
|
238 layout_set_fd(nw, lw->dir_fd); |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
239 options->save_window_positions = tmp; |
2739
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
240 |
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
241 return nw; |
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
242 } |
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
243 |
2750
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
244 |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
245 static void clear_marks_cancel_cb(GenericDialog *gd, gpointer data) |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
246 { |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
247 generic_dialog_close(gd); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
248 } |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
249 |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
250 static void clear_marks_help_cb(GenericDialog *gd, gpointer data) |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
251 { |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
252 help_window_show("GuideMainWindowMenus.html"); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
253 } |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
254 |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
255 void layout_menu_clear_marks_ok_cb(GenericDialog *gd, gpointer data) |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
256 { |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
257 marks_clear_all(); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
258 generic_dialog_close(gd); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
259 } |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
260 |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
261 static void layout_menu_clear_marks_cb(GtkAction *action, gpointer data) |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
262 { |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
263 GenericDialog *gd; |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
264 |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
265 gd = generic_dialog_new(_("Clear Marks"), |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
266 "marks_clear", NULL, FALSE, clear_marks_cancel_cb, NULL); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
267 generic_dialog_add_message(gd, GTK_STOCK_DIALOG_QUESTION, "Clear all marks?", |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
268 "This will clear all marks for all images,\nincluding those linked to keywords", |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
269 TRUE); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
270 generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, layout_menu_clear_marks_ok_cb, TRUE); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
271 generic_dialog_add_button(gd, GTK_STOCK_HELP, NULL, |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
272 clear_marks_help_cb, FALSE); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
273 |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
274 gtk_widget_show(gd->dialog); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
275 } |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
276 |
2739
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
277 static void layout_menu_new_window_cb(GtkAction *action, gpointer data) |
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
278 { |
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
279 layout_menu_new_window(action, data); |
9 | 280 } |
281 | |
282 static void layout_menu_new_cb(GtkAction *action, gpointer data) | |
283 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
284 LayoutWindow *lw = data; |
894 | 285 |
286 layout_exit_fullscreen(lw); | |
9 | 287 collection_window_new(NULL); |
288 } | |
289 | |
290 static void layout_menu_open_cb(GtkAction *action, gpointer data) | |
291 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
292 LayoutWindow *lw = data; |
894 | 293 |
294 layout_exit_fullscreen(lw); | |
9 | 295 collection_dialog_load(NULL); |
296 } | |
297 | |
298 static void layout_menu_search_cb(GtkAction *action, gpointer data) | |
299 { | |
300 LayoutWindow *lw = data; | |
301 | |
894 | 302 layout_exit_fullscreen(lw); |
783
0e45ed008a1c
replaced directory path with FileData* dir_fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
753
diff
changeset
|
303 search_new(lw->dir_fd, layout_image_get_fd(lw)); |
9 | 304 } |
305 | |
306 static void layout_menu_dupes_cb(GtkAction *action, gpointer data) | |
307 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
308 LayoutWindow *lw = data; |
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
309 |
894 | 310 layout_exit_fullscreen(lw); |
2426
28546abc2b90
Fix #435: Remember duplicates settings
Colin Clark <cclark@mcb.net>
parents:
2423
diff
changeset
|
311 dupe_window_new(); |
9 | 312 } |
313 | |
12
8e6d90233b6d
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
314 static void layout_menu_pan_cb(GtkAction *action, gpointer data) |
8e6d90233b6d
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
315 { |
8e6d90233b6d
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
316 LayoutWindow *lw = data; |
8e6d90233b6d
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
317 |
894 | 318 layout_exit_fullscreen(lw); |
783
0e45ed008a1c
replaced directory path with FileData* dir_fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
753
diff
changeset
|
319 pan_window_new(lw->dir_fd); |
12
8e6d90233b6d
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
320 } |
8e6d90233b6d
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
321 |
9 | 322 static void layout_menu_print_cb(GtkAction *action, gpointer data) |
323 { | |
324 LayoutWindow *lw = data; | |
325 | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
326 print_window_new(layout_image_get_fd(lw), layout_selection_list(lw), layout_list(lw), layout_window(lw)); |
9 | 327 } |
328 | |
329 static void layout_menu_dir_cb(GtkAction *action, gpointer data) | |
330 { | |
331 LayoutWindow *lw = data; | |
332 | |
1637
f82f5ef47061
unify code paths for New directory
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1635
diff
changeset
|
333 if (lw->vd) vd_new_folder(lw->vd, lw->dir_fd); |
9 | 334 } |
335 | |
336 static void layout_menu_copy_cb(GtkAction *action, gpointer data) | |
337 { | |
338 LayoutWindow *lw = data; | |
339 | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
340 file_util_copy(NULL, layout_selection_list(lw), NULL, layout_window(lw)); |
9 | 341 } |
342 | |
497
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
489
diff
changeset
|
343 static void layout_menu_copy_path_cb(GtkAction *action, gpointer data) |
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
489
diff
changeset
|
344 { |
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
489
diff
changeset
|
345 LayoutWindow *lw = data; |
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
489
diff
changeset
|
346 |
2663
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
347 file_util_copy_path_list_to_clipboard(layout_selection_list(lw), TRUE); |
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
348 } |
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
349 |
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
350 static void layout_menu_copy_path_unquoted_cb(GtkAction *action, gpointer data) |
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
351 { |
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
352 LayoutWindow *lw = data; |
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
353 |
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
354 file_util_copy_path_list_to_clipboard(layout_selection_list(lw), FALSE); |
497
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
489
diff
changeset
|
355 } |
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
489
diff
changeset
|
356 |
9 | 357 static void layout_menu_move_cb(GtkAction *action, gpointer data) |
358 { | |
359 LayoutWindow *lw = data; | |
360 | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
361 file_util_move(NULL, layout_selection_list(lw), NULL, layout_window(lw)); |
9 | 362 } |
363 | |
364 static void layout_menu_rename_cb(GtkAction *action, gpointer data) | |
365 { | |
366 LayoutWindow *lw = data; | |
367 | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
368 file_util_rename(NULL, layout_selection_list(lw), layout_window(lw)); |
9 | 369 } |
370 | |
371 static void layout_menu_delete_cb(GtkAction *action, gpointer data) | |
372 { | |
373 LayoutWindow *lw = data; | |
374 | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
375 file_util_delete(NULL, layout_selection_list(lw), layout_window(lw)); |
9 | 376 } |
377 | |
2420
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
378 static void layout_menu_delete_key_cb(GtkAction *action, gpointer data) |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
379 { |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
380 LayoutWindow *lw = data; |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
381 |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
382 if (options->file_ops.enable_delete_key) |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
383 { |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
384 file_util_delete(NULL, layout_selection_list(lw), layout_window(lw)); |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
385 } |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
386 } |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
387 |
1598
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
388 static void layout_menu_disable_grouping_cb(GtkAction *action, gpointer data) |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
389 { |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
390 LayoutWindow *lw = data; |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
391 |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
392 file_data_disable_grouping_list(layout_selection_list(lw), TRUE); |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
393 } |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
394 |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
395 static void layout_menu_enable_grouping_cb(GtkAction *action, gpointer data) |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
396 { |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
397 LayoutWindow *lw = data; |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
398 |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
399 file_data_disable_grouping_list(layout_selection_list(lw), FALSE); |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
400 } |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
401 |
2739
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
402 void layout_menu_close_cb(GtkAction *action, gpointer data) |
9 | 403 { |
404 LayoutWindow *lw = data; | |
405 | |
894 | 406 layout_exit_fullscreen(lw); |
9 | 407 layout_close(lw); |
408 } | |
409 | |
410 static void layout_menu_exit_cb(GtkAction *action, gpointer data) | |
411 { | |
278
79fed35f1650
exit_gqview() renamed to exit_program().
Laurent Monin <geeqie@norz.org>
parents:
273
diff
changeset
|
412 exit_program(); |
9 | 413 } |
414 | |
415 static void layout_menu_alter_90_cb(GtkAction *action, gpointer data) | |
416 { | |
417 LayoutWindow *lw = data; | |
418 | |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
419 layout_image_alter_orientation(lw, ALTER_ROTATE_90); |
9 | 420 } |
421 | |
2500
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
422 static void layout_menu_rating_0_cb(GtkAction *action, gpointer data) |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
423 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
424 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
425 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
426 layout_image_rating(lw, "0"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
427 } |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
428 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
429 static void layout_menu_rating_1_cb(GtkAction *action, gpointer data) |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
430 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
431 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
432 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
433 layout_image_rating(lw, "1"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
434 } |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
435 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
436 static void layout_menu_rating_2_cb(GtkAction *action, gpointer data) |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
437 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
438 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
439 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
440 layout_image_rating(lw, "2"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
441 } |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
442 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
443 static void layout_menu_rating_3_cb(GtkAction *action, gpointer data) |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
444 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
445 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
446 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
447 layout_image_rating(lw, "3"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
448 } |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
449 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
450 static void layout_menu_rating_4_cb(GtkAction *action, gpointer data) |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
451 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
452 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
453 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
454 layout_image_rating(lw, "4"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
455 } |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
456 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
457 static void layout_menu_rating_5_cb(GtkAction *action, gpointer data) |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
458 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
459 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
460 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
461 layout_image_rating(lw, "5"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
462 } |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
463 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
464 static void layout_menu_rating_m1_cb(GtkAction *action, gpointer data) |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
465 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
466 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
467 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
468 layout_image_rating(lw, "-1"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
469 } |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
470 |
9 | 471 static void layout_menu_alter_90cc_cb(GtkAction *action, gpointer data) |
472 { | |
473 LayoutWindow *lw = data; | |
474 | |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
475 layout_image_alter_orientation(lw, ALTER_ROTATE_90_CC); |
9 | 476 } |
477 | |
478 static void layout_menu_alter_180_cb(GtkAction *action, gpointer data) | |
479 { | |
480 LayoutWindow *lw = data; | |
481 | |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
482 layout_image_alter_orientation(lw, ALTER_ROTATE_180); |
9 | 483 } |
484 | |
485 static void layout_menu_alter_mirror_cb(GtkAction *action, gpointer data) | |
486 { | |
487 LayoutWindow *lw = data; | |
488 | |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
489 layout_image_alter_orientation(lw, ALTER_MIRROR); |
9 | 490 } |
491 | |
492 static void layout_menu_alter_flip_cb(GtkAction *action, gpointer data) | |
493 { | |
494 LayoutWindow *lw = data; | |
495 | |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
496 layout_image_alter_orientation(lw, ALTER_FLIP); |
9 | 497 } |
498 | |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
499 static void layout_menu_alter_desaturate_cb(GtkToggleAction *action, gpointer data) |
82
05a6aea69f24
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
41
diff
changeset
|
500 { |
05a6aea69f24
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
41
diff
changeset
|
501 LayoutWindow *lw = data; |
05a6aea69f24
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
41
diff
changeset
|
502 |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
503 layout_image_set_desaturate(lw, gtk_toggle_action_get_active(action)); |
82
05a6aea69f24
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
41
diff
changeset
|
504 } |
05a6aea69f24
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
41
diff
changeset
|
505 |
439
a529755a2be0
Add a way to restore original state in Adjust menu.
Laurent Monin <geeqie@norz.org>
parents:
433
diff
changeset
|
506 static void layout_menu_alter_none_cb(GtkAction *action, gpointer data) |
a529755a2be0
Add a way to restore original state in Adjust menu.
Laurent Monin <geeqie@norz.org>
parents:
433
diff
changeset
|
507 { |
a529755a2be0
Add a way to restore original state in Adjust menu.
Laurent Monin <geeqie@norz.org>
parents:
433
diff
changeset
|
508 LayoutWindow *lw = data; |
a529755a2be0
Add a way to restore original state in Adjust menu.
Laurent Monin <geeqie@norz.org>
parents:
433
diff
changeset
|
509 |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
510 layout_image_alter_orientation(lw, ALTER_NONE); |
439
a529755a2be0
Add a way to restore original state in Adjust menu.
Laurent Monin <geeqie@norz.org>
parents:
433
diff
changeset
|
511 } |
a529755a2be0
Add a way to restore original state in Adjust menu.
Laurent Monin <geeqie@norz.org>
parents:
433
diff
changeset
|
512 |
2438
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
513 static void layout_menu_exif_rotate_cb(GtkToggleAction *action, gpointer data) |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
514 { |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
515 LayoutWindow *lw = data; |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
516 |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
517 options->image.exif_rotate_enable = gtk_toggle_action_get_active(action); |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
518 layout_image_reset_orientation(lw); |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
519 } |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
520 |
2801
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
521 static void layout_menu_select_rectangle_cb(GtkToggleAction *action, gpointer data) |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
522 { |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
523 LayoutWindow *lw = data; |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
524 |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
525 options->draw_rectangle = gtk_toggle_action_get_active(action); |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
526 } |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
527 |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
528 static void layout_menu_write_rotate(GtkToggleAction *action, gpointer data, gboolean keep_date) |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
529 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
530 LayoutWindow *lw = data; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
531 GtkTreeModel *store; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
532 GList *work; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
533 GtkTreeSelection *selection; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
534 GtkTreePath *tpath; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
535 FileData *fd_n; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
536 GtkTreeIter iter; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
537 gchar *rotation; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
538 gchar *command; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
539 gint run_result; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
540 GenericDialog *gd; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
541 GString *message; |
2726
37c2e1a7d08b
Fix #588,589: Geeqie fails to build on macOS
Misty De Meo <>
parents:
2705
diff
changeset
|
542 int cmdstatus; |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
543 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
544 if (!layout_valid(&lw)) return; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
545 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
546 if (!lw || !lw->vf) return; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
547 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
548 if (lw->vf->type == FILEVIEW_ICON) |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
549 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
550 if (!VFICON(lw->vf)->selection) return; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
551 work = VFICON(lw->vf)->selection; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
552 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
553 else |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
554 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
555 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(lw->vf->listview)); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
556 work = gtk_tree_selection_get_selected_rows(selection, &store); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
557 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
558 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
559 while (work) |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
560 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
561 if (lw->vf->type == FILEVIEW_ICON) |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
562 { |
2523
46f57b0ed091
Remove all references to "IconData"
Omari Stephens <xsdg@google.com>
parents:
2517
diff
changeset
|
563 fd_n = work->data; |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
564 work = work->next; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
565 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
566 else |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
567 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
568 tpath = work->data; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
569 gtk_tree_model_get_iter(store, &iter, tpath); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
570 gtk_tree_model_get(store, &iter, FILE_COLUMN_POINTER, &fd_n, -1); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
571 work = work->next; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
572 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
573 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
574 rotation = g_strdup_printf("%d", fd_n->user_orientation); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
575 command = g_strconcat(GQ_BIN_DIR, "/geeqie-rotate -r ", rotation, |
2704
fe3d652a8b5b
Fix #578: unable to write orientation to file
Colin Clark <colin.clark@cclark.uk>
parents:
2694
diff
changeset
|
576 keep_date ? " -t \"" : " \"", fd_n->path, "\"", NULL); |
2726
37c2e1a7d08b
Fix #588,589: Geeqie fails to build on macOS
Misty De Meo <>
parents:
2705
diff
changeset
|
577 cmdstatus = runcmd(command); |
37c2e1a7d08b
Fix #588,589: Geeqie fails to build on macOS
Misty De Meo <>
parents:
2705
diff
changeset
|
578 run_result = WEXITSTATUS(cmdstatus); |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
579 if (!run_result) |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
580 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
581 fd_n->user_orientation = 0; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
582 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
583 else |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
584 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
585 message = g_string_new(""); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
586 message = g_string_append(message, _("Operation failed:\n")); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
587 |
2705
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
588 if (run_result == 1) |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
589 message = g_string_append(message, _("No file extension\n")); |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
590 else if (run_result == 3) |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
591 message = g_string_append(message, _("Cannot create tmp file\n")); |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
592 else if (run_result == 4) |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
593 message = g_string_append(message, _("Operation not supported for filetype\n")); |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
594 else if (run_result == 5) |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
595 message = g_string_append(message, _("File is not writable\n")); |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
596 else if (run_result == 6) |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
597 message = g_string_append(message, _("Exiftran error\n")); |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
598 else if (run_result == 7) |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
599 message = g_string_append(message, _("Mogrify error\n")); |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
600 |
beda48f55142
Fix #577: give user warning/error when it is impossible to update EXIF orientation
Colin Clark <colin.clark@cclark.uk>
parents:
2704
diff
changeset
|
601 message = g_string_append(message, fd_n->name); |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
602 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
603 gd = generic_dialog_new(_("Image orientation"), |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
604 "Image orientation", NULL, TRUE, NULL, NULL); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
605 generic_dialog_add_message(gd, GTK_STOCK_DIALOG_ERROR, |
2587
c6f9494f6be1
Fix #508: Copy and Move windows scale incorrectly
cclark <colin.clark@cclark.uk>
parents:
2575
diff
changeset
|
606 "Image orientation", message->str, TRUE); |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
607 generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, NULL, TRUE); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
608 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
609 gtk_widget_show(gd->dialog); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
610 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
611 g_string_free(message, TRUE); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
612 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
613 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
614 g_free(rotation); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
615 g_free(command); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
616 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
617 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
618 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
619 static void layout_menu_write_rotate_keep_date_cb(GtkToggleAction *action, gpointer data) |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
620 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
621 layout_menu_write_rotate(action, data, TRUE); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
622 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
623 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
624 static void layout_menu_write_rotate_cb(GtkToggleAction *action, gpointer data) |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
625 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
626 layout_menu_write_rotate(action, data, FALSE); |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
627 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
628 |
9 | 629 static void layout_menu_config_cb(GtkAction *action, gpointer data) |
630 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
631 LayoutWindow *lw = data; |
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
632 |
894 | 633 layout_exit_fullscreen(lw); |
9 | 634 show_config_window(); |
635 } | |
636 | |
1479
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
637 static void layout_menu_editors_cb(GtkAction *action, gpointer data) |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
638 { |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
639 LayoutWindow *lw = data; |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
640 |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
641 layout_exit_fullscreen(lw); |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
642 show_editor_list_window(); |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
643 } |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
644 |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
645 static void layout_menu_layout_config_cb(GtkAction *action, gpointer data) |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
646 { |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
647 LayoutWindow *lw = data; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
648 |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
649 layout_exit_fullscreen(lw); |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
650 layout_show_config_window(lw); |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
651 } |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
652 |
9 | 653 static void layout_menu_remove_thumb_cb(GtkAction *action, gpointer data) |
654 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
655 LayoutWindow *lw = data; |
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
656 |
894 | 657 layout_exit_fullscreen(lw); |
9 | 658 cache_manager_show(); |
659 } | |
660 | |
661 static void layout_menu_wallpaper_cb(GtkAction *action, gpointer data) | |
662 { | |
663 LayoutWindow *lw = data; | |
664 | |
665 layout_image_to_root(lw); | |
666 } | |
667 | |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
668 /* single window zoom */ |
9 | 669 static void layout_menu_zoom_in_cb(GtkAction *action, gpointer data) |
670 { | |
671 LayoutWindow *lw = data; | |
672 | |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
673 layout_image_zoom_adjust(lw, get_zoom_increment(), FALSE); |
9 | 674 } |
675 | |
676 static void layout_menu_zoom_out_cb(GtkAction *action, gpointer data) | |
677 { | |
678 LayoutWindow *lw = data; | |
679 | |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
680 layout_image_zoom_adjust(lw, -get_zoom_increment(), FALSE); |
9 | 681 } |
682 | |
683 static void layout_menu_zoom_1_1_cb(GtkAction *action, gpointer data) | |
684 { | |
685 LayoutWindow *lw = data; | |
686 | |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
687 layout_image_zoom_set(lw, 1.0, FALSE); |
9 | 688 } |
689 | |
690 static void layout_menu_zoom_fit_cb(GtkAction *action, gpointer data) | |
691 { | |
692 LayoutWindow *lw = data; | |
693 | |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
694 layout_image_zoom_set(lw, 0.0, FALSE); |
9 | 695 } |
696 | |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
697 static void layout_menu_zoom_fit_hor_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
698 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
699 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
700 |
1268
15f1403d0489
Invert Horizontally vs vertically zoom fit, it was a TRUE/FALSE mismatch, reported by Christopher Beland.
Laurent Monin <geeqie@norz.org>
parents:
1231
diff
changeset
|
701 layout_image_zoom_set_fill_geometry(lw, FALSE, FALSE); |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
702 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
703 |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
704 static void layout_menu_zoom_fit_vert_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
705 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
706 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
707 |
1268
15f1403d0489
Invert Horizontally vs vertically zoom fit, it was a TRUE/FALSE mismatch, reported by Christopher Beland.
Laurent Monin <geeqie@norz.org>
parents:
1231
diff
changeset
|
708 layout_image_zoom_set_fill_geometry(lw, TRUE, FALSE); |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
709 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
710 |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
711 static void layout_menu_zoom_2_1_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
712 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
713 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
714 |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
715 layout_image_zoom_set(lw, 2.0, FALSE); |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
716 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
717 |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
718 static void layout_menu_zoom_3_1_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
719 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
720 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
721 |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
722 layout_image_zoom_set(lw, 3.0, FALSE); |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
723 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
724 static void layout_menu_zoom_4_1_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
725 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
726 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
727 |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
728 layout_image_zoom_set(lw, 4.0, FALSE); |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
729 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
730 |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
731 static void layout_menu_zoom_1_2_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
732 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
733 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
734 |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
735 layout_image_zoom_set(lw, -2.0, FALSE); |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
736 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
737 |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
738 static void layout_menu_zoom_1_3_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
739 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
740 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
741 |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
742 layout_image_zoom_set(lw, -3.0, FALSE); |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
743 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
744 |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
745 static void layout_menu_zoom_1_4_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
746 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
747 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
748 |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
749 layout_image_zoom_set(lw, -4.0, FALSE); |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
750 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
751 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
752 /* connected zoom */ |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
753 static void layout_menu_connect_zoom_in_cb(GtkAction *action, gpointer data) |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
754 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
755 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
756 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
757 layout_image_zoom_adjust(lw, get_zoom_increment(), TRUE); |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
758 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
759 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
760 static void layout_menu_connect_zoom_out_cb(GtkAction *action, gpointer data) |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
761 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
762 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
763 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
764 layout_image_zoom_adjust(lw, -get_zoom_increment(), TRUE); |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
765 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
766 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
767 static void layout_menu_connect_zoom_1_1_cb(GtkAction *action, gpointer data) |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
768 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
769 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
770 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
771 layout_image_zoom_set(lw, 1.0, TRUE); |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
772 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
773 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
774 static void layout_menu_connect_zoom_fit_cb(GtkAction *action, gpointer data) |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
775 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
776 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
777 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
778 layout_image_zoom_set(lw, 0.0, TRUE); |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
779 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
780 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
781 static void layout_menu_connect_zoom_fit_hor_cb(GtkAction *action, gpointer data) |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
782 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
783 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
784 |
1268
15f1403d0489
Invert Horizontally vs vertically zoom fit, it was a TRUE/FALSE mismatch, reported by Christopher Beland.
Laurent Monin <geeqie@norz.org>
parents:
1231
diff
changeset
|
785 layout_image_zoom_set_fill_geometry(lw, FALSE, TRUE); |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
786 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
787 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
788 static void layout_menu_connect_zoom_fit_vert_cb(GtkAction *action, gpointer data) |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
789 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
790 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
791 |
1268
15f1403d0489
Invert Horizontally vs vertically zoom fit, it was a TRUE/FALSE mismatch, reported by Christopher Beland.
Laurent Monin <geeqie@norz.org>
parents:
1231
diff
changeset
|
792 layout_image_zoom_set_fill_geometry(lw, TRUE, TRUE); |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
793 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
794 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
795 static void layout_menu_connect_zoom_2_1_cb(GtkAction *action, gpointer data) |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
796 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
797 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
798 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
799 layout_image_zoom_set(lw, 2.0, TRUE); |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
800 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
801 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
802 static void layout_menu_connect_zoom_3_1_cb(GtkAction *action, gpointer data) |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
803 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
804 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
805 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
806 layout_image_zoom_set(lw, 3.0, TRUE); |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
807 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
808 static void layout_menu_connect_zoom_4_1_cb(GtkAction *action, gpointer data) |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
809 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
810 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
811 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
812 layout_image_zoom_set(lw, 4.0, TRUE); |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
813 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
814 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
815 static void layout_menu_connect_zoom_1_2_cb(GtkAction *action, gpointer data) |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
816 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
817 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
818 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
819 layout_image_zoom_set(lw, -2.0, TRUE); |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
820 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
821 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
822 static void layout_menu_connect_zoom_1_3_cb(GtkAction *action, gpointer data) |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
823 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
824 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
825 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
826 layout_image_zoom_set(lw, -3.0, TRUE); |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
827 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
828 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
829 static void layout_menu_connect_zoom_1_4_cb(GtkAction *action, gpointer data) |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
830 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
831 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
832 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
833 layout_image_zoom_set(lw, -4.0, TRUE); |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
834 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
835 |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
836 |
156
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
837 static void layout_menu_split_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) |
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
838 { |
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
839 LayoutWindow *lw = data; |
894 | 840 ImageSplitMode mode; |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
841 |
894 | 842 layout_exit_fullscreen(lw); |
843 mode = gtk_radio_action_get_current_value(action); | |
156
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
844 layout_split_change(lw, mode); |
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
845 } |
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
846 |
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
847 |
9 | 848 static void layout_menu_thumb_cb(GtkToggleAction *action, gpointer data) |
849 { | |
850 LayoutWindow *lw = data; | |
851 | |
852 layout_thumb_set(lw, gtk_toggle_action_get_active(action)); | |
853 } | |
854 | |
132
b025afc3c92a
First implementation of marks for all photos.
Petr Ostadal <postadal@suse.cz>
parents:
122
diff
changeset
|
855 |
9 | 856 static void layout_menu_list_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) |
857 { | |
858 LayoutWindow *lw = data; | |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
859 |
894 | 860 layout_exit_fullscreen(lw); |
1668
238bf773ac46
use radio buttons for file and dir mode in popup menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1667
diff
changeset
|
861 layout_views_set(lw, lw->options.dir_view_type, (FileViewType) gtk_radio_action_get_current_value(action)); |
9 | 862 } |
863 | |
2461
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
864 static void layout_menu_view_dir_as_cb(GtkToggleAction *action, gpointer data) |
9 | 865 { |
866 LayoutWindow *lw = data; | |
867 | |
894 | 868 layout_exit_fullscreen(lw); |
2461
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
869 |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
870 if (gtk_toggle_action_get_active(action)) |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
871 { |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
872 layout_views_set(lw, DIRVIEW_TREE, lw->options.file_view_type); |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
873 } |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
874 else |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
875 { |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
876 layout_views_set(lw, DIRVIEW_LIST, lw->options.file_view_type); |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
877 } |
9 | 878 } |
879 | |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
880 static void layout_menu_view_in_new_window_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
881 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
882 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
883 |
894 | 884 layout_exit_fullscreen(lw); |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
885 view_window_new(layout_image_get_fd(lw)); |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
886 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
887 |
9 | 888 static void layout_menu_fullscreen_cb(GtkAction *action, gpointer data) |
889 { | |
890 LayoutWindow *lw = data; | |
891 | |
892 layout_image_full_screen_toggle(lw); | |
893 } | |
894 | |
428
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
895 static void layout_menu_escape_cb(GtkAction *action, gpointer data) |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
896 { |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
897 LayoutWindow *lw = data; |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
898 |
894 | 899 layout_exit_fullscreen(lw); |
428
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
900 } |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
901 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
902 static void layout_menu_overlay_toggle_cb(GtkAction *action, gpointer data) |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
903 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
904 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
905 |
482
b0194f65c239
Use image_osd_toggle() in layout_menu_overlay_cb().
Laurent Monin <geeqie@norz.org>
parents:
479
diff
changeset
|
906 image_osd_toggle(lw->image); |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
907 layout_util_sync_views(lw); |
273
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
908 } |
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
909 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
910 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
911 static void layout_menu_overlay_cb(GtkToggleAction *action, gpointer data) |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
912 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
913 LayoutWindow *lw = data; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
914 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
915 if (gtk_toggle_action_get_active(action)) |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
916 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
917 OsdShowFlags flags = image_osd_get(lw->image); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
918 |
1666
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
919 if ((flags | OSD_SHOW_INFO | OSD_SHOW_STATUS) != flags) |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
920 image_osd_set(lw->image, flags | OSD_SHOW_INFO | OSD_SHOW_STATUS); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
921 } |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
922 else |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
923 { |
1739
9e6163a48453
Remove an unused variable and minor code cleanup.
Laurent Monin <geeqie@norz.org>
parents:
1738
diff
changeset
|
924 GtkToggleAction *histogram_action = GTK_TOGGLE_ACTION(gtk_action_group_get_action(lw->action_group, "ImageHistogram")); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
925 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
926 image_osd_set(lw->image, OSD_SHOW_NOTHING); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
927 gtk_toggle_action_set_active(histogram_action, FALSE); /* this calls layout_menu_histogram_cb */ |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
928 } |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
929 } |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
930 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
931 static void layout_menu_histogram_cb(GtkToggleAction *action, gpointer data) |
273
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
932 { |
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
933 LayoutWindow *lw = data; |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
934 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
935 if (gtk_toggle_action_get_active(action)) |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
936 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
937 image_osd_set(lw->image, OSD_SHOW_INFO | OSD_SHOW_STATUS | OSD_SHOW_HISTOGRAM); |
1676
ed8489fdd1d3
sync histogram state after enabling it from the menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1674
diff
changeset
|
938 layout_util_sync_views(lw); /* show the overlay state, default channel and mode in the menu */ |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
939 } |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
940 else |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
941 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
942 OsdShowFlags flags = image_osd_get(lw->image); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
943 if (flags & OSD_SHOW_HISTOGRAM) |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
944 image_osd_set(lw->image, flags & ~OSD_SHOW_HISTOGRAM); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
945 } |
273
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
946 } |
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
947 |
2794
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
948 static void layout_menu_guidelines_cb(GtkToggleAction *action, gpointer data) |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
949 { |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
950 LayoutWindow *lw = data; |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
951 |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
952 if (gtk_toggle_action_get_active(action)) |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
953 { |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
954 OsdShowFlags flags = image_osd_get(lw->image); |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
955 image_osd_set(lw->image, OSD_SHOW_INFO | OSD_SHOW_STATUS | OSD_SHOW_GUIDELINES); |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
956 layout_util_sync_views(lw); |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
957 } |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
958 else |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
959 { |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
960 OsdShowFlags flags = image_osd_get(lw->image); |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
961 if (flags & OSD_SHOW_GUIDELINES) |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
962 image_osd_set(lw->image, OSD_SHOW_NOTHING); |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
963 } |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
964 } |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
965 |
2433 | 966 static void layout_menu_animate_cb(GtkToggleAction *action, gpointer data) |
967 { | |
968 LayoutWindow *lw = data; | |
969 | |
970 if (lw->options.animate == gtk_toggle_action_get_active(action)) return; | |
971 layout_image_animate_toggle(lw); | |
972 } | |
973 | |
2423 | 974 static void layout_menu_rectangular_selection_cb(GtkToggleAction *action, gpointer data) |
975 { | |
976 options->collections.rectangular_selection = gtk_toggle_action_get_active(action); | |
977 } | |
978 | |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
979 static void layout_menu_histogram_toggle_channel_cb(GtkAction *action, gpointer data) |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
980 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
981 LayoutWindow *lw = data; |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
982 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
983 image_osd_histogram_toggle_channel(lw->image); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
984 layout_util_sync_views(lw); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
985 } |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
986 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
987 static void layout_menu_histogram_toggle_mode_cb(GtkAction *action, gpointer data) |
273
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
988 { |
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
989 LayoutWindow *lw = data; |
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
990 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
991 image_osd_histogram_toggle_mode(lw->image); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
992 layout_util_sync_views(lw); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
993 } |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
994 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
995 static void layout_menu_histogram_channel_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
996 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
997 LayoutWindow *lw = data; |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
998 gint channel = gtk_radio_action_get_current_value(action); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
999 GtkToggleAction *histogram_action = GTK_TOGGLE_ACTION(gtk_action_group_get_action(lw->action_group, "ImageHistogram")); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1000 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1001 if (channel < 0 || channel >= HCHAN_COUNT) return; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1002 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1003 gtk_toggle_action_set_active(histogram_action, TRUE); /* this calls layout_menu_histogram_cb */ |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1004 image_osd_histogram_set_channel(lw->image, channel); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1005 } |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1006 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1007 static void layout_menu_histogram_mode_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1008 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1009 LayoutWindow *lw = data; |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1010 gint mode = gtk_radio_action_get_current_value(action); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1011 GtkToggleAction *histogram_action = GTK_TOGGLE_ACTION(gtk_action_group_get_action(lw->action_group, "ImageHistogram")); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1012 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1013 if (mode < 0 || mode > 1) return; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1014 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1015 gtk_toggle_action_set_active(histogram_action, TRUE); /* this calls layout_menu_histogram_cb */ |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1016 image_osd_histogram_set_mode(lw->image, mode); |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1017 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1018 |
9 | 1019 static void layout_menu_refresh_cb(GtkAction *action, gpointer data) |
1020 { | |
1021 LayoutWindow *lw = data; | |
1022 | |
1023 layout_refresh(lw); | |
1024 } | |
1025 | |
1410
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1026 static void layout_menu_bar_exif_cb(GtkAction *action, gpointer data) |
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1027 { |
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1028 LayoutWindow *lw = data; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1029 |
1410
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1030 layout_exit_fullscreen(lw); |
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1031 layout_exif_window_new(lw); |
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1032 } |
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1033 |
9 | 1034 static void layout_menu_float_cb(GtkToggleAction *action, gpointer data) |
1035 { | |
1036 LayoutWindow *lw = data; | |
1037 | |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
1038 if (lw->options.tools_float == gtk_toggle_action_get_active(action)) return; |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1039 |
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1040 layout_exit_fullscreen(lw); |
894 | 1041 layout_tools_float_toggle(lw); |
9 | 1042 } |
1043 | |
1044 static void layout_menu_hide_cb(GtkAction *action, gpointer data) | |
1045 { | |
1046 LayoutWindow *lw = data; | |
1047 | |
894 | 1048 layout_exit_fullscreen(lw); |
9 | 1049 layout_tools_hide_toggle(lw); |
1050 } | |
1051 | |
1052 static void layout_menu_toolbar_cb(GtkToggleAction *action, gpointer data) | |
1053 { | |
1054 LayoutWindow *lw = data; | |
894 | 1055 |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1056 if (lw->options.toolbar_hidden == gtk_toggle_action_get_active(action)) return; |
9 | 1057 |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1058 layout_exit_fullscreen(lw); |
894 | 1059 layout_toolbar_toggle(lw); |
9 | 1060 } |
1061 | |
1375
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1062 static void layout_menu_info_pixel_cb(GtkToggleAction *action, gpointer data) |
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1063 { |
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1064 LayoutWindow *lw = data; |
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1065 |
1584
c97dea5d82d7
improved pixel info, changed the menu entry from "Hide" to "Show",
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1583
diff
changeset
|
1066 if (lw->options.show_info_pixel == gtk_toggle_action_get_active(action)) return; |
1375
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1067 |
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1068 layout_exit_fullscreen(lw); |
1584
c97dea5d82d7
improved pixel info, changed the menu entry from "Hide" to "Show",
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1583
diff
changeset
|
1069 layout_info_pixel_set(lw, !lw->options.show_info_pixel); |
1375
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1070 } |
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1071 |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1072 /* NOTE: these callbacks are called also from layout_util_sync_views */ |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
1073 static void layout_menu_bar_cb(GtkToggleAction *action, gpointer data) |
9 | 1074 { |
1075 LayoutWindow *lw = data; | |
894 | 1076 |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1077 if (layout_bar_enabled(lw) == gtk_toggle_action_get_active(action)) return; |
9 | 1078 |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1079 layout_exit_fullscreen(lw); |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
1080 layout_bar_toggle(lw); |
9 | 1081 } |
1082 | |
1083 static void layout_menu_bar_sort_cb(GtkToggleAction *action, gpointer data) | |
1084 { | |
1085 LayoutWindow *lw = data; | |
894 | 1086 |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
1087 if (layout_bar_sort_enabled(lw) == gtk_toggle_action_get_active(action)) return; |
9 | 1088 |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1089 layout_exit_fullscreen(lw); |
894 | 1090 layout_bar_sort_toggle(lw); |
9 | 1091 } |
1092 | |
2506
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1093 static void layout_menu_hide_bars_cb(GtkToggleAction *action, gpointer data) |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1094 { |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1095 LayoutWindow *lw = data; |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1096 |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1097 layout_bars_hide_toggle(lw); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1098 } |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1099 |
1727
300439b7407f
fixed toggle_slideshow function
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1724
diff
changeset
|
1100 static void layout_menu_slideshow_cb(GtkToggleAction *action, gpointer data) |
9 | 1101 { |
1102 LayoutWindow *lw = data; | |
1103 | |
1727
300439b7407f
fixed toggle_slideshow function
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1724
diff
changeset
|
1104 if (layout_image_slideshow_active(lw) == gtk_toggle_action_get_active(action)) return; |
9 | 1105 layout_image_slideshow_toggle(lw); |
1106 } | |
1107 | |
428
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
1108 static void layout_menu_slideshow_pause_cb(GtkAction *action, gpointer data) |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
1109 { |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
1110 LayoutWindow *lw = data; |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
1111 |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
1112 layout_image_slideshow_pause_toggle(lw); |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
1113 } |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
1114 |
2590
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1115 static void layout_menu_slideshow_slower_cb(GtkAction *action, gpointer data) |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1116 { |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1117 options->slideshow.delay = options->slideshow.delay + 5; |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1118 if (options->slideshow.delay > SLIDESHOW_MAX_SECONDS) |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1119 options->slideshow.delay = SLIDESHOW_MAX_SECONDS; |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1120 } |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1121 |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1122 static void layout_menu_slideshow_faster_cb(GtkAction *action, gpointer data) |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1123 { |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1124 options->slideshow.delay = options->slideshow.delay - 5; |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1125 if (options->slideshow.delay < SLIDESHOW_MIN_SECONDS * 10) |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1126 options->slideshow.delay = SLIDESHOW_MIN_SECONDS * 10; |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1127 } |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1128 |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1129 |
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1130 static void layout_menu_stereo_mode_next_cb(GtkAction *action, gpointer data) |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1131 { |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1132 LayoutWindow *lw = data; |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1133 gint mode = layout_image_stereo_pixbuf_get(lw); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1134 |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1135 /* 0->1, 1->2, 2->3, 3->1 - disable auto, then cycle */ |
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1136 mode = mode % 3 + 1; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1137 |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1138 GtkAction *radio = gtk_action_group_get_action(lw->action_group, "StereoAuto"); |
2095
e4aa52cbbecb
dropped support for gtk < 2.20
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2042
diff
changeset
|
1139 gtk_radio_action_set_current_value(GTK_RADIO_ACTION(radio), mode); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1140 |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1141 /* |
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1142 this is called via fallback in layout_menu_stereo_mode_cb |
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1143 layout_image_stereo_pixbuf_set(lw, mode); |
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1144 */ |
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1145 |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1146 } |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1147 |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1148 static void layout_menu_stereo_mode_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1149 { |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1150 LayoutWindow *lw = data; |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1151 gint mode = gtk_radio_action_get_current_value(action); |
1888
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
1152 layout_image_stereo_pixbuf_set(lw, mode); |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1153 } |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1154 |
9 | 1155 static void layout_menu_help_cb(GtkAction *action, gpointer data) |
1156 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
1157 LayoutWindow *lw = data; |
894 | 1158 |
1159 layout_exit_fullscreen(lw); | |
2412 | 1160 help_window_show("index.html"); |
9 | 1161 } |
1162 | |
2756
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1163 static void layout_menu_help_search_cb(GtkAction *action, gpointer data) |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1164 { |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1165 LayoutWindow *lw = data; |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1166 |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1167 layout_exit_fullscreen(lw); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1168 help_search_window_show(); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1169 } |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1170 |
9 | 1171 static void layout_menu_help_keys_cb(GtkAction *action, gpointer data) |
1172 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
1173 LayoutWindow *lw = data; |
894 | 1174 |
1175 layout_exit_fullscreen(lw); | |
2412 | 1176 help_window_show("GuideReferenceKeyboardShortcuts.html"); |
9 | 1177 } |
1178 | |
1179 static void layout_menu_notes_cb(GtkAction *action, gpointer data) | |
1180 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
1181 LayoutWindow *lw = data; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1182 |
894 | 1183 layout_exit_fullscreen(lw); |
9 | 1184 help_window_show("release_notes"); |
1185 } | |
1186 | |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1187 static void layout_menu_changelog_cb(GtkAction *action, gpointer data) |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1188 { |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1189 LayoutWindow *lw = data; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1190 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1191 layout_exit_fullscreen(lw); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1192 help_window_show("changelog"); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1193 } |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1194 |
2362 | 1195 static char *keyboard_map_hardcoded[][2] = { |
1196 {"Scroll","Left"}, | |
1197 {"FastScroll", "<Shift>Left"}, | |
1198 {"Left Border", "<Primary>Left"}, | |
1199 {"Left Border", "<Primary><Shift>Left"}, | |
1200 {"Scroll", "Right"}, | |
1201 {"FastScroll", "<Shift>Right"}, | |
1202 {"Right Border", "<Primary>Right"}, | |
1203 {"Right Border", "<Primary><Shift>Right"}, | |
1204 {"Scroll", "Up"}, | |
1205 {"FastScroll", "<Shift>Up"}, | |
1206 {"Uper Border", "<Primary>Up"}, | |
1207 {"Uper Border", "<Primary><Shift>Up"}, | |
1208 {"Scroll", "Down"}, | |
1209 {"FastScroll", "<Shift>Down"}, | |
1210 {"Lower Border", "<Primary>Down"}, | |
1211 {"Lower Border", "<Primary><Shift>Down"}, | |
1212 {"Next/Drag", "M1"}, | |
1213 {"FastDrag", "<Shift>M1"}, | |
1214 {"DnD Start", "M2"}, | |
1215 {"Menu", "M3"}, | |
1216 {"PrevImage", "MW4"}, | |
1217 {"NextImage", "MW5"}, | |
1218 {"ScrollUp", "<Shift>MW4"}, | |
1219 {"ScrollDown", "<Shift>MW5"}, | |
1220 {"ZoomIn", "<Primary>MW4"}, | |
1221 {"ZoomOut", "<Primary>MW5"}, | |
1222 {NULL, NULL} | |
1223 }; | |
1224 | |
1225 static void layout_menu_foreach_func( | |
1226 gpointer data, | |
1227 const gchar *accel_path, | |
1228 guint accel_key, | |
1229 GdkModifierType accel_mods, | |
1230 gboolean changed) | |
1231 { | |
1232 gchar *path, *name; | |
1233 gchar *key_name, *menu_name; | |
1234 gchar **subset_lt_arr, **subset_gt_arr; | |
1235 gchar *subset_lt, *converted_name; | |
1236 GPtrArray *array = data; | |
1237 | |
1238 path = g_strescape(accel_path, NULL); | |
1239 name = gtk_accelerator_name(accel_key, accel_mods); | |
1240 | |
1241 menu_name = g_strdup(g_strrstr(path, "/")+1); | |
1242 | |
1243 if (g_strrstr(name, ">")) | |
1244 { | |
1245 subset_lt_arr = g_strsplit_set(name,"<", 4); | |
1246 subset_lt = g_strjoinv("<", subset_lt_arr); | |
1247 subset_gt_arr = g_strsplit_set(subset_lt,">", 4); | |
1248 converted_name = g_strjoinv(">", subset_gt_arr); | |
1249 key_name = g_strdup(converted_name); | |
1250 | |
1251 g_free(converted_name); | |
1252 g_free(subset_lt); | |
1253 g_strfreev(subset_lt_arr); | |
1254 g_strfreev(subset_gt_arr); | |
1255 } | |
1256 else | |
1257 key_name = g_strdup(name); | |
1258 | |
1259 g_ptr_array_add(array, (gpointer)menu_name); | |
1260 g_ptr_array_add(array, (gpointer)key_name); | |
1261 | |
1262 g_free(name); | |
1263 g_free(path); | |
1264 } | |
1265 | |
1266 static void layout_menu_kbd_map_cb(GtkAction *action, gpointer data) | |
1267 { | |
1268 gint fd = -1; | |
1269 GPtrArray *array; | |
1270 char * tmp_file; | |
1271 GError *error = NULL; | |
1272 GIOChannel *channel; | |
1273 char **pre_key, **post_key; | |
1274 char *key_name, *converted_line; | |
1275 int keymap_index, index; | |
1276 | |
1277 fd = g_file_open_tmp("geeqie_keymap_XXXXXX.svg", &tmp_file, &error); | |
1278 if (error) | |
1279 { | |
2604
425b69f7ff5f
Revise DEBUG_0() usage
Colin Clark <colin.clark@cclark.uk>
parents:
2600
diff
changeset
|
1280 log_printf("Error: Keyboard Map - cannot create file:%s\n",error->message); |
2362 | 1281 g_error_free(error); |
1282 } | |
1283 else | |
1284 { | |
1285 array = g_ptr_array_new(); | |
1286 | |
1287 gtk_accel_map_foreach(array, layout_menu_foreach_func); | |
1288 | |
1289 channel = g_io_channel_unix_new(fd); | |
1290 | |
1291 keymap_index = 0; | |
1292 while (keymap_template[keymap_index]) | |
1293 { | |
1294 if (g_strrstr(keymap_template[keymap_index], ">key:")) | |
1295 { | |
1296 pre_key = g_strsplit(keymap_template[keymap_index],">key:",2); | |
1297 post_key = g_strsplit(pre_key[1],"<",2); | |
1298 | |
1299 index=0; | |
1300 key_name = " "; | |
1301 for (index=0; index < array->len-2; index=index+2) | |
1302 { | |
1303 if (!(g_ascii_strcasecmp(g_ptr_array_index(array,index+1), post_key[0]))) | |
1304 { | |
1305 key_name = g_ptr_array_index(array,index+0); | |
1306 break; | |
1307 } | |
1308 } | |
1309 | |
1310 index=0; | |
1311 while (keyboard_map_hardcoded[index][0]) | |
1312 { | |
1313 if (!(g_strcmp0(keyboard_map_hardcoded[index][1], post_key[0]))) | |
1314 { | |
1315 key_name = keyboard_map_hardcoded[index][0]; | |
1316 break; | |
1317 } | |
1318 index++; | |
1319 } | |
1320 | |
1321 converted_line = g_strconcat(pre_key[0], ">", key_name, "<", post_key[1], "\n", NULL); | |
1322 g_io_channel_write_chars(channel, converted_line, -1, NULL, &error); | |
2604
425b69f7ff5f
Revise DEBUG_0() usage
Colin Clark <colin.clark@cclark.uk>
parents:
2600
diff
changeset
|
1323 if (error) {log_printf("Warning: Keyboard Map:%s\n",error->message); g_error_free(error);} |
2362 | 1324 |
1325 g_free(converted_line); | |
1326 g_strfreev(pre_key); | |
1327 g_strfreev(post_key); | |
1328 } | |
1329 else | |
1330 { | |
1331 g_io_channel_write_chars(channel, keymap_template[keymap_index], -1, NULL, &error); | |
2604
425b69f7ff5f
Revise DEBUG_0() usage
Colin Clark <colin.clark@cclark.uk>
parents:
2600
diff
changeset
|
1332 if (error) {log_printf("Warning: Keyboard Map:%s\n",error->message); g_error_free(error);} |
2362 | 1333 g_io_channel_write_chars(channel, "\n", -1, NULL, &error); |
2604
425b69f7ff5f
Revise DEBUG_0() usage
Colin Clark <colin.clark@cclark.uk>
parents:
2600
diff
changeset
|
1334 if (error) {log_printf("Warning: Keyboard Map:%s\n",error->message); g_error_free(error);} |
2362 | 1335 } |
1336 keymap_index++; | |
1337 } | |
1338 | |
1339 g_io_channel_flush(channel, &error); | |
2604
425b69f7ff5f
Revise DEBUG_0() usage
Colin Clark <colin.clark@cclark.uk>
parents:
2600
diff
changeset
|
1340 if (error) {log_printf("Warning: Keyboard Map:%s\n",error->message); g_error_free(error);} |
2362 | 1341 g_io_channel_unref(channel); |
1342 | |
1343 index=0; | |
1344 for (index=0; index < array->len-2; index=index+2) | |
1345 { | |
1346 g_free(g_ptr_array_index(array,index)); | |
1347 g_free(g_ptr_array_index(array,index+1)); | |
1348 } | |
1349 g_ptr_array_unref(array); | |
1350 | |
1351 view_window_new(file_data_new_simple(tmp_file)); | |
1352 g_free(tmp_file); | |
1353 } | |
1354 } | |
1355 | |
9 | 1356 static void layout_menu_about_cb(GtkAction *action, gpointer data) |
1357 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
1358 LayoutWindow *lw = data; |
894 | 1359 |
1360 layout_exit_fullscreen(lw); | |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1361 show_about_window(lw); |
9 | 1362 } |
1363 | |
678
fbb7a20c06b7
Add a log window that shows normal and debug messages. For now, it was added to Help menu.
Laurent Monin <geeqie@norz.org>
parents:
654
diff
changeset
|
1364 static void layout_menu_log_window_cb(GtkAction *action, gpointer data) |
fbb7a20c06b7
Add a log window that shows normal and debug messages. For now, it was added to Help menu.
Laurent Monin <geeqie@norz.org>
parents:
654
diff
changeset
|
1365 { |
fbb7a20c06b7
Add a log window that shows normal and debug messages. For now, it was added to Help menu.
Laurent Monin <geeqie@norz.org>
parents:
654
diff
changeset
|
1366 LayoutWindow *lw = data; |
894 | 1367 |
1368 layout_exit_fullscreen(lw); | |
2508
a39331032807
Additional debug features
Colin Clark <colin.clark@cclark.uk>
parents:
2506
diff
changeset
|
1369 log_window_new(lw); |
678
fbb7a20c06b7
Add a log window that shows normal and debug messages. For now, it was added to Help menu.
Laurent Monin <geeqie@norz.org>
parents:
654
diff
changeset
|
1370 } |
fbb7a20c06b7
Add a log window that shows normal and debug messages. For now, it was added to Help menu.
Laurent Monin <geeqie@norz.org>
parents:
654
diff
changeset
|
1371 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1372 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1373 /* |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1374 *----------------------------------------------------------------------------- |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1375 * select menu |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1376 *----------------------------------------------------------------------------- |
442 | 1377 */ |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1378 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1379 static void layout_menu_select_all_cb(GtkAction *action, gpointer data) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1380 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1381 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1382 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1383 layout_select_all(lw); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1384 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1385 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1386 static void layout_menu_unselect_all_cb(GtkAction *action, gpointer data) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1387 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1388 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1389 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1390 layout_select_none(lw); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1391 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1392 |
601
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1393 static void layout_menu_invert_selection_cb(GtkAction *action, gpointer data) |
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1394 { |
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1395 LayoutWindow *lw = data; |
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1396 |
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1397 layout_select_invert(lw); |
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1398 } |
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1399 |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1400 static void layout_menu_file_filter_cb(GtkToggleAction *action, gpointer data) |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1401 { |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1402 LayoutWindow *lw = data; |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1403 |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1404 layout_file_filter_set(lw, gtk_toggle_action_get_active(action)); |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1405 } |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1406 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1407 static void layout_menu_marks_cb(GtkToggleAction *action, gpointer data) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1408 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1409 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1410 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1411 layout_marks_set(lw, gtk_toggle_action_get_active(action)); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1412 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1413 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1414 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1415 static void layout_menu_set_mark_sel_cb(GtkAction *action, gpointer data) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1416 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1417 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1418 gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num")); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1419 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1420 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1421 layout_selection_to_mark(lw, mark, STM_MODE_SET); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1422 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1423 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1424 static void layout_menu_res_mark_sel_cb(GtkAction *action, gpointer data) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1425 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1426 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1427 gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num")); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1428 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1429 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1430 layout_selection_to_mark(lw, mark, STM_MODE_RESET); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1431 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1432 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1433 static void layout_menu_toggle_mark_sel_cb(GtkAction *action, gpointer data) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1434 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1435 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1436 gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num")); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1437 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1438 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1439 layout_selection_to_mark(lw, mark, STM_MODE_TOGGLE); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1440 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1441 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1442 static void layout_menu_sel_mark_cb(GtkAction *action, gpointer data) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1443 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1444 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1445 gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num")); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1446 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1447 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1448 layout_mark_to_selection(lw, mark, MTS_MODE_SET); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1449 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1450 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1451 static void layout_menu_sel_mark_or_cb(GtkAction *action, gpointer data) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1452 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1453 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1454 gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num")); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1455 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1456 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1457 layout_mark_to_selection(lw, mark, MTS_MODE_OR); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1458 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1459 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1460 static void layout_menu_sel_mark_and_cb(GtkAction *action, gpointer data) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1461 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1462 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1463 gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num")); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1464 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1465 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1466 layout_mark_to_selection(lw, mark, MTS_MODE_AND); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1467 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1468 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1469 static void layout_menu_sel_mark_minus_cb(GtkAction *action, gpointer data) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1470 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1471 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1472 gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num")); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1473 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1474 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1475 layout_mark_to_selection(lw, mark, MTS_MODE_MINUS); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1476 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1477 |
1635
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1478 static void layout_menu_mark_filter_toggle_cb(GtkAction *action, gpointer data) |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1479 { |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1480 LayoutWindow *lw = data; |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1481 gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num")); |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1482 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1483 |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1484 layout_marks_set(lw, TRUE); |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1485 layout_mark_filter_toggle(lw, mark); |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1486 } |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1487 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1488 |
9 | 1489 /* |
1490 *----------------------------------------------------------------------------- | |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1491 * go menu |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1492 *----------------------------------------------------------------------------- |
442 | 1493 */ |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1494 |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1495 static void layout_menu_image_first_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1496 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1497 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1498 layout_image_first(lw); |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1499 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1500 |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1501 static void layout_menu_image_prev_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1502 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1503 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1504 layout_image_prev(lw); |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1505 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1506 |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1507 static void layout_menu_image_next_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1508 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1509 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1510 layout_image_next(lw); |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1511 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1512 |
2493
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1513 static void layout_menu_split_pane_next_cb(GtkAction *action, gpointer data) |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1514 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1515 LayoutWindow *lw = data; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1516 gint active_frame; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1517 |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1518 active_frame = lw->active_split_image; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1519 |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1520 if (active_frame < MAX_SPLIT_IMAGES-1 && lw->split_images[active_frame+1] ) |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1521 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1522 active_frame++; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1523 } |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1524 else |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1525 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1526 active_frame = 0; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1527 } |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1528 layout_image_activate(lw, active_frame, FALSE); |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1529 } |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1530 |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1531 static void layout_menu_split_pane_prev_cb(GtkAction *action, gpointer data) |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1532 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1533 LayoutWindow *lw = data; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1534 gint active_frame; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1535 |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1536 active_frame = lw->active_split_image; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1537 |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1538 if (active_frame >=1 && lw->split_images[active_frame-1] ) |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1539 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1540 active_frame--; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1541 } |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1542 else |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1543 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1544 active_frame = MAX_SPLIT_IMAGES-1; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1545 while (!lw->split_images[active_frame]) |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1546 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1547 active_frame--; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1548 } |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1549 } |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1550 layout_image_activate(lw, active_frame, FALSE); |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1551 } |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1552 |
2517
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1553 static void layout_menu_split_pane_updown_cb(GtkAction *action, gpointer data) |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1554 { |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1555 LayoutWindow *lw = data; |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1556 gint active_frame; |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1557 |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1558 active_frame = lw->active_split_image; |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1559 |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1560 if (lw->split_images[MAX_SPLIT_IMAGES-1] ) |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1561 { |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1562 active_frame = active_frame ^ 2; |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1563 } |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1564 else |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1565 { |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1566 active_frame = active_frame ^ 1; |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1567 } |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1568 layout_image_activate(lw, active_frame, FALSE); |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1569 } |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1570 |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1571 static void layout_menu_image_last_cb(GtkAction *action, gpointer data) |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1572 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1573 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1574 layout_image_last(lw); |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1575 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1576 |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1577 static void layout_menu_back_cb(GtkAction *action, gpointer data) |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1578 { |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1579 LayoutWindow *lw = data; |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1580 FileData *dir_fd; |
2609
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1581 |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1582 /* Obtain previous path */ |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1583 dir_fd = file_data_new_dir(history_chain_back()); |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1584 layout_set_fd(lw, dir_fd); |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1585 file_data_unref(dir_fd); |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1586 } |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1587 |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1588 static void layout_menu_forward_cb(GtkAction *action, gpointer data) |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1589 { |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1590 LayoutWindow *lw = data; |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1591 FileData *dir_fd; |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1592 |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1593 /* Obtain next path */ |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1594 dir_fd = file_data_new_dir(history_chain_forward()); |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1595 layout_set_fd(lw, dir_fd); |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1596 file_data_unref(dir_fd); |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1597 } |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1598 |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1599 static void layout_menu_home_cb(GtkAction *action, gpointer data) |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1600 { |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
1601 LayoutWindow *lw = data; |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1602 const gchar *path; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1603 |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
1604 if (lw->options.home_path && *lw->options.home_path) |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
1605 path = lw->options.home_path; |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1606 else |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1607 path = homedir(); |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1608 |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1609 if (path) |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1610 { |
1927
d1a5b8633919
always check for sidecars by readdir
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1917
diff
changeset
|
1611 FileData *dir_fd = file_data_new_dir(path); |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1612 layout_set_fd(lw, dir_fd); |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1613 file_data_unref(dir_fd); |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1614 } |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1615 } |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1616 |
2263
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1617 static void layout_menu_up_cb(GtkAction *action, gpointer data) |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1618 { |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1619 LayoutWindow *lw = data; |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1620 ViewDir *vd = lw->vd; |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1621 gchar *path; |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1622 |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1623 if (!vd->dir_fd || strcmp(vd->dir_fd->path, G_DIR_SEPARATOR_S) == 0) return; |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1624 path = remove_level_from_path(vd->dir_fd->path); |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1625 |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1626 if (vd->select_func) |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1627 { |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1628 FileData *fd = file_data_new_dir(path); |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1629 vd->select_func(vd, fd, vd->select_data); |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1630 file_data_unref(fd); |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1631 } |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1632 |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1633 g_free(path); |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1634 } |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1635 |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1636 |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1637 /* |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1638 *----------------------------------------------------------------------------- |
9 | 1639 * edit menu |
1640 *----------------------------------------------------------------------------- | |
442 | 1641 */ |
9 | 1642 |
1643 static void layout_menu_edit_cb(GtkAction *action, gpointer data) | |
1644 { | |
1645 LayoutWindow *lw = data; | |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
1646 const gchar *key = gtk_action_get_name(action); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1647 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
1648 if (!editor_window_flag_set(key)) |
894 | 1649 layout_exit_fullscreen(lw); |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
1650 |
1656
84034de67e74
fixed leak in file_util_* functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1652
diff
changeset
|
1651 file_util_start_editor_from_filelist(key, layout_selection_list(lw), layout_get_path(lw), lw->window); |
9 | 1652 } |
1653 | |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
1654 |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
1655 static void layout_menu_metadata_write_cb(GtkAction *action, gpointer data) |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
1656 { |
1586
b8515ea34e58
force the metadata dialog if it was triggered by the menu or the button
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1585
diff
changeset
|
1657 metadata_write_queue_confirm(TRUE, NULL, NULL); |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
1658 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
1659 |
2824
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1660 static GtkWidget *last_focussed = NULL; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1661 static void layout_menu_keyword_autocomplete_cb(GtkAction *action, gpointer data) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1662 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1663 LayoutWindow *lw = data; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1664 GtkWidget *tmp; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1665 gboolean auto_has_focus; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1666 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1667 tmp = gtk_window_get_focus(GTK_WINDOW(lw->window)); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1668 auto_has_focus = bar_keywords_autocomplete_focus(lw); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1669 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1670 if (auto_has_focus) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1671 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1672 gtk_widget_grab_focus(last_focussed); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1673 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1674 else |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1675 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1676 last_focussed = tmp; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1677 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1678 } |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1679 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1680 /* |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1681 *----------------------------------------------------------------------------- |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1682 * color profile button (and menu) |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1683 *----------------------------------------------------------------------------- |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1684 */ |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1685 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1686 static void layout_color_menu_enable_cb(GtkToggleAction *action, gpointer data) |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1687 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1688 #ifdef HAVE_LCMS |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1689 LayoutWindow *lw = data; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1690 |
1737
57412a89c494
fixed unnecessary image reloads in color menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1736
diff
changeset
|
1691 if (layout_image_color_profile_get_use(lw) == gtk_toggle_action_get_active(action)) return; |
57412a89c494
fixed unnecessary image reloads in color menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1736
diff
changeset
|
1692 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1693 layout_image_color_profile_set_use(lw, gtk_toggle_action_get_active(action)); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1694 layout_util_sync_color(lw); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1695 layout_image_refresh(lw); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1696 #endif |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1697 } |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1698 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1699 static void layout_color_menu_use_image_cb(GtkToggleAction *action, gpointer data) |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1700 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1701 #ifdef HAVE_LCMS |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1702 LayoutWindow *lw = data; |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
1703 gint input; |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1704 gboolean use_image; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1705 |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
1706 if (!layout_image_color_profile_get(lw, &input, &use_image)) return; |
1737
57412a89c494
fixed unnecessary image reloads in color menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1736
diff
changeset
|
1707 if (use_image == gtk_toggle_action_get_active(action)) return; |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
1708 layout_image_color_profile_set(lw, input, gtk_toggle_action_get_active(action)); |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1709 layout_util_sync_color(lw); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1710 layout_image_refresh(lw); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1711 #endif |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1712 } |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1713 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1714 static void layout_color_menu_input_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1715 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1716 #ifdef HAVE_LCMS |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1717 LayoutWindow *lw = data; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1718 gint type; |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
1719 gint input; |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1720 gboolean use_image; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1721 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1722 type = gtk_radio_action_get_current_value(action); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1723 if (type < 0 || type >= COLOR_PROFILE_FILE + COLOR_PROFILE_INPUTS) return; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1724 |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
1725 if (!layout_image_color_profile_get(lw, &input, &use_image)) return; |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1726 if (type == input) return; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1727 |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
1728 layout_image_color_profile_set(lw, type, use_image); |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1729 layout_image_refresh(lw); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1730 #endif |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1731 } |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1732 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1733 |
9 | 1734 /* |
1735 *----------------------------------------------------------------------------- | |
1736 * recent menu | |
1737 *----------------------------------------------------------------------------- | |
1738 */ | |
1739 | |
1740 static void layout_menu_recent_cb(GtkWidget *widget, gpointer data) | |
1741 { | |
1742 gint n; | |
1743 gchar *path; | |
1744 | |
1745 n = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "recent_index")); | |
1746 | |
1747 path = g_list_nth_data(history_list_get_by_key("recent"), n); | |
1748 | |
1749 if (!path) return; | |
1750 | |
1751 /* make a copy of it */ | |
1752 path = g_strdup(path); | |
1753 collection_window_new(path); | |
1754 g_free(path); | |
1755 } | |
1756 | |
1757 static void layout_menu_recent_update(LayoutWindow *lw) | |
1758 { | |
1759 GtkWidget *menu; | |
1760 GtkWidget *recent; | |
1761 GtkWidget *item; | |
1762 GList *list; | |
1763 gint n; | |
1764 | |
1765 if (!lw->ui_manager) return; | |
1766 | |
1767 list = history_list_get_by_key("recent"); | |
1768 n = 0; | |
1769 | |
1770 menu = gtk_menu_new(); | |
1771 | |
1772 while (list) | |
1773 { | |
1176
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1774 const gchar *filename = filename_from_path((gchar *)list->data); |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1775 gchar *name; |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1776 gboolean free_name = FALSE; |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1777 |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1778 if (file_extension_match(filename, GQ_COLLECTION_EXT)) |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1779 { |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1780 name = remove_extension_from_path(filename); |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1781 free_name = TRUE; |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1782 } |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1783 else |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1784 { |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1785 name = (gchar *) filename; |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1786 } |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1787 |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1788 item = menu_item_add_simple(menu, name, G_CALLBACK(layout_menu_recent_cb), lw); |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1789 if (free_name) g_free(name); |
9 | 1790 g_object_set_data(G_OBJECT(item), "recent_index", GINT_TO_POINTER(n)); |
1791 list = list->next; | |
1792 n++; | |
1793 } | |
1794 | |
1795 if (n == 0) | |
1796 { | |
1797 menu_item_add(menu, _("Empty"), NULL, NULL); | |
1798 } | |
1799 | |
1800 recent = gtk_ui_manager_get_widget(lw->ui_manager, "/MainMenu/FileMenu/OpenRecent"); | |
1801 gtk_menu_item_set_submenu(GTK_MENU_ITEM(recent), menu); | |
1802 gtk_widget_set_sensitive(recent, (n != 0)); | |
1803 } | |
1804 | |
1805 void layout_recent_update_all(void) | |
1806 { | |
1807 GList *work; | |
1808 | |
1809 work = layout_window_list; | |
1810 while (work) | |
1811 { | |
1812 LayoutWindow *lw = work->data; | |
1813 work = work->next; | |
1814 | |
1815 layout_menu_recent_update(lw); | |
1816 } | |
1817 } | |
1818 | |
1819 void layout_recent_add_path(const gchar *path) | |
1820 { | |
1821 if (!path) return; | |
1822 | |
343
c28dbff07993
Rename recent_list_max/open_recent_max to open_recent_list_maxsize.
Laurent Monin <geeqie@norz.org>
parents:
341
diff
changeset
|
1823 history_list_add_to_key("recent", path, options->open_recent_list_maxsize); |
9 | 1824 |
1825 layout_recent_update_all(); | |
1826 } | |
1827 | |
1828 /* | |
1829 *----------------------------------------------------------------------------- | |
1830 * menu | |
1831 *----------------------------------------------------------------------------- | |
442 | 1832 */ |
9 | 1833 |
1834 #define CB G_CALLBACK | |
1835 | |
1836 static GtkActionEntry menu_entries[] = { | |
2338
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1837 { "FileMenu", NULL, N_("_File"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1838 { "GoMenu", NULL, N_("_Go"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1839 { "EditMenu", NULL, N_("_Edit"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1840 { "SelectMenu", NULL, N_("_Select"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1841 { "OrientationMenu", NULL, N_("_Orientation"), NULL, NULL, NULL }, |
2500
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
1842 { "RatingMenu", NULL, N_("_Rating"), NULL, NULL, NULL }, |
2338
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1843 { "PreferencesMenu", NULL, N_("P_references"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1844 { "ViewMenu", NULL, N_("_View"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1845 { "FileDirMenu", NULL, N_("_Files and Folders"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1846 { "ZoomMenu", NULL, N_("_Zoom"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1847 { "ColorMenu", NULL, N_("_Color Management"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1848 { "ConnectZoomMenu", NULL, N_("_Connected Zoom"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1849 { "SplitMenu", NULL, N_("Spli_t"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1850 { "StereoMenu", NULL, N_("Stere_o"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1851 { "OverlayMenu", NULL, N_("Image _Overlay"), NULL, NULL, NULL }, |
2627
6863ac66a10b
Rename External Editors to Plugins
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
1852 { "PluginsMenu", NULL, N_("_Plugins"), NULL, NULL, NULL }, |
2338
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1853 { "HelpMenu", NULL, N_("_Help"), NULL, NULL, NULL }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1854 |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1855 { "FirstImage", GTK_STOCK_GOTO_TOP, N_("_First Image"), "Home", N_("First Image"), CB(layout_menu_image_first_cb) }, |
2338
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1856 { "PrevImage", GTK_STOCK_GO_UP, N_("_Previous Image"), "BackSpace", N_("Previous Image"), CB(layout_menu_image_prev_cb) }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1857 { "PrevImageAlt1", GTK_STOCK_GO_UP, N_("_Previous Image"), "Page_Up", N_("Previous Image"), CB(layout_menu_image_prev_cb) }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1858 { "PrevImageAlt2", GTK_STOCK_GO_UP, N_("_Previous Image"), "KP_Page_Up", N_("Previous Image"), CB(layout_menu_image_prev_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1859 { "NextImage", GTK_STOCK_GO_DOWN, N_("_Next Image"), "space", N_("Next Image"), CB(layout_menu_image_next_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1860 { "NextImageAlt1", GTK_STOCK_GO_DOWN, N_("_Next Image"), "Page_Down", N_("Next Image"), CB(layout_menu_image_next_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1861 { "NextImageAlt2", GTK_STOCK_GO_DOWN, N_("_Next Image"), "KP_Page_Down", N_("Next Image"), CB(layout_menu_image_next_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1862 { "LastImage", GTK_STOCK_GOTO_BOTTOM, N_("_Last Image"), "End", N_("Last Image"), CB(layout_menu_image_last_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1863 { "Back", GTK_STOCK_GO_BACK, N_("_Back"), NULL, N_("Back"), CB(layout_menu_back_cb) }, |
2609
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1864 { "Forward", GTK_STOCK_GO_FORWARD, N_("_Forward"), NULL, N_("Forward"), CB(layout_menu_forward_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1865 { "Home", GTK_STOCK_HOME, N_("_Home"), NULL, N_("Home"), CB(layout_menu_home_cb) }, |
2338
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1866 { "Up", GTK_STOCK_GO_UP, N_("_Up"), NULL, N_("Up"), CB(layout_menu_up_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1867 |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1868 { "NewWindow", GTK_STOCK_NEW, N_("New _window"), "<control>N", N_("New window"), CB(layout_menu_new_window_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1869 { "NewCollection", GTK_STOCK_INDEX, N_("_New collection"), "C", N_("New collection"), CB(layout_menu_new_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1870 { "OpenCollection", GTK_STOCK_OPEN, N_("_Open collection..."), "O", N_("Open collection..."), CB(layout_menu_open_cb) }, |
1692
e31990e61dd3
fixed mnemonic conflicts
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1678
diff
changeset
|
1871 { "OpenRecent", NULL, N_("Open recen_t"), NULL, N_("Open recent"), NULL }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1872 { "Search", GTK_STOCK_FIND, N_("_Search..."), "F3", N_("Search..."), CB(layout_menu_search_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1873 { "FindDupes", GTK_STOCK_FIND, N_("_Find duplicates..."), "D", N_("Find duplicates..."), CB(layout_menu_dupes_cb) }, |
2795
684ca84becd2
Additional toolbar icons
Colin Clark <colin.clark@cclark.uk>
parents:
2794
diff
changeset
|
1874 { "PanView", PIXBUF_INLINE_ICON_PANORAMA, N_("Pa_n view"), "<control>J", N_("Pan view"), CB(layout_menu_pan_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1875 { "Print", GTK_STOCK_PRINT, N_("_Print..."), "<shift>P", N_("Print..."), CB(layout_menu_print_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1876 { "NewFolder", GTK_STOCK_DIRECTORY, N_("N_ew folder..."), "<control>F", N_("New folder..."), CB(layout_menu_dir_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1877 { "Copy", GTK_STOCK_COPY, N_("_Copy..."), "<control>C", N_("Copy..."), CB(layout_menu_copy_cb) }, |
2812
865f7eab9b6d
Additional optional entries for the toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2801
diff
changeset
|
1878 { "Move", PIXBUF_INLINE_ICON_MOVE, N_("_Move..."), "<control>M", N_("Move..."), CB(layout_menu_move_cb) }, |
865f7eab9b6d
Additional optional entries for the toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2801
diff
changeset
|
1879 { "Rename", PIXBUF_INLINE_ICON_RENAME, N_("_Rename..."), "<control>R", N_("Rename..."), CB(layout_menu_rename_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1880 { "Delete", GTK_STOCK_DELETE, N_("_Delete..."), "<control>D", N_("Delete..."), CB(layout_menu_delete_cb) }, |
2420
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
1881 { "DeleteAlt1", GTK_STOCK_DELETE, N_("_Delete..."), "Delete", N_("Delete..."), CB(layout_menu_delete_key_cb) }, |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
1882 { "DeleteAlt2", GTK_STOCK_DELETE, N_("_Delete..."), "KP_Delete", N_("Delete..."), CB(layout_menu_delete_key_cb) }, |
1598
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
1883 { "EnableGrouping", NULL, N_("Enable file _grouping"), NULL, N_("Enable file grouping"), CB(layout_menu_enable_grouping_cb) }, |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
1884 { "DisableGrouping", NULL, N_("Disable file groupi_ng"), NULL, N_("Disable file grouping"), CB(layout_menu_disable_grouping_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1885 { "CopyPath", NULL, N_("_Copy path to clipboard"), NULL, N_("Copy path to clipboard"), CB(layout_menu_copy_path_cb) }, |
2663
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
1886 { "CopyPathUnquoted", NULL, N_("_Copy path unquoted to clipboard"), NULL, N_("Copy path unquoted to clipboard"), CB(layout_menu_copy_path_unquoted_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1887 { "CloseWindow", GTK_STOCK_CLOSE, N_("C_lose window"), "<control>W", N_("Close window"), CB(layout_menu_close_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1888 { "Quit", GTK_STOCK_QUIT, N_("_Quit"), "<control>Q", N_("Quit"), CB(layout_menu_exit_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1889 { "RotateCW", NULL, N_("_Rotate clockwise"), "bracketright", N_("Rotate clockwise"), CB(layout_menu_alter_90_cb) }, |
2500
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
1890 { "Rating0", NULL, N_("_Rating 0"), "<alt>KP_0", N_("Rating 0"), CB(layout_menu_rating_0_cb) }, |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
1891 { "Rating1", NULL, N_("_Rating 1"), "<alt>KP_1", N_("Rating 1"), CB(layout_menu_rating_1_cb) }, |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
1892 { "Rating2", NULL, N_("_Rating 2"), "<alt>KP_2", N_("Rating 2"), CB(layout_menu_rating_2_cb) }, |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
1893 { "Rating3", NULL, N_("_Rating 3"), "<alt>KP_3", N_("Rating 3"), CB(layout_menu_rating_3_cb) }, |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
1894 { "Rating4", NULL, N_("_Rating 4"), "<alt>KP_4", N_("Rating 4"), CB(layout_menu_rating_4_cb) }, |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
1895 { "Rating5", NULL, N_("_Rating 5"), "<alt>KP_5", N_("Rating 5"), CB(layout_menu_rating_5_cb) }, |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
1896 { "RatingM1", NULL, N_("_Rating -1"), "<alt>KP_Subtract", N_("Rating -1"), CB(layout_menu_rating_m1_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1897 { "RotateCCW", NULL, N_("Rotate _counterclockwise"), "bracketleft", N_("Rotate counterclockwise"), CB(layout_menu_alter_90cc_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1898 { "Rotate180", NULL, N_("Rotate 1_80"), "<shift>R", N_("Rotate 180"), CB(layout_menu_alter_180_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1899 { "Mirror", NULL, N_("_Mirror"), "<shift>M", N_("Mirror"), CB(layout_menu_alter_mirror_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1900 { "Flip", NULL, N_("_Flip"), "<shift>F", N_("Flip"), CB(layout_menu_alter_flip_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1901 { "AlterNone", NULL, N_("_Original state"), "<shift>O", N_("Original state"), CB(layout_menu_alter_none_cb) }, |
2812
865f7eab9b6d
Additional optional entries for the toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2801
diff
changeset
|
1902 { "SelectAll", PIXBUF_INLINE_ICON_SELECT_ALL, N_("Select _all"), "<control>A", N_("Select all"), CB(layout_menu_select_all_cb) }, |
865f7eab9b6d
Additional optional entries for the toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2801
diff
changeset
|
1903 { "SelectNone", PIXBUF_INLINE_ICON_SELECT_NONE, N_("Select _none"), "<control><shift>A", N_("Select none"), CB(layout_menu_unselect_all_cb) }, |
865f7eab9b6d
Additional optional entries for the toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2801
diff
changeset
|
1904 { "SelectInvert", PIXBUF_INLINE_ICON_SELECT_INVERT, N_("_Invert Selection"), "<control><shift>I", N_("Invert Selection"), CB(layout_menu_invert_selection_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1905 { "Preferences", GTK_STOCK_PREFERENCES, N_("P_references..."), "<control>O", N_("Preferences..."), CB(layout_menu_config_cb) }, |
2627
6863ac66a10b
Rename External Editors to Plugins
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
1906 { "Plugins", GTK_STOCK_PREFERENCES, N_("Configure _Plugins..."), NULL, N_("Configure Plugins..."), CB(layout_menu_editors_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1907 { "LayoutConfig", GTK_STOCK_PREFERENCES, N_("_Configure this window..."), NULL, N_("Configure this window..."), CB(layout_menu_layout_config_cb) }, |
2795
684ca84becd2
Additional toolbar icons
Colin Clark <colin.clark@cclark.uk>
parents:
2794
diff
changeset
|
1908 { "Maintenance", PIXBUF_INLINE_ICON_MAINTENANCE, N_("_Cache maintenance..."), NULL, N_("Cache maintenance..."), CB(layout_menu_remove_thumb_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1909 { "Wallpaper", NULL, N_("Set as _wallpaper"), NULL, N_("Set as wallpaper"), CB(layout_menu_wallpaper_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1910 { "SaveMetadata", GTK_STOCK_SAVE, N_("_Save metadata"), "<control>S", N_("Save metadata"), CB(layout_menu_metadata_write_cb) }, |
2824
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
1911 { "KeywordAutocomplete", NULL, N_("Keyword autocomplete"), "<alt>K", N_("Keyword Autocomplete"), CB(layout_menu_keyword_autocomplete_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1912 { "ZoomIn", GTK_STOCK_ZOOM_IN, N_("Zoom _in"), "equal", N_("Zoom in"), CB(layout_menu_zoom_in_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1913 { "ZoomInAlt1", GTK_STOCK_ZOOM_IN, N_("Zoom _in"), "KP_Add", N_("Zoom in"), CB(layout_menu_zoom_in_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1914 { "ZoomOut", GTK_STOCK_ZOOM_OUT, N_("Zoom _out"), "minus", N_("Zoom out"), CB(layout_menu_zoom_out_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1915 { "ZoomOutAlt1", GTK_STOCK_ZOOM_OUT, N_("Zoom _out"), "KP_Subtract", N_("Zoom out"), CB(layout_menu_zoom_out_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1916 { "Zoom100", GTK_STOCK_ZOOM_100, N_("Zoom _1:1"), "Z", N_("Zoom 1:1"), CB(layout_menu_zoom_1_1_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1917 { "Zoom100Alt1", GTK_STOCK_ZOOM_100, N_("Zoom _1:1"), "KP_Divide", N_("Zoom 1:1"), CB(layout_menu_zoom_1_1_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1918 { "ZoomFit", GTK_STOCK_ZOOM_FIT, N_("_Zoom to fit"), "X", N_("Zoom to fit"), CB(layout_menu_zoom_fit_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1919 { "ZoomFitAlt1", GTK_STOCK_ZOOM_FIT, N_("_Zoom to fit"), "KP_Multiply", N_("Zoom to fit"), CB(layout_menu_zoom_fit_cb) }, |
2795
684ca84becd2
Additional toolbar icons
Colin Clark <colin.clark@cclark.uk>
parents:
2794
diff
changeset
|
1920 { "ZoomFillHor", PIXBUF_INLINE_ICON_ZOOMFILLHOR, N_("Fit _Horizontally"), "H", N_("Fit Horizontally"), CB(layout_menu_zoom_fit_hor_cb) }, |
684ca84becd2
Additional toolbar icons
Colin Clark <colin.clark@cclark.uk>
parents:
2794
diff
changeset
|
1921 { "ZoomFillVert", PIXBUF_INLINE_ICON_ZOOMFILLVERT, N_("Fit _Vertically"), "W", N_("Fit Vertically"), CB(layout_menu_zoom_fit_vert_cb) }, |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
1922 { "Zoom200", GTK_STOCK_FILE, N_("Zoom _2:1"), NULL, N_("Zoom 2:1"), CB(layout_menu_zoom_2_1_cb) }, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
1923 { "Zoom300", GTK_STOCK_FILE, N_("Zoom _3:1"), NULL, N_("Zoom 3:1"), CB(layout_menu_zoom_3_1_cb) }, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
1924 { "Zoom400", GTK_STOCK_FILE, N_("Zoom _4:1"), NULL, N_("Zoom 4:1"), CB(layout_menu_zoom_4_1_cb) }, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
1925 { "Zoom50", GTK_STOCK_FILE, N_("Zoom 1:2"), NULL, N_("Zoom 1:2"), CB(layout_menu_zoom_1_2_cb) }, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
1926 { "Zoom33", GTK_STOCK_FILE, N_("Zoom 1:3"), NULL, N_("Zoom 1:3"), CB(layout_menu_zoom_1_3_cb) }, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
1927 { "Zoom25", GTK_STOCK_FILE, N_("Zoom 1:4"), NULL, N_("Zoom 1:4"), CB(layout_menu_zoom_1_4_cb) }, |
1619
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1928 { "ConnectZoomIn", GTK_STOCK_ZOOM_IN, N_("Zoom _in"), "plus", N_("Connected Zoom in"), CB(layout_menu_connect_zoom_in_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1929 { "ConnectZoomInAlt1",GTK_STOCK_ZOOM_IN, N_("Zoom _in"), "<shift>KP_Add", N_("Connected Zoom in"), CB(layout_menu_connect_zoom_in_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1930 { "ConnectZoomOut", GTK_STOCK_ZOOM_OUT, N_("Zoom _out"), "underscore", N_("Connected Zoom out"), CB(layout_menu_connect_zoom_out_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1931 { "ConnectZoomOutAlt1",GTK_STOCK_ZOOM_OUT, N_("Zoom _out"), "<shift>KP_Subtract", N_("Connected Zoom out"), CB(layout_menu_connect_zoom_out_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1932 { "ConnectZoom100", GTK_STOCK_ZOOM_100, N_("Zoom _1:1"), "<shift>Z", N_("Connected Zoom 1:1"), CB(layout_menu_connect_zoom_1_1_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1933 { "ConnectZoom100Alt1",GTK_STOCK_ZOOM_100, N_("Zoom _1:1"), "<shift>KP_Divide", N_("Connected Zoom 1:1"), CB(layout_menu_connect_zoom_1_1_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1934 { "ConnectZoomFit", GTK_STOCK_ZOOM_FIT, N_("_Zoom to fit"), "<shift>X", N_("Connected Zoom to fit"), CB(layout_menu_connect_zoom_fit_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1935 { "ConnectZoomFitAlt1",GTK_STOCK_ZOOM_FIT, N_("_Zoom to fit"), "<shift>KP_Multiply", N_("Connected Zoom to fit"), CB(layout_menu_connect_zoom_fit_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1936 { "ConnectZoomFillHor",NULL, N_("Fit _Horizontally"), "<shift>H", N_("Connected Fit Horizontally"), CB(layout_menu_connect_zoom_fit_hor_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1937 { "ConnectZoomFillVert",NULL, N_("Fit _Vertically"), "<shift>W", N_("Connected Fit Vertically"), CB(layout_menu_connect_zoom_fit_vert_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1938 { "ConnectZoom200", NULL, N_("Zoom _2:1"), NULL, N_("Connected Zoom 2:1"), CB(layout_menu_connect_zoom_2_1_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1939 { "ConnectZoom300", NULL, N_("Zoom _3:1"), NULL, N_("Connected Zoom 3:1"), CB(layout_menu_connect_zoom_3_1_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1940 { "ConnectZoom400", NULL, N_("Zoom _4:1"), NULL, N_("Connected Zoom 4:1"), CB(layout_menu_connect_zoom_4_1_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1941 { "ConnectZoom50", NULL, N_("Zoom 1:2"), NULL, N_("Connected Zoom 1:2"), CB(layout_menu_connect_zoom_1_2_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1942 { "ConnectZoom33", NULL, N_("Zoom 1:3"), NULL, N_("Connected Zoom 1:3"), CB(layout_menu_connect_zoom_1_3_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1943 { "ConnectZoom25", NULL, N_("Zoom 1:4"), NULL, N_("Connected Zoom 1:4"), CB(layout_menu_connect_zoom_1_4_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1944 { "ViewInNewWindow", NULL, N_("_View in new window"), "<control>V", N_("View in new window"), CB(layout_menu_view_in_new_window_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1945 { "FullScreen", GTK_STOCK_FULLSCREEN, N_("F_ull screen"), "F", N_("Full screen"), CB(layout_menu_fullscreen_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1946 { "FullScreenAlt1", GTK_STOCK_FULLSCREEN, N_("F_ull screen"), "V", N_("Full screen"), CB(layout_menu_fullscreen_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1947 { "FullScreenAlt2", GTK_STOCK_FULLSCREEN, N_("F_ull screen"), "F11", N_("Full screen"), CB(layout_menu_fullscreen_cb) }, |
1619
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1948 { "Escape", GTK_STOCK_LEAVE_FULLSCREEN,N_("_Leave full screen"), "Escape", N_("Leave full screen"), CB(layout_menu_escape_cb) }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
1949 { "EscapeAlt1", GTK_STOCK_LEAVE_FULLSCREEN,N_("_Leave full screen"), "Q", N_("Leave full screen"), CB(layout_menu_escape_cb) }, |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1950 { "ImageOverlayCycle",NULL, N_("_Cycle through overlay modes"), "I", N_("Cycle through Overlay modes"), CB(layout_menu_overlay_toggle_cb) }, |
1667
4482edafd1fa
simplified menu_item_add_radio usage
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1666
diff
changeset
|
1951 { "HistogramChanCycle",NULL, N_("Cycle through histogram ch_annels"),"K", N_("Cycle through histogram channels"), CB(layout_menu_histogram_toggle_channel_cb) }, |
4482edafd1fa
simplified menu_item_add_radio usage
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1666
diff
changeset
|
1952 { "HistogramModeCycle",NULL, N_("Cycle through histogram mo_des"), "J", N_("Cycle through histogram modes"), CB(layout_menu_histogram_toggle_mode_cb) }, |
2795
684ca84becd2
Additional toolbar icons
Colin Clark <colin.clark@cclark.uk>
parents:
2794
diff
changeset
|
1953 { "HideTools", PIXBUF_INLINE_ICON_HIDETOOLS, N_("_Hide file list"), "<control>H", N_("Hide file list"), CB(layout_menu_hide_cb) }, |
1588
b17229227941
added stock icons for slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1586
diff
changeset
|
1954 { "SlideShowPause", GTK_STOCK_MEDIA_PAUSE, N_("_Pause slideshow"), "P", N_("Pause slideshow"), CB(layout_menu_slideshow_pause_cb) }, |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
1955 { "SlideShowFaster", GTK_STOCK_FILE, N_("Faster"), "<control>KP_Add", N_("Faster"), CB(layout_menu_slideshow_faster_cb) }, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
1956 { "SlideShowSlower", GTK_STOCK_FILE, N_("Slower"), "<control>KP_Subtract", N_("Slower"), CB(layout_menu_slideshow_slower_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1957 { "Refresh", GTK_STOCK_REFRESH, N_("_Refresh"), "R", N_("Refresh"), CB(layout_menu_refresh_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1958 { "HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1", N_("Contents"), CB(layout_menu_help_cb) }, |
2756
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1959 { "HelpSearch", NULL, N_("On-line help search"), NULL, N_("On-line help search"), CB(layout_menu_help_search_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1960 { "HelpShortcuts", NULL, N_("_Keyboard shortcuts"), NULL, N_("Keyboard shortcuts"), CB(layout_menu_help_keys_cb) }, |
2362 | 1961 { "HelpKbd", NULL, N_("_Keyboard map"), NULL, N_("Keyboard map"), CB(layout_menu_kbd_map_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1962 { "HelpNotes", NULL, N_("_Release notes"), NULL, N_("Release notes"), CB(layout_menu_notes_cb) }, |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1963 { "HelpChangeLog", NULL, N_("_ChangeLog"), NULL, N_("ChangeLog notes"), CB(layout_menu_changelog_cb) }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1964 { "About", GTK_STOCK_ABOUT, N_("_About"), NULL, N_("About"), CB(layout_menu_about_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1965 { "LogWindow", NULL, N_("_Log Window"), NULL, N_("Log Window"), CB(layout_menu_log_window_cb) }, |
2795
684ca84becd2
Additional toolbar icons
Colin Clark <colin.clark@cclark.uk>
parents:
2794
diff
changeset
|
1966 { "ExifWin", PIXBUF_INLINE_ICON_EXIF, N_("_Exif window"), "<control>E", N_("Exif window"), CB(layout_menu_bar_exif_cb) }, |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1967 { "StereoCycle", NULL, N_("_Cycle through stereo modes"), NULL, N_("Cycle through stereo modes"), CB(layout_menu_stereo_mode_next_cb) }, |
2493
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1968 { "SplitNextPane", NULL, N_("_Next Pane"), "<alt>Right", N_("Next Pane"), CB(layout_menu_split_pane_next_cb) }, |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1969 { "SplitPreviousPane", NULL, N_("_Previous Pane"), "<alt>Left", N_("Previous Pane"), CB(layout_menu_split_pane_prev_cb) }, |
2517
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1970 { "SplitUpPane", NULL, N_("_Up Pane"), "<alt>Up", N_("Up Pane"), CB(layout_menu_split_pane_updown_cb) }, |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1971 { "SplitDownPane", NULL, N_("_Down Pane"), "<alt>Down", N_("Down Pane"), CB(layout_menu_split_pane_updown_cb) }, |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
1972 { "WriteRotation", NULL, N_("_Write orientation to file"), NULL, N_("Write orientation to file"), CB(layout_menu_write_rotate_cb) }, |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
1973 { "WriteRotationKeepDate", NULL, N_("_Write orientation to file (preserve timestamp)"), NULL, N_("Write orientation to file (preserve timestamp)"), CB(layout_menu_write_rotate_keep_date_cb) }, |
2750
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
1974 { "ClearMarks", NULL, N_("Clear Marks..."), NULL, N_("Clear Marks"), CB(layout_menu_clear_marks_cb) }, |
9 | 1975 }; |
1976 | |
1977 static GtkToggleActionEntry menu_toggle_entries[] = { | |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1978 { "Thumbnails", PIXBUF_INLINE_ICON_THUMB,N_("Show _Thumbnails"), "T", N_("Show Thumbnails"), CB(layout_menu_thumb_cb), FALSE }, |
2795
684ca84becd2
Additional toolbar icons
Colin Clark <colin.clark@cclark.uk>
parents:
2794
diff
changeset
|
1979 { "ShowMarks", PIXBUF_INLINE_ICON_MARKS, N_("Show _Marks"), "M", N_("Show Marks"), CB(layout_menu_marks_cb), FALSE }, |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1980 { "ShowFileFilter", PIXBUF_INLINE_ICON_FILE_FILTER, N_("Show File Filter"), NULL, N_("Show File Filter"), CB(layout_menu_file_filter_cb), FALSE }, |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
1981 { "ShowInfoPixel", GTK_STOCK_COLOR_PICKER, N_("Pi_xel Info"), NULL, N_("Show Pixel Info"), CB(layout_menu_info_pixel_cb), FALSE }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1982 { "FloatTools", PIXBUF_INLINE_ICON_FLOAT,N_("_Float file list"), "L", N_("Float file list"), CB(layout_menu_float_cb), FALSE }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1983 { "HideToolbar", NULL, N_("Hide tool_bar"), NULL, N_("Hide toolbar"), CB(layout_menu_toolbar_cb), FALSE }, |
2795
684ca84becd2
Additional toolbar icons
Colin Clark <colin.clark@cclark.uk>
parents:
2794
diff
changeset
|
1984 { "SBar", PIXBUF_INLINE_ICON_INFO, N_("_Info sidebar"), "<control>K", N_("Info sidebar"), CB(layout_menu_bar_cb), FALSE }, |
684ca84becd2
Additional toolbar icons
Colin Clark <colin.clark@cclark.uk>
parents:
2794
diff
changeset
|
1985 { "SBarSort", PIXBUF_INLINE_ICON_SORT, N_("Sort _manager"), "<shift>S", N_("Sort manager"), CB(layout_menu_bar_sort_cb), FALSE }, |
2506
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1986 { "HideBars", NULL, N_("Hide Bars"), "grave", N_("Hide Bars"), CB(layout_menu_hide_bars_cb), FALSE }, |
1588
b17229227941
added stock icons for slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1586
diff
changeset
|
1987 { "SlideShow", GTK_STOCK_MEDIA_PLAY, N_("Toggle _slideshow"), "S", N_("Toggle slideshow"), CB(layout_menu_slideshow_cb), FALSE }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1988 { "UseColorProfiles", GTK_STOCK_SELECT_COLOR, N_("Use _color profiles"), NULL, N_("Use color profiles"), CB(layout_color_menu_enable_cb), FALSE}, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1989 { "UseImageProfile", NULL, N_("Use profile from _image"), NULL, N_("Use profile from image"), CB(layout_color_menu_use_image_cb), FALSE}, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1990 { "Grayscale", NULL, N_("Toggle _grayscale"), "<shift>G", N_("Toggle grayscale"), CB(layout_menu_alter_desaturate_cb), FALSE}, |
1692
e31990e61dd3
fixed mnemonic conflicts
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1678
diff
changeset
|
1991 { "ImageOverlay", NULL, N_("Image _Overlay"), NULL, N_("Image Overlay"), CB(layout_menu_overlay_cb), FALSE }, |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1992 { "ImageHistogram", NULL, N_("_Show Histogram"), NULL, N_("Show Histogram"), CB(layout_menu_histogram_cb), FALSE }, |
2794
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
1993 { "ImageGuidelines", PIXBUF_INLINE_ICON_GUIDELINES, N_("_Show Guidelines"), NULL, N_("Show Guidelines"), CB(layout_menu_guidelines_cb), FALSE }, |
2812
865f7eab9b6d
Additional optional entries for the toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2801
diff
changeset
|
1994 { "RectangularSelection", PIXBUF_INLINE_ICON_SELECT_RECTANGLE, N_("Rectangular Selection"), "<alt>R", N_("Rectangular Selection"), CB(layout_menu_rectangular_selection_cb), FALSE }, |
2433 | 1995 { "Animate", NULL, N_("GIF _animation"), "A", N_("Toggle GIF animation"), CB(layout_menu_animate_cb), FALSE }, |
2438
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
1996 { "ExifRotate", GTK_STOCK_ORIENTATION_PORTRAIT, N_("_Exif rotate"), "<alt>X", N_("Exif rotate"), CB(layout_menu_exif_rotate_cb), FALSE }, |
2801
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
1997 { "DrawRectangle", PIXBUF_INLINE_ICON_DRAW_RECTANGLE, N_("Draw Rectangle"), NULL, N_("Draw Rectangle"), CB(layout_menu_select_rectangle_cb), FALSE }, |
9 | 1998 }; |
1999 | |
2000 static GtkRadioActionEntry menu_radio_entries[] = { | |
1668
238bf773ac46
use radio buttons for file and dir mode in popup menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1667
diff
changeset
|
2001 { "ViewList", NULL, N_("Image _List"), "<control>L", N_("View Images as List"), FILEVIEW_LIST }, |
238bf773ac46
use radio buttons for file and dir mode in popup menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1667
diff
changeset
|
2002 { "ViewIcons", NULL, N_("I_cons"), "<control>I", N_("View Images as Icons"), FILEVIEW_ICON } |
1666
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2003 }; |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2004 |
2461
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
2005 static GtkToggleActionEntry menu_view_dir_toggle_entries[] = { |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
2006 { "FolderTree", NULL, N_("T_oggle Folder View"), "<control>T", N_("Toggle Folders View"), CB(layout_menu_view_dir_as_cb),FALSE }, |
9 | 2007 }; |
2008 | |
156
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
2009 static GtkRadioActionEntry menu_split_radio_entries[] = { |
1619
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2010 { "SplitHorizontal", NULL, N_("_Horizontal"), "E", N_("Split Horizontal"), SPLIT_HOR }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2011 { "SplitVertical", NULL, N_("_Vertical"), "U", N_("Split Vertical"), SPLIT_VERT }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2012 { "SplitQuad", NULL, N_("_Quad"), NULL, N_("Split Quad"), SPLIT_QUAD }, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2013 { "SplitSingle", NULL, N_("_Single"), "Y", N_("Split Single"), SPLIT_NONE } |
156
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
2014 }; |
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
2015 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2016 static GtkRadioActionEntry menu_color_radio_entries[] = { |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
2017 { "ColorProfile0", NULL, N_("Input _0: sRGB"), NULL, N_("Input 0: sRGB"), COLOR_PROFILE_SRGB }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
2018 { "ColorProfile1", NULL, N_("Input _1: AdobeRGB compatible"), NULL, N_("Input 1: AdobeRGB compatible"), COLOR_PROFILE_ADOBERGB }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
2019 { "ColorProfile2", NULL, N_("Input _2"), NULL, N_("Input 2"), COLOR_PROFILE_FILE }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
2020 { "ColorProfile3", NULL, N_("Input _3"), NULL, N_("Input 3"), COLOR_PROFILE_FILE + 1 }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
2021 { "ColorProfile4", NULL, N_("Input _4"), NULL, N_("Input 4"), COLOR_PROFILE_FILE + 2 }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
2022 { "ColorProfile5", NULL, N_("Input _5"), NULL, N_("Input 5"), COLOR_PROFILE_FILE + 3 } |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2023 }; |
380
41079d11eba7
Introduce a new struct ViewDir to handle directory views common
Laurent Monin <geeqie@norz.org>
parents:
343
diff
changeset
|
2024 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2025 static GtkRadioActionEntry menu_histogram_channel[] = { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2026 { "HistogramChanR", NULL, N_("Histogram on _Red"), NULL, N_("Histogram on Red"), HCHAN_R }, |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2027 { "HistogramChanG", NULL, N_("Histogram on _Green"), NULL, N_("Histogram on Green"), HCHAN_G }, |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2028 { "HistogramChanB", NULL, N_("Histogram on _Blue"), NULL, N_("Histogram on Blue"), HCHAN_B }, |
1667
4482edafd1fa
simplified menu_item_add_radio usage
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1666
diff
changeset
|
2029 { "HistogramChanRGB", NULL, N_("_Histogram on RGB"), NULL, N_("Histogram on RGB"), HCHAN_RGB }, |
4482edafd1fa
simplified menu_item_add_radio usage
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1666
diff
changeset
|
2030 { "HistogramChanV", NULL, N_("Histogram on _Value"), NULL, N_("Histogram on Value"), HCHAN_MAX } |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2031 }; |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2032 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2033 static GtkRadioActionEntry menu_histogram_mode[] = { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2034 { "HistogramModeLin", NULL, N_("Li_near Histogram"), NULL, N_("Linear Histogram"), 0 }, |
1692
e31990e61dd3
fixed mnemonic conflicts
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1678
diff
changeset
|
2035 { "HistogramModeLog", NULL, N_("_Log Histogram"), NULL, N_("Log Histogram"), 1 }, |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2036 }; |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2037 |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2038 static GtkRadioActionEntry menu_stereo_mode_entries[] = { |
1888
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
2039 { "StereoAuto", NULL, N_("_Auto"), NULL, N_("Stereo Auto"), STEREO_PIXBUF_DEFAULT }, |
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
2040 { "StereoSBS", NULL, N_("_Side by Side"), NULL, N_("Stereo Side by Side"), STEREO_PIXBUF_SBS }, |
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
2041 { "StereoCross", NULL, N_("_Cross"), NULL, N_("Stereo Cross"), STEREO_PIXBUF_CROSS }, |
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
2042 { "StereoOff", NULL, N_("_Off"), NULL, N_("Stereo Off"), STEREO_PIXBUF_NONE } |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2043 }; |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2044 |
1666
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2045 |
9 | 2046 #undef CB |
2047 | |
1000
07f6093c1c1a
For the sake of consistency, use glib basic types everywhere.
Laurent Monin <geeqie@norz.org>
parents:
995
diff
changeset
|
2048 static const gchar *menu_ui_description = |
9 | 2049 "<ui>" |
2050 " <menubar name='MainMenu'>" | |
2051 " <menu action='FileMenu'>" | |
2052 " <menuitem action='NewWindow'/>" | |
2053 " <menuitem action='NewCollection'/>" | |
2054 " <menuitem action='OpenCollection'/>" | |
2055 " <menuitem action='OpenRecent'/>" | |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2056 " <placeholder name='OpenSection'/>" |
9 | 2057 " <separator/>" |
2058 " <menuitem action='Search'/>" | |
2059 " <menuitem action='FindDupes'/>" | |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2060 " <placeholder name='SearchSection'/>" |
9 | 2061 " <separator/>" |
2062 " <menuitem action='Print'/>" | |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2063 " <placeholder name='PrintSection'/>" |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2064 " <separator/>" |
9 | 2065 " <menuitem action='NewFolder'/>" |
2066 " <menuitem action='Copy'/>" | |
2067 " <menuitem action='Move'/>" | |
2068 " <menuitem action='Rename'/>" | |
2069 " <menuitem action='Delete'/>" | |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2070 " <placeholder name='FileOpsSection'/>" |
9 | 2071 " <separator/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2072 " <placeholder name='QuitSection'/>" |
9 | 2073 " <menuitem action='CloseWindow'/>" |
2074 " <menuitem action='Quit'/>" | |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2075 " <separator/>" |
9 | 2076 " </menu>" |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2077 " <menu action='GoMenu'>" |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2078 " <menuitem action='FirstImage'/>" |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2079 " <menuitem action='PrevImage'/>" |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2080 " <menuitem action='NextImage'/>" |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2081 " <menuitem action='LastImage'/>" |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2082 " <separator/>" |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
2083 " <menuitem action='Back'/>" |
2609
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
2084 " <menuitem action='Forward'/>" |
2263
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
2085 " <menuitem action='Up'/>" |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
2086 " <menuitem action='Home'/>" |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
2087 " <separator/>" |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2088 " </menu>" |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2089 " <menu action='SelectMenu'>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2090 " <menuitem action='SelectAll'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2091 " <menuitem action='SelectNone'/>" |
601
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
2092 " <menuitem action='SelectInvert'/>" |
2423 | 2093 " <menuitem action='RectangularSelection'/>" |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
2094 " <menuitem action='ShowFileFilter'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2095 " <placeholder name='SelectSection'/>" |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2096 " <separator/>" |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2097 " <menuitem action='CopyPath'/>" |
2663
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
2098 " <menuitem action='CopyPathUnquoted'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2099 " <placeholder name='ClipboardSection'/>" |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2100 " <separator/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2101 " <menuitem action='ShowMarks'/>" |
2750
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
2102 " <menuitem action='ClearMarks'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2103 " <placeholder name='MarksSection'/>" |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2104 " <separator/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2105 " </menu>" |
9 | 2106 " <menu action='EditMenu'>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2107 " <placeholder name='EditSection'/>" |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2108 " <separator/>" |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
2109 " <menu action='OrientationMenu'>" |
9 | 2110 " <menuitem action='RotateCW'/>" |
2111 " <menuitem action='RotateCCW'/>" | |
2112 " <menuitem action='Rotate180'/>" | |
2113 " <menuitem action='Mirror'/>" | |
2114 " <menuitem action='Flip'/>" | |
439
a529755a2be0
Add a way to restore original state in Adjust menu.
Laurent Monin <geeqie@norz.org>
parents:
433
diff
changeset
|
2115 " <menuitem action='AlterNone'/>" |
2438
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
2116 " <separator/>" |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
2117 " <menuitem action='ExifRotate'/>" |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
2118 " <separator/>" |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
2119 " <menuitem action='WriteRotation'/>" |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
2120 " <menuitem action='WriteRotationKeepDate'/>" |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
2121 " <separator/>" |
9 | 2122 " </menu>" |
2500
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2123 " <menu action='RatingMenu'>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2124 " <menuitem action='Rating0'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2125 " <menuitem action='Rating1'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2126 " <menuitem action='Rating2'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2127 " <menuitem action='Rating3'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2128 " <menuitem action='Rating4'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2129 " <menuitem action='Rating5'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2130 " <menuitem action='RatingM1'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2131 " <separator/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2132 " </menu>" |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2133 " <menuitem action='SaveMetadata'/>" |
2824
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2818
diff
changeset
|
2134 " <menuitem action='KeywordAutocomplete'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2135 " <placeholder name='PropertiesSection'/>" |
9 | 2136 " <separator/>" |
2801
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
2137 " <menuitem action='DrawRectangle'/>" |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
2138 " <separator/>" |
2622
cad1ce03590d
Remove GQView legacy items from menu; update docs
Colin Clark <colin.clark@cclark.uk>
parents:
2619
diff
changeset
|
2139 " <menuitem action='Preferences'/>" |
2627
6863ac66a10b
Rename External Editors to Plugins
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
2140 " <menuitem action='Plugins'/>" |
2622
cad1ce03590d
Remove GQView legacy items from menu; update docs
Colin Clark <colin.clark@cclark.uk>
parents:
2619
diff
changeset
|
2141 " <menuitem action='LayoutConfig'/>" |
cad1ce03590d
Remove GQView legacy items from menu; update docs
Colin Clark <colin.clark@cclark.uk>
parents:
2619
diff
changeset
|
2142 " <menuitem action='Maintenance'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2143 " <placeholder name='PreferencesSection'/>" |
9 | 2144 " <separator/>" |
2499
92345664aa61
Ref #202: "Set as wallpaper" doesn't work with GNOME Shell
Colin Clark <colin.clark@cclark.uk>
parents:
2494
diff
changeset
|
2145 #if !GTK_CHECK_VERSION(3,0,0) |
9 | 2146 " <menuitem action='Wallpaper'/>" |
2499
92345664aa61
Ref #202: "Set as wallpaper" doesn't work with GNOME Shell
Colin Clark <colin.clark@cclark.uk>
parents:
2494
diff
changeset
|
2147 #endif |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2148 " <separator/>" |
9 | 2149 " </menu>" |
2627
6863ac66a10b
Rename External Editors to Plugins
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
2150 " <menu action='PluginsMenu'>" |
6863ac66a10b
Rename External Editors to Plugins
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
2151 " </menu>" |
9 | 2152 " <menu action='ViewMenu'>" |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2153 " <menuitem action='ViewInNewWindow'/>" |
1285
9859a20cda13
improved labels of some menu items
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1284
diff
changeset
|
2154 " <menuitem action='PanView'/>" |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2155 " <menuitem action='ExifWin'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2156 " <placeholder name='WindowSection'/>" |
9 | 2157 " <separator/>" |
1666
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2158 " <menu action='FileDirMenu'>" |
380
41079d11eba7
Introduce a new struct ViewDir to handle directory views common
Laurent Monin <geeqie@norz.org>
parents:
343
diff
changeset
|
2159 " <menuitem action='FolderTree'/>" |
1666
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2160 " <placeholder name='FolderSection'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2161 " <separator/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2162 " <menuitem action='ViewList'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2163 " <menuitem action='ViewIcons'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2164 " <menuitem action='Thumbnails'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2165 " <placeholder name='ListSection'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2166 " <separator/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2167 " <menuitem action='FloatTools'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2168 " <menuitem action='HideTools'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2169 " <menuitem action='HideToolbar'/>" |
380
41079d11eba7
Introduce a new struct ViewDir to handle directory views common
Laurent Monin <geeqie@norz.org>
parents:
343
diff
changeset
|
2170 " </menu>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2171 " <placeholder name='DirSection'/>" |
380
41079d11eba7
Introduce a new struct ViewDir to handle directory views common
Laurent Monin <geeqie@norz.org>
parents:
343
diff
changeset
|
2172 " <separator/>" |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2173 " <menu action='ZoomMenu'>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2174 " <menu action='ConnectZoomMenu'>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2175 " <menuitem action='ConnectZoomIn'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2176 " <menuitem action='ConnectZoomOut'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2177 " <menuitem action='ConnectZoomFit'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2178 " <menuitem action='ConnectZoomFillHor'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2179 " <menuitem action='ConnectZoomFillVert'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2180 " <menuitem action='ConnectZoom100'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2181 " <menuitem action='ConnectZoom200'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2182 " <menuitem action='ConnectZoom300'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2183 " <menuitem action='ConnectZoom400'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2184 " <menuitem action='ConnectZoom50'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2185 " <menuitem action='ConnectZoom33'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2186 " <menuitem action='ConnectZoom25'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2187 " </menu>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2188 " <menuitem action='ZoomIn'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2189 " <menuitem action='ZoomOut'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2190 " <menuitem action='ZoomFit'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2191 " <menuitem action='ZoomFillHor'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2192 " <menuitem action='ZoomFillVert'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2193 " <menuitem action='Zoom100'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2194 " <menuitem action='Zoom200'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2195 " <menuitem action='Zoom300'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2196 " <menuitem action='Zoom400'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2197 " <menuitem action='Zoom50'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2198 " <menuitem action='Zoom33'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2199 " <menuitem action='Zoom25'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2200 " </menu>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2201 " <menu action='SplitMenu'>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2202 " <menuitem action='SplitHorizontal'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2203 " <menuitem action='SplitVertical'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2204 " <menuitem action='SplitQuad'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2205 " <menuitem action='SplitSingle'/>" |
2493
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
2206 " <separator/>" |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
2207 " <menuitem action='SplitNextPane'/>" |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
2208 " <menuitem action='SplitPreviousPane'/>" |
2517
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
2209 " <menuitem action='SplitUpPane'/>" |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
2210 " <menuitem action='SplitDownPane'/>" |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2211 " </menu>" |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2212 " <menu action='StereoMenu'>" |
1888
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
2213 " <menuitem action='StereoAuto'/>" |
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
2214 " <menuitem action='StereoSBS'/>" |
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
2215 " <menuitem action='StereoCross'/>" |
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
2216 " <menuitem action='StereoOff'/>" |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
2217 " <separator/>" |
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
2218 " <menuitem action='StereoCycle'/>" |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2219 " </menu>" |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2220 " <menu action='ColorMenu'>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2221 " <menuitem action='UseColorProfiles'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2222 " <menuitem action='UseImageProfile'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2223 " <menuitem action='ColorProfile0'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2224 " <menuitem action='ColorProfile1'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2225 " <menuitem action='ColorProfile2'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2226 " <menuitem action='ColorProfile3'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2227 " <menuitem action='ColorProfile4'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2228 " <menuitem action='ColorProfile5'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2229 " <separator/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2230 " <menuitem action='Grayscale'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2231 " </menu>" |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2232 " <menu action='OverlayMenu'>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2233 " <menuitem action='ImageOverlay'/>" |
2794
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
2234 " <menuitem action='ImageGuidelines'/>" |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2235 " <menuitem action='ImageHistogram'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2236 " <menuitem action='ImageOverlayCycle'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2237 " <separator/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2238 " <menuitem action='HistogramChanR'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2239 " <menuitem action='HistogramChanG'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2240 " <menuitem action='HistogramChanB'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2241 " <menuitem action='HistogramChanRGB'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2242 " <menuitem action='HistogramChanV'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2243 " <menuitem action='HistogramChanCycle'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2244 " <separator/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2245 " <menuitem action='HistogramModeLin'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2246 " <menuitem action='HistogramModeLog'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2247 " <menuitem action='HistogramModeCycle'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2248 " </menu>" |
9 | 2249 " <menuitem action='FullScreen'/>" |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2250 " <placeholder name='ViewSection'/>" |
9 | 2251 " <separator/>" |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2252 " <menuitem action='SBar'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2253 " <menuitem action='SBarSort'/>" |
2506
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
2254 " <menuitem action='HideBars'/>" |
1584
c97dea5d82d7
improved pixel info, changed the menu entry from "Hide" to "Show",
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1583
diff
changeset
|
2255 " <menuitem action='ShowInfoPixel'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2256 " <placeholder name='ToolsSection'/>" |
9 | 2257 " <separator/>" |
2433 | 2258 " <menuitem action='Animate'/>" |
9 | 2259 " <menuitem action='SlideShow'/>" |
428
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2260 " <menuitem action='SlideShowPause'/>" |
2590
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
2261 " <menuitem action='SlideShowFaster'/>" |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
2262 " <menuitem action='SlideShowSlower'/>" |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
2263 " <separator/>" |
9 | 2264 " <menuitem action='Refresh'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2265 " <placeholder name='SlideShowSection'/>" |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2266 " <separator/>" |
9 | 2267 " </menu>" |
2268 " <menu action='HelpMenu'>" | |
2269 " <separator/>" | |
2270 " <menuitem action='HelpContents'/>" | |
2756
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
2271 " <menuitem action='HelpSearch'/>" |
9 | 2272 " <menuitem action='HelpShortcuts'/>" |
2362 | 2273 " <menuitem action='HelpKbd'/>" |
9 | 2274 " <menuitem action='HelpNotes'/>" |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
2275 " <menuitem action='HelpChangeLog'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2276 " <placeholder name='HelpSection'/>" |
9 | 2277 " <separator/>" |
2278 " <menuitem action='About'/>" | |
678
fbb7a20c06b7
Add a log window that shows normal and debug messages. For now, it was added to Help menu.
Laurent Monin <geeqie@norz.org>
parents:
654
diff
changeset
|
2279 " <separator/>" |
fbb7a20c06b7
Add a log window that shows normal and debug messages. For now, it was added to Help menu.
Laurent Monin <geeqie@norz.org>
parents:
654
diff
changeset
|
2280 " <menuitem action='LogWindow'/>" |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2281 " <separator/>" |
9 | 2282 " </menu>" |
2283 " </menubar>" | |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
2284 " <toolbar name='ToolBar'>" |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
2285 " </toolbar>" |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2286 " <toolbar name='StatusBar'>" |
2438
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
2287 " <toolitem action='ExifRotate'/>" |
2340
9e9ab4e63900
Remove some leftover from toolbar rc entries
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2339
diff
changeset
|
2288 " <toolitem action='ShowInfoPixel'/>" |
9e9ab4e63900
Remove some leftover from toolbar rc entries
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2339
diff
changeset
|
2289 " <toolitem action='UseColorProfiles'/>" |
9e9ab4e63900
Remove some leftover from toolbar rc entries
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2339
diff
changeset
|
2290 " <toolitem action='SaveMetadata'/>" |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2291 " </toolbar>" |
428
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2292 "<accelerator action='PrevImageAlt1'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2293 "<accelerator action='PrevImageAlt2'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2294 "<accelerator action='NextImageAlt1'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2295 "<accelerator action='NextImageAlt2'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2296 "<accelerator action='DeleteAlt1'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2297 "<accelerator action='DeleteAlt2'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2298 "<accelerator action='FullScreenAlt1'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2299 "<accelerator action='FullScreenAlt2'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2300 "<accelerator action='Escape'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2301 "<accelerator action='EscapeAlt1'/>" |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2302 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2303 "<accelerator action='ZoomInAlt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2304 "<accelerator action='ZoomOutAlt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2305 "<accelerator action='Zoom100Alt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2306 "<accelerator action='ZoomFitAlt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2307 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2308 "<accelerator action='ConnectZoomInAlt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2309 "<accelerator action='ConnectZoomOutAlt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2310 "<accelerator action='ConnectZoom100Alt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2311 "<accelerator action='ConnectZoomFitAlt1'/>" |
9 | 2312 "</ui>"; |
2313 | |
2314 static gchar *menu_translate(const gchar *path, gpointer data) | |
2315 { | |
1004
370281d151da
Silent a compiler warning.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
2316 return (gchar *)(_(path)); |
9 | 2317 } |
2318 | |
1433
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
2319 static void layout_actions_setup_mark(LayoutWindow *lw, gint mark, gchar *name_tmpl, |
1619
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2320 gchar *label_tmpl, gchar *accel_tmpl, gchar *tooltip_tmpl, GCallback cb) |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2321 { |
894 | 2322 gchar name[50]; |
2323 gchar label[100]; | |
2324 gchar accel[50]; | |
1619
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2325 gchar tooltip[100]; |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2326 GtkActionEntry entry = { name, NULL, label, accel, tooltip, cb }; |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2327 GtkAction *action; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2328 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2329 g_snprintf(name, sizeof(name), name_tmpl, mark); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2330 g_snprintf(label, sizeof(label), label_tmpl, mark); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2331 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2332 if (accel_tmpl) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2333 g_snprintf(accel, sizeof(accel), accel_tmpl, mark % 10); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2334 else |
1619
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2335 entry.accelerator = NULL; |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2336 |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2337 if (tooltip_tmpl) |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2338 g_snprintf(tooltip, sizeof(tooltip), tooltip_tmpl, mark); |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2339 else |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2340 entry.tooltip = NULL; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2341 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2342 gtk_action_group_add_actions(lw->action_group, &entry, 1, lw); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2343 action = gtk_action_group_get_action(lw->action_group, name); |
2600
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2344 g_object_set_data(G_OBJECT(action), "mark_num", GINT_TO_POINTER(mark > 0 ? mark : 10)); |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2345 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2346 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2347 static void layout_actions_setup_marks(LayoutWindow *lw) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2348 { |
894 | 2349 gint mark; |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2350 GError *error; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2351 GString *desc = g_string_new( |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2352 "<ui>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2353 " <menubar name='MainMenu'>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2354 " <menu action='SelectMenu'>"); |
442 | 2355 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2356 for (mark = 1; mark <= FILEDATA_MARKS_SIZE; mark++) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2357 { |
2600
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2358 gint i = (mark < 10 ? mark : 0); |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2359 |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2360 layout_actions_setup_mark(lw, i, "Mark%d", _("Mark _%d"), NULL, NULL, NULL); |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2361 layout_actions_setup_mark(lw, i, "SetMark%d", _("_Set mark %d"), NULL, _("Set mark %d"), G_CALLBACK(layout_menu_set_mark_sel_cb)); |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2362 layout_actions_setup_mark(lw, i, "ResetMark%d", _("_Reset mark %d"), NULL, _("Reset mark %d"), G_CALLBACK(layout_menu_res_mark_sel_cb)); |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2363 layout_actions_setup_mark(lw, i, "ToggleMark%d", _("_Toggle mark %d"), "%d", _("Toggle mark %d"), G_CALLBACK(layout_menu_toggle_mark_sel_cb)); |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2364 layout_actions_setup_mark(lw, i, "ToggleMark%dAlt1", _("_Toggle mark %d"), "KP_%d", _("Toggle mark %d"), G_CALLBACK(layout_menu_toggle_mark_sel_cb)); |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2365 layout_actions_setup_mark(lw, i, "SelectMark%d", _("Se_lect mark %d"), "<control>%d", _("Select mark %d"), G_CALLBACK(layout_menu_sel_mark_cb)); |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2366 layout_actions_setup_mark(lw, i, "SelectMark%dAlt1", _("_Select mark %d"), "<control>KP_%d", _("Select mark %d"), G_CALLBACK(layout_menu_sel_mark_cb)); |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2367 layout_actions_setup_mark(lw, i, "AddMark%d", _("_Add mark %d"), NULL, _("Add mark %d"), G_CALLBACK(layout_menu_sel_mark_or_cb)); |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2368 layout_actions_setup_mark(lw, i, "IntMark%d", _("_Intersection with mark %d"), NULL, _("Intersection with mark %d"), G_CALLBACK(layout_menu_sel_mark_and_cb)); |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2369 layout_actions_setup_mark(lw, i, "UnselMark%d", _("_Unselect mark %d"), NULL, _("Unselect mark %d"), G_CALLBACK(layout_menu_sel_mark_minus_cb)); |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2370 layout_actions_setup_mark(lw, i, "FilterMark%d", _("_Filter mark %d"), NULL, _("Filter mark %d"), G_CALLBACK(layout_menu_mark_filter_toggle_cb)); |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2371 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2372 g_string_append_printf(desc, |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2373 " <menu action='Mark%d'>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2374 " <menuitem action='ToggleMark%d'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2375 " <menuitem action='SetMark%d'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2376 " <menuitem action='ResetMark%d'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2377 " <separator/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2378 " <menuitem action='SelectMark%d'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2379 " <menuitem action='AddMark%d'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2380 " <menuitem action='IntMark%d'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2381 " <menuitem action='UnselMark%d'/>" |
1635
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
2382 " <separator/>" |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
2383 " <menuitem action='FilterMark%d'/>" |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2384 " </menu>", |
2600
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2385 i, i, i, i, i, i, i, i, i); |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2386 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2387 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2388 g_string_append(desc, |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2389 " </menu>" |
429
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2390 " </menubar>"); |
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2391 for (mark = 1; mark <= FILEDATA_MARKS_SIZE; mark++) |
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2392 { |
2600
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2393 gint i = (mark < 10 ? mark : 0); |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2394 |
429
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2395 g_string_append_printf(desc, |
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2396 "<accelerator action='ToggleMark%dAlt1'/>" |
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2397 "<accelerator action='SelectMark%dAlt1'/>", |
2600
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2398 i, i); |
429
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2399 } |
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2400 g_string_append(desc, "</ui>" ); |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2401 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2402 error = NULL; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2403 if (!gtk_ui_manager_add_ui_from_string(lw->ui_manager, desc->str, -1, &error)) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2404 { |
512
0896f486ec6f
Remove whitespace between function name and first parenthesis for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents:
497
diff
changeset
|
2405 g_message("building menus failed: %s", error->message); |
0896f486ec6f
Remove whitespace between function name and first parenthesis for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents:
497
diff
changeset
|
2406 g_error_free(error); |
0896f486ec6f
Remove whitespace between function name and first parenthesis for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents:
497
diff
changeset
|
2407 exit(EXIT_FAILURE); |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2408 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2409 g_string_free(desc, TRUE); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2410 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2411 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2412 static GList *layout_actions_editor_menu_path(EditorDescription *editor) |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2413 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2414 gchar **split = g_strsplit(editor->menu_path, "/", 0); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2415 gint i = 0; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2416 GList *ret = NULL; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2417 |
2184 | 2418 if (split[0] == NULL) |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2419 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2420 g_strfreev(split); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2421 return NULL; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2422 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2423 |
1348
fb163bad4f27
Add missing space between while and first parenthesis.
Laurent Monin <geeqie@norz.org>
parents:
1345
diff
changeset
|
2424 while (split[i]) |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2425 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2426 ret = g_list_prepend(ret, g_strdup(split[i])); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2427 i++; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2428 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2429 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2430 g_strfreev(split); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2431 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2432 ret = g_list_prepend(ret, g_strdup(editor->key)); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2433 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2434 return g_list_reverse(ret); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2435 } |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2436 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2437 static void layout_actions_editor_add(GString *desc, GList *path, GList *old_path) |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2438 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2439 gint to_open, to_close, i; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2440 while (path && old_path && strcmp((gchar *)path->data, (gchar *)old_path->data) == 0) |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2441 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2442 path = path->next; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2443 old_path = old_path->next; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2444 } |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2445 to_open = g_list_length(path) - 1; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2446 to_close = g_list_length(old_path) - 1; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2447 |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2448 if (to_close > 0) |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2449 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2450 old_path = g_list_last(old_path); |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2451 old_path = old_path->prev; |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2452 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2453 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2454 for (i = 0; i < to_close; i++) |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2455 { |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2456 gchar *name = old_path->data; |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2457 if (g_str_has_suffix(name, "Section")) |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2458 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2459 g_string_append(desc, " </placeholder>"); |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2460 } |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2461 else if (g_str_has_suffix(name, "Menu")) |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2462 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2463 g_string_append(desc, " </menu>"); |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2464 } |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2465 else |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2466 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2467 g_warning("invalid menu path item %s", name); |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2468 } |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2469 old_path = old_path->prev; |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2470 } |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2471 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2472 for (i = 0; i < to_open; i++) |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2473 { |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2474 gchar *name = path->data; |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2475 if (g_str_has_suffix(name, "Section")) |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2476 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2477 g_string_append_printf(desc, " <placeholder name='%s'>", name); |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2478 } |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2479 else if (g_str_has_suffix(name, "Menu")) |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2480 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2481 g_string_append_printf(desc, " <menu action='%s'>", name); |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2482 } |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2483 else |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2484 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2485 g_warning("invalid menu path item %s", name); |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2486 } |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2487 path = path->next; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2488 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2489 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2490 if (path) |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2491 g_string_append_printf(desc, " <menuitem action='%s'/>", (gchar *)path->data); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2492 } |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2493 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2494 static void layout_actions_setup_editors(LayoutWindow *lw) |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2495 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2496 GError *error; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2497 GList *editors_list; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2498 GList *work; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2499 GList *old_path; |
1463
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2500 GString *desc; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2501 |
1745
473a0f7b944b
fixed reloading of editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1739
diff
changeset
|
2502 if (lw->ui_editors_id) |
473a0f7b944b
fixed reloading of editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1739
diff
changeset
|
2503 { |
473a0f7b944b
fixed reloading of editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1739
diff
changeset
|
2504 gtk_ui_manager_remove_ui(lw->ui_manager, lw->ui_editors_id); |
473a0f7b944b
fixed reloading of editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1739
diff
changeset
|
2505 } |
473a0f7b944b
fixed reloading of editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1739
diff
changeset
|
2506 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2507 if (lw->action_group_editors) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2508 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2509 gtk_ui_manager_remove_action_group(lw->ui_manager, lw->action_group_editors); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2510 g_object_unref(lw->action_group_editors); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2511 } |
1463
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2512 lw->action_group_editors = gtk_action_group_new("MenuActionsExternal"); |
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2513 gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group_editors, 1); |
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2514 |
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2515 /* lw->action_group_editors contains translated entries, no translate func is required */ |
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2516 desc = g_string_new( |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2517 "<ui>" |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2518 " <menubar name='MainMenu'>"); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2519 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2520 editors_list = editor_list_get(); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2521 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2522 old_path = NULL; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2523 work = editors_list; |
1348
fb163bad4f27
Add missing space between while and first parenthesis.
Laurent Monin <geeqie@norz.org>
parents:
1345
diff
changeset
|
2524 while (work) |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2525 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2526 GList *path; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2527 EditorDescription *editor = work->data; |
2184 | 2528 GtkActionEntry entry = { editor->key, |
1724
5222612ba966
use name as a tooltip of external editor if comment is missing
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1692
diff
changeset
|
2529 NULL, |
5222612ba966
use name as a tooltip of external editor if comment is missing
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1692
diff
changeset
|
2530 editor->name, |
2184 | 2531 editor->hotkey, |
1724
5222612ba966
use name as a tooltip of external editor if comment is missing
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1692
diff
changeset
|
2532 editor->comment ? editor->comment : editor->name, |
5222612ba966
use name as a tooltip of external editor if comment is missing
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1692
diff
changeset
|
2533 G_CALLBACK(layout_menu_edit_cb) }; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2534 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2535 if (editor->icon) |
1341
75bf2e172da8
load icons for external editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1335
diff
changeset
|
2536 { |
75bf2e172da8
load icons for external editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1335
diff
changeset
|
2537 entry.stock_id = editor->key; |
75bf2e172da8
load icons for external editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1335
diff
changeset
|
2538 } |
1463
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2539 gtk_action_group_add_actions(lw->action_group_editors, &entry, 1, lw); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2540 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2541 path = layout_actions_editor_menu_path(editor); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2542 layout_actions_editor_add(desc, path, old_path); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2543 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2544 string_list_free(old_path); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2545 old_path = path; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2546 work = work->next; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2547 } |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2548 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2549 layout_actions_editor_add(desc, NULL, old_path); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2550 string_list_free(old_path); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2551 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2552 g_string_append(desc, " </menubar>" |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2553 "</ui>" ); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2554 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2555 error = NULL; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2556 |
1463
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2557 lw->ui_editors_id = gtk_ui_manager_add_ui_from_string(lw->ui_manager, desc->str, -1, &error); |
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2558 if (!lw->ui_editors_id) |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2559 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2560 g_message("building menus failed: %s", error->message); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2561 g_error_free(error); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2562 exit(EXIT_FAILURE); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2563 } |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2564 g_string_free(desc, TRUE); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2565 g_list_free(editors_list); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2566 } |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2567 |
9 | 2568 void layout_actions_setup(LayoutWindow *lw) |
2569 { | |
2570 GError *error; | |
2571 | |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2572 DEBUG_1("%s layout_actions_setup: start", get_exec_time()); |
9 | 2573 if (lw->ui_manager) return; |
2574 | |
513
6743a5928e09
Remove whitespace between function name and first parenthesis for the sake of consistency. (pass 2)
Laurent Monin <geeqie@norz.org>
parents:
512
diff
changeset
|
2575 lw->action_group = gtk_action_group_new("MenuActions"); |
9 | 2576 gtk_action_group_set_translate_func(lw->action_group, menu_translate, NULL, NULL); |
2577 | |
2578 gtk_action_group_add_actions(lw->action_group, | |
2579 menu_entries, G_N_ELEMENTS(menu_entries), lw); | |
2580 gtk_action_group_add_toggle_actions(lw->action_group, | |
2581 menu_toggle_entries, G_N_ELEMENTS(menu_toggle_entries), lw); | |
2582 gtk_action_group_add_radio_actions(lw->action_group, | |
2583 menu_radio_entries, G_N_ELEMENTS(menu_radio_entries), | |
2584 0, G_CALLBACK(layout_menu_list_cb), lw); | |
156
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
2585 gtk_action_group_add_radio_actions(lw->action_group, |
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
2586 menu_split_radio_entries, G_N_ELEMENTS(menu_split_radio_entries), |
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
2587 0, G_CALLBACK(layout_menu_split_cb), lw); |
2461
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
2588 gtk_action_group_add_toggle_actions(lw->action_group, |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
2589 menu_view_dir_toggle_entries, G_N_ELEMENTS(menu_view_dir_toggle_entries), |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
2590 lw); |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2591 gtk_action_group_add_radio_actions(lw->action_group, |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2592 menu_color_radio_entries, COLOR_PROFILE_FILE + COLOR_PROFILE_INPUTS, |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2593 0, G_CALLBACK(layout_color_menu_input_cb), lw); |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2594 gtk_action_group_add_radio_actions(lw->action_group, |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2595 menu_histogram_channel, G_N_ELEMENTS(menu_histogram_channel), |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2596 0, G_CALLBACK(layout_menu_histogram_channel_cb), lw); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2597 gtk_action_group_add_radio_actions(lw->action_group, |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2598 menu_histogram_mode, G_N_ELEMENTS(menu_histogram_mode), |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2599 0, G_CALLBACK(layout_menu_histogram_mode_cb), lw); |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2600 gtk_action_group_add_radio_actions(lw->action_group, |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2601 menu_stereo_mode_entries, G_N_ELEMENTS(menu_stereo_mode_entries), |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2602 0, G_CALLBACK(layout_menu_stereo_mode_cb), lw); |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2603 |
9 | 2604 |
2605 lw->ui_manager = gtk_ui_manager_new(); | |
2606 gtk_ui_manager_set_add_tearoffs(lw->ui_manager, TRUE); | |
2607 gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group, 0); | |
2608 | |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2609 DEBUG_1("%s layout_actions_setup: add menu", get_exec_time()); |
9 | 2610 error = NULL; |
2611 if (!gtk_ui_manager_add_ui_from_string(lw->ui_manager, menu_ui_description, -1, &error)) | |
2612 { | |
512
0896f486ec6f
Remove whitespace between function name and first parenthesis for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents:
497
diff
changeset
|
2613 g_message("building menus failed: %s", error->message); |
0896f486ec6f
Remove whitespace between function name and first parenthesis for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents:
497
diff
changeset
|
2614 g_error_free(error); |
0896f486ec6f
Remove whitespace between function name and first parenthesis for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents:
497
diff
changeset
|
2615 exit(EXIT_FAILURE); |
9 | 2616 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2617 |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2618 layout_toolbar_clear(lw, TOOLBAR_MAIN); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2619 layout_toolbar_add_default(lw, TOOLBAR_MAIN); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2620 |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2621 DEBUG_1("%s layout_actions_setup: marks", get_exec_time()); |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2622 layout_actions_setup_marks(lw); |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2623 |
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2624 DEBUG_1("%s layout_actions_setup: editors", get_exec_time()); |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2625 layout_actions_setup_editors(lw); |
1470
02f03330d589
do not re-create ui_manager at layout change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1469
diff
changeset
|
2626 |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2627 DEBUG_1("%s layout_actions_setup: status_update_write", get_exec_time()); |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2628 layout_util_status_update_write(lw); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2629 |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2630 DEBUG_1("%s layout_actions_setup: actions_add_window", get_exec_time()); |
1470
02f03330d589
do not re-create ui_manager at layout change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1469
diff
changeset
|
2631 layout_actions_add_window(lw, lw->window); |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2632 DEBUG_1("%s layout_actions_setup: end", get_exec_time()); |
9 | 2633 } |
2634 | |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2635 static gint layout_editors_reload_idle_id = -1; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2636 static GList *layout_editors_desktop_files = NULL; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2637 |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2638 static gboolean layout_editors_reload_idle_cb(gpointer data) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2639 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2640 if (!layout_editors_desktop_files) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2641 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2642 DEBUG_1("%s layout_editors_reload_idle_cb: get_desktop_files", get_exec_time()); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2643 layout_editors_desktop_files = editor_get_desktop_files(); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2644 return TRUE; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2645 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2646 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2647 editor_read_desktop_file(layout_editors_desktop_files->data); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2648 g_free(layout_editors_desktop_files->data); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2649 layout_editors_desktop_files = g_list_delete_link(layout_editors_desktop_files, layout_editors_desktop_files); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2650 |
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2651 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2652 if (!layout_editors_desktop_files) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2653 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2654 GList *work; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2655 DEBUG_1("%s layout_editors_reload_idle_cb: setup_editors", get_exec_time()); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2656 editor_table_finish(); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2657 |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2658 work = layout_window_list; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2659 while (work) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2660 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2661 LayoutWindow *lw = work->data; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2662 work = work->next; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2663 layout_actions_setup_editors(lw); |
2619
77596dda797e
Fix #207: Symlink doesn't show in Sort Manager
Colin Clark <colin.clark@cclark.uk>
parents:
2611
diff
changeset
|
2664 if (lw->bar_sort_enabled) |
77596dda797e
Fix #207: Symlink doesn't show in Sort Manager
Colin Clark <colin.clark@cclark.uk>
parents:
2611
diff
changeset
|
2665 { |
77596dda797e
Fix #207: Symlink doesn't show in Sort Manager
Colin Clark <colin.clark@cclark.uk>
parents:
2611
diff
changeset
|
2666 layout_bar_sort_toggle(lw); |
77596dda797e
Fix #207: Symlink doesn't show in Sort Manager
Colin Clark <colin.clark@cclark.uk>
parents:
2611
diff
changeset
|
2667 } |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2668 } |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2669 |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2670 DEBUG_1("%s layout_editors_reload_idle_cb: setup_editors done", get_exec_time()); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2671 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2672 layout_editors_reload_idle_id = -1; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2673 return FALSE; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2674 } |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2675 return TRUE; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2676 } |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2677 |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2678 void layout_editors_reload_start(void) |
1463
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2679 { |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2680 DEBUG_1("%s layout_editors_reload_start", get_exec_time()); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2681 |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2682 if (layout_editors_reload_idle_id != -1) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2683 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2684 g_source_remove(layout_editors_reload_idle_id); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2685 string_list_free(layout_editors_desktop_files); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2686 } |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2687 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2688 editor_table_clear(); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2689 layout_editors_reload_idle_id = g_idle_add(layout_editors_reload_idle_cb, NULL); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2690 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2691 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2692 void layout_editors_reload_finish(void) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2693 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2694 if (layout_editors_reload_idle_id != -1) |
1463
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2695 { |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2696 DEBUG_1("%s layout_editors_reload_finish", get_exec_time()); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2697 g_source_remove(layout_editors_reload_idle_id); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2698 while (layout_editors_reload_idle_id != -1) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2699 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2700 layout_editors_reload_idle_cb(NULL); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2701 } |
1463
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2702 } |
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2703 } |
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2704 |
9 | 2705 void layout_actions_add_window(LayoutWindow *lw, GtkWidget *window) |
2706 { | |
2707 GtkAccelGroup *group; | |
2708 | |
2709 if (!lw->ui_manager) return; | |
2710 | |
2711 group = gtk_ui_manager_get_accel_group(lw->ui_manager); | |
2712 gtk_window_add_accel_group(GTK_WINDOW(window), group); | |
2713 } | |
2714 | |
2715 GtkWidget *layout_actions_menu_bar(LayoutWindow *lw) | |
2716 { | |
1470
02f03330d589
do not re-create ui_manager at layout change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1469
diff
changeset
|
2717 if (lw->menu_bar) return lw->menu_bar; |
02f03330d589
do not re-create ui_manager at layout change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1469
diff
changeset
|
2718 lw->menu_bar = gtk_ui_manager_get_widget(lw->ui_manager, "/MainMenu"); |
02f03330d589
do not re-create ui_manager at layout change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1469
diff
changeset
|
2719 g_object_ref(lw->menu_bar); |
02f03330d589
do not re-create ui_manager at layout change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1469
diff
changeset
|
2720 return lw->menu_bar; |
9 | 2721 } |
2722 | |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2723 GtkWidget *layout_actions_toolbar(LayoutWindow *lw, ToolbarType type) |
9 | 2724 { |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2725 if (lw->toolbar[type]) return lw->toolbar[type]; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2726 switch (type) |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2727 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2728 case TOOLBAR_MAIN: |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2729 lw->toolbar[type] = gtk_ui_manager_get_widget(lw->ui_manager, "/ToolBar"); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2730 gtk_toolbar_set_icon_size(GTK_TOOLBAR(lw->toolbar[type]), GTK_ICON_SIZE_SMALL_TOOLBAR); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2731 gtk_toolbar_set_style(GTK_TOOLBAR(lw->toolbar[type]), GTK_TOOLBAR_ICONS); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2732 break; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2733 case TOOLBAR_STATUS: |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2734 lw->toolbar[type] = gtk_ui_manager_get_widget(lw->ui_manager, "/StatusBar"); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2735 gtk_toolbar_set_icon_size(GTK_TOOLBAR(lw->toolbar[type]), GTK_ICON_SIZE_MENU); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2736 gtk_toolbar_set_style(GTK_TOOLBAR(lw->toolbar[type]), GTK_TOOLBAR_ICONS); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2737 gtk_toolbar_set_show_arrow(GTK_TOOLBAR(lw->toolbar[type]), FALSE); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2738 break; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2739 default: |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2740 break; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2741 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2742 g_object_ref(lw->toolbar[type]); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2743 return lw->toolbar[type]; |
9 | 2744 } |
2745 | |
2813
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2746 GtkWidget *layout_actions_menu_tool_bar(LayoutWindow *lw) |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2747 { |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2748 GtkWidget *menu_bar; |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2749 GtkWidget *toolbar; |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2750 |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2751 if (lw->menu_tool_bar) return lw->menu_tool_bar; |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2752 |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2753 menu_bar = layout_actions_menu_bar(lw); |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2754 toolbar = layout_actions_toolbar(lw, TOOLBAR_MAIN); |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2755 lw->menu_tool_bar = gtk_vbox_new(FALSE, 0); |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2756 |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2757 gtk_box_pack_start(GTK_BOX(lw->menu_tool_bar), menu_bar, FALSE, FALSE, 0); |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2758 gtk_box_pack_start(GTK_BOX(lw->menu_tool_bar), toolbar, FALSE, FALSE, 0); |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2759 |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2760 g_object_ref(lw->menu_tool_bar); |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2761 return lw->menu_tool_bar; |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2762 } |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2763 |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2764 void layout_toolbar_clear(LayoutWindow *lw, ToolbarType type) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2765 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2766 if (lw->toolbar_merge_id[type]) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2767 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2768 gtk_ui_manager_remove_ui(lw->ui_manager, lw->toolbar_merge_id[type]); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2769 gtk_ui_manager_ensure_update(lw->ui_manager); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2770 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2771 string_list_free(lw->toolbar_actions[type]); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2772 lw->toolbar_actions[type] = NULL; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2773 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2774 lw->toolbar_merge_id[type] = gtk_ui_manager_new_merge_id(lw->ui_manager); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2775 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2776 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2777 void layout_toolbar_add(LayoutWindow *lw, ToolbarType type, const gchar *action) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2778 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2779 const gchar *path = NULL; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2780 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2781 if (!action || !lw->ui_manager) return; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2782 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2783 if (g_list_find_custom(lw->toolbar_actions[type], action, (GCompareFunc)strcmp)) return; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2784 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2785 switch (type) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2786 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2787 case TOOLBAR_MAIN: |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2788 path = "/ToolBar"; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2789 break; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2790 default: |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2791 break; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2792 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2793 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2794 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2795 if (g_str_has_suffix(action, ".desktop")) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2796 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2797 /* this may be called before the external editors are read |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2798 create a dummy action for now */ |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2799 if (!lw->action_group_editors) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2800 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2801 lw->action_group_editors = gtk_action_group_new("MenuActionsExternal"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2802 gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group_editors, 1); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2803 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2804 if (!gtk_action_group_get_action(lw->action_group_editors, action)) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2805 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2806 GtkActionEntry entry = { action, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2807 GTK_STOCK_MISSING_IMAGE, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2808 action, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2809 NULL, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2810 NULL, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2811 NULL }; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2812 DEBUG_1("Creating temporary action %s", action); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2813 gtk_action_group_add_actions(lw->action_group_editors, &entry, 1, lw); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2814 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2815 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2816 gtk_ui_manager_add_ui(lw->ui_manager, lw->toolbar_merge_id[type], path, action, action, GTK_UI_MANAGER_TOOLITEM, FALSE); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2817 lw->toolbar_actions[type] = g_list_append(lw->toolbar_actions[type], g_strdup(action)); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2818 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2819 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2820 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2821 void layout_toolbar_add_default(LayoutWindow *lw, ToolbarType type) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2822 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2823 LayoutWindow *lw_first; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2824 GList *work_action; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2825 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2826 switch (type) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2827 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2828 case TOOLBAR_MAIN: |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2829 if (layout_window_list) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2830 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2831 lw_first = layout_window_list->data; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2832 if (lw_first->toolbar_actions[TOOLBAR_MAIN]) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2833 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2834 work_action = lw_first->toolbar_actions[type]; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2835 while (work_action) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2836 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2837 gchar *action = work_action->data; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2838 work_action = work_action->next; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2839 layout_toolbar_add(lw, type, action); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2840 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2841 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2842 else |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2843 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2844 layout_toolbar_add(lw, type, "Thumbnails"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2845 layout_toolbar_add(lw, type, "Back"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2846 layout_toolbar_add(lw, type, "Forward"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2847 layout_toolbar_add(lw, type, "Up"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2848 layout_toolbar_add(lw, type, "Home"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2849 layout_toolbar_add(lw, type, "Refresh"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2850 layout_toolbar_add(lw, type, "ZoomIn"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2851 layout_toolbar_add(lw, type, "ZoomOut"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2852 layout_toolbar_add(lw, type, "ZoomFit"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2853 layout_toolbar_add(lw, type, "Zoom100"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2854 layout_toolbar_add(lw, type, "Preferences"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2855 layout_toolbar_add(lw, type, "FloatTools"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2856 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2857 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2858 else |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2859 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2860 layout_toolbar_add(lw, type, "Thumbnails"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2861 layout_toolbar_add(lw, type, "Back"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2862 layout_toolbar_add(lw, type, "Forward"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2863 layout_toolbar_add(lw, type, "Up"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2864 layout_toolbar_add(lw, type, "Home"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2865 layout_toolbar_add(lw, type, "Refresh"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2866 layout_toolbar_add(lw, type, "ZoomIn"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2867 layout_toolbar_add(lw, type, "ZoomOut"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2868 layout_toolbar_add(lw, type, "ZoomFit"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2869 layout_toolbar_add(lw, type, "Zoom100"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2870 layout_toolbar_add(lw, type, "Preferences"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2871 layout_toolbar_add(lw, type, "FloatTools"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2872 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2873 break; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2874 default: |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2875 break; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2876 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2877 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2878 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2879 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2880 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2881 void layout_toolbar_write_config(LayoutWindow *lw, ToolbarType type, GString *outstr, gint indent) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2882 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2883 const gchar *name = NULL; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2884 GList *work = lw->toolbar_actions[type]; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2885 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2886 switch (type) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2887 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2888 case TOOLBAR_MAIN: |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2889 name = "toolbar"; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2890 break; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2891 default: |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2892 break; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2893 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2894 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2895 WRITE_NL(); WRITE_STRING("<%s>", name); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2896 indent++; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2897 WRITE_NL(); WRITE_STRING("<clear/>"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2898 while (work) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2899 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2900 gchar *action = work->data; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2901 work = work->next; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2902 WRITE_NL(); WRITE_STRING("<toolitem "); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2903 write_char_option(outstr, indent + 1, "action", action); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2904 WRITE_STRING("/>"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2905 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2906 indent--; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2907 WRITE_NL(); WRITE_STRING("</%s>", name); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2908 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2909 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2910 void layout_toolbar_add_from_config(LayoutWindow *lw, ToolbarType type, const char **attribute_names, const gchar **attribute_values) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2911 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2912 gchar *action = NULL; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2913 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2914 while (*attribute_names) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2915 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2916 const gchar *option = *attribute_names++; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2917 const gchar *value = *attribute_values++; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2918 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2919 if (READ_CHAR_FULL("action", action)) continue; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2920 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2921 log_printf("unknown attribute %s = %s\n", option, value); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2922 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2923 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2924 layout_toolbar_add(lw, type, action); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2925 g_free(action); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2926 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2927 |
9 | 2928 /* |
2929 *----------------------------------------------------------------------------- | |
2930 * misc | |
2931 *----------------------------------------------------------------------------- | |
2932 */ | |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2933 |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2934 void layout_util_status_update_write(LayoutWindow *lw) |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2935 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2936 GtkAction *action; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2937 gint n = metadata_queue_length(); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2938 action = gtk_action_group_get_action(lw->action_group, "SaveMetadata"); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2939 gtk_action_set_sensitive(action, n > 0); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2940 if (n > 0) |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2941 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2942 gchar *buf = g_strdup_printf(_("Number of files with unsaved metadata: %d"), n); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2943 g_object_set(G_OBJECT(action), "tooltip", buf, NULL); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2944 g_free(buf); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2945 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2946 else |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2947 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2948 g_object_set(G_OBJECT(action), "tooltip", _("No unsaved metadata"), NULL); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2949 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2950 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2951 |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2952 void layout_util_status_update_write_all(void) |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2953 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2954 GList *work; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2955 |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2956 work = layout_window_list; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2957 while (work) |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2958 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2959 LayoutWindow *lw = work->data; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2960 work = work->next; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2961 |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2962 layout_util_status_update_write(lw); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2963 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2964 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2965 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2966 static gchar *layout_color_name_parse(const gchar *name) |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2967 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2968 if (!name || !*name) return g_strdup(_("Empty")); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2969 return g_strdelimit(g_strdup(name), "_", '-'); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2970 } |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2971 |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2972 void layout_util_sync_color(LayoutWindow *lw) |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2973 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2974 GtkAction *action; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2975 gint input = 0; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2976 gboolean use_color; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2977 gboolean use_image = FALSE; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2978 gint i; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2979 gchar action_name[15]; |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2980 gchar *image_profile; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2981 gchar *screen_profile; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2982 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2983 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2984 if (!lw->action_group) return; |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
2985 if (!layout_image_color_profile_get(lw, &input, &use_image)) return; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2986 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2987 use_color = layout_image_color_profile_get_use(lw); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2988 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2989 action = gtk_action_group_get_action(lw->action_group, "UseColorProfiles"); |
1595
b4097a93ab29
better tooltip for disabled lcms
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1588
diff
changeset
|
2990 #ifdef HAVE_LCMS |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2991 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), use_color); |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2992 if (layout_image_color_profile_get_status(lw, &image_profile, &screen_profile)) |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2993 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2994 gchar *buf; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2995 buf = g_strdup_printf(_("Image profile: %s\nScreen profile: %s"), image_profile, screen_profile); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2996 g_object_set(G_OBJECT(action), "tooltip", buf, NULL); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2997 g_free(image_profile); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2998 g_free(screen_profile); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2999 g_free(buf); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
3000 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
3001 else |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
3002 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
3003 g_object_set(G_OBJECT(action), "tooltip", _("Click to enable color management"), NULL); |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
3004 } |
1595
b4097a93ab29
better tooltip for disabled lcms
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1588
diff
changeset
|
3005 #else |
b4097a93ab29
better tooltip for disabled lcms
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1588
diff
changeset
|
3006 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), FALSE); |
b4097a93ab29
better tooltip for disabled lcms
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1588
diff
changeset
|
3007 gtk_action_set_sensitive(action, FALSE); |
b4097a93ab29
better tooltip for disabled lcms
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1588
diff
changeset
|
3008 g_object_set(G_OBJECT(action), "tooltip", _("Color profiles not supported"), NULL); |
b4097a93ab29
better tooltip for disabled lcms
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1588
diff
changeset
|
3009 #endif |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3010 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3011 action = gtk_action_group_get_action(lw->action_group, "UseImageProfile"); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3012 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), use_image); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3013 gtk_action_set_sensitive(action, use_color); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3014 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3015 for (i = 0; i < COLOR_PROFILE_FILE + COLOR_PROFILE_INPUTS; i++) |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3016 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3017 sprintf(action_name, "ColorProfile%d", i); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3018 action = gtk_action_group_get_action(lw->action_group, action_name); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3019 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3020 if (i >= COLOR_PROFILE_FILE) |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3021 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3022 const gchar *name = options->color_profile.input_name[i - COLOR_PROFILE_FILE]; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3023 const gchar *file = options->color_profile.input_file[i - COLOR_PROFILE_FILE]; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3024 gchar *end; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3025 gchar *buf; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3026 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3027 if (!name || !name[0]) name = filename_from_path(file); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3028 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3029 end = layout_color_name_parse(name); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3030 buf = g_strdup_printf(_("Input _%d: %s"), i, end); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3031 g_free(end); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3032 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3033 g_object_set(G_OBJECT(action), "label", buf, NULL); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3034 g_free(buf); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3035 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3036 gtk_action_set_visible(action, file && file[0]); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3037 } |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3038 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3039 gtk_action_set_sensitive(action, !use_image); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3040 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), (i == input)); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3041 } |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
3042 |
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
3043 action = gtk_action_group_get_action(lw->action_group, "Grayscale"); |
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
3044 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), layout_image_get_desaturate(lw)); |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3045 } |
9 | 3046 |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3047 void layout_util_sync_file_filter(LayoutWindow *lw) |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3048 { |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3049 GtkAction *action; |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3050 |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3051 if (!lw->action_group) return; |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3052 |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3053 action = gtk_action_group_get_action(lw->action_group, "ShowFileFilter"); |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3054 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.show_file_filter); |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3055 } |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3056 |
2611 | 3057 void layout_util_sync_marks(LayoutWindow *lw) |
3058 { | |
3059 GtkAction *action; | |
3060 | |
3061 if (!lw->action_group) return; | |
3062 | |
3063 action = gtk_action_group_get_action(lw->action_group, "ShowMarks"); | |
3064 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.show_marks); | |
3065 } | |
3066 | |
9 | 3067 static void layout_util_sync_views(LayoutWindow *lw) |
3068 { | |
3069 GtkAction *action; | |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3070 OsdShowFlags osd_flags = image_osd_get(lw->image); |
9 | 3071 |
3072 if (!lw->action_group) return; | |
3073 | |
3074 action = gtk_action_group_get_action(lw->action_group, "FolderTree"); | |
2461
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
3075 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.dir_view_type); |
9 | 3076 |
1480
82915f832ec5
split-mode cleanup and improvements
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1479
diff
changeset
|
3077 action = gtk_action_group_get_action(lw->action_group, "SplitSingle"); |
2095
e4aa52cbbecb
dropped support for gtk < 2.20
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2042
diff
changeset
|
3078 gtk_radio_action_set_current_value(GTK_RADIO_ACTION(action), lw->split_mode); |
1480
82915f832ec5
split-mode cleanup and improvements
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1479
diff
changeset
|
3079 |
2494
e5625bd7524d
Addl fix #488: Hide menus when not in split mode
Colin Clark <colin.clark@cclark.uk>
parents:
2493
diff
changeset
|
3080 action = gtk_action_group_get_action(lw->action_group, "SplitNextPane"); |
e5625bd7524d
Addl fix #488: Hide menus when not in split mode
Colin Clark <colin.clark@cclark.uk>
parents:
2493
diff
changeset
|
3081 gtk_action_set_sensitive(action, !(lw->split_mode == SPLIT_NONE)); |
e5625bd7524d
Addl fix #488: Hide menus when not in split mode
Colin Clark <colin.clark@cclark.uk>
parents:
2493
diff
changeset
|
3082 action = gtk_action_group_get_action(lw->action_group, "SplitPreviousPane"); |
e5625bd7524d
Addl fix #488: Hide menus when not in split mode
Colin Clark <colin.clark@cclark.uk>
parents:
2493
diff
changeset
|
3083 gtk_action_set_sensitive(action, !(lw->split_mode == SPLIT_NONE)); |
2517
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
3084 action = gtk_action_group_get_action(lw->action_group, "SplitUpPane"); |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
3085 gtk_action_set_sensitive(action, !(lw->split_mode == SPLIT_NONE)); |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
3086 action = gtk_action_group_get_action(lw->action_group, "SplitDownPane"); |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
3087 gtk_action_set_sensitive(action, !(lw->split_mode == SPLIT_NONE)); |
2494
e5625bd7524d
Addl fix #488: Hide menus when not in split mode
Colin Clark <colin.clark@cclark.uk>
parents:
2493
diff
changeset
|
3088 |
9 | 3089 action = gtk_action_group_get_action(lw->action_group, "ViewIcons"); |
2095
e4aa52cbbecb
dropped support for gtk < 2.20
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2042
diff
changeset
|
3090 gtk_radio_action_set_current_value(GTK_RADIO_ACTION(action), lw->options.file_view_type); |
9 | 3091 |
3092 action = gtk_action_group_get_action(lw->action_group, "FloatTools"); | |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3093 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.tools_float); |
9 | 3094 |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3095 action = gtk_action_group_get_action(lw->action_group, "SBar"); |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3096 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), layout_bar_enabled(lw)); |
9 | 3097 |
3098 action = gtk_action_group_get_action(lw->action_group, "SBarSort"); | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3099 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), layout_bar_sort_enabled(lw)); |
9 | 3100 |
3101 action = gtk_action_group_get_action(lw->action_group, "HideToolbar"); | |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3102 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.toolbar_hidden); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3103 |
1584
c97dea5d82d7
improved pixel info, changed the menu entry from "Hide" to "Show",
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1583
diff
changeset
|
3104 action = gtk_action_group_get_action(lw->action_group, "ShowInfoPixel"); |
c97dea5d82d7
improved pixel info, changed the menu entry from "Hide" to "Show",
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1583
diff
changeset
|
3105 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.show_info_pixel); |
433
a20940d54915
Save Show Marks state to rc file and display current state in menu.
Laurent Monin <geeqie@norz.org>
parents:
429
diff
changeset
|
3106 |
451
cff69d79dc89
Mark slideshow toggle state in the menu.
Laurent Monin <geeqie@norz.org>
parents:
450
diff
changeset
|
3107 action = gtk_action_group_get_action(lw->action_group, "SlideShow"); |
cff69d79dc89
Mark slideshow toggle state in the menu.
Laurent Monin <geeqie@norz.org>
parents:
450
diff
changeset
|
3108 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), layout_image_slideshow_active(lw)); |
1293
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3109 |
2433 | 3110 action = gtk_action_group_get_action(lw->action_group, "Animate"); |
3111 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.animate); | |
3112 | |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3113 action = gtk_action_group_get_action(lw->action_group, "ImageOverlay"); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3114 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), osd_flags != OSD_SHOW_NOTHING); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3115 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3116 action = gtk_action_group_get_action(lw->action_group, "ImageHistogram"); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3117 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), osd_flags & OSD_SHOW_HISTOGRAM); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3118 |
2794
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
3119 action = gtk_action_group_get_action(lw->action_group, "ImageGuidelines"); |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
3120 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), osd_flags & OSD_SHOW_GUIDELINES); |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
3121 |
2438
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
3122 action = gtk_action_group_get_action(lw->action_group, "ExifRotate"); |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
3123 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), options->image.exif_rotate_enable); |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
3124 |
2801
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
3125 action = gtk_action_group_get_action(lw->action_group, "DrawRectangle"); |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
3126 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), options->draw_rectangle); |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
3127 |
2438
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
3128 action = gtk_action_group_get_action(lw->action_group, "RectangularSelection"); |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
3129 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), options->collections.rectangular_selection); |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
3130 |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3131 action = gtk_action_group_get_action(lw->action_group, "ShowFileFilter"); |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3132 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.show_file_filter); |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3133 |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3134 if (osd_flags & OSD_SHOW_HISTOGRAM) |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3135 { |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3136 action = gtk_action_group_get_action(lw->action_group, "HistogramChanR"); |
2095
e4aa52cbbecb
dropped support for gtk < 2.20
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2042
diff
changeset
|
3137 gtk_radio_action_set_current_value(GTK_RADIO_ACTION(action), image_osd_histogram_get_channel(lw->image)); |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3138 |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3139 action = gtk_action_group_get_action(lw->action_group, "HistogramModeLin"); |
2095
e4aa52cbbecb
dropped support for gtk < 2.20
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2042
diff
changeset
|
3140 gtk_radio_action_set_current_value(GTK_RADIO_ACTION(action), image_osd_histogram_get_mode(lw->image)); |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3141 } |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3142 |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3143 action = gtk_action_group_get_action(lw->action_group, "ConnectZoomMenu"); |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3144 gtk_action_set_sensitive(action, lw->split_mode != SPLIT_NONE); |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3145 |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
3146 action = gtk_action_group_get_action(lw->action_group, "WriteRotation"); |
2575
c231b2cb9842
Addl fix #436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2573
diff
changeset
|
3147 gtk_action_set_sensitive(action, !(runcmd("which exiftran >/dev/null 2>&1") || |
c231b2cb9842
Addl fix #436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2573
diff
changeset
|
3148 runcmd("which mogrify >/dev/null 2>&1") || options->metadata.write_orientation)); |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
3149 action = gtk_action_group_get_action(lw->action_group, "WriteRotationKeepDate"); |
2575
c231b2cb9842
Addl fix #436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2573
diff
changeset
|
3150 gtk_action_set_sensitive(action, !(runcmd("which exiftran >/dev/null 2>&1") || |
c231b2cb9842
Addl fix #436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2573
diff
changeset
|
3151 runcmd("which mogrify >/dev/null 2>&1") || options->metadata.write_orientation)); |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
3152 |
1888
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
3153 action = gtk_action_group_get_action(lw->action_group, "StereoAuto"); |
2095
e4aa52cbbecb
dropped support for gtk < 2.20
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2042
diff
changeset
|
3154 gtk_radio_action_set_current_value(GTK_RADIO_ACTION(action), layout_image_stereo_pixbuf_get(lw)); |
1888
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
3155 |
2611 | 3156 layout_util_sync_marks(lw); |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3157 layout_util_sync_color(lw); |
9 | 3158 } |
3159 | |
3160 void layout_util_sync_thumb(LayoutWindow *lw) | |
3161 { | |
3162 GtkAction *action; | |
3163 | |
3164 if (!lw->action_group) return; | |
3165 | |
3166 action = gtk_action_group_get_action(lw->action_group, "Thumbnails"); | |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3167 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.show_thumbnails); |
1412
4e84054a1d7a
fixed saving of file_view_type
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1411
diff
changeset
|
3168 g_object_set(action, "sensitive", (lw->options.file_view_type == FILEVIEW_LIST), NULL); |
9 | 3169 } |
3170 | |
3171 void layout_util_sync(LayoutWindow *lw) | |
3172 { | |
3173 layout_util_sync_views(lw); | |
3174 layout_util_sync_thumb(lw); | |
3175 layout_menu_recent_update(lw); | |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
3176 // layout_menu_edit_update(lw); |
9 | 3177 } |
3178 | |
2694 | 3179 /** |
3180 * @brief Checks if event key is mapped to Help | |
3181 * @param event | |
3182 * @returns | |
3183 * | |
3184 * Used to check if the user has re-mapped the Help key | |
3185 * in Preferences/Keyboard | |
3186 * | |
3187 * Note: help_key.accel_mods and event->state | |
3188 * differ in the higher bits | |
3189 */ | |
3190 gboolean is_help_key(GdkEventKey *event) | |
3191 { | |
3192 GtkAccelKey help_key; | |
3193 gboolean ret = FALSE; | |
3194 guint mask = GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK; | |
3195 | |
3196 if (gtk_accel_map_lookup_entry("<Actions>/MenuActions/HelpContents", &help_key)) | |
3197 { | |
3198 if (help_key.accel_key == event->keyval && | |
3199 (help_key.accel_mods & mask) == (event->state & mask)) | |
3200 { | |
3201 ret = TRUE; | |
3202 } | |
3203 } | |
3204 | |
3205 return ret; | |
3206 } | |
9 | 3207 |
3208 /* | |
3209 *----------------------------------------------------------------------------- | |
3210 * sidebars | |
3211 *----------------------------------------------------------------------------- | |
3212 */ | |
3213 | |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3214 static gboolean layout_bar_enabled(LayoutWindow *lw) |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3215 { |
1810
c3a79dda8ea7
GTK marks several functions as deprecated
Klaus Ethgen <Klaus@Ethgen.de>
parents:
1802
diff
changeset
|
3216 return lw->bar && gtk_widget_get_visible(lw->bar); |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3217 } |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3218 |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3219 static void layout_bar_destroyed(GtkWidget *widget, gpointer data) |
9 | 3220 { |
3221 LayoutWindow *lw = data; | |
3222 | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3223 lw->bar = NULL; |
2184 | 3224 /* |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3225 do not call layout_util_sync_views(lw) here |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3226 this is called either when whole layout is destroyed - no need for update |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3227 or when the bar is replaced - sync is called by upper function at the end of whole operation |
9 | 3228 |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3229 */ |
9 | 3230 } |
3231 | |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3232 static void layout_bar_set_default(LayoutWindow *lw) |
489
58ff9d7f8a01
Save state and width of exif, info and sort panels to rc file.
Laurent Monin <geeqie@norz.org>
parents:
482
diff
changeset
|
3233 { |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3234 GtkWidget *bar; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3235 |
9 | 3236 if (!lw->utility_box) return; |
442 | 3237 |
1484
f3b033a71fc9
improved sidebar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1480
diff
changeset
|
3238 bar = bar_new(lw); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3239 |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3240 layout_bar_set(lw, bar); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3241 |
1484
f3b033a71fc9
improved sidebar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1480
diff
changeset
|
3242 bar_populate_default(bar); |
9 | 3243 } |
442 | 3244 |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3245 static void layout_bar_close(LayoutWindow *lw) |
9 | 3246 { |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3247 if (lw->bar) |
9 | 3248 { |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3249 bar_close(lw->bar); |
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3250 lw->bar = NULL; |
9 | 3251 } |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3252 } |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3253 |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3254 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3255 void layout_bar_set(LayoutWindow *lw, GtkWidget *bar) |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3256 { |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3257 if (!lw->utility_box) return; |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3258 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3259 layout_bar_close(lw); /* if any */ |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3260 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3261 if (!bar) return; |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3262 lw->bar = bar; |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3263 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3264 g_signal_connect(G_OBJECT(lw->bar), "destroy", |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3265 G_CALLBACK(layout_bar_destroyed), lw); |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3266 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3267 |
1383
bdd15a0038dd
use standard GtkHPaned for sidebar width
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
3268 // gtk_box_pack_start(GTK_BOX(lw->utility_box), lw->bar, FALSE, FALSE, 0); |
2184 | 3269 gtk_paned_pack2(GTK_PANED(lw->utility_paned), lw->bar, FALSE, TRUE); |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3270 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3271 bar_set_fd(lw->bar, layout_image_get_fd(lw)); |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3272 } |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3273 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3274 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3275 void layout_bar_toggle(LayoutWindow *lw) |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3276 { |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3277 if (layout_bar_enabled(lw)) |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3278 { |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3279 gtk_widget_hide(lw->bar); |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3280 } |
9 | 3281 else |
3282 { | |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3283 if (!lw->bar) |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3284 { |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3285 layout_bar_set_default(lw); |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3286 } |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3287 gtk_widget_show(lw->bar); |
1508
320540b3454f
set current fd when the bar is shown again
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1484
diff
changeset
|
3288 bar_set_fd(lw->bar, layout_image_get_fd(lw)); |
9 | 3289 } |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3290 layout_util_sync_views(lw); |
9 | 3291 } |
3292 | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3293 static void layout_bar_new_image(LayoutWindow *lw) |
9 | 3294 { |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3295 if (!layout_bar_enabled(lw)) return; |
9 | 3296 |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3297 bar_set_fd(lw->bar, layout_image_get_fd(lw)); |
9 | 3298 } |
3299 | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3300 static void layout_bar_new_selection(LayoutWindow *lw, gint count) |
9 | 3301 { |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3302 if (!layout_bar_enabled(lw)) return; |
9 | 3303 |
1520
056ab2f7b7d8
added pane_notify_selection to pane API
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1513
diff
changeset
|
3304 bar_notify_selection(lw->bar, count); |
9 | 3305 } |
3306 | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3307 static gboolean layout_bar_sort_enabled(LayoutWindow *lw) |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3308 { |
1810
c3a79dda8ea7
GTK marks several functions as deprecated
Klaus Ethgen <Klaus@Ethgen.de>
parents:
1802
diff
changeset
|
3309 return lw->bar_sort && gtk_widget_get_visible(lw->bar_sort); |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3310 } |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3311 |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3312 |
9 | 3313 static void layout_bar_sort_destroyed(GtkWidget *widget, gpointer data) |
3314 { | |
3315 LayoutWindow *lw = data; | |
3316 | |
3317 lw->bar_sort = NULL; | |
3318 | |
2184 | 3319 /* |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3320 do not call layout_util_sync_views(lw) here |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3321 this is called either when whole layout is destroyed - no need for update |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3322 or when the bar is replaced - sync is called by upper function at the end of whole operation |
9 | 3323 |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3324 */ |
9 | 3325 } |
3326 | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3327 static void layout_bar_sort_set_default(LayoutWindow *lw) |
9 | 3328 { |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3329 GtkWidget *bar; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3330 |
9 | 3331 if (!lw->utility_box) return; |
3332 | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3333 bar = bar_sort_new_default(lw); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3334 |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3335 layout_bar_sort_set(lw, bar); |
9 | 3336 } |
3337 | |
3338 static void layout_bar_sort_close(LayoutWindow *lw) | |
3339 { | |
3340 if (lw->bar_sort) | |
3341 { | |
3342 bar_sort_close(lw->bar_sort); | |
3343 lw->bar_sort = NULL; | |
3344 } | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3345 } |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3346 |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3347 void layout_bar_sort_set(LayoutWindow *lw, GtkWidget *bar) |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3348 { |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3349 if (!lw->utility_box) return; |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3350 |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3351 layout_bar_sort_close(lw); /* if any */ |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3352 |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3353 if (!bar) return; |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3354 lw->bar_sort = bar; |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3355 |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3356 g_signal_connect(G_OBJECT(lw->bar_sort), "destroy", |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3357 G_CALLBACK(layout_bar_sort_destroyed), lw); |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3358 |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3359 gtk_box_pack_end(GTK_BOX(lw->utility_box), lw->bar_sort, FALSE, FALSE, 0); |
9 | 3360 } |
3361 | |
3362 void layout_bar_sort_toggle(LayoutWindow *lw) | |
3363 { | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3364 if (layout_bar_sort_enabled(lw)) |
9 | 3365 { |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3366 gtk_widget_hide(lw->bar_sort); |
9 | 3367 } |
3368 else | |
3369 { | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3370 if (!lw->bar_sort) |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3371 { |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3372 layout_bar_sort_set_default(lw); |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3373 } |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3374 gtk_widget_show(lw->bar_sort); |
9 | 3375 } |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3376 layout_util_sync_views(lw); |
9 | 3377 } |
3378 | |
2506
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3379 static void layout_bars_hide_toggle(LayoutWindow *lw) |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3380 { |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3381 if (lw->options.bars_state.hidden) |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3382 { |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3383 lw->options.bars_state.hidden = FALSE; |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3384 if (lw->options.bars_state.sort) |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3385 { |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3386 gtk_widget_show(lw->bar_sort); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3387 } |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3388 if (lw->options.bars_state.info) |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3389 { |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3390 gtk_widget_show(lw->bar); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3391 } |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3392 layout_tools_float_set(lw, lw->options.tools_float, |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3393 lw->options.bars_state.tools_hidden); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3394 } |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3395 else |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3396 { |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3397 lw->options.bars_state.hidden = TRUE; |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3398 lw->options.bars_state.sort = layout_bar_sort_enabled(lw); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3399 lw->options.bars_state.info = layout_bar_enabled(lw); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3400 lw->options.bars_state.tools_float = lw->options.tools_float; |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3401 lw->options.bars_state.tools_hidden = lw->options.tools_hidden; |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3402 |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3403 gtk_widget_hide(lw->bar); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3404 if (lw->bar_sort) |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3405 gtk_widget_hide(lw->bar_sort); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3406 layout_tools_float_set(lw, lw->options.tools_float, TRUE); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3407 } |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3408 |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3409 layout_util_sync_views(lw); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3410 } |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3411 |
9 | 3412 void layout_bars_new_image(LayoutWindow *lw) |
3413 { | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3414 layout_bar_new_image(lw); |
1293
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3415 |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3416 if (lw->exif_window) advanced_exif_set_fd(lw->exif_window, layout_image_get_fd(lw)); |
1214
1e36edfd2a43
write metadata after timeout, image change or dir change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1176
diff
changeset
|
3417 |
1e36edfd2a43
write metadata after timeout, image change or dir change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1176
diff
changeset
|
3418 /* this should be called here to handle the metadata edited in bars */ |
1e36edfd2a43
write metadata after timeout, image change or dir change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1176
diff
changeset
|
3419 if (options->metadata.confirm_on_image_change) |
1586
b8515ea34e58
force the metadata dialog if it was triggered by the menu or the button
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1585
diff
changeset
|
3420 metadata_write_queue_confirm(FALSE, NULL, NULL); |
9 | 3421 } |
3422 | |
3423 void layout_bars_new_selection(LayoutWindow *lw, gint count) | |
3424 { | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3425 layout_bar_new_selection(lw, count); |
9 | 3426 } |
3427 | |
3428 GtkWidget *layout_bars_prepare(LayoutWindow *lw, GtkWidget *image) | |
3429 { | |
1470
02f03330d589
do not re-create ui_manager at layout change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1469
diff
changeset
|
3430 if (lw->utility_box) return lw->utility_box; |
9 | 3431 lw->utility_box = gtk_hbox_new(FALSE, PREF_PAD_GAP); |
1383
bdd15a0038dd
use standard GtkHPaned for sidebar width
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
3432 lw->utility_paned = gtk_hpaned_new(); |
bdd15a0038dd
use standard GtkHPaned for sidebar width
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
3433 gtk_box_pack_start(GTK_BOX(lw->utility_box), lw->utility_paned, TRUE, TRUE, 0); |
bdd15a0038dd
use standard GtkHPaned for sidebar width
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
3434 |
2184 | 3435 gtk_paned_pack1(GTK_PANED(lw->utility_paned), image, TRUE, FALSE); |
1383
bdd15a0038dd
use standard GtkHPaned for sidebar width
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
3436 gtk_widget_show(lw->utility_paned); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3437 |
9 | 3438 gtk_widget_show(image); |
3439 | |
1470
02f03330d589
do not re-create ui_manager at layout change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1469
diff
changeset
|
3440 g_object_ref(lw->utility_box); |
9 | 3441 return lw->utility_box; |
3442 } | |
3443 | |
3444 void layout_bars_close(LayoutWindow *lw) | |
3445 { | |
3446 layout_bar_sort_close(lw); | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3447 layout_bar_close(lw); |
9 | 3448 } |
3449 | |
1293
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3450 static void layout_exif_window_destroy(GtkWidget *widget, gpointer data) |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3451 { |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3452 LayoutWindow *lw = data; |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3453 lw->exif_window = NULL; |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3454 } |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3455 |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3456 void layout_exif_window_new(LayoutWindow *lw) |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3457 { |
2184 | 3458 if (lw->exif_window) return; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3459 |
1433
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
3460 lw->exif_window = advanced_exif_new(); |
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
3461 if (!lw->exif_window) return; |
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
3462 g_signal_connect(G_OBJECT(lw->exif_window), "destroy", |
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
3463 G_CALLBACK(layout_exif_window_destroy), lw); |
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
3464 advanced_exif_set_fd(lw->exif_window, layout_image_get_fd(lw)); |
1293
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3465 } |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3466 |
1055
4bbdfab3c89a
Adding a vim modeline to all files - patch by Klaus Ethgen
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1047
diff
changeset
|
3467 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |