]> Pileus Git - ~andy/gtk/commitdiff
warn if row/cols are out of range. Fix bug #55921
authorJonathan Blandford <jrb@redhat.com>
Fri, 8 Jun 2001 16:50:58 +0000 (16:50 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Fri, 8 Jun 2001 16:50:58 +0000 (16:50 +0000)
Fri Jun  8 12:38:49 2001  Jonathan Blandford  <jrb@redhat.com>

* gtk/gtktable.c (gtk_table_resize): warn if row/cols are out of
range.  Fix bug #55921

* gtk/gtkliststore.c (gtk_list_store_new_with_types): fix doc bug
(#55920).

Fri Jun  8 12:38:49 2001  Jonathan Blandford  <jrb@redhat.com>

* gtk/gtktable.c (gtk_table_resize): warn if row/cols are out of
range.  Fix bug #55921

* gtk/gtkliststore.c (gtk_list_store_new_with_types): fix doc bug
(#55920).

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
docs/reference/ChangeLog
docs/reference/gtk/tmpl/gtktable.sgml
gtk/gtkliststore.c
gtk/gtktable.c

index 9a40e260833a9a61ae700a687701583db872b8b5..b1581cf34e87902459aafe04b4c2277f17bb6c21 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Jun  8 12:38:49 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktable.c (gtk_table_resize): warn if row/cols are out of
+       range.  Fix bug #55921
+
+       * gtk/gtkliststore.c (gtk_list_store_new_with_types): fix doc bug
+       (#55920).
+
 Fri Jun  8 12:03:07 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/gdkkeys.[ch]: Add a direction-changed signal,
index 9a40e260833a9a61ae700a687701583db872b8b5..b1581cf34e87902459aafe04b4c2277f17bb6c21 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jun  8 12:38:49 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktable.c (gtk_table_resize): warn if row/cols are out of
+       range.  Fix bug #55921
+
+       * gtk/gtkliststore.c (gtk_list_store_new_with_types): fix doc bug
+       (#55920).
+
 Fri Jun  8 12:03:07 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/gdkkeys.[ch]: Add a direction-changed signal,
index 9a40e260833a9a61ae700a687701583db872b8b5..b1581cf34e87902459aafe04b4c2277f17bb6c21 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jun  8 12:38:49 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktable.c (gtk_table_resize): warn if row/cols are out of
+       range.  Fix bug #55921
+
+       * gtk/gtkliststore.c (gtk_list_store_new_with_types): fix doc bug
+       (#55920).
+
 Fri Jun  8 12:03:07 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/gdkkeys.[ch]: Add a direction-changed signal,
index 9a40e260833a9a61ae700a687701583db872b8b5..b1581cf34e87902459aafe04b4c2277f17bb6c21 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jun  8 12:38:49 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktable.c (gtk_table_resize): warn if row/cols are out of
+       range.  Fix bug #55921
+
+       * gtk/gtkliststore.c (gtk_list_store_new_with_types): fix doc bug
+       (#55920).
+
 Fri Jun  8 12:03:07 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/gdkkeys.[ch]: Add a direction-changed signal,
index 9a40e260833a9a61ae700a687701583db872b8b5..b1581cf34e87902459aafe04b4c2277f17bb6c21 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jun  8 12:38:49 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktable.c (gtk_table_resize): warn if row/cols are out of
+       range.  Fix bug #55921
+
+       * gtk/gtkliststore.c (gtk_list_store_new_with_types): fix doc bug
+       (#55920).
+
 Fri Jun  8 12:03:07 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/gdkkeys.[ch]: Add a direction-changed signal,
index 9a40e260833a9a61ae700a687701583db872b8b5..b1581cf34e87902459aafe04b4c2277f17bb6c21 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jun  8 12:38:49 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktable.c (gtk_table_resize): warn if row/cols are out of
+       range.  Fix bug #55921
+
+       * gtk/gtkliststore.c (gtk_list_store_new_with_types): fix doc bug
+       (#55920).
+
 Fri Jun  8 12:03:07 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/gdkkeys.[ch]: Add a direction-changed signal,
index 9a40e260833a9a61ae700a687701583db872b8b5..b1581cf34e87902459aafe04b4c2277f17bb6c21 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jun  8 12:38:49 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktable.c (gtk_table_resize): warn if row/cols are out of
+       range.  Fix bug #55921
+
+       * gtk/gtkliststore.c (gtk_list_store_new_with_types): fix doc bug
+       (#55920).
+
 Fri Jun  8 12:03:07 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/gdkkeys.[ch]: Add a direction-changed signal,
index e4afc0565428f66ffa807d1de737587a3ee07242..2bc011643ce952c4e8745250d608329ece145266 100644 (file)
@@ -1,3 +1,7 @@
+Fri Jun  8 12:33:29 2001  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/tmpl/gtktable.sgml: fix bug #55921
+
 2001-06-05  Havoc Pennington  <hp@redhat.com>
 
        * gtk/tmpl/gtkscale.sgml: more docs
index 3ca973b37ab6b8031486ccb11acc73708d7b27ba..59242d40b75f4d61cb8b4895005aee5b5517b715 100644 (file)
@@ -100,7 +100,10 @@ These fields should be considered read-only and not be modified directly.
 
 <!-- ##### FUNCTION gtk_table_new ##### -->
 <para>
-Used to create a new table widget. An initial size must be given by specifying how many rows and columns the table should have, although this can be changed later with gtk_table_resize().
+Used to create a new table widget. An initial size must be given by
+specifying how many rows and columns the table should have, although
+this can be changed later with gtk_table_resize().  @rows and @columns
+must both be in the range 0 .. 65535.
 </para>
 
 @rows: The number of rows the new table should have.
index 92490eccf4691c171b2e443e1011f9c0b7cd7468..5ef8888858b88dff528a840444ba9f9332ecdc2c 100644 (file)
@@ -254,13 +254,14 @@ gtk_list_store_new (void)
 /**
  * gtk_list_store_new_with_types:
  * @n_columns: number of columns in the list store
- * @Varargs: pairs of column number and #GType
- *
- * Creates a new list store as with gtk_list_store_new(),
- * simultaneously setting up the columns and column types as with
- * gtk_list_store_set_n_columns() and
- * gtk_list_store_set_column_type().
+ * @Varargs: all #GType types for the columns, from first to last
  *
+ * Creates a new list store as with gtk_list_store_new(), simultaneously setting
+ * up the columns and column types as with gtk_list_store_set_n_columns() and
+ * gtk_list_store_set_column_type().  As an example,
+ * gtk_tree_store_new_with_types (3, G_TYPE_INT, G_TYPE_STRING,
+ * GTK_TYPE_PIXBUF); will create a new GtkListStore with three columns, of type
+ * int, string and GtkPixbuf respectively.
  *
  * Return value: a new #GtkListStore
  **/
index 037e3e219941ba4b56762bb9fc9b7b9cc724a377..98e7709fe8251d528007eed8a8853d865376b32a 100644 (file)
@@ -469,12 +469,13 @@ gtk_table_resize (GtkTable *table,
                  guint     n_rows,
                  guint     n_cols)
 {
-  g_return_if_fail (table != NULL);
   g_return_if_fail (GTK_IS_TABLE (table));
+  g_return_if_fail (n_rows > 0 && n_rows < 65536);
+  g_return_if_fail (n_rows > 0 && n_cols < 65536);
 
   n_rows = MAX (n_rows, 1);
   n_cols = MAX (n_cols, 1);
-  
+
   if (n_rows != table->nrows ||
       n_cols != table->ncols)
     {