]> Pileus Git - ~andy/gtk/commitdiff
always spread out the extra space allocated for the homogeneous case, as
authorTim Janik <timj@gtk.org>
Tue, 12 Feb 2002 01:39:28 +0000 (01:39 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 12 Feb 2002 01:39:28 +0000 (01:39 +0000)
Tue Feb 12 02:19:49 2002  Tim Janik  <timj@gtk.org>

        * gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
        the extra space allocated for the homogeneous case, as we don't
        properly deal with readjusting table allocation within it. (for  this
        purpose, a GtkAlignment can be used as table parent).

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktable.c

index 7bd7e1a2ec5422d25ca09c8d24699a251266dbe8..68a397fd1bf25b4931169e4a074d0bca270202a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Feb 12 02:19:49 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
+       the extra space allocated for the homogeneous case, as we don't
+       properly deal with readjusting table allocation within it. (for  this
+       purpose, a GtkAlignment can be used as table parent).
+
 2002-02-11  Darin Adler  <darin@bentspoon.com>
 
        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):
index 7bd7e1a2ec5422d25ca09c8d24699a251266dbe8..68a397fd1bf25b4931169e4a074d0bca270202a6 100644 (file)
@@ -1,3 +1,10 @@
+Tue Feb 12 02:19:49 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
+       the extra space allocated for the homogeneous case, as we don't
+       properly deal with readjusting table allocation within it. (for  this
+       purpose, a GtkAlignment can be used as table parent).
+
 2002-02-11  Darin Adler  <darin@bentspoon.com>
 
        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):
index 7bd7e1a2ec5422d25ca09c8d24699a251266dbe8..68a397fd1bf25b4931169e4a074d0bca270202a6 100644 (file)
@@ -1,3 +1,10 @@
+Tue Feb 12 02:19:49 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
+       the extra space allocated for the homogeneous case, as we don't
+       properly deal with readjusting table allocation within it. (for  this
+       purpose, a GtkAlignment can be used as table parent).
+
 2002-02-11  Darin Adler  <darin@bentspoon.com>
 
        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):
index 7bd7e1a2ec5422d25ca09c8d24699a251266dbe8..68a397fd1bf25b4931169e4a074d0bca270202a6 100644 (file)
@@ -1,3 +1,10 @@
+Tue Feb 12 02:19:49 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
+       the extra space allocated for the homogeneous case, as we don't
+       properly deal with readjusting table allocation within it. (for  this
+       purpose, a GtkAlignment can be used as table parent).
+
 2002-02-11  Darin Adler  <darin@bentspoon.com>
 
        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):
index 7bd7e1a2ec5422d25ca09c8d24699a251266dbe8..68a397fd1bf25b4931169e4a074d0bca270202a6 100644 (file)
@@ -1,3 +1,10 @@
+Tue Feb 12 02:19:49 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
+       the extra space allocated for the homogeneous case, as we don't
+       properly deal with readjusting table allocation within it. (for  this
+       purpose, a GtkAlignment can be used as table parent).
+
 2002-02-11  Darin Adler  <darin@bentspoon.com>
 
        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):
index 7bd7e1a2ec5422d25ca09c8d24699a251266dbe8..68a397fd1bf25b4931169e4a074d0bca270202a6 100644 (file)
@@ -1,3 +1,10 @@
+Tue Feb 12 02:19:49 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
+       the extra space allocated for the homogeneous case, as we don't
+       properly deal with readjusting table allocation within it. (for  this
+       purpose, a GtkAlignment can be used as table parent).
+
 2002-02-11  Darin Adler  <darin@bentspoon.com>
 
        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):
index 7bd7e1a2ec5422d25ca09c8d24699a251266dbe8..68a397fd1bf25b4931169e4a074d0bca270202a6 100644 (file)
@@ -1,3 +1,10 @@
+Tue Feb 12 02:19:49 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
+       the extra space allocated for the homogeneous case, as we don't
+       properly deal with readjusting table allocation within it. (for  this
+       purpose, a GtkAlignment can be used as table parent).
+
 2002-02-11  Darin Adler  <darin@bentspoon.com>
 
        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):
index eedbb7a9955130a8d912ea25a940ee8e17bbc05b..68e2fef02a946bdd2f337476966133b942b0333d 100644 (file)
@@ -1335,27 +1335,16 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
   
   if (table->homogeneous)
     {
-      nexpand = 0;
-      for (col = 0; col < table->ncols; col++)
-       if (table->cols[col].expand)
-         {
-           nexpand += 1;
-           break;
-         }
+      width = real_width;
       
-      if (nexpand > 0)
+      for (col = 0; col + 1 < table->ncols; col++)
+       width -= table->cols[col].spacing;
+      
+      for (col = 0; col < table->ncols; col++)
        {
-         width = real_width;
-         
-         for (col = 0; col + 1 < table->ncols; col++)
-           width -= table->cols[col].spacing;
-         
-         for (col = 0; col < table->ncols; col++)
-           {
-             extra = width / (table->ncols - col);
-             table->cols[col].allocation = MAX (1, extra);
-             width -= extra;
-           }
+         extra = width / (table->ncols - col);
+         table->cols[col].allocation = MAX (1, extra);
+         width -= extra;
        }
     }
   else
@@ -1423,28 +1412,17 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
   
   if (table->homogeneous)
     {
-      nexpand = 0;
-      for (row = 0; row < table->nrows; row++)
-       if (table->rows[row].expand)
-         {
-           nexpand += 1;
-           break;
-         }
+      height = real_height;
+      
+      for (row = 0; row + 1 < table->nrows; row++)
+       height -= table->rows[row].spacing;
+      
       
-      if (nexpand > 0)
+      for (row = 0; row < table->nrows; row++)
        {
-         height = real_height;
-         
-         for (row = 0; row + 1 < table->nrows; row++)
-           height -= table->rows[row].spacing;
-         
-         
-         for (row = 0; row < table->nrows; row++)
-           {
-             extra = height / (table->nrows - row);
-             table->rows[row].allocation = MAX (1, extra);
-             height -= extra;
-           }
+         extra = height / (table->nrows - row);
+         table->rows[row].allocation = MAX (1, extra);
+         height -= extra;
        }
     }
   else