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