Hello. I represent verbdev.com Few days ago we've got an order to implement some features for xfce panel plugin as follows: 1. Launch user-defined program on double-click on panel clock (default: orage). 2. Allow user define own format string for a clock (strftime-based). We have contacted Olivier Fourdan, and he was glad to hear about these changes. He suggested us to submit our patch to bugzilla. Following this request we have 1. extended functionality of xfce4-clock panel plugin to handle double click event and launch user-defined application. 2. extended interface of xfce_clock widget (in libxfcegui4) to allow user switch clock formatting. Due to obvious reasons, user-defined clock view works only for digital mode. 3. changed plugin's "properties" dialog to allow user enter program to run and format string for clock. Unfortunately, we've made a sad mistake, and applied formatting rules of xfce4-panel module to libxfcegui4 files. We are really very sorry, but due to a mess with backups originally formatted files were lost :( So, to apply our patch corretly, first you have to indent libxfcegui4/libxfcegui4/xfce_clock.h and libxfcegui4/libxfcegui4/xfce_clock.c by the rules, contained in .indent.pro file (xfce4-panel/.indent.pro), and then apply our patch. Sorry once againg, guys. This module is still in testing, but looks working now, so it would be great to put current patch in review and to discuss inclusion of it in the upcoming release. You can download patch here: http://verbdev.com/files/xfce.diff ps: Please, don't blame us, this is our first contribution :> And if there is any way we can assist you in adopting this patch to xfce, please contact us (dev@verbdev.com).
Created attachment 769 xfce4-clock panel plugin and libxfcegui4 patch
Looks fine for the libxfcegui4 patch. What for the <wchar.h> include is needed? I'll copy Jasper about the patch for the panel
> Looks fine for the libxfcegui4 patch. Sounds great :) > What for the <wchar.h> include is needed? My fault again. I was playing with locale-dependent strings in the formatting. It's safe to remove it. > I'll copy Jasper about the patch for the panel Thanx :)
The libxfcegui4 part is applied. The patch did not apply and required to edit each file to apply the changes by hand. The format_string was leaked, it's fixed.
> The libxfcegui4 part is applied. Excellent news :) > The patch did not apply and required to edit each file to apply the changes by hand. Even after indent w/indent.pro? Have you tried this? > The format_string was leaked, it's fixed. Damn once again. Can you tell me where exatly? I thought that I had reviewed all the memory allocation places :(
(In reply to comment #5) > > The format_string was leaked, it's fixed. > Damn once again. Can you tell me where exatly? I thought that I had reviewed > all the memory allocation places :( > http://svn.xfce.org/diff.php?repname=xfce4&path=%2Flibxfcegui4%2Ftrunk%2Flibxfcegui4%2Fxfce_clock.c&rev=23084&sc=1
Most of this has been fixed in the new clock plugin. Click mode is being discussed om the ml.