(trunk gtk) #3970 "tr_core_update() wastes CPU cycles by toggling the sort mode" -- fix minor r11799 regression.
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().
This commit is contained in:
parent
be99878e98
commit
88df1b15ee
|
@ -1200,7 +1200,7 @@ wannaquit( gpointer vdata )
|
|||
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
|
||||
|
|
|
@ -929,6 +929,12 @@ tr_core_load( TrCore * self, gboolean forcePaused )
|
|||
tr_ctorFree( ctor );
|
||||
}
|
||||
|
||||
void
|
||||
tr_core_clear( TrCore * self )
|
||||
{
|
||||
gtk_list_store_clear( GTK_LIST_STORE( tr_core_raw_model( self ) ) );
|
||||
}
|
||||
|
||||
/***
|
||||
****
|
||||
***/
|
||||
|
|
|
@ -80,6 +80,8 @@ void tr_core_close( TrCore* );
|
|||
/* 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 );
|
||||
|
|
Loading…
Reference in New Issue