using --activate-goad-server



I have an applet and when I use the standard applet.desktop format with
the --active-goad-server line and launch the applet from the gnome
applet menu, only a little dot appears in the panel and the applet never
starts.  Starting the applet by hand works.


Here's the relevent part of the code (If the code below looks familiar,
it's because it was basically stolen from George Lebl's Wanda the Fish.
;^)

In the following PACKAGE is defined to "glunarclock" (by the auto
generated config.h).  The APPLET_ACTIVATE macro is defined in
applet-widget.h and passes PACKAGE to moon_activator as the 
goad_id.

int main(int argc, char **argv)
{
        gpointer moon_impl;

        bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
        textdomain(PACKAGE);

        applet_widget_init(PACKAGE, VERSION, argc, argv, NULL, 0, NULL);

        APPLET_ACTIVATE(moon_activator, PACKAGE, &moon_impl);

        applet_widget_gtk_main();

        APPLET_DEACTIVATE(moon_deactivator, PACKAGE, moon_impl);

        return 0;
}

static CORBA_Object
moon_activator(PortableServer_POA poa,
               const char *goad_id,
               const char **params,
               gpointer *impl_ptr,
               CORBA_Environment *environment)
{
        Moon *moon;

        gdk_rgb_init();
        gtk_widget_set_default_colormap(gdk_rgb_get_cmap());
        gtk_widget_set_default_visual(gdk_rgb_get_visual());

        moon = g_new0(Moon, 1);

        moon->applet = applet_widget_new(goad_id);
.
.
.
.




Here's my glunarclock.desktop file:

[Desktop Entry]
Name=GNOME Lunar Clock
Name[de]=GNOME Monduhr
Comment=Displays the current phase of the moon
Comment[de]=Zeigt die aktuellee Phase des Mondes an
Description=Displays the current phase of the moon
Description[de]=Zeigt die aktuellee Phase des Mondes an
Exec=glunarclock --activate-goad-server=glunarclock
Icon=glunarclock-logo.png
Terminal=0
Type=PanelApplet

Here's my glunarclock.gnorba:

[glunarclock]
type=exe
repo_id=IDL:GNOME/Applet:1.0
description=GNOME Lunar Clock Applet
location_info=glunarclock



What am I doing wrong?  Thanks for anybody's help.

Josh

-- 
"I'll rob that rich person and give his gold to some poor undeserving
slob.  That will *prove* I'm Robin Hood."
        -- Daffy Duck, "Robin Hood Daffy", [1958, Chuck Jones]




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