/*   FILE: %(FILE) -- 
 * AUTHOR: %(FULLNAME) <%(EMAIL)>
 *   DATE: %(DAY) %(MONTH) %(YEAR)
 *
 * Copyright (C) %(YEAR) %(FULLNAME) <%(EMAIL)>
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include <applet-widget.h>
#include <config.h>

extern char *%(PROJ_NAME:FIXME)_usage;

/* ============================ display_about () =========================== */
void display_about(AppletWidget * applet, gpointer data)
{
    const gchar *authors[] = { "W. Michael Petullo <wnc@flyn.org>", NULL };
    GtkWidget *about =
	gnome_about_new("%(PROJ_NAME)", VERSION,
			"(C) 2000 %(FULLNAME)", authors,
			"FIXME: one line descrip.",
			NULL);
    gtk_widget_show(about);
}

/* ============================ create_menu () ============================= */
void create_menu(GtkWidget ** applet)
{
    applet_widget_register_stock_callback(APPLET_WIDGET(*applet),
					  "about",
					  GNOME_STOCK_MENU_ABOUT,
					  _("About"),
					  &display_about, NULL);
}

/* ============================ create_applet () =========================== */
void create_applet(int argc, char *argv[], GtkWidget ** applet,
		   wnc_data_t * wnc_data)
{
    applet_widget_init("%(PROJ_NAME)_applet", VERSION, argc, argv, NULL, 0, NULL);
    *applet = applet_widget_new("%(PROJ_NAME)_applet");
    gtk_widget_show(*applet);
}

%(c_delim fn main)
int main(int argc, char *argv[], char *env[])
{
    GtkWidget *applet;
    GtkWidget *selection;
    create_applet(argc, argv, &applet);
    create_menu(&applet);
    create_selection(&selection, &applet);
    applet_widget_add(APPLET_WIDGET(applet), selection);
    applet_widget_gtk_main();
    fprintf(stderr, "Did not exit properly\n");
    exit(0);
}
