Re: Having an applet inheriting the panel's color



As Havoc mentioned, you probably need to be passing around a pointer to
the color rather than the color itself...the signal handlers arent
really setup for that...also, you probably will want to allocate the
color, or the background may just turn black.
Later,
Chris

On 22 Aug 2001 21:20:51 +0200, Francois Taiani wrote:
> 
> Hi everybody,
> 
> I'm trying to have an applet taking the same background color as the
> panel it is plugged in. I'm working on the example proposed
> http://developer.gnome.org/doc/API/panel/index.html. I've added a
> "back_change" signal handler on the applet, and I do the following code
> in the call back:
> 
> -------------
> static void
> applet_back_change(GtkWidget* widget     , PanelBackType back_type ,
>                    GdkPixmap* back_pixmap, GdkColor      back_color,
>                    gpointer data )
> {
>   g_print(_("Background was changed.\n"));
>   gdk_window_set_background (  widget->window,
>                                &back_color );
> } /* EndFunct applet_back_change */
> -------------
> 
> The callback is correctly called at the right time, but the appplet's
> color is not set. Would anyone have any idea of what I'm doing wrong.
> 
> Thanks a lot
> 
> Francois
> 
> _______________________________________________
> gnome-devel-list mailing list
> gnome-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devel-list
--

http://glimmer.sourceforge.net - My pet project
http://uberhackers.dhs.org - My personal website

./configure --prefix=/dev/mocha --enable-caffeine





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