We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: A Clutter-based Twitter client
Homepage: http://live.gnome.org/Tweet
Clone URL: git://github.com/ebassi/tweet.git
Hide the cells of a changed row sooner

Instead of hiding the old cell right after creating the new one,
hide it as soon as possible.
Emmanuele Bassi (author)
Sun Jun 01 13:03:19 -0700 2008
commit  d5eeaca2419f1baa34821ede65f7b3416ac85c18
tree    ec4a7d08e7e0a563dc6ff421187655adfad54626
parent  e0e050b9c72d762256d71b623e4db1142e676042
...
522
523
524
 
 
525
526
527
528
529
530
531
...
900
901
902
903
 
904
905
906
...
930
931
932
 
 
 
 
933
934
935
...
954
955
956
957
958
959
960
961
 
962
963
964
...
522
523
524
525
526
527
528
 
 
529
530
531
...
900
901
902
 
903
904
905
906
...
930
931
932
933
934
935
936
937
938
939
...
958
959
960
 
 
 
 
 
961
962
963
964
0
@@ -522,10 +522,10 @@ prepend_row_layout (TidyListView *view,
0
       clutter_actor_set_widthu (cell, column_width);
0
       clutter_actor_show (cell);
0
 
0
+ cell_height = MAX (cell_height, clutter_actor_get_heightu (cell));
0
+
0
       x_offset += column_width;
0
       x_offset += CLUTTER_UNITS_FROM_DEVICE (h_padding);
0
-
0
- cell_height = MAX (cell_height, clutter_actor_get_heightu (cell));
0
     }
0
 
0
   row_info->width = x_offset;
0
@@ -900,7 +900,7 @@ on_row_changed (ClutterModel *model,
0
 
0
   row = clutter_model_iter_get_row (iter);
0
   row_info = g_list_nth_data (priv->rows, row);
0
-
0
+
0
   if (row_info)
0
     {
0
       ClutterUnit x_offset;
0
@@ -930,6 +930,10 @@ on_row_changed (ClutterModel *model,
0
           if (row_info->cells->len <= i)
0
             break;
0
 
0
+ /* Replace cell */
0
+ old_cell = (ClutterActor *) g_ptr_array_index (row_info->cells, i);
0
+ clutter_actor_hide (old_cell);
0
+
0
           model_id = tidy_list_column_get_model_index (column);
0
 
0
           if (model_id == clutter_model_get_sorting_column (priv->model))
0
@@ -954,11 +958,7 @@ on_row_changed (ClutterModel *model,
0
                                                     state, &size,
0
                                                     row, i);
0
           g_value_unset (&value);
0
-
0
- /* Replace cell */
0
- old_cell = (ClutterActor *) g_ptr_array_index (row_info->cells, i);
0
- clutter_actor_hide (old_cell);
0
-
0
+
0
           g_ptr_array_index (row_info->cells, i) = cell;
0
           clutter_actor_set_parent (cell, actor);
0
           clutter_actor_set_positionu (cell, x_offset, row_info->y_offset);

Comments

    No one has commented yet.