Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

void wxKeyBinder::UpdateAllCmd ( wxMenuBar *  pMnuBar  )  [inherited]

Updates all the commands contained.

Updates all the commands on the menu

Definition at line 1079 of file keybinder.cpp.

References wxKeyBinder::m_arrHandlers.

                                                  {     //v0.4.17
// ----------------------------------------------------------------------------
      //! Updates all the commands on the menu
    if (m_arrHandlers.GetCount() == 0)
        return;         // we are not attached to any window... we can skip
                    // this update...

    //pecan 2006/4/23
    // This code used to update the menus using the keybinder array as the source
    // But that missed duplicate menu items, and plugin added items.
    // so.. we update using the menus as the source and the array as a database

    //for (int i=0; i < (int)m_arrCmd.GetCount(); i++)
    //      m_arrCmd.Item(i)->Update();

    //pecan 2006/4/22
    // Menu items used to be updated by referencing the keybinder array info as source.
    // But this missed duplicate menu items, updating only the first duplicate.
    // So.. search, referencing the menu items as source

   //menu bar item count (level 1)
    size_t nLevel1Knt = pMenuBar->GetMenuCount();
    for (size_t i=0; i < nLevel1Knt ;i++ )
        wxMenu* pMenu = pMenuBar->GetMenu(i);

Generated by  Doxygen 1.6.0   Back to index