Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:Test
kdepim4
r883877.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File r883877.diff of Package kdepim4
Subject: kmail: unread mail layout bug From: wstephenson@suse.de Bug: bug#174304 Patch-upstream: 883877 --- kontact/plugins/kmail/summarywidget.cpp (revision 883876) +++ kontact/plugins/kmail/summarywidget.cpp (revision 883877) @@ -63,6 +63,7 @@ SummaryWidget::SummaryWidget( Kontact::P mLayout = new QGridLayout(); mainLayout->addItem( mLayout ); mLayout->setSpacing( 3 ); + mLayout->setColumnStretch( 1, 1 ); mLayout->setRowStretch( 6, 1 ); slotUnreadCountChanged(); @@ -95,7 +96,6 @@ void SummaryWidget::updateSummary( bool void SummaryWidget::slotUnreadCountChanged() { - kDebug(); org::kde::kmail::kmail kmail( DBUS_KMAIL, "/KMail", QDBusConnection::sessionBus() ); QDBusReply<QStringList> reply = kmail.folderList(); if ( reply.isValid() ) { @@ -122,6 +122,7 @@ void SummaryWidget::updateFolderList( co activeFolders = config.readEntry( "ActiveFolders", QStringList() ); } + QLabel *label = 0; int counter = 0; QStringList::ConstIterator it; org::kde::kmail::kmail kmail( DBUS_KMAIL, "/KMail", QDBusConnection::sessionBus() ); @@ -151,18 +152,17 @@ void SummaryWidget::updateFolderList( co KUrlLabel *urlLabel = new KUrlLabel( *it, folderPath, this ); urlLabel->installEventFilter( this ); urlLabel->setAlignment( Qt::AlignLeft ); - urlLabel->show(); - connect( urlLabel, SIGNAL(leftClickedUrl(const QString&)), - SLOT(selectFolder(const QString&)) ); mLayout->addWidget( urlLabel, counter, 0 ); mLabels.append( urlLabel ); - QLabel *label = new QLabel( i18nc( "%1: number of unread messages " - "%2: total number of messages", "%1 / %2", - numUnreadMsg, numMsg ), this ); + connect( urlLabel, SIGNAL(leftClickedUrl(const QString&)), + SLOT(selectFolder(const QString&)) ); + + label = new QLabel( i18nc( "%1: number of unread messages " + "%2: total number of messages", + "%1 / %2", numUnreadMsg, numMsg ), this ); label->setAlignment( Qt::AlignLeft ); - label->show(); - mLayout->addWidget( label, counter, 2 ); + mLayout->addWidget( label, counter, 1 ); mLabels.append( label ); counter++; @@ -171,12 +171,16 @@ void SummaryWidget::updateFolderList( co } if ( counter == 0 ) { - QLabel *label = new QLabel( i18n( "No unread messages in your monitored folders" ), this ); + label = new QLabel( i18n( "No unread messages in your monitored folders" ), this ); label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - mLayout->addWidget( label, 0, 0, 1, 3 ); - label->show(); + mLayout->addWidget( label, 0, 2 ); mLabels.append( label ); } + + QList<QLabel*>::iterator lit; + for ( lit = mLabels.begin(); lit != mLabels.end(); ++lit ) { + (*lit)->show(); + } } bool SummaryWidget::eventFilter( QObject *obj, QEvent *e ) Index: kontact/plugins/kmail/summarywidget.cpp ===================================================================
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor