Problems writing (tgauge) panel applet

I'm trying to write a panel applet to display a graphical CPU
temperature gauge, using lm-sensors. If I run it from a terminal, or
from "Run..." in the GNOME menu, it works normally, but if I quit it,
then select Reload from the box that appears, it doesn't reload, but a
little icon appears instead, and there appears to be no process
associated with it. I think the icon is gnome-unknown.xpm on a black
background, at half size or less.

If I restart Gnome, the same thing happens, I just get the unknown icon
and no process. If I start it from the Add to panel menu, I get the
unknown icon, but the applet starts too and works normally (it looks
like the unknown icon appears first because it appears to the left of
the working applet), and I can remove the unknown icon.

Can anyone work out what's going wrong from this information. Below are
the main function (tggtk->tgxpm->widget is a GtkPixmap), and the
/usr/share/applets/Monitors/tgauge.desktop and
/etc/CORBA/servers/tgauge.gnorba files. The tgauge-applet executable is
sym-linked into /usr/bin and its icon into /usr/share/pixmaps.

I just had a thought and renamed the CORBA and desktop files from
tgauge.* to tgauge-applet.*, but it didn't seem to make a difference.

#include "tggtk.h"

#include <applet-widget.h>

int main(int argc, char **argv)
    GtkWidget *applet;
    TGgtkData *tggtk;

    applet_widget_init(PACKAGE, VERSION, argc, argv, NULL, 0, NULL);
    applet = applet_widget_new(PACKAGE);

    tggtk = tggtk_new("/proc/sys/dev/sensors/via686a-isa-6000/temp1", 3, 
	    1.0, 0.0, 12, 78, "default", 2000);
    applet_widget_add(APPLET_WIDGET(applet), tggtk->tgxpm->widget);
    return 0;

[Desktop Entry]
Name=Temperature gauge
Comment=Temperature gauge for CPU etc

description=Temperature gauge

TH *

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]