Panel design [was: Re: About the clock updates]

Olivier Fourdan fourdan at
Thu Sep 26 11:38:53 CEST 2002

Hi Jasper,

> Ok, agreed. Just thought I'd let you know in case you overlooked. It's 
> still useable. It's just that it used to fit and now it doesn't, so it's 
> a small regression, but that's alright in this stage of the development.

Disagree. It's not a regression, it's in line with the design decision
we took when we discussed on the IRC. It really is what I meant.

> My guess is that the clock structure (not the widget) contains a value 
> for the mode and that it isn't updated anymore. This should be an easy fix.

Fixed in CVS. Sorry my fault, too much clean up...


> I cannot agree more. It has evolved from a prototype I wrote from just a 
> basic idea that it would be nice to have plugins. There has never been a 
>   good audit of the design.
> Keep in mind that I'm really learning all this stuff as I go along. Two 
> years ago I didn't know anything about memory management in C. Now I can 
> at least discuss it with you. Before I started xfce4 I didn't know 
> anything about dynamically loading modules. Now I'm starting to 
> understand things little by little.

We are all learning, this is the main benefit we (individuals) can get
from such a free project.

We learn from each other, we learn from other projects and we learn from
our own tries/failures.

> It's been a great experience for me so far, but designing a software 
> application is something totally new. I really appreciate any help you 
> can give me on that.

Don't forget, I'm just like you, I'm learning ;-) The day I'll stop
learning, I guess it will be time for retirement. 

And what you did is great, because it gives us all a better sight on
what we want and how we can achieve it.


> I think this is what gkrellm does as well. It will take a bit more 
> memory, but it will be a lot more robust.
> This is quite interesting. GObject has some functions for making a 
> 'GBoxed' type. We could make a panel control a boxed type and add a copy 
> function to the structure. Then if you choose a module in the dialog it 
> is copied from the module module manger list. May not be worth the 
> trouble though.

I'm not thinking of coying objects, that's risky and would lead to nasty
bugs IMHO.

I'm thinking of loading the module, and use the modules function "new"
to create widgets on demand. No copy.

> Perhaps we could even make a new tab on the global config dialog for 
> modules and let the user install or uninstall modules. Or just a button 
> saying 'Update module list'. Well, I'm just brainstorming here.

That would requires hooks in every modules, because what happen if a
module is removed from the list while being present in the panel ?

Let's keep things simple, at first.

> Well the ref() part is there because I have to remove the widget from 
> it's container every time the button position changes. The ref() is 
> necessary to prevent it from being destroyed.

Removing a widget from its container destroy the widget ?

> There are probably more places in the code where I do this. Every time I 
> unref a gtk widget (as oposed to a pixbuf, which may be unreffed) it has 
> to be considered a bug!
There are quite a few along the code...

> As I said, you're help is very welcome. Ever since I made the big 
> changes to have all panel components use the same interface I have a 
> feeling that it's too complicated and there must be a way to simplify stuff.

Really glad you agree. I'm also really glad that, with xfce4, we start
working as a team rather than we worked before (ie, one developper for
one project).

Olivier               <fourdan at>  
XFce is a lightweight  desktop  environment  for  various *NIX systems.
Designed for productivity,  it loads  and  executes  applications fast,
while conserving  system resources. XFce is all free software, released
under GNU General Public License.    Available from

More information about the Xfce4-dev mailing list