Skip to content

Commit

Permalink
IDE-1137 Remove IE based embedded browser
Browse files Browse the repository at this point in the history
Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Mar 20, 2024
1 parent 51ee307 commit a5dc44e
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 50 deletions.
3 changes: 3 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,21 @@
"name": "VS-16-Debug",
"configurePreset": "vcpkg-VS-16",
"configuration": "Debug",
"jobs": 4,
"nativeToolOptions": ["-m"]
},
{
"name": "VS-17-Debug",
"configurePreset": "vcpkg-VS-17",
"configuration": "Debug",
"jobs": 4,
"nativeToolOptions": ["-m"]
},
{
"name": "VS-17-RelWithDebInfo",
"configurePreset": "vcpkg-VS-17",
"configuration": "RelWithDebInfo",
"jobs": 4,
"nativeToolOptions": ["-m"]
}
]
Expand Down
14 changes: 1 addition & 13 deletions eclide/SummaryView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@
CSummaryView::CSummaryView(IResultSlot *resultSlot)
{
m_resultSlot = resultSlot;
m_browserEngine = GetIConfig(QUERYBUILDER_CFG)->Get(GLOBAL_BROWSER_ENGINE);
if (m_browserEngine.Compare(_T("IE")) == 0) {
m_view = CreateIEView();
} else {
m_view = CreateWebView2View();
}
m_view = CreateWebView2View();
}

CSummaryView::~CSummaryView()
Expand Down Expand Up @@ -86,12 +81,6 @@ LRESULT CSummaryView::OnBrowserNew(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hW
return 0;
}

LRESULT CSummaryView::OnBrowserIE(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
m_view->Navigate(m_FramedUrl, true);
return 0;
}

LRESULT CSummaryView::OnBrowserNewEclWatch(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
int pos = m_FramedUrl.Find(_T("?"));
Expand Down Expand Up @@ -181,7 +170,6 @@ bool CSummaryView::UpdateUI(CCmdUI * cui)
if ( m_view->IsLoaded() )
{
UPDATEUI(cui, ID_BROWSER_NEW, true);
UPDATEUI(cui, ID_BROWSER_IE, m_browserEngine.Compare(L"IE") == 0);
UPDATEUI(cui, ID_BROWSER_NEW_ECLWATCH, true);
UPDATEUI(cui, ID_BROWSER_RESET, true);
UPDATEUI(cui, ID_BROWSER_BACK, m_view->BackEnabled());
Expand Down
3 changes: 0 additions & 3 deletions eclide/SummaryView.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class CSummaryView :
CString m_Url;
CString m_FramedUrl;
IHtmlView *m_view;
CString m_browserEngine;

public:
enum {IDD = IDD_SUMMARYVIEW};
Expand All @@ -40,7 +39,6 @@ class CSummaryView :
MESSAGE_HANDLER(WM_FORWARDMSG, OnForwardMsg)
MESSAGE_HANDLER_EX(CWM_REFRESH, OnRefresh)
COMMAND_ID_HANDLER(ID_BROWSER_NEW, OnBrowserNew)
COMMAND_ID_HANDLER(ID_BROWSER_IE, OnBrowserIE)
COMMAND_ID_HANDLER(ID_BROWSER_NEW_ECLWATCH, OnBrowserNewEclWatch)
COMMAND_ID_HANDLER(ID_BROWSER_BACK, OnBrowserBack)
COMMAND_ID_HANDLER(ID_BROWSER_FORWARD, OnBrowserForward)
Expand All @@ -60,7 +58,6 @@ class CSummaryView :
void DoRefresh();
LRESULT OnRefresh(UINT /*uMsg*/, WPARAM /*bCreated*/, LPARAM /*lParam*/);
LRESULT OnBrowserNew(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
LRESULT OnBrowserIE(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
LRESULT OnBrowserNewEclWatch(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
LRESULT OnBrowserBack(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
LRESULT OnBrowserForward(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
Expand Down
1 change: 0 additions & 1 deletion eclide/mainfrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,6 @@ void CMainFrame::InitializeRibbon()
pPanelNavigation->Add(pButtLaunch);
pButtLaunch->AddSubItem(new CMFCRibbonLabel(_T("Launch in external browser")));
pButtLaunch->AddSubItem(new CMFCRibbonButton(ID_BROWSER_NEW, _T("Default browser\nD"), 44));
pButtLaunch->AddSubItem(new CMFCRibbonButton(ID_BROWSER_IE, _T("Internet Explorer\nI"), 44));
pButtLaunch->AddSubItem(new CMFCRibbonSeparator(true));
pButtLaunch->AddSubItem(new CMFCRibbonButton(ID_BROWSER_NEW_ECLWATCH, _T("ECL Watch homepage\nE"), 44));
pPanelNavigation->Add(new CMFCRibbonSeparator());
Expand Down
2 changes: 0 additions & 2 deletions en_us/en_us.rc
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,6 @@ BEGIN
LTEXT "Limit Result (rows):",IDC_STATIC_LIMITRESULT,162,27,62,8
EDITTEXT IDC_EDIT_LIMITRESULT,228,24,40,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SPIN_LIMITRESULT,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,268,24,11,14
LTEXT "&Browser Engine:",IDC_STATIC_BROWSERENGINE,10,45,117,10
COMBOBOX IDC_COMBO_BROWSERENGINE,71,42,208,14,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
END

IDD_PREF_OTHER DIALOGEX 0, 0, 290, 157
Expand Down
4 changes: 1 addition & 3 deletions en_us/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,6 @@
#define IDC_BUTTON_MATCH 549
#define IDC_EDIT_ECLWATCH 550
#define IDC_STATIC_BROWSERENGINE 551
#define IDC_COMBO_BROWSERENGINE 552
#define ID_COL_PANE 32772
#define ID_WINDOW_MANAGER 32773
#define ID_ROW_PANE 32774
Expand Down Expand Up @@ -760,7 +759,6 @@
#define ID_ADVANCED_SETTABSIZE 33019
#define ID_WORKUNIT_OPENGRAPH 33020
#define ID_WORKUNIT_VIEWEXCEPTIONS 33021
#define ID_BROWSER_IE 33022
#define ID_APPLY 33023
#define ID_SORTING_DEGROUP 33024
#define ID_FILE_NEWWORKSPACE 33025
Expand Down Expand Up @@ -879,7 +877,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 61415
#define _APS_NEXT_COMMAND_VALUE 33135
#define _APS_NEXT_CONTROL_VALUE 553
#define _APS_NEXT_CONTROL_VALUE 552
#define _APS_NEXT_SYMED_VALUE 61503
#endif
#endif
1 change: 0 additions & 1 deletion wlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ SET ( SRCS
GotoDlg.h
HListBox.h
HtmlView.h
HtmlIEView.cpp
HtmlWebView2View.cpp
#ImportRecordAnalyze.cpp
#ImportRecordAnalyze.h
Expand Down
1 change: 0 additions & 1 deletion wlib/HtmlView.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ __interface IHtmlView {
HRESULT put_ProfferService(REFGUID rguidService, IServiceProvider* pServiceProvider);
};

WLIB_API IHtmlView * CreateIEView();
WLIB_API IHtmlView * CreateWebView2View();
25 changes: 0 additions & 25 deletions wlib/PreferenceDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1862,8 +1862,6 @@ class CPrefResultDlg : public CDialogImpl<CPrefResultDlg>,
std::_tstring m_Font;
int m_FontSizeResult;
CFontComboBox m_comboFont;
std::_tstring m_comboBrowserEngineStr;
CComboBox m_comboBrowserEngine;

public:
CPrefResultDlg(IOwner *owner, IConfig * config) : m_config(config), m_owner(owner)
Expand All @@ -1884,23 +1882,13 @@ class CPrefResultDlg : public CDialogImpl<CPrefResultDlg>,
DoChanged(false);
}

void InitComboBrowserEngine()
{
m_comboBrowserEngine = GetDlgItem(IDC_COMBO_BROWSERENGINE);
m_comboBrowserEngine.AddString(_T("WebView2"));
m_comboBrowserEngine.AddString(_T("Chromium"));
m_comboBrowserEngine.AddString(_T("IE"));
}

void PopulateControls()
{
m_ResultLimit = m_config->Get(GLOBAL_WORKUNIT_RESULTLIMIT);
m_AutoOpenResult = m_config->Get(GLOBAL_AUTOOPENRESULT);
m_Font = CString(m_config->Get(GLOBAL_FONT_RESULT));
m_FontSizeResult = m_config->Get(GLOBAL_FONTSIZE_RESULT);
SetComboText(m_comboFont, m_Font);
m_comboBrowserEngineStr = CString(m_config->Get(GLOBAL_BROWSER_ENGINE));
SetComboText(m_comboBrowserEngine, m_comboBrowserEngineStr);

DoDataExchange();

Expand All @@ -1916,8 +1904,6 @@ class CPrefResultDlg : public CDialogImpl<CPrefResultDlg>,
m_config->Set(GLOBAL_FONT_RESULT, font);
m_config->Set(GLOBAL_FONTSIZE_RESULT, m_FontSizeResult);
CString comboBrowserEngineStr;
m_comboBrowserEngine.GetWindowText(comboBrowserEngineStr);
m_config->Set(GLOBAL_BROWSER_ENGINE, comboBrowserEngineStr);
}

void DoApply(bool bMakeGlobal)
Expand All @@ -1941,8 +1927,6 @@ class CPrefResultDlg : public CDialogImpl<CPrefResultDlg>,
COMMAND_CODE_HANDLER(EN_CHANGE, OnChangedEdit)
COMMAND_HANDLER(IDC_COMBO_FONT, CBN_SELCHANGE, OnCbnSelendokComboFont)
COMMAND_HANDLER(IDC_COMBO_FONT, CBN_SELENDOK, OnCbnSelendokComboFont)
COMMAND_HANDLER(IDC_COMBO_BROWSERENGINE, CBN_SELCHANGE, OnCbnSelendokBrowserEngine)
COMMAND_HANDLER(IDC_COMBO_BROWSERENGINE, CBN_SELENDOK, OnCbnSelendokBrowserEngine)
NOTIFY_CODE_HANDLER(UDN_DELTAPOS, OnSpinChange)

REFLECT_NOTIFICATIONS()
Expand All @@ -1962,7 +1946,6 @@ class CPrefResultDlg : public CDialogImpl<CPrefResultDlg>,
wndPlaceholder.DestroyWindow();
m_comboFont.Create(m_hWnd, rc, _T(""), WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VSCROLL | CBS_DROPDOWN | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_SORT , 0, IDC_COMBO_FONT);
m_comboFont.Init();
InitComboBrowserEngine();
}

LRESULT OnInitDialog(HWND /*wParam*/, LPARAM /*lParam*/)
Expand Down Expand Up @@ -2003,14 +1986,6 @@ class CPrefResultDlg : public CDialogImpl<CPrefResultDlg>,
return 0;
}

LRESULT OnCbnSelendokBrowserEngine(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
DoChanged();
CString comboBrowserEngineStr;
m_comboBrowserEngineStr = m_comboBrowserEngine.GetLBText(m_comboBrowserEngine.GetCurSel(), comboBrowserEngineStr);
return 0;
}

LRESULT OnSpinChange(int idCtrl, LPNMHDR pnmHdr, BOOL &bHandled)
{
DoChanged();
Expand Down
1 change: 0 additions & 1 deletion wlib/PreferenceDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ static const SectionLabelDefault GLOBAL_DISABLEAUTOUPDATE(SectionLabel(GeneralSe
static const TCHAR ResultSection[](_T("Results"));
static const SectionLabelDefault GLOBAL_FONT_RESULT(SectionLabel(ResultSection, _T("ResultFont")), _T("Courier New"));
static const SectionLabelDefault GLOBAL_FONTSIZE_RESULT(SectionLabel(ResultSection, _T("ResultFontSize")), 10);
static const SectionLabelDefault GLOBAL_BROWSER_ENGINE(SectionLabel(ResultSection, _T("BrowserEngine")), _T("WebView2"));

static const TCHAR EditorSection[](_T("Editor"));
static const SectionLabelDefault GLOBAL_MAINTAININDENT(SectionLabel(EditorSection, _T("MaintainIndent")), 1);
Expand Down

0 comments on commit a5dc44e

Please sign in to comment.