GTK2: gtk_idle_add_priority -> g_idle_add_full; gtk_idle_remove -> g_source_remove
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -374,14 +374,14 @@ void wxapp_install_idle_handler()
|
|||||||
g_isIdle = FALSE;
|
g_isIdle = FALSE;
|
||||||
|
|
||||||
if (g_pendingTag == 0)
|
if (g_pendingTag == 0)
|
||||||
g_pendingTag = gtk_idle_add_priority( 900, wxapp_pending_callback, (gpointer) NULL );
|
g_pendingTag = g_idle_add_full( 900, wxapp_pending_callback, NULL, NULL );
|
||||||
|
|
||||||
// This routine gets called by all event handlers
|
// This routine gets called by all event handlers
|
||||||
// indicating that the idle is over. It may also
|
// indicating that the idle is over. It may also
|
||||||
// get called from other thread for sending events
|
// get called from other thread for sending events
|
||||||
// to the main thread (and processing these in
|
// to the main thread (and processing these in
|
||||||
// idle time). Very low priority.
|
// idle time). Very low priority.
|
||||||
wxTheApp->m_idleTag = gtk_idle_add_priority( 1000, wxapp_idle_callback, (gpointer) NULL );
|
wxTheApp->m_idleTag = g_idle_add_full( 1000, wxapp_idle_callback, NULL, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -431,9 +431,11 @@ wxApp::wxApp()
|
|||||||
|
|
||||||
wxApp::~wxApp()
|
wxApp::~wxApp()
|
||||||
{
|
{
|
||||||
if (m_idleTag) gtk_idle_remove( m_idleTag );
|
if (m_idleTag)
|
||||||
|
g_source_remove( m_idleTag );
|
||||||
|
|
||||||
if (m_colorCube) free(m_colorCube);
|
if (m_colorCube)
|
||||||
|
free(m_colorCube);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxApp::OnInitGui()
|
bool wxApp::OnInitGui()
|
||||||
@@ -695,7 +697,7 @@ void wxApp::RemoveIdleTag()
|
|||||||
#endif
|
#endif
|
||||||
if (!g_isIdle)
|
if (!g_isIdle)
|
||||||
{
|
{
|
||||||
gtk_idle_remove( wxTheApp->m_idleTag );
|
g_source_remove( wxTheApp->m_idleTag );
|
||||||
wxTheApp->m_idleTag = 0;
|
wxTheApp->m_idleTag = 0;
|
||||||
g_isIdle = TRUE;
|
g_isIdle = TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -68,7 +68,7 @@ static gint wxlistbox_idle_callback( gpointer gdata )
|
|||||||
wxlistbox_idle_struct* data = (wxlistbox_idle_struct*) gdata;
|
wxlistbox_idle_struct* data = (wxlistbox_idle_struct*) gdata;
|
||||||
gdk_threads_enter();
|
gdk_threads_enter();
|
||||||
|
|
||||||
gtk_idle_remove( data->m_tag );
|
g_source_remove( data->m_tag );
|
||||||
|
|
||||||
// check that the items haven't been deleted from the listbox since we had
|
// check that the items haven't been deleted from the listbox since we had
|
||||||
// installed this callback
|
// installed this callback
|
||||||
@@ -1069,7 +1069,7 @@ void wxListBox::DoSetFirstItem( int n )
|
|||||||
wxlistbox_idle_struct* data = new wxlistbox_idle_struct;
|
wxlistbox_idle_struct* data = new wxlistbox_idle_struct;
|
||||||
data->m_listbox = this;
|
data->m_listbox = this;
|
||||||
data->m_item = n;
|
data->m_item = n;
|
||||||
data->m_tag = gtk_idle_add_priority( 800, wxlistbox_idle_callback, (gpointer) data );
|
data->m_tag = g_idle_add_full( 800, wxlistbox_idle_callback, data, NULL );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user