No command line switch to start Thunderbird with calendar view
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mozilla Thunderbird |
Fix Released
|
Medium
|
|||
thunderbird (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Thunderbird 3.1.13 on Ubuntu 11.04
Trying to evoke calendar from command line:
`thunderbird -calendar`
or
`thunderbird about:calendar`
does not seem to work
I think it should https:/
In Mozilla Bugzilla #359807, Briks-si (briks-si) wrote : | #5 |
Yes, this is covered here:
http://
But I can confirm -calendar is not working.
Thunderbird 1.5.0.8
Windows
Lightning 0.3
In Mozilla Bugzilla #359807, Ssitter (ssitter) wrote : | #6 |
*** Bug 377073 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #7 |
I tried several ways now, but I think there's only one workaround without modifying Thunderbird...
Whenever TB is configured to download mails upon startup, it selects the Inbox folder of the default account. This occurs AFTER Lightning is loaded, so Lighting is unable to bring the calendar up.
One workaround would be to use an internal URL (i.e. 'about:calendar'), because TB does not select the folder view, when it is started with a URL; it displays this URL instead!
I got this working, even with the desired view ('about:calendar-
Wouldn't it be better to completely handle this URL instead, although it does not really make sense in Thunderbird?!
What do you all think about that?
In Mozilla Bugzilla #359807, bvdbos (bvdbos) wrote : | #8 |
Doesn't work in 1.5.0.12 or 2.0.0.5 for me using
"C:\Program Files\Mozilla Thunderbird\
or
"C:\Program Files\Mozilla Thunderbird\
What did you use as a workaround?
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #9 |
Created attachment 274582
Enable 'about:calendar' and 'about:calendar-
Bas, sorry for being so imprecise. This start option is not supported - but could be; implement attached patch.
Stefan, what do you think about this 'new' start-up option?
Maybe we have to add another line to display the sidebar in mail-mode, too? But I think this is already covered in another bug, although I did not find it to add a reference here...
The patch currently searches the requested view and selects this or month-view as default, so the following start options become available in current nightly builds:
...\thunderbi
...\thunderbi
...\thunderbi
...\thunderbi
...\thunderbi
In Mozilla Bugzilla #359807, Mschroeder-mozilla (mschroeder-mozilla) wrote : | #10 |
Sven, you asked for review without a reviewer. Please choose an appropriate one from http://
In Mozilla Bugzilla #359807, Cmtalbert (cmtalbert) wrote : | #11 |
Comment on attachment 274582
Enable 'about:calendar' and 'about:calendar-
Thanks for your patch. It looks really good. I have a couple of mozilla style nits
that I have addressed below. We keep everything less than 80 chars on a line where
it doesn't hurt readability. That's so that diffs look decent in bonsai and
bugzilla.
>+ // display Calendar, when started with 'about:calendar' or 'about:calendar-[VIEW]'
Break this comment into two lines so that each line is less than 80 chars ^^
>+ if ( (window.
Same with this if ^^ like so:
>+ if ( (window.
>+ window.
>+ var reqView = window.
>+ // check, whether requested view exists
No need for comma in this statement ^
>+ setTimeout(
I have tested this with a bunch of parameters, and I like the effect. However,
I think we need to do just a little more. If you try this with a current nightly,
you'll notice that you get the calendar pane, but the left "folderpane" area
is still the mail "folderpane" and not the calendar left pane. Likewise,
the toolbar is still the mail toolbar and not the calendar toolbar. I think this
means that you just need to add some extra calls to this function, but I think you
should check with mickey or Fallen on IRC about what you need to call in order
to fully switch us into the view.
I am eagerly awaiting the next version of the patch. But, I sadly have to r- this
because of the left pane and toolbar issues.
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #12 |
Created attachment 277678
patch rev.1
Clint,
your observation is already covered in Bug 386479, but as I recently found an easy way to fix this, I will attach a patch there soon.
So, this one only covers your additional comments.
In Mozilla Bugzilla #359807, Mvl (mvl) wrote : | #13 |
I think that it would be cleaner to use a commandline switch instead of an url. The about: protocol is really handled somewhere else, and not in the power of lightning to change. The commandline switches are for consumers.
Besides that, does the patch work if I do 'thunderbird.exe -P foo about:calendar'?
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #14 |
(In reply to comment #9)
> I think that it would be cleaner to use a commandline switch instead of an url.
> The about: protocol is really handled somewhere else, and not in the power of
> lightning to change. The commandline switches are for consumers.
Well, I also tried this first, but there is a problem, when TB checks for new mails on start-up. TB does not recognize the '-calendar' switch and continues without attention to it.
This means, if no start page is requested it switches to the Inbox folder, after it downloaded new mails. This switches the view back to Mail-View.
By examining the code, I found that this does not take place, if any start page is requested in commandline.
I agree, that use of the about protocol is not the best way. You could use anything else ('calendar', 'calendar-month', 'calendar:month') - please post your ideas!
I don't know whether we could have a complete handler for a protocol like 'calendar:'...
But this would be an easy way for lots of people to start TB in Calendar view!
> Besides that, does the patch work if I do 'thunderbird.exe -P foo
> about:calendar'?
Yes, it does.
In Mozilla Bugzilla #359807, Ssitter (ssitter) wrote : | #15 |
(In reply to comment #10)
> Well, I also tried this first, but there is a problem, when TB checks for new
> mails on start-up. TB does not recognize the '-calendar' switch and continues
> without attention to it.
I think Lightning needs to add/register a command handler for '-calendar' switch. The old Mozilla Calendar extension did this so I don't know why Lightning should not be able to do the same.
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #16 |
(In reply to comment #11)
> I think Lightning needs to add/register a command handler for '-calendar'
> switch. The old Mozilla Calendar extension did this so I don't know why
> Lightning should not be able to do the same.
The Problem is not Lightning, but Thunderbird. I played around with the old Mozilla Calendar... Version 0.8.x in Fx 1.0.0.7 switches to Calendar, when started with '-calendar'; version 0.2.x does'nt in Fx 1.5!
I modified the Calendar 0.2.x to install in Fx 1.0.0.7 and it starts in Calendar view (although reporting only errors) - but this shows, that the command handler was removed in Mozilla Code beginning with versions 1.5.
In Mozilla Bugzilla #359807, Mvl (mvl) wrote : | #17 |
The way firefox (and thunderbird) handle commandline switches was changed, I think after fx1.0. Support for that was added to calendar after 0.2.x. So testing with older versions doesn't tell us much.
You need to look at calendarService.js for the code. Also, take a look at bug 378557, which also involves commandline stuff. Maybe that bug blocks this one.
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #18 |
mvl,
I tested the handling of commandline switches. I got a working solution now, but with two disadvantages:
1. I cannot test the existence of the views, because the document seems not to be loaded at this early time.
2. I have to create an own messenger window with the argument 'about:blank' to prevent loadStartFolder() to switch to the Inbox after biff.
But this would load 2 messenger windows, if also started with a start-page (i.e. 'thunderbird.exe about:blank -calendar')
To fix the 2nd, we would have to change Thunderbird code - right?
In Mozilla Bugzilla #359807, Cmtalbert (cmtalbert) wrote : | #19 |
Cc'ing David Bienvenu on this bug so that he can answer the question in point 2 of comment 14.
In Mozilla Bugzilla #359807, Mozilla-ex (mozilla-ex) wrote : | #20 |
What to do with all the permutations of command lines is complicated. If you're looking for a way to have an icon on the desktop that starts Thunderbird in Lightning mode, then it doesn't seem like you need to worry so much about other command line arguments...but if you're looking for how to handle it in all situations, I'm not sure that 2 messenger windows isn't the way to go. If I launch TB with -calendar and a .eml file, you'd want two windows, right?
I don't know what you mean by starting TB with a start page on the command line - that doesn't do anything. You can launch Thunderbird with a uri for a message, which loads that message, or a .eml file, which loads the .eml file. Conceivably, you could have a uri for a folder as well, to startup with that folder. But a start page doesn't do anything, afaik.
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #21 |
(In reply to comment #16)
> What to do with all the permutations of command lines is complicated. If you're
> looking for a way to have an icon on the desktop that starts Thunderbird in
> Lightning mode, then it doesn't seem like you need to worry so much about other
> command line arguments...but if you're looking for how to handle it in all
> situations, I'm not sure that 2 messenger windows isn't the way to go. If I
> launch TB with -calendar and a .eml file, you'd want two windows, right?
As we are talking about a bugfix in a public version, we should handle every situation. You are right, if someone starts 'foo.eml -calendar' he most likly wants both.
> I don't know what you mean by starting TB with a start page on the command line
> - that doesn't do anything. You can launch Thunderbird with a uri for a
> message, which loads that message, or a .eml file, which loads the .eml file.
> Conceivably, you could have a uri for a folder as well, to startup with that
> folder. But a start page doesn't do anything, afaik.
I refferred to the naming in 'msgMail3PaneWi
I there any other way to suppress the (delayed) selection of Inbox?
In Mozilla Bugzilla #359807, Mozilla-ex (mozilla-ex) wrote : | #22 |
when I run a trunk TB with a start page, e.g., thunderbird about:blank, it actually fails to bring up any UI, so in that sense, it does suppress the biff :-)
do you mean start folder uri? that's the folder we try to load at startup, and yes, that does prevent the selection of the inbox.
If you've configured Thunderbird to select the inbox on startup, and download new messages, I'd think you might still want it to download new messages on startup, even if you launched it with the -calendar option.
I don't really know how your mail/calendar widget works internally. Why does selecting the start folder mess that widget up and prevent the calendar view from getting displayed? You could do something like listen for the onFolderLoaded notification, on startup, and switch to the calendar view after you receive that notification. Or are you simply trying to prevent Thunderbird from downloading new mail on startup?
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #23 |
David,
first - thank you for the quick replies and your explanations.
I did not check with the latest trunk, but TB 2.0.0.x brings up a window with an empty 'displayDeck'.
But I could verify the behaviour with the '-addressbook' switch - it also brings up the address book AND a message window, when 'about:blank' is appended.
To bring some light in:
- Lightning extends the 'displayDeck' and switches to calendar view by selecting another child in deck
- Starting with '-calendar' should not necessarily prevent the download of new messages, but if this is done, the Inbox is selected AFTER the download is complete --> the calendar would only display while downloading messages!
Maybe the observation of 'onFolderLoaded' would be an option, but I have another idea right now:
As the calendar view is just a special "location" displayed in the messenger window, I would advice to handle the display through a special uri, maybe with a special protocol...
@mvl: What do you think about handling 'calendar:
The switch '-calendar' could just open a window with calendar view, but the behaviour of both would be slightly different:
- when you start TB with 'thunderbird.exe <uri1> <uri2>', only the first is being displayed
- when you start TB with 'thunderbird.exe <uri1> -calendar', two windows open up: one with <uri1> and another with calendar
I think the handling is a little complicated, because most commandline switches are used to display a dialog, not to modify the mail-view.
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #24 |
David,
(In reply to comment #16)
> Conceivably, you could have a uri for a folder as well, to startup with that
> folder. But a start page doesn't do anything, afaik.
I tested with latest trunk now - how do you start with a folder?
If I enter anything else than an .eml file, it does not bring an UI up...
So this at least produces errors with my 'about:calendar' in trunk!
In Mozilla Bugzilla #359807, Mvl (mvl) wrote : | #25 |
The use of an url just feels wrong. The calendar view is not an url, it's just an option. Using an url to work around a problem isn't really clean imho.
Can't the lightning commandline handler eat any urls that are left? Maybe 'preventDefault' can help?
In Mozilla Bugzilla #359807, Mozilla-ex (mozilla-ex) wrote : | #26 |
I agree with MVL, I think, in the sense that it shouldn't be a url that shows calendar...
Sven, see bug 386919 for how to start up with a particular message (not folder). It should work on the trunk, unless it's somehow regressed since I landed it.
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #27 |
Unfortunately I was not able to workaround all problems without changing TB code...
Furthermore I cannot manage to provide a working fix before 0.7 release - so I make a call to all others:
Please feel free to pick up this bug, if the solutions should be integrated into 0.7 release!
In Mozilla Bugzilla #359807, Cmtalbert (cmtalbert) wrote : | #28 |
Sven, I don't think this is an issue that will block 0.7 release. But I think it is something we want for 1.0 since it gives us a better embedability (is that a word) story, and allows further customization from the users.
Michiel, David, what should be the desired approach for this? Should we do something like the "show message" functionality akin to what David pointed to in bug 386919? Should we institute our own command line option handler (and overcome the objections there). Is there some other approach that is worth looking at here?
Simon, I CC'd you just to get your opinion on where this sort of thing fits in the overall 1.0 strategy. I'd like to hear your thoughts on that, as well as anyone else's.
Thanks ya'll.
In Mozilla Bugzilla #359807, Bugzilla-babylonsounds (bugzilla-babylonsounds) wrote : | #29 |
I consider this a 5%-feature, meaning that probably only 5% of our users will likely ever use it. However, it would still be great to get this to work within the 1.0 timeframe.
In Mozilla Bugzilla #359807, Cmtalbert (cmtalbert) wrote : | #30 |
Simon, David, Michiel, Sven, this bug is back on my radar after a while. I have read the comments here, and I'm still not totally sure that the patch I have for review is the approach we want. Can you guys comment about your view on this?
My thought is this:
If our options are these:
1. "Fix thunderbird to do this right"
2. "Use this about handler as a workaround"
3. "Do something else to get command control working"
Then this is how I see things:
1. We should file bugs and patches to fix Thunderbird to do this right. But we can't depend on that code because 1.0 Lightning will need to work with Thunderbird 2.0, and the liklihood of these changes getting onto the MOZILLA_1_8_BRANCH are not high (though it should be said that they are not zero either).
2. I think we can use this handler as a workaround for any "Thunderbird" bug/feature that is stated in part 1. I like this solution as a workaround because it is small, clean and will be easy to remove later. Of course, insert here the general disclaimer that workaround code shouldn't ever be checked in since it never gets removed.
3. Is there another way to add command line handlers to thunderbird? Didn't the old calendar extension have command line handlers? Can we still do this, or was that feature destroyed during the MOZILLA_1_8_BRANCH effort?
I look forward to hearing your thoughts. If we decide *not* to use the patch on this bug, then please clear the review request.
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #31 |
Clint,
with respect to comment #25 I think the best way would by the first (to fix TB).
I would even agree to leave out the workaround (2.) and to only use an extension for TB1/2 to start lightning with 'about:calendar'.
Unfortunately I don't have the knowledge to fix 1. or 2., but I could provide an extension as a workaround.
In Mozilla Bugzilla #359807, Cmtalbert (cmtalbert) wrote : | #32 |
Bienvenu or Mvl: Can ya'll help me understand what the "right" fix for Thunderbird should be? Then I'll make sure that bug is filed against Thunderbird trunk. I'm with Sven and am a bit confused w.r.t. what needs to change there. If there is no bug filed against Thunderbird for this feature, then I'd like to reassign this bug to Thunderbird so we don't lose the historical context.
Sven: Even if this were to somehow magically to be fixed on Thunderbird Trunk, the likelihood that the fix will be ported to the Thunderbird 2.x branch is very low. Therefore, I'd like to ask you to consider providing this functionality in an extension. Even five percent of our users is quite a measurable number of people, so I think it'd be a good extension to have available. Feel free to open another bug in bugzilla to track your work on the extension. Thanks for your patience and your help.
In light of this, I'm going to clear the review ? flag up above.
In Mozilla Bugzilla #359807, Chris Cunningham (thumperward) wrote : | #33 |
(In reply to comment #28)
> Bienvenu or Mvl: Can ya'll help me understand what the "right" fix for
> Thunderbird should be? Then I'll make sure that bug is filed against
> Thunderbird trunk. I'm with Sven and am a bit confused w.r.t. what needs to
> change there.
Thunderbird with Lightning installed needs to accept a "-calendar" switch on the command line when starting up, which presents the calendar view. That's the right fix, and it achieves parity with Seamonkey's calendar capability.
- Chris
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #34 |
(In reply to comment #29)
> Thunderbird with Lightning installed needs to accept a "-calendar" switch on
> the command line when starting up, which presents the calendar view. That's the
> right fix, and it achieves parity with Seamonkey's calendar capability.
Of course, this is not very complicated to find out!
The question is: What has to be done by Lightning and was needs to be changed in TB...
IMHO TB needs an option for extensions to prevent the selection of the Inbox folder after Biff - this is essential to keep the calendar view after startup, even if the Biff ends after switching to calendar mode through Lightning startup.
In Mozilla Bugzilla #359807, bvdbos (bvdbos) wrote : | #35 |
Just my two cents:
I think the users won't mind an extra extension for now and a fix in trunk. I think it's more important to have this working and with an extension we don't have to touch TB-2-code.
As for the Addressbook: "thunderbird.exe -addressbook" does work but I think this is something different as the main-view of lightning doesn't open if you start Thunderbird this way.
In Mozilla Bugzilla #359807, Cmtalbert (cmtalbert) wrote : | #36 |
Why not just create a command line handler for -calendar inside of lightning and then handle the odd issues with Thunderbird wanting to load the mailbox within the command handler code?
This is From IRC:
[12:08pm] bienvenu_ joined the chat room.
[12:16pm] ctalbert|afk: bienvenu_: ping
[12:16pm] You are now known as ctalbert.
[12:16pm] bienvenu_: ctalbert - pong
[12:17pm] ctalbert: bienvenu_: Do you know what would need to be changed on the Thunderbird side for a -calendar option to work? (bug 359807, comments 29-31)
[12:18pm] bienvenu_: ctalbert - I don't know. I like the idea of lightning having its own command line handler
[12:18pm] bienvenu_: I don't know if there needs to be some change to Thunderbird for that to happen (I doubt it would, though)
[12:18pm] bienvenu_: and I'm not sure if any changes to TB would be needed if Lightning did have its own command line handler...
[12:19pm] bienvenu_: sorry, that's not very helpful
[12:19pm] Wolf joined the chat room.
[12:20pm] ctalbert: Ok. Thanks bienvenu_ From the earlier comments, I thought there was something that would have be modified in Tbird. Maybe I misread.
[12:20pm] bienvenu_: I'm not sure which approach that comment referred to...
[12:20pm] Fallen: bienvenu_: What do you think about comment #30 ? Sven suggests its about preventing the biff
[12:21pm] Fallen: the problem is that calendar is shown initially, but the biff selects the inbox, which switches back to mail view
[12:23pm] bienvenu_: Fallen - that's not exactly biff, but rather check for new messages on startup...
[12:23pm] Fallen: Yes, thats what I meant.
[12:24pm] bienvenu_: but yes, I understand what you mean...
[12:25pm] bienvenu_: I'm a little unclear how that forces things back to the mail view - does Lightning do that somehow?
[12:25pm] bienvenu_: or is there some side effect of selecting a folder that switches back to the mail folder pane?
[12:27pm] Fallen: Let me take a look how it works exactly. I believe selecting a folder is somehow observed and the view switches back. This is definitely ltn specific
[12:28pm] bienvenu_: so in ttheory if you had your own command line handler, you could supress the behavior for the startup folder, in the -calendar case?
[12:31pm] Fallen: bienvenu_: sorry, was disconnected. SelectFolder and SelectMessage are overridden. http://
[12:34pm] MarcoZ joined the chat room.
[12:34pm] MarcoZ: Fallen: *ping*?
[12:35pm] Fallen: busy, whats up?
[12:36pm] MarcoZ: Fallen, a question regarding the gdataprovider extension. I'm always getting a 404 error when trying to update an appointment or create a new one from Lightning. Reading events is OK, though. But if you're busy, we can talk some other time.
[12:37pm] Fallen: I'll look into it later, maybe they changed something.
[12:41pm] MarcoZ: Does anybody know if there's a way to switch the tabs (Mail, Calendar, Tasks) via the keyboard?
[12:41pm] davida left the chat room. (Quit: davida)
[12:49pm] bienvenu_: Fallen - so I think you could supress that behavior on startup just in the Lightning code, with your own command line handler
[12:49pm] ctalbert: MarcoZ...
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #37 |
(In reply to comment #32)
> [12:52pm] Fallen: bienvenu_: I guess that could work. I wonder why the others
> didn't come up with that...
Mhh, I can't tell... Maybe this is, because this function has not been overridden on the time of this bug reporting (one year ago).
> [12:53pm] Fallen: ctalbert: any other implications? Do you think bienvenu's
> suggestion will work as expected?
> [12:53pm] ctalbert: Fallen: None that I know of. That sounds like a good
> solution.
Well, I did not investigate further, but started some tests. For some reason these functions seem to be called only on startup and by the notification for new mails. I tested with Lighting 0.5 to override these and simply do nothing, when in calendar mode - which worked and I was still able to select the folder by clicking the folder in the folder pane.
Of course, this has to be changed for current Lightning versions, where the mail/calendar modes were introduced. To override these functions was explicitly wanted in bug 386636 - so we would need an extra decision for calendar mode on startup:
1. Simply ignore only the first SelectFolder()
2. Igrore every SelectFolder() and only override SelectMessage()
3. Ignore SelectFolder() and SelectMessage(), when started with '-calendar' until the user switches the manually to mail mode once
> [12:54pm] ctalbert: We just need to make sure that -calendar gets to us in our
> code, and then take it from there.
I also had problems with this in the past... I would appreciate any help in controlling the message window through an CommandLineHandle, because it does not exist this early. Or do I have to open the window myself and use 'PreventDefault'?
In Mozilla Bugzilla #359807, Michael-buettner (michael-buettner) wrote : | #38 |
(In reply to comment #33)
> I also had problems with this in the past... I would appreciate any help in
> controlling the message window through an CommandLineHandle, because it does
> not exist this early. Or do I have to open the window myself and use
> 'PreventDefault'?
You don't need to control the message window, neither is it something you need to care about. All you need to do is to remember that Lightning has been instructed to automatically switch to the calendar mode upon startup and invoke the necessary bits and pieces during the load handler (ltnOnLoad).
In Mozilla Bugzilla #359807, Philipp-bugzilla (philipp-bugzilla) wrote : | #39 |
If possible I'd go for option (1), because we can't assume that SelectFolder is generally not called at startup. Option (3) wont work, because SelectMessage is called from the email slider and that shouldn't be ignored just because the program was called with -calendar.
In Mozilla Bugzilla #359807, Philipp-bugzilla (philipp-bugzilla) wrote : | #40 |
I have a semi-working solution for this bug, but it probably won't make 0.8
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #41 |
Philipp, thanks for investigating.
I delayed work on this, until I accept the new design... (I never used Ltn0.7!)
But IMHO version 0.8 is more complete and I will accept the new modes. I just wanted to wait for the release of 0.8 to go on.
If you have something to solve this, feel free to post it here.
(In reply to comment #36)
> I have a semi-working solution for this bug, but it probably won't make 0.8
According to comment #25 this would be no problem ;-)
In Mozilla Bugzilla #359807, Bugzilla-babylonsounds (bugzilla-babylonsounds) wrote : | #42 |
Not going to happen for 0.8.
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #43 |
(In reply to comment #34)
> You don't need to control the message window, neither is it something you need
> to care about. All you need to do is to remember that Lightning has been
> instructed to automatically switch to the calendar mode upon startup and invoke
> the necessary bits and pieces during the load handler (ltnOnLoad).
I'm at the same problem I was some months ago:
How do I _REMEMBER_ the command-line switch?
Maybe I'm blind - but I can only handle command-line switches in a script in 'components', right? The switches are not available through 'window.arguments' in any Lightning script...
When I install a command-line handler, how could this access some global variables without installing a component service that could be 'asked' later - do we have to go this way for this simple demand???
(In reply to comment #36)
> I have a semi-working solution for this bug, but it probably won't make 0.8
It would be great, if you could post this as a WIP patch - maybe things are easier for me then ;-)
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #44 |
Created attachment 314785
Re-designed patch with CLH to work with Lightning 0.8+
I created a working solution now, using another existing interface (nsISupportsString) on the commandline-handler to get the desired mode.
This is working fine for me, but there are still some questions:
- Should we better create an own interface with IDL to store and retrieve the desired mode?
- Depending on the current design of Lightning there are much more options, that could be implemented, e.g. to show Task mode on startup...
I implemented the following:
'thunderbird.exe -calendar'
'thunderbird.exe -calendar month'
'thunderbird.exe -calendar week'
'thunderbird.exe -calendar multiweek'
'thunderbird.exe -calendar day'
Whenever a non-existent view (or none) is requested, the last visited will be shown. Depending on the possibilities, there would be another way to go: we could implement 'real' commands for Lighting, e.g.:
'thunderbird.exe -calendar show=month'
'thunderbird.exe -calendar newtask'
'thunderbird.exe -calendar import=mycal.ics'
'thunderbird.exe -calendar export=
What do you think? Maybe this could go into another bug, if requested by others...
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #45 |
I already found a small issue with this patch:
- start TB with '-calendar'
- switch to mail mode manually
Actual Result:
- no folder is selected and application title does not change
Expected Result:
- Inbox or 'overview page' of main account should be selected and app title should change to "Inbox - Thunderbird" or something else
Any ideas how to handle this???
In Mozilla Bugzilla #359807, Philipp-bugzilla (philipp-bugzilla) wrote : | #46 |
Created attachment 314829
Philipp's WiP
This is the semi-working solution I was talking about. It keeps the command line handler out of chrome and also works for sunbird. Its probably bitrotten though.
Sven, feel free to use (parts, all, whatever) of this code if you decide to create a new patch. I was waiting with this, since I first wanted to fix bug 426746, which already creates some files used here.
Hope it helps, sorry for doing possibly duplicate work, at the time I wrote that, it wasn't clear to me you were actively working on this bug.
In Mozilla Bugzilla #359807, Cmtalbert (cmtalbert) wrote : | #47 |
Once again, I find myself in a position of not knowing what to do with this bug. Looking briefly at the two different approaches, I tend toward Sven's approach because it is simpler and less wide-ranging than Philipp's.
Philipp, how much of that patch was refactoring startup code and how much of it was fixing this to work with sunbird?
In Mozilla Bugzilla #359807, Philipp-bugzilla (philipp-bugzilla) wrote : | #48 |
Clint, some of the work done in that patch has already been done in a previous bug, we already have a calendar-
I'd like to see a solution that doesn't just also implement the command line handler for lightning, but cleans up the code and creates a common command line handler, so that adding futher options doesn't require code changes in two locations. Also this would clean up the resources/ directory a bit more.
I like the idea of an idl interface for our command line handler to allow retrieving passed options via a component. This would easily allow adding more options.
If I would be doing the review, I'd probably r- the patch to consolidate the command line handlers (sorry ;-).
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #49 |
Comment on attachment 314785
Re-designed patch with CLH to work with Lightning 0.8+
(In reply to comment #44)
> If I would be doing the review, I'd probably r- the patch to consolidate the
> command line handlers (sorry ;-).
>
Philipp, I totally agree, at least since bug 415906 requests for an option to show a specific date on startup for lightning, which makes sense for me, too.
Maybe the option "-calendar" is totally useless then?!
Unfortunately this starts to go beyond my capabilities... I have not started to look at 'calendar-
Philipp, do you feel able to take this bug?
Otherwise I'm not sure whether I can get this working before 0.9 release :-(
In Mozilla Bugzilla #359807, Cmtalbert (cmtalbert) wrote : | #50 |
(In reply to comment #45)
> (From update of attachment 314785 [details])
> (In reply to comment #44)
> > If I would be doing the review, I'd probably r- the patch to consolidate the
> > command line handlers (sorry ;-).
> >
Ok sounds good. Sven, I'm really sorry about letting that patch sit in my review queue for so long. It somehow slipped my notice. I won't let that happen again.
In Mozilla Bugzilla #359807, Philipp-bugzilla (philipp-bugzilla) wrote : | #51 |
I'll see what I can do. I have quite a few larger patches on my plate so I'm not sure when I'll get to this. Just write me an email if you find time before I've uploaded a patch so I can tell you if I've already started taking a closer look or not.
In Mozilla Bugzilla #359807, Philipp-bugzilla (philipp-bugzilla) wrote : | #52 |
Created attachment 332310
Commandline options WiP - v6
This patch mostly works, there is one open issue I've discovered:
* Something is fishy with the menus, starting with -taskmode or -calendar gives
a mix of both mail and calendar menus, works when switching back and forth
modes
* Something is keeping -calendar from working. I'm too tired to debug this now
but I think its a minor issue
* In case this gets ready before 0.9, there are still hardcoded strings that
need to be localized after the release.
Also, we should think about what we want those switches to be called. Keep in mind they should be as sensible as possible for both sb and ltn. Right now I have
-calendar <view> Start calendar in <view>, where the <view> is optional
-taskmode Start lightning in task mode
-showdate <date> Show a specific date, parsed using jsdate
-url <type>,<url> Add a calendar of a specific type. When type, is
I'm open to name changes and such. I could well imagine using:
-mode <mode> (i.e -mode calendar or -mode task)
-view <view> (i.e -view week or -view month)
instead.
In Mozilla Bugzilla #359807, bvdbos (bvdbos) wrote : | #53 |
I'd reserve "calendar" for showing one particular calendar and disabeling the rest in the future, let's use "view". I know quite some people would like this.
In Mozilla Bugzilla #359807, Mnyromyr (mnyromyr) wrote : | #54 |
It'd probably be worth to prefix calendar commandline options with e.g. cal or use less generic names, so there aren't any name clashes with e.g. -url.
How about:
-calview <view>
-calmode <mode>
-calimport <type>,<url>
In Mozilla Bugzilla #359807, Philipp-bugzilla (philipp-bugzilla) wrote : | #55 |
I was using -url since osx LaunchServices uses this switch to start up ICS files, but it will have the same problem as noted in one of the TODO comments:
Regardless of windows,linux,mac, how do we know if the url passed (either without a switch or with -url) is one that calendar can read? The way the commandline interfaces work we need to do this synchronously, which means we can't just open the URL and find out.
In an ideal world, if the url is one that calendar can read, then i.e the .ics file that was doubleclicked on should be subscribed to, otherwise it can be left to thunderbird to decide how to open it.
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #56 |
Created attachment 338838
Commandline options v6 working
(In reply to comment #48)
> * Something is fishy with the menus, starting with -taskmode or -calendar gives
> a mix of both mail and calendar menus, works when switching back and forth
> modes
I solved this by an initial call to swapPopupMenus() in ltnInitializeMe
> * Something is keeping -calendar from working. I'm too tired to debug this now
> but I think its a minor issue
This seems to be related to WHEN commonInitCalen
There was also a minor case-typo in calHandleChrome
- if (showDate && showdate.length) {
+ if (showDate && showDate.length) {
Futhermore I completed your addition of return values, also to selectCalendarV
I did not change any names of the command-line switches, which is rather quickly done.
There are still some possibilities to consolidate some code:
- The check for existence of requested views and the current mode could be removed from ltnShowCalendar
>function ltnShowCalendar
> if (ltnSelectCalen
> ltnSwitch2Calen
> return true;
> }
> return false;
>}
- change ltnSwitch2Calen
- take care of and hand over the result code from switchToView() also in ltnSwitch2Calen
I did not change these mainly because of the existing comment for showCalendarView():
* XXX Kind of confusing. This function calls the app specific function, which
* again calls the common switchToView function. They should be consolidated in
* a different bug.
In Mozilla Bugzilla #359807, Philipp-bugzilla (philipp-bugzilla) wrote : | #57 |
Sven, thanks for the patch. I'll be taking a look at this after the 0.9 release, since the change is a bit too risky for now.
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #58 |
One more issue to resolve:
When starting with '-calendar' and then opening one mail folder in another window (right-click / Open), the calendar mode it displayed in this new window again.
This should be fixed by resetting the mode preference after ONE window has been opened.
In Mozilla Bugzilla #359807, jalyst (jedi-theone) wrote : | #59 |
would be good if the same kind of switch can be implemented for OS X!
Thanks guys, love your work, no where's a donation button?
-jed.
In Mozilla Bugzilla #359807, alpianon (alberto-pianon) wrote : | #60 |
I would like to donate, too!
I look forward to see this functionality implemented!
Again, is there anyone who is willing to provide me with a compiled version of lightning with this patch? (I use linux) Or, can you please indicate me where I can find a configuration file for linux (Ubuntu Hardy) in order to compile it by myself?
I can test it, even if I am not a programmer
thank you
Alberto
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #61 |
(In reply to comment #56)
> Again, is there anyone who is willing to provide me with a compiled version of
> lightning with this patch? (I use linux)
> I can test it, even if I am not a programmer
Since I did not get any response from Alberto by mail, I tried to attach the patched version for Linux here (but it's too large) - I did only test it on Windows, but did the same modifications in Linux version.
Note: There's an dummy update URL to avoid automatic back-rev to 0.9!
If anyone is interested, feel free to contact me.
In Mozilla Bugzilla #359807, alpianon (alberto-pianon) wrote : | #62 |
Thank you Sven
sorry your first email was labeled as spam by gmail :(
I am starting to play with it
The first thing I wanted to do is integration with Gnome Clock Applet
Here is the trick I came up with today:
1) create the following script and name it "evolution"
-------
#!/bin/bash
d=`echo $1 | grep "calendar:
if [ "$d" != "" ]; then
yyyy=${d:23:4}
mm=${d:27:2}
dd=${d:29:2}
thunderbird -calendar day -showdate `echo "$yyyy/$mm/$dd"` &
exit 0
fi
d=`echo $1 | grep "task:"``echo $1 | grep "component=tasks"`
if [ "$d" != "" ]; then
thunderbird -taskmode &
exit 0
fi
d=`echo $1 | grep "component=
if [ "$d" != "" ]; then
thunderbird -calendar &
exit 0
else
evolution2 $1 $2
fi
-------
2) rename /usr/bin/evolution to /usr/bin/evolution2
3) copy the script "evolution" to /usr/bin and make it executable
4) Try to double-click on a date on Gnome Clock Applet (or to click on a button) and see what it happens
Sven,
the only thing that is missing is putting the existing thunderbird window in foreground every time you call it from command line. Is it a difficult thing to implement?
In Mozilla Bugzilla #359807, alpianon (alberto-pianon) wrote : | #63 |
Sorry, one (fundamental) part of the trick was missing :)
You must first install apache on your local machine and enable dav support
then you create a local "web" calendar with lightning and you enable it also in evolution, so that Gnome Clock Applet show the same events and tasks of lightning (otherwise the trick does not make much sense)
If someone wants the details, I can give him/her
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #64 |
(In reply to comment #58)
> the only thing that is missing is putting the existing thunderbird window in
> foreground every time you call it from command line. Is it a difficult thing to
> implement?
This seems to be a Linux-only issue - it is working perfect on Windows; except for one thing:
@Phillipp: STR
1. Start TB without commandline option
2. "thunderbird.exe -calendar"
EXPECTED: Display Calendar in existing window
ACTUAL: Display Calendar in existing window
3. "thunderbird.exe -mail"
EXPECTED: Display Mail mode in existing window
ACTUAL: Window is brought to foreground, but still with Calendar
It should also be discussed what should happen, if TB is started again without any option: Mail mode or just foreground?
In Mozilla Bugzilla #359807, alpianon (alberto-pianon) wrote : | #65 |
Sven,
another bug: printing emails does not work any more when I install your patched version, while with the official version of lightning it works
Maybe another linux-related issue?
Moreover, even if I close thunderbird, the task appears to be still running (with ps -A, you still see thunderbird-bin and run-mozilla.sh).
(I had to manually kill the task to manage to reinstall the official version of lightning to test the printing issue)
In Mozilla Bugzilla #359807, alpianon (alberto-pianon) wrote : | #66 |
Well, I uninstalled the official version, I reinstalled the patched version again, and now all the bugs I signalled above (included tbd window not in foreground) disappeared!
In Mozilla Bugzilla #359807, alpianon (alberto-pianon) wrote : | #67 |
sorry...
the tbd window in foreground works only sometimes...
In Mozilla Bugzilla #359807, Ssitter (ssitter) wrote : | #68 |
Has anyone planned how the open via command line features incorporates into the new tabbed model used in Thunderbird 3.0b1pre / Lightning 1.0pre?
In Mozilla Bugzilla #359807, Giermann (giermann) wrote : | #69 |
I just had a first look at the new layout - it seems to be very unfinished yet; not only regarding Lightning.
I would suggest to give the same experience via commandline, as it is with the mode switching buttons!
But it does indeed open further possibilities:
What to do if someone issues TB with commandline "-mail -calendar -task" ?
I would assume he wants 1 window (or tab) for each mode: Mail, Calendar AND Task.
BTW: The tabbed window gives good abilities to introduce Task mode in Sunbird ;-)
In Mozilla Bugzilla #359807, alpianon (alberto-pianon) wrote : | #70 |
Sven,
I tested your patch for a while on ubuntu 8.04 and I can say that the only bug/problem is that the tbd window only sometimes is put in foreground when called from command line.
I tried to find a rule, but there isn't one: sometimes, when all other windows are not maximized, the tbd window is put in foreground, but sometimes is not...
When some other windows are maximized, generally the tbd window stays in background even when called.
Maybe a different function must be called in linux, to put the window in foreground? (I'm not a programmer so I'm guessing :) )
In Mozilla Bugzilla #359807, Meincontainer (meincontainer) wrote : | #71 |
Are there any plans to include an "-import" command-line switch?
It was mentioned in comment #40 and #50 but I did not spot that function in the proposed patch (I am not a coder, so I might be wrong).
In Mozilla Bugzilla #359807, Philipp-bugzilla (philipp-bugzilla) wrote : | #72 |
Debitrotting this patch doesn't seem quite enough. I've done so locally but haven't succeeded in opening tabs yet. Also I do hope there is a better solution than using prefs. It does seem that using prefs is a common option, but looking at the code I'm not quite happy yet.
I think we should keep the number of options to a minimum in this patch and then add options like -import in a subsequent patch/bug.
In Mozilla Bugzilla #359807, Mschroeder-mozilla (mschroeder-mozilla) wrote : | #73 |
Comment on attachment 338838
Commandline options v6 working
Removing review request because this patch is significantly bitrotted.
Changed in thunderbird (Ubuntu): | |
status: | New → Invalid |
Adam Warren (adamjw345) wrote : | #1 |
Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately the -calendar command does not run with Thunderbird, it is designed for Sunbird. You can enter thunderbird -h in the terminal to see all available commands.
klonuo (klonuo) wrote : | #2 |
I have Lightning add-on of course.
It seems it works on Windows, for example: https:/
Changed in thunderbird (Ubuntu): | |
status: | Invalid → New |
Changed in thunderbird (Ubuntu): | |
status: | New → Incomplete |
status: | Incomplete → New |
status: | New → Incomplete |
status: | Incomplete → New |
Launchpad Janitor (janitor) wrote : | #3 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in thunderbird (Ubuntu): | |
status: | New → Confirmed |
In Mozilla Bugzilla #359807, Ssitter (ssitter) wrote : | #74 |
*** Bug 776244 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #359807, upkpk (upkpk) wrote : | #75 |
Any update on this?
In Mozilla Bugzilla #359807, Ssitter (ssitter) wrote : | #76 |
*** Bug 1071014 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #359807, Marco Scalone (marcoscalone) wrote : | #77 |
I'm interested to. Any update?
In Mozilla Bugzilla #359807, Patricearnal-libertysurf (patricearnal-libertysurf) wrote : | #78 |
Me too...
In Mozilla Bugzilla #359807, Fc-mail (fc-mail) wrote : | #79 |
I'm also interested...
In Mozilla Bugzilla #359807, Marsu42 (marsu42) wrote : | #80 |
tl;dr: Please make this happen, will ya?
Even after getting the boot from Mozilla, the Thunderbird team has been doing great work recently. But how on earth are people expected to work with calendar on a daily basis and go through the "find the icon and click on" routine each and every time?
Even if there's some new magic way to get right to Lightning I'm not aware of (I'm running 44b), please add the legacy -calendar shortcut because this is such a widespread (defunct) solution.
In Mozilla Bugzilla #359807, Milan Knizek (knizek) wrote : | #81 |
Now that there is an extension [1] for Gnome Shell to Lightning calender of Thunderbird, it would be nice if one could open TB diretly with calendar view... All we need is a startup switch and a new thunderbird.desktop file to include also MimeType "text/calendar" so that TB can be chosen as default app for calendar, too.
[1] https:/
summary: |
- `thunderbird -calendar` does not work + No command line switch to start Thunderbird with calendar view upon + start-up |
summary: |
- No command line switch to start Thunderbird with calendar view upon - start-up + No command line switch to start Thunderbird with calendar view |
In Mozilla Bugzilla #359807, Marsu42 (marsu42) wrote : | #82 |
Another 2 years in us simple folk are wondering: Who is this 13 year old bug assigned to anyway? This is so sad since tb is doing great recently.
Please give us the option to start tb in calendar mode, this is a major nuissance in daily productivity. A lot of times I simply want to check or add an calendar event - and not click through email mode or see that my account whatever has n new messages.
Pretty please with sugar on it :-) ?
Changed in thunderbird: | |
importance: | Unknown → Medium |
status: | Unknown → In Progress |
In Mozilla Bugzilla #359807, Greyxor (greyxor) wrote : | #83 |
Opening thunderbird with -calendar would be very useful. Any progress on that? Something is blocking ?
In Mozilla Bugzilla #359807, Mkmelin+mozilla (mkmelin+mozilla) wrote : | #84 |
Maybe you want to provide a patch?
For addressbook it registers itself here: https:/
I don't know if calendar has a suitable module to piggyback on, or if creating a new module is better.
In Mozilla Bugzilla #359807, Greyxor (greyxor) wrote : | #85 |
Sure, i will look into this
Changed in thunderbird: | |
status: | In Progress → Confirmed |
In Mozilla Bugzilla #359807, Vseerror (vseerror) wrote : | #86 |
*** Bug 1763083 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #359807, Rob Lemley (rjl-tbird) wrote : | #87 |
Created attachment 9286523
Bug 359807 - Add -calendar commandline switch. r=#thunderbird-
In Mozilla Bugzilla #359807, Pulsebot (pulsebot) wrote : | #88 |
Pushed by <email address hidden>:
https:/
Add -calendar commandline switch. r=darktrojan
In Mozilla Bugzilla #359807, Rob Lemley (rjl-tbird) wrote : | #89 |
Verified working on Thunderbird Daily 104.0a1 - 20220722094822 (linux64).
Tested starting Thunderbird with -calendar argument when no other instance is running; verified that the Calendar tab is loaded and in focus on startup.
Tested running "thunderbird -calendar" when an instance is already running (with no calendar tab). Verified that the running instance opens a calendar tab and switches focus to it.
Tested running "thunderbird -calendar" when an instance is already running with a calendar tab open, but the mail tab active. Verified that the focus switches to the existing calendar tab.
In Mozilla Bugzilla #359807, Rob Lemley (rjl-tbird) wrote : | #90 |
Verified same on Windows (x64).
Changed in thunderbird: | |
status: | Confirmed → Fix Released |
In Mozilla Bugzilla #359807, Mkmelin+mozilla (mkmelin+mozilla) wrote : | #91 |
*** Bug 1786234 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #359807, Rob Lemley (rjl-tbird) wrote : | #92 |
Comment on attachment 9286523
Bug 359807 - Add -calendar commandline switch. r=#thunderbird-
[Approval Request Comment]
Regression caused by (bug #): N/A
User impact if declined: it's just a long-requested feature
Testing completed (on c-c, etc.): Verified on 104 Daily linux64 and win64
Risk to taking this patch (and alternatives if risky): Low risk. Just adds a function to open a calendar window and hooks it into the nsICommandLineH
In Mozilla Bugzilla #359807, Vseerror (vseerror) wrote : | #93 |
Comment on attachment 9286523
Bug 359807 - Add -calendar commandline switch. r=#thunderbird-
[Triage Comment]
Approved for esr102
In Mozilla Bugzilla #359807, Rob Lemley (rjl-tbird) wrote : | #94 |
Thunderbird 102.2.1:
https:/
In Mozilla Bugzilla #359807, Bugzilla-7 (bugzilla-7) wrote : | #95 |
I've just tested this after upgrading to 102.3.1. Running "thunderbird -calendar" on the command line when an instance of thunderbird is already running loads the calendar, but in the existing window, rather than a new window as I requested in bug 1763083 (which got marked as a duplicate of this one). Is there any way to open the calendar in a new window from the commands line?
In Mozilla Bugzilla #359807, commander-keen (commander-keen) wrote : | #96 |
(In reply to Alistair Cunningham from comment #91)
There are more command-line options in Firefox and Seamonkey which probably also work in Thunderbird:
https:/
Did you try the -new-window?
In Mozilla Bugzilla #359807, Bugzilla-7 (bugzilla-7) wrote : | #97 |
"thunderbird -calendar -new-window" also loads the calendar in the existing window, not in a new window. "thunderbird -h" makes no mention of the -new-window option.
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
I tried previous options for Calendar extension (thunderbird.exe -mail -calendar) and only "-calendar"; but TB always starts with the default view...
I would like an option to start in Month-View to see all recent and coming events, like I do in Sunbird on start-up!
Reproducible: Always
Steps to Reproduce: d.exe -calendar"
1. Install TB 1.5.0.7
2. Install Lightning 0.3
3. Start "...\thunderbir
Actual Results:
TB starts normal.
Expected Results:
TB starts in Lightning-View.
I also tried this with Lightning 0.4a1 (nightly from 02. November) - same result.