diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-11-25 16:36:46 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-11-25 16:36:46 +0900 |
commit | 5f7787ab2ead2cdd11ebe17b16dd9498daaaf9c5 (patch) | |
tree | 55b5f4f1ac6439b5f359fabed970974bced8b79f /gtk/gtkcellareabox.c | |
parent | 9d0c2f6b37beee6032981759b0e1f8161ccd9d72 (diff) | |
download | gtk+-5f7787ab2ead2cdd11ebe17b16dd9498daaaf9c5.tar.gz |
Removed tons of api that we dont absolutely need in GtkCellAreaContext:
- gtk_cell_area_context_get_height_for_width()
- gtk_cell_area_context_get_width_for_height()
- gtk_cell_area_context_push_height_for_width()
- gtk_cell_area_context_push_width_for_height()
- gtk_cell_area_context_flush_height_for_width()
- gtk_cell_area_context_flush_width_for_height()
- Contextual size changed signal
All of these are not really important for the CellArea to operate
and not of any real consequential value to the user (the user can
accumulate the returned values from height-for-width requests
and do as they please with it).
Diffstat (limited to 'gtk/gtkcellareabox.c')
-rw-r--r-- | gtk/gtkcellareabox.c | 57 |
1 files changed, 18 insertions, 39 deletions
diff --git a/gtk/gtkcellareabox.c b/gtk/gtkcellareabox.c index 5bfcf1e00a..1e2ce41e82 100644 --- a/gtk/gtkcellareabox.c +++ b/gtk/gtkcellareabox.c @@ -1284,8 +1284,7 @@ compute_size (GtkCellAreaBox *box, for (i = 0; i < priv->groups->len; i++) { CellGroup *group = &g_array_index (priv->groups, CellGroup, i); - gint group_min_size = 0; - gint group_nat_size = 0; + gint group_min = 0, group_nat = 0; for (list = group->cells; list; list = list->next) { @@ -1305,42 +1304,33 @@ compute_size (GtkCellAreaBox *box, min_size += priv->spacing; nat_size += priv->spacing; } - - if (group_min_size > 0) + + if (group_min > 0) { - group_min_size += priv->spacing; - group_nat_size += priv->spacing; + group_min += priv->spacing; + group_nat += priv->spacing; } - - min_size += renderer_min_size; - nat_size += renderer_nat_size; - group_min_size += renderer_min_size; - group_nat_size += renderer_nat_size; + + min_size += renderer_min_size; + nat_size += renderer_nat_size; + group_min += renderer_min_size; + group_nat += renderer_nat_size; } else { - min_size = MAX (min_size, renderer_min_size); - nat_size = MAX (nat_size, renderer_nat_size); - group_min_size = MAX (group_min_size, renderer_min_size); - group_nat_size = MAX (group_nat_size, renderer_nat_size); + min_size = MAX (min_size, renderer_min_size); + nat_size = MAX (nat_size, renderer_nat_size); + group_min = MAX (group_min, renderer_min_size); + group_nat = MAX (group_nat, renderer_nat_size); } } - if (orientation == GTK_ORIENTATION_HORIZONTAL) - { - if (for_size < 0) - gtk_cell_area_box_context_push_group_width (context, group->id, group_min_size, group_nat_size); - else - gtk_cell_area_box_context_push_group_width_for_height (context, group->id, for_size, - group_min_size, group_nat_size); - } - else + if (for_size < 0) { - if (for_size < 0) - gtk_cell_area_box_context_push_group_height (context, group->id, group_min_size, group_nat_size); + if (orientation == GTK_ORIENTATION_HORIZONTAL) + gtk_cell_area_box_context_push_group_width (context, group->id, group_min, group_nat); else - gtk_cell_area_box_context_push_group_height_for_width (context, group->id, for_size, - group_min_size, group_nat_size); + gtk_cell_area_box_context_push_group_height (context, group->id, group_min, group_nat); } } @@ -1529,17 +1519,6 @@ compute_size_for_opposing_orientation (GtkCellAreaBox *box, min_size = MAX (min_size, group_min); nat_size = MAX (nat_size, group_nat); - - if (priv->orientation == GTK_ORIENTATION_HORIZONTAL) - { - gtk_cell_area_box_context_push_group_height_for_width (context, group_idx, for_size, - group_min, group_nat); - } - else - { - gtk_cell_area_box_context_push_group_width_for_height (context, group_idx, for_size, - group_min, group_nat); - } } *minimum_size = min_size; |