#include <config.h>
#include <applet-widget.h>
int
main(int argc, char **argv)
{
GtkWidget *applet;
GtkWidget *label;
/* Initialize the i18n stuff */
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
textdomain (PACKAGE);
/* intialize, this will basically set up the applet, corba and
call gnome_init */
applet_widget_init("hello-applet", NULL, argc, argv, NULL,0,NULL);
/* create a new applet_widget */
applet = applet_widget_new("hello-applet");
/* in the rare case that the communication with the panel
failed, error out */
if (!applet)
g_error("Can't create applet!\n");
/* create the widget we are going to put on the applet */
label = gtk_label_new(_("Hello There!"));
gtk_widget_show(label);
/* add the widget to the applet-widget, and thereby actually
putting it "onto" the panel */
applet_widget_add (APPLET_WIDGET (applet), label);
gtk_widget_show (applet);
/* special corba main loop */
applet_widget_gtk_main ();
return 0;
}
|