]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/prntdlgg.cpp
1. suppressed some messages from HasEntry()/HasKeys()
[wxWidgets.git] / src / generic / prntdlgg.cpp
index 7aec75e74ba6820fd3015080eeb4fe6c21b101ea..dbde8255cb1c549333a9f023d178d3945131eba0 100644 (file)
@@ -90,7 +90,7 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data):
 
   yPos += 35;
 
-  wxString choices[2];
+  wxString *choices = new wxString[2];
   choices[0] = _("All");
   choices[1] = _("Pages");
   
@@ -139,6 +139,7 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data):
 
   // Calls wxWindow::OnInitDialog and then wxGenericPrintDialog::TransferDataToWindow
   InitDialog();
+  delete[] choices;
 }
 
 int wxGenericPrintDialog::ShowModal(void)
@@ -196,12 +197,12 @@ void wxGenericPrintDialog::OnRange(wxCommandEvent& event)
 {
   if (!fromText) return;
 
-  if (event.GetInt() == 1)
+  if (event.GetInt() == 0)
   {
     fromText->Enable(FALSE);
     toText->Enable(FALSE);
   }
-  else if (event.GetInt() == 0)
+  else if (event.GetInt() == 1)
   {
     fromText->Enable(TRUE);
     toText->Enable(TRUE);
@@ -317,7 +318,7 @@ wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSe
 
   paperTypeChoice = CreatePaperTypeChoice(&xPos, &yPos);
 
-  wxString choices[2];
+  wxString *choices =  new wxString[2];
   choices[0] = _("Portrait");
   choices[1] = _("Landscape");
 
@@ -351,6 +352,7 @@ wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSe
   Centre(wxBOTH);
 
   InitDialog();
+  delete[] choices;
 }
 
 wxGenericPrintSetupDialog::~wxGenericPrintSetupDialog(void)
@@ -492,7 +494,7 @@ wxGenericPageSetupDialog::wxGenericPageSetupDialog(wxWindow *parent, wxPageSetup
 
   xPos = 5;
 
-  wxString choices[2];
+  wxString *choices = new wxString[2];
   choices[0] = _("Portrait");
   choices[1] = _("Landscape");
   orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, _("Orientation"),
@@ -536,6 +538,7 @@ wxGenericPageSetupDialog::wxGenericPageSetupDialog(wxWindow *parent, wxPageSetup
   Centre(wxBOTH);
 
   InitDialog();
+  delete [] choices;
 }
 
 wxGenericPageSetupDialog::~wxGenericPageSetupDialog(void)