- wxButton *cancel = (wxButton *) NULL;
- wxButton *yes = (wxButton *) NULL;
- wxButton *no = (wxButton *) NULL;
-
- if (style & wxYES_NO) {
- yes = new wxButton(this, wxID_YES, _("Yes"));
- no = new wxButton(this, wxID_NO, _("No"));
-
- buttonSizer->AddSizerChild(yes);
- buttonSizer->AddSizerChild(no);
- }
-
- if (style & wxOK) {
- ok = new wxButton(this, wxID_OK, _("OK"));
- buttonSizer->AddSizerChild(ok);
- }
-
- if (style & wxCANCEL) {
- cancel = new wxButton(this, wxID_CANCEL, _("Cancel"));
- buttonSizer->AddSizerChild(cancel);
- }
-
- if (ok)
- {
- ok->SetDefault();
- ok->SetFocus();
- }
- else if (yes)
- {
- yes->SetDefault();
- yes->SetFocus();
- }
-
- Layout();
- Centre(wxBOTH);
-
- wxEndBusyCursor();
+ wxButton *cancel = (wxButton *) NULL;
+ wxButton *yes = (wxButton *) NULL;
+ wxButton *no = (wxButton *) NULL;
+
+ int y = message_size.y + 30;
+
+ if (style & wxYES_NO)
+ {
+ yes = new wxButton( this, wxID_YES, _("Yes"), wxPoint(-1,y), wxSize(80,-1) );
+ m_buttons.Append( yes );
+ no = new wxButton( this, wxID_NO, _("No"), wxPoint(-1,y), wxSize(80,-1) );
+ m_buttons.Append( no );
+ }
+
+ if (style & wxOK)
+ {
+ ok = new wxButton( this, wxID_OK, _("OK"), wxPoint(-1,y), wxSize(80,-1) );
+ m_buttons.Append( ok );
+ }
+
+ if (style & wxCANCEL)
+ {
+ cancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxPoint(-1,y), wxSize(80,-1) );
+ m_buttons.Append( cancel );
+ }
+
+ if (ok)
+ {
+ ok->SetDefault();
+ ok->SetFocus();
+ }
+ else if (yes)
+ {
+ yes->SetDefault();
+ yes->SetFocus();
+ }
+
+ int w = m_buttons.GetCount() * 100;
+ if (message_size.x > w) w = message_size.x;
+ int space = w / (m_buttons.GetCount()*2);
+
+ int n = 0;
+ wxNode *node = m_buttons.First();
+ while (node)
+ {
+ wxWindow *win = (wxWindow*)node->Data();
+ int x = (n*2+1)*space - 40 + 15;
+ win->Move( x, -1 );
+ node = node->Next();
+ n++;
+ }
+
+#ifdef __WXGTK__
+ (void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) );
+#endif
+
+ SetSize( w+30, y+40 );
+
+ Centre( wxBOTH );