! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-clock panel plugin and libxfcegui4 enhancement.
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Libxfcegui4
Component:
General

Comments

Description Tim Baga 2006-09-04 13:51:37 CEST
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).
Comment 1 Tim Baga 2006-09-04 13:53:33 CEST
Created attachment 769 
xfce4-clock panel plugin and libxfcegui4 patch
Comment 2 Olivier Fourdan editbugs 2006-09-04 18:51:34 CEST
Looks fine for the libxfcegui4 patch. What for the <wchar.h> include is needed?

I'll copy Jasper about the patch for the panel
Comment 3 Tim Baga 2006-09-04 20:17:18 CEST
> 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 :)
Comment 4 Olivier Fourdan editbugs 2006-09-04 20:46:51 CEST
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.
Comment 5 Tim Baga 2006-09-04 21:19:19 CEST
> 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 :(
Comment 6 Mike Massonnet editbugs 2006-09-04 22:32:54 CEST
(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
Comment 7 Nick Schermer editbugs 2007-07-09 08:22:34 CEST
Most of this has been fixed in the new clock plugin. Click mode is being discussed om the ml.

Bug #2264

Reported by:
Tim Baga
Reported on: 2006-09-04
Last modified on: 2009-07-14

People

Assignee:
Xfce Bug Triage
CC List:
2 users

Version

Version:
unspecified

Attachments

Additional information