Mercurial > hg > forks > geeqie
annotate src/layout_util.c @ 2817:e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
https://github.com/BestImageViewer/geeqie/issues/624
An option on Select/Show File Filter (or the toolbar) to provide regular
expression file-filtering of the currently displayed folder.
author | Colin Clark <colin.clark@cclark.uk> |
---|---|
date | Wed, 15 Aug 2018 19:43:06 +0100 |
parents | e9e8e8b2afce |
children | f1c975235feb |
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" |
9 | 28 #include "cache_maint.h" |
29 #include "collect.h" | |
30 #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
|
31 #include "compat.h" |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
32 #include "color-man.h" |
9 | 33 #include "dupe.h" |
34 #include "editors.h" | |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
571
diff
changeset
|
35 #include "filedata.h" |
902
ee3a7b7dbc33
Move history_list_*() functions to separate files:
Laurent Monin <geeqie@norz.org>
parents:
894
diff
changeset
|
36 #include "history_list.h" |
284
8dae20c78d18
Fix missing header files inclusions.
Laurent Monin <geeqie@norz.org>
parents:
281
diff
changeset
|
37 #include "image-overlay.h" |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
38 #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
|
39 #include "img-view.h" |
9 | 40 #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
|
41 #include "logwindow.h" |
1022
d09059a8b243
Move miscellaneous functions to their own files (new misc.[ch]).
Laurent Monin <geeqie@norz.org>
parents:
1004
diff
changeset
|
42 #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
|
43 #include "pan-view.h" |
9 | 44 #include "pixbuf_util.h" |
45 #include "preferences.h" | |
46 #include "print.h" | |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
47 #include "rcfile.h" |
9 | 48 #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
|
49 #include "slideshow.h" |
9 | 50 #include "ui_fileops.h" |
51 #include "ui_menu.h" | |
52 #include "ui_misc.h" | |
53 #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
|
54 #include "utilops.h" |
380
41079d11eba7
Introduce a new struct ViewDir to handle directory views common
Laurent Monin <geeqie@norz.org>
parents:
343
diff
changeset
|
55 #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
|
56 #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
|
57 #include "window.h" |
1214
1e36edfd2a43
write metadata after timeout, image change or dir change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1176
diff
changeset
|
58 #include "metadata.h" |
1479
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
59 #include "desktop_file.h" |
9 | 60 |
61 #include <gdk/gdkkeysyms.h> /* for keyboard values */ | |
2362 | 62 #include "keymap_template.c" |
9 | 63 |
64 #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
|
65 #define FILE_COLUMN_POINTER 0 |
9 | 66 |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
67 static gboolean layout_bar_enabled(LayoutWindow *lw); |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
68 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
|
69 static void layout_bars_hide_toggle(LayoutWindow *lw); |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
70 static void layout_util_sync_views(LayoutWindow *lw); |
9 | 71 |
72 /* | |
73 *----------------------------------------------------------------------------- | |
74 * keyboard handler | |
75 *----------------------------------------------------------------------------- | |
76 */ | |
77 | |
78 static guint tree_key_overrides[] = { | |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
79 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
|
80 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
|
81 GDK_KEY_Home, GDK_KEY_KP_Home, |
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
82 GDK_KEY_End, GDK_KEY_KP_End |
9 | 83 }; |
84 | |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
731
diff
changeset
|
85 static gboolean layout_key_match(guint keyval) |
9 | 86 { |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
731
diff
changeset
|
87 guint i; |
9 | 88 |
89 for (i = 0; i < sizeof(tree_key_overrides) / sizeof(guint); i++) | |
90 { | |
91 if (keyval == tree_key_overrides[i]) return TRUE; | |
92 } | |
93 | |
94 return FALSE; | |
95 } | |
96 | |
1433
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
97 gboolean layout_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) |
9 | 98 { |
99 LayoutWindow *lw = data; | |
2042
c3b477b5aec1
fixed keyboard controll of image widget
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2036
diff
changeset
|
100 GtkWidget *focused; |
1433
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
101 gboolean stop_signal = FALSE; |
9 | 102 gint x = 0; |
103 gint y = 0; | |
104 | |
1810
c3a79dda8ea7
GTK marks several functions as deprecated
Klaus Ethgen <Klaus@Ethgen.de>
parents:
1802
diff
changeset
|
105 if (lw->path_entry && gtk_widget_has_focus(lw->path_entry)) |
9 | 106 { |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
107 if (event->keyval == GDK_KEY_Escape && lw->dir_fd) |
9 | 108 { |
783
0e45ed008a1c
replaced directory path with FileData* dir_fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
753
diff
changeset
|
109 gtk_entry_set_text(GTK_ENTRY(lw->path_entry), lw->dir_fd->path); |
9 | 110 } |
111 | |
112 /* the gtkaccelgroup of the window is stealing presses before they get to the entry (and more), | |
113 * so when the some widgets have focus, give them priority (HACK) | |
114 */ | |
115 if (gtk_widget_event(lw->path_entry, (GdkEvent *)event)) | |
116 { | |
117 return TRUE; | |
118 } | |
119 } | |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
120 |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
121 if (lw->vf->file_filter_combo && gtk_widget_has_focus(gtk_bin_get_child(GTK_BIN(lw->vf->file_filter_combo)))) |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
122 { |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
123 if (gtk_widget_event(gtk_bin_get_child(GTK_BIN(lw->vf->file_filter_combo)), (GdkEvent *)event)) |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
124 { |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
125 return TRUE; |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
126 } |
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 |
1810
c3a79dda8ea7
GTK marks several functions as deprecated
Klaus Ethgen <Klaus@Ethgen.de>
parents:
1802
diff
changeset
|
129 if (lw->vd && lw->options.dir_view_type == DIRVIEW_TREE && gtk_widget_has_focus(lw->vd->view) && |
9 | 130 !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
|
131 gtk_widget_event(lw->vd->view, (GdkEvent *)event)) |
9 | 132 { |
133 return TRUE; | |
134 } | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
135 if (lw->bar && |
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
136 bar_event(lw->bar, (GdkEvent *)event)) |
9 | 137 { |
138 return TRUE; | |
139 } | |
140 | |
2042
c3b477b5aec1
fixed keyboard controll of image widget
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2036
diff
changeset
|
141 focused = gtk_container_get_focus_child(GTK_CONTAINER(lw->image->widget)); |
9 | 142 if (lw->image && |
2129
88f4e906cd37
Add parenthesis to silent a possible warning.
Laurent Monin <zas@norz.org>
parents:
2095
diff
changeset
|
143 ((focused && gtk_widget_has_focus(focused)) || (lw->tools && widget == lw->window) || lw->full_screen) ) |
9 | 144 { |
84
34319746590d
Fri Oct 20 08:00:08 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
82
diff
changeset
|
145 stop_signal = TRUE; |
9 | 146 switch (event->keyval) |
147 { | |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
148 case GDK_KEY_Left: case GDK_KEY_KP_Left: |
9 | 149 x -= 1; |
150 break; | |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
151 case GDK_KEY_Right: case GDK_KEY_KP_Right: |
9 | 152 x += 1; |
153 break; | |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
154 case GDK_KEY_Up: case GDK_KEY_KP_Up: |
9 | 155 y -= 1; |
156 break; | |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
157 case GDK_KEY_Down: case GDK_KEY_KP_Down: |
9 | 158 y += 1; |
159 break; | |
84
34319746590d
Fri Oct 20 08:00:08 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
82
diff
changeset
|
160 default: |
34319746590d
Fri Oct 20 08:00:08 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
82
diff
changeset
|
161 stop_signal = FALSE; |
9 | 162 break; |
163 } | |
94
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
164 |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
165 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
|
166 !(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
|
167 { |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
168 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
|
169 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
|
170 { |
2036
472c094c0154
changed GDK_<key> to GDK_KEY_<key>
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
171 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
|
172 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
|
173 break; |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
174 default: |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
175 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
|
176 break; |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
177 } |
7bd3d907ca2b
Thu Nov 2 17:51:31 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
86
diff
changeset
|
178 } |
9 | 179 } |
180 | |
181 if (x != 0 || y!= 0) | |
182 { | |
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
|
183 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
|
184 { |
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 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
|
186 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
|
187 } |
9 | 188 keyboard_scroll_calc(&x, &y, event); |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
189 layout_image_scroll(lw, x, y, (event->state & GDK_SHIFT_MASK)); |
9 | 190 } |
191 | |
192 return stop_signal; | |
193 } | |
194 | |
195 void layout_keyboard_init(LayoutWindow *lw, GtkWidget *window) | |
196 { | |
197 g_signal_connect(G_OBJECT(window), "key_press_event", | |
198 G_CALLBACK(layout_key_press_cb), lw); | |
199 } | |
200 | |
201 /* | |
202 *----------------------------------------------------------------------------- | |
203 * menu callbacks | |
204 *----------------------------------------------------------------------------- | |
205 */ | |
442 | 206 |
207 | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
208 static GtkWidget *layout_window(LayoutWindow *lw) |
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
209 { |
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
210 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
|
211 } |
9 | 212 |
894 | 213 static void layout_exit_fullscreen(LayoutWindow *lw) |
214 { | |
215 if (!lw->full_screen) return; | |
216 layout_image_full_screen_stop(lw); | |
217 } | |
218 | |
2739
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
219 LayoutWindow *layout_menu_new_window(GtkAction *action, gpointer data) |
9 | 220 { |
221 LayoutWindow *lw = data; | |
222 LayoutWindow *nw; | |
1472
3eb241afb6c6
do not copy existing layout id to new window
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1470
diff
changeset
|
223 LayoutOptions lop; |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
224 gboolean tmp = options->save_window_positions; |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2362
diff
changeset
|
225 |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2362
diff
changeset
|
226 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
|
227 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
|
228 |
894 | 229 layout_exit_fullscreen(lw); |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
230 |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
231 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
|
232 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
|
233 |
3eb241afb6c6
do not copy existing layout id to new window
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1470
diff
changeset
|
234 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
|
235 nw = layout_new(NULL, &lop); |
329
056872a2bdf7
Rename file sorting options.
Laurent Monin <geeqie@norz.org>
parents:
318
diff
changeset
|
236 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
|
237 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
|
238 options->save_window_positions = tmp; |
2739
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
239 |
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
240 return nw; |
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
241 } |
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
242 |
2750
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
243 |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
244 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
|
245 { |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
246 generic_dialog_close(gd); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
247 } |
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 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
|
250 { |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
251 help_window_show("GuideMainWindowMenus.html"); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
252 } |
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 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
|
255 { |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
256 marks_clear_all(); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
257 generic_dialog_close(gd); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
258 } |
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 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
|
261 { |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
262 GenericDialog *gd; |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
263 |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
264 gd = generic_dialog_new(_("Clear Marks"), |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
265 "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
|
266 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
|
267 "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
|
268 TRUE); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
269 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
|
270 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
|
271 clear_marks_help_cb, FALSE); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
272 |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
273 gtk_widget_show(gd->dialog); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
274 } |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
275 |
2739
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
276 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
|
277 { |
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
278 layout_menu_new_window(action, data); |
9 | 279 } |
280 | |
281 static void layout_menu_new_cb(GtkAction *action, gpointer data) | |
282 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
283 LayoutWindow *lw = data; |
894 | 284 |
285 layout_exit_fullscreen(lw); | |
9 | 286 collection_window_new(NULL); |
287 } | |
288 | |
289 static void layout_menu_open_cb(GtkAction *action, gpointer data) | |
290 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
291 LayoutWindow *lw = data; |
894 | 292 |
293 layout_exit_fullscreen(lw); | |
9 | 294 collection_dialog_load(NULL); |
295 } | |
296 | |
297 static void layout_menu_search_cb(GtkAction *action, gpointer data) | |
298 { | |
299 LayoutWindow *lw = data; | |
300 | |
894 | 301 layout_exit_fullscreen(lw); |
783
0e45ed008a1c
replaced directory path with FileData* dir_fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
753
diff
changeset
|
302 search_new(lw->dir_fd, layout_image_get_fd(lw)); |
9 | 303 } |
304 | |
305 static void layout_menu_dupes_cb(GtkAction *action, gpointer data) | |
306 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
307 LayoutWindow *lw = data; |
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
308 |
894 | 309 layout_exit_fullscreen(lw); |
2426
28546abc2b90
Fix #435: Remember duplicates settings
Colin Clark <cclark@mcb.net>
parents:
2423
diff
changeset
|
310 dupe_window_new(); |
9 | 311 } |
312 | |
12
8e6d90233b6d
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
313 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
|
314 { |
8e6d90233b6d
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
315 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
|
316 |
894 | 317 layout_exit_fullscreen(lw); |
783
0e45ed008a1c
replaced directory path with FileData* dir_fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
753
diff
changeset
|
318 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
|
319 } |
8e6d90233b6d
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
320 |
9 | 321 static void layout_menu_print_cb(GtkAction *action, gpointer data) |
322 { | |
323 LayoutWindow *lw = data; | |
324 | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
325 print_window_new(layout_image_get_fd(lw), layout_selection_list(lw), layout_list(lw), layout_window(lw)); |
9 | 326 } |
327 | |
328 static void layout_menu_dir_cb(GtkAction *action, gpointer data) | |
329 { | |
330 LayoutWindow *lw = data; | |
331 | |
1637
f82f5ef47061
unify code paths for New directory
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1635
diff
changeset
|
332 if (lw->vd) vd_new_folder(lw->vd, lw->dir_fd); |
9 | 333 } |
334 | |
335 static void layout_menu_copy_cb(GtkAction *action, gpointer data) | |
336 { | |
337 LayoutWindow *lw = data; | |
338 | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
339 file_util_copy(NULL, layout_selection_list(lw), NULL, layout_window(lw)); |
9 | 340 } |
341 | |
497
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
489
diff
changeset
|
342 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
|
343 { |
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
489
diff
changeset
|
344 LayoutWindow *lw = data; |
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
489
diff
changeset
|
345 |
2663
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
346 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
|
347 } |
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 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
|
350 { |
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
351 LayoutWindow *lw = data; |
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
352 |
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
353 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
|
354 } |
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
489
diff
changeset
|
355 |
9 | 356 static void layout_menu_move_cb(GtkAction *action, gpointer data) |
357 { | |
358 LayoutWindow *lw = data; | |
359 | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
360 file_util_move(NULL, layout_selection_list(lw), NULL, layout_window(lw)); |
9 | 361 } |
362 | |
363 static void layout_menu_rename_cb(GtkAction *action, gpointer data) | |
364 { | |
365 LayoutWindow *lw = data; | |
366 | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
367 file_util_rename(NULL, layout_selection_list(lw), layout_window(lw)); |
9 | 368 } |
369 | |
370 static void layout_menu_delete_cb(GtkAction *action, gpointer data) | |
371 { | |
372 LayoutWindow *lw = data; | |
373 | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
374 file_util_delete(NULL, layout_selection_list(lw), layout_window(lw)); |
9 | 375 } |
376 | |
2420
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
377 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
|
378 { |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
379 LayoutWindow *lw = data; |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
380 |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
381 if (options->file_ops.enable_delete_key) |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
382 { |
b5a4ae35fbbf
Fix #447: Preferences Enable Delete key
Colin Clark <cclark@mcb.net>
parents:
2412
diff
changeset
|
383 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
|
384 } |
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 |
1598
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
387 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
|
388 { |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
389 LayoutWindow *lw = data; |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
390 |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
391 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
|
392 } |
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 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
|
395 { |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
396 LayoutWindow *lw = data; |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
397 |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
398 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
|
399 } |
7c4cb51ad5ef
expose the file grouping flag to the user
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1595
diff
changeset
|
400 |
2739
a03b5446e68f
Additional remote commands for layout windows
Colin Clark <colin.clark@cclark.uk>
parents:
2736
diff
changeset
|
401 void layout_menu_close_cb(GtkAction *action, gpointer data) |
9 | 402 { |
403 LayoutWindow *lw = data; | |
404 | |
894 | 405 layout_exit_fullscreen(lw); |
9 | 406 layout_close(lw); |
407 } | |
408 | |
409 static void layout_menu_exit_cb(GtkAction *action, gpointer data) | |
410 { | |
278
79fed35f1650
exit_gqview() renamed to exit_program().
Laurent Monin <geeqie@norz.org>
parents:
273
diff
changeset
|
411 exit_program(); |
9 | 412 } |
413 | |
414 static void layout_menu_alter_90_cb(GtkAction *action, gpointer data) | |
415 { | |
416 LayoutWindow *lw = data; | |
417 | |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
418 layout_image_alter_orientation(lw, ALTER_ROTATE_90); |
9 | 419 } |
420 | |
2500
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
421 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
|
422 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
423 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
424 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
425 layout_image_rating(lw, "0"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
426 } |
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 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
|
429 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
430 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
431 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
432 layout_image_rating(lw, "1"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
433 } |
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 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
|
436 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
437 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
438 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
439 layout_image_rating(lw, "2"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
440 } |
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 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
|
443 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
444 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
445 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
446 layout_image_rating(lw, "3"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
447 } |
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 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
|
450 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
451 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
452 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
453 layout_image_rating(lw, "4"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
454 } |
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 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
|
457 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
458 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
459 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
460 layout_image_rating(lw, "5"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
461 } |
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 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
|
464 { |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
465 LayoutWindow *lw = data; |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
466 |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
467 layout_image_rating(lw, "-1"); |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
468 } |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
469 |
9 | 470 static void layout_menu_alter_90cc_cb(GtkAction *action, gpointer data) |
471 { | |
472 LayoutWindow *lw = data; | |
473 | |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
474 layout_image_alter_orientation(lw, ALTER_ROTATE_90_CC); |
9 | 475 } |
476 | |
477 static void layout_menu_alter_180_cb(GtkAction *action, gpointer data) | |
478 { | |
479 LayoutWindow *lw = data; | |
480 | |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
481 layout_image_alter_orientation(lw, ALTER_ROTATE_180); |
9 | 482 } |
483 | |
484 static void layout_menu_alter_mirror_cb(GtkAction *action, gpointer data) | |
485 { | |
486 LayoutWindow *lw = data; | |
487 | |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
488 layout_image_alter_orientation(lw, ALTER_MIRROR); |
9 | 489 } |
490 | |
491 static void layout_menu_alter_flip_cb(GtkAction *action, gpointer data) | |
492 { | |
493 LayoutWindow *lw = data; | |
494 | |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
495 layout_image_alter_orientation(lw, ALTER_FLIP); |
9 | 496 } |
497 | |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
498 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
|
499 { |
05a6aea69f24
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
41
diff
changeset
|
500 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
|
501 |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
502 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
|
503 } |
05a6aea69f24
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
41
diff
changeset
|
504 |
439
a529755a2be0
Add a way to restore original state in Adjust menu.
Laurent Monin <geeqie@norz.org>
parents:
433
diff
changeset
|
505 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
|
506 { |
a529755a2be0
Add a way to restore original state in Adjust menu.
Laurent Monin <geeqie@norz.org>
parents:
433
diff
changeset
|
507 LayoutWindow *lw = data; |
a529755a2be0
Add a way to restore original state in Adjust menu.
Laurent Monin <geeqie@norz.org>
parents:
433
diff
changeset
|
508 |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
509 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
|
510 } |
a529755a2be0
Add a way to restore original state in Adjust menu.
Laurent Monin <geeqie@norz.org>
parents:
433
diff
changeset
|
511 |
2438
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
512 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
|
513 { |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
514 LayoutWindow *lw = data; |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
515 |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
516 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
|
517 layout_image_reset_orientation(lw); |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
518 } |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
519 |
2801
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
520 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
|
521 { |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
522 LayoutWindow *lw = data; |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
523 |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
524 options->draw_rectangle = gtk_toggle_action_get_active(action); |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
525 } |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
526 |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
527 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
|
528 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
529 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
|
530 GtkTreeModel *store; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
531 GList *work; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
532 GtkTreeSelection *selection; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
533 GtkTreePath *tpath; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
534 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
|
535 GtkTreeIter iter; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
536 gchar *rotation; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
537 gchar *command; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
538 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
|
539 GenericDialog *gd; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
540 GString *message; |
2726
37c2e1a7d08b
Fix #588,589: Geeqie fails to build on macOS
Misty De Meo <>
parents:
2705
diff
changeset
|
541 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
|
542 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
543 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
|
544 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
545 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
|
546 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
547 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
|
548 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
549 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
|
550 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
|
551 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
552 else |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
553 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
554 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
|
555 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
|
556 } |
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 while (work) |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
559 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
560 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
|
561 { |
2523
46f57b0ed091
Remove all references to "IconData"
Omari Stephens <xsdg@google.com>
parents:
2517
diff
changeset
|
562 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
|
563 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
|
564 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
565 else |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
566 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
567 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
|
568 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
|
569 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
|
570 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
|
571 } |
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 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
|
574 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
|
575 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
|
576 cmdstatus = runcmd(command); |
37c2e1a7d08b
Fix #588,589: Geeqie fails to build on macOS
Misty De Meo <>
parents:
2705
diff
changeset
|
577 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
|
578 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
|
579 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
580 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
|
581 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
582 else |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
583 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
584 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
|
585 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
|
586 |
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
|
587 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
|
588 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
|
589 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
|
590 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
|
591 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
|
592 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
|
593 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
|
594 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
|
595 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
|
596 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
|
597 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
|
598 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
|
599 |
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 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
|
601 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
602 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
|
603 "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
|
604 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
|
605 "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
|
606 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
|
607 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
608 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
|
609 |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
610 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
|
611 } |
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 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
|
614 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
|
615 } |
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 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
|
619 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
620 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
|
621 } |
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 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
|
624 { |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
625 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
|
626 } |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
627 |
9 | 628 static void layout_menu_config_cb(GtkAction *action, gpointer data) |
629 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
630 LayoutWindow *lw = data; |
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
631 |
894 | 632 layout_exit_fullscreen(lw); |
9 | 633 show_config_window(); |
634 } | |
635 | |
1479
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
636 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
|
637 { |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
638 LayoutWindow *lw = data; |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
639 |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
640 layout_exit_fullscreen(lw); |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
641 show_editor_list_window(); |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
642 } |
e6db8d80a785
added simple desktop file editor
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1472
diff
changeset
|
643 |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
644 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
|
645 { |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
646 LayoutWindow *lw = data; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
647 |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
648 layout_exit_fullscreen(lw); |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
649 layout_show_config_window(lw); |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
650 } |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
651 |
9 | 652 static void layout_menu_remove_thumb_cb(GtkAction *action, gpointer data) |
653 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
654 LayoutWindow *lw = data; |
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
655 |
894 | 656 layout_exit_fullscreen(lw); |
9 | 657 cache_manager_show(); |
658 } | |
659 | |
660 static void layout_menu_wallpaper_cb(GtkAction *action, gpointer data) | |
661 { | |
662 LayoutWindow *lw = data; | |
663 | |
664 layout_image_to_root(lw); | |
665 } | |
666 | |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
667 /* single window zoom */ |
9 | 668 static void layout_menu_zoom_in_cb(GtkAction *action, gpointer data) |
669 { | |
670 LayoutWindow *lw = data; | |
671 | |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
672 layout_image_zoom_adjust(lw, get_zoom_increment(), FALSE); |
9 | 673 } |
674 | |
675 static void layout_menu_zoom_out_cb(GtkAction *action, gpointer data) | |
676 { | |
677 LayoutWindow *lw = data; | |
678 | |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
679 layout_image_zoom_adjust(lw, -get_zoom_increment(), FALSE); |
9 | 680 } |
681 | |
682 static void layout_menu_zoom_1_1_cb(GtkAction *action, gpointer data) | |
683 { | |
684 LayoutWindow *lw = data; | |
685 | |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
686 layout_image_zoom_set(lw, 1.0, FALSE); |
9 | 687 } |
688 | |
689 static void layout_menu_zoom_fit_cb(GtkAction *action, gpointer data) | |
690 { | |
691 LayoutWindow *lw = data; | |
692 | |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
693 layout_image_zoom_set(lw, 0.0, FALSE); |
9 | 694 } |
695 | |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
696 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
|
697 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
698 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
699 |
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
|
700 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
|
701 } |
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 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
|
704 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
705 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
706 |
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
|
707 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
|
708 } |
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 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
|
711 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
712 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
713 |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
714 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
|
715 } |
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 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
|
718 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
719 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
720 |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
721 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
|
722 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
723 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
|
724 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
725 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
726 |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
727 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
|
728 } |
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 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
|
731 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
732 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
733 |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
734 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
|
735 } |
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 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
|
738 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
739 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
740 |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
741 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
|
742 } |
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 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
|
745 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
746 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
747 |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
748 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
|
749 } |
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 /* connected zoom */ |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
752 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
|
753 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
754 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
755 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
756 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
|
757 } |
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 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
|
760 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
761 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
762 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
763 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
|
764 } |
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 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
|
767 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
768 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
769 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
770 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
|
771 } |
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 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
|
774 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
775 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
776 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
777 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
|
778 } |
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 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
|
781 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
782 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
783 |
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
|
784 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
|
785 } |
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 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
|
788 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
789 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
790 |
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
|
791 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
|
792 } |
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 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
|
795 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
796 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
797 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
798 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
|
799 } |
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 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
|
802 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
803 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
804 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
805 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
|
806 } |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
807 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
|
808 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
809 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
810 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
811 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
|
812 } |
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 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
|
815 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
816 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
817 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
818 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
|
819 } |
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 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
|
822 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
823 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
824 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
825 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
|
826 } |
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 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
|
829 { |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
830 LayoutWindow *lw = data; |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
831 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
832 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
|
833 } |
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 |
156
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
836 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
|
837 { |
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
838 LayoutWindow *lw = data; |
894 | 839 ImageSplitMode mode; |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
840 |
894 | 841 layout_exit_fullscreen(lw); |
842 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
|
843 layout_split_change(lw, mode); |
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
844 } |
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 |
9 | 847 static void layout_menu_thumb_cb(GtkToggleAction *action, gpointer data) |
848 { | |
849 LayoutWindow *lw = data; | |
850 | |
851 layout_thumb_set(lw, gtk_toggle_action_get_active(action)); | |
852 } | |
853 | |
132
b025afc3c92a
First implementation of marks for all photos.
Petr Ostadal <postadal@suse.cz>
parents:
122
diff
changeset
|
854 |
9 | 855 static void layout_menu_list_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) |
856 { | |
857 LayoutWindow *lw = data; | |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
858 |
894 | 859 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
|
860 layout_views_set(lw, lw->options.dir_view_type, (FileViewType) gtk_radio_action_get_current_value(action)); |
9 | 861 } |
862 | |
2461
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
863 static void layout_menu_view_dir_as_cb(GtkToggleAction *action, gpointer data) |
9 | 864 { |
865 LayoutWindow *lw = data; | |
866 | |
894 | 867 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
|
868 |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
869 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
|
870 { |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
871 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
|
872 } |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
873 else |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
874 { |
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
875 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
|
876 } |
9 | 877 } |
878 | |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
879 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
|
880 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
881 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
882 |
894 | 883 layout_exit_fullscreen(lw); |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
884 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
|
885 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
886 |
9 | 887 static void layout_menu_fullscreen_cb(GtkAction *action, gpointer data) |
888 { | |
889 LayoutWindow *lw = data; | |
890 | |
891 layout_image_full_screen_toggle(lw); | |
892 } | |
893 | |
428
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
894 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
|
895 { |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
896 LayoutWindow *lw = data; |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
897 |
894 | 898 layout_exit_fullscreen(lw); |
428
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
899 } |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
900 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
901 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
|
902 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
903 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
904 |
482
b0194f65c239
Use image_osd_toggle() in layout_menu_overlay_cb().
Laurent Monin <geeqie@norz.org>
parents:
479
diff
changeset
|
905 image_osd_toggle(lw->image); |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
906 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
|
907 } |
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
908 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
909 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
910 static void layout_menu_overlay_cb(GtkToggleAction *action, gpointer data) |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
911 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
912 LayoutWindow *lw = data; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
913 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
914 if (gtk_toggle_action_get_active(action)) |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
915 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
916 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
|
917 |
1666
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
918 if ((flags | OSD_SHOW_INFO | OSD_SHOW_STATUS) != flags) |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
919 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
|
920 } |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
921 else |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
922 { |
1739
9e6163a48453
Remove an unused variable and minor code cleanup.
Laurent Monin <geeqie@norz.org>
parents:
1738
diff
changeset
|
923 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
|
924 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
925 image_osd_set(lw->image, OSD_SHOW_NOTHING); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
926 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
|
927 } |
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 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
|
931 { |
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
932 LayoutWindow *lw = data; |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
933 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
934 if (gtk_toggle_action_get_active(action)) |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
935 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
936 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
|
937 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
|
938 } |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
939 else |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
940 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
941 OsdShowFlags flags = image_osd_get(lw->image); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
942 if (flags & OSD_SHOW_HISTOGRAM) |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
943 image_osd_set(lw->image, flags & ~OSD_SHOW_HISTOGRAM); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
944 } |
273
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
945 } |
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
946 |
2794
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
947 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
|
948 { |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
949 LayoutWindow *lw = data; |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
950 |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
951 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
|
952 { |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
953 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
|
954 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
|
955 layout_util_sync_views(lw); |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
956 } |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
957 else |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
958 { |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
959 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
|
960 if (flags & OSD_SHOW_GUIDELINES) |
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
961 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
|
962 } |
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 |
2433 | 965 static void layout_menu_animate_cb(GtkToggleAction *action, gpointer data) |
966 { | |
967 LayoutWindow *lw = data; | |
968 | |
969 if (lw->options.animate == gtk_toggle_action_get_active(action)) return; | |
970 layout_image_animate_toggle(lw); | |
971 } | |
972 | |
2423 | 973 static void layout_menu_rectangular_selection_cb(GtkToggleAction *action, gpointer data) |
974 { | |
975 options->collections.rectangular_selection = gtk_toggle_action_get_active(action); | |
976 } | |
977 | |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
978 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
|
979 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
980 LayoutWindow *lw = data; |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
981 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
982 image_osd_histogram_toggle_channel(lw->image); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
983 layout_util_sync_views(lw); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
984 } |
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 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
|
987 { |
aedbff4f5d0d
reworked the histogram patch by Uwe Ohse, most of the code is in
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
249
diff
changeset
|
988 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
|
989 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
990 image_osd_histogram_toggle_mode(lw->image); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
991 layout_util_sync_views(lw); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
992 } |
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 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
|
995 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
996 LayoutWindow *lw = data; |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
997 gint channel = gtk_radio_action_get_current_value(action); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
998 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
|
999 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1000 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
|
1001 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1002 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
|
1003 image_osd_histogram_set_channel(lw->image, channel); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1004 } |
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 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
|
1007 { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1008 LayoutWindow *lw = data; |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1009 gint mode = gtk_radio_action_get_current_value(action); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1010 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
|
1011 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1012 if (mode < 0 || mode > 1) return; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1013 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
1014 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
|
1015 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
|
1016 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1017 |
9 | 1018 static void layout_menu_refresh_cb(GtkAction *action, gpointer data) |
1019 { | |
1020 LayoutWindow *lw = data; | |
1021 | |
1022 layout_refresh(lw); | |
1023 } | |
1024 | |
1410
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1025 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
|
1026 { |
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1027 LayoutWindow *lw = data; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1028 |
1410
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1029 layout_exit_fullscreen(lw); |
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1030 layout_exif_window_new(lw); |
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1031 } |
cd07348a7629
Remove the toggle on advanced exif window menu item.
Laurent Monin <geeqie@norz.org>
parents:
1387
diff
changeset
|
1032 |
9 | 1033 static void layout_menu_float_cb(GtkToggleAction *action, gpointer data) |
1034 { | |
1035 LayoutWindow *lw = data; | |
1036 | |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
1037 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
|
1038 |
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1039 layout_exit_fullscreen(lw); |
894 | 1040 layout_tools_float_toggle(lw); |
9 | 1041 } |
1042 | |
1043 static void layout_menu_hide_cb(GtkAction *action, gpointer data) | |
1044 { | |
1045 LayoutWindow *lw = data; | |
1046 | |
894 | 1047 layout_exit_fullscreen(lw); |
9 | 1048 layout_tools_hide_toggle(lw); |
1049 } | |
1050 | |
1051 static void layout_menu_toolbar_cb(GtkToggleAction *action, gpointer data) | |
1052 { | |
1053 LayoutWindow *lw = data; | |
894 | 1054 |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1055 if (lw->options.toolbar_hidden == gtk_toggle_action_get_active(action)) return; |
9 | 1056 |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1057 layout_exit_fullscreen(lw); |
894 | 1058 layout_toolbar_toggle(lw); |
9 | 1059 } |
1060 | |
1375
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1061 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
|
1062 { |
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1063 LayoutWindow *lw = data; |
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1064 |
1584
c97dea5d82d7
improved pixel info, changed the menu entry from "Hide" to "Show",
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1583
diff
changeset
|
1065 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
|
1066 |
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1067 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
|
1068 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
|
1069 } |
08db75ca4713
Display pixel coordinates and rgb - patch by Ruben Stein
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1348
diff
changeset
|
1070 |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1071 /* 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
|
1072 static void layout_menu_bar_cb(GtkToggleAction *action, gpointer data) |
9 | 1073 { |
1074 LayoutWindow *lw = data; | |
894 | 1075 |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1076 if (layout_bar_enabled(lw) == gtk_toggle_action_get_active(action)) return; |
9 | 1077 |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1078 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
|
1079 layout_bar_toggle(lw); |
9 | 1080 } |
1081 | |
1082 static void layout_menu_bar_sort_cb(GtkToggleAction *action, gpointer data) | |
1083 { | |
1084 LayoutWindow *lw = data; | |
894 | 1085 |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
1086 if (layout_bar_sort_enabled(lw) == gtk_toggle_action_get_active(action)) return; |
9 | 1087 |
1318
cc1bb588c0cb
fixed --fullscreen option together with enabled bar
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1317
diff
changeset
|
1088 layout_exit_fullscreen(lw); |
894 | 1089 layout_bar_sort_toggle(lw); |
9 | 1090 } |
1091 | |
2506
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1092 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
|
1093 { |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1094 LayoutWindow *lw = data; |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1095 |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1096 layout_bars_hide_toggle(lw); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1097 } |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
1098 |
1727
300439b7407f
fixed toggle_slideshow function
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1724
diff
changeset
|
1099 static void layout_menu_slideshow_cb(GtkToggleAction *action, gpointer data) |
9 | 1100 { |
1101 LayoutWindow *lw = data; | |
1102 | |
1727
300439b7407f
fixed toggle_slideshow function
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1724
diff
changeset
|
1103 if (layout_image_slideshow_active(lw) == gtk_toggle_action_get_active(action)) return; |
9 | 1104 layout_image_slideshow_toggle(lw); |
1105 } | |
1106 | |
428
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
1107 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
|
1108 { |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
1109 LayoutWindow *lw = data; |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
1110 |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
1111 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
|
1112 } |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
1113 |
2590
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1114 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
|
1115 { |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1116 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
|
1117 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
|
1118 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 } |
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 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
|
1122 { |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1123 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
|
1124 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
|
1125 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 } |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
1127 |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1128 |
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1129 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
|
1130 { |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1131 LayoutWindow *lw = data; |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1132 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
|
1133 |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1134 /* 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
|
1135 mode = mode % 3 + 1; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1136 |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1137 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
|
1138 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
|
1139 |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1140 /* |
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1141 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
|
1142 layout_image_stereo_pixbuf_set(lw, mode); |
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1143 */ |
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1144 |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1145 } |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
1146 |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1147 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
|
1148 { |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1149 LayoutWindow *lw = data; |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1150 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
|
1151 layout_image_stereo_pixbuf_set(lw, mode); |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1152 } |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
1153 |
9 | 1154 static void layout_menu_help_cb(GtkAction *action, gpointer data) |
1155 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
1156 LayoutWindow *lw = data; |
894 | 1157 |
1158 layout_exit_fullscreen(lw); | |
2412 | 1159 help_window_show("index.html"); |
9 | 1160 } |
1161 | |
2756
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1162 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
|
1163 { |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1164 LayoutWindow *lw = data; |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1165 |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1166 layout_exit_fullscreen(lw); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1167 help_search_window_show(); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1168 } |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
1169 |
9 | 1170 static void layout_menu_help_keys_cb(GtkAction *action, gpointer data) |
1171 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
1172 LayoutWindow *lw = data; |
894 | 1173 |
1174 layout_exit_fullscreen(lw); | |
2412 | 1175 help_window_show("GuideReferenceKeyboardShortcuts.html"); |
9 | 1176 } |
1177 | |
1178 static void layout_menu_notes_cb(GtkAction *action, gpointer data) | |
1179 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
1180 LayoutWindow *lw = data; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1181 |
894 | 1182 layout_exit_fullscreen(lw); |
9 | 1183 help_window_show("release_notes"); |
1184 } | |
1185 | |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1186 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
|
1187 { |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1188 LayoutWindow *lw = data; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1189 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1190 layout_exit_fullscreen(lw); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1191 help_window_show("changelog"); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1192 } |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1193 |
2362 | 1194 static char *keyboard_map_hardcoded[][2] = { |
1195 {"Scroll","Left"}, | |
1196 {"FastScroll", "<Shift>Left"}, | |
1197 {"Left Border", "<Primary>Left"}, | |
1198 {"Left Border", "<Primary><Shift>Left"}, | |
1199 {"Scroll", "Right"}, | |
1200 {"FastScroll", "<Shift>Right"}, | |
1201 {"Right Border", "<Primary>Right"}, | |
1202 {"Right Border", "<Primary><Shift>Right"}, | |
1203 {"Scroll", "Up"}, | |
1204 {"FastScroll", "<Shift>Up"}, | |
1205 {"Uper Border", "<Primary>Up"}, | |
1206 {"Uper Border", "<Primary><Shift>Up"}, | |
1207 {"Scroll", "Down"}, | |
1208 {"FastScroll", "<Shift>Down"}, | |
1209 {"Lower Border", "<Primary>Down"}, | |
1210 {"Lower Border", "<Primary><Shift>Down"}, | |
1211 {"Next/Drag", "M1"}, | |
1212 {"FastDrag", "<Shift>M1"}, | |
1213 {"DnD Start", "M2"}, | |
1214 {"Menu", "M3"}, | |
1215 {"PrevImage", "MW4"}, | |
1216 {"NextImage", "MW5"}, | |
1217 {"ScrollUp", "<Shift>MW4"}, | |
1218 {"ScrollDown", "<Shift>MW5"}, | |
1219 {"ZoomIn", "<Primary>MW4"}, | |
1220 {"ZoomOut", "<Primary>MW5"}, | |
1221 {NULL, NULL} | |
1222 }; | |
1223 | |
1224 static void layout_menu_foreach_func( | |
1225 gpointer data, | |
1226 const gchar *accel_path, | |
1227 guint accel_key, | |
1228 GdkModifierType accel_mods, | |
1229 gboolean changed) | |
1230 { | |
1231 gchar *path, *name; | |
1232 gchar *key_name, *menu_name; | |
1233 gchar **subset_lt_arr, **subset_gt_arr; | |
1234 gchar *subset_lt, *converted_name; | |
1235 GPtrArray *array = data; | |
1236 | |
1237 path = g_strescape(accel_path, NULL); | |
1238 name = gtk_accelerator_name(accel_key, accel_mods); | |
1239 | |
1240 menu_name = g_strdup(g_strrstr(path, "/")+1); | |
1241 | |
1242 if (g_strrstr(name, ">")) | |
1243 { | |
1244 subset_lt_arr = g_strsplit_set(name,"<", 4); | |
1245 subset_lt = g_strjoinv("<", subset_lt_arr); | |
1246 subset_gt_arr = g_strsplit_set(subset_lt,">", 4); | |
1247 converted_name = g_strjoinv(">", subset_gt_arr); | |
1248 key_name = g_strdup(converted_name); | |
1249 | |
1250 g_free(converted_name); | |
1251 g_free(subset_lt); | |
1252 g_strfreev(subset_lt_arr); | |
1253 g_strfreev(subset_gt_arr); | |
1254 } | |
1255 else | |
1256 key_name = g_strdup(name); | |
1257 | |
1258 g_ptr_array_add(array, (gpointer)menu_name); | |
1259 g_ptr_array_add(array, (gpointer)key_name); | |
1260 | |
1261 g_free(name); | |
1262 g_free(path); | |
1263 } | |
1264 | |
1265 static void layout_menu_kbd_map_cb(GtkAction *action, gpointer data) | |
1266 { | |
1267 gint fd = -1; | |
1268 GPtrArray *array; | |
1269 char * tmp_file; | |
1270 GError *error = NULL; | |
1271 GIOChannel *channel; | |
1272 char **pre_key, **post_key; | |
1273 char *key_name, *converted_line; | |
1274 int keymap_index, index; | |
1275 | |
1276 fd = g_file_open_tmp("geeqie_keymap_XXXXXX.svg", &tmp_file, &error); | |
1277 if (error) | |
1278 { | |
2604
425b69f7ff5f
Revise DEBUG_0() usage
Colin Clark <colin.clark@cclark.uk>
parents:
2600
diff
changeset
|
1279 log_printf("Error: Keyboard Map - cannot create file:%s\n",error->message); |
2362 | 1280 g_error_free(error); |
1281 } | |
1282 else | |
1283 { | |
1284 array = g_ptr_array_new(); | |
1285 | |
1286 gtk_accel_map_foreach(array, layout_menu_foreach_func); | |
1287 | |
1288 channel = g_io_channel_unix_new(fd); | |
1289 | |
1290 keymap_index = 0; | |
1291 while (keymap_template[keymap_index]) | |
1292 { | |
1293 if (g_strrstr(keymap_template[keymap_index], ">key:")) | |
1294 { | |
1295 pre_key = g_strsplit(keymap_template[keymap_index],">key:",2); | |
1296 post_key = g_strsplit(pre_key[1],"<",2); | |
1297 | |
1298 index=0; | |
1299 key_name = " "; | |
1300 for (index=0; index < array->len-2; index=index+2) | |
1301 { | |
1302 if (!(g_ascii_strcasecmp(g_ptr_array_index(array,index+1), post_key[0]))) | |
1303 { | |
1304 key_name = g_ptr_array_index(array,index+0); | |
1305 break; | |
1306 } | |
1307 } | |
1308 | |
1309 index=0; | |
1310 while (keyboard_map_hardcoded[index][0]) | |
1311 { | |
1312 if (!(g_strcmp0(keyboard_map_hardcoded[index][1], post_key[0]))) | |
1313 { | |
1314 key_name = keyboard_map_hardcoded[index][0]; | |
1315 break; | |
1316 } | |
1317 index++; | |
1318 } | |
1319 | |
1320 converted_line = g_strconcat(pre_key[0], ">", key_name, "<", post_key[1], "\n", NULL); | |
1321 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
|
1322 if (error) {log_printf("Warning: Keyboard Map:%s\n",error->message); g_error_free(error);} |
2362 | 1323 |
1324 g_free(converted_line); | |
1325 g_strfreev(pre_key); | |
1326 g_strfreev(post_key); | |
1327 } | |
1328 else | |
1329 { | |
1330 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
|
1331 if (error) {log_printf("Warning: Keyboard Map:%s\n",error->message); g_error_free(error);} |
2362 | 1332 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
|
1333 if (error) {log_printf("Warning: Keyboard Map:%s\n",error->message); g_error_free(error);} |
2362 | 1334 } |
1335 keymap_index++; | |
1336 } | |
1337 | |
1338 g_io_channel_flush(channel, &error); | |
2604
425b69f7ff5f
Revise DEBUG_0() usage
Colin Clark <colin.clark@cclark.uk>
parents:
2600
diff
changeset
|
1339 if (error) {log_printf("Warning: Keyboard Map:%s\n",error->message); g_error_free(error);} |
2362 | 1340 g_io_channel_unref(channel); |
1341 | |
1342 index=0; | |
1343 for (index=0; index < array->len-2; index=index+2) | |
1344 { | |
1345 g_free(g_ptr_array_index(array,index)); | |
1346 g_free(g_ptr_array_index(array,index+1)); | |
1347 } | |
1348 g_ptr_array_unref(array); | |
1349 | |
1350 view_window_new(file_data_new_simple(tmp_file)); | |
1351 g_free(tmp_file); | |
1352 } | |
1353 } | |
1354 | |
9 | 1355 static void layout_menu_about_cb(GtkAction *action, gpointer data) |
1356 { | |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
1357 LayoutWindow *lw = data; |
894 | 1358 |
1359 layout_exit_fullscreen(lw); | |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
1360 show_about_window(lw); |
9 | 1361 } |
1362 | |
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
|
1363 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
|
1364 { |
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 LayoutWindow *lw = data; |
894 | 1366 |
1367 layout_exit_fullscreen(lw); | |
2508
a39331032807
Additional debug features
Colin Clark <colin.clark@cclark.uk>
parents:
2506
diff
changeset
|
1368 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
|
1369 } |
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 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1371 |
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 * select menu |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1375 *----------------------------------------------------------------------------- |
442 | 1376 */ |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1377 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1378 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
|
1379 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1380 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1381 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1382 layout_select_all(lw); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1383 } |
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 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
|
1386 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1387 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1388 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1389 layout_select_none(lw); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1390 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1391 |
601
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1392 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
|
1393 { |
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1394 LayoutWindow *lw = data; |
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1395 |
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1396 layout_select_invert(lw); |
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1397 } |
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
1398 |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1399 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
|
1400 { |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1401 LayoutWindow *lw = data; |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1402 |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1403 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
|
1404 } |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
1405 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1406 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
|
1407 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1408 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1409 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1410 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
|
1411 } |
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 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
|
1415 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1416 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1417 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
|
1418 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1419 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1420 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
|
1421 } |
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 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
|
1424 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1425 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1426 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
|
1427 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1428 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1429 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
|
1430 } |
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 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
|
1433 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1434 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1435 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
|
1436 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1437 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1438 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
|
1439 } |
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 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
|
1442 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1443 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1444 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
|
1445 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1446 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1447 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
|
1448 } |
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 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
|
1451 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1452 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1453 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
|
1454 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1455 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1456 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
|
1457 } |
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 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
|
1460 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1461 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1462 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
|
1463 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1464 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1465 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
|
1466 } |
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 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
|
1469 { |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1470 LayoutWindow *lw = data; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1471 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
|
1472 g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE); |
442 | 1473 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1474 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
|
1475 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1476 |
1635
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1477 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
|
1478 { |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1479 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
|
1480 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
|
1481 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
|
1482 |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1483 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
|
1484 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
|
1485 } |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
1486 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
1487 |
9 | 1488 /* |
1489 *----------------------------------------------------------------------------- | |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1490 * go menu |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1491 *----------------------------------------------------------------------------- |
442 | 1492 */ |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1493 |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1494 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
|
1495 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1496 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1497 layout_image_first(lw); |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1498 } |
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 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
|
1501 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1502 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1503 layout_image_prev(lw); |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1504 } |
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 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
|
1507 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1508 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1509 layout_image_next(lw); |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1510 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1511 |
2493
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1512 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
|
1513 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1514 LayoutWindow *lw = data; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1515 gint active_frame; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1516 |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1517 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
|
1518 |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1519 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
|
1520 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1521 active_frame++; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1522 } |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1523 else |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1524 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1525 active_frame = 0; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1526 } |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1527 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
|
1528 } |
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 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
|
1531 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1532 LayoutWindow *lw = data; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1533 gint active_frame; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1534 |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1535 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
|
1536 |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1537 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
|
1538 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1539 active_frame--; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1540 } |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1541 else |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1542 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1543 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
|
1544 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
|
1545 { |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1546 active_frame--; |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1547 } |
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 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
|
1550 } |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
1551 |
2517
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1552 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
|
1553 { |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1554 LayoutWindow *lw = data; |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1555 gint active_frame; |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1556 |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1557 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
|
1558 |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1559 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
|
1560 { |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1561 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
|
1562 } |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1563 else |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1564 { |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1565 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
|
1566 } |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1567 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
|
1568 } |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
1569 |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1570 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
|
1571 { |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1572 LayoutWindow *lw = data; |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1573 layout_image_last(lw); |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1574 } |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1575 |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1576 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
|
1577 { |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1578 LayoutWindow *lw = data; |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1579 FileData *dir_fd; |
2609
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1580 |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1581 /* Obtain previous path */ |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1582 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
|
1583 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
|
1584 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
|
1585 } |
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 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
|
1588 { |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1589 LayoutWindow *lw = data; |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1590 FileData *dir_fd; |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1591 |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1592 /* Obtain next path */ |
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1593 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
|
1594 layout_set_fd(lw, dir_fd); |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1595 file_data_unref(dir_fd); |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1596 } |
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 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
|
1599 { |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
1600 LayoutWindow *lw = data; |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1601 const gchar *path; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
1602 |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1433
diff
changeset
|
1603 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
|
1604 path = lw->options.home_path; |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1605 else |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1606 path = homedir(); |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1607 |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1608 if (path) |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1609 { |
1927
d1a5b8633919
always check for sidecars by readdir
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1917
diff
changeset
|
1610 FileData *dir_fd = file_data_new_dir(path); |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1611 layout_set_fd(lw, dir_fd); |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1612 file_data_unref(dir_fd); |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
1613 } |
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 |
2263
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1616 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
|
1617 { |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1618 LayoutWindow *lw = data; |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1619 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
|
1620 gchar *path; |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1621 |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1622 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
|
1623 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
|
1624 |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1625 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
|
1626 { |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1627 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
|
1628 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
|
1629 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
|
1630 } |
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 g_free(path); |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1633 } |
cd32117e507a
Feature Request #70 Navigation menu option and button for parent directory
Colin Clark <cclark@mcb.net>
parents:
2185
diff
changeset
|
1634 |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
1635 |
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 *----------------------------------------------------------------------------- |
9 | 1638 * edit menu |
1639 *----------------------------------------------------------------------------- | |
442 | 1640 */ |
9 | 1641 |
1642 static void layout_menu_edit_cb(GtkAction *action, gpointer data) | |
1643 { | |
1644 LayoutWindow *lw = data; | |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
1645 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
|
1646 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
1647 if (!editor_window_flag_set(key)) |
894 | 1648 layout_exit_fullscreen(lw); |
160
1569f14304cd
use accels also in fullscreen mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
159
diff
changeset
|
1649 |
1656
84034de67e74
fixed leak in file_util_* functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1652
diff
changeset
|
1650 file_util_start_editor_from_filelist(key, layout_selection_list(lw), layout_get_path(lw), lw->window); |
9 | 1651 } |
1652 | |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
1653 |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
1654 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
|
1655 { |
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
|
1656 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
|
1657 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
1658 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1659 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1660 /* |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1661 *----------------------------------------------------------------------------- |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1662 * color profile button (and menu) |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1663 *----------------------------------------------------------------------------- |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1664 */ |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1665 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1666 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
|
1667 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1668 #ifdef HAVE_LCMS |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1669 LayoutWindow *lw = data; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1670 |
1737
57412a89c494
fixed unnecessary image reloads in color menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1736
diff
changeset
|
1671 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
|
1672 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1673 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
|
1674 layout_util_sync_color(lw); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1675 layout_image_refresh(lw); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1676 #endif |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1677 } |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1678 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1679 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
|
1680 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1681 #ifdef HAVE_LCMS |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1682 LayoutWindow *lw = data; |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
1683 gint input; |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1684 gboolean use_image; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1685 |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
1686 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
|
1687 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
|
1688 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
|
1689 layout_util_sync_color(lw); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1690 layout_image_refresh(lw); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1691 #endif |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1692 } |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1693 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1694 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
|
1695 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1696 #ifdef HAVE_LCMS |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1697 LayoutWindow *lw = data; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1698 gint type; |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
1699 gint input; |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1700 gboolean use_image; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1701 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1702 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
|
1703 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
|
1704 |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
1705 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
|
1706 if (type == input) return; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1707 |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
1708 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
|
1709 layout_image_refresh(lw); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1710 #endif |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1711 } |
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 |
9 | 1714 /* |
1715 *----------------------------------------------------------------------------- | |
1716 * recent menu | |
1717 *----------------------------------------------------------------------------- | |
1718 */ | |
1719 | |
1720 static void layout_menu_recent_cb(GtkWidget *widget, gpointer data) | |
1721 { | |
1722 gint n; | |
1723 gchar *path; | |
1724 | |
1725 n = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "recent_index")); | |
1726 | |
1727 path = g_list_nth_data(history_list_get_by_key("recent"), n); | |
1728 | |
1729 if (!path) return; | |
1730 | |
1731 /* make a copy of it */ | |
1732 path = g_strdup(path); | |
1733 collection_window_new(path); | |
1734 g_free(path); | |
1735 } | |
1736 | |
1737 static void layout_menu_recent_update(LayoutWindow *lw) | |
1738 { | |
1739 GtkWidget *menu; | |
1740 GtkWidget *recent; | |
1741 GtkWidget *item; | |
1742 GList *list; | |
1743 gint n; | |
1744 | |
1745 if (!lw->ui_manager) return; | |
1746 | |
1747 list = history_list_get_by_key("recent"); | |
1748 n = 0; | |
1749 | |
1750 menu = gtk_menu_new(); | |
1751 | |
1752 while (list) | |
1753 { | |
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
|
1754 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
|
1755 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
|
1756 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
|
1757 |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1758 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
|
1759 { |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1760 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
|
1761 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
|
1762 } |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1763 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
|
1764 { |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1765 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
|
1766 } |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1767 |
0a61b5ce9d20
Hide .gqv extension from collection name in collection window title and recent menu list.
Laurent Monin <geeqie@norz.org>
parents:
1167
diff
changeset
|
1768 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
|
1769 if (free_name) g_free(name); |
9 | 1770 g_object_set_data(G_OBJECT(item), "recent_index", GINT_TO_POINTER(n)); |
1771 list = list->next; | |
1772 n++; | |
1773 } | |
1774 | |
1775 if (n == 0) | |
1776 { | |
1777 menu_item_add(menu, _("Empty"), NULL, NULL); | |
1778 } | |
1779 | |
1780 recent = gtk_ui_manager_get_widget(lw->ui_manager, "/MainMenu/FileMenu/OpenRecent"); | |
1781 gtk_menu_item_set_submenu(GTK_MENU_ITEM(recent), menu); | |
1782 gtk_widget_set_sensitive(recent, (n != 0)); | |
1783 } | |
1784 | |
1785 void layout_recent_update_all(void) | |
1786 { | |
1787 GList *work; | |
1788 | |
1789 work = layout_window_list; | |
1790 while (work) | |
1791 { | |
1792 LayoutWindow *lw = work->data; | |
1793 work = work->next; | |
1794 | |
1795 layout_menu_recent_update(lw); | |
1796 } | |
1797 } | |
1798 | |
1799 void layout_recent_add_path(const gchar *path) | |
1800 { | |
1801 if (!path) return; | |
1802 | |
343
c28dbff07993
Rename recent_list_max/open_recent_max to open_recent_list_maxsize.
Laurent Monin <geeqie@norz.org>
parents:
341
diff
changeset
|
1803 history_list_add_to_key("recent", path, options->open_recent_list_maxsize); |
9 | 1804 |
1805 layout_recent_update_all(); | |
1806 } | |
1807 | |
1808 /* | |
1809 *----------------------------------------------------------------------------- | |
1810 * menu | |
1811 *----------------------------------------------------------------------------- | |
442 | 1812 */ |
9 | 1813 |
1814 #define CB G_CALLBACK | |
1815 | |
1816 static GtkActionEntry menu_entries[] = { | |
2338
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1817 { "FileMenu", NULL, N_("_File"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1818 { "GoMenu", NULL, N_("_Go"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1819 { "EditMenu", NULL, N_("_Edit"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1820 { "SelectMenu", NULL, N_("_Select"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1821 { "OrientationMenu", NULL, N_("_Orientation"), NULL, NULL, NULL }, |
2500
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
1822 { "RatingMenu", NULL, N_("_Rating"), NULL, NULL, NULL }, |
2338
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1823 { "PreferencesMenu", NULL, N_("P_references"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1824 { "ViewMenu", NULL, N_("_View"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1825 { "FileDirMenu", NULL, N_("_Files and Folders"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1826 { "ZoomMenu", NULL, N_("_Zoom"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1827 { "ColorMenu", NULL, N_("_Color Management"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1828 { "ConnectZoomMenu", NULL, N_("_Connected Zoom"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1829 { "SplitMenu", NULL, N_("Spli_t"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1830 { "StereoMenu", NULL, N_("Stere_o"), NULL, NULL, NULL }, |
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1831 { "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
|
1832 { "PluginsMenu", NULL, N_("_Plugins"), NULL, NULL, NULL }, |
2338
1d020ce40190
Fixing some whitespace issues
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2263
diff
changeset
|
1833 { "HelpMenu", NULL, N_("_Help"), NULL, NULL, NULL }, |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1834 |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1835 { "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
|
1836 { "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
|
1837 { "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
|
1838 { "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
|
1839 { "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
|
1840 { "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
|
1841 { "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
|
1842 { "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
|
1843 { "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
|
1844 { "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
|
1845 { "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
|
1846 { "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
|
1847 |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1848 { "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
|
1849 { "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
|
1850 { "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
|
1851 { "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
|
1852 { "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
|
1853 { "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
|
1854 { "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
|
1855 { "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
|
1856 { "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
|
1857 { "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
|
1858 { "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
|
1859 { "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
|
1860 { "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
|
1861 { "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
|
1862 { "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
|
1863 { "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
|
1864 { "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
|
1865 { "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
|
1866 { "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
|
1867 { "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
|
1868 { "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
|
1869 { "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
|
1870 { "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
|
1871 { "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
|
1872 { "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
|
1873 { "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
|
1874 { "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
|
1875 { "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
|
1876 { "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
|
1877 { "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
|
1878 { "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
|
1879 { "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
|
1880 { "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
|
1881 { "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
|
1882 { "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
|
1883 { "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
|
1884 { "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
|
1885 { "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
|
1886 { "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
|
1887 { "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
|
1888 { "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
|
1889 { "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
|
1890 { "SaveMetadata", GTK_STOCK_SAVE, N_("_Save metadata"), "<control>S", N_("Save metadata"), CB(layout_menu_metadata_write_cb) }, |
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1891 { "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
|
1892 { "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
|
1893 { "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
|
1894 { "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
|
1895 { "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
|
1896 { "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
|
1897 { "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
|
1898 { "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
|
1899 { "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
|
1900 { "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
|
1901 { "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
|
1902 { "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
|
1903 { "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
|
1904 { "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
|
1905 { "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
|
1906 { "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
|
1907 { "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
|
1908 { "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
|
1909 { "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
|
1910 { "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
|
1911 { "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
|
1912 { "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
|
1913 { "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
|
1914 { "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
|
1915 { "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
|
1916 { "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
|
1917 { "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
|
1918 { "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
|
1919 { "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
|
1920 { "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
|
1921 { "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
|
1922 { "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
|
1923 { "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
|
1924 { "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
|
1925 { "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
|
1926 { "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
|
1927 { "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
|
1928 { "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
|
1929 { "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
|
1930 { "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
|
1931 { "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
|
1932 { "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
|
1933 { "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
|
1934 { "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
|
1935 { "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
|
1936 { "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
|
1937 { "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
|
1938 { "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
|
1939 { "HelpShortcuts", NULL, N_("_Keyboard shortcuts"), NULL, N_("Keyboard shortcuts"), CB(layout_menu_help_keys_cb) }, |
2362 | 1940 { "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
|
1941 { "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
|
1942 { "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
|
1943 { "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
|
1944 { "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
|
1945 { "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
|
1946 { "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
|
1947 { "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
|
1948 { "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
|
1949 { "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
|
1950 { "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
|
1951 { "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
|
1952 { "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
|
1953 { "ClearMarks", NULL, N_("Clear Marks..."), NULL, N_("Clear Marks"), CB(layout_menu_clear_marks_cb) }, |
9 | 1954 }; |
1955 | |
1956 static GtkToggleActionEntry menu_toggle_entries[] = { | |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1957 { "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
|
1958 { "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
|
1959 { "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
|
1960 { "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
|
1961 { "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
|
1962 { "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
|
1963 { "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
|
1964 { "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
|
1965 { "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
|
1966 { "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
|
1967 { "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
|
1968 { "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
|
1969 { "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
|
1970 { "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
|
1971 { "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
|
1972 { "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
|
1973 { "RectangularSelection", PIXBUF_INLINE_ICON_SELECT_RECTANGLE, N_("Rectangular Selection"), "<alt>R", N_("Rectangular Selection"), CB(layout_menu_rectangular_selection_cb), FALSE }, |
2433 | 1974 { "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
|
1975 { "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
|
1976 { "DrawRectangle", PIXBUF_INLINE_ICON_DRAW_RECTANGLE, N_("Draw Rectangle"), NULL, N_("Draw Rectangle"), CB(layout_menu_select_rectangle_cb), FALSE }, |
9 | 1977 }; |
1978 | |
1979 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
|
1980 { "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
|
1981 { "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
|
1982 }; |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
1983 |
2461
d3c1a9ca3107
Fix #85: can not switch to list view in folder pane with keyboard
Colin Clark <cclark@mcb.net>
parents:
2444
diff
changeset
|
1984 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
|
1985 { "FolderTree", NULL, N_("T_oggle Folder View"), "<control>T", N_("Toggle Folders View"), CB(layout_menu_view_dir_as_cb),FALSE }, |
9 | 1986 }; |
1987 | |
156
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
1988 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
|
1989 { "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
|
1990 { "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
|
1991 { "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
|
1992 { "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
|
1993 }; |
2dd9d0875394
better integration of split image functions into menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
138
diff
changeset
|
1994 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
1995 static GtkRadioActionEntry menu_color_radio_entries[] = { |
1585
c65912c32b05
action table clean up
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1584
diff
changeset
|
1996 { "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
|
1997 { "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
|
1998 { "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
|
1999 { "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
|
2000 { "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
|
2001 { "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
|
2002 }; |
380
41079d11eba7
Introduce a new struct ViewDir to handle directory views common
Laurent Monin <geeqie@norz.org>
parents:
343
diff
changeset
|
2003 |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2004 static GtkRadioActionEntry menu_histogram_channel[] = { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2005 { "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
|
2006 { "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
|
2007 { "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
|
2008 { "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
|
2009 { "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
|
2010 }; |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2011 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2012 static GtkRadioActionEntry menu_histogram_mode[] = { |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2013 { "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
|
2014 { "HistogramModeLog", NULL, N_("_Log Histogram"), NULL, N_("Log Histogram"), 1 }, |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2015 }; |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2016 |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2017 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
|
2018 { "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
|
2019 { "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
|
2020 { "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
|
2021 { "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
|
2022 }; |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2023 |
1666
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2024 |
9 | 2025 #undef CB |
2026 | |
1000
07f6093c1c1a
For the sake of consistency, use glib basic types everywhere.
Laurent Monin <geeqie@norz.org>
parents:
995
diff
changeset
|
2027 static const gchar *menu_ui_description = |
9 | 2028 "<ui>" |
2029 " <menubar name='MainMenu'>" | |
2030 " <menu action='FileMenu'>" | |
2031 " <menuitem action='NewWindow'/>" | |
2032 " <menuitem action='NewCollection'/>" | |
2033 " <menuitem action='OpenCollection'/>" | |
2034 " <menuitem action='OpenRecent'/>" | |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2035 " <placeholder name='OpenSection'/>" |
9 | 2036 " <separator/>" |
2037 " <menuitem action='Search'/>" | |
2038 " <menuitem action='FindDupes'/>" | |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2039 " <placeholder name='SearchSection'/>" |
9 | 2040 " <separator/>" |
2041 " <menuitem action='Print'/>" | |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2042 " <placeholder name='PrintSection'/>" |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2043 " <separator/>" |
9 | 2044 " <menuitem action='NewFolder'/>" |
2045 " <menuitem action='Copy'/>" | |
2046 " <menuitem action='Move'/>" | |
2047 " <menuitem action='Rename'/>" | |
2048 " <menuitem action='Delete'/>" | |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2049 " <placeholder name='FileOpsSection'/>" |
9 | 2050 " <separator/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2051 " <placeholder name='QuitSection'/>" |
9 | 2052 " <menuitem action='CloseWindow'/>" |
2053 " <menuitem action='Quit'/>" | |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2054 " <separator/>" |
9 | 2055 " </menu>" |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2056 " <menu action='GoMenu'>" |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2057 " <menuitem action='FirstImage'/>" |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2058 " <menuitem action='PrevImage'/>" |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2059 " <menuitem action='NextImage'/>" |
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2060 " <menuitem action='LastImage'/>" |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2061 " <separator/>" |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
2062 " <menuitem action='Back'/>" |
2609
5beaa1da4f14
Fix #512: The "Back" button does not operate correctly
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
2063 " <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
|
2064 " <menuitem action='Up'/>" |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
2065 " <menuitem action='Home'/>" |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
2066 " <separator/>" |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2067 " </menu>" |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2068 " <menu action='SelectMenu'>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2069 " <menuitem action='SelectAll'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2070 " <menuitem action='SelectNone'/>" |
601
c15474962d16
Add a way to invert the current selection.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
2071 " <menuitem action='SelectInvert'/>" |
2423 | 2072 " <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
|
2073 " <menuitem action='ShowFileFilter'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2074 " <placeholder name='SelectSection'/>" |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2075 " <separator/>" |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2076 " <menuitem action='CopyPath'/>" |
2663
3e6d26094fb4
Fix #520: copy path inserts quotes around path
Colin Clark <colin.clark@cclark.uk>
parents:
2627
diff
changeset
|
2077 " <menuitem action='CopyPathUnquoted'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2078 " <placeholder name='ClipboardSection'/>" |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2079 " <separator/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2080 " <menuitem action='ShowMarks'/>" |
2750
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2739
diff
changeset
|
2081 " <menuitem action='ClearMarks'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2082 " <placeholder name='MarksSection'/>" |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2083 " <separator/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2084 " </menu>" |
9 | 2085 " <menu action='EditMenu'>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2086 " <placeholder name='EditSection'/>" |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2087 " <separator/>" |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
2088 " <menu action='OrientationMenu'>" |
9 | 2089 " <menuitem action='RotateCW'/>" |
2090 " <menuitem action='RotateCCW'/>" | |
2091 " <menuitem action='Rotate180'/>" | |
2092 " <menuitem action='Mirror'/>" | |
2093 " <menuitem action='Flip'/>" | |
439
a529755a2be0
Add a way to restore original state in Adjust menu.
Laurent Monin <geeqie@norz.org>
parents:
433
diff
changeset
|
2094 " <menuitem action='AlterNone'/>" |
2438
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
2095 " <separator/>" |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
2096 " <menuitem action='ExifRotate'/>" |
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
2097 " <separator/>" |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
2098 " <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
|
2099 " <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
|
2100 " <separator/>" |
9 | 2101 " </menu>" |
2500
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2102 " <menu action='RatingMenu'>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2103 " <menuitem action='Rating0'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2104 " <menuitem action='Rating1'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2105 " <menuitem action='Rating2'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2106 " <menuitem action='Rating3'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2107 " <menuitem action='Rating4'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2108 " <menuitem action='Rating5'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2109 " <menuitem action='RatingM1'/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2110 " <separator/>" |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2499
diff
changeset
|
2111 " </menu>" |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2112 " <menuitem action='SaveMetadata'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2113 " <placeholder name='PropertiesSection'/>" |
9 | 2114 " <separator/>" |
2801
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
2115 " <menuitem action='DrawRectangle'/>" |
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
2116 " <separator/>" |
2622
cad1ce03590d
Remove GQView legacy items from menu; update docs
Colin Clark <colin.clark@cclark.uk>
parents:
2619
diff
changeset
|
2117 " <menuitem action='Preferences'/>" |
2627
6863ac66a10b
Rename External Editors to Plugins
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
2118 " <menuitem action='Plugins'/>" |
2622
cad1ce03590d
Remove GQView legacy items from menu; update docs
Colin Clark <colin.clark@cclark.uk>
parents:
2619
diff
changeset
|
2119 " <menuitem action='LayoutConfig'/>" |
cad1ce03590d
Remove GQView legacy items from menu; update docs
Colin Clark <colin.clark@cclark.uk>
parents:
2619
diff
changeset
|
2120 " <menuitem action='Maintenance'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2121 " <placeholder name='PreferencesSection'/>" |
9 | 2122 " <separator/>" |
2499
92345664aa61
Ref #202: "Set as wallpaper" doesn't work with GNOME Shell
Colin Clark <colin.clark@cclark.uk>
parents:
2494
diff
changeset
|
2123 #if !GTK_CHECK_VERSION(3,0,0) |
9 | 2124 " <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
|
2125 #endif |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2126 " <separator/>" |
9 | 2127 " </menu>" |
2627
6863ac66a10b
Rename External Editors to Plugins
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
2128 " <menu action='PluginsMenu'>" |
6863ac66a10b
Rename External Editors to Plugins
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
2129 " </menu>" |
9 | 2130 " <menu action='ViewMenu'>" |
159
a6b804e2188c
moved some actions to menu and accels
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
156
diff
changeset
|
2131 " <menuitem action='ViewInNewWindow'/>" |
1285
9859a20cda13
improved labels of some menu items
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1284
diff
changeset
|
2132 " <menuitem action='PanView'/>" |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2133 " <menuitem action='ExifWin'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2134 " <placeholder name='WindowSection'/>" |
9 | 2135 " <separator/>" |
1666
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2136 " <menu action='FileDirMenu'>" |
380
41079d11eba7
Introduce a new struct ViewDir to handle directory views common
Laurent Monin <geeqie@norz.org>
parents:
343
diff
changeset
|
2137 " <menuitem action='FolderTree'/>" |
1666
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2138 " <placeholder name='FolderSection'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2139 " <separator/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2140 " <menuitem action='ViewList'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2141 " <menuitem action='ViewIcons'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2142 " <menuitem action='Thumbnails'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2143 " <placeholder name='ListSection'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2144 " <separator/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2145 " <menuitem action='FloatTools'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2146 " <menuitem action='HideTools'/>" |
1285de1ad012
created Files and Folders submenu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1665
diff
changeset
|
2147 " <menuitem action='HideToolbar'/>" |
380
41079d11eba7
Introduce a new struct ViewDir to handle directory views common
Laurent Monin <geeqie@norz.org>
parents:
343
diff
changeset
|
2148 " </menu>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2149 " <placeholder name='DirSection'/>" |
380
41079d11eba7
Introduce a new struct ViewDir to handle directory views common
Laurent Monin <geeqie@norz.org>
parents:
343
diff
changeset
|
2150 " <separator/>" |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2151 " <menu action='ZoomMenu'>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2152 " <menu action='ConnectZoomMenu'>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2153 " <menuitem action='ConnectZoomIn'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2154 " <menuitem action='ConnectZoomOut'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2155 " <menuitem action='ConnectZoomFit'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2156 " <menuitem action='ConnectZoomFillHor'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2157 " <menuitem action='ConnectZoomFillVert'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2158 " <menuitem action='ConnectZoom100'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2159 " <menuitem action='ConnectZoom200'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2160 " <menuitem action='ConnectZoom300'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2161 " <menuitem action='ConnectZoom400'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2162 " <menuitem action='ConnectZoom50'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2163 " <menuitem action='ConnectZoom33'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2164 " <menuitem action='ConnectZoom25'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2165 " </menu>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2166 " <menuitem action='ZoomIn'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2167 " <menuitem action='ZoomOut'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2168 " <menuitem action='ZoomFit'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2169 " <menuitem action='ZoomFillHor'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2170 " <menuitem action='ZoomFillVert'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2171 " <menuitem action='Zoom100'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2172 " <menuitem action='Zoom200'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2173 " <menuitem action='Zoom300'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2174 " <menuitem action='Zoom400'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2175 " <menuitem action='Zoom50'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2176 " <menuitem action='Zoom33'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2177 " <menuitem action='Zoom25'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2178 " </menu>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2179 " <menu action='SplitMenu'>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2180 " <menuitem action='SplitHorizontal'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2181 " <menuitem action='SplitVertical'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2182 " <menuitem action='SplitQuad'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2183 " <menuitem action='SplitSingle'/>" |
2493
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
2184 " <separator/>" |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
2185 " <menuitem action='SplitNextPane'/>" |
678ae40bac9e
Fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2461
diff
changeset
|
2186 " <menuitem action='SplitPreviousPane'/>" |
2517
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
2187 " <menuitem action='SplitUpPane'/>" |
8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
Colin Clark <colin.clark@cclark.uk>
parents:
2508
diff
changeset
|
2188 " <menuitem action='SplitDownPane'/>" |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2189 " </menu>" |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2190 " <menu action='StereoMenu'>" |
1888
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
2191 " <menuitem action='StereoAuto'/>" |
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
2192 " <menuitem action='StereoSBS'/>" |
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
2193 " <menuitem action='StereoCross'/>" |
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
2194 " <menuitem action='StereoOff'/>" |
1917
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
2195 " <separator/>" |
464803b8b36f
added Cycle through stereo modes menu entry
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1890
diff
changeset
|
2196 " <menuitem action='StereoCycle'/>" |
1886
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2197 " </menu>" |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2198 " <menu action='ColorMenu'>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2199 " <menuitem action='UseColorProfiles'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2200 " <menuitem action='UseImageProfile'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2201 " <menuitem action='ColorProfile0'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2202 " <menuitem action='ColorProfile1'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2203 " <menuitem action='ColorProfile2'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2204 " <menuitem action='ColorProfile3'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2205 " <menuitem action='ColorProfile4'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2206 " <menuitem action='ColorProfile5'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2207 " <separator/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2208 " <menuitem action='Grayscale'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2209 " </menu>" |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2210 " <menu action='OverlayMenu'>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2211 " <menuitem action='ImageOverlay'/>" |
2794
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
2212 " <menuitem action='ImageGuidelines'/>" |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2213 " <menuitem action='ImageHistogram'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2214 " <menuitem action='ImageOverlayCycle'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2215 " <separator/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2216 " <menuitem action='HistogramChanR'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2217 " <menuitem action='HistogramChanG'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2218 " <menuitem action='HistogramChanB'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2219 " <menuitem action='HistogramChanRGB'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2220 " <menuitem action='HistogramChanV'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2221 " <menuitem action='HistogramChanCycle'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2222 " <separator/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2223 " <menuitem action='HistogramModeLin'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2224 " <menuitem action='HistogramModeLog'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2225 " <menuitem action='HistogramModeCycle'/>" |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2226 " </menu>" |
9 | 2227 " <menuitem action='FullScreen'/>" |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2228 " <placeholder name='ViewSection'/>" |
9 | 2229 " <separator/>" |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2230 " <menuitem action='SBar'/>" |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
2231 " <menuitem action='SBarSort'/>" |
2506
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
2232 " <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
|
2233 " <menuitem action='ShowInfoPixel'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2234 " <placeholder name='ToolsSection'/>" |
9 | 2235 " <separator/>" |
2433 | 2236 " <menuitem action='Animate'/>" |
9 | 2237 " <menuitem action='SlideShow'/>" |
428
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2238 " <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
|
2239 " <menuitem action='SlideShowFaster'/>" |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
2240 " <menuitem action='SlideShowSlower'/>" |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
2241 " <separator/>" |
9 | 2242 " <menuitem action='Refresh'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2243 " <placeholder name='SlideShowSection'/>" |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2244 " <separator/>" |
9 | 2245 " </menu>" |
2246 " <menu action='HelpMenu'>" | |
2247 " <separator/>" | |
2248 " <menuitem action='HelpContents'/>" | |
2756
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2753
diff
changeset
|
2249 " <menuitem action='HelpSearch'/>" |
9 | 2250 " <menuitem action='HelpShortcuts'/>" |
2362 | 2251 " <menuitem action='HelpKbd'/>" |
9 | 2252 " <menuitem action='HelpNotes'/>" |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2523
diff
changeset
|
2253 " <menuitem action='HelpChangeLog'/>" |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2254 " <placeholder name='HelpSection'/>" |
9 | 2255 " <separator/>" |
2256 " <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
|
2257 " <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
|
2258 " <menuitem action='LogWindow'/>" |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2259 " <separator/>" |
9 | 2260 " </menu>" |
2261 " </menubar>" | |
1334
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
2262 " <toolbar name='ToolBar'>" |
89c9db0e3258
create toolbar from ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1320
diff
changeset
|
2263 " </toolbar>" |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2264 " <toolbar name='StatusBar'>" |
2438
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
2265 " <toolitem action='ExifRotate'/>" |
2340
9e9ab4e63900
Remove some leftover from toolbar rc entries
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2339
diff
changeset
|
2266 " <toolitem action='ShowInfoPixel'/>" |
9e9ab4e63900
Remove some leftover from toolbar rc entries
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2339
diff
changeset
|
2267 " <toolitem action='UseColorProfiles'/>" |
9e9ab4e63900
Remove some leftover from toolbar rc entries
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2339
diff
changeset
|
2268 " <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
|
2269 " </toolbar>" |
428
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2270 "<accelerator action='PrevImageAlt1'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2271 "<accelerator action='PrevImageAlt2'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2272 "<accelerator action='NextImageAlt1'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2273 "<accelerator action='NextImageAlt2'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2274 "<accelerator action='DeleteAlt1'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2275 "<accelerator action='DeleteAlt2'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2276 "<accelerator action='FullScreenAlt1'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2277 "<accelerator action='FullScreenAlt2'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2278 "<accelerator action='Escape'/>" |
68435a05c252
I have finally found how to add alternative hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
398
diff
changeset
|
2279 "<accelerator action='EscapeAlt1'/>" |
1047
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2280 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2281 "<accelerator action='ZoomInAlt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2282 "<accelerator action='ZoomOutAlt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2283 "<accelerator action='Zoom100Alt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2284 "<accelerator action='ZoomFitAlt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2285 |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2286 "<accelerator action='ConnectZoomInAlt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2287 "<accelerator action='ConnectZoomOutAlt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2288 "<accelerator action='ConnectZoom100Alt1'/>" |
229877808392
use SHIFT for connected scroll and zoom
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1022
diff
changeset
|
2289 "<accelerator action='ConnectZoomFitAlt1'/>" |
9 | 2290 "</ui>"; |
2291 | |
2292 static gchar *menu_translate(const gchar *path, gpointer data) | |
2293 { | |
1004
370281d151da
Silent a compiler warning.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
2294 return (gchar *)(_(path)); |
9 | 2295 } |
2296 | |
1433
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
2297 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
|
2298 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
|
2299 { |
894 | 2300 gchar name[50]; |
2301 gchar label[100]; | |
2302 gchar accel[50]; | |
1619
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2303 gchar tooltip[100]; |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2304 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
|
2305 GtkAction *action; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2306 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2307 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
|
2308 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
|
2309 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2310 if (accel_tmpl) |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2311 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
|
2312 else |
1619
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2313 entry.accelerator = NULL; |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2314 |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2315 if (tooltip_tmpl) |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2316 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
|
2317 else |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1612
diff
changeset
|
2318 entry.tooltip = NULL; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2319 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2320 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
|
2321 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
|
2322 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
|
2323 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2324 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2325 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
|
2326 { |
894 | 2327 gint mark; |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2328 GError *error; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2329 GString *desc = g_string_new( |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2330 "<ui>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2331 " <menubar name='MainMenu'>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2332 " <menu action='SelectMenu'>"); |
442 | 2333 |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2334 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
|
2335 { |
2600
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2336 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
|
2337 |
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2338 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
|
2339 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
|
2340 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
|
2341 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
|
2342 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
|
2343 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
|
2344 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
|
2345 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
|
2346 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
|
2347 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
|
2348 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
|
2349 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2350 g_string_append_printf(desc, |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2351 " <menu action='Mark%d'>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2352 " <menuitem action='ToggleMark%d'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2353 " <menuitem action='SetMark%d'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2354 " <menuitem action='ResetMark%d'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2355 " <separator/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2356 " <menuitem action='SelectMark%d'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2357 " <menuitem action='AddMark%d'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2358 " <menuitem action='IntMark%d'/>" |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2359 " <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
|
2360 " <separator/>" |
60012a2cc53b
added mark filter to menu - now it is possible to assign hotkeys
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1619
diff
changeset
|
2361 " <menuitem action='FilterMark%d'/>" |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2362 " </menu>", |
2600
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2363 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
|
2364 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2365 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2366 g_string_append(desc, |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2367 " </menu>" |
429
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2368 " </menubar>"); |
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2369 for (mark = 1; mark <= FILEDATA_MARKS_SIZE; mark++) |
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2370 { |
2600
c6a11c0bade8
Bug fix #509: Increase number of marks to 10
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2590
diff
changeset
|
2371 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
|
2372 |
429
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2373 g_string_append_printf(desc, |
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2374 "<accelerator action='ToggleMark%dAlt1'/>" |
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2375 "<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
|
2376 i, i); |
429
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2377 } |
c22aa76eddd8
Let toggle marks with numeric keypad.
Laurent Monin <geeqie@norz.org>
parents:
428
diff
changeset
|
2378 g_string_append(desc, "</ui>" ); |
162
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2379 |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2380 error = NULL; |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2381 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
|
2382 { |
512
0896f486ec6f
Remove whitespace between function name and first parenthesis for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents:
497
diff
changeset
|
2383 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
|
2384 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
|
2385 exit(EXIT_FAILURE); |
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 g_string_free(desc, TRUE); |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2388 } |
6a5cc5a2bbe9
created menu "Select" with selection and marks operations
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
160
diff
changeset
|
2389 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2390 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
|
2391 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2392 gchar **split = g_strsplit(editor->menu_path, "/", 0); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2393 gint i = 0; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2394 GList *ret = NULL; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2395 |
2184 | 2396 if (split[0] == NULL) |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2397 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2398 g_strfreev(split); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2399 return NULL; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2400 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2401 |
1348
fb163bad4f27
Add missing space between while and first parenthesis.
Laurent Monin <geeqie@norz.org>
parents:
1345
diff
changeset
|
2402 while (split[i]) |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2403 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2404 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
|
2405 i++; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2406 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2407 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2408 g_strfreev(split); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2409 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2410 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
|
2411 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2412 return g_list_reverse(ret); |
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 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2415 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
|
2416 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2417 gint to_open, to_close, i; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2418 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
|
2419 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2420 path = path->next; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2421 old_path = old_path->next; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2422 } |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2423 to_open = g_list_length(path) - 1; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2424 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
|
2425 |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2426 if (to_close > 0) |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2427 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2428 old_path = g_list_last(old_path); |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2429 old_path = old_path->prev; |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2430 } |
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 for (i = 0; i < to_close; i++) |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2433 { |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2434 gchar *name = old_path->data; |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2435 if (g_str_has_suffix(name, "Section")) |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2436 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2437 g_string_append(desc, " </placeholder>"); |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2438 } |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2439 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
|
2440 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2441 g_string_append(desc, " </menu>"); |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2442 } |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2443 else |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2444 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2445 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
|
2446 } |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2447 old_path = old_path->prev; |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2448 } |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2449 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2450 for (i = 0; i < to_open; i++) |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2451 { |
1275
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2452 gchar *name = path->data; |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2453 if (g_str_has_suffix(name, "Section")) |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2454 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2455 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
|
2456 } |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2457 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
|
2458 { |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2459 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
|
2460 } |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2461 else |
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_warning("invalid menu path item %s", name); |
82f4279c6f5f
improved placing of external commands in menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1272
diff
changeset
|
2464 } |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2465 path = path->next; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2466 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2467 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2468 if (path) |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2469 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
|
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 static void layout_actions_setup_editors(LayoutWindow *lw) |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2473 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2474 GError *error; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2475 GList *editors_list; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2476 GList *work; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2477 GList *old_path; |
1463
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2478 GString *desc; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2479 |
1745
473a0f7b944b
fixed reloading of editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1739
diff
changeset
|
2480 if (lw->ui_editors_id) |
473a0f7b944b
fixed reloading of editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1739
diff
changeset
|
2481 { |
473a0f7b944b
fixed reloading of editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1739
diff
changeset
|
2482 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
|
2483 } |
473a0f7b944b
fixed reloading of editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1739
diff
changeset
|
2484 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2485 if (lw->action_group_editors) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2486 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2487 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
|
2488 g_object_unref(lw->action_group_editors); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2489 } |
1463
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2490 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
|
2491 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
|
2492 |
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2493 /* 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
|
2494 desc = g_string_new( |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2495 "<ui>" |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2496 " <menubar name='MainMenu'>"); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2497 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2498 editors_list = editor_list_get(); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2499 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2500 old_path = NULL; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2501 work = editors_list; |
1348
fb163bad4f27
Add missing space between while and first parenthesis.
Laurent Monin <geeqie@norz.org>
parents:
1345
diff
changeset
|
2502 while (work) |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2503 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2504 GList *path; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2505 EditorDescription *editor = work->data; |
2184 | 2506 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
|
2507 NULL, |
5222612ba966
use name as a tooltip of external editor if comment is missing
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1692
diff
changeset
|
2508 editor->name, |
2184 | 2509 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
|
2510 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
|
2511 G_CALLBACK(layout_menu_edit_cb) }; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2512 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2513 if (editor->icon) |
1341
75bf2e172da8
load icons for external editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1335
diff
changeset
|
2514 { |
75bf2e172da8
load icons for external editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1335
diff
changeset
|
2515 entry.stock_id = editor->key; |
75bf2e172da8
load icons for external editors
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1335
diff
changeset
|
2516 } |
1463
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2517 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
|
2518 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2519 path = layout_actions_editor_menu_path(editor); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2520 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
|
2521 |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2522 string_list_free(old_path); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2523 old_path = path; |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2524 work = work->next; |
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 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2527 layout_actions_editor_add(desc, NULL, old_path); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2528 string_list_free(old_path); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2529 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2530 g_string_append(desc, " </menubar>" |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2531 "</ui>" ); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2532 |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2533 error = NULL; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2534 |
1463
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2535 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
|
2536 if (!lw->ui_editors_id) |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2537 { |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2538 g_message("building menus failed: %s", error->message); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2539 g_error_free(error); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2540 exit(EXIT_FAILURE); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2541 } |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2542 g_string_free(desc, TRUE); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2543 g_list_free(editors_list); |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2544 } |
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
2545 |
9 | 2546 void layout_actions_setup(LayoutWindow *lw) |
2547 { | |
2548 GError *error; | |
2549 | |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2550 DEBUG_1("%s layout_actions_setup: start", get_exec_time()); |
9 | 2551 if (lw->ui_manager) return; |
2552 | |
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
|
2553 lw->action_group = gtk_action_group_new("MenuActions"); |
9 | 2554 gtk_action_group_set_translate_func(lw->action_group, menu_translate, NULL, NULL); |
2555 | |
2556 gtk_action_group_add_actions(lw->action_group, | |
2557 menu_entries, G_N_ELEMENTS(menu_entries), lw); | |
2558 gtk_action_group_add_toggle_actions(lw->action_group, | |
2559 menu_toggle_entries, G_N_ELEMENTS(menu_toggle_entries), lw); | |
2560 gtk_action_group_add_radio_actions(lw->action_group, | |
2561 menu_radio_entries, G_N_ELEMENTS(menu_radio_entries), | |
2562 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
|
2563 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
|
2564 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
|
2565 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
|
2566 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
|
2567 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
|
2568 lw); |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2569 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
|
2570 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
|
2571 0, G_CALLBACK(layout_color_menu_input_cb), lw); |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2572 gtk_action_group_add_radio_actions(lw->action_group, |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2573 menu_histogram_channel, G_N_ELEMENTS(menu_histogram_channel), |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2574 0, G_CALLBACK(layout_menu_histogram_channel_cb), lw); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2575 gtk_action_group_add_radio_actions(lw->action_group, |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2576 menu_histogram_mode, G_N_ELEMENTS(menu_histogram_mode), |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
2577 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
|
2578 gtk_action_group_add_radio_actions(lw->action_group, |
ba2f9ac17b54
change stereo mode from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1810
diff
changeset
|
2579 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
|
2580 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
|
2581 |
9 | 2582 |
2583 lw->ui_manager = gtk_ui_manager_new(); | |
2584 gtk_ui_manager_set_add_tearoffs(lw->ui_manager, TRUE); | |
2585 gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group, 0); | |
2586 | |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2587 DEBUG_1("%s layout_actions_setup: add menu", get_exec_time()); |
9 | 2588 error = NULL; |
2589 if (!gtk_ui_manager_add_ui_from_string(lw->ui_manager, menu_ui_description, -1, &error)) | |
2590 { | |
512
0896f486ec6f
Remove whitespace between function name and first parenthesis for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents:
497
diff
changeset
|
2591 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
|
2592 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
|
2593 exit(EXIT_FAILURE); |
9 | 2594 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2595 |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2596 layout_toolbar_clear(lw, TOOLBAR_MAIN); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2597 layout_toolbar_add_default(lw, TOOLBAR_MAIN); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2598 |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2599 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
|
2600 layout_actions_setup_marks(lw); |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2601 |
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2602 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
|
2603 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
|
2604 |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2605 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
|
2606 layout_util_status_update_write(lw); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2607 |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2608 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
|
2609 layout_actions_add_window(lw, lw->window); |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2610 DEBUG_1("%s layout_actions_setup: end", get_exec_time()); |
9 | 2611 } |
2612 | |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2613 static gint layout_editors_reload_idle_id = -1; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2614 static GList *layout_editors_desktop_files = NULL; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2615 |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2616 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
|
2617 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2618 if (!layout_editors_desktop_files) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2619 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2620 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
|
2621 layout_editors_desktop_files = editor_get_desktop_files(); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2622 return TRUE; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2623 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2624 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2625 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
|
2626 g_free(layout_editors_desktop_files->data); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2627 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
|
2628 |
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2629 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2630 if (!layout_editors_desktop_files) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2631 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2632 GList *work; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2633 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
|
2634 editor_table_finish(); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2635 |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2636 work = layout_window_list; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2637 while (work) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2638 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2639 LayoutWindow *lw = work->data; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2640 work = work->next; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2641 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
|
2642 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
|
2643 { |
77596dda797e
Fix #207: Symlink doesn't show in Sort Manager
Colin Clark <colin.clark@cclark.uk>
parents:
2611
diff
changeset
|
2644 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
|
2645 } |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2646 } |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2647 |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2648 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
|
2649 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2650 layout_editors_reload_idle_id = -1; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2651 return FALSE; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2652 } |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2653 return TRUE; |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2654 } |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2655 |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2656 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
|
2657 { |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2658 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
|
2659 |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2660 if (layout_editors_reload_idle_id != -1) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2661 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2662 g_source_remove(layout_editors_reload_idle_id); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2663 string_list_free(layout_editors_desktop_files); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2664 } |
1735
d60ff6f78f81
added messages for debugging startup time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1727
diff
changeset
|
2665 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2666 editor_table_clear(); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2667 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
|
2668 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
2669 |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2670 void layout_editors_reload_finish(void) |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2671 { |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2672 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
|
2673 { |
1736
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2674 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
|
2675 g_source_remove(layout_editors_reload_idle_id); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2676 while (layout_editors_reload_idle_id != -1) |
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 layout_editors_reload_idle_cb(NULL); |
7179fa22dc1b
load desktop files in idle time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1735
diff
changeset
|
2679 } |
1463
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2680 } |
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2681 } |
7031da014d97
added function to reload external editors at any time
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1461
diff
changeset
|
2682 |
9 | 2683 void layout_actions_add_window(LayoutWindow *lw, GtkWidget *window) |
2684 { | |
2685 GtkAccelGroup *group; | |
2686 | |
2687 if (!lw->ui_manager) return; | |
2688 | |
2689 group = gtk_ui_manager_get_accel_group(lw->ui_manager); | |
2690 gtk_window_add_accel_group(GTK_WINDOW(window), group); | |
2691 } | |
2692 | |
2693 GtkWidget *layout_actions_menu_bar(LayoutWindow *lw) | |
2694 { | |
1470
02f03330d589
do not re-create ui_manager at layout change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1469
diff
changeset
|
2695 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
|
2696 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
|
2697 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
|
2698 return lw->menu_bar; |
9 | 2699 } |
2700 | |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2701 GtkWidget *layout_actions_toolbar(LayoutWindow *lw, ToolbarType type) |
9 | 2702 { |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2703 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
|
2704 switch (type) |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2705 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2706 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
|
2707 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
|
2708 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
|
2709 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
|
2710 break; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2711 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
|
2712 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
|
2713 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
|
2714 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
|
2715 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
|
2716 break; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2717 default: |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2718 break; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2719 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2720 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
|
2721 return lw->toolbar[type]; |
9 | 2722 } |
2723 | |
2813
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2724 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
|
2725 { |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2726 GtkWidget *menu_bar; |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2727 GtkWidget *toolbar; |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2728 |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2729 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
|
2730 |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2731 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
|
2732 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
|
2733 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
|
2734 |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2735 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
|
2736 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
|
2737 |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2738 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
|
2739 return lw->menu_tool_bar; |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2740 } |
e9e8e8b2afce
Move menu/toolbar to top of window
Colin Clark <colin.clark@cclark.uk>
parents:
2812
diff
changeset
|
2741 |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2742 void layout_toolbar_clear(LayoutWindow *lw, ToolbarType type) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2743 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2744 if (lw->toolbar_merge_id[type]) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2745 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2746 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
|
2747 gtk_ui_manager_ensure_update(lw->ui_manager); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2748 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2749 string_list_free(lw->toolbar_actions[type]); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2750 lw->toolbar_actions[type] = NULL; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2751 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2752 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
|
2753 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2754 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2755 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
|
2756 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2757 const gchar *path = NULL; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2758 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2759 if (!action || !lw->ui_manager) return; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2760 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2761 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
|
2762 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2763 switch (type) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2764 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2765 case TOOLBAR_MAIN: |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2766 path = "/ToolBar"; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2767 break; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2768 default: |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2769 break; |
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 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2772 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2773 if (g_str_has_suffix(action, ".desktop")) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2774 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2775 /* 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
|
2776 create a dummy action for now */ |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2777 if (!lw->action_group_editors) |
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 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
|
2780 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
|
2781 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2782 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
|
2783 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2784 GtkActionEntry entry = { action, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2785 GTK_STOCK_MISSING_IMAGE, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2786 action, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2787 NULL, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2788 NULL, |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2789 NULL }; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2790 DEBUG_1("Creating temporary action %s", action); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2791 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
|
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 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
|
2795 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
|
2796 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2797 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2798 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2799 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
|
2800 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2801 LayoutWindow *lw_first; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2802 GList *work_action; |
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 switch (type) |
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 case TOOLBAR_MAIN: |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2807 if (layout_window_list) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2808 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2809 lw_first = layout_window_list->data; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2810 if (lw_first->toolbar_actions[TOOLBAR_MAIN]) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2811 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2812 work_action = lw_first->toolbar_actions[type]; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2813 while (work_action) |
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 gchar *action = work_action->data; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2816 work_action = work_action->next; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2817 layout_toolbar_add(lw, type, 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 else |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2821 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2822 layout_toolbar_add(lw, type, "Thumbnails"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2823 layout_toolbar_add(lw, type, "Back"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2824 layout_toolbar_add(lw, type, "Forward"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2825 layout_toolbar_add(lw, type, "Up"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2826 layout_toolbar_add(lw, type, "Home"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2827 layout_toolbar_add(lw, type, "Refresh"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2828 layout_toolbar_add(lw, type, "ZoomIn"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2829 layout_toolbar_add(lw, type, "ZoomOut"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2830 layout_toolbar_add(lw, type, "ZoomFit"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2831 layout_toolbar_add(lw, type, "Zoom100"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2832 layout_toolbar_add(lw, type, "Preferences"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2833 layout_toolbar_add(lw, type, "FloatTools"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2834 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2835 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2836 else |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2837 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2838 layout_toolbar_add(lw, type, "Thumbnails"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2839 layout_toolbar_add(lw, type, "Back"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2840 layout_toolbar_add(lw, type, "Forward"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2841 layout_toolbar_add(lw, type, "Up"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2842 layout_toolbar_add(lw, type, "Home"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2843 layout_toolbar_add(lw, type, "Refresh"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2844 layout_toolbar_add(lw, type, "ZoomIn"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2845 layout_toolbar_add(lw, type, "ZoomOut"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2846 layout_toolbar_add(lw, type, "ZoomFit"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2847 layout_toolbar_add(lw, type, "Zoom100"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2848 layout_toolbar_add(lw, type, "Preferences"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2849 layout_toolbar_add(lw, type, "FloatTools"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2850 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2851 break; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2852 default: |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2853 break; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2854 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2855 } |
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 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2859 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
|
2860 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2861 const gchar *name = NULL; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2862 GList *work = lw->toolbar_actions[type]; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2863 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2864 switch (type) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2865 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2866 case TOOLBAR_MAIN: |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2867 name = "toolbar"; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2868 break; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2869 default: |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2870 break; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2871 } |
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 WRITE_NL(); WRITE_STRING("<%s>", name); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2874 indent++; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2875 WRITE_NL(); WRITE_STRING("<clear/>"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2876 while (work) |
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 gchar *action = work->data; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2879 work = work->next; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2880 WRITE_NL(); WRITE_STRING("<toolitem "); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2881 write_char_option(outstr, indent + 1, "action", action); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2882 WRITE_STRING("/>"); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2883 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2884 indent--; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2885 WRITE_NL(); WRITE_STRING("</%s>", name); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2886 } |
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 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
|
2889 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2890 gchar *action = NULL; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2891 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2892 while (*attribute_names) |
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 const gchar *option = *attribute_names++; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2895 const gchar *value = *attribute_values++; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2896 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2897 if (READ_CHAR_FULL("action", action)) continue; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2898 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2899 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
|
2900 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2901 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2902 layout_toolbar_add(lw, type, action); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2903 g_free(action); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2904 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2622
diff
changeset
|
2905 |
9 | 2906 /* |
2907 *----------------------------------------------------------------------------- | |
2908 * misc | |
2909 *----------------------------------------------------------------------------- | |
2910 */ | |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2911 |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2912 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
|
2913 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2914 GtkAction *action; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2915 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
|
2916 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
|
2917 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
|
2918 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
|
2919 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2920 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
|
2921 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
|
2922 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
|
2923 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2924 else |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2925 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2926 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
|
2927 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2928 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2929 |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2930 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
|
2931 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2932 GList *work; |
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 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
|
2935 while (work) |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2936 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2937 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
|
2938 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
|
2939 |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2940 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
|
2941 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2942 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2943 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2944 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
|
2945 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2946 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
|
2947 return g_strdelimit(g_strdup(name), "_", '-'); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2948 } |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2949 |
1582
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2950 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
|
2951 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2952 GtkAction *action; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2953 gint input = 0; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2954 gboolean use_color; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2955 gboolean use_image = FALSE; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2956 gint i; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2957 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
|
2958 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
|
2959 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
|
2960 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2961 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2962 if (!lw->action_group) return; |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1547
diff
changeset
|
2963 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
|
2964 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2965 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
|
2966 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2967 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
|
2968 #ifdef HAVE_LCMS |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2969 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
|
2970 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
|
2971 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2972 gchar *buf; |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2973 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
|
2974 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
|
2975 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
|
2976 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
|
2977 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
|
2978 } |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2979 else |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2980 { |
f137ec3fd85e
- handle color profile and write metadata buttons on statusbar by ui_manager
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1566
diff
changeset
|
2981 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
|
2982 } |
1595
b4097a93ab29
better tooltip for disabled lcms
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1588
diff
changeset
|
2983 #else |
b4097a93ab29
better tooltip for disabled lcms
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1588
diff
changeset
|
2984 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
|
2985 gtk_action_set_sensitive(action, FALSE); |
b4097a93ab29
better tooltip for disabled lcms
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1588
diff
changeset
|
2986 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
|
2987 #endif |
1547
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, "UseImageProfile"); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2990 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
|
2991 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
|
2992 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2993 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
|
2994 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2995 sprintf(action_name, "ColorProfile%d", i); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2996 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
|
2997 |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2998 if (i >= COLOR_PROFILE_FILE) |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
2999 { |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3000 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
|
3001 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
|
3002 gchar *end; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3003 gchar *buf; |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3004 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3005 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
|
3006 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3007 end = layout_color_name_parse(name); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3008 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
|
3009 g_free(end); |
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 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
|
3012 g_free(buf); |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3013 |
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3014 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
|
3015 } |
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 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
|
3018 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
|
3019 } |
1566
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
3020 |
df4da4647646
separated Orientation and Grayscale functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
3021 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
|
3022 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
|
3023 } |
9 | 3024 |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3025 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
|
3026 { |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3027 GtkAction *action; |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3028 |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3029 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
|
3030 |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3031 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
|
3032 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
|
3033 } |
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3034 |
2611 | 3035 void layout_util_sync_marks(LayoutWindow *lw) |
3036 { | |
3037 GtkAction *action; | |
3038 | |
3039 if (!lw->action_group) return; | |
3040 | |
3041 action = gtk_action_group_get_action(lw->action_group, "ShowMarks"); | |
3042 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.show_marks); | |
3043 } | |
3044 | |
9 | 3045 static void layout_util_sync_views(LayoutWindow *lw) |
3046 { | |
3047 GtkAction *action; | |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3048 OsdShowFlags osd_flags = image_osd_get(lw->image); |
9 | 3049 |
3050 if (!lw->action_group) return; | |
3051 | |
3052 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
|
3053 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.dir_view_type); |
9 | 3054 |
1480
82915f832ec5
split-mode cleanup and improvements
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1479
diff
changeset
|
3055 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
|
3056 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
|
3057 |
2494
e5625bd7524d
Addl fix #488: Hide menus when not in split mode
Colin Clark <colin.clark@cclark.uk>
parents:
2493
diff
changeset
|
3058 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
|
3059 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
|
3060 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
|
3061 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
|
3062 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
|
3063 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
|
3064 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
|
3065 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
|
3066 |
9 | 3067 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
|
3068 gtk_radio_action_set_current_value(GTK_RADIO_ACTION(action), lw->options.file_view_type); |
9 | 3069 |
3070 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
|
3071 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.tools_float); |
9 | 3072 |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3073 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
|
3074 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), layout_bar_enabled(lw)); |
9 | 3075 |
3076 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
|
3077 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), layout_bar_sort_enabled(lw)); |
9 | 3078 |
3079 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
|
3080 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
|
3081 |
1584
c97dea5d82d7
improved pixel info, changed the menu entry from "Hide" to "Show",
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1583
diff
changeset
|
3082 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
|
3083 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
|
3084 |
451
cff69d79dc89
Mark slideshow toggle state in the menu.
Laurent Monin <geeqie@norz.org>
parents:
450
diff
changeset
|
3085 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
|
3086 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
|
3087 |
2433 | 3088 action = gtk_action_group_get_action(lw->action_group, "Animate"); |
3089 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.animate); | |
3090 | |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3091 action = gtk_action_group_get_action(lw->action_group, "ImageOverlay"); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3092 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
|
3093 |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3094 action = gtk_action_group_get_action(lw->action_group, "ImageHistogram"); |
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3095 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
|
3096 |
2794
780a9b685335
Ref #331: Overimposed custom composition rule lines
Colin Clark <colin.clark@cclark.uk>
parents:
2756
diff
changeset
|
3097 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
|
3098 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
|
3099 |
2438
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
3100 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
|
3101 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
|
3102 |
2801
3e9ca298bb1d
Fix #251: Crop simulation
Colin Clark <colin.clark@cclark.uk>
parents:
2795
diff
changeset
|
3103 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
|
3104 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
|
3105 |
2438
e133f99b6331
Move exif auto-rotate option to a menu
Colin Clark <cclark@mcb.net>
parents:
2433
diff
changeset
|
3106 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
|
3107 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
|
3108 |
2817
e6f95baec8b5
Fix #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2813
diff
changeset
|
3109 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
|
3110 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
|
3111 |
1669
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3112 if (osd_flags & OSD_SHOW_HISTOGRAM) |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3113 { |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3114 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
|
3115 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
|
3116 |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3117 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
|
3118 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
|
3119 } |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3120 |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3121 action = gtk_action_group_get_action(lw->action_group, "ConnectZoomMenu"); |
e8de419b42d4
reordered View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1668
diff
changeset
|
3122 gtk_action_set_sensitive(action, lw->split_mode != SPLIT_NONE); |
1665
455ed93cdbd6
improved overlay menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1656
diff
changeset
|
3123 |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
3124 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
|
3125 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
|
3126 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
|
3127 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
|
3128 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
|
3129 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
|
3130 |
1888
039d5c8864a0
type of source stereo image made adjustable from menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1886
diff
changeset
|
3131 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
|
3132 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
|
3133 |
2611 | 3134 layout_util_sync_marks(lw); |
1547
64dab81b6a93
moved color profiles from statusbar to View menu
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1520
diff
changeset
|
3135 layout_util_sync_color(lw); |
9 | 3136 } |
3137 | |
3138 void layout_util_sync_thumb(LayoutWindow *lw) | |
3139 { | |
3140 GtkAction *action; | |
3141 | |
3142 if (!lw->action_group) return; | |
3143 | |
3144 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
|
3145 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
|
3146 g_object_set(action, "sensitive", (lw->options.file_view_type == FILEVIEW_LIST), NULL); |
9 | 3147 } |
3148 | |
3149 void layout_util_sync(LayoutWindow *lw) | |
3150 { | |
3151 layout_util_sync_views(lw); | |
3152 layout_util_sync_thumb(lw); | |
3153 layout_menu_recent_update(lw); | |
1272
661e170bf4f7
read external editors from .desktop files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1268
diff
changeset
|
3154 // layout_menu_edit_update(lw); |
9 | 3155 } |
3156 | |
2694 | 3157 /** |
3158 * @brief Checks if event key is mapped to Help | |
3159 * @param event | |
3160 * @returns | |
3161 * | |
3162 * Used to check if the user has re-mapped the Help key | |
3163 * in Preferences/Keyboard | |
3164 * | |
3165 * Note: help_key.accel_mods and event->state | |
3166 * differ in the higher bits | |
3167 */ | |
3168 gboolean is_help_key(GdkEventKey *event) | |
3169 { | |
3170 GtkAccelKey help_key; | |
3171 gboolean ret = FALSE; | |
3172 guint mask = GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK; | |
3173 | |
3174 if (gtk_accel_map_lookup_entry("<Actions>/MenuActions/HelpContents", &help_key)) | |
3175 { | |
3176 if (help_key.accel_key == event->keyval && | |
3177 (help_key.accel_mods & mask) == (event->state & mask)) | |
3178 { | |
3179 ret = TRUE; | |
3180 } | |
3181 } | |
3182 | |
3183 return ret; | |
3184 } | |
9 | 3185 |
3186 /* | |
3187 *----------------------------------------------------------------------------- | |
3188 * sidebars | |
3189 *----------------------------------------------------------------------------- | |
3190 */ | |
3191 | |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3192 static gboolean layout_bar_enabled(LayoutWindow *lw) |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3193 { |
1810
c3a79dda8ea7
GTK marks several functions as deprecated
Klaus Ethgen <Klaus@Ethgen.de>
parents:
1802
diff
changeset
|
3194 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
|
3195 } |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3196 |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3197 static void layout_bar_destroyed(GtkWidget *widget, gpointer data) |
9 | 3198 { |
3199 LayoutWindow *lw = data; | |
3200 | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3201 lw->bar = NULL; |
2184 | 3202 /* |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3203 do not call layout_util_sync_views(lw) here |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3204 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
|
3205 or when the bar is replaced - sync is called by upper function at the end of whole operation |
9 | 3206 |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3207 */ |
9 | 3208 } |
3209 | |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3210 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
|
3211 { |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3212 GtkWidget *bar; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3213 |
9 | 3214 if (!lw->utility_box) return; |
442 | 3215 |
1484
f3b033a71fc9
improved sidebar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1480
diff
changeset
|
3216 bar = bar_new(lw); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3217 |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3218 layout_bar_set(lw, bar); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3219 |
1484
f3b033a71fc9
improved sidebar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1480
diff
changeset
|
3220 bar_populate_default(bar); |
9 | 3221 } |
442 | 3222 |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3223 static void layout_bar_close(LayoutWindow *lw) |
9 | 3224 { |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3225 if (lw->bar) |
9 | 3226 { |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3227 bar_close(lw->bar); |
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3228 lw->bar = NULL; |
9 | 3229 } |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3230 } |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3231 |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3232 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3233 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
|
3234 { |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3235 if (!lw->utility_box) return; |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3236 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3237 layout_bar_close(lw); /* if any */ |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3238 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3239 if (!bar) return; |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3240 lw->bar = bar; |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3241 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3242 g_signal_connect(G_OBJECT(lw->bar), "destroy", |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3243 G_CALLBACK(layout_bar_destroyed), lw); |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3244 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3245 |
1383
bdd15a0038dd
use standard GtkHPaned for sidebar width
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
3246 // gtk_box_pack_start(GTK_BOX(lw->utility_box), lw->bar, FALSE, FALSE, 0); |
2184 | 3247 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
|
3248 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3249 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
|
3250 } |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3251 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3252 |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3253 void layout_bar_toggle(LayoutWindow *lw) |
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 if (layout_bar_enabled(lw)) |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3256 { |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3257 gtk_widget_hide(lw->bar); |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1293
diff
changeset
|
3258 } |
9 | 3259 else |
3260 { | |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3261 if (!lw->bar) |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3262 { |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3263 layout_bar_set_default(lw); |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3264 } |
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3265 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
|
3266 bar_set_fd(lw->bar, layout_image_get_fd(lw)); |
9 | 3267 } |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3268 layout_util_sync_views(lw); |
9 | 3269 } |
3270 | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3271 static void layout_bar_new_image(LayoutWindow *lw) |
9 | 3272 { |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3273 if (!layout_bar_enabled(lw)) return; |
9 | 3274 |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3275 bar_set_fd(lw->bar, layout_image_get_fd(lw)); |
9 | 3276 } |
3277 | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3278 static void layout_bar_new_selection(LayoutWindow *lw, gint count) |
9 | 3279 { |
1317
bb9d01551d6c
simplified and improved bar configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
3280 if (!layout_bar_enabled(lw)) return; |
9 | 3281 |
1520
056ab2f7b7d8
added pane_notify_selection to pane API
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1513
diff
changeset
|
3282 bar_notify_selection(lw->bar, count); |
9 | 3283 } |
3284 | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3285 static gboolean layout_bar_sort_enabled(LayoutWindow *lw) |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3286 { |
1810
c3a79dda8ea7
GTK marks several functions as deprecated
Klaus Ethgen <Klaus@Ethgen.de>
parents:
1802
diff
changeset
|
3287 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
|
3288 } |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3289 |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3290 |
9 | 3291 static void layout_bar_sort_destroyed(GtkWidget *widget, gpointer data) |
3292 { | |
3293 LayoutWindow *lw = data; | |
3294 | |
3295 lw->bar_sort = NULL; | |
3296 | |
2184 | 3297 /* |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3298 do not call layout_util_sync_views(lw) here |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3299 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
|
3300 or when the bar is replaced - sync is called by upper function at the end of whole operation |
9 | 3301 |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3302 */ |
9 | 3303 } |
3304 | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3305 static void layout_bar_sort_set_default(LayoutWindow *lw) |
9 | 3306 { |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3307 GtkWidget *bar; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3308 |
9 | 3309 if (!lw->utility_box) return; |
3310 | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3311 bar = bar_sort_new_default(lw); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3312 |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3313 layout_bar_sort_set(lw, bar); |
9 | 3314 } |
3315 | |
3316 static void layout_bar_sort_close(LayoutWindow *lw) | |
3317 { | |
3318 if (lw->bar_sort) | |
3319 { | |
3320 bar_sort_close(lw->bar_sort); | |
3321 lw->bar_sort = NULL; | |
3322 } | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3323 } |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3324 |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3325 void layout_bar_sort_set(LayoutWindow *lw, GtkWidget *bar) |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3326 { |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3327 if (!lw->utility_box) return; |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3328 |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3329 layout_bar_sort_close(lw); /* if any */ |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3330 |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3331 if (!bar) return; |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3332 lw->bar_sort = bar; |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3333 |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3334 g_signal_connect(G_OBJECT(lw->bar_sort), "destroy", |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3335 G_CALLBACK(layout_bar_sort_destroyed), lw); |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3336 |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3337 gtk_box_pack_end(GTK_BOX(lw->utility_box), lw->bar_sort, FALSE, FALSE, 0); |
9 | 3338 } |
3339 | |
3340 void layout_bar_sort_toggle(LayoutWindow *lw) | |
3341 { | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3342 if (layout_bar_sort_enabled(lw)) |
9 | 3343 { |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3344 gtk_widget_hide(lw->bar_sort); |
9 | 3345 } |
3346 else | |
3347 { | |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3348 if (!lw->bar_sort) |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3349 { |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3350 layout_bar_sort_set_default(lw); |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3351 } |
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3352 gtk_widget_show(lw->bar_sort); |
9 | 3353 } |
1320
f1607e105298
improved bar_sort configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1318
diff
changeset
|
3354 layout_util_sync_views(lw); |
9 | 3355 } |
3356 | |
2506
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3357 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
|
3358 { |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3359 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
|
3360 { |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3361 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
|
3362 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
|
3363 { |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3364 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
|
3365 } |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3366 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
|
3367 { |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3368 gtk_widget_show(lw->bar); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3369 } |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3370 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
|
3371 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
|
3372 } |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3373 else |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3374 { |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3375 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
|
3376 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
|
3377 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
|
3378 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
|
3379 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
|
3380 |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3381 gtk_widget_hide(lw->bar); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3382 if (lw->bar_sort) |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3383 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
|
3384 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
|
3385 } |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3386 |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3387 layout_util_sync_views(lw); |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3388 } |
8ec296cc949c
Fix #492: Shortcut to Hide all sidebars simultaneously
Colin Clark <colin.clark@cclark.uk>
parents:
2503
diff
changeset
|
3389 |
9 | 3390 void layout_bars_new_image(LayoutWindow *lw) |
3391 { | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3392 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
|
3393 |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3394 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
|
3395 |
1e36edfd2a43
write metadata after timeout, image change or dir change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1176
diff
changeset
|
3396 /* 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
|
3397 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
|
3398 metadata_write_queue_confirm(FALSE, NULL, NULL); |
9 | 3399 } |
3400 | |
3401 void layout_bars_new_selection(LayoutWindow *lw, gint count) | |
3402 { | |
1291
abf5d1de9102
replaced bar_info with an universal bar, restored the original
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1285
diff
changeset
|
3403 layout_bar_new_selection(lw, count); |
9 | 3404 } |
3405 | |
3406 GtkWidget *layout_bars_prepare(LayoutWindow *lw, GtkWidget *image) | |
3407 { | |
1470
02f03330d589
do not re-create ui_manager at layout change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1469
diff
changeset
|
3408 if (lw->utility_box) return lw->utility_box; |
9 | 3409 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
|
3410 lw->utility_paned = gtk_hpaned_new(); |
bdd15a0038dd
use standard GtkHPaned for sidebar width
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1375
diff
changeset
|
3411 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
|
3412 |
2184 | 3413 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
|
3414 gtk_widget_show(lw->utility_paned); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3415 |
9 | 3416 gtk_widget_show(image); |
3417 | |
1470
02f03330d589
do not re-create ui_manager at layout change
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1469
diff
changeset
|
3418 g_object_ref(lw->utility_box); |
9 | 3419 return lw->utility_box; |
3420 } | |
3421 | |
3422 void layout_bars_close(LayoutWindow *lw) | |
3423 { | |
3424 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
|
3425 layout_bar_close(lw); |
9 | 3426 } |
3427 | |
1293
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3428 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
|
3429 { |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3430 LayoutWindow *lw = data; |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3431 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
|
3432 } |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3433 |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3434 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
|
3435 { |
2184 | 3436 if (lw->exif_window) return; |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
3437 |
1433
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
3438 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
|
3439 if (!lw->exif_window) return; |
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1412
diff
changeset
|
3440 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
|
3441 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
|
3442 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
|
3443 } |
6546ca1fea07
separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1292
diff
changeset
|
3444 |
1055
4bbdfab3c89a
Adding a vim modeline to all files - patch by Klaus Ethgen
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1047
diff
changeset
|
3445 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |