choices[1] = _("Pages");
m_fromText = (wxTextCtrl*)NULL;
+ m_toText = (wxTextCtrl*)NULL;
if (m_printDialogData.GetFromPage() != 0)
{
if(m_printDialogData.GetFromPage() != 0)
{
- if (m_printDialogData.GetEnablePageNumbers())
- {
- m_fromText->Enable(TRUE);
- m_toText->Enable(TRUE);
-
- sprintf(buf, "%d", m_printDialogData.GetFromPage());
- m_fromText->SetValue(buf);
- sprintf(buf, "%d", m_printDialogData.GetToPage());
- m_toText->SetValue(buf);
-
- if (m_printDialogData.GetAllPages())
+ if(m_fromText)
+ {
+ if (m_printDialogData.GetEnablePageNumbers())
+ {
+ m_fromText->Enable(TRUE);
+ m_toText->Enable(TRUE);
+ sprintf(buf, "%d", m_printDialogData.GetFromPage());
+ m_fromText->SetValue(buf);
+ sprintf(buf, "%d", m_printDialogData.GetToPage());
+ m_toText->SetValue(buf);
+ if (m_printDialogData.GetAllPages())
m_rangeRadioBox->SetSelection(0);
- else
+ else
m_rangeRadioBox->SetSelection(1);
- }
- else
- {
- m_fromText->Enable(FALSE);
- m_toText->Enable(FALSE);
- m_rangeRadioBox->SetSelection(0);
- m_rangeRadioBox->wxRadioBox::Enable(1, FALSE);
- }
+ }
+ else
+ {
+ m_fromText->Enable(FALSE);
+ m_toText->Enable(FALSE);
+ m_rangeRadioBox->SetSelection(0);
+ m_rangeRadioBox->wxRadioBox::Enable(1, FALSE);
+ }
+ }
}
sprintf(buf, "%d", m_printDialogData.GetNoCopies());
m_noCopiesText->SetValue(buf);
{
if (m_printDialogData.GetEnablePageNumbers())
{
- m_printDialogData.SetFromPage(atoi(m_fromText->GetValue()));
- m_printDialogData.SetToPage(atoi(m_toText->GetValue()));
+ if(m_fromText) m_printDialogData.SetFromPage(atoi(m_fromText->GetValue()));
+ if(m_toText) m_printDialogData.SetToPage(atoi(m_toText->GetValue()));
}
if (m_rangeRadioBox->GetSelection() == 0)
m_printDialogData.SetAllPages(TRUE);