mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-11 17:37:22 +10:00
Display "Searching..." progress always
Commit be8568c that introduced option to disable "See more results" also
changed behavior of "Searching..." item that indicates search in progress.
We will now make sure that the search progress indicator is displayed
always. No matter of options.
This commit is contained in:
@@ -335,7 +335,6 @@ bool CMenuContainer::s_bDragMovable;
|
|||||||
bool CMenuContainer::s_bRightDrag;
|
bool CMenuContainer::s_bRightDrag;
|
||||||
bool CMenuContainer::s_bLockWorkArea;
|
bool CMenuContainer::s_bLockWorkArea;
|
||||||
bool CMenuContainer::s_bPendingSearchEnter;
|
bool CMenuContainer::s_bPendingSearchEnter;
|
||||||
bool CMenuContainer::s_bMoreResults;
|
|
||||||
std::vector<CMenuContainer*> CMenuContainer::s_Menus;
|
std::vector<CMenuContainer*> CMenuContainer::s_Menus;
|
||||||
volatile HWND CMenuContainer::s_FirstMenu, CMenuContainer::s_SearchMenu;
|
volatile HWND CMenuContainer::s_FirstMenu, CMenuContainer::s_SearchMenu;
|
||||||
CSearchManager::SearchResults CMenuContainer::s_SearchResults;
|
CSearchManager::SearchResults CMenuContainer::s_SearchResults;
|
||||||
@@ -2770,7 +2769,7 @@ bool CMenuContainer::InitSearchItems( void )
|
|||||||
// total height minus the search box and the "more results"/"search internet", if present
|
// total height minus the search box and the "more results"/"search internet", if present
|
||||||
maxHeight=m_Items[m_SearchIndex].itemRect.top-s_Skin.Main_search_padding.top-s_Skin.Search_padding.top;
|
maxHeight=m_Items[m_SearchIndex].itemRect.top-s_Skin.Main_search_padding.top-s_Skin.Search_padding.top;
|
||||||
maxHeight-=itemHeight*(m_SearchItemCount-1);
|
maxHeight-=itemHeight*(m_SearchItemCount-1);
|
||||||
if (!s_bMoreResults || (!s_SearchResults.bSearching && !HasMoreResults()))
|
if (!s_SearchResults.bSearching && !HasMoreResults())
|
||||||
maxHeight+=itemHeight;
|
maxHeight+=itemHeight;
|
||||||
}
|
}
|
||||||
if (bAutoComlpete)
|
if (bAutoComlpete)
|
||||||
@@ -2963,28 +2962,25 @@ bool CMenuContainer::InitSearchItems( void )
|
|||||||
if (s_bWin7Style)
|
if (s_bWin7Style)
|
||||||
{
|
{
|
||||||
UpdateAccelerators(m_OriginalCount,(int)m_Items.size());
|
UpdateAccelerators(m_OriginalCount,(int)m_Items.size());
|
||||||
if (s_bMoreResults)
|
MenuItem &item=m_Items[m_SearchIndex-m_SearchItemCount+1];
|
||||||
|
if (s_SearchResults.bSearching)
|
||||||
{
|
{
|
||||||
MenuItem &item=m_Items[m_SearchIndex-m_SearchItemCount+1];
|
item.id=MENU_SEARCH_EMPTY;
|
||||||
if (s_SearchResults.bSearching)
|
item.name=FindTranslation(L"Menu.Searching",L"Searching...");
|
||||||
{
|
item.pItemInfo=g_ItemManager.GetCustomIcon(L"imageres.dll,8",CItemManager::ICON_SIZE_TYPE_SMALL);
|
||||||
item.id=MENU_SEARCH_EMPTY;
|
}
|
||||||
item.name=FindTranslation(L"Menu.Searching",L"Searching...");
|
else
|
||||||
item.pItemInfo=g_ItemManager.GetCustomIcon(L"imageres.dll,8",CItemManager::ICON_SIZE_TYPE_SMALL);
|
{
|
||||||
}
|
item.id=MENU_MORE_RESULTS;
|
||||||
else
|
item.name=FindTranslation(L"Menu.MoreResults",L"See more results");
|
||||||
{
|
item.pItemInfo=g_ItemManager.GetCustomIcon(L"imageres.dll,177",CItemManager::ICON_SIZE_TYPE_SMALL);
|
||||||
item.id=MENU_MORE_RESULTS;
|
|
||||||
item.name=FindTranslation(L"Menu.MoreResults",L"See more results");
|
|
||||||
item.pItemInfo=g_ItemManager.GetCustomIcon(L"imageres.dll,177",CItemManager::ICON_SIZE_TYPE_SMALL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_ScrollCount=(int)m_Items.size();
|
m_ScrollCount=(int)m_Items.size();
|
||||||
bool bInternet=GetSettingBool(L"SearchInternet");
|
bool bInternet=GetSettingBool(L"SearchInternet");
|
||||||
if (s_bMoreResults && s_SearchResults.bSearching)
|
if (s_SearchResults.bSearching)
|
||||||
{
|
{
|
||||||
MenuItem item(MENU_SEARCH_EMPTY);
|
MenuItem item(MENU_SEARCH_EMPTY);
|
||||||
item.name=FindTranslation(L"Menu.Searching",L"Searching...");
|
item.name=FindTranslation(L"Menu.Searching",L"Searching...");
|
||||||
@@ -2999,7 +2995,7 @@ bool CMenuContainer::InitSearchItems( void )
|
|||||||
item.name=FindTranslation(L"Menu.NoMatch",L"No items match your search.");
|
item.name=FindTranslation(L"Menu.NoMatch",L"No items match your search.");
|
||||||
m_Items.push_back(item);
|
m_Items.push_back(item);
|
||||||
}
|
}
|
||||||
if (s_bMoreResults && HasMoreResults())
|
if (HasMoreResults())
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
MenuItem item(MENU_SEPARATOR);
|
MenuItem item(MENU_SEPARATOR);
|
||||||
@@ -5087,7 +5083,7 @@ void CMenuContainer::UpdateSearchResults( bool bForceShowAll )
|
|||||||
g_SearchManager.BeginSearch(s_SearchResults.currentString);
|
g_SearchManager.BeginSearch(s_SearchResults.currentString);
|
||||||
s_SearchResults.bSearching=true;
|
s_SearchResults.bSearching=true;
|
||||||
s_bPendingSearchEnter=false;
|
s_bPendingSearchEnter=false;
|
||||||
if (s_bWin7Style && s_bMoreResults)
|
if (s_bWin7Style)
|
||||||
{
|
{
|
||||||
MenuItem &item=m_Items[m_SearchIndex-m_SearchItemCount+1];
|
MenuItem &item=m_Items[m_SearchIndex-m_SearchItemCount+1];
|
||||||
item.id=MENU_SEARCH_EMPTY;
|
item.id=MENU_SEARCH_EMPTY;
|
||||||
@@ -7437,7 +7433,7 @@ static void CreateStartScreenFile( const wchar_t *fname )
|
|||||||
bool CMenuContainer::HasMoreResults( void )
|
bool CMenuContainer::HasMoreResults( void )
|
||||||
{
|
{
|
||||||
if (s_HasMoreResults==-1)
|
if (s_HasMoreResults==-1)
|
||||||
s_HasMoreResults=(GetSettingBool(L"SearchFiles") && HasSearchService())?1:0;
|
s_HasMoreResults=(GetSettingBool(L"MoreResults") && GetSettingBool(L"SearchFiles") && HasSearchService())?1:0;
|
||||||
return s_HasMoreResults!=0;
|
return s_HasMoreResults!=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7713,7 +7709,6 @@ HWND CMenuContainer::ToggleStartMenu( int taskbarId, bool bKeyboard, bool bAllPr
|
|||||||
s_bDisableHover=false;
|
s_bDisableHover=false;
|
||||||
s_bDragClosed=false;
|
s_bDragClosed=false;
|
||||||
s_bPendingSearchEnter=false;
|
s_bPendingSearchEnter=false;
|
||||||
s_bMoreResults=GetSettingBool(L"MoreResults");
|
|
||||||
InitTouchHelper();
|
InitTouchHelper();
|
||||||
|
|
||||||
bool bRemote=GetSystemMetrics(SM_REMOTESESSION)!=0;
|
bool bRemote=GetSystemMetrics(SM_REMOTESESSION)!=0;
|
||||||
|
|||||||
@@ -896,7 +896,6 @@ private:
|
|||||||
static bool s_bRightDrag; // dragging with the right mouse button
|
static bool s_bRightDrag; // dragging with the right mouse button
|
||||||
static bool s_bLockWorkArea; // changes to the work area are ignored
|
static bool s_bLockWorkArea; // changes to the work area are ignored
|
||||||
static bool s_bPendingSearchEnter; // Enter was pressed before the search results were ready
|
static bool s_bPendingSearchEnter; // Enter was pressed before the search results were ready
|
||||||
static bool s_bMoreResults; // shows the "Show More Results" item at the bottom of searches
|
|
||||||
static RECT s_MenuLimits; // area of the main monitor accessible to all menus
|
static RECT s_MenuLimits; // area of the main monitor accessible to all menus
|
||||||
static RECT s_MainMenuLimits; // area of the main monitor accessible by the main menu
|
static RECT s_MainMenuLimits; // area of the main monitor accessible by the main menu
|
||||||
static DWORD s_TaskbarState; // the state of the taskbar (ABS_AUTOHIDE and ABS_ALWAYSONTOP)
|
static DWORD s_TaskbarState; // the state of the taskbar (ABS_AUTOHIDE and ABS_ALWAYSONTOP)
|
||||||
|
|||||||
Reference in New Issue
Block a user