Commit 337bdee2 authored by GMT 1998  Tony Gale's avatar GMT 1998 Tony Gale Committed by Tony Gale

Start mass update for GTK 1.1 Look for the best version of awk Fix FD leak

Mon Dec  7 15:15:06 GMT 1998  Tony Gale <gale@gtk.org>

        * docs/gtk_tut.sgml: Start mass update for GTK 1.1
        * examples/extract.sh: Look for the best version of awk
        * examples/extract.awk: Fix FD leak
        * example/base: minimal example from Tutorial
parent 621beb8a
Mon Dec 7 15:15:06 GMT 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: Start mass update for GTK 1.1
* examples/extract.sh: Look for the best version of awk
* examples/extract.awk: Fix FD leak
* example/base: minimal example from Tutorial
Mon Dec 7 01:29:27 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c: New functions
......
Mon Dec 7 15:15:06 GMT 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: Start mass update for GTK 1.1
* examples/extract.sh: Look for the best version of awk
* examples/extract.awk: Fix FD leak
* example/base: minimal example from Tutorial
Mon Dec 7 01:29:27 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c: New functions
......
Mon Dec 7 15:15:06 GMT 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: Start mass update for GTK 1.1
* examples/extract.sh: Look for the best version of awk
* examples/extract.awk: Fix FD leak
* example/base: minimal example from Tutorial
Mon Dec 7 01:29:27 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c: New functions
......
Mon Dec 7 15:15:06 GMT 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: Start mass update for GTK 1.1
* examples/extract.sh: Look for the best version of awk
* examples/extract.awk: Fix FD leak
* example/base: minimal example from Tutorial
Mon Dec 7 01:29:27 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c: New functions
......
Mon Dec 7 15:15:06 GMT 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: Start mass update for GTK 1.1
* examples/extract.sh: Look for the best version of awk
* examples/extract.awk: Fix FD leak
* example/base: minimal example from Tutorial
Mon Dec 7 01:29:27 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c: New functions
......
Mon Dec 7 15:15:06 GMT 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: Start mass update for GTK 1.1
* examples/extract.sh: Look for the best version of awk
* examples/extract.awk: Fix FD leak
* example/base: minimal example from Tutorial
Mon Dec 7 01:29:27 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c: New functions
......
Mon Dec 7 15:15:06 GMT 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: Start mass update for GTK 1.1
* examples/extract.sh: Look for the best version of awk
* examples/extract.awk: Fix FD leak
* example/base: minimal example from Tutorial
Mon Dec 7 01:29:27 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c: New functions
......
This diff is collapsed.
This diff is collapsed.
CC = gcc
base: base.c
$(CC) `gtk-config --cflags` base.c -o base `gtk-config --libs`
clean:
rm -f *.o base
/* example-start base base.c */
#include <gtk/gtk.h>
int main( int argc,
char *argv[] )
{
GtkWidget *window;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_show (window);
gtk_main ();
return 0;
}
/* example-end */
/* This file extracted from the GTK tutorial. */
/* buttons.c */
/* example-start buttons buttons.c */
#include <gtk/gtk.h>
/* create a new hbox with an image and a label packed into it
* and return the box.. */
/* Create a new hbox with an image and a label packed into it
* and return the box. */
GtkWidget *xpm_label_box (GtkWidget *parent, gchar *xpm_filename, gchar *label_text)
GtkWidget *xpm_label_box( GtkWidget *parent,
gchar *xpm_filename,
gchar *label_text )
{
GtkWidget *box1;
GtkWidget *label;
......@@ -16,24 +16,24 @@ GtkWidget *xpm_label_box (GtkWidget *parent, gchar *xpm_filename, gchar *label_t
GdkBitmap *mask;
GtkStyle *style;
/* create box for xpm and label */
/* Create box for xpm and label */
box1 = gtk_hbox_new (FALSE, 0);
gtk_container_border_width (GTK_CONTAINER (box1), 2);
/* get style of button.. I assume it's to get the background color.
* if someone knows the real reason, please enlighten me. */
/* Get the style of the button to get the
* background color. */
style = gtk_widget_get_style(parent);
/* now on to the xpm stuff.. load xpm */
/* Now on to the xpm stuff */
pixmap = gdk_pixmap_create_from_xpm (parent->window, &mask,
&style->bg[GTK_STATE_NORMAL],
xpm_filename);
pixmapwid = gtk_pixmap_new (pixmap, mask);
/* create label for button */
/* Create a label for the button */
label = gtk_label_new (label_text);
/* pack the pixmap and label into the box */
/* Pack the pixmap and label into the box */
gtk_box_pack_start (GTK_BOX (box1),
pixmapwid, FALSE, FALSE, 3);
......@@ -42,17 +42,19 @@ GtkWidget *xpm_label_box (GtkWidget *parent, gchar *xpm_filename, gchar *label_t
gtk_widget_show(pixmapwid);
gtk_widget_show(label);
return (box1);
return(box1);
}
/* our usual callback function */
void callback (GtkWidget *widget, gpointer data)
/* Our usual callback function */
void callback( GtkWidget *widget,
gpointer data )
{
g_print ("Hello again - %s was pressed\n", (char *) data);
}
int main (int argc, char *argv[])
int main( int argc,
char *argv[] )
{
/* GtkWidget is the storage type for widgets */
GtkWidget *window;
......@@ -61,7 +63,7 @@ int main (int argc, char *argv[])
gtk_init (&argc, &argv);
/* create a new window */
/* Create a new window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Pixmap'd Buttons!");
......@@ -74,21 +76,21 @@ int main (int argc, char *argv[])
GTK_SIGNAL_FUNC (gtk_exit), NULL);
/* sets the border width of the window. */
/* Sets the border width of the window. */
gtk_container_border_width (GTK_CONTAINER (window), 10);
gtk_widget_realize(window);
/* create a new button */
/* Create a new button */
button = gtk_button_new ();
/* You should be getting used to seeing most of these functions by now */
/* Connect the "clicked" signal of the button to our callback */
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (callback), (gpointer) "cool button");
/* this calls our box creating function */
/* This calls our box creating function */
box1 = xpm_label_box(window, "info.xpm", "cool button");
/* pack and show all our widgets */
/* Pack and show all our widgets */
gtk_widget_show(box1);
gtk_container_add (GTK_CONTAINER (button), box1);
......@@ -99,8 +101,9 @@ int main (int argc, char *argv[])
gtk_widget_show (window);
/* rest in gtk_main and wait for the fun to begin! */
/* Rest in gtk_main and wait for the fun to begin! */
gtk_main ();
return 0;
return(0);
}
/* example-end */
......@@ -35,6 +35,8 @@ $2 == "example-start" { in_example=1 }
$2 == "example-start" && check == 0 \
{ if ( (spec_example == "") || (spec_example == $4) ) {
if ( flatten == 0 ) {
if (file_name != "")
close(file_name);
file_name = sprintf("%s/%s",$3, $4);
command = sprintf("mkdir -p %s", $3);
system(command);
......
#! /bin/sh
awk -f extract.awk ../docs/gtk_tut.sgml $1 $2 $3 $4 $5
# extract - extract C source files from GTK Tutorial
# Copyright (C) Tony Gale 1998
# Contact: gale@gtk.org
#
# extract.awk command Switches:
# -c : Just do checking rather than output files
# -f <filename> : Extract a specific file
# -d : Extract files to current directory
if [ -x /usr/bin/gawk ]; then
gawk -f extract.awk ../docs/gtk_tut.sgml $1 $2 $3 $4 $5
else
if [ -x /usr/bin/nawk ]; then
nawk -f extract.awk ../docs/gtk_tut.sgml $1 $2 $3 $4 $5
else
if [ -x /usr/bin/awk ]; then
awk -f extract.awk ../docs/gtk_tut.sgml $1 $2 $3 $4 $5
else
if [ -x /bin/awk ]; then
awk -f extract.awk ../docs/gtk_tut.sgml $1 $2 $3 $4 $5
else
echo "Can't find awk... please edit extract.sh by hand"
fi
fi
fi
fi
/* This file extracted from the GTK tutorial. */
/* example-start helloworld helloworld.c */
/* helloworld.c */
#include <gtk/gtk.h>
/* this is a callback function. the data arguments are ignored in this example.
* More on callbacks below. */
void hello (GtkWidget *widget, gpointer data)
/* This is a callback function. The data arguments are ignored
* in this example. More on callbacks below. */
void hello( GtkWidget *widget,
gpointer data )
{
g_print ("Hello World\n");
}
gint delete_event(GtkWidget *widget, GdkEvent *event, gpointer data)
gint delete_event( GtkWidget *widget,
GdkEvent *event,
gpointer data )
{
g_print ("delete event occured\n");
/* if you return FALSE in the "delete_event" signal handler,
* GTK will emit the "destroy" signal. Returning TRUE means
/* If you return FALSE in the "delete_event" signal handler,
* GTK will emit the "destroy" signal. Returning TRUE means
* you don't want the window to be destroyed.
* This is useful for popping up 'are you sure you want to quit ?'
* This is useful for popping up 'are you sure you want to quit?'
* type dialogs. */
g_print ("delete event occurred\n");
/* Change TRUE to FALSE and the main window will be destroyed with
* a "delete_event". */
return (TRUE);
return(TRUE);
}
/* another callback */
void destroy (GtkWidget *widget, gpointer data)
/* Another callback */
void destroy( GtkWidget *widget,
gpointer data )
{
gtk_main_quit ();
gtk_main_quit();
}
int main (int argc, char *argv[])
int main( int argc,
char *argv[] )
{
/* GtkWidget is the storage type for widgets */
GtkWidget *window;
GtkWidget *button;
/* this is called in all GTK applications. arguments are parsed from
* the command line and are returned to the application. */
gtk_init (&argc, &argv);
/* This is called in all GTK applications. Arguments are parsed
* from the command line and are returned to the application. */
gtk_init(&argc, &argv);
/* create a new window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
/* when the window is given the "delete_event" signal (this is given
* by the window manager (usually the 'close' option, or on the
/* When the window is given the "delete_event" signal (this is given
* by the window manager, usually by the 'close' option, or on the
* titlebar), we ask it to call the delete_event () function
* as defined above. The data passed to the callback
* function is NULL and is ignored in the callback. */
* as defined above. The data passed to the callback
* function is NULL and is ignored in the callback function. */
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (delete_event), NULL);
/* here we connect the "destroy" event to a signal handler.
GTK_SIGNAL_FUNC (delete_event), NULL);
/* Here we connect the "destroy" event to a signal handler.
* This event occurs when we call gtk_widget_destroy() on the window,
* or if we return 'FALSE' in the "delete_event" callback. */
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (destroy), NULL);
/* sets the border width of the window. */
GTK_SIGNAL_FUNC (destroy), NULL);
/* Sets the border width of the window. */
gtk_container_border_width (GTK_CONTAINER (window), 10);
/* creates a new button with the label "Hello World". */
/* Creates a new button with the label "Hello World". */
button = gtk_button_new_with_label ("Hello World");
/* When the button receives the "clicked" signal, it will call the
* function hello() passing it NULL as it's argument. The hello()
* function hello() passing it NULL as its argument. The hello()
* function is defined above. */
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (hello), NULL);
GTK_SIGNAL_FUNC (hello), NULL);
/* This will cause the window to be destroyed by calling
* gtk_widget_destroy(window) when "clicked". Again, the destroy
* signal could come from here, or the window manager. */
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (window));
/* this packs the button into the window (a gtk container). */
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (window));
/* This packs the button into the window (a gtk container). */
gtk_container_add (GTK_CONTAINER (window), button);
/* the final step is to display this newly created widget... */
/* The final step is to display this newly created widget. */
gtk_widget_show (button);
/* and the window */
gtk_widget_show (window);
/* all GTK applications must have a gtk_main(). Control ends here
* and waits for an event to occur (like a key press or mouse event). */
/* All GTK applications must have a gtk_main(). Control ends here
* and waits for an event to occur (like a key press or
* mouse event). */
gtk_main ();
return 0;
return(0);
}
/* example-end */
/* This file extracted from the GTK tutorial. */
/* helloworld2.c */
/* example-start helloworld2 helloworld2.c */
#include <gtk/gtk.h>
/* Our new improved callback. The data passed to this function is printed
* to stdout. */
void callback (GtkWidget *widget, gpointer data)
{
/* Our new improved callback. The data passed to this function
* is printed to stdout. */
void callback( GtkWidget *widget,
gpointer data )
{
g_print ("Hello again - %s was pressed\n", (char *) data);
}
/* another callback */
void delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
{
void delete_event( GtkWidget *widget,
GdkEvent *event,
gpointer data )
{
gtk_main_quit ();
}
int main (int argc, char *argv[])
int main( int argc,
char *argv[] )
{
/* GtkWidget is the storage type for widgets */
GtkWidget *window;
GtkWidget *button;
GtkWidget *box1;
/* this is called in all GTK applications. arguments are parsed from
* the command line and are returned to the application. */
/* This is called in all GTK applications. Arguments are parsed
* from the command line and are returned to the application. */
gtk_init (&argc, &argv);
/* create a new window */
/* Create a new window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
/* this is a new call, this just sets the title of our
/* This is a new call, this just sets the title of our
* new window to "Hello Buttons!" */
gtk_window_set_title (GTK_WINDOW (window), "Hello Buttons!");
/* Here we just set a handler for delete_event that immediately
* exits GTK. */
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (delete_event), NULL);
GTK_SIGNAL_FUNC (delete_event), NULL);
/* sets the border width of the window. */
/* Sets the border width of the window. */
gtk_container_border_width (GTK_CONTAINER (window), 10);
/* we create a box to pack widgets into. this is described in detail
* in the "packing" section below. The box is not really visible, it
/* We create a box to pack widgets into. This is described in detail
* in the "packing" section. The box is not really visible, it
* is just used as a tool to arrange widgets. */
box1 = gtk_hbox_new(FALSE, 0);
/* put the box into the main window. */
/* Put the box into the main window. */
gtk_container_add (GTK_CONTAINER (window), box1);
/* creates a new button with the label "Button 1". */
/* Creates a new button with the label "Button 1". */
button = gtk_button_new_with_label ("Button 1");
/* Now when the button is clicked, we call the "callback" function
* with a pointer to "button 1" as it's argument */
* with a pointer to "button 1" as its argument */
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (callback), (gpointer) "button 1");
/* instead of gtk_container_add, we pack this button into the invisible
GTK_SIGNAL_FUNC (callback), (gpointer) "button 1");
/* Instead of gtk_container_add, we pack this button into the invisible
* box, which has been packed into the window. */
gtk_box_pack_start(GTK_BOX(box1), button, TRUE, TRUE, 0);
/* always remember this step, this tells GTK that our preparation for
* this button is complete, and it can be displayed now. */
/* Always remember this step, this tells GTK that our preparation for
* this button is complete, and it can now be displayed. */
gtk_widget_show(button);
/* do these same steps again to create a second button */
/* Do these same steps again to create a second button */
button = gtk_button_new_with_label ("Button 2");
/* call the same callback function with a different argument,
/* Call the same callback function with a different argument,
* passing a pointer to "button 2" instead. */
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (callback), (gpointer) "button 2");
GTK_SIGNAL_FUNC (callback), (gpointer) "button 2");
gtk_box_pack_start(GTK_BOX(box1), button, TRUE, TRUE, 0);
/* The order in which we show the buttons is not really important, but I
* recommend showing the window last, so it all pops up at once. */
gtk_widget_show(button);
......@@ -86,9 +87,9 @@ int main (int argc, char *argv[])
gtk_widget_show (window);
/* rest in gtk_main and wait for the fun to begin! */
/* Rest in gtk_main and wait for the fun to begin! */
gtk_main ();
return 0;
}
return(0);
}
/* example-end */
/* This file extracted from the GTK tutorial. */
/* packbox.c */
/* example-start packbox packbox.c */
#include <stdio.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include "gtk/gtk.h"
void
delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
void delete_event( GtkWidget *widget,
GdkEvent *event,
gpointer data )
{
gtk_main_quit ();
}
......@@ -15,18 +13,21 @@ delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
/* Make a new hbox filled with button-labels. Arguments for the
* variables we're interested are passed in to this function.
* We do not show the box, but do show everything inside. */
GtkWidget *make_box (gint homogeneous, gint spacing,
gint expand, gint fill, gint padding)
GtkWidget *make_box( gint homogeneous,
gint spacing,
gint expand,
gint fill,
gint padding )
{
GtkWidget *box;
GtkWidget *button;
char padstr[80];
/* create a new hbox with the appropriate homogeneous and spacing
* settings */
/* Create a new hbox with the appropriate homogeneous
* and spacing settings */
box = gtk_hbox_new (homogeneous, spacing);
/* create a series of buttons with the appropriate settings */
/* Create a series of buttons with the appropriate settings */
button = gtk_button_new_with_label ("gtk_box_pack");
gtk_box_pack_start (GTK_BOX (box), button, expand, fill, padding);
gtk_widget_show (button);
......@@ -39,7 +40,7 @@ GtkWidget *make_box (gint homogeneous, gint spacing,
gtk_box_pack_start (GTK_BOX (box), button, expand, fill, padding);
gtk_widget_show (button);
/* create a button with the label depending on the value of
/* Create a button with the label depending on the value of
* expand. */
if (expand == TRUE)
button = gtk_button_new_with_label ("TRUE,");
......@@ -64,8 +65,8 @@ GtkWidget *make_box (gint homogeneous, gint spacing,
return box;
}
int
main (int argc, char *argv[])
int main( int argc,
char *argv[])
{
GtkWidget *window;
GtkWidget *button;
......@@ -91,7 +92,7 @@ main (int argc, char *argv[])
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
/* You should always remember to connect the destroy signal to the
* main window. This is very important for proper intuitive
* main window. This is very important for proper intuitive
* behavior */
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (delete_event), NULL);
......@@ -102,7 +103,7 @@ main (int argc, char *argv[])
* on top of the other in this vbox. */
box1 = gtk_vbox_new (FALSE, 0);
/* which example to show. These correspond to the pictures above. */
/* which example to show. These correspond to the pictures above. */
switch (which) {
case 1:
/* create a new label. */
......@@ -117,16 +118,16 @@ main (int argc, char *argv[])
* order. */
gtk_box_pack_start (GTK_BOX (box1), label, FALSE, FALSE, 0);
/* show the label */
/* Show the label */
gtk_widget_show (label);
/* call our make box function - homogeneous = FALSE, spacing = 0,
/* Call our make box function - homogeneous = FALSE, spacing = 0,
* expand = FALSE, fill = FALSE, padding = 0 */
box2 = make_box (FALSE, 0, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, FALSE, 0);
gtk_widget_show (box2);
/* call our make box function - homogeneous = FALSE, spacing = 0,
/* Call our make box function - homogeneous = FALSE, spacing = 0,
* expand = FALSE, fill = FALSE, padding = 0 */
box2 = make_box (FALSE, 0, TRUE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, FALSE, 0);
......@@ -137,17 +138,17 @@ main (int argc, char *argv[])
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, FALSE, 0);
gtk_widget_show (box2);
/* creates a separator, we'll learn more about these later,
/* Creates a separator, we'll learn more about these later,
* but they are quite simple. */
separator = gtk_hseparator_new ();
/* pack the separator into the vbox. Remember each of these
/* Cack the separator into the vbox. Remember each of these
* widgets are being packed into a vbox, so they'll be stacked
* vertically. */
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 5);
gtk_widget_show (separator);
/* create another new label, and show it. */
/* Create another new label, and show it. */
label = gtk_label_new ("gtk_hbox_new (TRUE, 0);");
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_box_pack_start (GTK_BOX (box1), label, FALSE, FALSE, 0);
......@@ -163,7 +164,7 @@ main (int argc, char *argv[])
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, FALSE, 0);
gtk_widget_show (box2);
/* another new separator. */
/* Another new separator. */
separator = gtk_hseparator_new ();
/* The last 3 arguments to gtk_box_pack_start are: expand, fill, padding. */
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 5);
......@@ -173,7 +174,7 @@ main (int argc, char *argv[])
case 2:
/* create a new label, remember box1 is a vbox as created
/* Create a new label, remember box1 is a vbox as created
* near the beginning of main() */
label = gtk_label_new ("gtk_hbox_new (FALSE, 10);");
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
......@@ -218,27 +219,28 @@ main (int argc, char *argv[])
case 3:
/* This demonstrates the ability to use gtk_box_pack_end() to
* right justify widgets. First, we create a new box as before. */
/* This demonstrates the ability to use gtk_box_pack_end() to
* right justify widgets. First, we create a new box as before. */
box2 = make_box (FALSE, 0, FALSE, FALSE, 0);
/* create the label that will be put at the end. */
/* Create the label that will be put at the end. */
label = gtk_label_new ("end");
/* pack it using gtk_box_pack_end(), so it is put on the right side
* of the hbox created in the make_box() call. */
/* Pack it using gtk_box_pack_end(), so it is put on the right
* side of the hbox created in the make_box() call. */
gtk_box_pack_end (GTK_BOX (box2), label, FALSE, FALSE, 0);
/* show the label. */
/* Show the label. */
gtk_widget_show (label);
/* pack box2 into box1 (the vbox remember ? :) */
/* Pack box2 into box1 (the vbox remember ? :) */
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, FALSE, 0);
gtk_widget_show (box2);
/* a separator for the bottom. */
/* A separator for the bottom. */
separator = gtk_hseparator_new ();
/* this explicitly sets the separator to 400 pixels wide by 5 pixels
* high. This is so the hbox we created will also be 400 pixels wide,
/* This explicitly sets the separator to 400 pixels wide by 5 pixels
* high. This is so the hbox we created will also be 400 pixels wide,
* and the "end" label will be separated from the other labels in the
* hbox. Otherwise, all the widgets in the hbox would be packed as
* hbox. Otherwise, all the widgets in the hbox would be packed as