From 92ed8becfcbb45d2b5b1e81a03fb47dba47b9580 Mon Sep 17 00:00:00 2001 From: Mart Raudsepp Date: Fri, 3 Feb 2006 22:22:27 +0000 Subject: [PATCH] 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 --- src/gtk/timer.cpp | 6 +++--- src/gtk/toplevel.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gtk/timer.cpp b/src/gtk/timer.cpp index c5e8bd37ad..eb7a15fbb5 100644 --- a/src/gtk/timer.cpp +++ b/src/gtk/timer.cpp @@ -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; } } diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 9bbb064569..cf2801e1e9 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -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; } -- 2.47.2