From 1fe8fc331066d0e32b0d01eb44f799d8e40ce52b Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 30 Dec 2004 23:10:40 +0000
Subject: [PATCH] - On Mac, Cmd==Ctrl - better menu dividers

---
 Fltk/Callbacks.cpp |  6 +++++-
 Fltk/GUI.cpp       | 11 ++++++-----
 doc/VERSIONS       |  7 ++++---
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index 2664ca4326..c8bd46e642 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.315 2004-12-30 22:43:21 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.316 2004-12-30 23:10:40 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -1181,7 +1181,11 @@ void clip_reset_cb(CALLBACK_ARGS)
 void help_short_cb(CALLBACK_ARGS)
 {
   Msg(DIRECT, " ");
+#if defined(__APPLE__)
+  Msg(DIRECT, "Keyboard shortcuts (Ctrl and Cmd can be used interchangeably):");
+#else
   Msg(DIRECT, "Keyboard shortcuts:");
+#endif
   Msg(DIRECT, " ");
   Msg(DIRECT, "  Left arrow    go to previous time step"); 
   Msg(DIRECT, "  Right arrow   go to next time step"); 
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index 04426c5885..0eed4418b0 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.398 2004-12-30 22:43:21 geuzaine Exp $
+// $Id: GUI.cpp,v 1.399 2004-12-30 23:10:40 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -91,7 +91,7 @@ Fl_Menu_Item m_menubar_table[] = {
     {"&New...",     FL_CTRL+'n', (Fl_Callback *)file_new_cb, 0},
     {"&Open...",    FL_CTRL+'o', (Fl_Callback *)file_open_cb, 0},
     {"M&erge...",   FL_CTRL+'m', (Fl_Callback *)file_merge_cb, 0, FL_MENU_DIVIDER},
-    {"&Rename...",  FL_CTRL+'r', (Fl_Callback *)file_rename_cb, 0, FL_MENU_DIVIDER},
+    {"&Rename...",  FL_CTRL+'r', (Fl_Callback *)file_rename_cb, 0},
     {"Save &as...", FL_CTRL+'s', (Fl_Callback *)file_save_as_cb, 0},
     {"Sa&ve mesh",  FL_CTRL+FL_SHIFT+'s', (Fl_Callback *)mesh_save_cb, 0, FL_MENU_DIVIDER},
     {"&Quit",       FL_CTRL+'q', (Fl_Callback *)file_quit_cb, 0},
@@ -125,7 +125,7 @@ Fl_Menu_Item m_sys_menubar_table[] = {
     {"New...",     FL_CTRL+'n', (Fl_Callback *)file_new_cb, 0},
     {"Open...",    FL_CTRL+'o', (Fl_Callback *)file_open_cb, 0},
     {"Merge...",   FL_CTRL+'m', (Fl_Callback *)file_merge_cb, 0, FL_MENU_DIVIDER},
-    {"Rename...",  FL_CTRL+'r', (Fl_Callback *)file_rename_cb, 0, FL_MENU_DIVIDER},
+    {"Rename...",  FL_CTRL+'r', (Fl_Callback *)file_rename_cb, 0},
     {"Save As...", FL_CTRL+'s', (Fl_Callback *)file_save_as_cb, 0},
     {"Save Mesh",  FL_CTRL+FL_SHIFT+'s', (Fl_Callback *)mesh_save_cb, 0},
     {0},
@@ -448,6 +448,7 @@ int GUI::global_shortcuts(int event)
 
   if(Fl::test_shortcut(FL_SHIFT + FL_Escape) ||
      Fl::test_shortcut(FL_CTRL + FL_Escape) ||
+     Fl::test_shortcut(FL_META + FL_Escape) ||
      Fl::test_shortcut(FL_ALT + FL_Escape)) {
     return 1;
   }
@@ -472,7 +473,7 @@ int GUI::global_shortcuts(int event)
     mod_mesh_cb(0, 0);
     return 1;
   }
-  else if(Fl::test_shortcut(FL_CTRL + 'q')){
+  else if(Fl::test_shortcut(FL_CTRL + 'q') || Fl::test_shortcut(FL_META + 'q')){
     // only necessary when using the system menu bar, but hey, it
     // cannot hurt...
     file_quit_cb(0, 0);
@@ -514,7 +515,7 @@ int GUI::global_shortcuts(int event)
     quit_selection = 1;
     return 0;   // trick: do as if we didn't use it
   }
-  else if(Fl::test_shortcut(FL_CTRL + 'a')) { 
+  else if(Fl::test_shortcut(FL_CTRL + 'a') || Fl::test_shortcut(FL_META + 'a')) { 
     // raise all open windows (graphics first, then options, then menu)
     if(g_window && g_window->shown()) g_window->show();
     if(opt_window && opt_window->shown()) opt_window->show();
diff --git a/doc/VERSIONS b/doc/VERSIONS
index e1e788757b..d016106d76 100644
--- a/doc/VERSIONS
+++ b/doc/VERSIONS
@@ -1,12 +1,13 @@
-$Id: VERSIONS,v 1.291 2004-12-30 05:45:24 geuzaine Exp $
+$Id: VERSIONS,v 1.292 2004-12-30 23:10:40 geuzaine Exp $
 
 New in 1.58: new File->Rename menu; new colormaps+improved colormap
 handling; new color+min/max options in views; new GetValue() function
 to ask for values interactively in scripts; generalized For/EndFor
 loops in parser; new plugins (Annotate, Remove, Probe); new text
 attributes in views; renamed some shortcuts; fixed TeX output for
-large scenes; fixed many small memory leaks in parser; various other
-small enhancements and bug fixes.
+large scenes; new option dialogs for various output formats; fixed
+many small memory leaks in parser; various other small enhancements
+and bug fixes.
 
 New in 1.57: generalized displacement maps to display arbitrary view
 types; the arrows representing a vector field can now also be colored
-- 
GitLab