/* GNOME cpuload/memload panel applet * (C) 1997 The Free Software Foundation * * Authors: Tim P. Gerla * Martin Baulig * * With code from wmload.c, v0.9.2, apparently by Ryan Land, rland@bc1.com. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include "global.h" static gint applet_save_session (GtkWidget *widget, char *privcfgpath, char *globcfgpath, gpointer data) { return FALSE; } /* start a new instance of the swapload applet */ GtkWidget * make_swapload_applet (const gchar *goad_id) { GtkWidget *applet; LoadGraph *g; /* create a new applet_widget */ applet = applet_widget_new (goad_id); /* in the rare case that the communication with the panel failed, error out */ if (!applet) g_error ("Can't create applet!\n"); g = load_graph_new (2, N_("Swap Load"), &multiload_properties.swapload, multiload_properties.swapload.adj_data[0], multiload_properties.swapload.adj_data[1], multiload_properties.swapload.adj_data[2], GetSwap); applet_widget_add (APPLET_WIDGET(applet), g->frame); gtk_widget_show (applet); load_graph_start (g); applet_widget_register_stock_callback (APPLET_WIDGET(applet), "properties", GNOME_STOCK_MENU_PROP, _("Properties..."), multiload_properties_cb, g); return applet; }