[PATCH] Panel Clock Improvements: I18N tooltip, calender popup
Jasper Huijsmans
jasper at moongroup.com
Fri Dec 5 15:38:42 CET 2003
Op vr 05-12-2003, om 15:02 schreef Oliver M. Bolzer:
> Hi!
>
> On Thu, Dec 04, 2003 at 04:19:33PM +0100, Mickael Graf <mgf at bredband.net> wrote...
>
> > >I'm not sure. I was thinking about running xfcalendar from the clock.
> > >That would give you additional appointments.
>
> > Left-Click on the clock to launch xfcalendar w/ or w/o borders sounds
> > nice, and left-click again on the clock close it.
> >
> > There's two way for doing this:
> >
> > - integrate codes from xfcalendar and clock into one
> > - launch xfcalendar as a separate application
>
> Running away from tons of other stuff I should be doing, I tried to take
> the good of both ways. The attached patches to the clock plugin and xfcalender
> implement the following when the clock is clicked. This is intended as demonstration
> for one possible behaviour.
>
> - Do nothing if xfcalender is not already running
> - If xfcalender is running and calender is visible, hide it (like clicking on
> tray icon)
> - If xfcalender is running and calender is hidden, show it close to the clock
>
Hey Oliver, it seems you read my mind, this is the solution I was going
to propose myself ;-)
I like it, but have a some alternative ideas.
I was thinking that the clock should simply run 'xfcalendar'. The toggle
behaviour is rather nice, so that could be implemented in xfcalendar as
well. The clock plugin doesn't have to know anything and can remain very
simple.
So there are three situations:
* xfcalendar is not running -> start xfcalendar
* calendar is hidden -> show calendar
* calendar is being shown -> hide calendar.
So two things need to be added to the calendar: toggle behaviour (your
patch to the clock put in xfcalendar) and remembering the position of
the calendar.
The advantage is that all implementation is inside xfcalendar, so it
doesn't need to be kept in sync. If Korbinus decides to start using
D-bus for communication it will still work ;-)
Another thing is that is can also be used in keybindings.
The only thing that will not work with this method is the special
calendar positioning, but I'm not sure that is necessary. If you feel
strongly about this, it might be possible to come up with a command line
option to xfcalendar that takes care of this.
> The positioning of the popoup is imperfect in certain cases (panel in lower
> screen half in horizontal mode and panel in right half in vertical mode),
> because the panel would need the calender's size to calculate that correctly.
>
> >From the perspective of a user, the clock-xfcalender interaction could look
> like this
>
> - clock has a built-in calender. Dead simple, something like the patch
> I sent before
> - configuration option of clock "Display xfcalender instead of built-in calender"
> - if option selected, clock launches xfcalender if not already running and does what
> this patch does
>
> What do you think?
Forget about options ;-) We have xfcalendar, it's a perfect fit, if you
don't install it, you get no calendar.
Jasper
PS
These ideas weren't meant as final decisions, so please discuss.
More information about the Xfce4-dev
mailing list