Closed Bug 390147 Opened 13 years ago Closed 12 years ago

Export calendar is not wired up correctly

Categories

(Calendar :: General, defect)

defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: michael.buettner, Assigned: michael.buettner)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

'Export calendar' is only available if an item has been selected, but since we're exporting the entire calendar this doesn't make sense. The relevant source location can be found at [1]. This is an unfortunate copy'n'paste but that has been introduced by Bug #371916.

Wouldn't it be a good idea to consolidate the commands used for Sunbird and Lightning? Is there any reason for defining the commands twice, once in sunbird/base/content/calendar-sets.inc and once more in calendar/lightning/content/messenger-overlay-sidebar.xul? We could reduce such regressions if we'd consolidate the code that takes care of this stuff.

[1] http://lxr.mozilla.org/mozilla1.8/source/calendar/lightning/content/messenger-overlay-sidebar.xul#170
See [1] for Sunbird's and [2] for Lightning's version of the export command. Sunbird exports the selected events while Lightning always export the entire calendar. Christian, in order to stay consistent we should decide which route to take. What's your opinion on that?

[1] http://lxr.mozilla.org/mozilla1.8/source/calendar/sunbird/base/content/calendar-sets.inc#87
[2] http://lxr.mozilla.org/mozilla1.8/source/calendar/lightning/content/messenger-overlay-sidebar.xul#170
(In reply to comment #1)
> Sunbird exports the selected events while Lightning always
> export the entire calendar.

Sunbird offers both export/publish functionality: You can either export/publish the selected items or you can export/publish the entire calendar. 

Lightning currently lacks the ability to export/publish the selected items.
Attached patch patch v1Splinter Review
This patch addresses the issue that "Export Calendar" is disabled if no item has been selected, but since we're exporting the entire calendar this shouldn't be taken into account.

If we decide to consolidate Sunbird's and Lightning's functionality, this is just part of the solution. But I'm submitting this patch to get the issue going.
Attachment #274466 - Flags: ui-review?(christian.jansen)
Attachment #274466 - Flags: review?(philipp)
Duplicate of this bug: 389153
Comment on attachment 274466 [details] [diff] [review]
patch v1

r=philipp for this part. 

We should either file a followup bug to take care of the unification, or morph this bug after the checkin.

Please also file a follow-up bug for creating a common set of commandsets. I was also thinking of this when creating the unify calendar list patch, but didn't come around to filing that bug yet.
Attachment #274466 - Flags: review?(philipp) → review+
Assignee: nobody → michael.buettner
Status: NEW → ASSIGNED
Target Milestone: --- → 0.7
Comment on attachment 274466 [details] [diff] [review]
patch v1

In general Export should also work if the Calendar is selected in the Calendar List only. (Same for Publish & Edit) r=christian with that change.
Attachment #274466 - Flags: ui-review?(christian.jansen) → ui-review-
(In reply to comment #6)
> (From update of attachment 274466 [details] [diff] [review])
> In general Export should also work if the Calendar is selected in the Calendar
> List only. (Same for Publish & Edit) r=christian with that change.
This patch makes the "Export Calendar" option always work. So, maybe I'm plain stupid, but I don't understand what you're trying to tell me. :-)
Duplicate of this bug: 394363
Christian, could you please take another look at this bug? We should consolidate the export mechanism for Sunbird and Lightning. I propose the following:

Short-Term:
* Allow Exporting either the whole calendar, or only the selection from both apps.
* Alternatively, just allow what the above patch does, to export the whole calendar also via menu.

Mid-Term:
* Create a wizard for export (and import), in which you can choose either the whole calendar, or just the selected items. This can be nicely integrated in the Thunderbird export wizard (see bug 389152 and bug 389154), and be a separte wizard in Sunbird (see bug 167255)
Blocks: 167255
Christian, any update on this issue? I still don't know what to do with this patch. This just makes the export command *always* available, it doesn't change the semantics.
Comment on attachment 274466 [details] [diff] [review]
patch v1

ui=christian
Attachment #274466 - Flags: ui-review- → ui-review+
The follow-up bug has already been filed as Bug 390508.
patch checked in on trunk and MOZILLA_1_8_BRANCH

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
verified with
Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.8pre) Gecko/20071002 Sunbird/0.7
Status: RESOLVED → VERIFIED
How did you verified a Lightning bug with Sunbird?
You need to log in before you can comment on or make changes to this bug.