Patch #3108 2010-12-29 11:04

danselmi

Searching for Menuentries with accelerators
Download
3108-Searching_for.patch (3.2 KB)
Category
Plugin::Refinement
Status
Accepted
Close date
2011-02-03 20:07
Assigned to
mortenmacfly
Index: abbreviations/abbreviations.cpp
===================================================================
--- abbreviations/abbreviations.cpp    (revision 6906)
+++ abbreviations/abbreviations.cpp    (working copy)
@@ -127,7 +127,7 @@
     // if not attached, exit
     if (!IsAttached()) return;

-    int editmenuPos = menuBar->FindMenu(_T("Edit"));
+    int editmenuPos = menuBar->FindMenu(_("&Edit"));
     if (editmenuPos == wxNOT_FOUND) return;
     wxMenu* editMenu = menuBar->GetMenu(editmenuPos);

Index: contrib/codesnippets/codesnippets.cpp
===================================================================
--- contrib/codesnippets/codesnippets.cpp    (revision 6906)
+++ contrib/codesnippets/codesnippets.cpp    (working copy)
@@ -340,7 +340,7 @@
     GetConfig()->m_pMenuBar = menuBar;
     bool isSet = false;

-    int idx = menuBar->FindMenu(_("View"));
+    int idx = menuBar->FindMenu(_("&View"));
     if (idx != wxNOT_FOUND) do
     {
         wxMenu* viewMenu = menuBar->GetMenu(idx);
@@ -1678,9 +1678,9 @@
 {
     //Find "Open files list" menu item.
     wxFrame* pFrame = Manager::Get()->GetAppFrame();
-    int idMenuOpenFilesList = ::wxFindMenuItemId( pFrame, wxT("View"), wxT("Open files list"));
+    int idMenuOpenFilesList = ::wxFindMenuItemId( pFrame, _("&View"), _("Open files list"));
     #if defined(__WXGTK__)
-      idMenuOpenFilesList = ::wxFindMenuItemId( pFrame, wxT("View"), wxT("_Open files list"));
+      idMenuOpenFilesList = ::wxFindMenuItemId( pFrame, _("&View"), _("_Open files list"));
     #endif
     int idWindowOpenFilesList = 0;
     if (idMenuOpenFilesList != wxNOT_FOUND)
Index: contrib/codesnippets/Search/ThreadSearch.cpp
===================================================================
--- contrib/codesnippets/Search/ThreadSearch.cpp    (revision 6906)
+++ contrib/codesnippets/Search/ThreadSearch.cpp    (working copy)
@@ -370,7 +370,7 @@
     //Append any items you need in the menu...
     //NOTE: Be careful in here... The application's menubar is at your disposal.
     size_t i;
-    int idx = menuBar->FindMenu(wxT("View"));
+    int idx = menuBar->FindMenu(_("&View"));
     if (idx != wxNOT_FOUND)
     {
         wxMenu* menu = menuBar->GetMenu(idx);
@@ -399,7 +399,7 @@
         }
     }

-    idx = menuBar->FindMenu(wxT("Search"));
+    idx = menuBar->FindMenu(_("Sea&rch"));
     if (idx != wxNOT_FOUND)
     {
         wxMenu* menu = menuBar->GetMenu(idx);
@@ -433,7 +433,7 @@
 {
     // Removes 'Thread search' item from View and Search menu
     wxMenuBar* menuBar = Manager::Get()->GetAppFrame()->GetMenuBar();
-    int idx = menuBar->FindMenu(wxT("View"));
+    int idx = menuBar->FindMenu(_("&View"));
     if (idx != wxNOT_FOUND)
     {
         wxMenu* viewMenu = menuBar->GetMenu(idx);
@@ -443,7 +443,7 @@
         }
     }

-    idx = menuBar->FindMenu(wxT("Search"));
+    idx = menuBar->FindMenu(_("Sea&rch"));
     if (idx != wxNOT_FOUND)
     {
         wxMenu* searchMenu = menuBar->GetMenu(idx);
Index: contrib/source_exporter/exporter.cpp
===================================================================
--- contrib/source_exporter/exporter.cpp    (revision 6906)
+++ contrib/source_exporter/exporter.cpp    (working copy)
@@ -75,7 +75,7 @@
 void Exporter::BuildMenu(wxMenuBar *menuBar)
 {
   // find "File" menu position
-  int fileMenuPos = menuBar->FindMenu(_("File"));
+  int fileMenuPos = menuBar->FindMenu(_("&File"));

   if (fileMenuPos == -1)
   {