]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/prntdlgg.cpp
corrected test for __WXGTK__ (but should it be there at all?)
[wxWidgets.git] / src / generic / prntdlgg.cpp
index c59a8338b67aaab770d7e082f33afbf07d45fed5..084ce72c10749ae1cfd6b75caeafd0c2ffeecfbc 100644 (file)
@@ -136,7 +136,7 @@ END_EVENT_TABLE()
 wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent,
                                            wxPrintDialogData* data)
                     : wxPrintDialogBase(parent, wxID_ANY, _("Print"),
-                               wxPoint(), wxSize(600, 600),
+                               wxPoint(0,0), wxSize(600, 600),
                                wxDEFAULT_DIALOG_STYLE |
                                wxTAB_TRAVERSAL)
 {
@@ -149,7 +149,7 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent,
 wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent,
                                            wxPrintData* data)
                     : wxPrintDialogBase(parent, wxID_ANY, _("Print"),
-                               wxPoint(), wxSize(600, 600),
+                               wxPoint(0,0), wxSize(600, 600),
                                wxDEFAULT_DIALOG_STYLE |
                                wxTAB_TRAVERSAL)
 {
@@ -161,7 +161,7 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent,
 
 void wxGenericPrintDialog::Init(wxWindow * WXUNUSED(parent))
 {
-  //    wxDialog::Create(parent, wxID_ANY, _("Print"), wxPoint(), wxSize(600, 600),
+  //    wxDialog::Create(parent, wxID_ANY, _("Print"), wxPoint(0,0), wxSize(600, 600),
   //                     wxDEFAULT_DIALOG_STYLE | wxTAB_TRAVERSAL);
 
     wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL );
@@ -442,7 +442,7 @@ BEGIN_EVENT_TABLE(wxGenericPrintSetupDialog, wxDialog)
 END_EVENT_TABLE()
 
 wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintData* data):
-wxDialog(parent, wxID_ANY, _("Print Setup"), wxPoint(), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL)
+wxDialog(parent, wxID_ANY, _("Print Setup"), wxPoint(0,0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL)
 {
     Init(data);
 }
@@ -513,6 +513,8 @@ void wxGenericPrintSetupDialog::Init(wxPrintData* data)
         item2.SetMask( wxLIST_MASK_IMAGE );
         item2.SetImage( 0 );
         m_printerListCtrl->SetItem( item2 );
+        // also select item
+        m_printerListCtrl->SetItemState( item.GetId(), wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
     }
 
     item.SetId( 1+ item.GetId() );
@@ -549,6 +551,8 @@ void wxGenericPrintSetupDialog::Init(wxPrintData* data)
                 item2.SetMask( wxLIST_MASK_IMAGE );
                 item2.SetImage( 0 );
                 m_printerListCtrl->SetItem( item2 );
+                // also select item
+                m_printerListCtrl->SetItemState( item.GetId(), wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
             }
 
             wxString command = wxT("lpstat -p ");
@@ -821,7 +825,7 @@ wxGenericPageSetupDialog::wxGenericPageSetupDialog( wxWindow *parent,
     : wxPageSetupDialogBase( parent,
                 wxID_ANY,
                 _("Page Setup"),
-                wxPoint(),
+                wxPoint(0,0),
                 wxSize(600, 600),
                 wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL )
 {