view doc/interpreter/images.awk @ 19134:b2c4d6d461f0 gui-release

fix conflict between main and editor menus when using alt keys (bug #42659) * file-editor.cc (enable_menu_shortcuts): new function enabling/disabling the alt-key accelerators; (m_add_menu): new function adding a menu and storing menu title with and without the char & indicating the accelerator in a hash; (construct): use m_add_menu for adding a new menu to the menu bar * file-editor-interface.h: new virtual function enable_menu_shortcuts * file-editor.h: new functions enable_menu_shortcuts amd m_add_menu, new hash for storing the menu titles * main-window.cc (connect_visibility_changed): disable editors menu shortcuts; (enable_menu_shortcuts): new function enabling/disabling the alt-key accelerators; (m_add_menu): new function adding a menu and storing menu title with and without the char & indicating the accelerator in a hash; (construct_file_menu, construct_edit_menu, construct_debug_menu, construct_window_menu, construct_help_menu, construct_news_menu): use m_add_menu for adding a new menu to the menu bar; (set_global_edit_shortcuts): enable/disable the main and the editors menu shortcuts
author Torsten <ttl@justmail.de>
date Sun, 20 Jul 2014 20:44:30 +0200
parents 501cb6a90f0f
children 4f6ae6b94abe
line wrap: on
line source

BEGIN {
  exts[1] = "eps";
  exts[2] = "pdf";
  exts[3] = "png";
  exts[4] = "txt";
  printf ("IMAGES_SRC =\n");
  for (i = 1; i <= 4; i++) {
    printf ("IMAGES_%s =\n", toupper (exts[i]));
  }
} {
  script = $1;
  basename = script;
  sub (/\.m$/, "", basename);
  ubasename = toupper (basename);
  printf ("IMAGES_SRC += %s\n", script);
  for (i = 1; i <= 4; i++) {
    ext = exts[i];
    uext = toupper (ext);

    printf ("%s_%s =", ubasename, uext);
    for (j = 2; j <= NF; j++)
      printf (" %s.%s", $j, ext);
    printf ("\n");

    printf ("IMAGES_%s += $(%s_%s)\n", uext, ubasename, uext);

    for (j = 2; j <= NF; j++) {
      printf ("%s.%s: %s\n", $j, ext, script);
      printf ("\t$(top_builddir)/run-octave -f -q -H -p $(srcdir) --eval \"%s ('%s', '%s');\"\n",
              basename, $j, ext);
    }
  }
}