]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/choicdlg.cpp
Applied patch for stipppled brushes,
[wxWidgets.git] / src / gtk1 / choicdlg.cpp
index 96e0cc4b793c6695e80587ac53e1f3ac3a37011d..903e1009d8b178fa138857932490050ebe1d938f 100644 (file)
@@ -138,7 +138,7 @@ wxChar *wxGetSingleChoiceData( const wxString& message, const wxString& caption,
 {
     wxSingleChoiceDialog dialog(parent, message, caption, n, choices, client_data);
     if ( dialog.ShowModal() == wxID_OK )
-        return dialog.GetSelectionClientData();
+        return (wxChar *)dialog.GetSelectionClientData();
     else
         return NULL;
 }
@@ -248,9 +248,9 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
     
     int y = message_size.y + 15;
     
-    int listbox_height = 100;
+    int listbox_height = 150;
     
-    wxListBox *listBox = new wxListBox( this, wxID_LISTBOX, wxPoint(10, y), wxSize(240, listbox_height), 
+    wxListBox *listBox = new wxListBox( this, wxID_LISTBOX, wxPoint(10, y), wxSize(360, listbox_height), 
                                         n, choices, wxLB_ALWAYS_SB );
     listBox->SetSelection( m_selection );
     if (clientData)
@@ -297,7 +297,8 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
     }
     
 #if wxUSE_STATLINE
-    (void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) );
+    int edge_margin = 7;
+    (void) new wxStaticLine( this, -1, wxPoint(edge_margin,y-20), wxSize(w+30-2*edge_margin, 5) );
 #endif
     
     SetSize( w+30, y+40 );
@@ -327,7 +328,7 @@ void wxSingleChoiceDialog::OnOK(wxCommandEvent& WXUNUSED(event))
     {
         m_selection = listBox->GetSelection();
         m_stringSelection = listBox->GetStringSelection();
-        m_clientData = (char*)listBox->GetClientData(m_selection);
+        m_clientData = listBox->GetClientData(m_selection);
     }
 
     EndModal(wxID_OK);
@@ -340,7 +341,7 @@ void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event))
     {
         m_selection = listBox->GetSelection();
         m_stringSelection = listBox->GetStringSelection();
-        m_clientData = (char*)listBox->GetClientData(m_selection);
+        m_clientData = listBox->GetClientData(m_selection);
     }
 
     EndModal(wxID_OK);