diff options
author | GMT 1998 Tony Gale <gale@gtk.org> | 1998-12-10 17:31:04 +0000 |
---|---|---|
committer | Tony Gale <gale@src.gnome.org> | 1998-12-10 17:31:04 +0000 |
commit | 3821880398cc553882b9f1fc5905046518b9cd4e (patch) | |
tree | 88867e7f0ad2d19deeb5f850e920827b4232a6ef /examples/scrolledwin | |
parent | 600ef4e7d1b45dd4cd88606b6da402ffe2a885bf (diff) | |
download | gtk+-3821880398cc553882b9f1fc5905046518b9cd4e.tar.gz |
- re-write the GtkProgressBar section to the 1.1 API. - add an Appendix
Thu Dec 10 17:58:49 GMT 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
- re-write the GtkProgressBar section to the 1.1 API.
- add an Appendix listing all the signals
(apologies to TimJ for taking so long in using his hard work
in automating the extraction - thanx Tim).
* examples/*: bring them all upto the tutorial versions
Diffstat (limited to 'examples/scrolledwin')
-rw-r--r-- | examples/scrolledwin/scrolledwin.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/examples/scrolledwin/scrolledwin.c b/examples/scrolledwin/scrolledwin.c index af3666a1aa..f222d75101 100644 --- a/examples/scrolledwin/scrolledwin.c +++ b/examples/scrolledwin/scrolledwin.c @@ -1,6 +1,4 @@ -/* This file extracted from the GTK tutorial. */ - -/* scrolledwin.c */ +/* example-start scrolledwin scrolledwin.c */ #include <gtk/gtk.h> @@ -22,7 +20,7 @@ int main (int argc, char *argv[]) /* Create a new dialog window for the scrolled window to be * packed into. A dialog is just like a normal window except it has a - * vbox and a horizontal seperator packed into it. It's just a shortcut + * vbox and a horizontal separator packed into it. It's just a shortcut * for creating dialogs */ window = gtk_dialog_new (); gtk_signal_connect (GTK_OBJECT (window), "destroy", @@ -38,7 +36,7 @@ int main (int argc, char *argv[]) /* the policy is one of GTK_POLICY AUTOMATIC, or GTK_POLICY_ALWAYS. * GTK_POLICY_AUTOMATIC will automatically decide whether you need - * scrollbars, wheras GTK_POLICY_ALWAYS will always leave the scrollbars + * scrollbars, whereas GTK_POLICY_ALWAYS will always leave the scrollbars * there. The first one is the horizontal scrollbar, the second, * the vertical. */ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), @@ -62,13 +60,13 @@ int main (int argc, char *argv[]) /* this simply creates a grid of toggle buttons on the table * to demonstrate the scrolled window. */ for (i = 0; i < 10; i++) - for (j = 0; j < 10; j++) { - sprintf (buffer, "button (%d,%d)\n", i, j); - button = gtk_toggle_button_new_with_label (buffer); - gtk_table_attach_defaults (GTK_TABLE (table), button, - i, i+1, j, j+1); - gtk_widget_show (button); - } + for (j = 0; j < 10; j++) { + sprintf (buffer, "button (%d,%d)\n", i, j); + button = gtk_toggle_button_new_with_label (buffer); + gtk_table_attach_defaults (GTK_TABLE (table), button, + i, i+1, j, j+1); + gtk_widget_show (button); + } /* Add a "close" button to the bottom of the dialog */ button = gtk_button_new_with_label ("close"); @@ -92,3 +90,4 @@ int main (int argc, char *argv[]) return(0); } +/* example-end */ |