Merge branch 'master' of https://github.com/wxWidgets/wxWidgets
This commit is contained in:
@@ -1613,11 +1613,11 @@ t_sizer_flags_alignh = xsd:string {
|
|||||||
")*"
|
")*"
|
||||||
}
|
}
|
||||||
|
|
||||||
t_horz_sizer_flags = ("*** Sizer flags excluding vertical alignment ones ***"
|
t_horz_sizer_flags = ("*** Sizer flags excluding horizontal alignment ones ***"
|
||||||
| t_sizer_flags_grow
|
| t_sizer_flags_grow
|
||||||
| t_sizer_flags_alignv
|
| t_sizer_flags_alignv
|
||||||
)
|
)
|
||||||
t_vert_sizer_flags = ("*** Sizer flags excluding horizontal alignment ones ***"
|
t_vert_sizer_flags = ("*** Sizer flags excluding vertical alignment ones ***"
|
||||||
| t_sizer_flags_grow
|
| t_sizer_flags_grow
|
||||||
| t_sizer_flags_alignh
|
| t_sizer_flags_alignh
|
||||||
)
|
)
|
||||||
|
@@ -1288,7 +1288,7 @@ void MyPanel::OnChangeCheck(wxCommandEvent& event)
|
|||||||
{
|
{
|
||||||
// check/uncheck all the items in the wxCheckListBox
|
// check/uncheck all the items in the wxCheckListBox
|
||||||
for (unsigned int n=0; n < m_listbox->GetCount(); n++) {
|
for (unsigned int n=0; n < m_listbox->GetCount(); n++) {
|
||||||
m_listbox->Check(n, event.GetInt());
|
m_listbox->Check(n, event.GetInt() != 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ class OwnerDrawnFrame : public wxFrame
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// ctor & dtor
|
// ctor & dtor
|
||||||
OwnerDrawnFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h);
|
OwnerDrawnFrame(wxFrame *frame, const wxString& title, int x, int y, int w, int h);
|
||||||
~OwnerDrawnFrame(){};
|
~OwnerDrawnFrame(){};
|
||||||
|
|
||||||
// notifications
|
// notifications
|
||||||
@@ -255,7 +255,7 @@ void OwnerDrawnFrame::InitMenu()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// main frame constructor
|
// main frame constructor
|
||||||
OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, const wxChar *title,
|
OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, const wxString& title,
|
||||||
int x, int y, int w, int h)
|
int x, int y, int w, int h)
|
||||||
: wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
|
: wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
|
||||||
{
|
{
|
||||||
|
@@ -746,7 +746,8 @@ bool wxDataViewRendererBase::FinishEditing()
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
wxVariant value;
|
wxVariant value;
|
||||||
GetValueFromEditorCtrl( m_editorCtrl, value );
|
if ( !GetValueFromEditorCtrl(m_editorCtrl, value) )
|
||||||
|
return false;
|
||||||
|
|
||||||
wxDataViewCtrl* dv_ctrl = GetOwner()->GetOwner();
|
wxDataViewCtrl* dv_ctrl = GetOwner()->GetOwner();
|
||||||
|
|
||||||
|
@@ -3327,59 +3327,13 @@ bool wxWindowGTK::Show( bool show )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GetFrozen(wxWindowGTK* win, wxVector<wxWindowGTK*>& vector)
|
|
||||||
{
|
|
||||||
if (win->IsFrozen())
|
|
||||||
vector.push_back(win);
|
|
||||||
|
|
||||||
wxWindowList& children = win->GetChildren();
|
|
||||||
for (wxWindowList::iterator i = children.begin(); i != children.end(); ++i)
|
|
||||||
GetFrozen(*i, vector);
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
static void find_scrollbar(GtkWidget* widget, void* data)
|
|
||||||
{
|
|
||||||
bool& isScrollbar = *static_cast<bool*>(data);
|
|
||||||
if (!isScrollbar)
|
|
||||||
{
|
|
||||||
if (GTK_IS_SCROLLBAR(widget))
|
|
||||||
isScrollbar = true;
|
|
||||||
else if (GTK_IS_CONTAINER(widget))
|
|
||||||
gtk_container_forall((GtkContainer*)widget, find_scrollbar, data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowGTK::DoEnable( bool enable )
|
void wxWindowGTK::DoEnable( bool enable )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
|
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
|
||||||
|
|
||||||
wxVector<wxWindowGTK*> frozen;
|
|
||||||
if (enable)
|
|
||||||
{
|
|
||||||
// Ubuntu overlay scrollbar can cause GdkWindow.impl_window to change
|
|
||||||
// (by indirectly invoking gdk_window_ensure_native()), which messes up
|
|
||||||
// the freeze count. Avoid this by temporarily un-freezing window hierarchy.
|
|
||||||
bool isScrollbar = false;
|
|
||||||
find_scrollbar(m_widget, static_cast<void*>(&isScrollbar));
|
|
||||||
if (isScrollbar)
|
|
||||||
{
|
|
||||||
GetFrozen(wxGetTopLevelParent(static_cast<wxWindow*>(this)), frozen);
|
|
||||||
for (unsigned i = frozen.size(); i--;)
|
|
||||||
frozen[i]->DoThaw();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_widget_set_sensitive( m_widget, enable );
|
gtk_widget_set_sensitive( m_widget, enable );
|
||||||
if (m_wxwindow && (m_wxwindow != m_widget))
|
if (m_wxwindow && (m_wxwindow != m_widget))
|
||||||
gtk_widget_set_sensitive( m_wxwindow, enable );
|
gtk_widget_set_sensitive( m_wxwindow, enable );
|
||||||
|
|
||||||
if (enable)
|
|
||||||
{
|
|
||||||
for (unsigned i = frozen.size(); i--;)
|
|
||||||
frozen[i]->DoFreeze();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxWindowGTK::GetCharHeight() const
|
int wxWindowGTK::GetCharHeight() const
|
||||||
@@ -5172,9 +5126,24 @@ void wxWindowGTK::GTKFreezeWidget(GtkWidget* widget)
|
|||||||
{
|
{
|
||||||
GdkWindow* window = gtk_widget_get_window(widget);
|
GdkWindow* window = gtk_widget_get_window(widget);
|
||||||
if (window)
|
if (window)
|
||||||
|
{
|
||||||
|
#if GTK_CHECK_VERSION(2,18,0)
|
||||||
|
#ifndef __WXGTK3__
|
||||||
|
if (gtk_check_version(2,18,0) == NULL)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
// impl_window for a non-native GdkWindow can change if
|
||||||
|
// gdk_window_ensure_native() is called on it or some other
|
||||||
|
// GdkWindow in the same TLW. Since the freeze count is on the
|
||||||
|
// impl_window, we have to make sure impl_window does not change
|
||||||
|
// after we call gdk_window_freeze_updates().
|
||||||
|
gdk_window_ensure_native(window);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
gdk_window_freeze_updates(window);
|
gdk_window_freeze_updates(window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void wxWindowGTK::GTKThawWidget(GtkWidget* widget)
|
void wxWindowGTK::GTKThawWidget(GtkWidget* widget)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user