After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 672500 - [PATCH] Make it easier to monkey patch a new calendar source
[PATCH] Make it easier to monkey patch a new calendar source
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: calendar
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: David Zeuthen (not reading bugmail)
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-20 21:10 UTC by Eskild Hustvedt
Modified: 2014-11-07 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for dateMenu.js (755 bytes, patch)
2012-03-20 21:17 UTC, Eskild Hustvedt
needs-work Details | Review
Allow extensions to add custom calendar sources (1.26 KB, patch)
2012-03-21 08:06 UTC, Eskild Hustvedt
reviewed Details | Review
dateMenu: Allow extensions to add custom calendar sources (1.29 KB, patch)
2014-11-07 13:50 UTC, Bastien Nocera
committed Details | Review

Description Eskild Hustvedt 2012-03-20 21:10:30 UTC
The attached patch makes it easier to monkey patch the calendar at the top of the shell to retrieve information from other sources. The use case is to provide a way for third party calendar applications to control the events that show up, rather than e-d-s. Personally I need it for «Day Planner», which is desktop agnostic, but I'd still like to provide good integration with GNOME. If the attached patch gets applied I could write a shell extension that monkey patches a custom source onto the calendar.

Given that the «official» API for integration most likely is e-d-s, this can provide a way for those that won't (or can't) use e-d-s to integrate with the shell without having to reimplement/copy the entire calendar source.
Comment 1 Eskild Hustvedt 2012-03-20 21:17:09 UTC
Created attachment 210202 [details] [review]
Patch for dateMenu.js
Comment 2 drago01 2012-03-20 22:43:49 UTC
Review of attachment 210202 [details] [review]:

Please provide a proper patch with a subject and commit message (using git format-patch).
Comment 3 Eskild Hustvedt 2012-03-21 08:06:53 UTC
Created attachment 210221 [details] [review]
Allow extensions to add custom calendar sources

Properly formatted patch
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-05-18 21:15:30 UTC
Review of attachment 210221 [details] [review]:

Very minor issue, otherwise fine.

::: js/ui/dateMenu.js
@@ +46,3 @@
     Extends: PanelMenu.Button,
 
+    _getEventSource: function() {

This should go below _init.
Comment 5 Bastien Nocera 2014-11-07 13:50:32 UTC
Created attachment 290164 [details] [review]
dateMenu: Allow extensions to add custom calendar sources

Splits instantiation of the event source into a separate method,
allowing extensions to subclass the DateMenuButton and provide its
own calendar source.
Comment 6 Carlos Soriano 2014-11-07 13:53:33 UTC
Review of attachment 290164 [details] [review]:

Ok
Comment 7 Bastien Nocera 2014-11-07 14:04:23 UTC
Attachment 290164 [details] pushed as 35fcd16 - dateMenu: Allow extensions to add custom calendar sources