Clearing the model on shutdown generated a warning because it used the wrong cast. Rather than fixing the cast, add tr_core_clear() for symmetry with tr_core_load().
gtk_widget_grab_focus( w );
/* clear the UI */
- gtk_list_store_clear( GTK_LIST_STORE( tr_core_model( cbdata->core ) ) );
+ tr_core_clear( cbdata->core );
/* ensure the window is in its previous position & size.
* this seems to be necessary because changing the main window's
tr_ctorFree( ctor );
}
+void
+tr_core_clear( TrCore * self )
+{
+ gtk_list_store_clear( GTK_LIST_STORE( tr_core_raw_model( self ) ) );
+}
+
/***
****
***/
/* Return the model used without incrementing the reference count */
GtkTreeModel * tr_core_model( TrCore * self );
+void tr_core_clear( TrCore * self );
+
tr_session * tr_core_session( TrCore * self );
size_t tr_core_get_active_torrent_count( TrCore * self );