GTK2: gtk_timeout_add -> g_timeout_add; gtk_timeout_remove -> g_source_remove.

Fix gtk_frame_urgency_timer_callback return type (gint -> gboolean).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mart Raudsepp 2006-02-03 22:22:27 +00:00
parent 43a52404ac
commit 92ed8becfc
2 changed files with 7 additions and 7 deletions

View File

@ -68,9 +68,9 @@ bool wxTimer::Start( int millisecs, bool oneShot )
(void)wxTimerBase::Start(millisecs, oneShot);
if (m_tag != -1)
gtk_timeout_remove( m_tag );
g_source_remove( m_tag );
m_tag = gtk_timeout_add( m_milli, timeout_callback, this );
m_tag = g_timeout_add( m_milli, timeout_callback, this );
return TRUE;
}
@ -79,7 +79,7 @@ void wxTimer::Stop()
{
if (m_tag != -1)
{
gtk_timeout_remove( m_tag );
g_source_remove( m_tag );
m_tag = -1;
}
}

View File

@ -101,7 +101,7 @@ static void wxgtk_window_set_urgency_hint (GtkWindow *win,
XFree(wm_hints);
}
static gint gtk_frame_urgency_timer_callback( wxTopLevelWindowGTK *win )
static gboolean gtk_frame_urgency_timer_callback( wxTopLevelWindowGTK *win )
{
#if defined(__WXGTK20__) && GTK_CHECK_VERSION(2,7,0)
if(!gtk_check_version(2,7,0))
@ -150,7 +150,7 @@ static gint gtk_frame_focus_in_callback( GtkWidget *widget,
switch( win->m_urgency_hint )
{
default:
gtk_timeout_remove( win->m_urgency_hint );
g_source_remove( win->m_urgency_hint );
// no break, fallthrough to remove hint too
case -1:
#if defined(__WXGTK20__) && GTK_CHECK_VERSION(2,7,0)
@ -1247,7 +1247,7 @@ void wxTopLevelWindowGTK::RequestUserAttention(int flags)
::wxYieldIfNeeded();
if(m_urgency_hint >= 0)
gtk_timeout_remove(m_urgency_hint);
g_source_remove(m_urgency_hint);
m_urgency_hint = -2;
@ -1257,7 +1257,7 @@ void wxTopLevelWindowGTK::RequestUserAttention(int flags)
if (flags & wxUSER_ATTENTION_INFO)
{
m_urgency_hint = gtk_timeout_add(5000, (GtkFunction)gtk_frame_urgency_timer_callback, this);
m_urgency_hint = g_timeout_add(5000, (GSourceFunc)gtk_frame_urgency_timer_callback, this);
} else {
m_urgency_hint = -1;
}