diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 78c674dee3..27f1baa128 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -442,7 +442,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) (void)new wxStaticText( panel, -1, "Drag the slider!", wxPoint(228,30), - wxSize(230, -1) + wxSize(240, -1) ); #else (void)new wxStaticText( panel, -1, @@ -453,7 +453,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) "This is also supposed to demonstrate how\n" "to use static controls.\n", wxPoint(228,25), - wxSize(230, 110) + wxSize(240, 110) ); #endif m_spintext = new wxTextCtrl( panel, -1, "0", wxPoint(20,160), wxSize(80,-1) ); diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index 2ecea4a565..b5bd0ccfc8 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -240,8 +240,10 @@ void MyFrame::MessageBox(wxCommandEvent& WXUNUSED(event) ) void MyFrame::NumericEntry(wxCommandEvent& WXUNUSED(event) ) { - long res = wxGetNumberFromUser("", "Enter a number:", "Numeric input test", - 50, 0, 100, this); + long res = wxGetNumberFromUser( "This is some text, actually a lot of text.\n" + "Even two rows of text.", + "Enter a number:", "Numeric input test", + 50, 0, 100, this ); wxString msg; int icon; diff --git a/src/generic/dirdlgg.cpp b/src/generic/dirdlgg.cpp index fa4ca908b1..f43ff6f7b5 100644 --- a/src/generic/dirdlgg.cpp +++ b/src/generic/dirdlgg.cpp @@ -330,7 +330,7 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, const wxString& defaultPath, long style, const wxPoint& pos) : wxDialog(parent, -1, message, pos, wxSize(300,300), - wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { m_message = message; m_dialogStyle = style; diff --git a/src/gtk/choicdlg.cpp b/src/gtk/choicdlg.cpp index 806b21e46d..903e1009d8 100644 --- a/src/gtk/choicdlg.cpp +++ b/src/gtk/choicdlg.cpp @@ -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 ); diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index 4876e3f8d3..7a47bd6bd9 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -158,6 +158,8 @@ void wxEndBusyCursor() wxSetCursor( gs_savedCursor ); gs_savedCursor = wxNullCursor; + + wxYield(); } void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index c1d4f486e9..212f62da5a 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -165,7 +165,8 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, const wxString } #ifdef __WXGTK__ - (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 ); diff --git a/src/gtk/spinbutt.cpp b/src/gtk/spinbutt.cpp index e4ef0744ed..898eb4f4b9 100644 --- a/src/gtk/spinbutt.cpp +++ b/src/gtk/spinbutt.cpp @@ -55,12 +55,9 @@ static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *wi wxEventType command = wxEVT_NULL; float line_step = win->m_adjust->step_increment; - float page_step = win->m_adjust->page_increment; if (fabs(diff-line_step) < sensitivity) command = wxEVT_SCROLL_LINEDOWN; else if (fabs(diff+line_step) < sensitivity) command = wxEVT_SCROLL_LINEUP; - else if (fabs(diff-page_step) < sensitivity) command = wxEVT_SCROLL_PAGEDOWN; - else if (fabs(diff+page_step) < sensitivity) command = wxEVT_SCROLL_PAGEUP; else command = wxEVT_SCROLL_THUMBTRACK; int value = (int)ceil(win->m_adjust->value); @@ -68,8 +65,17 @@ static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *wi wxSpinEvent event( command, win->GetId()); event.SetPosition( value ); event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); + + /* always send a thumbtrack event */ + if (command != wxEVT_SCROLL_THUMBTRACK) + { + command = wxEVT_SCROLL_THUMBTRACK; + wxSpinEvent event2( command, win->GetId()); + event2.SetPosition( value ); + event2.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent( event2 ); + } } //----------------------------------------------------------------------------- diff --git a/src/gtk/textdlg.cpp b/src/gtk/textdlg.cpp index 5ffe1cafdc..a0267ad3f9 100644 --- a/src/gtk/textdlg.cpp +++ b/src/gtk/textdlg.cpp @@ -140,7 +140,8 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& message, } #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 ); diff --git a/src/gtk1/choicdlg.cpp b/src/gtk1/choicdlg.cpp index 806b21e46d..903e1009d8 100644 --- a/src/gtk1/choicdlg.cpp +++ b/src/gtk1/choicdlg.cpp @@ -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 ); diff --git a/src/gtk1/cursor.cpp b/src/gtk1/cursor.cpp index 4876e3f8d3..7a47bd6bd9 100644 --- a/src/gtk1/cursor.cpp +++ b/src/gtk1/cursor.cpp @@ -158,6 +158,8 @@ void wxEndBusyCursor() wxSetCursor( gs_savedCursor ); gs_savedCursor = wxNullCursor; + + wxYield(); } void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) diff --git a/src/gtk1/msgdlg.cpp b/src/gtk1/msgdlg.cpp index c1d4f486e9..212f62da5a 100644 --- a/src/gtk1/msgdlg.cpp +++ b/src/gtk1/msgdlg.cpp @@ -165,7 +165,8 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, const wxString } #ifdef __WXGTK__ - (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 ); diff --git a/src/gtk1/spinbutt.cpp b/src/gtk1/spinbutt.cpp index e4ef0744ed..898eb4f4b9 100644 --- a/src/gtk1/spinbutt.cpp +++ b/src/gtk1/spinbutt.cpp @@ -55,12 +55,9 @@ static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *wi wxEventType command = wxEVT_NULL; float line_step = win->m_adjust->step_increment; - float page_step = win->m_adjust->page_increment; if (fabs(diff-line_step) < sensitivity) command = wxEVT_SCROLL_LINEDOWN; else if (fabs(diff+line_step) < sensitivity) command = wxEVT_SCROLL_LINEUP; - else if (fabs(diff-page_step) < sensitivity) command = wxEVT_SCROLL_PAGEDOWN; - else if (fabs(diff+page_step) < sensitivity) command = wxEVT_SCROLL_PAGEUP; else command = wxEVT_SCROLL_THUMBTRACK; int value = (int)ceil(win->m_adjust->value); @@ -68,8 +65,17 @@ static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *wi wxSpinEvent event( command, win->GetId()); event.SetPosition( value ); event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); + + /* always send a thumbtrack event */ + if (command != wxEVT_SCROLL_THUMBTRACK) + { + command = wxEVT_SCROLL_THUMBTRACK; + wxSpinEvent event2( command, win->GetId()); + event2.SetPosition( value ); + event2.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent( event2 ); + } } //----------------------------------------------------------------------------- diff --git a/src/gtk1/textdlg.cpp b/src/gtk1/textdlg.cpp index 5ffe1cafdc..a0267ad3f9 100644 --- a/src/gtk1/textdlg.cpp +++ b/src/gtk1/textdlg.cpp @@ -140,7 +140,8 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& message, } #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 ); diff --git a/src/unix/gsocket.c b/src/unix/gsocket.c index aa3f28ae85..19a802d0cf 100644 --- a/src/unix/gsocket.c +++ b/src/unix/gsocket.c @@ -487,7 +487,7 @@ bool GSocket_DataAvailable(GSocket *socket) GSocket_SetNonBlocking() puts the socket in non-blocking mode. This is useful if we don't want to wait. */ -void GSocket_SetNonBlocking(GSocket *socket, bool non_block) +void GSocket_SetNonBlocking(GSocket *socket, bool block) { assert(socket != NULL); @@ -501,7 +501,7 @@ void GSocket_SetNonBlocking(GSocket *socket, bool non_block) * GSocket_SetTimeout() */ -#ifndef LINUX +#if !defined(__LINUX__) && !defined(__FREEBSD__) # define CAN_USE_TIMEOUT #elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) # if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 1)