static bool menu_initialize(control *c, bool pop) { menu_pop_global = pop; menu_num_global = 0; #ifdef COMMON_MENU return pop || menu_exists(c); #else if (BBVERSION_LEAN == BBVersion) return pop || menu_exists(c); if (pop && BBVERSION_09X == BBVersion && last_menu_global) DelMenu(last_menu_global), last_menu_global = NULL; return pop; #endif }
inline STDMETHODIMP query_context_menu(void *p, HMENU menu, UINT index, UINT first_command, UINT last_command, UINT flags) { struct git_menu *this_menu = p; struct git_data *this_ = this_menu->git_data; struct windows_menu_data windows_menu = { menu, index, first_command, last_command }; if (flags & CMF_DEFAULTONLY) return MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, 0); if (menu_exists(menu)) return MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, 0); build_cheetah_menu(this_, &windows_menu); return MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, next_active_item); }