/* Define this to be some unused applet to pretend to be, for testing. */
#define TEST_CASE_OAFIID "OAFIID:GNOME_GeyesApplet_Factory"

/* Define this to set PANEL_APPLET_HAS_HANDLE */
#undef TEST_CASE_WITH_HANDLE

#ifdef TEST_CASE_WITH_HANDLE
#  define TEST_CASE_FLAGS	(PANEL_APPLET_HAS_HANDLE)
#else
#  define TEST_CASE_FLAGS	(0)
#endif

#include <gtk/gtkcontainer.h>
#include <gtk/gtklabel.h>
#include <panel-applet.h>

static gboolean
test_case_factory (PanelApplet *applet, const gchar *iid, gpointer date)
{
	const int hints[] = { 200, 0 };
	GtkWidget *label;

	panel_applet_set_flags (applet, PANEL_APPLET_EXPAND_MAJOR |
					PANEL_APPLET_EXPAND_MINOR |
					TEST_CASE_FLAGS);
	panel_applet_set_size_hints (applet, hints, 2, 50);

	label = gtk_label_new ("Hello, world!  I am a long line of text.");
	gtk_container_add (GTK_CONTAINER (applet), label);

	gtk_widget_show_all (GTK_WIDGET (applet));
	g_debug ("Successfully created a test case applet");
	return TRUE;
}

PANEL_APPLET_BONOBO_FACTORY (TEST_CASE_OAFIID,
			     PANEL_TYPE_APPLET,
			     "Test Case",
			     "0",
			     test_case_factory,
			     NULL);
