From c40b78ae588ef2545bf7664bc3ac76929d2b1cf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Tue, 19 Aug 2008 19:16:38 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20548354=20=E2=80=93=20Remove=20repeated=20?= =?UTF-8?q?code=20in=20gtk=5Fcell=5Fview=5Fsize=5Fallocate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2008-08-19 Björn Lindqvist Bug 548354 – Remove repeated code in gtk_cell_view_size_allocate * gtk/gtkcellview.c (gtk_cell_view_size_allocate): Remove some code duplication, no need for separate loops for GTK_PACK_START and GTK_PACK_END. svn path=/trunk/; revision=21158 --- ChangeLog | 8 ++++++++ gtk/gtkcellview.c | 21 ++------------------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e95706af8..84845db98d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-08-19 Björn Lindqvist + + Bug 548354 – Remove repeated code in gtk_cell_view_size_allocate + + * gtk/gtkcellview.c (gtk_cell_view_size_allocate): Remove some + code duplication, no need for separate loops for GTK_PACK_START + and GTK_PACK_END. + 2008-08-19 Johan Dahlin * gtk/gtk-builder-convert (GtkBuilderConverter._parse): diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c index 08cd400a95..144feba00b 100644 --- a/gtk/gtkcellview.c +++ b/gtk/gtkcellview.c @@ -381,32 +381,15 @@ gtk_cell_view_size_allocate (GtkWidget *widget, else if (extra_space > 0 && expand_cell_count > 0) extra_space /= expand_cell_count; - /* iterate list for PACK_START cells */ for (i = cellview->priv->cell_list; i; i = i->next) { GtkCellViewCellInfo *info = (GtkCellViewCellInfo *)i->data; - if (info->pack == GTK_PACK_END) - continue; - if (!info->cell->visible) continue; - info->real_width = info->requested_width + (info->expand?extra_space:0); - } - - /* iterate list for PACK_END cells */ - for (i = cellview->priv->cell_list; i; i = i->next) - { - GtkCellViewCellInfo *info = (GtkCellViewCellInfo *)i->data; - - if (info->pack == GTK_PACK_START) - continue; - - if (!info->cell->visible) - continue; - - info->real_width = info->requested_width + (info->expand?extra_space:0); + info->real_width = info->requested_width + + (info->expand ? extra_space : 0); } }