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