Skip to content

Commit

Permalink
Added more informational messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
raspopov committed May 17, 2021
1 parent f3e961e commit 3ee860c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions SearchManager/SearchManager.rc
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ END
STRINGTABLE
BEGIN
IDS_REGISTRY_ERROR "Registry key error: "
IDS_SAVING_ALL "Saving changes to the indexer database..."
END

#endif // Neutral (Default) resources
Expand Down
15 changes: 12 additions & 3 deletions SearchManager/SearchManagerDlgOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ void CSearchManagerDlg::AddRoot(const CString& sURL)
hr = root.AddTo( m_pScope );
if ( SUCCEEDED( hr ) )
{
const static CString saving_all = LoadString( IDS_SAVING_ALL );
SetStatus( saving_all );

const HRESULT hr_save = m_pScope->SaveAll();
if ( hr == S_OK || FAILED( hr_save ) )
{
Expand Down Expand Up @@ -114,6 +117,9 @@ void CSearchManagerDlg::AddRule(BOOL bInclude, BOOL bDefault, const CString& sUR
hr = rule.AddTo( m_pScope );
if ( SUCCEEDED( hr ) )
{
const static CString saving_all = LoadString( IDS_SAVING_ALL );
SetStatus( saving_all );

const HRESULT hr_save = m_pScope->SaveAll();
if ( hr == S_OK || FAILED( hr_save ) )
{
Expand Down Expand Up @@ -223,6 +229,9 @@ void CSearchManagerDlg::Delete()

if ( deleted )
{
const static CString saving_all = LoadString( IDS_SAVING_ALL );
SetStatus( saving_all );

m_pScope->SaveAll();

m_bRefresh = true;
Expand Down Expand Up @@ -291,9 +300,6 @@ void CSearchManagerDlg::Delete()
if ( bWasStarted )
{
StartWindowsSearch();

// Update catalog
Default( false );
}
}
}
Expand Down Expand Up @@ -535,6 +541,9 @@ void CSearchManagerDlg::Default(bool bInteractive)
hr = pScope->RevertToDefaultScopes();
if ( SUCCEEDED( hr ) )
{
const static CString saving_all = LoadString( IDS_SAVING_ALL );
SetStatus( saving_all );

const HRESULT hr_save = pScope->SaveAll();
if ( hr == S_OK || FAILED( hr_save ) )
{
Expand Down
1 change: 1 addition & 0 deletions SearchManager/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
#define IDS_CONFIRM_VOLUME 190
#define IDS_NONELEVATED 191
#define IDS_REGISTRY_ERROR 192
#define IDS_SAVING_ALL 193
#define IDC_STATUS 1000
#define IDC_NAME 1001
#define IDC_LAST_INDEXED 1003
Expand Down

0 comments on commit 3ee860c

Please sign in to comment.