]> git.saurik.com Git - wxWidgets.git/commitdiff
GTK2: gtk_timeout_add -> g_timeout_add; gtk_timeout_remove -> g_source_remove.
authorMart Raudsepp <leio@gentoo.org>
Fri, 3 Feb 2006 22:22:27 +0000 (22:22 +0000)
committerMart Raudsepp <leio@gentoo.org>
Fri, 3 Feb 2006 22:22:27 +0000 (22:22 +0000)
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
src/gtk/toplevel.cpp

index c5e8bd37add140f03a8b4ebbc29f69811547ede3..eb7a15fbb5db874745ae9bfcea3ac22b2823926b 100644 (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;
     }
 }
index 9bbb064569fa97fec3c699f56b2e626b875a085c..cf2801e1e9c638701cbe69dcc2f8da3aea4aafea 100644 (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;
         }