Josh Engebretson 10 years ago
parent
commit
a53273125a

+ 26 - 13
Source/AtomicEditor/Source/AEEditorStrings.cpp

@@ -37,25 +37,38 @@ void EditorStrings::InitializeStrings()
 
     stringLookup_[RevealInFinder] = "Reveal in Finder";
 
-    // Shortcuts
-    stringLookup_[ShortcutUndo] = "⌘Z";
+#ifdef ATOMIC_PLATFORM_WINDOWS
+    String shortcutKey = "Ctrl-";
+    stringLookup_[ShortcutRedo] ="Ctrl-Y";
+    stringLookup_[ShortcutFindNext] = "F3";
+    stringLookup_[ShortcutFindPrev] = "Shift-F3";
+    stringLookup_[ShortcutBuildSettings] = "Ctrl-Shift-B";
+#else
+    String shortcutKey = "⌘";
     stringLookup_[ShortcutRedo] ="⇧⌘Z";
-    stringLookup_[ShortcutCut] = "⌘X";
-    stringLookup_[ShortcutCopy] = "⌘C";
-    stringLookup_[ShortcutPaste] = "⌘V";
-    stringLookup_[ShortcutSelectAll] = "⌘A";
-    stringLookup_[ShortcutFind] = "⌘F";
     stringLookup_[ShortcutFindNext] = "⌘G";
     stringLookup_[ShortcutFindPrev] = "⇧⌘G";
-    stringLookup_[ShortcutBeautify] = "⌘I";
+    stringLookup_[ShortcutBuildSettings] = "⇧⌘B";
 
-    stringLookup_[ShortcutSaveFile] = "⌘S";
-    stringLookup_[ShortcutCloseFile] = "⌘W";
+#endif
+    // Shortcuts
+    stringLookup_[ShortcutUndo] = shortcutKey + "Z";
 
-    stringLookup_[ShortcutPlay] = "⌘P";
+    stringLookup_[ShortcutCut] = shortcutKey + "X";
+    stringLookup_[ShortcutCopy] = shortcutKey + "C";
+    stringLookup_[ShortcutPaste] = shortcutKey + "V";
+    stringLookup_[ShortcutSelectAll] = shortcutKey + "A";
+    stringLookup_[ShortcutFind] = shortcutKey + "F";
+
+    stringLookup_[ShortcutBeautify] = shortcutKey + "I";
+
+    stringLookup_[ShortcutSaveFile] = shortcutKey + "S";
+    stringLookup_[ShortcutCloseFile] = shortcutKey + "W";
+
+    stringLookup_[ShortcutPlay] = shortcutKey + "P";
+
+    stringLookup_[ShortcutBuild] = shortcutKey +"B";
 
-    stringLookup_[ShortcutBuild] = "⌘B";
-    stringLookup_[ShortcutBuildSettings] = "⇧⌘B";
 
 
 }

+ 8 - 4
Source/AtomicEditor/Source/UI/UIWelcomeFrame.cpp

@@ -310,11 +310,15 @@ bool WelcomeFrame::OnEvent(const TBWidgetEvent &ev)
                 // we clicked the recent projects list
                 TBSelectList* list = (TBSelectList*) ev.target;
                 int value = list->GetValue();
-                TBGenericStringItemSource* source = list->GetDefaultSource();
-                if (source->GetNumItems())
+
+                if (value >= 0)
                 {
-                    String projectpath = String(source->GetItemString(value));
-                    GetSubsystem<Editor>()->LoadProject(projectpath);
+                    TBGenericStringItemSource* source = list->GetDefaultSource();
+                    if (source->GetNumItems())
+                    {
+                        String projectpath = String(source->GetItemString(value));
+                        GetSubsystem<Editor>()->LoadProject(projectpath);
+                    }
                 }
 
                 return true;