[Bug 237341]

2014-01-19 Thread Neal-o
This bug has stalled because, I seem not to be able to get any real direct 
help, without infinite referrals, for 333938.
So, I'll opt for and take a stab at moving the pref, and hopefully make some 
headway.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/237341

Title:
  mozilla-thunderbird locates 2/6/2008 as last week in 4/6/2008

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/237341/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 237341]

2014-01-03 Thread Neal-o
Created attachment 8355581
lastWeek2.diff

fix bucket groups to be based off of a calendar week concept.
pull firstDayOfWeek bias from lightning prefs if available.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/237341

Title:
  mozilla-thunderbird locates 2/6/2008 as last week in 4/6/2008

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/237341/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 237341]

2013-11-24 Thread Neal-o
ha, that is funny!
I've been hunting through the UI and code base to find this info, and I 
literally just finished a build with preliminary support to pull in the 
calendar.week.start preference, after which I started it up to find a new email 
with your last comment.

I do think that getting this from the OS with and override from the app is 
correct.
To further complicate things, on OS X, I do believe it should be initially 
influenced by the Calendar app settings, then by thunderbird mechanisms.

Thanks for staying with me.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/237341

Title:
  mozilla-thunderbird locates 2/6/2008 as last week in 4/6/2008

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/237341/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 237341]

2013-11-24 Thread Neal-o
Comment on attachment 8337301
fix bucket groups to be based off of a calendar week concept

I'm attaching an updated patch to address review comments by :squib

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/237341

Title:
  mozilla-thunderbird locates 2/6/2008 as last week in 4/6/2008

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/237341/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 237341]

2013-11-24 Thread Neal-o
Created attachment 8337339
fix bucket groups to be based off of a calendar week concept

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/237341

Title:
  mozilla-thunderbird locates 2/6/2008 as last week in 4/6/2008

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/237341/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 237341]

2013-11-24 Thread Neal-o
Created attachment 8337301
fix bucket groups to be based off of a calendar week concept

Attached is a first attempt patch to address this bug.
It aligns the buckets > yesterday to week boundaries, and adds a lastWeek 
bucket.

I need information on where to get the beginning of calendar week
localization runtime information

Also, I did the English localization, but none of the others. I would
need help with that.

This needs testers to validate that I didn't break something else.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/237341

Title:
  mozilla-thunderbird locates 2/6/2008 as last week in 4/6/2008

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/237341/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 237341]

2013-11-24 Thread Neal-o
Thanks for the comments.

(In reply to Jim Porter (:squib) from comment #20)
> Comment on attachment 8337301
> fix bucket groups to be based off of a calendar week concept
> 
> Review of attachment 8337301:
> -
> 
> This isn't a full review; just a quick pass. David Bienvenu is unlikely to
> be super-response, since I believe he works at Google now. I've redirected
> the review to someone who might be a better pick (sorry if I redirected
> wrong!).

Thanks for pointing it to anyone who'll respond.

> 
> ::: mail/locales/en-US/chrome/messenger/messenger.properties
> @@ +178,3 @@
> >  lastWeek=Last Week
> >  twoWeeksAgo=Two Weeks Ago
> >  older=Older
> 
> We might need to change the names of these strings to force localizers to
> update them; after this patch, lastWeek doesn't refer to the same thing. A
> localizer might have translated that to something like "Within the last 7
> days", which is accurate for how the code works pre-patch, but would be
> wrong post-patch.

noted. suggestions ?

> 
> ::: mailnews/base/src/nsMsgGroupView.cpp
> @@ -135,5 @@
> > -int64_t GMTLocalTimeShift = 
> > currentExplodedTime.tm_params.tp_gmt_offset +
> > -  currentExplodedTime.tm_params.tp_dst_offset;
> > -GMTLocalTimeShift *= PR_USEC_PER_SEC;
> > -currentTime += GMTLocalTimeShift;
> > -dateOfMsg += GMTLocalTimeShift;
> 
> Why'd you remove the time-shifting? Isn't that important, since we want to
> figure out when midnight is in local time, not GMT?

It didn't seem to work correctly.
With it, I had messages that were very near to the bucket boundaries, that 
sometimes, were on the wrong side of the bucket boundary.

Commented out, all my messages seemed to align correctly at the
boundaries.

> 
> @@ +135,5 @@
> > +// the localization for first day of calendar
> > +int64_t todayMidnight = currentTime - currentTime % PR_USEC_PER_DAY;
> > +int64_t yesterday = todayMidnight - PR_USEC_PER_DAY;
> > +int64_t thisWeek = todayMidnight - (PR_USEC_PER_DAY *
> > +   (currentExplodedTime.tm_wday + 0));
> 
> Why the "+ 0" here?

You missed the line above. It's a place holder for the start of calendar
week localization offset.

> 
> @@ +137,5 @@
> > +int64_t yesterday = todayMidnight - PR_USEC_PER_DAY;
> > +int64_t thisWeek = todayMidnight - (PR_USEC_PER_DAY *
> > +   (currentExplodedTime.tm_wday + 0));
> > +int64_t lastWeek = thisWeek - (PR_USEC_PER_DAY * 7);
> > +int64_t twoWeeks = lastWeek - (PR_USEC_PER_DAY * 7);
> 
> Nit: I'd call this lastTwoWeeks to be clearer.

Noted.

> 
> @@ +778,5 @@
> >  if (m_kOldMailString.IsEmpty())
> >
> > m_kOldMailString.Adopt(GetString(NS_LITERAL_STRING("older").get()));
> >  aValue.Assign(m_kOldMailString);
> >  break;
> > +  case Invalid:
> 
> I don't think we really need to add this here; the default case will catch
> it.

Yeah, it was a Nit on my part, default aside, I recalled that some
compilers complain if every instance of an enum is not handled, so I was
being pro-active. :)

> 
> ::: mailnews/base/src/nsMsgGroupView.h
> @@ +46,5 @@
> >virtual void InternalClose();
> >nsMsgGroupThread *AddHdrToThread(nsIMsgDBHdr *msgHdr, bool *pNewThread);
> >virtual nsresult HashHdr(nsIMsgDBHdr *msgHdr, nsString& aHashKey);
> > +
> > +  enum AgeBucket_t { Invalid, Today, Yesterday, ThisWeek, LastWeek, 
> > TwoWeeksAgo, Older };
> 
> I think it would make more sense to put this at the top of the protected:
> list, and also to put each value on its own line.
> 
> I'm not sure what Mozilla's standard for naming enums is; I don't think it's
> Foo_t though.

Noted, I briefly looked for coding standard for enums, and couldn't find
anything.

I'll wait for more comments before taking any more action.
I don't want to litter this bug with a bunch of back and forth.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/237341

Title:
  mozilla-thunderbird locates 2/6/2008 as last week in 4/6/2008

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/237341/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 237341]

2013-11-24 Thread Neal-o
Yeah, uncle, after further testing, the time zone adjustments go back
in...

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/237341

Title:
  mozilla-thunderbird locates 2/6/2008 as last week in 4/6/2008

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/237341/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs