#include <sys/wait.h>
#include <gdk/gdkkeysyms.h> /* for keyboard values */
-#include "keymap_template.c"
+#include "keymap_template.h"
#define MENU_EDIT_ACTION_OFFSET 16
#define FILE_COLUMN_POINTER 0
layout_image_full_screen_stop(lw);
}
-LayoutWindow *layout_menu_new_window(GtkAction *action, gpointer data)
-{
- LayoutWindow *lw = data;
- LayoutWindow *nw;
- LayoutOptions lop;
- gboolean tmp = options->save_window_positions;
-
- if (!options->use_saved_window_positions_for_new_windows)
- options->save_window_positions = FALSE; /* let the windowmanager decide for the first time */
-
- layout_exit_fullscreen(lw);
-
- layout_sync_options_with_current_state(lw);
- lop = lw->options; /* we can copy it directly, no strings are modified */
-
- lop.id = NULL; /* get a new id */
- nw = layout_new(NULL, &lop);
- layout_sort_set(nw, options->file_sort.method, options->file_sort.ascending);
- layout_set_fd(nw, lw->dir_fd);
- options->save_window_positions = tmp;
-
- return nw;
-}
-
-
static void clear_marks_cancel_cb(GenericDialog *gd, gpointer data)
{
generic_dialog_close(gd);
file_util_delete(NULL, layout_selection_list(lw), layout_window(lw));
}
-static void layout_menu_delete_key_cb(GtkAction *action, gpointer data)
-{
- LayoutWindow *lw = data;
-
- if (options->file_ops.enable_delete_key)
- {
- options->file_ops.safe_delete_enable = FALSE;
- file_util_delete(NULL, layout_selection_list(lw), layout_window(lw));
- }
-}
static void layout_menu_move_to_trash_key_cb(GtkAction *action, gpointer data)
{
LayoutWindow *lw = data;
layout_image_set_desaturate(lw, gtk_toggle_action_get_active(action));
}
+static void layout_menu_alter_ignore_alpha_cb(GtkToggleAction *action, gpointer data)
+{
+ LayoutWindow *lw = data;
+
+ if (lw->options.ignore_alpha == gtk_toggle_action_get_active(action)) return;
+
+ layout_image_set_ignore_alpha(lw, gtk_toggle_action_get_active(action));
+}
+
static void layout_menu_alter_none_cb(GtkAction *action, gpointer data)
{
LayoutWindow *lw = data;
}
static void layout_menu_select_rectangle_cb(GtkToggleAction *action, gpointer data)
+{
+ options->draw_rectangle = gtk_toggle_action_get_active(action);
+}
+
+static void layout_menu_split_pane_sync_cb(GtkToggleAction *action, gpointer data)
{
LayoutWindow *lw = data;
- options->draw_rectangle = gtk_toggle_action_get_active(action);
+ lw->options.split_pane_sync = gtk_toggle_action_get_active(action);
}
static void layout_menu_select_overunderexposed_cb(GtkToggleAction *action, gpointer data)
}
rotation = g_strdup_printf("%d", fd_n->user_orientation);
- command = g_strconcat(GQ_BIN_DIR, "/geeqie-rotate -r ", rotation,
+ command = g_strconcat(gq_bin_dir, "/geeqie-rotate -r ", rotation,
keep_date ? " -t \"" : " \"", fd_n->path, "\"", NULL);
cmdstatus = runcmd(command);
run_result = WEXITSTATUS(cmdstatus);
LayoutWindow *lw = data;
layout_exit_fullscreen(lw);
- show_config_window();
+ show_config_window(lw);
}
static void layout_menu_editors_cb(GtkAction *action, gpointer data)
view_window_new(layout_image_get_fd(lw));
}
+static void layout_menu_open_archive_cb(GtkAction *action, gpointer data)
+{
+ LayoutWindow *lw = data;
+ LayoutWindow *lw_new;
+ gchar *dest_dir;
+ FileData *fd;
+
+ layout_exit_fullscreen(lw);
+ fd = layout_image_get_fd(lw);
+
+ if (fd->format_class == FORMAT_CLASS_ARCHIVE)
+ {
+ dest_dir = open_archive(layout_image_get_fd(lw));
+ if (dest_dir)
+ {
+ lw_new = layout_new_from_default();
+ layout_set_path(lw_new, dest_dir);
+ g_free(dest_dir);
+ }
+ else
+ {
+ warning_dialog(_("Cannot open archive file"), _("See the Log Window"), GTK_STOCK_DIALOG_WARNING, NULL);
+ }
+ }
+}
+
static void layout_menu_fullscreen_cb(GtkAction *action, gpointer data)
{
LayoutWindow *lw = data;
}
}
-static void layout_menu_guidelines_cb(GtkToggleAction *action, gpointer data)
-{
- LayoutWindow *lw = data;
-
- if (gtk_toggle_action_get_active(action))
- {
- OsdShowFlags flags = image_osd_get(lw->image);
- image_osd_set(lw->image, OSD_SHOW_INFO | OSD_SHOW_STATUS | OSD_SHOW_GUIDELINES);
- layout_util_sync_views(lw);
- }
- else
- {
- OsdShowFlags flags = image_osd_get(lw->image);
- if (flags & OSD_SHOW_GUIDELINES)
- image_osd_set(lw->image, OSD_SHOW_NOTHING);
- }
-}
-
static void layout_menu_animate_cb(GtkToggleAction *action, gpointer data)
{
LayoutWindow *lw = data;
GIOChannel *channel;
char **pre_key, **post_key;
char *key_name, *converted_line;
- int keymap_index, index;
+ int keymap_index;
+ guint index;
fd = g_file_open_tmp("geeqie_keymap_XXXXXX.svg", &tmp_file, &error);
if (error)
static void layout_menu_image_prev_cb(GtkAction *action, gpointer data)
{
LayoutWindow *lw = data;
- layout_image_prev(lw);
+ gint i;
+
+ if (lw->options.split_pane_sync)
+ {
+ for (i = 0; i < MAX_SPLIT_IMAGES; i++)
+ {
+ if (lw->split_images[i])
+ {
+ if (i != -1)
+ {
+ DEBUG_1("image activate scroll %d", i);
+ layout_image_activate(lw, i, FALSE);
+ layout_image_prev(lw);
+ }
+ }
+ }
+ }
+ else
+ {
+ layout_image_prev(lw);
+ }
}
static void layout_menu_image_next_cb(GtkAction *action, gpointer data)
{
LayoutWindow *lw = data;
- layout_image_next(lw);
+ gint i;
+
+ if (lw->options.split_pane_sync)
+ {
+ for (i = 0; i < MAX_SPLIT_IMAGES; i++)
+ {
+ if (lw->split_images[i])
+ {
+ if (i != -1)
+ {
+ DEBUG_1("image activate scroll %d", i);
+ layout_image_activate(lw, i, FALSE);
+ layout_image_next(lw);
+ }
+ }
+ }
+ }
+ else
+ {
+ layout_image_next(lw);
+ }
}
static void layout_menu_page_first_cb(GtkAction *action, gpointer data)
static void layout_menu_image_forward_cb(GtkAction *action, gpointer data)
{
LayoutWindow *lw = data;
- FileData *dir_fd;
/* Obtain next image */
layout_set_path(lw, image_chain_forward());
static void layout_menu_image_back_cb(GtkAction *action, gpointer data)
{
LayoutWindow *lw = data;
- FileData *dir_fd;
/* Obtain previous image */
layout_set_path(lw, image_chain_back());
static void layout_menu_new_window_cb(GtkWidget *widget, gpointer data)
{
- LayoutWindow *nw = NULL;
gint n;
n = GPOINTER_TO_INT(data);
window_rename_ok(gd, rw);
}
-static gboolean window_rename_entry_activate_cb(GenericDialog *gd, gpointer data)
+static void window_rename_entry_activate_cb(GenericDialog *gd, gpointer data)
{
RenameWindow *rw = data;
static void layout_menu_window_default_cb(GtkWidget *widget, gpointer data)
{
- layout_new_from_config(NULL, NULL, TRUE);
+ layout_new_from_default();
}
static void layout_menu_windows_menu_cb(GtkWidget *widget, gpointer data)
menu = gtk_ui_manager_get_widget(lw->ui_manager, "/MainMenu/WindowsMenu/");
sub_menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(menu));
- /* disable Rename and Delete for main window */
- if (g_strcmp0(lw->options.id, "main") == 0)
+ /* disable Delete for temporary windows */
+ if (g_str_has_prefix(lw->options.id, "lw"))
{
i = 0;
children = gtk_container_get_children(GTK_CONTAINER(sub_menu));
for (iter = children; iter != NULL; iter = g_list_next(iter), i++)
{
menu_label = g_strdup(gtk_menu_item_get_label(GTK_MENU_ITEM(iter->data)));
- if (g_strcmp0(menu_label, _("Delete window")) == 0 || g_strcmp0(menu_label, _("Rename window")) == 0)
+ if (g_strcmp0(menu_label, _("Delete window")) == 0)
{
gtk_widget_set_sensitive(GTK_WIDGET(iter->data), FALSE);
}
}
}
+static void layout_menu_view_menu_cb(GtkWidget *widget, gpointer data)
+{
+ LayoutWindow *lw = data;
+ GtkWidget *menu;
+ GtkWidget *sub_menu;
+ gchar *menu_label;
+ GList *children, *iter;
+ gint i;
+ FileData *fd;
+
+ menu = gtk_ui_manager_get_widget(lw->ui_manager, "/MainMenu/ViewMenu/");
+ sub_menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(menu));
+
+ fd = layout_image_get_fd(lw);
+
+ i = 0;
+ children = gtk_container_get_children(GTK_CONTAINER(sub_menu));
+ for (iter = children; iter != NULL; iter = g_list_next(iter), i++)
+ {
+ menu_label = g_strdup(gtk_menu_item_get_label(GTK_MENU_ITEM(iter->data)));
+ if (g_strcmp0(menu_label, _("Open archive")) == 0)
+ {
+ if (fd && fd->format_class == FORMAT_CLASS_ARCHIVE)
+ {
+ gtk_widget_set_sensitive(GTK_WIDGET(iter->data), TRUE);
+ }
+ else
+ {
+ gtk_widget_set_sensitive(GTK_WIDGET(iter->data), FALSE);
+ }
+ }
+ g_free(menu_label);
+ }
+ g_list_free(children);
+}
+
static void change_window_id(const gchar *infile, const gchar *outfile)
{
GFile *in_file;
out_file_stream = g_file_append_to(out_file, G_FILE_CREATE_PRIVATE, NULL, NULL);
out_data_stream = g_data_output_stream_new(G_OUTPUT_STREAM(out_file_stream));
- while (line = g_data_input_stream_read_line(in_data_stream, NULL, NULL, NULL))
+ while ((line = g_data_input_stream_read_line(in_data_stream, NULL, NULL, NULL)))
{
if (g_str_has_suffix(line, "<layout"))
{
*/
#define CB G_CALLBACK
-
+/**
+ * tooltip is used as the description field in the Help manual shortcuts documentation
+ *
+ * struct GtkActionEntry:
+ * name, stock_id, label, accelerator, tooltip, callback
+ */
static GtkActionEntry menu_entries[] = {
{ "FileMenu", NULL, N_("_File"), NULL, NULL, NULL },
{ "GoMenu", NULL, N_("_Go"), NULL, NULL, NULL },
{ "OrientationMenu", NULL, N_("_Orientation"), NULL, NULL, NULL },
{ "RatingMenu", NULL, N_("_Rating"), NULL, NULL, NULL },
{ "PreferencesMenu", NULL, N_("P_references"), NULL, NULL, NULL },
- { "ViewMenu", NULL, N_("_View"), NULL, NULL, NULL },
+ { "ViewMenu", NULL, N_("_View"), NULL, NULL, CB(layout_menu_view_menu_cb) },
{ "FileDirMenu", NULL, N_("_Files and Folders"), NULL, NULL, NULL },
{ "ZoomMenu", NULL, N_("_Zoom"), NULL, NULL, NULL },
{ "ColorMenu", NULL, N_("_Color Management"), NULL, NULL, NULL },
{ "WindowsMenu", NULL, N_("_Windows"), NULL, NULL, CB(layout_menu_windows_menu_cb) },
{ "HelpMenu", NULL, N_("_Help"), NULL, NULL, NULL },
+ { "Copy", GTK_STOCK_COPY, N_("_Copy..."), "<control>C", N_("Copy..."), CB(layout_menu_copy_cb) },
+ { "Move", PIXBUF_INLINE_ICON_MOVE, N_("_Move..."), "<control>M", N_("Move..."), CB(layout_menu_move_cb) },
+ { "Rename", PIXBUF_INLINE_ICON_RENAME, N_("_Rename..."), "<control>R", N_("Rename..."), CB(layout_menu_rename_cb) },
+ { "Delete", PIXBUF_INLINE_ICON_TRASH, N_("Move to Trash..."), "<control>D", N_("Move to Trash..."), CB(layout_menu_move_to_trash_cb) },
+ { "DeleteAlt1", PIXBUF_INLINE_ICON_TRASH,N_("Move to Trash..."), "Delete", N_("Move to Trash..."), CB(layout_menu_move_to_trash_key_cb) },
+ { "DeleteAlt2", PIXBUF_INLINE_ICON_TRASH,N_("Move to Trash..."), "KP_Delete", N_("Move to Trash..."), CB(layout_menu_move_to_trash_key_cb) },
+ { "PermanentDelete", GTK_STOCK_DELETE, N_("Delete..."), "<shift>Delete",N_("Delete..."), CB(layout_menu_delete_cb) },
+ { "SelectAll", PIXBUF_INLINE_ICON_SELECT_ALL, N_("Select _all"), "<control>A", N_("Select all"), CB(layout_menu_select_all_cb) },
+ { "SelectNone", PIXBUF_INLINE_ICON_SELECT_NONE, N_("Select _none"), "<control><shift>A", N_("Select none"), CB(layout_menu_unselect_all_cb) },
+ { "SelectInvert", PIXBUF_INLINE_ICON_SELECT_INVERT, N_("_Invert Selection"), "<control><shift>I", N_("Invert Selection"), CB(layout_menu_invert_selection_cb) },
+ { "CloseWindow", GTK_STOCK_CLOSE, N_("C_lose window"), "<control>W", N_("Close window"), CB(layout_menu_close_cb) },
+ { "Quit", GTK_STOCK_QUIT, N_("_Quit"), "<control>Q", N_("Quit"), CB(layout_menu_exit_cb) },
{ "FirstImage", GTK_STOCK_GOTO_TOP, N_("_First Image"), "Home", N_("First Image"), CB(layout_menu_image_first_cb) },
{ "PrevImage", GTK_STOCK_GO_UP, N_("_Previous Image"), "BackSpace", N_("Previous Image"), CB(layout_menu_image_prev_cb) },
{ "PrevImageAlt1", GTK_STOCK_GO_UP, N_("_Previous Image"), "Page_Up", N_("Previous Image"), CB(layout_menu_image_prev_cb) },
{ "Home", GTK_STOCK_HOME, N_("_Home"), NULL, N_("Home"), CB(layout_menu_home_cb) },
{ "Up", GTK_STOCK_GO_UP, N_("_Up"), NULL, N_("Up one folder"), CB(layout_menu_up_cb) },
{ "NewWindow", NULL, N_("New window"), NULL, N_("New window"), CB(layout_menu_window_cb) },
- { "NewWindowDefault", NULL, N_("default"), "<control>N", N_("default"), CB(layout_menu_window_default_cb) },
+ { "NewWindowDefault", NULL, N_("default"), "<control>N", N_("New window (default)"), CB(layout_menu_window_default_cb) },
{ "NewWindowFromCurrent", NULL, N_("from current"), NULL, N_("from current"), CB(layout_menu_window_from_current_cb) },
{ "RenameWindow", GTK_STOCK_EDIT, N_("Rename window"), NULL, N_("Rename window"), CB(layout_menu_window_rename_cb) },
{ "DeleteWindow", GTK_STOCK_DELETE, N_("Delete window"), NULL, N_("Delete window"), CB(layout_menu_window_delete_cb) },
{ "PanView", PIXBUF_INLINE_ICON_PANORAMA, N_("Pa_n view"), "<control>J", N_("Pan view"), CB(layout_menu_pan_cb) },
{ "Print", GTK_STOCK_PRINT, N_("_Print..."), "<shift>P", N_("Print..."), CB(layout_menu_print_cb) },
{ "NewFolder", GTK_STOCK_DIRECTORY, N_("N_ew folder..."), "<control>F", N_("New folder..."), CB(layout_menu_dir_cb) },
- { "Copy", GTK_STOCK_COPY, N_("_Copy..."), "<control>C", N_("Copy..."), CB(layout_menu_copy_cb) },
- { "Move", PIXBUF_INLINE_ICON_MOVE, N_("_Move..."), "<control>M", N_("Move..."), CB(layout_menu_move_cb) },
- { "Rename", PIXBUF_INLINE_ICON_RENAME, N_("_Rename..."), "<control>R", N_("Rename..."), CB(layout_menu_rename_cb) },
- { "Delete", PIXBUF_INLINE_ICON_TRASH, N_("Move to Trash..."), "<control>D", N_("Move to Trash..."), CB(layout_menu_move_to_trash_cb) },
- { "DeleteAlt1", PIXBUF_INLINE_ICON_TRASH,N_("Move to Trash..."), "Delete", N_("Move to Trash..."), CB(layout_menu_move_to_trash_key_cb) },
- { "DeleteAlt2", PIXBUF_INLINE_ICON_TRASH,N_("Move to Trash..."), "KP_Delete", N_("Move to Trash..."), CB(layout_menu_move_to_trash_key_cb) },
- { "PermanentDelete", GTK_STOCK_DELETE, N_("Delete..."), "<shift>Delete",N_("Delete..."), CB(layout_menu_delete_cb) },
{ "EnableGrouping", NULL, N_("Enable file _grouping"), NULL, N_("Enable file grouping"), CB(layout_menu_enable_grouping_cb) },
{ "DisableGrouping", NULL, N_("Disable file groupi_ng"), NULL, N_("Disable file grouping"), CB(layout_menu_disable_grouping_cb) },
{ "CopyPath", NULL, N_("_Copy path to clipboard"), NULL, N_("Copy path to clipboard"), CB(layout_menu_copy_path_cb) },
{ "CopyPathUnquoted", NULL, N_("_Copy path unquoted to clipboard"), NULL, N_("Copy path unquoted to clipboard"), CB(layout_menu_copy_path_unquoted_cb) },
- { "CloseWindow", GTK_STOCK_CLOSE, N_("C_lose window"), "<control>W", N_("Close window"), CB(layout_menu_close_cb) },
- { "Quit", GTK_STOCK_QUIT, N_("_Quit"), "<control>Q", N_("Quit"), CB(layout_menu_exit_cb) },
- { "RotateCW", PIXBUF_INLINE_ICON_CW, N_("_Rotate clockwise 90°"), "bracketright", N_("Image Rotate clockwise 90°"), CB(layout_menu_alter_90_cb) },
{ "Rating0", NULL, N_("_Rating 0"), "<alt>KP_0", N_("Rating 0"), CB(layout_menu_rating_0_cb) },
{ "Rating1", NULL, N_("_Rating 1"), "<alt>KP_1", N_("Rating 1"), CB(layout_menu_rating_1_cb) },
{ "Rating2", NULL, N_("_Rating 2"), "<alt>KP_2", N_("Rating 2"), CB(layout_menu_rating_2_cb) },
{ "Rating4", NULL, N_("_Rating 4"), "<alt>KP_4", N_("Rating 4"), CB(layout_menu_rating_4_cb) },
{ "Rating5", NULL, N_("_Rating 5"), "<alt>KP_5", N_("Rating 5"), CB(layout_menu_rating_5_cb) },
{ "RatingM1", NULL, N_("_Rating -1"), "<alt>KP_Subtract", N_("Rating -1"), CB(layout_menu_rating_m1_cb) },
+ { "RotateCW", PIXBUF_INLINE_ICON_CW, N_("_Rotate clockwise 90°"), "bracketright", N_("Image Rotate clockwise 90°"), CB(layout_menu_alter_90_cb) },
{ "RotateCCW", PIXBUF_INLINE_ICON_CCW, N_("Rotate _counterclockwise 90°"), "bracketleft", N_("Rotate counterclockwise 90°"), CB(layout_menu_alter_90cc_cb) },
{ "Rotate180", PIXBUF_INLINE_ICON_180, N_("Rotate 1_80°"), "<shift>R", N_("Image Rotate 180°"), CB(layout_menu_alter_180_cb) },
{ "Mirror", PIXBUF_INLINE_ICON_MIRROR, N_("_Mirror"), "<shift>M", N_("Image Mirror"), CB(layout_menu_alter_mirror_cb) },
{ "Flip", PIXBUF_INLINE_ICON_FLIP, N_("_Flip"), "<shift>F", N_("Image Flip"), CB(layout_menu_alter_flip_cb) },
{ "AlterNone", PIXBUF_INLINE_ICON_ORIGINAL, N_("_Original state"), "<shift>O", N_("Image rotate Original state"), CB(layout_menu_alter_none_cb) },
- { "SelectAll", PIXBUF_INLINE_ICON_SELECT_ALL, N_("Select _all"), "<control>A", N_("Select all"), CB(layout_menu_select_all_cb) },
- { "SelectNone", PIXBUF_INLINE_ICON_SELECT_NONE, N_("Select _none"), "<control><shift>A", N_("Select none"), CB(layout_menu_unselect_all_cb) },
- { "SelectInvert", PIXBUF_INLINE_ICON_SELECT_INVERT, N_("_Invert Selection"), "<control><shift>I", N_("Invert Selection"), CB(layout_menu_invert_selection_cb) },
{ "Preferences", GTK_STOCK_PREFERENCES, N_("P_references..."), "<control>O", N_("Preferences..."), CB(layout_menu_config_cb) },
{ "Plugins", GTK_STOCK_PREFERENCES, N_("Configure _Plugins..."), NULL, N_("Configure Plugins..."), CB(layout_menu_editors_cb) },
{ "LayoutConfig", GTK_STOCK_PREFERENCES, N_("_Configure this window..."), NULL, N_("Configure this window..."), CB(layout_menu_layout_config_cb) },
{ "Wallpaper", NULL, N_("Set as _wallpaper"), NULL, N_("Set as wallpaper"), CB(layout_menu_wallpaper_cb) },
{ "SaveMetadata", GTK_STOCK_SAVE, N_("_Save metadata"), "<control>S", N_("Save metadata"), CB(layout_menu_metadata_write_cb) },
{ "KeywordAutocomplete", NULL, N_("Keyword autocomplete"), "<alt>K", N_("Keyword Autocomplete"), CB(layout_menu_keyword_autocomplete_cb) },
- { "ZoomIn", GTK_STOCK_ZOOM_IN, N_("Zoom _in"), "equal", N_("Zoom in"), CB(layout_menu_zoom_in_cb) },
{ "ZoomInAlt1", GTK_STOCK_ZOOM_IN, N_("Zoom _in"), "KP_Add", N_("Zoom in"), CB(layout_menu_zoom_in_cb) },
+ { "ZoomIn", GTK_STOCK_ZOOM_IN, N_("Zoom _in"), "equal", N_("Zoom in"), CB(layout_menu_zoom_in_cb) },
{ "ZoomOut", GTK_STOCK_ZOOM_OUT, N_("Zoom _out"), "minus", N_("Zoom out"), CB(layout_menu_zoom_out_cb) },
{ "ZoomOutAlt1", GTK_STOCK_ZOOM_OUT, N_("Zoom _out"), "KP_Subtract", N_("Zoom out"), CB(layout_menu_zoom_out_cb) },
{ "Zoom100", GTK_STOCK_ZOOM_100, N_("Zoom _1:1"), "Z", N_("Zoom 1:1"), CB(layout_menu_zoom_1_1_cb) },
{ "Zoom100Alt1", GTK_STOCK_ZOOM_100, N_("Zoom _1:1"), "KP_Divide", N_("Zoom 1:1"), CB(layout_menu_zoom_1_1_cb) },
- { "ZoomFit", GTK_STOCK_ZOOM_FIT, N_("_Zoom to fit"), "X", N_("Zoom to fit"), CB(layout_menu_zoom_fit_cb) },
{ "ZoomFitAlt1", GTK_STOCK_ZOOM_FIT, N_("_Zoom to fit"), "KP_Multiply", N_("Zoom to fit"), CB(layout_menu_zoom_fit_cb) },
+ { "ZoomFit", GTK_STOCK_ZOOM_FIT, N_("_Zoom to fit"), "X", N_("Zoom to fit"), CB(layout_menu_zoom_fit_cb) },
{ "ZoomFillHor", PIXBUF_INLINE_ICON_ZOOMFILLHOR, N_("Fit _Horizontally"), "H", N_("Fit Horizontally"), CB(layout_menu_zoom_fit_hor_cb) },
{ "ZoomFillVert", PIXBUF_INLINE_ICON_ZOOMFILLVERT, N_("Fit _Vertically"), "W", N_("Fit Vertically"), CB(layout_menu_zoom_fit_vert_cb) },
{ "Zoom200", GTK_STOCK_FILE, N_("Zoom _2:1"), NULL, N_("Zoom 2:1"), CB(layout_menu_zoom_2_1_cb) },
{ "ConnectZoom33", NULL, N_("Zoom 1:3"), NULL, N_("Connected Zoom 1:3"), CB(layout_menu_connect_zoom_1_3_cb) },
{ "ConnectZoom25", NULL, N_("Zoom 1:4"), NULL, N_("Connected Zoom 1:4"), CB(layout_menu_connect_zoom_1_4_cb) },
{ "ViewInNewWindow", NULL, N_("_View in new window"), "<control>V", N_("View in new window"), CB(layout_menu_view_in_new_window_cb) },
+ { "OpenArchive", GTK_STOCK_OPEN, N_("Open archive"), NULL, N_("Open archive"), CB(layout_menu_open_archive_cb) },
{ "FullScreen", GTK_STOCK_FULLSCREEN, N_("F_ull screen"), "F", N_("Full screen"), CB(layout_menu_fullscreen_cb) },
{ "FullScreenAlt1", GTK_STOCK_FULLSCREEN, N_("F_ull screen"), "V", N_("Full screen"), CB(layout_menu_fullscreen_cb) },
{ "FullScreenAlt2", GTK_STOCK_FULLSCREEN, N_("F_ull screen"), "F11", N_("Full screen"), CB(layout_menu_fullscreen_cb) },
{ "HistogramModeCycle",NULL, N_("Cycle through histogram mo_des"), "J", N_("Cycle through histogram modes"), CB(layout_menu_histogram_toggle_mode_cb) },
{ "HideTools", PIXBUF_INLINE_ICON_HIDETOOLS, N_("_Hide file list"), "<control>H", N_("Hide file list"), CB(layout_menu_hide_cb) },
{ "SlideShowPause", GTK_STOCK_MEDIA_PAUSE, N_("_Pause slideshow"), "P", N_("Pause slideshow"), CB(layout_menu_slideshow_pause_cb) },
- { "SlideShowFaster", GTK_STOCK_FILE, N_("Faster"), "<control>KP_Add", N_("Slideshow Faster"), CB(layout_menu_slideshow_faster_cb) },
- { "SlideShowSlower", GTK_STOCK_FILE, N_("Slower"), "<control>KP_Subtract", N_("Slideshow Slower"), CB(layout_menu_slideshow_slower_cb) },
+ { "SlideShowFaster", GTK_STOCK_FILE, N_("Faster"), "<control>equal", N_("Slideshow Faster"), CB(layout_menu_slideshow_faster_cb) },
+ { "SlideShowSlower", GTK_STOCK_FILE, N_("Slower"), "<control>minus", N_("Slideshow Slower"), CB(layout_menu_slideshow_slower_cb) },
{ "Refresh", GTK_STOCK_REFRESH, N_("_Refresh"), "R", N_("Refresh"), CB(layout_menu_refresh_cb) },
- { "HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1", N_("Contents"), CB(layout_menu_help_cb) },
+ { "HelpContents", GTK_STOCK_HELP, N_("_Help manual"), "F1", N_("Help manual"), CB(layout_menu_help_cb) },
{ "HelpSearch", NULL, N_("On-line help search"), NULL, N_("On-line help search"), CB(layout_menu_help_search_cb) },
{ "HelpShortcuts", NULL, N_("_Keyboard shortcuts"), NULL, N_("Keyboard shortcuts"), CB(layout_menu_help_keys_cb) },
{ "HelpKbd", NULL, N_("_Keyboard map"), NULL, N_("Keyboard map"), CB(layout_menu_kbd_map_cb) },
- { "HelpNotes", NULL, N_("_Release notes"), NULL, N_("Release notes"), CB(layout_menu_notes_cb) },
+ { "HelpNotes", NULL, N_("_Readme"), NULL, N_("Readme"), CB(layout_menu_notes_cb) },
{ "HelpChangeLog", NULL, N_("_ChangeLog"), NULL, N_("ChangeLog notes"), CB(layout_menu_changelog_cb) },
{ "SearchAndRunCommand", GTK_STOCK_FIND, N_("Search and Run command"), "slash", N_("Search commands by keyword and run them"), CB(layout_menu_search_and_run_cb) },
{ "About", GTK_STOCK_ABOUT, N_("_About"), NULL, N_("About"), CB(layout_menu_about_cb) },
{ "ShowMarks", PIXBUF_INLINE_ICON_MARKS, N_("Show _Marks"), "M", N_("Show Marks"), CB(layout_menu_marks_cb), FALSE },
{ "ShowFileFilter", PIXBUF_INLINE_ICON_FILE_FILTER, N_("Show File Filter"), NULL, N_("Show File Filter"), CB(layout_menu_file_filter_cb), FALSE },
{ "ShowInfoPixel", GTK_STOCK_COLOR_PICKER, N_("Pi_xel Info"), NULL, N_("Show Pixel Info"), CB(layout_menu_info_pixel_cb), FALSE },
+ { "IgnoreAlpha", GTK_STOCK_STRIKETHROUGH, N_("Hide _alpha"), "<shift>A", N_("Hide alpha channel"), CB(layout_menu_alter_ignore_alpha_cb), FALSE},
{ "FloatTools", PIXBUF_INLINE_ICON_FLOAT,N_("_Float file list"), "L", N_("Float file list"), CB(layout_menu_float_cb), FALSE },
{ "HideToolbar", NULL, N_("Hide tool_bar"), NULL, N_("Hide toolbar"), CB(layout_menu_toolbar_cb), FALSE },
{ "SBar", PIXBUF_INLINE_ICON_INFO, N_("_Info sidebar"), "<control>K", N_("Info sidebar"), CB(layout_menu_bar_cb), FALSE },
{ "Grayscale", PIXBUF_INLINE_ICON_GRAYSCALE, N_("Toggle _grayscale"), "<shift>G", N_("Toggle grayscale"), CB(layout_menu_alter_desaturate_cb), FALSE},
{ "ImageOverlay", NULL, N_("Image _Overlay"), NULL, N_("Image Overlay"), CB(layout_menu_overlay_cb), FALSE },
{ "ImageHistogram", NULL, N_("_Show Histogram"), NULL, N_("Show Histogram"), CB(layout_menu_histogram_cb), FALSE },
- { "ImageGuidelines", PIXBUF_INLINE_ICON_GUIDELINES, N_("_Show Guidelines"), NULL, N_("Show Guidelines"), CB(layout_menu_guidelines_cb), FALSE },
{ "RectangularSelection", PIXBUF_INLINE_ICON_SELECT_RECTANGLE, N_("Rectangular Selection"), "<alt>R", N_("Rectangular Selection"), CB(layout_menu_rectangular_selection_cb), FALSE },
{ "Animate", NULL, N_("GIF _animation"), "A", N_("Toggle GIF animation"), CB(layout_menu_animate_cb), FALSE },
- { "ExifRotate", GTK_STOCK_ORIENTATION_PORTRAIT, N_("_Exif rotate"), "<alt>X", N_("Exif rotate"), CB(layout_menu_exif_rotate_cb), FALSE },
+ { "ExifRotate", GTK_STOCK_ORIENTATION_PORTRAIT, N_("_Exif rotate"), "<alt>X", N_("Toggle Exif rotate"), CB(layout_menu_exif_rotate_cb), FALSE },
{ "DrawRectangle", PIXBUF_INLINE_ICON_DRAW_RECTANGLE, N_("Draw Rectangle"), NULL, N_("Draw Rectangle"), CB(layout_menu_select_rectangle_cb), FALSE },
- { "OverUnderExposed", PIXBUF_INLINE_ICON_EXPOSURE, N_("Over/Under Exposed"), "<shift>E", N_("Over/Under Exposed"), CB(layout_menu_select_overunderexposed_cb), FALSE },
+ { "OverUnderExposed", PIXBUF_INLINE_ICON_EXPOSURE, N_("Over/Under Exposed"), "<shift>E", N_("Highlight over/under exposed"), CB(layout_menu_select_overunderexposed_cb), FALSE },
+ { "SplitPaneSync", PIXBUF_INLINE_SPLIT_PANE_SYNC, N_("Split Pane Sync"), NULL, N_("Split Pane Sync"), CB(layout_menu_split_pane_sync_cb), FALSE },
};
static GtkRadioActionEntry menu_radio_entries[] = {
- { "ViewList", NULL, N_("Image _List"), "<control>L", N_("View Images as List"), FILEVIEW_LIST },
- { "ViewIcons", NULL, N_("I_cons"), "<control>I", N_("View Images as Icons"), FILEVIEW_ICON }
+ { "ViewList", NULL, N_("Images as _List"), "<control>L", N_("View Images as List"), FILEVIEW_LIST },
+ { "ViewIcons", NULL, N_("Images as I_cons"), "<control>I", N_("View Images as Icons"), FILEVIEW_ICON }
};
static GtkToggleActionEntry menu_view_dir_toggle_entries[] = {
};
static GtkRadioActionEntry menu_split_radio_entries[] = {
- { "SplitHorizontal", NULL, N_("_Horizontal"), "E", N_("Split Horizontal"), SPLIT_HOR },
- { "SplitVertical", NULL, N_("_Vertical"), "U", N_("Split Vertical"), SPLIT_VERT },
- { "SplitQuad", NULL, N_("_Quad"), NULL, N_("Split Quad"), SPLIT_QUAD },
- { "SplitSingle", NULL, N_("_Single"), "Y", N_("Split Single"), SPLIT_NONE }
+ { "SplitHorizontal", NULL, N_("_Horizontal"), "E", N_("Split panes horizontal."), SPLIT_HOR },
+ { "SplitVertical", NULL, N_("_Vertical"), "U", N_("Split panes vertical"), SPLIT_VERT },
+ { "SplitQuad", NULL, N_("_Quad"), NULL, N_("Split panes quad"), SPLIT_QUAD },
+ { "SplitSingle", NULL, N_("_Single"), "Y", N_("Single pane"), SPLIT_NONE }
};
static GtkRadioActionEntry menu_color_radio_entries[] = {
" <menuitem action='ViewInNewWindow'/>"
" <menuitem action='PanView'/>"
" <menuitem action='ExifWin'/>"
+" <menuitem action='OpenArchive'/>"
" <placeholder name='WindowSection'/>"
" <separator/>"
" <menu action='FileDirMenu'>"
" <menuitem action='SplitPreviousPane'/>"
" <menuitem action='SplitUpPane'/>"
" <menuitem action='SplitDownPane'/>"
+" <separator/>"
+" <menuitem action='SplitPaneSync'/>"
" </menu>"
" <menu action='StereoMenu'>"
" <menuitem action='StereoAuto'/>"
" </menu>"
" <menu action='OverlayMenu'>"
" <menuitem action='ImageOverlay'/>"
-" <menuitem action='ImageGuidelines'/>"
" <menuitem action='ImageHistogram'/>"
" <menuitem action='ImageOverlayCycle'/>"
" <separator/>"
" <menuitem action='SBarSort'/>"
" <menuitem action='HideBars'/>"
" <menuitem action='ShowInfoPixel'/>"
+" <menuitem action='IgnoreAlpha'/>"
" <placeholder name='ToolsSection'/>"
" <separator/>"
" <menuitem action='Animate'/>"
{
GError *error;
gint i;
- GtkAction *action;
DEBUG_1("%s layout_actions_setup: start", get_exec_time());
if (lw->ui_manager) return;
gboolean use_image = FALSE;
gint i;
gchar action_name[15];
+#ifdef HAVE_LCMS
gchar *image_profile;
gchar *screen_profile;
-
+#endif
if (!lw->action_group) return;
if (!layout_image_color_profile_get(lw, &input, &use_image)) return;
action = gtk_action_group_get_action(lw->action_group, "SplitDownPane");
gtk_action_set_sensitive(action, !(lw->split_mode == SPLIT_NONE));
+ action = gtk_action_group_get_action(lw->action_group, "SplitPaneSync");
+ gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.split_pane_sync);
+
action = gtk_action_group_get_action(lw->action_group, "ViewIcons");
gtk_radio_action_set_current_value(GTK_RADIO_ACTION(action), lw->options.file_view_type);
action = gtk_action_group_get_action(lw->action_group, "SlideShow");
gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), layout_image_slideshow_active(lw));
+ action = gtk_action_group_get_action(lw->action_group, "IgnoreAlpha");
+ gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.ignore_alpha);
+
action = gtk_action_group_get_action(lw->action_group, "Animate");
gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.animate);
action = gtk_action_group_get_action(lw->action_group, "ImageHistogram");
gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), osd_flags & OSD_SHOW_HISTOGRAM);
- action = gtk_action_group_get_action(lw->action_group, "ImageGuidelines");
- gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), osd_flags & OSD_SHOW_GUIDELINES);
-
action = gtk_action_group_get_action(lw->action_group, "ExifRotate");
gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), options->image.exif_rotate_enable);
layout_util_sync_marks(lw);
layout_util_sync_color(lw);
+ layout_image_set_ignore_alpha(lw, lw->options.ignore_alpha);
}
void layout_util_sync_thumb(LayoutWindow *lw)
layout_bar_close(lw);
}
-static void layout_exif_window_destroy(GtkWidget *widget, gpointer data)
+static gboolean layout_exif_window_destroy(GtkWidget *widget, gpointer data)
{
LayoutWindow *lw = data;
lw->exif_window = NULL;
+
+ return TRUE;
}
void layout_exif_window_new(LayoutWindow *lw)
{
if (lw->exif_window) return;
- lw->exif_window = advanced_exif_new();
+ lw->exif_window = advanced_exif_new(lw);
if (!lw->exif_window) return;
g_signal_connect(G_OBJECT(lw->exif_window), "destroy",
G_CALLBACK(layout_exif_window_destroy), lw);