[gDesklets] Proposed Updates for Calendar Display in desklets-basic



Hi everybody,

I want to propose some updates to the Calendar Display v0.75 that I recently made. Most of them were done to make a possible next step, namely subscriptions to multiple calendars, somehow easier. Regarding this, maybe Joe and the other contributors to the Calendar Display can comment on their opinion about whether multiple calendars should be supported by the appropriate Control or by scripting stuff within the Calendar.display
itself?

Anyway, I created a git repository to track my changes since v0.75
Here is my Changelog in reverse order:

=================================

commit e8f5ccae2b7b1ec1743bcfe2db9026c82903422c

    made ShowTodaysEvents deselectable through preferences

commit 97642bac42763e0211e5c8f36899174649446b7b

    More ripping apart of calendar functions into smaller functional units

PreferencesCallback for the calendar got an update to do only the things necessary after a value changed. Here, I also added several key/value pairs
    that were not present before

EventInfos shown in the EventInfoLabel are now capable of handling more than one event per day. Todays events are always shown when no hover action over
    another day with events takes place

commit a980febae836e5fd5f7787aec995591919309ac7

    Ripped the DrawCalendar() function in calendar.script apart

    The derived functions

    UpdateCalendarLayout()
    UpdateCalendarDecoration()
    UpdateCalendarContent()

    in combination take over the functionality of

    DrawCalendar()

    This makes it more efficient to update the calendar since not all
    operations have to be performed after a change of the month. (e.g.
    we actually dont have to update anything related to the weekdays
    after they've been set once.
    Furthermore, by extending the monthday <array> to 42 instead of 31
    entries, we also do not have to position them after a change of the
    month. Instead, we now use the offset of the month for accessing the
    right array entries while updating background and value.
    This also supresses a change in the desklets size due to offset
    changes in changing months (e.g. 5 rows vs. 6 rows)

    Added 3 menu entries just for fun

commit b235140fd0eb9e1f4420d42331c6ca39dba00b30

    accidentely committed wrong Calendar.display last time...
    monthdays array was too large too soon
    see next commit for the reasons about that

commit 55d9d0d30e08d37e0049a3023ea273e0f1929a20
    packed all calendar scripting stuff into calendar.script
    added subscription prefs and subscriptions.script

commit a87dd442a8ac0e495a6c01026b5223dd1497abe7

    initial commit of version 0.75

=================================

Attached to this mail you will find several patch files according to the above commits. They will convert
the current Calendar display v0.75 into my version.
To apply the patches, change directory to the Calendar display directory an execute the following:

patch -p1 < patch0.patch
patch -p1 < patch1.patch
patch -p1 < patch2.patch
patch -p1 < patch3.patch
patch -p1 < patch4.patch

If you want to get rid of the annoying calendar subscription stuff that I am currently working on (it has no functionality yet), just apply the 'no_subscriptions.patch' after the above commands

patch -p1 < no_subscription.patch

Maybe you'll find the changes I made useful and they find their way into the main Calendar repository?

Greetings and have a nice Saturday

Ronny


P.S.: Regarding the Preferences Callback function, I was not sure whether global variables get updated instantly when they are bound to an element in <prefs>. In an earlier version of gdesklets I found that
setting them explicitely was necessary, so I implemented it that way again.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]