fix for bug #26091 - Added Feedback button to the wizard.The page that it points to can be changed by modifying the feedback variable in wizardmachine.ini.
This commit is contained in:
Родитель
10638fb83c
Коммит
0b989e8ca6
|
@ -26,6 +26,9 @@
|
|||
#include "stdafx.h"
|
||||
#include "WizardMachine.h"
|
||||
#include "PropSheet.h"
|
||||
#include "globals.h" //To access global variables
|
||||
#include "Interpret.h" //Adding to enable OpenBrowser function.
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
|
@ -57,7 +60,43 @@ BEGIN_MESSAGE_MAP(CPropSheet, CPropertySheet)
|
|||
//{{AFX_MSG_MAP(CPropSheet)
|
||||
// NOTE - the ClassWizard will add and remove mapping macros here.
|
||||
//}}AFX_MSG_MAP
|
||||
ON_BN_CLICKED(IDC_FEEDBACK_BUTTON, OnButtonCopy)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPropSheet message handlers
|
||||
extern CInterpret *theInterpreter;
|
||||
BOOL CPropSheet::OnInitDialog()
|
||||
{
|
||||
BOOL bResult = CPropertySheet::OnInitDialog();
|
||||
|
||||
// TODO: Add your specialized code here
|
||||
CRect rect, tabrect;// = CRect (800, 440, 950, 645);//, tabrect;
|
||||
int width;
|
||||
|
||||
//Get button sizes and positions
|
||||
GetDlgItem(IDCANCEL)->GetWindowRect(rect);
|
||||
GetTabControl()->GetWindowRect(tabrect);
|
||||
ScreenToClient(rect); ScreenToClient(tabrect);
|
||||
|
||||
//New button - width, height and Y-coordiate of IDOK
|
||||
// - X-coordinate of tab control
|
||||
width = rect.Width();
|
||||
rect.left = tabrect.left; rect.right = tabrect.left + width;
|
||||
|
||||
//Create new "Add" button and set standard font
|
||||
m_ButtonCopy.Create("Feedback",
|
||||
BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE|WS_TABSTOP,
|
||||
rect, this, IDC_FEEDBACK_BUTTON);
|
||||
m_ButtonCopy.SetFont(GetFont());
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
void CPropSheet::OnButtonCopy()
|
||||
{
|
||||
CString Feedback = GetGlobal("Feedback");
|
||||
|
||||
theInterpreter->OpenBrowser((char*)(LPCTSTR)Feedback);
|
||||
|
||||
}
|
||||
|
|
|
@ -45,10 +45,15 @@ public:
|
|||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CPropSheet)
|
||||
public:
|
||||
virtual BOOL OnInitDialog();
|
||||
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
public:
|
||||
void OnButtonCopy();
|
||||
CButton m_ButtonCopy;
|
||||
virtual ~CPropSheet();
|
||||
|
||||
// Generated message map functions
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#define IDD_HELP_DLG 1537
|
||||
#define IDD_SUMMARY 1538
|
||||
#define IDD_WIZ_HELP 1539
|
||||
#define IDC_FEEDBACK_BUTTON 0x02000
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
inifile=cck.ini
|
||||
DefaultName=Mozilla
|
||||
Organization=Netscape
|
||||
Department=CCK
|
||||
Department=CCK
|
||||
Feedback=Http://www.mozilla.org/feedback.html
|
Загрузка…
Ссылка в новой задаче