Remove Microsoft Bing from search engines for Search on Internet command

Ref: https://www.reuters.com/technology/microsoft-bing-raises-concerns-over-lack-image-results-tiananmen-tank-man-2021-06-04/

When a search engin does the censorship instead of its job, the search result loses its quality and it's not reliable anymore.
Hence, Microsoft Bing is removed from Notepad++ for "Search on Internet" command.
This commit is contained in:
Don Ho 2021-06-06 16:42:45 +02:00
parent 0e1a4663d9
commit 06657c82b3
4 changed files with 12 additions and 22 deletions

View File

@ -497,7 +497,7 @@ void Notepad_plus::command(int id)
url = TEXT("https://www.google.com/search?q=$(CURRENT_WORD)"); url = TEXT("https://www.google.com/search?q=$(CURRENT_WORD)");
} }
} }
else if (nppGui._searchEngineChoice == nppGui.se_duckDuckGo) else if (nppGui._searchEngineChoice == nppGui.se_duckDuckGo || nppGui._searchEngineChoice == nppGui.se_bing)
{ {
url = TEXT("https://duckduckgo.com/?q=$(CURRENT_WORD)"); url = TEXT("https://duckduckgo.com/?q=$(CURRENT_WORD)");
} }
@ -505,10 +505,6 @@ void Notepad_plus::command(int id)
{ {
url = TEXT("https://www.google.com/search?q=$(CURRENT_WORD)"); url = TEXT("https://www.google.com/search?q=$(CURRENT_WORD)");
} }
else if (nppGui._searchEngineChoice == nppGui.se_bing)
{
url = TEXT("https://www.bing.com/search?q=$(CURRENT_WORD)");
}
else if (nppGui._searchEngineChoice == nppGui.se_yahoo) else if (nppGui._searchEngineChoice == nppGui.se_yahoo)
{ {
url = TEXT("https://search.yahoo.com/search?q=$(CURRENT_WORD)"); url = TEXT("https://search.yahoo.com/search?q=$(CURRENT_WORD)");

View File

@ -432,14 +432,13 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x1 FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN BEGIN
GROUPBOX "Search Engine (for command ""Search on Internet"")",IDC_SEARCHENGINES_GB_STATIC,74,24,297,145,BS_CENTER GROUPBOX "Search Engine (for command ""Search on Internet"")",IDC_SEARCHENGINES_GB_STATIC,74,24,297,145,BS_CENTER
CONTROL "DuckDuckGo",IDC_SEARCHENGINE_DUCKDUCKGO_RADIO,"Button",BS_AUTORADIOBUTTON,105,37,180,10 CONTROL "DuckDuckGo",IDC_SEARCHENGINE_DUCKDUCKGO_RADIO,"Button",BS_AUTORADIOBUTTON,105,43,180,10
CONTROL "Google",IDC_SEARCHENGINE_GOOGLE_RADIO,"Button",BS_AUTORADIOBUTTON,105,52,180,10 CONTROL "Google",IDC_SEARCHENGINE_GOOGLE_RADIO,"Button",BS_AUTORADIOBUTTON,105,58,180,10
CONTROL "Bing",IDC_SEARCHENGINE_BING_RADIO,"Button",BS_AUTORADIOBUTTON,105,67,180,10 CONTROL "Yahoo!",IDC_SEARCHENGINE_YAHOO_RADIO,"Button",BS_AUTORADIOBUTTON,105,73,180,10
CONTROL "Yahoo!",IDC_SEARCHENGINE_YAHOO_RADIO,"Button",BS_AUTORADIOBUTTON,105,82,180,10 CONTROL "Stack Overflow",IDC_SEARCHENGINE_STACKOVERFLOW_RADIO,"Button",BS_AUTORADIOBUTTON,105,88,180,10
CONTROL "Stack Overflow",IDC_SEARCHENGINE_STACKOVERFLOW_RADIO,"Button",BS_AUTORADIOBUTTON,105,97,180,10 CONTROL "Set your search engine here:",IDC_SEARCHENGINE_CUSTOM_RADIO,"Button",BS_AUTORADIOBUTTON,105,103,180,10
CONTROL "Set your search engine here:",IDC_SEARCHENGINE_CUSTOM_RADIO, "Button",BS_AUTORADIOBUTTON,105,112,180,10 EDITTEXT IDC_SEARCHENGINE_EDIT,114,119,179,14,ES_AUTOHSCROLL
EDITTEXT IDC_SEARCHENGINE_EDIT,114,128,179,14,ES_AUTOHSCROLL LTEXT "Example: https://www.google.com/search?q=$(CURRENT_WORD)",IDD_SEARCHENGINE_NOTE_STATIC,114,134,245,20
LTEXT "Example: https://www.google.com/search?q=$(CURRENT_WORD)",IDD_SEARCHENGINE_NOTE_STATIC,114,143,245,20
END END

View File

@ -3688,10 +3688,12 @@ INT_PTR CALLBACK SearchEngineSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
nppGUI._searchEngineChoice = nppGUI.se_google; nppGUI._searchEngineChoice = nppGUI.se_google;
} }
} }
if (nppGUI._searchEngineChoice == nppGUI.se_bing)
nppGUI._searchEngineChoice = nppGUI.se_duckDuckGo;
::SendDlgItemMessage(_hSelf, IDC_SEARCHENGINE_CUSTOM_RADIO, BM_SETCHECK, nppGUI._searchEngineChoice == nppGUI.se_custom ? BST_CHECKED : BST_UNCHECKED, 0); ::SendDlgItemMessage(_hSelf, IDC_SEARCHENGINE_CUSTOM_RADIO, BM_SETCHECK, nppGUI._searchEngineChoice == nppGUI.se_custom ? BST_CHECKED : BST_UNCHECKED, 0);
::SendDlgItemMessage(_hSelf, IDC_SEARCHENGINE_DUCKDUCKGO_RADIO, BM_SETCHECK, nppGUI._searchEngineChoice == nppGUI.se_duckDuckGo ? BST_CHECKED : BST_UNCHECKED, 0); ::SendDlgItemMessage(_hSelf, IDC_SEARCHENGINE_DUCKDUCKGO_RADIO, BM_SETCHECK, nppGUI._searchEngineChoice == nppGUI.se_duckDuckGo ? BST_CHECKED : BST_UNCHECKED, 0);
::SendDlgItemMessage(_hSelf, IDC_SEARCHENGINE_GOOGLE_RADIO, BM_SETCHECK, nppGUI._searchEngineChoice == nppGUI.se_google ? BST_CHECKED : BST_UNCHECKED, 0); ::SendDlgItemMessage(_hSelf, IDC_SEARCHENGINE_GOOGLE_RADIO, BM_SETCHECK, nppGUI._searchEngineChoice == nppGUI.se_google ? BST_CHECKED : BST_UNCHECKED, 0);
::SendDlgItemMessage(_hSelf, IDC_SEARCHENGINE_BING_RADIO, BM_SETCHECK, nppGUI._searchEngineChoice == nppGUI.se_bing ? BST_CHECKED : BST_UNCHECKED, 0);
::SendDlgItemMessage(_hSelf, IDC_SEARCHENGINE_YAHOO_RADIO, BM_SETCHECK, nppGUI._searchEngineChoice == nppGUI.se_yahoo ? BST_CHECKED : BST_UNCHECKED, 0); ::SendDlgItemMessage(_hSelf, IDC_SEARCHENGINE_YAHOO_RADIO, BM_SETCHECK, nppGUI._searchEngineChoice == nppGUI.se_yahoo ? BST_CHECKED : BST_UNCHECKED, 0);
::SendDlgItemMessage(_hSelf, IDC_SEARCHENGINE_STACKOVERFLOW_RADIO, BM_SETCHECK, nppGUI._searchEngineChoice == nppGUI.se_stackoverflow ? BST_CHECKED : BST_UNCHECKED, 0); ::SendDlgItemMessage(_hSelf, IDC_SEARCHENGINE_STACKOVERFLOW_RADIO, BM_SETCHECK, nppGUI._searchEngineChoice == nppGUI.se_stackoverflow ? BST_CHECKED : BST_UNCHECKED, 0);
@ -3718,13 +3720,6 @@ INT_PTR CALLBACK SearchEngineSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
} }
break; break;
case IDC_SEARCHENGINE_BING_RADIO:
{
nppGUI._searchEngineChoice = nppGUI.se_bing;
::EnableWindow(::GetDlgItem(_hSelf, IDC_SEARCHENGINE_EDIT), false);
}
break;
case IDC_SEARCHENGINE_YAHOO_RADIO: case IDC_SEARCHENGINE_YAHOO_RADIO:
{ {
nppGUI._searchEngineChoice = nppGUI.se_yahoo; nppGUI._searchEngineChoice = nppGUI.se_yahoo;

View File

@ -152,7 +152,7 @@
#define IDC_SEARCHENGINES_GB_STATIC (IDD_PREFERENCE_SUB_SEARCHENGINE + 1) #define IDC_SEARCHENGINES_GB_STATIC (IDD_PREFERENCE_SUB_SEARCHENGINE + 1)
#define IDC_SEARCHENGINE_DUCKDUCKGO_RADIO (IDD_PREFERENCE_SUB_SEARCHENGINE + 2) #define IDC_SEARCHENGINE_DUCKDUCKGO_RADIO (IDD_PREFERENCE_SUB_SEARCHENGINE + 2)
#define IDC_SEARCHENGINE_GOOGLE_RADIO (IDD_PREFERENCE_SUB_SEARCHENGINE + 3) #define IDC_SEARCHENGINE_GOOGLE_RADIO (IDD_PREFERENCE_SUB_SEARCHENGINE + 3)
#define IDC_SEARCHENGINE_BING_RADIO (IDD_PREFERENCE_SUB_SEARCHENGINE + 4) //#define IDC_SEARCHENGINE_BING_RADIO (IDD_PREFERENCE_SUB_SEARCHENGINE + 4)
#define IDC_SEARCHENGINE_YAHOO_RADIO (IDD_PREFERENCE_SUB_SEARCHENGINE + 5) #define IDC_SEARCHENGINE_YAHOO_RADIO (IDD_PREFERENCE_SUB_SEARCHENGINE + 5)
#define IDC_SEARCHENGINE_CUSTOM_RADIO (IDD_PREFERENCE_SUB_SEARCHENGINE + 6) #define IDC_SEARCHENGINE_CUSTOM_RADIO (IDD_PREFERENCE_SUB_SEARCHENGINE + 6)
#define IDC_SEARCHENGINE_EDIT (IDD_PREFERENCE_SUB_SEARCHENGINE + 7) #define IDC_SEARCHENGINE_EDIT (IDD_PREFERENCE_SUB_SEARCHENGINE + 7)