Re: using --activate-goad-server
- From: josh <uzs33d uni-bonn de>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: using --activate-goad-server
- Date: Sun, 28 Jan 2001 10:46:24 +0100
I forgot some relevant info in my first posting. Here's an update
showing what I return in moon_activator. I also forgot to mention that
the applet can be launched from the gnome menu if I remove the
--activate-goad-server=glunarclock line from the .desktop file, and that
I verified that in moon_activator goad_id="glunarclock".
-- josh
Here's the updated bits of code:
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);
.
.
.
.
.
.
return applet_widget_corba_activate(moon->applet, poa, goad_id,
params, impl_ptr,
environment);
}
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;
}
Here's my .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 .gnorba:
[glunarclock]
type=exe
repo_id=IDL:GNOME/Applet:1.0
description=GNOME Lunar Clock Applet
location_info=glunarclock
--
"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]