Ticket #5889: FindItem.patch

File FindItem.patch, 1.1 KB (added by mt, 14 years ago)

Replace some FindItem() parameter from translated names to command.

  • VolumeWindow.cpp

     
    8585        }
    8686    }
    8787
    88     BMenuItem* item = fMenuBar->FindItem(B_TRANSLATE("Unmount"));
     88    BMenuItem* item = fMenuBar->FindItem(kUnmountVolume);
    8989    if (item)
    9090        item->SetEnabled(ejectableVolumeSelected);
    9191}
  • ContainerWindow.cpp

     
    21952195    bool poseViewIsQuery = TargetModel()->IsQuery();
    21962196        // if the view is a query pose view, add edit query menu item
    21972197
    2198     BMenuItem* item = menu->FindItem(B_TRANSLATE("Edit query"));
     2198    BMenuItem* item = menu->FindItem(kEditQuery);
    21992199    if (!poseViewIsQuery && !queryInSelection && item)
    22002200        item->Menu()->RemoveItem(item);
    22012201
     
    30243024
    30253025    if (context == kMenuBarContext || context == kWindowPopUpContext) {
    30263026        BMenu* sizeMenu = NULL;
    3027         if (BMenuItem* item = menu->FindItem(B_TRANSLATE("Icon view"))) {
     3027        if (BMenuItem* item = menu->FindItem(kIconMode)) {
    30283028            sizeMenu = item->Submenu();
    30293029        }
    30303030