Commit 8b9b7b9d authored by Lars Hamann's avatar Lars Hamann

Added focus handling, horizontal and vertical autoscrolling, extended

* gtk/gtkctree.h :
* gtk/gtkctree.c :
  Added focus handling, horizontal and vertical autoscrolling,
  extended Selection Mode, key bindings
  Added gtk_ctree_toggle_expansion & gtk_ctree_toggle_expansion_recursive
  Changed gtk_ctree_scroll_to to gtk_ctree_moveto.
  Removed gtk_ctree_clear.

* gtk/gtkclist.h :
* gtk/gtkclist.c :
  Added focus handling, horizontal and vertical autoscrolling,
  extended Selection Mode, key bindings
parent b6656088
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
* gtk/gtkctree.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Added gtk_ctree_toggle_expansion & gtk_ctree_toggle_expansion_recursive
Changed gtk_ctree_scroll_to to gtk_ctree_moveto.
Removed gtk_ctree_clear.
* gtk/gtkclist.h :
* gtk/gtkclist.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Wed Jul 15 12:39:27 1998 Raph Levien <raph@acm.org>
* This checkin integrates GdkRgb version 0.0.3 into the Gtk 1.1
......@@ -30,6 +45,7 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
* gtk/gtkctree.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Added gtk_ctree_toggle_expansion & gtk_ctree_toggle_expansion_recursive
Changed gtk_ctree_scroll_to to gtk_ctree_moveto.
Removed gtk_ctree_clear.
* gtk/gtkclist.h :
* gtk/gtkclist.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Wed Jul 15 12:39:27 1998 Raph Levien <raph@acm.org>
* This checkin integrates GdkRgb version 0.0.3 into the Gtk 1.1
......@@ -30,6 +45,7 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
* gtk/gtkctree.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Added gtk_ctree_toggle_expansion & gtk_ctree_toggle_expansion_recursive
Changed gtk_ctree_scroll_to to gtk_ctree_moveto.
Removed gtk_ctree_clear.
* gtk/gtkclist.h :
* gtk/gtkclist.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Wed Jul 15 12:39:27 1998 Raph Levien <raph@acm.org>
* This checkin integrates GdkRgb version 0.0.3 into the Gtk 1.1
......@@ -30,6 +45,7 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
* gtk/gtkctree.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Added gtk_ctree_toggle_expansion & gtk_ctree_toggle_expansion_recursive
Changed gtk_ctree_scroll_to to gtk_ctree_moveto.
Removed gtk_ctree_clear.
* gtk/gtkclist.h :
* gtk/gtkclist.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Wed Jul 15 12:39:27 1998 Raph Levien <raph@acm.org>
* This checkin integrates GdkRgb version 0.0.3 into the Gtk 1.1
......@@ -30,6 +45,7 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
* gtk/gtkctree.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Added gtk_ctree_toggle_expansion & gtk_ctree_toggle_expansion_recursive
Changed gtk_ctree_scroll_to to gtk_ctree_moveto.
Removed gtk_ctree_clear.
* gtk/gtkclist.h :
* gtk/gtkclist.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Wed Jul 15 12:39:27 1998 Raph Levien <raph@acm.org>
* This checkin integrates GdkRgb version 0.0.3 into the Gtk 1.1
......@@ -30,6 +45,7 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
* gtk/gtkctree.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Added gtk_ctree_toggle_expansion & gtk_ctree_toggle_expansion_recursive
Changed gtk_ctree_scroll_to to gtk_ctree_moveto.
Removed gtk_ctree_clear.
* gtk/gtkclist.h :
* gtk/gtkclist.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Wed Jul 15 12:39:27 1998 Raph Levien <raph@acm.org>
* This checkin integrates GdkRgb version 0.0.3 into the Gtk 1.1
......@@ -30,6 +45,7 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
* gtk/gtkctree.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Added gtk_ctree_toggle_expansion & gtk_ctree_toggle_expansion_recursive
Changed gtk_ctree_scroll_to to gtk_ctree_moveto.
Removed gtk_ctree_clear.
* gtk/gtkclist.h :
* gtk/gtkclist.c :
Added focus handling, horizontal and vertical autoscrolling,
extended Selection Mode, key bindings
Wed Jul 15 12:39:27 1998 Raph Levien <raph@acm.org>
* This checkin integrates GdkRgb version 0.0.3 into the Gtk 1.1
......@@ -30,6 +45,7 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
......@@ -5,14 +5,6 @@ For 1.2.0 release:
non-functional ones.
Bugs:
* gtk_ctree_set_selection_mode should be a mere alias of
gtk_clist_set_selection_mode, and clist should implement a new member
function `set_selection_mode' (doesn't need to have a gtk_signal_new
declaration) that can be overridden by ctree, this
is needed for proper widget argument support on GtkCList basis.
this applies similarly to `gtk_ctree_clear', one should be able to
get the same effect by invoking gtk_clist_clear (GTK_CLIST (ctree));
* Widget redrawing when the window resizes sometimes messes up.
GtkLabels sometimes redraw without clearing up the underlying background on
window resizes.
......
This diff is collapsed.
......@@ -27,6 +27,7 @@
#include <gtk/gtkbutton.h>
#include <gtk/gtkhscrollbar.h>
#include <gtk/gtkvscrollbar.h>
#include <gtk/gtkenums.h>
#ifdef __cplusplus
extern "C"
......@@ -38,9 +39,12 @@ enum
{
GTK_CLIST_FROZEN = 1 << 0,
GTK_CLIST_IN_DRAG = 1 << 1,
GTK_CLIST_ROW_HEIGHT_SET = 1 << 2,
GTK_CLIST_SHOW_TITLES = 1 << 3,
GTK_CLIST_CONSTRUCTED = 1 << 4
GTK_CLIST_DRAG_SELECTION = 1 << 2,
GTK_CLIST_ROW_HEIGHT_SET = 1 << 3,
GTK_CLIST_SHOW_TITLES = 1 << 4,
GTK_CLIST_CONSTRUCTED = 1 << 5,
GTK_CLIST_CHILD_HAS_FOCUS = 1 << 6,
GTK_CLIST_ADD_MODE = 1 << 7
};
/* cell types */
......@@ -53,11 +57,11 @@ typedef enum
GTK_CELL_WIDGET
} GtkCellType;
#define GTK_TYPE_CLIST (gtk_clist_get_type ())
#define GTK_CLIST(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CLIST, GtkCList))
#define GTK_CLIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CLIST, GtkCListClass))
#define GTK_IS_CLIST(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CLIST))
#define GTK_IS_CLIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CLIST))
#define GTK_TYPE_CLIST (gtk_clist_get_type ())
#define GTK_CLIST(obj) (GTK_CHECK_CAST ((obj), gtk_clist_get_type (), GtkCList))
#define GTK_CLIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), gtk_clist_get_type (), GtkCListClass))
#define GTK_IS_CLIST(obj) (GTK_CHECK_TYPE ((obj), gtk_clist_get_type ()))
#define GTK_IS_CLIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CLIST))
#define GTK_CLIST_FLAGS(clist) (GTK_CLIST (clist)->flags)
#define GTK_CLIST_SET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) |= (GTK_ ## flag))
......@@ -68,6 +72,11 @@ typedef enum
#define GTK_CLIST_ROW_HEIGHT_SET(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_ROW_HEIGHT_SET)
#define GTK_CLIST_SHOW_TITLES(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_SHOW_TITLES)
#define GTK_CLIST_CONSTRUCTED(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_CONSTRUCTED)
#define GTK_CLIST_CHILD_HAS_FOCUS(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_CHILD_HAS_FOCUS)
#define GTK_CLIST_DRAG_SELECTION(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_DRAG_SELECTION)
#define GTK_CLIST_ADD_MODE(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_ADD_MODE)
#define GTK_CLIST_ROW(_glist_) ((GtkCListRow *)((_glist_)->data))
/* pointer casting for cells */
#define GTK_CELL_TEXT(cell) (((GtkCellText *) &(cell)))
......@@ -90,7 +99,7 @@ struct _GtkCList
{
GtkContainer container;
guint8 flags;
guint16 flags;
/* mem chunks */
GMemChunk *row_mem_chunk;
......@@ -133,6 +142,11 @@ struct _GtkCList
/* list of selected rows */
GList *selection;
GList *selection_end;
GList *undo_selection;
GList *undo_unselection;
gint undo_anchor;
/* scrollbars */
GtkWidget *vscrollbar;
......@@ -152,6 +166,16 @@ struct _GtkCList
/* the current x-pixel location of the xor-drag line */
gint x_drag;
/* focus handling */
gint focus_row;
/* dragging the selection */
gint anchor;
GtkStateType anchor_state;
gint drag_pos;
gint htimer;
gint vtimer;
};
struct _GtkCListClass
......@@ -161,17 +185,48 @@ struct _GtkCListClass
void (*select_row) (GtkCList * clist,
gint row,
gint column,
GdkEventButton * event);
GdkEvent * event);
void (*unselect_row) (GtkCList * clist,
gint row,
gint column,
GdkEventButton * event);
GdkEvent * event);
void (*click_column) (GtkCList * clist,
gint column);
void (*toggle_focus_row) (GtkCList * clist);
void (*select_all) (GtkCList * clist);
void (*unselect_all) (GtkCList * clist);
void (*undo_selection) (GtkCList * clist);
void (*start_selection) (GtkCList * clist);
void (*end_selection) (GtkCList * clist);
void (*extend_selection) (GtkCList * clist,
GtkScrollType scroll_type,
gfloat position,
gboolean auto_start_selection);
void (*scroll_horizontal) (GtkCList * clist,
GtkScrollType scroll_type,
gfloat position);
void (*scroll_vertical) (GtkCList * clist,
GtkScrollType scroll_type,
gfloat position);
void (*toggle_add_mode) (GtkCList * clist);
void (*abort_column_resize) (GtkCList * clist);
void (*resync_selection) (GtkCList * clist,
GdkEvent * event);
GList * (*selection_find) (GtkCList *clist,
gint row_number,
GList *row_list_element);
void (*draw_row) (GtkCList * clist,
GdkRectangle * area,
gint row,
GtkCListRow * clist_row);
void (*clear) (GtkCList * clist);
void (*fake_unselect_all) (GtkCList * clist,
gint row);
gint scrollbar_spacing;
};
......@@ -364,9 +419,6 @@ void gtk_clist_moveto (GtkCList * clist,
GtkVisibility gtk_clist_row_is_visible (GtkCList * clist,
gint row);
GtkAdjustment* gtk_clist_get_vadjustment (GtkCList * clist);
GtkAdjustment* gtk_clist_get_hadjustment (GtkCList * clist);
/* returns the cell type */
GtkCellType gtk_clist_get_cell_type (GtkCList * clist,
gint row,
......@@ -480,6 +532,9 @@ void gtk_clist_unselect_row (GtkCList * clist,
gint row,
gint column);
/* undo the last select/unselect operation */
void gtk_clist_undo_selection (GtkCList *clist);
/* clear the entire list -- this is much faster than removing each item
* with gtk_clist_remove */
void gtk_clist_clear (GtkCList * clist);
......@@ -491,10 +546,14 @@ gint gtk_clist_get_selection_info (GtkCList * clist,
gint * row,
gint * column);
/* swap the position of two rows */
void gtk_clist_swap_rows (GtkCList * clist, gint row1, gint row2);
/* in multiple or extended mode, select all rows */
void gtk_clist_select_all (GtkCList *clist);
/* in all modes except browse mode, deselect all rows */
void gtk_clist_unselect_all (GtkCList *clist);
/* swap the position of two rows */
void gtk_clist_swap_rows (GtkCList * clist, gint row1, gint row2);
#ifdef __cplusplus
}
......
This diff is collapsed.
......@@ -37,7 +37,7 @@ extern "C"
(GTK_CHECK_CLASS_CAST ((klass), gtk_ctree_get_type (), GtkCTreeClass))
#define GTK_IS_CTREE(obj) \
(GTK_CHECK_TYPE ((obj), gtk_ctree_get_type ()))
#define GTK_CTREE_ROW(glist) ((GtkCTreeRow *)((glist)->data))
#define GTK_CTREE_ROW(_glist_) ((GtkCTreeRow *)((_glist_)->data))
#define GTK_CTREE_TREE(_ctree_, _glist_) \
((GtkCellTree *) &(((GtkCTreeRow *)((_glist_)->data))->cell[(_ctree_)->tree_col]))
......@@ -58,6 +58,16 @@ typedef enum
GTK_CTREE_LINES_NONE
} GtkCTreeLineStyle;
typedef enum
{
GTK_CTREE_EXPANSION_EXPAND,
GTK_CTREE_EXPANSION_EXPAND_RECURSIVE,
GTK_CTREE_EXPANSION_COLLAPSE,
GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE,
GTK_CTREE_EXPANSION_TOGGLE,
GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE
} GtkCTreeExpansion;
typedef struct _GtkCTree GtkCTree;
typedef struct _GtkCTreeClass GtkCTreeClass;
typedef struct _GtkCTreeRow GtkCTreeRow;
......@@ -82,7 +92,6 @@ struct _GtkCTree
gint tree_indent;
gint tree_column;
GList *selection_last;
gint drag_row;
GList *drag_source;
GList *drag_target;
......@@ -115,6 +124,8 @@ struct _GtkCTreeClass
GList *node,
GList *new_parent,
GList *new_sibling);
void (*change_focus_row_expansion) (GtkCTree *ctree,
GtkCTreeExpansion action);
};
struct _GtkCTreeRow
......@@ -164,7 +175,6 @@ GList * gtk_ctree_insert (GtkCTree *ctree,
gboolean expanded);
void gtk_ctree_remove (GtkCTree *ctree,
GList *node);
void gtk_ctree_clear (GtkCTree *ctree);
/***********************************************************
* Generic recursive functions, querying / finding tree *
......@@ -214,6 +224,10 @@ void gtk_ctree_collapse (GtkCTree *ctree,
GList *node);
void gtk_ctree_collapse_recursive (GtkCTree *ctree,
GList *node);
void gtk_ctree_toggle_expansion (GtkCTree *ctree,
GList *node);
void gtk_ctree_toggle_expansion_recursive (GtkCTree *ctree,
GList *node);
void gtk_ctree_select (GtkCTree *ctree,
GList *node);
void gtk_ctree_select_recursive (GtkCTree *ctree,
......@@ -296,8 +310,6 @@ void gtk_ctree_set_foreground (GtkCTree *ctree,
void gtk_ctree_set_background (GtkCTree *ctree,
GList *node,
GdkColor *color);
void gtk_ctree_set_selection_mode (GtkCTree *ctree,
GtkSelectionMode mode);
void gtk_ctree_set_row_data (GtkCTree *ctree,
GList *node,
gpointer data);
......@@ -307,7 +319,7 @@ void gtk_ctree_set_row_data_full (GtkCTree *ctree,
GtkDestroyNotify destroy);
gpointer gtk_ctree_get_row_data (GtkCTree *ctree,
GList *node);
void gtk_ctree_scroll_to (GtkCTree *ctree,
void gtk_ctree_moveto (GtkCTree *ctree,
GList *node,
gint column,
gfloat row_align,
......
......@@ -3034,12 +3034,14 @@ create_list (void)
gtk_widget_destroy (window);
}
/*
* GtkCList
*/
#define TESTGTK_CLIST_COLUMNS 7
#define TESTGTK_CLIST_COLUMNS 20
static gint clist_rows = 0;
static gint clist_selected_row = 0;
static GtkWidget *clist_omenu;
static void
add1000_clist (GtkWidget *widget, gpointer data)
......@@ -3101,7 +3103,6 @@ add10000_clist (GtkWidget *widget, gpointer data)
gtk_clist_append (GTK_CLIST (data), texts);
}
gtk_clist_thaw (GTK_CLIST (data));
}
void
......@@ -3114,7 +3115,7 @@ clear_clist (GtkWidget *widget, gpointer data)
void
remove_row_clist (GtkWidget *widget, gpointer data)
{
gtk_clist_remove (GTK_CLIST (data), clist_selected_row);
gtk_clist_remove (GTK_CLIST (data), GTK_CLIST (data)->focus_row);
clist_rows--;
}
......@@ -3134,7 +3135,8 @@ void
select_clist (GtkWidget *widget,
gint row,
gint column,
GdkEventButton * bevent)
GdkEventButton * bevent,
GtkWidget *button)
{
gint i;
guint8 spacing;
......@@ -3187,15 +3189,14 @@ select_clist (GtkWidget *widget,
}
g_print ("\n\n\n");
clist_selected_row = row;
}
void
unselect_clist (GtkWidget *widget,
gint row,
gint column,
GdkEventButton * bevent)
GdkEventButton * bevent,
GtkWidget *button)
{
gint i;
guint8 spacing;
......@@ -3248,8 +3249,6 @@ unselect_clist (GtkWidget *widget,
}
g_print ("\n\n\n");
clist_selected_row = row;
}
static void
......@@ -3257,16 +3256,14 @@ insert_row_clist (GtkWidget *widget, gpointer data)
{
static char *text[] =
{
"This",
"is",
"a",
"inserted",
"row",
"la la la la la",
"la la la la"
"This", "is", "a", "inserted", "row.",
"This", "is", "a", "inserted", "row.",
"This", "is", "a", "inserted", "row.",
"This", "is", "a", "inserted", "row."
};
gtk_clist_insert (GTK_CLIST (data), clist_selected_row, text);
gtk_clist_insert (GTK_CLIST (data), GTK_CLIST (data)->focus_row, text);
clist_rows++;
}
......@@ -3296,6 +3293,36 @@ clist_warning_test (GtkWidget *button,
gtk_widget_unref (child);
}
static void
undo_selection (GtkWidget *button, GtkCList *clist)
{
gtk_clist_undo_selection (clist);
}
#define RADIOMENUTOGGLED(_rmi_, __i) { \
GSList * __g; \
__i = 0; \
__g = gtk_radio_menu_item_group(_rmi_); \
while( __g && !((GtkCheckMenuItem *)(__g->data))->active) { \
__g = __g->next; \
__i++; \
}\
}
static void
clist_toggle_sel_mode (GtkWidget *widget, GtkCList *clist)
{
gint i;
if (!GTK_WIDGET_MAPPED (widget))
return;
RADIOMENUTOGGLED ((GtkRadioMenuItem *)
(((GtkOptionMenu *)clist_omenu)->menu_item), i);
gtk_clist_set_selection_mode (clist, (GtkSelectionMode) (3-i));
}
static void
create_clist (void)
{
......@@ -3310,7 +3337,20 @@ create_clist (void)
"Title 3",
"Title 4",
"Title 5",
"Title 6"
"Title 6",
"Title 7",
"Title 8",
"Title 9",
"Title 10",
"Title 11",
"Title 12",
"Title 13",
"Title 14",
"Title 15",
"Title 16",
"Title 17",
"Title 18",
"Title 19"
};
char text[TESTGTK_CLIST_COLUMNS][50];
......@@ -3322,9 +3362,15 @@ create_clist (void)
GtkWidget *button;
GtkWidget *separator;
GtkWidget *undo_button;
GtkWidget *label;
GtkWidget *menu;
GtkWidget *menu_item;
GSList *group;
if (!window)
{
clist_rows = 0;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
......@@ -3334,16 +3380,12 @@ create_clist (void)
gtk_window_set_title (GTK_WINDOW (window), "clist");
gtk_container_border_width (GTK_CONTAINER (window), 0);
box1 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), box1);
gtk_widget_show (box1);
box2 = gtk_hbox_new (FALSE, 10);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, FALSE, 0);
gtk_widget_show (box2);
/* create GtkCList here so we have a pointer to throw at the
* button callbacks -- more is done with it later */
......@@ -3359,9 +3401,6 @@ create_clist (void)
(GtkSignalFunc) add1000_clist,
(gpointer) clist);
gtk_widget_show (button);
button = gtk_button_new_with_label ("Add 10,000 Rows");
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
......@@ -3370,8 +3409,6 @@ create_clist (void)
(GtkSignalFunc) add10000_clist,
(gpointer) clist);
gtk_widget_show (button);
button = gtk_button_new_with_label ("Clear List");
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
......@@ -3380,8 +3417,6 @@ create_clist (void)
(GtkSignalFunc) clear_clist,
(gpointer) clist);
gtk_widget_show (button);
button = gtk_button_new_with_label ("Remove Row");
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
......@@ -3390,13 +3425,10 @@ create_clist (void)
(GtkSignalFunc) remove_row_clist,
(gpointer) clist);
gtk_widget_show (button);
/* second layer of buttons */
box2 = gtk_hbox_new (FALSE, 10);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, FALSE, 0);
gtk_widget_show (box2);