Re: How to write an applet?



> > In the source distribution of gnome-core, there should be a file called
> > APPLET_WRITING which is sort of the official doc of the applet-widget
> > library.
> Since I dont have the source-distribution of gnome (at least I think I dont
> have it since I use precompiled debian potato packages ...) would you please
> send me the files you mentioned ?
Ok, I found the file APPLET_WRITING and tried to COMPILE the example, which
did not work (the compiling, that is). I started to patch it a bit while 
looking in applet-widget.h and came up with the following :
||
|| < /*#include <config.h>*/
|| ---
|| > #include <config.h>
|| 5,6d4
|| < #define PACKAGE "test_applet_goff"
|| < 
|| 19,20c17,18
|| <         applet_widget_init("hello_applet", NULL, argc, argv,
|| <                            NULL, 0, NULL);
|| ---
|| >         applet_widget_init_defaults("hello_applet", NULL, argc, argv, 0,
|| >                                     NULL, argv[0]);
|| 23c21
|| <         applet = applet_widget_new(PACKAGE);
|| ---
|| >         applet = applet_widget_new();

in words: I removed the include of config.h (which gcc didnt find), defined
a PACKAGE, changed applet_widget_init_defaults() to applet_widget_init() and 
set all params that were unknown to me to 0 or NULL and finally I added 
PACKAGE to applet_widget_new().

Did I do it right? I´m still a blind man poking with a very short stick ...

mfg
-- 
Andreas Sliwka   | goff@nef.wh.uni-dortmund.de | ICQ goff:13961062




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