From dac8fd48a3f809c84faa7e4e645f33ae798b15b5 Mon Sep 17 00:00:00 2001 From: Garux Date: Fri, 22 May 2020 00:23:41 +0300 Subject: [PATCH] gtk_timeout_add -> g_timeout_add gtk_timeout_remove -> g_source_remove --- radiant/mainframe.cpp | 6 +++--- radiant/watchbsp.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index 61c929dc..90ea8046 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -1796,7 +1796,7 @@ void Selection_SnapToGrid(){ } -static gint qe_every_second( gpointer data ){ +static gboolean qe_every_second( gpointer data ){ GdkModifierType mask; gdk_window_get_pointer( 0, 0, 0, &mask ); @@ -1812,13 +1812,13 @@ guint s_qe_every_second_id = 0; void EverySecondTimer_enable(){ if ( s_qe_every_second_id == 0 ) { - s_qe_every_second_id = gtk_timeout_add( 1000, qe_every_second, 0 ); + s_qe_every_second_id = g_timeout_add( 1000, qe_every_second, 0 ); } } void EverySecondTimer_disable(){ if ( s_qe_every_second_id != 0 ) { - gtk_timeout_remove( s_qe_every_second_id ); + g_source_remove( s_qe_every_second_id ); s_qe_every_second_id = 0; } } diff --git a/radiant/watchbsp.cpp b/radiant/watchbsp.cpp index 4ba76fa6..c6b7295c 100644 --- a/radiant/watchbsp.cpp +++ b/radiant/watchbsp.cpp @@ -471,7 +471,7 @@ static xmlSAXHandler saxParser = { guint s_routine_id = 0; -static gint watchbsp_routine( gpointer data ){ +static gboolean watchbsp_routine( gpointer data ){ reinterpret_cast( data )->RoutineProcessing(); return TRUE; } @@ -491,7 +491,7 @@ void CWatchBSP::Reset(){ } m_eState = EIdle; if ( s_routine_id != 0 ) { - gtk_timeout_remove( s_routine_id ); + g_source_remove( s_routine_id ); s_routine_id = 0; } } @@ -544,7 +544,7 @@ void CWatchBSP::DoEBeginStep(){ } } m_eState = EBeginStep; - s_routine_id = gtk_timeout_add( 25, watchbsp_routine, this ); + s_routine_id = g_timeout_add( 25, watchbsp_routine, this ); }