]> Pileus Git - ~andy/gtk/commitdiff
fix from TimJ for off-by-one error in table resizing
authorManish Singh <yosh@src.gnome.org>
Tue, 16 Jun 1998 21:09:24 +0000 (21:09 +0000)
committerManish Singh <yosh@src.gnome.org>
Tue, 16 Jun 1998 21:09:24 +0000 (21:09 +0000)
-Yosh

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 ff276323388691b24376df8697c2b39c34f6dde4..6cff5b39d0a10e49c762e49cbe90b964d0400e69 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gtk/gtktable.c: fix from TimJ for off-by-one error in table
+       resizing
+
 Tue Jun 16 06:29:57 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcheckmenuitem.c (gtk_check_menu_item_set_state): check for
index ff276323388691b24376df8697c2b39c34f6dde4..6cff5b39d0a10e49c762e49cbe90b964d0400e69 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gtk/gtktable.c: fix from TimJ for off-by-one error in table
+       resizing
+
 Tue Jun 16 06:29:57 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcheckmenuitem.c (gtk_check_menu_item_set_state): check for
index ff276323388691b24376df8697c2b39c34f6dde4..6cff5b39d0a10e49c762e49cbe90b964d0400e69 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gtk/gtktable.c: fix from TimJ for off-by-one error in table
+       resizing
+
 Tue Jun 16 06:29:57 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcheckmenuitem.c (gtk_check_menu_item_set_state): check for
index ff276323388691b24376df8697c2b39c34f6dde4..6cff5b39d0a10e49c762e49cbe90b964d0400e69 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gtk/gtktable.c: fix from TimJ for off-by-one error in table
+       resizing
+
 Tue Jun 16 06:29:57 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcheckmenuitem.c (gtk_check_menu_item_set_state): check for
index ff276323388691b24376df8697c2b39c34f6dde4..6cff5b39d0a10e49c762e49cbe90b964d0400e69 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gtk/gtktable.c: fix from TimJ for off-by-one error in table
+       resizing
+
 Tue Jun 16 06:29:57 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcheckmenuitem.c (gtk_check_menu_item_set_state): check for
index ff276323388691b24376df8697c2b39c34f6dde4..6cff5b39d0a10e49c762e49cbe90b964d0400e69 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gtk/gtktable.c: fix from TimJ for off-by-one error in table
+       resizing
+
 Tue Jun 16 06:29:57 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcheckmenuitem.c (gtk_check_menu_item_set_state): check for
index ff276323388691b24376df8697c2b39c34f6dde4..6cff5b39d0a10e49c762e49cbe90b964d0400e69 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gtk/gtktable.c: fix from TimJ for off-by-one error in table
+       resizing
+
 Tue Jun 16 06:29:57 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcheckmenuitem.c (gtk_check_menu_item_set_state): check for
index 8d7a64dd3c252b18d674942622fa8b6bbbddc3c1..d3b3e36538500f30d4e78fd89d8661aefeeee52e 100644 (file)
@@ -261,7 +261,7 @@ gtk_table_set_child_arg (GtkContainer   *container,
       if (GTK_VALUE_UINT (*arg) > table_child->left_attach)
        table_child->right_attach = GTK_VALUE_UINT (*arg);
       if (table_child->right_attach >= table->ncols)
-       gtk_table_resize (table, table->ncols, table_child->right_attach + 1);
+       gtk_table_resize (table, table->ncols, table_child->right_attach);
       break;
     case CHILD_ARG_TOP_ATTACH:
       if (GTK_VALUE_UINT (*arg) < table_child->bottom_attach)
@@ -271,7 +271,7 @@ gtk_table_set_child_arg (GtkContainer   *container,
       if (GTK_VALUE_UINT (*arg) > table_child->top_attach)
        table_child->bottom_attach = GTK_VALUE_UINT (*arg);
       if (table_child->bottom_attach >= table->nrows)
-       gtk_table_resize (table, table_child->bottom_attach + 1, table->ncols);
+       gtk_table_resize (table, table_child->bottom_attach, table->ncols);
       break;
     case CHILD_ARG_X_OPTIONS:
       table_child->xexpand = (GTK_VALUE_FLAGS (*arg) & GTK_EXPAND) != 0;
@@ -410,8 +410,8 @@ gtk_table_resize (GtkTable *table,
          
          child = list->data;
          
-         n_rows = MAX (n_rows, child->bottom_attach + 1);
-         n_cols = MAX (n_cols, child->right_attach + 1);
+         n_rows = MAX (n_rows, child->bottom_attach);
+         n_cols = MAX (n_cols, child->right_attach);
        }
       
       if (n_rows != table->nrows)
@@ -482,10 +482,10 @@ gtk_table_attach (GtkTable          *table,
   g_return_if_fail (top_attach < bottom_attach);
   
   if (right_attach >= table->ncols)
-    gtk_table_resize (table, table->nrows, right_attach + 1);
+    gtk_table_resize (table, table->nrows, right_attach);
   
   if (bottom_attach >= table->nrows)
-    gtk_table_resize (table, bottom_attach + 1, table->ncols);
+    gtk_table_resize (table, bottom_attach, table->ncols);
   
   table_child = g_new (GtkTableChild, 1);
   table_child->widget = child;