Closed Bug 394358 Opened 17 years ago Closed 16 years ago

Print toolbar button is not enabled in Calendar Mode

Categories

(Calendar :: Lightning Only, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ssitter, Unassigned)

Details

Attachments

(1 obsolete file)

Using Lightning 0.7pre (2007083010) with Thunderbird 2.0.0.7pre (20070830)

The Print toolbar button is not enabled in Calendar Mode.

Steps to Reproduce:
1. Start Thunderbird with fresh profile and install Lightning. Restart.
2. Switch to Calendar Mode
3. Print calendar by using the Print toolbar button

Actual Results:
Print toolbar button is disabled.

Expected Results:
Print toolbar button is enabled and opens the Print Preview dialog.

Additional Information:
This is most probably due to the changes from Bug 388954. 

Currently the Print button from the Mail toolbar is enabled after switching to Calendar mode but not the Print button from Calendar toolbar. To confirm this behavior move both the Print button from Mail toolbar and the Print button from Calendar toolbar into the menubar. Switch to Calendar Mode and observe both Print buttons.
Clicking once on the 'File' menu enables the Print button. This is not a failure of Bug 388954 but it is somehow related to how the print command is updated (this gets triggered when opening the file menu, for example).
Encouraged by bug 386497 I moved the normal print button to the menu-bar instead of the mail-toolbar with the following effects:

- this is (my always wanted) way to introduce "dual-purpose" buttons; I could now have buttons from both modes always available ;-)
- the print button from mail mode is being refreshed without opening the file menu

There are two ways to work on this problem:
1. Find out what and when is done to update the normal print button and clone this for 'Print calendar'
2. Completely redesign the toolbar customization and switching.
This could also fix bug 386497, when the showing/hiding of the mail toolbar is preserved in calendar-mode - and I would suggest to introduce real "dual-mode" buttons or an always visible "dual-mode" area, maybe in front of the normal toolbar.

As I already requested always visible buttons in bug 386479, I would prefer the second way. I'm currently playing around with removing the mode-toolbar and to integrate it's functions into the mail-toolbar.

Mickey, what do you think about all that?
Flags: wanted-calendar0.8?
Version: Trunk → unspecified
Setting wanted0.8- as the main Calendar developers will not devote any time to
this in the 0.8 timeframe. Patches are, of course, always welcome.
Flags: wanted-calendar0.8? → wanted-calendar0.8-
Don't know whether this helps... but I recently stumbled about the following code in 'commandglue.js':

function UpdateMailToolbar(caller)
{
  //dump("XXX update mail-toolbar " + caller + "\n");
  document.commandDispatcher.updateCommands('mail-toolbar');

  // hook for extra toolbar items
  var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
  observerService.notifyObservers(window, "mail:updateToolbarItems", null);
}
Attachment #298260 - Flags: review?(michael.buettner)
Comment on attachment 298260 [details] [diff] [review]
Adopted attributes from mailWindowOverlay.xul

Moving review to Berend, as this patch is sufficiently close to Bug 412948.
Attachment #298260 - Flags: review?(michael.buettner) → review?(Berend.Cornelius)
Comment on attachment 298260 [details] [diff] [review]
Adopted attributes from mailWindowOverlay.xul

This one has been resolved, maybe by bug 412948.
This one sadly enables the command always, but I will attach a patch there...
Attachment #298260 - Attachment is obsolete: true
Attachment #298260 - Flags: review?(Berend.Cornelius)
Verified fixed through bug 414573.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
VERIFIED per comment#8.
Status: RESOLVED → VERIFIED
Target Milestone: --- → 0.8
Flags: wanted-calendar0.8-
You need to log in before you can comment on or make changes to this bug.