@@ -335,7 +335,6 @@ bool CMenuContainer::s_bDragMovable;
335335bool CMenuContainer::s_bRightDrag;
336336bool CMenuContainer::s_bLockWorkArea;
337337bool CMenuContainer::s_bPendingSearchEnter;
338- bool CMenuContainer::s_bMoreResults;
339338std::vector<CMenuContainer*> CMenuContainer::s_Menus;
340339volatile HWND CMenuContainer::s_FirstMenu, CMenuContainer::s_SearchMenu;
341340CSearchManager::SearchResults CMenuContainer::s_SearchResults;
@@ -2769,7 +2768,7 @@ bool CMenuContainer::InitSearchItems( void )
27692768 itemHeight=s_Skin.ItemSettings [MenuSkin::LIST_ITEM ].itemHeight ;
27702769 // total height minus the search box and the "more results"/"search internet", if present
27712770 maxHeight=m_Items[m_SearchIndex].itemRect .top -s_Skin.Main_search_padding .top -s_Skin.Search_padding .top ;
2772- maxHeight-=itemHeight*(m_SearchItemCount-(s_bMoreResults? 1 : 2 ) );
2771+ maxHeight-=itemHeight*(m_SearchItemCount-1 );
27732772 if (!s_SearchResults.bSearching && !HasMoreResults ())
27742773 maxHeight+=itemHeight;
27752774 }
@@ -2963,28 +2962,25 @@ bool CMenuContainer::InitSearchItems( void )
29632962 if (s_bWin7Style)
29642963 {
29652964 UpdateAccelerators (m_OriginalCount,(int )m_Items.size ());
2966- if (s_bMoreResults)
2965+ MenuItem &item=m_Items[m_SearchIndex-m_SearchItemCount+1 ];
2966+ if (s_SearchResults.bSearching )
29672967 {
2968- MenuItem &item=m_Items[m_SearchIndex-m_SearchItemCount+1 ];
2969- if (s_SearchResults.bSearching )
2970- {
2971- item.id =MENU_SEARCH_EMPTY ;
2972- item.name =FindTranslation (L" Menu.Searching" ,L" Searching..." );
2973- item.pItemInfo =g_ItemManager.GetCustomIcon (L" imageres.dll,8" ,CItemManager::ICON_SIZE_TYPE_SMALL );
2974- }
2975- else
2976- {
2977- item.id =MENU_MORE_RESULTS ;
2978- item.name =FindTranslation (L" Menu.MoreResults" ,L" See more results" );
2979- item.pItemInfo =g_ItemManager.GetCustomIcon (L" imageres.dll,177" ,CItemManager::ICON_SIZE_TYPE_SMALL );
2980- }
2968+ item.id =MENU_SEARCH_EMPTY ;
2969+ item.name =FindTranslation (L" Menu.Searching" ,L" Searching..." );
2970+ item.pItemInfo =g_ItemManager.GetCustomIcon (L" imageres.dll,8" ,CItemManager::ICON_SIZE_TYPE_SMALL );
2971+ }
2972+ else
2973+ {
2974+ item.id =MENU_MORE_RESULTS ;
2975+ item.name =FindTranslation (L" Menu.MoreResults" ,L" See more results" );
2976+ item.pItemInfo =g_ItemManager.GetCustomIcon (L" imageres.dll,177" ,CItemManager::ICON_SIZE_TYPE_SMALL );
29812977 }
29822978 }
29832979 else
29842980 {
29852981 m_ScrollCount=(int )m_Items.size ();
2986- bool bInternet=GetSettingBool (L" SearchInternet" );
2987- if (s_bMoreResults && s_SearchResults.bSearching )
2982+ bool bInternet=GetSettingBool (L" SearchInternet" );
2983+ if (s_SearchResults.bSearching )
29882984 {
29892985 MenuItem item (MENU_SEARCH_EMPTY );
29902986 item.name =FindTranslation (L" Menu.Searching" ,L" Searching..." );
@@ -2999,7 +2995,7 @@ bool CMenuContainer::InitSearchItems( void )
29992995 item.name =FindTranslation (L" Menu.NoMatch" ,L" No items match your search." );
30002996 m_Items.push_back (item);
30012997 }
3002- if (s_bMoreResults && HasMoreResults ())
2998+ if (HasMoreResults ())
30032999 {
30043000 {
30053001 MenuItem item (MENU_SEPARATOR );
@@ -5087,7 +5083,7 @@ void CMenuContainer::UpdateSearchResults( bool bForceShowAll )
50875083 g_SearchManager.BeginSearch (s_SearchResults.currentString );
50885084 s_SearchResults.bSearching =true ;
50895085 s_bPendingSearchEnter=false ;
5090- if (s_bWin7Style && s_bMoreResults )
5086+ if (s_bWin7Style)
50915087 {
50925088 MenuItem &item=m_Items[m_SearchIndex-m_SearchItemCount+1 ];
50935089 item.id =MENU_SEARCH_EMPTY ;
@@ -7437,7 +7433,7 @@ static void CreateStartScreenFile( const wchar_t *fname )
74377433bool CMenuContainer::HasMoreResults ( void )
74387434{
74397435 if (s_HasMoreResults==-1 )
7440- s_HasMoreResults=(GetSettingBool (L" SearchFiles" ) && HasSearchService ())?1 :0 ;
7436+ s_HasMoreResults=(GetSettingBool (L" MoreResults " ) && GetSettingBool ( L" SearchFiles" ) && HasSearchService ())?1 :0 ;
74417437 return s_HasMoreResults!=0 ;
74427438}
74437439
@@ -7509,31 +7505,6 @@ RECT CMenuContainer::CalculateWorkArea( const RECT &taskbarRect )
75097505 }
75107506 }
75117507
7512- // calculate offsets
7513- int xOff = GetSettingInt (L" HorizontalMenuOffset" );
7514- int yOff = GetSettingInt (L" VerticalMenuOffset" );
7515- if (s_TaskBarEdge == ABE_BOTTOM )
7516- {
7517- if (xOff != 0 )
7518- rc.left += xOff;
7519- if (yOff != 0 )
7520- rc.bottom += yOff;
7521- }
7522- else if (s_TaskBarEdge == ABE_TOP || s_TaskBarEdge == ABE_LEFT )
7523- {
7524- if (xOff != 0 )
7525- rc.left += xOff;
7526- if (yOff != 0 )
7527- rc.top += yOff;
7528- }
7529- else
7530- {
7531- if (xOff != 0 )
7532- rc.right += xOff;
7533- if (yOff != 0 )
7534- rc.top += yOff;
7535- }
7536-
75377508 return rc;
75387509}
75397510
@@ -7560,6 +7531,9 @@ POINT CMenuContainer::CalculateCorner( void )
75607531 else
75617532 corner.y =s_MainMenuLimits.bottom +margin.bottom ;
75627533
7534+ corner.x +=GetSettingInt (L" HorizontalMenuOffset" );
7535+ corner.y +=GetSettingInt (L" VerticalMenuOffset" );
7536+
75637537 return corner;
75647538}
75657539
@@ -7735,7 +7709,6 @@ HWND CMenuContainer::ToggleStartMenu( int taskbarId, bool bKeyboard, bool bAllPr
77357709 s_bDisableHover=false ;
77367710 s_bDragClosed=false ;
77377711 s_bPendingSearchEnter=false ;
7738- s_bMoreResults=GetSettingBool (L" MoreResults" );
77397712 InitTouchHelper ();
77407713
77417714 bool bRemote=GetSystemMetrics (SM_REMOTESESSION )!=0 ;
0 commit comments