Allow gtk_clist_insert() to work on empty lists.
-Marc
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Sun Feb 22 20:42:04 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_insert): Allow inserts
|
||||||
|
on empty clists.
|
||||||
|
|
||||||
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
Sun Feb 22 20:42:04 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_insert): Allow inserts
|
||||||
|
on empty clists.
|
||||||
|
|
||||||
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
Sun Feb 22 20:42:04 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_insert): Allow inserts
|
||||||
|
on empty clists.
|
||||||
|
|
||||||
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
Sun Feb 22 20:42:04 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_insert): Allow inserts
|
||||||
|
on empty clists.
|
||||||
|
|
||||||
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
Sun Feb 22 20:42:04 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_insert): Allow inserts
|
||||||
|
on empty clists.
|
||||||
|
|
||||||
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
Sun Feb 22 20:42:04 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_insert): Allow inserts
|
||||||
|
on empty clists.
|
||||||
|
|
||||||
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
Sun Feb 22 20:42:04 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_insert): Allow inserts
|
||||||
|
on empty clists.
|
||||||
|
|
||||||
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
Sun Feb 22 14:28:43 1998 Owen Taylor <owt1@cornell.edu>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
* gtk/gtkmain.c (gtk_events_pending): Count idle handlers
|
||||||
|
|||||||
@ -1221,9 +1221,13 @@ gtk_clist_insert (GtkCList * clist,
|
|||||||
g_return_if_fail (text != NULL);
|
g_return_if_fail (text != NULL);
|
||||||
|
|
||||||
/* return if out of bounds */
|
/* return if out of bounds */
|
||||||
if (row < 0 || row > (clist->rows - 1))
|
if (row < 0 || row > clist->rows)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (clist->rows == 0)
|
||||||
|
gtk_clist_append (clist, text);
|
||||||
|
else
|
||||||
|
{
|
||||||
/* create the row */
|
/* create the row */
|
||||||
clist_row = row_new (clist);
|
clist_row = row_new (clist);
|
||||||
|
|
||||||
@ -1241,6 +1245,7 @@ gtk_clist_insert (GtkCList * clist,
|
|||||||
clist->row_list = g_list_insert (clist->row_list, clist_row, row);
|
clist->row_list = g_list_insert (clist->row_list, clist_row, row);
|
||||||
|
|
||||||
clist->rows++;
|
clist->rows++;
|
||||||
|
}
|
||||||
|
|
||||||
/* redraw the list if it isn't frozen */
|
/* redraw the list if it isn't frozen */
|
||||||
if (!GTK_CLIST_FROZEN (clist))
|
if (!GTK_CLIST_FROZEN (clist))
|
||||||
|
|||||||
Reference in New Issue
Block a user