Cygwin build fix - removed unused function which currently duplicates wxLaunchDefaultBrowser.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -172,56 +172,6 @@ int apFindNotebookPage(wxNotebook* notebook, const wxString& name)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* View an HTML file
|
||||
*/
|
||||
|
||||
void apViewHTMLFile(const wxString& url)
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
HKEY hKey;
|
||||
TCHAR szCmdName[1024];
|
||||
DWORD dwType, dw = sizeof(szCmdName);
|
||||
LONG lRes;
|
||||
lRes = RegOpenKey(HKEY_CLASSES_ROOT, _T("htmlfile\\shell\\open\\command"), &hKey);
|
||||
if(lRes == ERROR_SUCCESS && RegQueryValueEx(hKey,(LPTSTR)NULL, NULL,
|
||||
&dwType, (LPBYTE)szCmdName, &dw) == ERROR_SUCCESS)
|
||||
{
|
||||
wxStrcat(szCmdName, (const wxChar*) url);
|
||||
PROCESS_INFORMATION piProcInfo;
|
||||
STARTUPINFO siStartInfo;
|
||||
memset(&siStartInfo, 0, sizeof(STARTUPINFO));
|
||||
siStartInfo.cb = sizeof(STARTUPINFO);
|
||||
CreateProcess(NULL, szCmdName, NULL, NULL, false, 0, NULL,
|
||||
NULL, &siStartInfo, &piProcInfo );
|
||||
}
|
||||
if(lRes == ERROR_SUCCESS)
|
||||
RegCloseKey(hKey);
|
||||
#else
|
||||
wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(wxT("html"));
|
||||
if ( !ft )
|
||||
{
|
||||
wxLogError(_T("Impossible to determine the file type for extension html. Please edit your MIME types."));
|
||||
return ;
|
||||
}
|
||||
|
||||
wxString cmd;
|
||||
bool ok = ft->GetOpenCommand(&cmd,
|
||||
wxFileType::MessageParameters(url, wxEmptyString));
|
||||
delete ft;
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
// TODO: some kind of configuration dialog here.
|
||||
wxMessageBox(_("Could not determine the command for running the browser."),
|
||||
wxT("Browsing problem"), wxOK|wxICON_EXCLAMATION);
|
||||
return ;
|
||||
}
|
||||
|
||||
ok = (wxExecute(cmd, false) != 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
wxString wxGetTempDir()
|
||||
{
|
||||
wxString dir;
|
||||
|
@@ -74,9 +74,6 @@ wxFont apStringToFont(const wxString& str);
|
||||
/// Get the index of the given named wxNotebook page
|
||||
int apFindNotebookPage(wxNotebook* notebook, const wxString& name);
|
||||
|
||||
/// View the given URL
|
||||
void apViewHTMLFile(const wxString& url);
|
||||
|
||||
/// Returns the system temporary directory.
|
||||
wxString wxGetTempDir();
|
||||
|
||||
@@ -139,7 +136,7 @@ class wxIconInfo: public wxObject
|
||||
{
|
||||
public:
|
||||
wxIconInfo(const wxString& name);
|
||||
|
||||
|
||||
// How many states? (Each state
|
||||
// has enabled/disabled state)
|
||||
// Max (say) 4 states, each with
|
||||
@@ -151,7 +148,7 @@ public:
|
||||
void SetIconId(int state, bool enabled, int iconId);
|
||||
|
||||
const wxString& GetName() const { return m_name; }
|
||||
|
||||
|
||||
protected:
|
||||
int m_maxStates;
|
||||
int m_states[wxMAX_ICON_STATES * 2]; // Enabled/disabled
|
||||
@@ -167,9 +164,9 @@ class wxIconTable: public wxList
|
||||
{
|
||||
public:
|
||||
wxIconTable(wxImageList* imageList = NULL);
|
||||
|
||||
|
||||
void AppendInfo(wxIconInfo* info);
|
||||
|
||||
|
||||
// Easy way of initialising both the image list and the
|
||||
// info db. It will generate image ids itself while appending the icon.
|
||||
// 'state' is an integer from 0 up to the max allowed, representing a different
|
||||
@@ -177,17 +174,17 @@ public:
|
||||
// A folder that can be open or closed would have two states.
|
||||
// Enabled/disabled is taken as a special case.
|
||||
bool AddInfo(const wxString& name, const wxIcon& icon, int state, bool enabled);
|
||||
|
||||
|
||||
wxIconInfo* FindInfo(const wxString& name) const;
|
||||
|
||||
|
||||
int GetIconId(const wxString& name, int state, bool enabled = true) const;
|
||||
bool SetIconId(const wxString& name, int state, bool enabled, int iconId) ;
|
||||
|
||||
|
||||
void SetImageList(wxImageList* imageList) { m_imageList = imageList; }
|
||||
wxImageList* GetImageList() const { return m_imageList; }
|
||||
|
||||
|
||||
protected:
|
||||
wxImageList* m_imageList;
|
||||
wxImageList* m_imageList;
|
||||
};
|
||||
|
||||
/// Useful insertion operators for wxOutputStream.
|
||||
|
Reference in New Issue
Block a user