Fix #903, #904: Slideshow settings
[geeqie.git] / src / layout_util.c
index c905f4b..a9c7da7 100644 (file)
@@ -63,7 +63,7 @@
 
 #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
@@ -602,7 +602,7 @@ static void layout_menu_write_rotate(GtkToggleAction *action, gpointer data, gbo
                        }
 
                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);
@@ -661,7 +661,7 @@ static void layout_menu_config_cb(GtkAction *action, gpointer data)
        LayoutWindow *lw = data;
 
        layout_exit_fullscreen(lw);
-       show_config_window();
+       show_config_window(lw);
 }
 
 static void layout_menu_editors_cb(GtkAction *action, gpointer data)
@@ -2067,7 +2067,6 @@ static GList *layout_window_menu_list(GList *listin)
 
 static void layout_menu_new_window_cb(GtkWidget *widget, gpointer data)
 {
-       LayoutWindow *nw = NULL;
        gint n;
 
        n = GPOINTER_TO_INT(data);
@@ -2249,15 +2248,15 @@ 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);
                                }
@@ -2558,8 +2557,8 @@ static GtkActionEntry menu_entries[] = {
   { "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) },
@@ -2604,7 +2603,7 @@ static GtkToggleActionEntry menu_toggle_entries[] = {
   { "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) },
+  { "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[] = {
@@ -3648,9 +3647,10 @@ void layout_util_sync_color(LayoutWindow *lw)
        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;