1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

remove the gtr_timeout_add_seconds() portability wrapper around gdk_threads_add_timeout_seconds(); it's unnecessary now that the minimum gtk version's been bumped.

This commit is contained in:
Jordan Lee 2011-08-08 17:06:46 +00:00
parent 3778da6f82
commit 6d1869c33b
11 changed files with 10 additions and 19 deletions

View file

@ -2564,8 +2564,8 @@ gtr_torrent_details_dialog_new( GtkWindow * parent, TrCore * core )
gtk_notebook_append_page( GTK_NOTEBOOK( n ), w, l );
gtr_dialog_set_content( GTK_DIALOG( d ), n );
di->periodic_refresh_tag = gtr_timeout_add_seconds( SECONDARY_WINDOW_REFRESH_INTERVAL_SECONDS,
periodic_refresh, di );
di->periodic_refresh_tag = gdk_threads_add_timeout_seconds( SECONDARY_WINDOW_REFRESH_INTERVAL_SECONDS,
periodic_refresh, di );
return d;
}

View file

@ -562,7 +562,7 @@ gtr_file_list_set_torrent( GtkWidget * w, int torrentId )
}
refresh( data );
data->timeout_tag = gtr_timeout_add_seconds( SECONDARY_WINDOW_REFRESH_INTERVAL_SECONDS, refreshModel, data );
data->timeout_tag = gdk_threads_add_timeout_seconds( SECONDARY_WINDOW_REFRESH_INTERVAL_SECONDS, refreshModel, data );
}
gtk_tree_view_set_model( GTK_TREE_VIEW( data->view ), data->model );

View file

@ -839,7 +839,7 @@ app_setup( TrWindow * wind,
on_prefs_changed( cbdata->core, PREF_KEY_SHOW_TRAY_ICON, cbdata );
/* start model update timer */
cbdata->timer = gtr_timeout_add_seconds( MAIN_WINDOW_REFRESH_INTERVAL_SECONDS, update_model_loop, cbdata );
cbdata->timer = gdk_threads_add_timeout_seconds( MAIN_WINDOW_REFRESH_INTERVAL_SECONDS, update_model_loop, cbdata );
update_model_once( cbdata );
/* either show the window or iconify it */

View file

@ -190,7 +190,7 @@ makeProgressDialog( GtkWidget * parent, MakeMetaUI * ui )
ui->progress_bar = w;
gtk_box_pack_start( GTK_BOX( v ), w, FALSE, FALSE, 0 );
ui->progress_tag = gtr_timeout_add_seconds( SECONDARY_WINDOW_REFRESH_INTERVAL_SECONDS, onProgressDialogRefresh, ui );
ui->progress_tag = gdk_threads_add_timeout_seconds( SECONDARY_WINDOW_REFRESH_INTERVAL_SECONDS, onProgressDialogRefresh, ui );
g_object_weak_ref( G_OBJECT( d ), onProgressDialogDestroyed, ui );
onProgressDialogRefresh( ui );

View file

@ -535,7 +535,7 @@ gtr_message_log_window_new( GtkWindow * parent, TrCore * core )
gtk_box_pack_start( GTK_BOX( vbox ), w, TRUE, TRUE, 0 );
gtk_container_add( GTK_CONTAINER( win ), vbox );
data->refresh_tag = gtr_timeout_add_seconds( SECONDARY_WINDOW_REFRESH_INTERVAL_SECONDS, onRefresh, data );
data->refresh_tag = gdk_threads_add_timeout_seconds( SECONDARY_WINDOW_REFRESH_INTERVAL_SECONDS, onRefresh, data );
g_object_weak_ref( G_OBJECT( win ), onWindowDestroyed, data );
scroll_to_bottom( data );

View file

@ -134,7 +134,7 @@ onResponse( GtkDialog * dialog, int response, gpointer unused UNUSED )
data->message_dialog = w;
data->done = TR_LOC_DONE;
onTimer( data );
gtr_timeout_add_seconds( 1, onTimer, data );
gdk_threads_add_timeout_seconds( 1, onTimer, data );
}
else
{

View file

@ -182,7 +182,7 @@ gtr_stats_dialog_new( GtkWindow * parent, TrCore * core )
updateStats( ui );
g_object_set_data_full( G_OBJECT( d ), "data", ui, g_free );
g_signal_connect( d, "response", G_CALLBACK( dialogResponse ), ui );
i = gtr_timeout_add_seconds( SECONDARY_WINDOW_REFRESH_INTERVAL_SECONDS, updateStats, ui );
i = gdk_threads_add_timeout_seconds( SECONDARY_WINDOW_REFRESH_INTERVAL_SECONDS, updateStats, ui );
g_object_weak_ref( G_OBJECT( d ), dialogDestroyed, GUINT_TO_POINTER( i ) );
return d;
}

View file

@ -799,7 +799,7 @@ core_watchdir_monitor_file( TrCore * core, const char * filename )
p->monitor_files = g_slist_append( p->monitor_files, watchdir_file_new( filename ) );
if( !p->monitor_idle_tag )
p->monitor_idle_tag = gtr_timeout_add_seconds( 1, core_watchdir_idle, core );
p->monitor_idle_tag = gdk_threads_add_timeout_seconds( 1, core_watchdir_idle, core );
}
}

View file

@ -140,7 +140,7 @@ spun_cb( GtkSpinButton * w, gpointer core, gboolean isDouble )
data->isDouble = isDouble;
g_object_set_data_full( o, IDLE_DATA, data, spin_idle_data_free );
g_object_ref( G_OBJECT( o ) );
gtr_timeout_add_seconds( 1, spun_cb_idle, w );
gdk_threads_add_timeout_seconds( 1, spun_cb_idle, w );
}
g_timer_start( data->last_change );
}

View file

@ -626,12 +626,6 @@ gtr_idle_add( GSourceFunc function, gpointer data )
return gdk_threads_add_idle( function, data );
}
guint
gtr_timeout_add_seconds( guint seconds, GSourceFunc function, gpointer data )
{
return gdk_threads_add_timeout_seconds( seconds, function, data );
}
void
gtr_http_failure_dialog( GtkWidget * parent, const char * url, long response_code )
{

View file

@ -108,9 +108,6 @@ const char* gtr_get_help_uri( void );
****
***/
/* backwards-compatible wrapper around gdk_threads_add_timeout_seconds() */
guint gtr_timeout_add_seconds( guint seconds, GSourceFunc func, gpointer data );
/* backwards-compatible wrapper around gdk_threads_add_idle() */
guint gtr_idle_add( GSourceFunc func, gpointer data );