panel plugin naming conventions

Grant McWilliams grantmasterflash at gmail.com
Wed May 16 20:25:20 CEST 2007


It also is being used in panels.xml as an identifier it looks like. I was a
little confused because the order wasn't being stored in the
diskperf-4343434343.rc files. I see it's in panels.xml like this

 <item name="diskperf" id="11793370246"/>

So I come back to my first question, what's the best way to create this
number using the shell?

So if I'm following you correctly I just need to make sure that if I use
date +'%s' that I add a digit [1-9] to the end and make sure it doesn't
already exist?

Grant

On 5/16/07, Nick Schermer <nickschermer at gmail.com> wrote:
>
> It looks like a stamp, but it's not:
>
> /* unique number: pseudo-random time() + counter */
> g_snprintf (id, 30, "%ld%d", (glong) time (NULL), counter++);
>
> This to prevent the same name when multiple items are handled in 1 second.
>
> Nick
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://foo-projects.org/mailman/listinfo/xfce4-dev
>



-- 
Some people, when confronted with a problem, think "I know, I'll use
Windows."
Now they have two problems.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20070516/2764f9ac/attachment.html>


More information about the Xfce4-dev mailing list