Changeset 11802


Ignore:
Timestamp:
Feb 1, 2011, 1:45:41 AM (12 years ago)
Author:
jordan
Message:

(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().

Location:
trunk/gtk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/main.c

    r11770 r11802  
    12011201
    12021202    /* clear the UI */
    1203     gtk_list_store_clear( GTK_LIST_STORE( tr_core_model( cbdata->core ) ) );
     1203    tr_core_clear( cbdata->core );
    12041204
    12051205    /* ensure the window is in its previous position & size.
  • trunk/gtk/tr-core.c

    r11799 r11802  
    930930}
    931931
     932void
     933tr_core_clear( TrCore * self )
     934{
     935    gtk_list_store_clear( GTK_LIST_STORE( tr_core_raw_model( self ) ) );
     936}
     937
    932938/***
    933939****
  • trunk/gtk/tr-core.h

    r11740 r11802  
    8080/* Return the model used without incrementing the reference count */
    8181GtkTreeModel * tr_core_model( TrCore * self );
     82
     83void           tr_core_clear( TrCore * self );
    8284
    8385tr_session *   tr_core_session( TrCore * self );
Note: See TracChangeset for help on using the changeset viewer.