]> git.saurik.com Git - wxWidgets.git/commitdiff
Define Ctrl+Q accelerator on PocketPC for quitting the application, as
authorJulian Smart <julian@anthemion.co.uk>
Mon, 14 Mar 2005 14:50:18 +0000 (14:50 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 14 Mar 2005 14:50:18 +0000 (14:50 +0000)
per guidelines

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/frame.cpp

index 4d0045e87871b8e9450edd0c2aefc6276e1935b3..1ec081f3f4dd1b0f4eb0f46d3624d07973dea59b 100644 (file)
@@ -193,10 +193,19 @@ bool wxFrame::Create(wxWindow *parent,
 
     SetOwnBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
 
-#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
+#if defined(__SMARTPHONE__)
     SetLeftMenu(wxID_EXIT, _("Done"));
 #endif
 
+#if defined(__POCKETPC__)
+    // The guidelines state that Ctrl+Q should quit the app.
+    // Let's define an accelerator table to send wxID_EXIT.
+    wxAcceleratorEntry entries[1];
+    entries[0].Set(wxACCEL_CTRL,   'Q',         wxID_EXIT);
+    wxAcceleratorTable accel(1, entries);
+    SetAcceleratorTable(accel);
+#endif
+
     return true;
 }