diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-01-03 19:26:36 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-01-03 19:26:36 +0000 |
commit | 44ec61dd97f1e159457b24458cf86ec39660efd7 (patch) | |
tree | 036b478f431462c22a8e0464d58854b2e86f4233 /examples/statusbar | |
parent | 6803d93d38eb7f1cf09b89eeaf0cb414ab001d15 (diff) | |
download | gtk+-44ec61dd97f1e159457b24458cf86ec39660efd7.tar.gz |
Re-extract.
2005-01-03 Matthias Clasen <mclasen@redhat.com>
* examples/*: Re-extract.
* docs/tutorial/gtk-tut.sgml: Small corrections.
Diffstat (limited to 'examples/statusbar')
-rw-r--r-- | examples/statusbar/statusbar.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/examples/statusbar/statusbar.c b/examples/statusbar/statusbar.c index 44d9053bd6..eab9a2a4a1 100644 --- a/examples/statusbar/statusbar.c +++ b/examples/statusbar/statusbar.c @@ -1,28 +1,25 @@ -#include <config.h> #include <stdlib.h> #include <gtk/gtk.h> #include <glib.h> GtkWidget *status_bar; -void push_item( GtkWidget *widget, - gpointer data ) +static void push_item( GtkWidget *widget, + gpointer data ) { static int count = 1; - char buff[20]; + gchar *buff; - g_snprintf (buff, 20, "Item %d", count++); + buff = g_strdup_printf ("Item %d", count++); gtk_statusbar_push (GTK_STATUSBAR (status_bar), GPOINTER_TO_INT (data), buff); - - return; + g_free (buff); } -void pop_item( GtkWidget *widget, - gpointer data ) +static void pop_item( GtkWidget *widget, + gpointer data ) { gtk_statusbar_pop (GTK_STATUSBAR (status_bar), GPOINTER_TO_INT (data)); - return; } int main( int argc, |