#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_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;
options->draw_rectangle = gtk_toggle_action_get_active(action);
}
+static void layout_menu_split_pane_sync_cb(GtkToggleAction *action, gpointer data)
+{
+ LayoutWindow *lw = data;
+
+ lw->options.split_pane_sync = gtk_toggle_action_get_active(action);
+}
+
static void layout_menu_select_overunderexposed_cb(GtkToggleAction *action, gpointer data)
{
LayoutWindow *lw = 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)
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_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;
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);
}
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"))
{
{ "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) },
{ "HelpSearch", NULL, N_("On-line help search"), NULL, N_("On-line help search"), CB(layout_menu_help_search_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 },
{ "ExifRotate", GTK_STOCK_ORIENTATION_PORTRAIT, N_("_Exif rotate"), "<alt>X", N_("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 },
+ { "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[] = {
" <menuitem action='SplitPreviousPane'/>"
" <menuitem action='SplitUpPane'/>"
" <menuitem action='SplitDownPane'/>"
+" <separator/>"
+" <menuitem action='SplitPaneSync'/>"
" </menu>"
" <menu action='StereoMenu'>"
" <menuitem action='StereoAuto'/>"
" <menuitem action='SBarSort'/>"
" <menuitem action='HideBars'/>"
" <menuitem action='ShowInfoPixel'/>"
+" <menuitem action='IgnoreAlpha'/>"
" <placeholder name='ToolsSection'/>"
" <separator/>"
" <menuitem action='Animate'/>"
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);
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)