Changeset 13962


Ignore:
Timestamp:
Feb 4, 2013, 7:26:54 PM (8 years ago)
Author:
jordan
Message:

(2.7x) in the GTK+ client's filterbar, ensure that the two idle functions both return G_SOURCE_REMOVE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.7x/gtk/filter.c

    r13953 r13962  
    120120
    121121static gboolean
    122 category_filter_model_update (GtkTreeStore * store)
     122category_filter_model_update (gpointer gstore)
    123123{
    124124    int i, n;
     
    132132    GtkTreeIter top;
    133133    GtkTreeIter iter;
    134     GtkTreeModel * model = GTK_TREE_MODEL (store);
     134    GtkTreeStore * store = GTK_TREE_STORE (gstore);
     135    GtkTreeModel * model = GTK_TREE_MODEL (gstore);
    135136    GPtrArray * hosts = g_ptr_array_new ();
    136137    GStringChunk * strings = g_string_chunk_new (4096);
     
    296297    g_hash_table_unref (hosts_hash);
    297298    g_string_chunk_free (strings);
    298     return FALSE;
     299    return G_SOURCE_REMOVE;
    299300}
    300301
     
    377378    if (!pending)
    378379    {
    379         GSourceFunc func = (GSourceFunc) category_filter_model_update;
     380        GSourceFunc func = category_filter_model_update;
    380381        g_object_set_qdata (o, DIRTY_KEY, GINT_TO_POINTER (1));
    381382        gdk_threads_add_idle (func, category_model);
     
    652653}
    653654
    654 static void
    655 activity_filter_model_update (GtkListStore * store)
     655static gboolean
     656activity_filter_model_update (gpointer gstore)
    656657{
    657658    GtkTreeIter iter;
    658     GtkTreeModel * model = GTK_TREE_MODEL (store);
     659    GtkListStore * store = GTK_LIST_STORE (gstore);
     660    GtkTreeModel * model = GTK_TREE_MODEL (gstore);
    659661    GObject * o = G_OBJECT (store);
    660662    GtkTreeModel * tmodel = GTK_TREE_MODEL (g_object_get_qdata (o, TORRENT_MODEL_KEY));
     
    681683
    682684    } while (gtk_tree_model_iter_next (model, &iter));
     685
     686    return G_SOURCE_REMOVE;
    683687}
    684688
     
    752756    if (!pending)
    753757    {
    754         GSourceFunc func = (GSourceFunc) activity_filter_model_update;
     758        GSourceFunc func = activity_filter_model_update;
    755759        g_object_set_qdata (o, DIRTY_KEY, GINT_TO_POINTER (1));
    756760        gdk_threads_add_idle (func, activity_model);
Note: See TracChangeset for help on using the changeset viewer.