@@ -335,6 +335,7 @@ bool CMenuContainer::s_bDragMovable;
335
335
bool CMenuContainer::s_bRightDrag;
336
336
bool CMenuContainer::s_bLockWorkArea;
337
337
bool CMenuContainer::s_bPendingSearchEnter;
338
+ bool CMenuContainer::s_bMoreResults;
338
339
std::vector<CMenuContainer*> CMenuContainer::s_Menus;
339
340
volatile HWND CMenuContainer::s_FirstMenu, CMenuContainer::s_SearchMenu;
340
341
CSearchManager::SearchResults CMenuContainer::s_SearchResults;
@@ -2745,9 +2746,9 @@ bool CMenuContainer::InitSearchItems( void )
2745
2746
{
2746
2747
sepHeight=s_Skin.ItemSettings [s_Skin.More_bitmap_Size .cx ?MenuSkin::LIST_SEPARATOR_SPLIT:MenuSkin::LIST_SEPARATOR].itemHeight ;
2747
2748
itemHeight=s_Skin.ItemSettings [MenuSkin::LIST_ITEM].itemHeight ;
2748
- // total height minus the search box and the "more results"/"search internet"
2749
+ // total height minus the search box and the "more results"/"search internet", if present
2749
2750
maxHeight=m_Items[m_SearchIndex].itemRect .top -s_Skin.Main_search_padding .top -s_Skin.Search_padding .top ;
2750
- maxHeight-=itemHeight*(m_SearchItemCount-1 );
2751
+ maxHeight-=itemHeight*(m_SearchItemCount-(s_bMoreResults? 1 : 2 ) );
2751
2752
if (!s_SearchResults.bSearching && !HasMoreResults ())
2752
2753
maxHeight+=itemHeight;
2753
2754
}
@@ -2941,25 +2942,28 @@ bool CMenuContainer::InitSearchItems( void )
2941
2942
if (s_bWin7Style)
2942
2943
{
2943
2944
UpdateAccelerators (m_OriginalCount,(int )m_Items.size ());
2944
- MenuItem &item=m_Items[m_SearchIndex-m_SearchItemCount+1 ];
2945
- if (s_SearchResults.bSearching )
2945
+ if (s_bMoreResults)
2946
2946
{
2947
- item.id =MENU_SEARCH_EMPTY;
2948
- item.name =FindTranslation (L" Menu.Searching" ,L" Searching..." );
2949
- item.pItemInfo =g_ItemManager.GetCustomIcon (L" imageres.dll,8" ,CItemManager::ICON_SIZE_TYPE_SMALL);
2950
- }
2951
- else
2952
- {
2953
- item.id =MENU_MORE_RESULTS;
2954
- item.name =FindTranslation (L" Menu.MoreResults" ,L" See more results" );
2955
- item.pItemInfo =g_ItemManager.GetCustomIcon (L" imageres.dll,177" ,CItemManager::ICON_SIZE_TYPE_SMALL);
2947
+ MenuItem &item=m_Items[m_SearchIndex-m_SearchItemCount+1 ];
2948
+ if (s_SearchResults.bSearching )
2949
+ {
2950
+ item.id =MENU_SEARCH_EMPTY;
2951
+ item.name =FindTranslation (L" Menu.Searching" ,L" Searching..." );
2952
+ item.pItemInfo =g_ItemManager.GetCustomIcon (L" imageres.dll,8" ,CItemManager::ICON_SIZE_TYPE_SMALL);
2953
+ }
2954
+ else
2955
+ {
2956
+ item.id =MENU_MORE_RESULTS;
2957
+ item.name =FindTranslation (L" Menu.MoreResults" ,L" See more results" );
2958
+ item.pItemInfo =g_ItemManager.GetCustomIcon (L" imageres.dll,177" ,CItemManager::ICON_SIZE_TYPE_SMALL);
2959
+ }
2956
2960
}
2957
2961
}
2958
2962
else
2959
2963
{
2960
2964
m_ScrollCount=(int )m_Items.size ();
2961
- bool bInternet=GetSettingBool (L" SearchInternet" );
2962
- if (s_SearchResults.bSearching )
2965
+ bool bInternet=GetSettingBool (L" SearchInternet" );
2966
+ if (s_bMoreResults && s_SearchResults.bSearching )
2963
2967
{
2964
2968
MenuItem item (MENU_SEARCH_EMPTY);
2965
2969
item.name =FindTranslation (L" Menu.Searching" ,L" Searching..." );
@@ -2974,7 +2978,7 @@ bool CMenuContainer::InitSearchItems( void )
2974
2978
item.name =FindTranslation (L" Menu.NoMatch" ,L" No items match your search." );
2975
2979
m_Items.push_back (item);
2976
2980
}
2977
- if (HasMoreResults ())
2981
+ if (s_bMoreResults && HasMoreResults ())
2978
2982
{
2979
2983
{
2980
2984
MenuItem item (MENU_SEPARATOR);
@@ -5062,7 +5066,7 @@ void CMenuContainer::UpdateSearchResults( bool bForceShowAll )
5062
5066
g_SearchManager.BeginSearch (s_SearchResults.currentString );
5063
5067
s_SearchResults.bSearching =true ;
5064
5068
s_bPendingSearchEnter=false ;
5065
- if (s_bWin7Style)
5069
+ if (s_bWin7Style && s_bMoreResults )
5066
5070
{
5067
5071
MenuItem &item=m_Items[m_SearchIndex-m_SearchItemCount+1 ];
5068
5072
item.id =MENU_SEARCH_EMPTY;
@@ -7694,6 +7698,7 @@ HWND CMenuContainer::ToggleStartMenu( int taskbarId, bool bKeyboard, bool bAllPr
7694
7698
s_bDisableHover=false ;
7695
7699
s_bDragClosed=false ;
7696
7700
s_bPendingSearchEnter=false ;
7701
+ s_bMoreResults=GetSettingBool (L" MoreResults" );
7697
7702
InitTouchHelper ();
7698
7703
7699
7704
bool bRemote=GetSystemMetrics (SM_REMOTESESSION)!=0 ;
0 commit comments