SVN_SILENT made messages (.desktop file)
Revert "Use qobject_cast when checking the return value via if"

As Thomas writes, using qobject_cast doesn't make any sense here:

> The check is for the verticalScrollBar() heap member
> If m_scrollParent is not a QAbstractScrollArea, this will segfault in either
> casting case.

This reverts commit 231975037aa307a0b28badfea4df97674d39858e.
Ubuntu: adds an secure connection option selector to Imap Settings

User can select connection type from an expandable option selector,
which updates the imapPort text field to the standard connection port.

User can still override port value in imapPort text field

Also we have to use QT_TR_NOOP for marking strings in list model
elements for translation and call translate on them in the
selectorDelegate. QT_TR_NOOP apparently makes the strings visible to
Qt Linguist but doesn't actually translate anything.

REVIEW: 117212
Ubuntu: fix issues with showing connection errors

Implements opening a dialog when there is either an imap or network
error

BUG: 332870
REVIEW: 117307

Also implemented imapAlertReceived to display message in dialog popup

removed pagestack.pop on imapAlert

Moved Info dialog to a seperate component
SVN_SILENT made messages (.desktop file)
cleanup: remove unreachable code
GUI: QTabBar is nicely reachable via member function
Refactor the way how we find preferred item within multipart/alternative
GUI: expand previewable attachments upon first click on the attachment icon

The motivation is to make expanding of previewable attachments smooth, but at
the same time do not interfere with the way how the button has worked so far too
much.

When an attachment cannot be previewed, nothing changes and everything works as
it used to work before.

When a preview can be shown, however, clicking on the icon of the attachment at
the time the preview is collapsed will simply show the preview. When the preview
is shown, however, clicking any part of the icon will still bring up the menu as
it used to work previously.

This is an alternative implementation to review #117068.

v2: Use another approach for determining what action to take based on the actual
state of the preview in order to prevent duplicate connections. Thanks to Thomas
Lübking for pointing out a possible problem here.

BUG: 332586
REVIEW: 117295
GUI: show a warning for "unknown" multipart/alternative parts

v2: Also provide simple captions for text/plain and text/html MIME types, and
simplify the code by calling setTabIcon instead of repeating the call to
addTab().

BUG: 332950
REVIEW: 117335
Ubuntu: improved loading of error dialogs

I eventually figured out that if you passed the dialog as a URL you can use the
caller parameter (which in our case is the appWindow) which drives the dialogs
placement.

The third parameter can hold a series of properties configuring the popup to be
opened. This can be any property defined by the popup.

REVIEW: 117357
Ubuntu: messagelistpage display message reversely

We're now going through the ThreadingMsgListModel which can reverse the sorting
order for us.

The let's-make-ThreadingMsgListModel-available-to-QML should be probably moved
to a proper QML plugin at some point, perhaps with other C++ classes -- that is
yet to happen.

BUG: 332985
REVIEW: 117346
Adding attach icon for Ubuntu

These are copied from the Ubuntu Community Design Kit
available at http://lucasromerodb.blogspot.com.ar/p/ucdk.html
and are available under the CC-BY-SA 4.0.
Copyright by Lucas Romero Di Benedetto.

REVIEW: 117358
SVN_SILENT made messages (.desktop file)
Improve detecting of attachments

This patch makes it "ignore" single-part multipart/* and any multipart/signed.
In any of these cases, the actual nested MIME part is checked.

Support for proper handling of multipart/alternative got added as well.

v2: Refactoring, and disregard any multipart altogether, i.e. just look at the
nested body parts. See inline comments for details.

Thanks to Thomas Lübking & Stephan Platz for their review.

BUG: 332915
REVIEW: 117360
Ubuntu: Improved list item and fontsizes on message list view

The fontsizes are now using the FontUtils.sizeToPixels. It was
previously using
units.gu() which should only be used for spacing, anchors, margins etc.

Each List item was being rendered inside a fixed size rectangle, since a
listitem sets it's size based on
it's contents, there is no need to have fixed values for this but rather
use the size of the list item

REVIEW: 117371
Ubuntu messageListPage display attachment icon

REVIEW: 117361
Ubuntu: rename to trojita-ubu

This is done in order to prevent filesystem clashes between the Ubuntu-branded
and the common desktop version.

BUG: 333073
REVIEW: 117418
Ubuntu: Fix not finding main.qml causing core dump

the qml files were still being copied to share/trojita and not share/

BUG: 333153
REVIEW:117419
Ubuntu: Enable viewing mailbox subdirectories

Mailbox view can now navigate through child mailboxes.

REVIEW: 117382
BUG: 332989

Fixed translation of Total & Unread message counts

Icon is copied from the ubuntu-mobile-icons package available from
http://packages.ubuntu.com/trusty/all/ubuntu-mobile-icons/download
and is available under the CC-BY-SA 3.0. Copyright by 2004-2012, Canonical Ltd.